Mercurial > touhou
changeset 534:346cbf266856
Move options to logical groups, to make the help a bit less dry; and disable friendly-fire by default.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 05 Apr 2014 13:40:45 +0200 |
parents | de778a80820a |
children | a50c0a1b628f |
files | eosd |
diffstat | 1 files changed, 28 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/eosd +++ b/eosd @@ -29,27 +29,35 @@ parser = argparse.ArgumentParser(descrip parser.add_argument('data', metavar='DAT', default=default_data, nargs='*', help='Game’s data files') parser.add_argument('-p', '--path', metavar='DIRECTORY', default='.', help='Game directory path.') -parser.add_argument('-s', '--stage', metavar='STAGE', type=int, default=None, help='Stage, 1 to 7 (Extra).') -parser.add_argument('-r', '--rank', metavar='RANK', type=int, default=0, help='Rank, from 0 (Easy, default) to 3 (Lunatic).') -parser.add_argument('-c', '--character', metavar='CHARACTER', type=int, default=0, help='Select the character to use, from 0 (ReimuA, default) to 3 (MarisaB).') -parser.add_argument('--replay', metavar='REPLAY', help='Select a replay') -parser.add_argument('--save-replay', metavar='REPLAY', help='Save the upcoming game into a replay file') -parser.add_argument('--skip-replay', action='store_true', help='Skip the replay and start to play when it’s finished') -parser.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses') -parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering') -parser.add_argument('--fps-limit', metavar='FPS', default=-1, type=int, help='Set fps limit. A value of 0 disables fps limiting, while a negative value limits to 60 fps if and only if vsync doesn’t work.') parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.') -parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.') -parser.add_argument('--no-background', action='store_false', help='Disable background display (huge performance boost on slow systems).') -parser.add_argument('--no-particles', action='store_false', help='Disable particles handling (huge performance boost on slow systems).') -parser.add_argument('--no-sound', action='store_false', help='Disable music and SFX.') -parser.add_argument('--hints', metavar='HINTS', default=None, help='Hints file, to display text while playing.') parser.add_argument('--verbosity', metavar='VERBOSITY', choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], help='Select the wanted logging level.') -parser.add_argument('--game', metavar='GAME', choices=['EoSD'], default='EoSD', help='Select the game engine to use.') -parser.add_argument('--port', metavar='PORT', type=int, default=0, help='Local port to use for netplay') -parser.add_argument('--remote', metavar='REMOTE', default=None, help='Remote address') -parser.add_argument('--no-friendly-fire', action='store_false', help='Allow friendly-fire during netplay.') -parser.add_argument('--backend', metavar='BACKEND', choices=['opengl', 'sdl'], default='opengl', help='Which backend to use (opengl or sdl for now).') + +game_group = parser.add_argument_group('Game options') +game_group.add_argument('-s', '--stage', metavar='STAGE', type=int, default=None, help='Stage, 1 to 7 (Extra), nothing means story mode.') +game_group.add_argument('-r', '--rank', metavar='RANK', type=int, default=0, help='Rank, from 0 (Easy, default) to 3 (Lunatic).') +game_group.add_argument('-c', '--character', metavar='CHARACTER', type=int, default=0, help='Select the character to use, from 0 (ReimuA, default) to 3 (MarisaB).') +game_group.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses.') +game_group.add_argument('--game', metavar='GAME', choices=['EoSD'], default='EoSD', help='Select the game engine to use.') +game_group.add_argument('--hints', metavar='HINTS', default=None, help='Hints file, to display text while playing.') + +replay_group = parser.add_argument_group('Replay options') +replay_group.add_argument('--replay', metavar='REPLAY', help='Select a file to replay.') +replay_group.add_argument('--save-replay', metavar='REPLAY', help='Save the upcoming game into a replay file.') +replay_group.add_argument('--skip-replay', action='store_true', help='Skip the replay and start to play when it’s finished.') + +netplay_group = parser.add_argument_group('Netplay options') +netplay_group.add_argument('--port', metavar='PORT', type=int, default=0, help='Local port to use.') +netplay_group.add_argument('--remote', metavar='REMOTE', default=None, help='Remote address.') +netplay_group.add_argument('--friendly-fire', action='store_true', help='Allow friendly-fire during netplay.') + +graphics_group = parser.add_argument_group('Graphics options') +graphics_group.add_argument('--backend', metavar='BACKEND', choices=['opengl', 'sdl'], default='opengl', help='Which backend to use (opengl or sdl for now).') +graphics_group.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.') +graphics_group.add_argument('--single-buffer', action='store_true', help='Disable double buffering.') +graphics_group.add_argument('--fps-limit', metavar='FPS', default=-1, type=int, help='Set fps limit. A value of 0 disables fps limiting, while a negative value limits to 60 fps if and only if vsync doesn’t work.') +graphics_group.add_argument('--no-background', action='store_false', help='Disable background display (huge performance boost on slow systems).') +graphics_group.add_argument('--no-particles', action='store_false', help='Disable particles handling (huge performance boost on slow systems).') +graphics_group.add_argument('--no-sound', action='store_false', help='Disable music and sound effects.') args = parser.parse_args() @@ -262,7 +270,7 @@ with SDL(sound=args.no_sound): args.character, args.replay, args.save_replay, args.skip_replay, args.boss_rush, args.debug, args.no_background, args.no_particles, args.hints, args.verbosity, args.port, args.remote, - args.no_friendly_fire) + args.friendly_fire) import gc gc.collect()