Mercurial > touhou
comparison pytouhou/vm/anmrunner.py @ 575:e4c9eafab6d0
Don’t log every instruction executed, nobody is interested in that, and demote unhandled opcodes to debug.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 26 Jul 2014 14:46:03 +0200 |
parents | 59bd29568753 |
children | e15672733c93 |
comparison
equal
deleted
inserted
replaced
574:94229756abd9 | 575:e4c9eafab6d0 |
---|---|
86 | 86 |
87 if frame == self.frame: | 87 if frame == self.frame: |
88 try: | 88 try: |
89 callback = self.handlers[opcode] | 89 callback = self.handlers[opcode] |
90 except KeyError: | 90 except KeyError: |
91 logger.warn('unhandled opcode %d (args: %r)', opcode, args) | 91 logger.debug('[%d - %04d] unhandled opcode %d (args: %r)', |
92 id(self), self.frame, opcode, args) | |
92 else: | 93 else: |
93 logger.debug('[%d - %04d] anm_%d%r', id(self), | |
94 self.frame, opcode, args) | |
95 callback(self, *args) | 94 callback(self, *args) |
96 self._sprite.changed = True | 95 self._sprite.changed = True |
97 | 96 |
98 if not self.waiting: | 97 if not self.waiting: |
99 self.frame += 1 | 98 self.frame += 1 |