aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2009-01-29 22:17:37 -0500
committercomex <comexk@gmail.com>2009-01-29 22:17:37 -0500
commit188c63340b928cef915a949188b6c2472d741179 (patch)
treefa6bcd5710956053a987165cd1dda7c7ef8687b7
parent3ed275668014bbe6c50489652aa04e3764fbd9f2 (diff)
pointless brlan stuff
-rw-r--r--parse-brlan.py9
-rw-r--r--testrlyt.py2
2 files changed, 7 insertions, 4 deletions
diff --git a/parse-brlan.py b/parse-brlan.py
index 13c2101..03d8133 100644
--- a/parse-brlan.py
+++ b/parse-brlan.py
@@ -36,16 +36,19 @@ for typ, chunk in ch:
aunk, aoffs = struct.unpack('>II', chunk[offs + 0x14:offs + 0x1c])
aoffs += offs
atyp = chunk[aoffs:aoffs+4]
+ #print hex(aoffs), hex(offs), name
num_aents = ord(chunk[aoffs + 4])
print atyp, name, hex(aunk)
+
for m in xrange(num_aents):
boffs = aoffs + 8 + 4*m
coffs, = struct.unpack('>I', chunk[boffs:boffs + 4])
coffs += aoffs
- if atyp in ('RLMC', 'RLVC', 'RLPA', 'RLTP', 'RLIM'): # doesn't cover RLTS, RLVI
- alpha_maybe = ord(chunk[coffs+1])
+ if atyp in ('RLMC', 'RLVC', 'RLPA', 'RLTP', 'RLIM', 'RLTS'): # doesn't cover RLTS, RLVI
+ byte1 = ord(chunk[coffs+1])
+ byte2 = ord(chunk[coffs+2])
num_cookies, pad, cookies_offs = struct.unpack('>HHI', chunk[coffs+4:coffs+0xc])
- print hex(alpha_maybe), num_cookies
+ print hex(byte1), hex(byte2), num_cookies
for o in xrange(num_cookies):
cookie_offs = coffs + cookies_offs + 0xc*o
coords = struct.unpack('>fff', chunk[cookie_offs:cookie_offs + 0xc])
diff --git a/testrlyt.py b/testrlyt.py
index 9619263..2687a7d 100644
--- a/testrlyt.py
+++ b/testrlyt.py
@@ -70,7 +70,7 @@
'name': 'textbox%d' % i,
'width': 400,
'x': -250,
- 'y': -50 + 5*i,
+ 'y': -50 + i,
'xmag': 1,
'ymag': 1,
'z': 0,