# HG changeset patch # User Thibaut Girka # Date 1313338125 -7200 # Node ID cb5b27011044a41a5288b751ee836dac8ee2e417 # Parent a10e3f44a88336d0adf24f01211436020e034fc5 Small refactoring and proper anm0's instruction 5 handling diff --git a/pytouhou/formats/anm0.py b/pytouhou/formats/anm0.py --- a/pytouhou/formats/anm0.py +++ b/pytouhou/formats/anm0.py @@ -49,15 +49,32 @@ class Animations(object): # Scripts - anm.scripts = {}#[None] * nb_scripts + anm.scripts = {} for i, offset in script_offsets: anm.scripts[i] = [] + instruction_offsets = [] file.seek(offset) while True: #TODO + instruction_offsets.append(file.tell() - offset) time, instr_type, length = unpack('