diff pytouhou/formats/ecl.py @ 51:0707ff53e7b5

Add support for a few instructions
author Thibaut Girka <thib@sitedethib.com>
date Mon, 22 Aug 2011 22:12:34 +0200
parents 811cefefb5c8
children ab826bc29aa2
line wrap: on
line diff
--- a/pytouhou/formats/ecl.py
+++ b/pytouhou/formats/ecl.py
@@ -160,7 +160,7 @@ class ECL(object):
             # Translate offsets to instruction pointers
             for instr_offset, (i, instr) in zip(instruction_offsets, enumerate(ecl.subs[-1])):
                 time, opcode, rank_mask, param_mask, args = instr
-                if opcode == 2: # relative_jump
+                if opcode in (2, 31): # relative_jump
                     frame, relative_offset = args
                     args = frame, instruction_offsets.index(instr_offset + relative_offset)
                 elif opcode == 3: # relative_jump_ex