# HG changeset patch # User Thibaut Girka # Date 1313699072 -7200 # Node ID 7195aaf95f6e49473d20ba00b6482506992458ac # Parent 1b0ca2fb89f9c0b917738a6f4928ea5b003e216c Fix set_counter, and relative_jump(_ex) diff --git a/pytouhou/formats/ecl.py b/pytouhou/formats/ecl.py --- a/pytouhou/formats/ecl.py +++ b/pytouhou/formats/ecl.py @@ -133,10 +133,15 @@ class ECL(object): 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('