Remove some duplicate or unused control layer defines.

Notes:
 - MAXJOYBUTTONS is out of sync between the two definitions
 - In menus.c, NUMMOUSEFUNCTIONS must equal MAXMOUSEBUTTONS,
   fail to compile if this becomes false.

git-svn-id: https://svn.eduke32.com/eduke32@3527 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-02-25 15:31:22 +00:00
parent c5c1aa2331
commit e576224bb9
3 changed files with 10 additions and 92 deletions

View file

@ -45,78 +45,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#define SETUPFILENAME "eduke32.cfg"
// Max number of players
#define MAXPLAYERS 16
// Number of Mouse buttons
#define MAXMOUSEBUTTONS 10
// Number of JOY buttons
// XXX: out of sync with jmact/_control.h
#define MAXJOYBUTTONS (32+4)
// Number of EXTERNAL buttons
//#define MAXEXTERNALBUTTONS 6
//
// modem string defines
//
#define MAXMODEMSTRING 50
// MACRO defines
#define MAXMACROS 10
#define MAXMACROLENGTH 34
// Phone list defines
#define PHONENUMBERLENGTH 28
#define PHONENAMELENGTH 16
#define MAXPHONEENTRIES 10
// length of program functions
#define MAXFUNCTIONLENGTH 30
// length of axis functions
#define MAXAXISFUNCTIONLENGTH 30
// Max Player Name length
#define MAXPLAYERNAMELENGTH 11
// Max RTS Name length
#define MAXRTSNAMELENGTH 15
// Number of Mouse Axes
// KEEPINSYNC jmact/_control.h
#define MAXMOUSEAXES 2
// Number of JOY axes
// KEEPINSYNC jmact/_control.h
#define MAXJOYAXES 8
// MIN/MAX scale value for controller scales
#define MAXCONTROLSCALEVALUE (1<<19)
// DEFAULT scale value for controller scales
#define DEFAULTCONTROLSCALEVALUE (1<<16)
// base value for controller scales
#define BASECONTROLSCALEVALUE (1<<16)
// DEFAULT mouse sensitivity scale
#define DEFAULTMOUSESENSITIVITY 7
#define DEFAULTMOUSEANALOGUESCALE 65536

View file

@ -45,31 +45,13 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
//
//****************************************************************************
#define BUTTON0_SCAN_1 sc_Space
#define BUTTON0_SCAN_2 sc_Enter
#define BUTTON0_SCAN_3 sc_kpad_Enter
#define BUTTON1_SCAN sc_Escape
#define AXISUNDEFINED 0x7f
#define BUTTONUNDEFINED 0x7f
#define KEYUNDEFINED 0x7f
#define SENSITIVE 0x400
//#define MINSENSITIVE 0x30
#define THRESHOLD 0x200
#define MINTHRESHOLD 0x80
#define USERINPUTDELAY 200
#define ResetMouse 0
#define GetMouseButtons 3
#define GetMouseDelta 11
#define MouseInt 0x33
#define JoyMax 0xa00
#define MaxJoyValue 5000
#define DEFAULTMOUSESENSITIVITY 7 // 0x7000+MINIMUMMOUSESENSITIVITY
#define INSTANT_ONOFF 0
@ -77,28 +59,24 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
#define MAXCONTROLVALUE 0x7fff
// Maximum number of buttons for any controller
#define MAXBUTTONS 32
// Number of Mouse buttons
#define MAXMOUSEBUTTONS 10
//#define MAXMOUSEBUTTONS 10
// Number of Mouse Axes
// KEEPINSYNC gamedefs.h
#define MAXMOUSEAXES 2
// Number of JOY buttons
// XXX: out of sync with gamedefs.h
#define MAXJOYBUTTONS 32
// Number of JOY axes
// KEEPINSYNC gamedefs.h
#define MAXJOYAXES 8
// NORMAL axis scale
#define NORMALAXISSCALE (65536)
#define NORMALAXISSCALE 65536
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))

View file

@ -78,12 +78,11 @@ static int32_t changesmade, newvidmode, curvidmode, newfullscreen;
static int32_t vidsets[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
static int32_t curvidset, newvidset = 0;
static int32_t soundbits, soundvoices, soundrate;
#undef MAXMOUSEBUTTONS
//#define MAXMOUSEBUTTONS 7 // FIXME: menu needs an update for extra buttons
#define NUMDOUBLEMBTNS 3 // # of mouse buttons that can be double-clicked (mouse1 - mouse3)
#define NUMSINGLEMBTNS 4 // # of mouse buttons that can only be single-clicked (the rest)
#define NUMMOUSEFUNCTIONS (NUMDOUBLEMBTNS*2+NUMSINGLEMBTNS)
static const char *mousebuttonnames[] =
// NOTE: NUMMOUSEFUNCTIONS must equal MAXMOUSEBUTTONS!!!
static const char *mousebuttonnames[NUMMOUSEFUNCTIONS==MAXMOUSEBUTTONS ? MAXMOUSEBUTTONS : -1] =
{ "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Wheel Up",
"Wheel Down", "Mouse5", "Mouse6", "Mouse7", "Mouse8"
};