From df88eb04af3ec3b4abf8d4d4befa580d818902b9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 24 Sep 2011 17:44:10 +0000 Subject: Rework Strife -testcontrols code to use common code. Subversion-branch: /branches/v2-branch Subversion-revision: 2397 --- src/strife/d_main.c | 2 +- src/strife/doomstat.h | 1 + src/strife/g_game.c | 110 +------------------------------------------------- 3 files changed, 3 insertions(+), 110 deletions(-) diff --git a/src/strife/d_main.c b/src/strife/d_main.c index 7170b5d1..6c105484 100644 --- a/src/strife/d_main.c +++ b/src/strife/d_main.c @@ -335,7 +335,7 @@ void D_Display (void) { // Box showing current mouse speed - G_DrawMouseSpeedBox(); + V_DrawMouseSpeedBox(testcontrols_mousespeed); } menuactivestate = menuactive; diff --git a/src/strife/doomstat.h b/src/strife/doomstat.h index 222383ec..109311af 100644 --- a/src/strife/doomstat.h +++ b/src/strife/doomstat.h @@ -158,6 +158,7 @@ extern int viewwidth; extern int scaledviewwidth; extern boolean testcontrols; +extern int testcontrols_mousespeed; diff --git a/src/strife/g_game.c b/src/strife/g_game.c index 43fe827b..d6d8d0fb 100644 --- a/src/strife/g_game.c +++ b/src/strife/g_game.c @@ -234,7 +234,7 @@ static boolean *joybuttons = &joyarray[1]; // allow [-1] static int savegameslot = 6; // [STRIFE] initialized to 6 static char savedescription[32]; -static int testcontrols_mousespeed; +int testcontrols_mousespeed; #define BODYQUESIZE 32 @@ -245,114 +245,6 @@ int vanilla_savegame_limit = 1; int vanilla_demo_limit = 1; -#define MOUSE_SPEED_BOX_WIDTH 16 -#define COLOR_RED 0xb0 -#define COLOR_BLACK 0x00 -#define COLOR_WHITE 0x04 -#define COLOR_YELLOW 0xe7 - -void G_DrawMouseSpeedBox(void) -{ - extern int usemouse; - int i; - int box_x, box_y; - int original_speed; - int x, y; - int redline_x; - int linelen; - char *lumpname; - int color; - - // If the mouse is turned off or acceleration is turned off, don't - // draw the box at all. - - if (!usemouse || fabs(mouse_acceleration - 1) < 0.01) - { - return; - } - - // Calculate box position - - box_x = SCREENWIDTH - MOUSE_SPEED_BOX_WIDTH * 8; - box_y = SCREENHEIGHT - 9; - - // Draw the box. - - x = box_x; - - for (i=0; i