comparison eclviewer.py @ 21:bf225780973f

Small refactoring, and Rumia \o/
author Thibaut Girka <thib@sitedethib.com>
date Thu, 11 Aug 2011 12:39:12 +0200
parents ca7886296d4a
children cc864aadc733
comparison
equal deleted inserted replaced
20:6ebf9539c077 21:bf225780973f
12 12
13 from pytouhou.formats.pbg3 import PBG3 13 from pytouhou.formats.pbg3 import PBG3
14 from pytouhou.formats.std import Stage 14 from pytouhou.formats.std import Stage
15 from pytouhou.formats.ecl import ECL 15 from pytouhou.formats.ecl import ECL
16 from pytouhou.formats.anm0 import Animations 16 from pytouhou.formats.anm0 import Animations
17 from pytouhou.game.sprite import AnmWrapper
17 from pytouhou.game.background import Background 18 from pytouhou.game.background import Background
18 from pytouhou.game.enemymanager import EnemyManager 19 from pytouhou.game.enemymanager import EnemyManager
19 from pytouhou.opengl.texture import TextureManager 20 from pytouhou.opengl.texture import TextureManager
20 21
21 import OpenGL 22 import OpenGL
57 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num))) 58 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num)))
58 except KeyError: 59 except KeyError:
59 pass 60 pass
60 else: 61 else:
61 anims.append(enemies2_anim) 62 anims.append(enemies2_anim)
62 enemy_manager = EnemyManager(stage, anims, ecl) 63 enemy_manager = EnemyManager(stage, AnmWrapper(anims), ecl)
63 64
64 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num))) 65 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num)))
65 background = Background(stage, background_anim) 66 background = Background(stage, AnmWrapper((background_anim,)))
66 67
67 print(enemy_manager.stage.name) 68 print(enemy_manager.stage.name)
68 69
69 frame = 0 70 frame = 0
70 71