# HG changeset patch # User Thibaut Girka # Date 1313699072 -7200 # Node ID 7195aaf95f6e49473d20ba00b6482506992458ac # Parent 1b0ca2fb89f9c0b917738a6f4928ea5b003e216c Fix set_counter, and relative_jump(_ex) diff -r 1b0ca2fb89f9 -r 7195aaf95f6e pytouhou/formats/ecl.py --- a/pytouhou/formats/ecl.py Thu Aug 18 22:11:39 2011 +0200 +++ b/pytouhou/formats/ecl.py Thu Aug 18 22:24:32 2011 +0200 @@ -133,10 +133,15 @@ ecl.main = [] # Read subs - for offset in sub_offsets: - file.seek(offset) + for sub_offset in sub_offsets: + file.seek(sub_offset) ecl.subs.append([]) + + instruction_offsets = [] + while True: + instruction_offsets.append(file.tell() - sub_offset) + time, opcode = unpack('