diff --git a/polymer/build/include/dxdidf.h b/polymer/build/include/dxdidf.h index b4de78a1d..7c54e4646 100644 --- a/polymer/build/include/dxdidf.h +++ b/polymer/build/include/dxdidf.h @@ -265,7 +265,7 @@ static DIOBJECTDATAFORMAT c_dfDIKeyboard_odf[] = { const DIDATAFORMAT c_dfDIKeyboard = { 24, 16, 0x00000002, 256, 256, c_dfDIKeyboard_odf }; // Mouse - +/* static DIOBJECTDATAFORMAT c_dfDIMouse_odf[] = { { &GUID_XAxis, 0, 0x00FFFF03, 0x00000000 }, { &GUID_YAxis, 4, 0x00FFFF03, 0x00000000 }, @@ -277,6 +277,21 @@ static DIOBJECTDATAFORMAT c_dfDIMouse_odf[] = { }; const DIDATAFORMAT c_dfDIMouse = { 24, 16, 0x00000002, 16, 7, c_dfDIMouse_odf }; +*/ +static DIOBJECTDATAFORMAT c_dfDIMouse2_odf[] = { + {&GUID_XAxis, 0, 16776963, 0}, + {&GUID_YAxis, 4, 16776963, 0}, + {&GUID_ZAxis, 8, -2130706685, 0}, + {0, 12, 16776972, 0}, + {0, 13, 16776972, 0}, + {0, 14, -2130706676, 0}, + {0, 15, -2130706676, 0}, + {0, 16, -2130706676, 0}, + {0, 17, -2130706676, 0}, + {0, 18, -2130706676,0}, + {0, 19, -2130706676, 0} +}; +const DIDATAFORMAT c_dfDIMouse2 = {24, 16, 2, 20, 11, c_dfDIMouse2_odf}; // Joystick diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 0f60b281d..035ac976e 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -364,7 +364,7 @@ int app_main(int argc, const char **argv) loadpics("tiles000.art",1048576*16); loadnames(); - Bstrcpy(kensig,"Based on BUILD by Ken Silverman"); + Bstrcpy(kensig,"Uses BUILD technology by Ken Silverman"); initcrc(); if (!loaddefinitionsfile(defsfilename)) initprintf("Definitions file loaded.\n"); diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index 1ac36dd26..6db09cf6d 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -11051,7 +11051,7 @@ void draw2dgrid(int posxe, int posye, short ange, int zoome, short gride) { if (xp1 != xp2) { - drawline16(xp1,yp1,xp1,yp2,25); + drawline16(xp1,yp1,xp1,yp2,8); } } } @@ -11059,7 +11059,7 @@ void draw2dgrid(int posxe, int posye, short ange, int zoome, short gride) xp2 = xp1; if ((xp2 >= 0) && (xp2 < xdim)) { - drawline16(xp2,yp1,xp2,yp2,25); + drawline16(xp2,yp1,xp2,yp2,8); } } xp1 = mulscale14(posxe+editorgridextent,zoome); @@ -11072,7 +11072,7 @@ void draw2dgrid(int posxe, int posye, short ange, int zoome, short gride) { if ((yp1 > midydim16-ydim16) && (yp1 <= midydim16)) { - drawline16(halfxdim16-xp1,midydim16-yp1,halfxdim16-xp2,midydim16-yp1,25); + drawline16(halfxdim16-xp1,midydim16-yp1,halfxdim16-xp2,midydim16-yp1,8); tempy = yp1; } } diff --git a/polymer/build/src/osd.c b/polymer/build/src/osd.c index bd634beeb..061320599 100644 --- a/polymer/build/src/osd.c +++ b/polymer/build/src/osd.c @@ -1367,7 +1367,7 @@ void OSD_Draw(void) clearbackground(osdcols,osdrowscur+1); if (osdversionstring[0]) - drawosdstr(osdcols-osdversionstringlen,osdrowscur,osdversionstring,osdversionstringlen,osdversionstringshade,osdversionstringpal); + drawosdstr(osdcols-osdversionstringlen,osdrowscur,osdversionstring,osdversionstringlen,(sintable[(totalclock<<4)&2047]>>11),osdversionstringpal); for (; lines>0; lines--, row--) { @@ -1375,9 +1375,9 @@ void OSD_Draw(void) topoffs+=osdcols; } - drawosdchar(2,osdrowscur,'>',osdpromptshade,osdpromptpal); - if (osdeditcaps) drawosdchar(0,osdrowscur,'C',osdpromptshade,osdpromptpal); - if (osdeditshift) drawosdchar(1,osdrowscur,'H',osdpromptshade,osdpromptpal); + drawosdchar(2,osdrowscur,'>',osdpromptshade?osdpromptshade:(sintable[(totalclock<<4)&2047]>>11),osdpromptpal); + if (osdeditcaps) drawosdchar(0,osdrowscur,'C',osdpromptshade?osdpromptshade:(sintable[(totalclock<<4)&2047]>>11),osdpromptpal); + if (osdeditshift) drawosdchar(1,osdrowscur,'H',osdpromptshade?osdpromptshade:(sintable[(totalclock<<4)&2047]>>11),osdpromptpal); len = min(osdcols-1-3, osdeditlen-osdeditwinstart); for (x=len-1; x>=0; x--) diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 0f640c26c..67120b5a6 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -10,7 +10,7 @@ #error winlayer.c is for Windows only. #endif -#define DIRECTINPUT_VERSION 0x0500 +#define DIRECTINPUT_VERSION 0x0700 #define DIRECTDRAW_VERSION 0x0600 #define WIN32_LEAN_AND_MEAN @@ -674,8 +674,8 @@ inline void idle(void) #define NUM_INPUTS 3 static HMODULE hDInputDLL = NULL; -static LPDIRECTINPUTA lpDI = NULL; -static LPDIRECTINPUTDEVICE2A lpDID[NUM_INPUTS] = { NULL, NULL, NULL }; +static LPDIRECTINPUT7A lpDI = NULL; +static LPDIRECTINPUTDEVICE7A lpDID[NUM_INPUTS] = { NULL, NULL, NULL }; static BOOL bDInputInited = FALSE; #define INPUT_BUFFER_SIZE 32 static GUID guidDevs[NUM_INPUTS]; @@ -689,12 +689,12 @@ HANDLE mousethread; static struct { char *name; - LPDIRECTINPUTDEVICE2A *did; + LPDIRECTINPUTDEVICE7A *did; const DIDATAFORMAT *df; } devicedef[NUM_INPUTS] = { { "keyboard", &lpDID[KEYBOARD], &c_dfDIKeyboard }, - { "mouse", &lpDID[MOUSE], &c_dfDIMouse }, + { "mouse", &lpDID[MOUSE], &c_dfDIMouse2 }, { "joystick", &lpDID[JOYSTICK], &c_dfDIJoystick } }; static struct _joydef @@ -952,7 +952,7 @@ void setjoydeadzone(int axis, unsigned short dead, unsigned short satur) } dipdw.dwData = dead; - result = IDirectInputDevice2_SetProperty(lpDID[JOYSTICK], DIPROP_DEADZONE, &dipdw.diph); + result = IDirectInputDevice7_SetProperty(lpDID[JOYSTICK], DIPROP_DEADZONE, &dipdw.diph); if FAILED(result) { //ShowDInputErrorBox("Failed setting joystick dead zone", result); @@ -962,7 +962,7 @@ void setjoydeadzone(int axis, unsigned short dead, unsigned short satur) dipdw.dwData = satur; - result = IDirectInputDevice2_SetProperty(lpDID[JOYSTICK], DIPROP_SATURATION, &dipdw.diph); + result = IDirectInputDevice7_SetProperty(lpDID[JOYSTICK], DIPROP_SATURATION, &dipdw.diph); if FAILED(result) { //ShowDInputErrorBox("Failed setting joystick saturation point", result); @@ -998,7 +998,7 @@ void getjoydeadzone(int axis, unsigned short *dead, unsigned short *satur) dipdw.diph.dwHow = DIPH_BYOFFSET; } - result = IDirectInputDevice2_GetProperty(lpDID[JOYSTICK], DIPROP_DEADZONE, &dipdw.diph); + result = IDirectInputDevice7_GetProperty(lpDID[JOYSTICK], DIPROP_DEADZONE, &dipdw.diph); if FAILED(result) { //ShowDInputErrorBox("Failed getting joystick dead zone", result); @@ -1008,7 +1008,7 @@ void getjoydeadzone(int axis, unsigned short *dead, unsigned short *satur) *dead = dipdw.dwData; - result = IDirectInputDevice2_GetProperty(lpDID[JOYSTICK], DIPROP_SATURATION, &dipdw.diph); + result = IDirectInputDevice7_GetProperty(lpDID[JOYSTICK], DIPROP_SATURATION, &dipdw.diph); if FAILED(result) { //ShowDInputErrorBox("Failed getting joystick saturation point", result); @@ -1032,6 +1032,10 @@ void releaseallbuttons(void) if (mouseb & 8) mousepresscallback(4, 0); if (mousewheel[0]>0) mousepresscallback(5,0); if (mousewheel[1]>0) mousepresscallback(6,0); + if (mouseb & 64) mousepresscallback(7, 0); + if (mouseb & 128) mousepresscallback(8, 0); + if (mouseb & 256) mousepresscallback(9, 0); + if (mouseb & 512) mousepresscallback(10, 0); } mousewheel[0]=mousewheel[1]=0; mouseb = 0; @@ -1182,10 +1186,10 @@ static BOOL CALLBACK InitDirectInput_enumobjects(LPCDIDEVICEOBJECTINSTANCE lpddo static BOOL InitDirectInput(void) { HRESULT result; - HRESULT(WINAPI *aDirectInputCreateA)(HINSTANCE, DWORD, LPDIRECTINPUTA *, LPUNKNOWN); + HRESULT(WINAPI *aDirectInputCreateA)(HINSTANCE, DWORD, LPDIRECTINPUT7A *, LPUNKNOWN); DIPROPDWORD dipdw; - LPDIRECTINPUTDEVICEA dev; - LPDIRECTINPUTDEVICE2A dev2; + LPDIRECTINPUTDEVICE7A dev; + LPDIRECTINPUTDEVICE7A dev2; DIDEVCAPS didc; int devn; @@ -1219,7 +1223,7 @@ static BOOL InitDirectInput(void) // enumerate devices to make us look fancy initprintf(" - Enumerating attached input devices\n"); inputdevices = 0; - result = IDirectInput_EnumDevices(lpDI, 0, InitDirectInput_enum, NULL, DIEDFL_ATTACHEDONLY); + result = IDirectInput7_EnumDevices(lpDI, 0, InitDirectInput_enum, NULL, DIEDFL_ATTACHEDONLY); if FAILED(result) { HorribleDInputDeath("Failed enumerating attached input devices", result); } else if (result != DI_OK) initprintf(" Enumerated input devices with warning: %s\n",GetDInputError(result)); if (!(inputdevices & (1< 0) // wheel up + if ((int)didod.dwData > 0) // wheel up { if (mousewheel[0] > 0 && mousepresscallback) mousepresscallback(5,0); mousewheel[0] = t; mouseb |= 16; if (mousepresscallback) mousepresscallback(5, 1); } - else if ((int)didod[i].dwData < 0) // wheel down + else if ((int)didod.dwData < 0) // wheel down { if (mousewheel[1] > 0 && mousepresscallback) mousepresscallback(6,0); mousewheel[1] = t; mouseb |= 32; if (mousepresscallback) mousepresscallback(6, 1); } - break; + } + else if (didod.dwOfs >= DIMOFS_BUTTON0 && didod.dwOfs <= DIMOFS_BUTTON7) + { + if (didod.dwOfs == DIMOFS_BUTTON0) + { + if (didod.dwData & 0x80) mouseb |= 1; + else mouseb &= ~1; + if (mousepresscallback) + mousepresscallback(1, (mouseb&1)==1); + } + else if (didod.dwOfs == DIMOFS_BUTTON1) + { + if (didod.dwData & 0x80) mouseb |= 2; + else mouseb &= ~2; + if (mousepresscallback) + mousepresscallback(2, (mouseb&2)==2); + } + else if (didod.dwOfs == DIMOFS_BUTTON2) + { + if (didod.dwData & 0x80) mouseb |= 4; + else mouseb &= ~4; + if (mousepresscallback) + mousepresscallback(3, (mouseb&4)==4); + } + else if (didod.dwOfs == DIMOFS_BUTTON3) + { + if (didod.dwData & 0x80) mouseb |= 8; + else mouseb &= ~8; + if (mousepresscallback) + mousepresscallback(4, (mouseb&8)==8); + } + else if (didod.dwOfs == DIMOFS_BUTTON4) + { + OSD_Printf("got button4\n"); + if (didod.dwData & 0x80) mouseb |= 64; + else mouseb &= ~64; + if (mousepresscallback) + mousepresscallback(7, (mouseb&64)==64); + } + else if (didod.dwOfs == DIMOFS_BUTTON5) + { + OSD_Printf("got button5\n"); + if (didod.dwData & 0x80) mouseb |= 128; + else mouseb &= ~128; + if (mousepresscallback) + mousepresscallback(8, (mouseb&128)==128); + } + else if (didod.dwOfs == DIMOFS_BUTTON6) + { + OSD_Printf("got button6\n"); + if (didod.dwData & 0x80) mouseb |= 256; + else mouseb &= ~256; + if (mousepresscallback) + mousepresscallback(9, (mouseb&256)==256); + } + else if (didod.dwOfs == DIMOFS_BUTTON7) + { + OSD_Printf("got button7\n"); + if (didod.dwData & 0x80) mouseb |= 512; + else mouseb &= ~512; + if (mousepresscallback) + mousepresscallback(10, (mouseb&512)==512); + } } } } @@ -1588,13 +1628,13 @@ static void ProcessInputDevices(void) { if (*devicedef[t].did&&t!=MOUSE) { - result = IDirectInputDevice2_Poll(*devicedef[t].did); + result = IDirectInputDevice7_Poll(*devicedef[t].did); if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) { - if (SUCCEEDED(IDirectInputDevice2_Acquire(*devicedef[t].did))) + if (SUCCEEDED(IDirectInputDevice7_Acquire(*devicedef[t].did))) { devacquired[t] = 1; - IDirectInputDevice2_Poll(*devicedef[t].did); + IDirectInputDevice7_Poll(*devicedef[t].did); } else { @@ -1639,7 +1679,7 @@ static void ProcessInputDevices(void) { case KEYBOARD: // keyboard if (!lpDID[KEYBOARD]) break; - result = IDirectInputDevice2_GetDeviceData(lpDID[KEYBOARD], sizeof(DIDEVICEOBJECTDATA), + result = IDirectInputDevice7_GetDeviceData(lpDID[KEYBOARD], sizeof(DIDEVICEOBJECTDATA), (LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0); if (result == DI_OK) { @@ -1678,7 +1718,7 @@ static void ProcessInputDevices(void) case JOYSTICK: // joystick if (!lpDID[JOYSTICK]) break; - result = IDirectInputDevice2_GetDeviceData(lpDID[JOYSTICK], sizeof(DIDEVICEOBJECTDATA), + result = IDirectInputDevice7_GetDeviceData(lpDID[JOYSTICK], sizeof(DIDEVICEOBJECTDATA), (LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0); if (result == DI_OK) { diff --git a/polymer/eduke32/rsrc/build.bmp b/polymer/eduke32/rsrc/build.bmp index c0fb4396a..6df78cebc 100644 Binary files a/polymer/eduke32/rsrc/build.bmp and b/polymer/eduke32/rsrc/build.bmp differ diff --git a/polymer/eduke32/rsrc/game.bmp b/polymer/eduke32/rsrc/game.bmp index 66a792ea7..f17c16113 100644 Binary files a/polymer/eduke32/rsrc/game.bmp and b/polymer/eduke32/rsrc/game.bmp differ diff --git a/polymer/eduke32/rsrc/game2.psd b/polymer/eduke32/rsrc/game2.psd index cfbff24b9..3b7c1fbf2 100644 Binary files a/polymer/eduke32/rsrc/game2.psd and b/polymer/eduke32/rsrc/game2.psd differ diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 0256da821..59ad47383 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20081002" +#define BUILDDATE " 20081005" #define VERSION " 1.2.0devel" static int floor_over_floor; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 90a4201a0..f6753a00e 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20081002" +#define BUILDDATE " 20081005" #define HEAD2 APPNAME VERSION BUILDDATE #ifdef __cplusplus @@ -76,7 +76,7 @@ extern int g_ScriptVersion, g_Shareware, g_GameType; #define AUTO_AIM_ANGLE 48 #define RECSYNCBUFSIZ 2520 //2520 is the (LCM of 1-8)*3 -#define MOVEFIFOSIZ 256 +#define MOVEFIFOSIZ 1024 #define FOURSLEIGHT (1<<8) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index e5bbe07e9..6affa5324 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2061,7 +2061,12 @@ static void coolgaugetext(int snum) if (sprite[p->i].pal == 1 && p->last_extra < 2) altdigitalnumber(40,-(200-22),1,-16,10+16); else if (!althud_flashing || p->last_extra > (p->max_player_health>>2) || totalclock&32) - altdigitalnumber(40,-(200-22),p->last_extra,-16,10+16); + { + int s = -8; + if (althud_flashing && p->last_extra > p->max_player_health) + s += (sintable[(totalclock<<5)&2047]>>10); + altdigitalnumber(40,-(200-22),p->last_extra,s,10+16); + } if (althud_shadows) rotatesprite(sbarx(62+1),sbary(200-25+1),sbarsc(49152L),0,SHIELD,0,4,10+16+1+32,0,0,xdim-1,ydim-1); @@ -2592,16 +2597,8 @@ static void ShowFrameRate(void) int x = (xdim <= 640); int chars = Bsprintf(tempbuf, "%2u ms (%3u fps)", howlong, LastCount); - if (!x) - { - printext256(windowx2-(chars<<3)+1,windowy1+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<3),windowy1+1,COLOR_WHITE,-1,tempbuf,x); - } - else - { - printext256(windowx2-(chars<<2)+1,windowy1+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<2),windowy1+1,COLOR_WHITE,-1,tempbuf,x); - } + printext256(windowx2-(chars<<(3-x))+1,windowy1+2,0,-1,tempbuf,x); + printext256(windowx2-(chars<<(3-x)),windowy1+1,COLOR_WHITE,-1,tempbuf,x); if (numplayers > 1) if ((totalclock - lastpackettime) > 1) @@ -2903,6 +2900,8 @@ void gameexit(const char *t) showtwoscreens(); } + if (*t != 0) initprintf("%s\n",t); + if (qsetmode == 200) Shutdown(); @@ -10717,7 +10716,7 @@ void app_main(int argc,const char **argv) #endif OSD_SetLogFile("eduke32.log"); - OSD_SetParameters(6,0, 0,12, 2,12); + OSD_SetParameters(0,0, 0,12, 2,12); OSD_SetFunctions( GAME_drawosdchar, GAME_drawosdstr, @@ -10733,7 +10732,7 @@ void app_main(int argc,const char **argv) initprintf("%s\n",apptitle); // initprintf("Compiled %s\n",datetimestring); initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n"); - initprintf("Copyright (c) 2008 EDuke32 team\n"); + initprintf("Copyright (c) 2008 EDuke32 team and contributors\n"); #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) addsearchpath("/usr/share/games/jfduke3d"); @@ -11120,17 +11119,37 @@ void app_main(int argc,const char **argv) ud.last_level = -1; - if (Bstrcasecmp(ud.rtsname,"DUKE.RTS") == 0) + if (Bstrcasecmp(ud.rtsname,"DUKE.RTS") == 0 || + Bstrcasecmp(ud.rtsname,"WW2GI.RTS") == 0 || + Bstrcasecmp(ud.rtsname,"NAM.RTS") == 0) { + // ud.last_level is used as a flag here to reset the string to DUKE.RTS after load if (WW2GI) + { + ud.last_level = 1; Bstrcpy(ud.rtsname, "WW2GI.RTS"); + } else if (NAM) + { + ud.last_level = 1; Bstrcpy(ud.rtsname, "NAM.RTS"); + } + else + { + ud.last_level = 1; + Bstrcpy(ud.rtsname, "DUKE.RTS"); + } } RTS_Init(ud.rtsname); if (numlumps) initprintf("Using .RTS file '%s'\n",ud.rtsname); + if (ud.last_level == 1) + { + ud.last_level = -1; + Bstrcpy(ud.rtsname, "DUKE.RTS"); + } + initprintf("Initializing OSD...\n"); OSD_SetVersionString(HEAD2, 10,0); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 6ca3da07b..6fbee15d0 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5433,7 +5433,7 @@ void copydefaultcons(void) } } -/* Anything added with AddDefinition cannot be overwritten in the CONs */ +/* Anything added with AddDefinition() cannot be overwritten in the CONs */ static void AddDefinition(const char *lLabel,int lValue,int lType) { @@ -5588,14 +5588,14 @@ static void InitProjectiles(void) -1, -1, -1, -1, -96, 18, 18, 0, 1 }; + // this will only happen if I forget to update this function... if (sizeof(projectile_t) != sizeof(DefaultProjectile)) - gameexit("ERROR: InitProjectiles() doesn't match projectile_t"); + gameexit("ERROR: InitProjectiles() projectile_t mismatch!"); for (i=MAXTILES-1;i>=0;i--) - { Bmemcpy(&projectile[i],&DefaultProjectile,sizeof(projectile_t)); - } - Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile)); + + Bmemcpy(&defaultprojectile[0], &projectile[0], sizeof(projectile)); } extern int g_NumObituaries; @@ -5642,8 +5642,9 @@ void loadefs(const char *filenam) } else if (numgroupfiles == 0) { - Bsprintf(tempbuf,"Duke Nukem 3D was not found in this directory. A copy of '%s' or its contents is needed to run EDuke32.\n" - "You can find '%s' in the \"DN3DINST\" or \"ATOMINST\" directory on your Duke Nukem 3D installation CD-ROM.", + Bsprintf(tempbuf,"Duke Nukem 3D game data was not found. A copy of '%s' or other compatible data is needed to run EDuke32.\n" + "You can find '%s' in the \"DN3DINST\" or \"ATOMINST\" directory on your Duke Nukem 3D installation CD-ROM.\n\n" + "EDuke32 will now close.", duke3dgrp,duke3dgrp); } else Bsprintf(tempbuf,"CON file `%s' missing.", filenam); diff --git a/polymer/eduke32/source/gamedefs.h b/polymer/eduke32/source/gamedefs.h index eada8dfa4..3fe95ac10 100644 --- a/polymer/eduke32/source/gamedefs.h +++ b/polymer/eduke32/source/gamedefs.h @@ -54,7 +54,7 @@ extern "C" { // Number of Mouse buttons -#define MAXMOUSEBUTTONS 6 +#define MAXMOUSEBUTTONS 10 // Number of JOY buttons diff --git a/polymer/eduke32/source/jmact/_control.h b/polymer/eduke32/source/jmact/_control.h index 50f572723..d1387903e 100644 --- a/polymer/eduke32/source/jmact/_control.h +++ b/polymer/eduke32/source/jmact/_control.h @@ -81,7 +81,7 @@ extern "C" { // Number of Mouse buttons -#define MAXMOUSEBUTTONS 6 +#define MAXMOUSEBUTTONS 10 // Number of Mouse Axes diff --git a/polymer/eduke32/source/jmact/control.h b/polymer/eduke32/source/jmact/control.h index 894981d2a..3e18b38fc 100644 --- a/polymer/eduke32/source/jmact/control.h +++ b/polymer/eduke32/source/jmact/control.h @@ -222,7 +222,7 @@ typedef struct binding { char laststate; } keybind; -#define MAXMOUSEBUTTONS 6 +#define MAXMOUSEBUTTONS 10 extern keybind boundkeys[MAXBOUNDKEYS], mousebind[MAXMOUSEBUTTONS]; extern int bindsenabled; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 74c1fd9b5..2ac76d0cd 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -47,8 +47,9 @@ static int changesmade, newvidmode, curvidmode, newfullscreen; static int vidsets[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }; static int curvidset, newvidset = 0; static int soundbits, soundvoices, soundrate; - -static char *mousebuttonnames[] = { "Left", "Right", "Middle", "Thumb", "Wheel Up", "Wheel Down" }; +#undef MAXMOUSEBUTTONS +#define MAXMOUSEBUTTONS 6 // FIXME: menu needs an update for extra buttons +static char *mousebuttonnames[] = { "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Wheel Up", "Wheel Down", "Mouse5", "Mouse6", "Mouse7", "Mouse8"}; extern int voting; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 09381400e..4e1a88a56 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1113,7 +1113,7 @@ keydef keynames[]= {0,0} }; -char *mousenames[] = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse6" }; +char *mousenames[] = { "mouse1", "mouse2", "mouse3", "mouse4", "mwheelup", "mwheeldn", "mouse5", "mouse6", "mouse7", "mouse8" }; static int osdcmd_bind(const osdfuncparm_t *parm) {