Mercurial > touhou
diff pytouhou/game/game.py @ 372:704bea2e4360
Use a future-proof ECL parser.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 06 Aug 2012 22:52:22 +0200 |
parents | 488c094ed51d |
children | 6deab6ad8be8 |
line wrap: on
line diff
--- a/pytouhou/game/game.py +++ b/pytouhou/game/game.py @@ -79,7 +79,7 @@ class Game(object): 'stg%denm2.anm' % stage)) self.etama4 = resource_loader.get_anm_wrapper(('etama4.anm',)) ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage) - self.ecl_runner = ECLMainRunner(ecl, self) + self.ecl_runners = [ECLMainRunner(main, ecl.subs, self) for main in ecl.mains] self.spellcard_effect_anm_wrapper = resource_loader.get_anm_wrapper(('eff0%d.anm' % stage,)) self.spellcard_effect = None @@ -215,7 +215,8 @@ class Game(object): def run_iter(self, keystate): # 1. VMs. - self.ecl_runner.run_iter() + for runner in self.ecl_runners: + runner.run_iter() # 2. Modify difficulty if self.frame % (32*60) == (32*60): #TODO: check if that is really that frame.