Mercurial > touhou
comparison pytouhou/formats/anm0.py @ 35:9027692abd79
Fix anm0 parsing
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 14 Aug 2011 14:57:56 +0200 |
parents | 66ce9bb440ac |
children | cb5b27011044 |
comparison
equal
deleted
inserted
replaced
34:4d93d45ecb62 | 35:9027692abd79 |
---|---|
54 anm.scripts[i] = [] | 54 anm.scripts[i] = [] |
55 file.seek(offset) | 55 file.seek(offset) |
56 while True: | 56 while True: |
57 #TODO | 57 #TODO |
58 time, instr_type, length = unpack('<HBB', file.read(4)) | 58 time, instr_type, length = unpack('<HBB', file.read(4)) |
59 data = file.read(length) | |
60 anm.scripts[i].append((time, instr_type, data)) | |
59 if instr_type == 0: | 61 if instr_type == 0: |
60 break | 62 break |
61 data = file.read(length) | |
62 anm.scripts[i].append((time, instr_type, data)) | |
63 #TODO | 63 #TODO |
64 | 64 |
65 return anm | 65 return anm |
66 | 66 |