Mercurial > touhou
comparison pytouhou/formats/anm0.py @ 111:340fcda8e64a
Fix a few, minor things
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 06 Sep 2011 21:28:44 +0200 |
parents | f5f9b5eb69a3 |
children | e7902309305c |
comparison
equal
deleted
inserted
replaced
110:3ac41b966fed | 111:340fcda8e64a |
---|---|
103 instruction_offsets = [] | 103 instruction_offsets = [] |
104 file.seek(offset) | 104 file.seek(offset) |
105 while True: | 105 while True: |
106 #TODO | 106 #TODO |
107 instruction_offsets.append(file.tell() - offset) | 107 instruction_offsets.append(file.tell() - offset) |
108 time, opcode, length = unpack('<HBB', file.read(4)) | 108 time, opcode, size = unpack('<HBB', file.read(4)) |
109 data = file.read(length) | 109 data = file.read(size) |
110 if opcode in cls._instructions: | 110 if opcode in cls._instructions: |
111 args = unpack('<%s' % cls._instructions[opcode][0], data) | 111 args = unpack('<%s' % cls._instructions[opcode][0], data) |
112 else: | 112 else: |
113 args = (data,) | 113 args = (data,) |
114 logger.warn('unknown opcode %d', opcode) | 114 logger.warn('unknown opcode %d', opcode) |