diff options
| author | comex <comexk@gmail.com> | 2009-01-29 21:04:33 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2009-01-29 21:04:33 -0500 |
| commit | 5264bd8c3e9fa48750b0ced76c07e04ef039e430 (patch) | |
| tree | ead9c42df08c91f6fa342aeadaeada55c4a0f96c /parse-brlyt.py | |
| parent | 8edaf638429568b8f2dc1b0f2a806ba7847dbd53 (diff) | |
now makes working brlyts!
Diffstat (limited to 'parse-brlyt.py')
| -rw-r--r-- | parse-brlyt.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/parse-brlyt.py b/parse-brlyt.py index ea998ca..9ba2cd4 100644 --- a/parse-brlyt.py +++ b/parse-brlyt.py @@ -48,6 +48,7 @@ for typ, chunk in ch: vars, pos = parse_data(chunk, 'numoffs') vars[things] = [] pos += vars['offs'] + bpos = pos del vars['offs'] # unneeded for n in xrange(vars['num']): if typ == 'mat1': @@ -57,7 +58,7 @@ for typ, chunk in ch: offset, unk = struct.unpack('>II', chunk[pos:pos+8]) pos += 8 - name = nullterm(chunk[offset - 8:]) + name = nullterm(chunk[(-8 if typ == 'mat1' else bpos) + offset:]) vars[things].append(name if typ == 'mat1' else {'name': name, 'unk': unk}) if typ == 'mat1': materials = vars['materials'] |
