diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-12-10 21:34:37 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-12-10 21:34:37 -0800 |
commit | 77aa703a56db7fb52241e1e697b581cff38125cf (patch) | |
tree | c04e0316b8856ad6610fff002482a9d7c49f8299 /play.c | |
parent | 6c3797c53ce9b02fcc185d4c28303163283209d9 (diff) | |
download | grv-77aa703a56db7fb52241e1e697b581cff38125cf.tar.gz grv-77aa703a56db7fb52241e1e697b581cff38125cf.tar.xz grv-77aa703a56db7fb52241e1e697b581cff38125cf.zip |
Add an infinite life cheat
Add an infinite life cheat (Alt-z); more efficient than pressing Alt-x
repeatedly during testing.
Diffstat (limited to 'play.c')
-rw-r--r-- | play.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -132,6 +132,20 @@ static void handle_key(SDL_KeyboardEvent *ke) lprintf(1,16+2*gp.Life, "\x01"); } break; + case SDLK_z: /* Infinite life */ + { + int e; + + gp.Cheat = 1; + gp.Life = 6; + gp.InfLife = 1; + locate(1,18); + color(14,gp.c); + for ( e = 1 ; e <= gp.Life ; e++ ) { + print("\x01 "); + } + } + break; case SDLK_b: /* All white -> black */ gp.Cheat = 1; while ( gp.nwhite ) |