comparison eclviewer.py @ 49:cbe1cb50f2fd

Refactor ECLRunner/EnemyManager so that all VM stuff goes to ECLRunner
author Thibaut Girka <thib@sitedethib.com>
date Mon, 22 Aug 2011 19:23:00 +0200
parents e01e88b06a13
children 811cefefb5c8
comparison
equal deleted inserted replaced
48:8353c33d53d4 49:cbe1cb50f2fd
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.sprite import AnmWrapper
18 from pytouhou.game.background import Background 18 from pytouhou.game.background import Background
19 from pytouhou.game.enemymanager import EnemyManager 19 from pytouhou.game.enemymanager import EnemyManager
20 from pytouhou.opengl.texture import TextureManager 20 from pytouhou.opengl.texture import TextureManager
21 from pytouhou.game.game import GameState
21 22
22 import OpenGL 23 import OpenGL
23 OpenGL.FORWARD_COMPATIBLE_ONLY = True 24 OpenGL.FORWARD_COMPATIBLE_ONLY = True
24 from OpenGL.GL import * 25 from OpenGL.GL import *
25 from OpenGL.GLU import * 26 from OpenGL.GLU import *
59 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num))) 60 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num)))
60 except KeyError: 61 except KeyError:
61 pass 62 pass
62 else: 63 else:
63 anims.append(enemies2_anim) 64 anims.append(enemies2_anim)
64 enemy_manager = EnemyManager(stage, AnmWrapper(anims), ecl) 65 enemy_manager = EnemyManager(stage, AnmWrapper(anims), ecl, GameState([], stage_num, 0, 16))
65 texture_manager.preload(anims) 66 texture_manager.preload(anims)
66 67
67 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num))) 68 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num)))
68 background = Background(stage, AnmWrapper((background_anim,))) 69 background = Background(stage, AnmWrapper((background_anim,)))
69 texture_manager.preload((background_anim,)) 70 texture_manager.preload((background_anim,))