Mercurial > touhou
comparison eosd @ 508:1bc014f9d572
Make GameRunner entirely independent of Window or GameRenderer, so we can run a game without display.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 19 Nov 2013 14:19:14 +0100 |
parents | c622eaf64428 |
children | b39ad30c6620 |
comparison
equal
deleted
inserted
replaced
507:507d446dc6cf | 508:1bc014f9d572 |
---|---|
58 | 58 |
59 from pytouhou.lib.sdl import SDL | 59 from pytouhou.lib.sdl import SDL |
60 from pytouhou.ui.window import Window | 60 from pytouhou.ui.window import Window |
61 from pytouhou.resource.loader import Loader | 61 from pytouhou.resource.loader import Loader |
62 from pytouhou.ui.gamerunner import GameRunner | 62 from pytouhou.ui.gamerunner import GameRunner |
63 from pytouhou.ui.gamerenderer import GameRenderer | |
63 from pytouhou.game.player import GameOver | 64 from pytouhou.game.player import GameOver |
64 from pytouhou.formats.t6rp import T6RP, Level | 65 from pytouhou.formats.t6rp import T6RP, Level |
65 from pytouhou.utils.random import Random | 66 from pytouhou.utils.random import Random |
66 from pytouhou.vm.msgrunner import NextStage | 67 from pytouhou.vm.msgrunner import NextStage |
67 from pytouhou.formats.hint import Hint | 68 from pytouhou.formats.hint import Hint |
164 hints = Hint.read(file) | 165 hints = Hint.read(file) |
165 | 166 |
166 game_class = GameBossRush if boss_rush else Game | 167 game_class = GameBossRush if boss_rush else Game |
167 | 168 |
168 common = Common(resource_loader, characters, continues, stage_num - 1) | 169 common = Common(resource_loader, characters, continues, stage_num - 1) |
169 runner = GameRunner(window, common, resource_loader, skip_replay, con) | 170 renderer = GameRenderer(resource_loader, window.use_fixed_pipeline) |
171 runner = GameRunner(window, renderer, common, resource_loader, skip_replay, con) | |
170 window.set_runner(runner) | 172 window.set_runner(runner) |
173 | |
171 while True: | 174 while True: |
172 first_player = common.players[0] | 175 first_player = common.players[0] |
173 | 176 |
174 if replay: | 177 if replay: |
175 level = replay.levels[stage_num - 1] | 178 level = replay.levels[stage_num - 1] |