Mercurial > touhou
comparison pytouhou/games/eosd/game.py @ 623:df6ae915ebaa
Don’t load stg?enm.anm two times if there is no stg?enm2.anm.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 08 Apr 2015 18:53:13 +0200 |
parents | d1f0bb0b7a17 |
children |
comparison
equal
deleted
inserted
replaced
622:98603f2c32b4 | 623:df6ae915ebaa |
---|---|
100 def __init__(self, resource_loader, stage, rank, difficulty, | 100 def __init__(self, resource_loader, stage, rank, difficulty, |
101 common, prng, hints=None, friendly_fire=True, | 101 common, prng, hints=None, friendly_fire=True, |
102 nb_bullets_max=640): | 102 nb_bullets_max=640): |
103 | 103 |
104 self.etama = common.etama #XXX | 104 self.etama = common.etama #XXX |
105 self.enm_anm = resource_loader.get_anm('stg%denm.anm' % stage) | |
105 try: | 106 try: |
106 self.enm_anm = resource_loader.get_multi_anm(('stg%denm.anm' % stage, | 107 self.enm_anm = self.enm_anm + resource_loader.get_anm('stg%denm2.anm' % stage) |
107 'stg%denm2.anm' % stage)) | |
108 except KeyError: | 108 except KeyError: |
109 self.enm_anm = resource_loader.get_anm('stg%denm.anm' % stage) | 109 pass |
110 ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage) | 110 ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage) |
111 self.ecl_runners = [ECLMainRunner(main, ecl.subs, self) for main in ecl.mains] | 111 self.ecl_runners = [ECLMainRunner(main, ecl.subs, self) for main in ecl.mains] |
112 | 112 |
113 self.spellcard_effect_anm = resource_loader.get_single_anm('eff0%d.anm' % stage) | 113 self.spellcard_effect_anm = resource_loader.get_single_anm('eff0%d.anm' % stage) |
114 | 114 |