comparison scripts/pytouhou @ 589:0768122da817

Add a frameskip option, and use swap interval to implement it.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 10 Oct 2014 15:59:11 +0200
parents e35a083d4208
children e15672733c93
comparison
equal deleted inserted replaced
588:7a82c4b52b16 589:0768122da817
29 'port': 0, 29 'port': 0,
30 'backend': ['opengl', 'sdl'], 30 'backend': ['opengl', 'sdl'],
31 'gl-flavor': 'compatibility', 31 'gl-flavor': 'compatibility',
32 'gl-version': 2.1, 32 'gl-version': 2.1,
33 'double-buffer': None, 33 'double-buffer': None,
34 'fps-limit': -1} 34 'fps-limit': -1,
35 'frameskip': 1}
35 36
36 from pytouhou.options import parse_config, parse_arguments 37 from pytouhou.options import parse_config, parse_arguments
37 options = parse_config('pytouhou', defaults) 38 options = parse_config('pytouhou', defaults)
38 args = parse_arguments(options) 39 args = parse_arguments(options)
39 40
277 with open(save_filename, 'wb+') as file: 278 with open(save_filename, 'wb+') as file:
278 save_replay.write(file) 279 save_replay.write(file)
279 280
280 281
281 with SDL(sound=args.no_sound): 282 with SDL(sound=args.no_sound):
282 window = Window(backend, fps_limit=args.fps_limit) 283 window = Window(backend, fps_limit=args.fps_limit,
284 frameskip=args.frameskip)
283 285
284 main(window, args.path, tuple(args.data), args.stage, args.rank, 286 main(window, args.path, tuple(args.data), args.stage, args.rank,
285 args.character, args.replay, args.save_replay, args.skip_replay, 287 args.character, args.replay, args.save_replay, args.skip_replay,
286 args.boss_rush, args.debug, args.no_background, args.no_particles, 288 args.boss_rush, args.debug, args.no_background, args.no_particles,
287 args.hints, args.port, args.remote, args.friendly_fire) 289 args.hints, args.port, args.remote, args.friendly_fire)