Mercurial > touhou
comparison eosd @ 375:8f2f3053906a
Add an option to disable background.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 06 Aug 2012 23:01:33 +0200 |
parents | 6deab6ad8be8 |
children | 11d895b6c0dc |
comparison
equal
deleted
inserted
replaced
374:6a63fd3deb76 | 375:8f2f3053906a |
---|---|
61 EoSDGame.cleanup(self) | 61 EoSDGame.cleanup(self) |
62 | 62 |
63 | 63 |
64 | 64 |
65 def main(path, data, stage_num, rank, character, replay, save_filename, | 65 def main(path, data, stage_num, rank, character, replay, save_filename, |
66 boss_rush, fps_limit, single_buffer, debug, fixed_pipeline): | 66 boss_rush, fps_limit, single_buffer, debug, fixed_pipeline, |
67 display_background): | |
67 | 68 |
68 resource_loader = Loader(path) | 69 resource_loader = Loader(path) |
69 | 70 |
70 try: | 71 try: |
71 resource_loader.scan_archives(data) | 72 resource_loader.scan_archives(data) |
141 # Load stage data | 142 # Load stage data |
142 stage = resource_loader.get_stage('stage%d.std' % stage_num) | 143 stage = resource_loader.get_stage('stage%d.std' % stage_num) |
143 | 144 |
144 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, continues=continues) | 145 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, continues=continues) |
145 | 146 |
146 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) | 147 if display_background: |
147 background = Background(stage, background_anm_wrapper) | 148 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) |
149 background = Background(stage, background_anm_wrapper) | |
150 else: | |
151 background = None | |
148 | 152 |
149 # Main loop | 153 # Main loop |
150 runner.load_game(game, background, stage.bgms, replay, save_keystates) | 154 runner.load_game(game, background, stage.bgms, replay, save_keystates) |
151 try: | 155 try: |
152 runner.start() | 156 runner.start() |
193 parser.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses') | 197 parser.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses') |
194 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering') | 198 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering') |
195 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit') | 199 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit') |
196 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.') | 200 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.') |
197 parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.') | 201 parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.') |
202 parser.add_argument('--no-background', action='store_false', help='Disable background display (huge performance boost on slow systems).') | |
198 | 203 |
199 args = parser.parse_args() | 204 args = parser.parse_args() |
200 | 205 |
201 main(args.path, tuple(args.data), args.stage, args.rank, args.character, | 206 main(args.path, tuple(args.data), args.stage, args.rank, args.character, |
202 args.replay, args.save_replay, args.boss_rush, args.fps_limit, | 207 args.replay, args.save_replay, args.boss_rush, args.fps_limit, |
203 args.single_buffer, args.debug, args.fixed_pipeline) | 208 args.single_buffer, args.debug, args.fixed_pipeline, args.no_background) |