Mercurial > sypikslang
diff gamelib/main.py @ 88:74ce25ec2073
Autosave & load support
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Wed, 09 May 2012 20:07:14 +0200 |
parents | a253fae32a6f |
children | 80cce62f29fb |
line wrap: on
line diff
--- a/gamelib/main.py Wed May 09 20:06:44 2012 +0200 +++ b/gamelib/main.py Wed May 09 20:07:14 2012 +0200 @@ -21,6 +21,9 @@ parser.add_option('--no-sound', action="store_false", default=True, dest="sound", help="disable sound") + parser.add_option('--load', type="string", default=None, + dest="load", help="Save game to load") + return parser.parse_args(args) @@ -32,5 +35,5 @@ pygame.mixer.init(FREQ, BITSIZE, CHANNELS, BUFFER) screen = pygame.display.set_mode(SCREEN) engine = Engine(screen) - window = MainMenu(screen) + window = MainMenu(screen, opts.load) engine.run(window)