diff options
author | Simon Howard | 2011-09-24 17:40:59 +0000 |
---|---|---|
committer | Simon Howard | 2011-09-24 17:40:59 +0000 |
commit | 17d75c2915ec75077e86dbd7a356061961552b53 (patch) | |
tree | 07603babcdcae0ef12f3bd9092219ed0f95a8235 /src/heretic/g_game.c | |
parent | 73f27119add06b37dadc4a62343e1301585a828f (diff) | |
download | chocolate-doom-17d75c2915ec75077e86dbd7a356061961552b53.tar.gz chocolate-doom-17d75c2915ec75077e86dbd7a356061961552b53.tar.bz2 chocolate-doom-17d75c2915ec75077e86dbd7a356061961552b53.zip |
Add -testcontrols to Heretic.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2396
Diffstat (limited to 'src/heretic/g_game.c')
-rw-r--r-- | src/heretic/g_game.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index 9b3e3799..ff5a79c3 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -137,6 +137,9 @@ short consistancy[MAXPLAYERS][BACKUPTICS]; char *savegamedir; byte *savebuffer, *save_p; +boolean testcontrols = false; +int testcontrols_mousespeed; + // // controls (have defaults) @@ -501,6 +504,13 @@ void G_BuildTiccmd(ticcmd_t * cmd) cmd->angleturn -= mousex * 0x8; } + // No mouse movement in previous frame? + + if (mousex == 0) + { + testcontrols_mousespeed = 0; + } + forward += mousey; mousex = mousey = 0; @@ -585,6 +595,11 @@ void G_DoLoadLevel(void) sendpause = sendsave = paused = false; memset(mousebuttons, 0, sizeof(mousebuttons)); memset(joybuttons, 0, sizeof(joybuttons)); + + if (testcontrols) + { + P_SetMessage(&players[consoleplayer], "PRESS ESCAPE TO QUIT.", false); + } } static void SetJoyButtons(unsigned int buttons_mask) @@ -655,6 +670,11 @@ boolean G_Responder(event_t * ev) } } + if (ev->type == ev_mouse) + { + testcontrols_mousespeed = abs(ev->data2); + } + switch (ev->type) { case ev_keydown: |