# HG changeset patch # User Thibaut Girka # Date 1315235927 -7200 # Node ID 572740acdb258dc194f2600cc445936c5a6749e0 # Parent 6c59d0eeb5faa6b6a817f743d636df5b8834fbf5 A few changes in the execution order to match 102h.exe diff --git a/pytouhou/game/enemy.py b/pytouhou/game/enemy.py --- a/pytouhou/game/enemy.py +++ b/pytouhou/game/enemy.py @@ -132,6 +132,7 @@ class Enemy(object): def set_anim(self, index): self._sprite = Sprite() self._anmrunner = ANMRunner(self._anm_wrapper, index, self._sprite) + self._anmrunner.run_frame() def set_pos(self, x, y, z): diff --git a/pytouhou/vm/eclrunner.py b/pytouhou/vm/eclrunner.py --- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -77,7 +77,9 @@ class ECLMainRunner(object): if z < -990: #102h.exe@0x411881 y = self._game_state.prng.rand_double() * 800 enemy = self._new_enemy_func((x, y), life, instr_type) - self.processes.append(ECLRunner(self._ecl, sub, enemy, self._game_state)) + process = ECLRunner(self._ecl, sub, enemy, self._game_state) + self.processes.append(process) + process.run_iteration()