comparison pytouhou/formats/exe.py @ 236:741860192b56

Implement ANM0 interrupts “Instruction” 22 is used as a label for interrupts. If the normal animation is interrupted, it goes straight to the matched instruction. Interrupt -1 matches all interrupts.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 01 Jan 2012 19:47:34 +0100
parents e59bd7979ddc
children 2876c267be00
comparison
equal deleted inserted replaced
235:e59bd7979ddc 236:741860192b56
153 offset, = unpack('<I', file.read(4)) 153 offset, = unpack('<I', file.read(4))
154 if offset not in shots_offsets: 154 if offset not in shots_offsets:
155 shots_offsets[offset] = [] 155 shots_offsets[offset] = []
156 shots_offsets[offset].append(sht) 156 shots_offsets[offset].append(sht)
157 157
158 character = 0
159 for shots_offset, shts in shots_offsets.iteritems(): 158 for shots_offset, shts in shots_offsets.iteritems():
160 pe_file.seek_to_va(shots_offset) 159 pe_file.seek_to_va(shots_offset)
161 160
162 level_count = 9 161 level_count = 9
163 levels = [] 162 levels = []
185 shots[power].append(shot) 184 shots[power].append(shot)
186 185
187 for sht in shts: 186 for sht in shts:
188 sht.shots = shots 187 sht.shots = shots
189 188
190 character += 1
191
192 189
193 return characters 190 return characters
194 191