comparison eclviewer.py @ 50:811cefefb5c8

Fix a few bugs and add support for a few instructions
author Thibaut Girka <thib@sitedethib.com>
date Mon, 22 Aug 2011 21:16:47 +0200
parents cbe1cb50f2fd
children ab826bc29aa2
comparison
equal deleted inserted replaced
49:cbe1cb50f2fd 50:811cefefb5c8
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 from pytouhou.game.game import GameState
22 from pytouhou.game.player import Player
22 23
23 import OpenGL 24 import OpenGL
24 OpenGL.FORWARD_COMPATIBLE_ONLY = True 25 OpenGL.FORWARD_COMPATIBLE_ONLY = True
25 from OpenGL.GL import * 26 from OpenGL.GL import *
26 from OpenGL.GLU import * 27 from OpenGL.GLU import *
60 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num))) 61 enemies2_anim = Animations.read(BytesIO(archive.extract('stg%denm2.anm' % stage_num)))
61 except KeyError: 62 except KeyError:
62 pass 63 pass
63 else: 64 else:
64 anims.append(enemies2_anim) 65 anims.append(enemies2_anim)
65 enemy_manager = EnemyManager(stage, AnmWrapper(anims), ecl, GameState([], stage_num, 0, 16)) 66 enemy_manager = EnemyManager(stage, AnmWrapper(anims), ecl, GameState([Player()], stage_num, 0, 16))
66 texture_manager.preload(anims) 67 texture_manager.preload(anims)
67 68
68 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num))) 69 background_anim = Animations.read(BytesIO(archive.extract('stg%dbg.anm' % stage_num)))
69 background = Background(stage, AnmWrapper((background_anim,))) 70 background = Background(stage, AnmWrapper((background_anim,)))
70 texture_manager.preload((background_anim,)) 71 texture_manager.preload((background_anim,))