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 /write-brlyt.py | |
| parent | 8edaf638429568b8f2dc1b0f2a806ba7847dbd53 (diff) | |
now makes working brlyts!
Diffstat (limited to 'write-brlyt.py')
| -rw-r--r-- | write-brlyt.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/write-brlyt.py b/write-brlyt.py index b73b23a..a424e11 100644 --- a/write-brlyt.py +++ b/write-brlyt.py @@ -35,7 +35,7 @@ for c in chunks: offss.append(len(strings)) strings += name for n, thing in enumerate(ls): - chunk += struct.pack('>I', offss[n] + 12 + (4 if typ == 'mat1' else 8) * len(ls)) + chunk += struct.pack('>I', offss[n] + (12 if typ == 'mat1' else 0) + (4 if typ == 'mat1' else 8) * len(ls)) if typ != 'mat1': chunk += struct.pack('>I', thing['unk']) chunk += strings @@ -46,7 +46,7 @@ for c in chunks: if typ == 'txt1': vars['~text.name_offs'] = 0x74 vars['~text.mat_off'] = materials.index(vars['~text.material']) - blob = unicode(vars['~text.text']).encode('utf_16_be') + blob = untv(unicode(vars['~text.text']).encode('utf_16_be')) vars['~text.len1'] = vars['~text.len2'] = len(blob) chunk += unparse_data(vars, 'text', prefix='~text') chunk += blob |
