From 5264bd8c3e9fa48750b0ced76c07e04ef039e430 Mon Sep 17 00:00:00 2001 From: comex Date: Thu, 29 Jan 2009 21:04:33 -0500 Subject: now makes working brlyts! --- write-brlyt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'write-brlyt.py') 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 -- cgit v1.3.1