aboutsummaryrefslogtreecommitdiffstats
path: root/play.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-12-10 21:34:37 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-12-10 21:34:37 -0800
commit77aa703a56db7fb52241e1e697b581cff38125cf (patch)
treec04e0316b8856ad6610fff002482a9d7c49f8299 /play.c
parent6c3797c53ce9b02fcc185d4c28303163283209d9 (diff)
downloadgrv-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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/play.c b/play.c
index 1eba9f9..b402ef8 100644
--- a/play.c
+++ b/play.c
@@ -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 )