Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 284:91eb0afcb1e3
Fix time stop handling.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 12 Feb 2012 15:50:32 +0100 |
parents | b6c068c8f7f2 |
children | 4838e9bab0f9 |
comparison
equal
deleted
inserted
replaced
283:b6c068c8f7f2 | 284:91eb0afcb1e3 |
---|---|
39 | 39 |
40 self.instruction_pointer = 0 | 40 self.instruction_pointer = 0 |
41 | 41 |
42 | 42 |
43 def run_iter(self): | 43 def run_iter(self): |
44 if not self._game.boss: | |
45 self.time_stopped = False | |
46 | |
44 while True: | 47 while True: |
45 try: | 48 try: |
46 frame, sub, instr_type, args = self._ecl.main[self.instruction_pointer] | 49 frame, sub, instr_type, args = self._ecl.main[self.instruction_pointer] |
47 except IndexError: | 50 except IndexError: |
48 break | 51 break |
60 else: | 63 else: |
61 callback(self, sub, instr_type, *args) | 64 callback(self, sub, instr_type, *args) |
62 | 65 |
63 self.processes[:] = (process for process in self.processes | 66 self.processes[:] = (process for process in self.processes |
64 if process.run_iteration()) | 67 if process.run_iteration()) |
65 | |
66 if not self._game.boss: | |
67 self.time_stopped = False | |
68 | 68 |
69 if not self.time_stopped: | 69 if not self.time_stopped: |
70 self.frame += 1 | 70 self.frame += 1 |
71 | 71 |
72 | 72 |