comparison eosd @ 407:b4be9b50557e

Add a --no-particles option to remove particles.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 09 Jun 2013 22:53:25 +0200
parents 6c0cb3eee33e
children b0b8825296d0
comparison
equal deleted inserted replaced
406:705870483559 407:b4be9b50557e
63 63
64 64
65 65
66 def main(path, data, stage_num, rank, character, replay, save_filename, 66 def main(path, data, stage_num, rank, character, replay, save_filename,
67 skip_replay, boss_rush, fps_limit, single_buffer, debug, 67 skip_replay, boss_rush, fps_limit, single_buffer, debug,
68 fixed_pipeline, display_background, hints): 68 fixed_pipeline, display_background, display_particles, hints):
69 69
70 resource_loader = Loader(path) 70 resource_loader = Loader(path)
71 71
72 try: 72 try:
73 resource_loader.scan_archives(data) 73 resource_loader.scan_archives(data)
148 148
149 # Load stage data 149 # Load stage data
150 stage = resource_loader.get_stage('stage%d.std' % stage_num) 150 stage = resource_loader.get_stage('stage%d.std' % stage_num)
151 151
152 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, continues=continues, hints=hints_stage) 152 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, continues=continues, hints=hints_stage)
153
154 if not display_particles:
155 def new_particle(pos, anim, amp, number=1, reverse=False, duration=24):
156 pass
157 game.new_particle = new_particle
153 158
154 if display_background: 159 if display_background:
155 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) 160 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,))
156 background = Background(stage, background_anm_wrapper) 161 background = Background(stage, background_anm_wrapper)
157 else: 162 else:
206 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering') 211 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering')
207 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit') 212 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit')
208 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.') 213 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.')
209 parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.') 214 parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.')
210 parser.add_argument('--no-background', action='store_false', help='Disable background display (huge performance boost on slow systems).') 215 parser.add_argument('--no-background', action='store_false', help='Disable background display (huge performance boost on slow systems).')
216 parser.add_argument('--no-particles', action='store_false', help='Disable particles handling (huge performance boost on slow systems).')
211 parser.add_argument('--hints', metavar='HINTS', default=None, help='Hints file, to display text while playing.') 217 parser.add_argument('--hints', metavar='HINTS', default=None, help='Hints file, to display text while playing.')
212 218
213 args = parser.parse_args() 219 args = parser.parse_args()
214 220
215 main(args.path, tuple(args.data), args.stage, args.rank, args.character, 221 main(args.path, tuple(args.data), args.stage, args.rank, args.character,
216 args.replay, args.save_replay, args.skip_replay, args.boss_rush, 222 args.replay, args.save_replay, args.skip_replay, args.boss_rush,
217 args.fps_limit, args.single_buffer, args.debug, args.fixed_pipeline, 223 args.fps_limit, args.single_buffer, args.debug, args.fixed_pipeline,
218 args.no_background, args.hints) 224 args.no_background, args.no_particles, args.hints)