diff 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
line wrap: on
line diff
--- a/pytouhou/games/eosd/game.py
+++ b/pytouhou/games/eosd/game.py
@@ -102,11 +102,11 @@ class Game(GameBase):
                  nb_bullets_max=640):
 
         self.etama = common.etama #XXX
+        self.enm_anm = resource_loader.get_anm('stg%denm.anm' % stage)
         try:
-            self.enm_anm = resource_loader.get_multi_anm(('stg%denm.anm' % stage,
-                                                          'stg%denm2.anm' % stage))
+            self.enm_anm = self.enm_anm + resource_loader.get_anm('stg%denm2.anm' % stage)
         except KeyError:
-            self.enm_anm = resource_loader.get_anm('stg%denm.anm' % stage)
+            pass
         ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage)
         self.ecl_runners = [ECLMainRunner(main, ecl.subs, self) for main in ecl.mains]