aboutsummaryrefslogtreecommitdiffstats
path: root/play.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-03-29 06:18:03 +0000
committerH. Peter Anvin <hpa@zytor.com>2003-03-29 06:18:03 +0000
commit0a748cf59bcda4c8d8cc1bd62067abc7e86ce4a5 (patch)
treed48bc7b41f4b8946df6a9df654dfd1c87c946cad /play.c
parent88654d99ac56ecd088ba8abf253144cb3b416238 (diff)
downloadgrv-0a748cf59bcda4c8d8cc1bd62067abc7e86ce4a5.tar.gz
grv-0a748cf59bcda4c8d8cc1bd62067abc7e86ce4a5.tar.xz
grv-0a748cf59bcda4c8d8cc1bd62067abc7e86ce4a5.zip
Cheat codes shouldn't use Alt+Fx; too likely to interfere with window manager
Use winsock2 for networking
Diffstat (limited to 'play.c')
-rw-r--r--play.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/play.c b/play.c
index ba843e6..014d08c 100644
--- a/play.c
+++ b/play.c
@@ -103,28 +103,28 @@ static void handle_key(SDL_KeyboardEvent *ke)
if ( mod & (KMOD_RALT|KMOD_LALT) ) {
/* These keystrokes require <Alt> */
switch ( sym ) {
- case SDLK_F5:
+ case SDLK_q: /* Immediate death */
gp.Life = 0;
/* Fall through */
- case SDLK_F4:
+ case SDLK_w: /* Immediate death (one life) */
gp.EOLWait = 0;
/* Fall through */
- case SDLK_d:
+ case SDLK_d: /* Normal death */
gp.Status = Status_Dead;
break;
- case SDLK_l:
+ case SDLK_l: /* Immediate end of level */
gp.EOLWait = 0;
/* Fall through */
- case SDLK_e:
+ case SDLK_e: /* Normal end of level */
gp.Cheat = 1;
- gp.Status = Status_Done; /* End of level */
+ gp.Status = Status_Done;
break;
- case SDLK_p:
+ case SDLK_p: /* +1000 power */
gp.Cheat = 1;
gp.GkCh += 1000;
update_power();
break;
- case SDLK_x:
+ case SDLK_x: /* +1 life */
if ( gp.Life < 6 ) {
gp.Cheat = 1;
gp.Life++;
@@ -132,23 +132,22 @@ static void handle_key(SDL_KeyboardEvent *ke)
lprintf(1,16+2*gp.Life, "\x01");
}
break;
- case SDLK_w:
+ case SDLK_b: /* All white -> black */
gp.Cheat = 1;
while ( gp.nwhite )
white2black();
break;
- case SDLK_s:
+ case SDLK_s: /* +1 shot */
gp.Cheat = 1;
if ( gp.KulSpr < 90 )
gp.KulSpr++;
update_shots();
break;
- case SDLK_t:
+ case SDLK_t: /* Treasure */
gp.Cheat = 1;
mystery();
break;
- case SDLK_END:
- /* Zap game */
+ case SDLK_END: /* Immediate zap game */
exit(1);
default:
break;