diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index a2029ee73..6084b1b1b 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -347,6 +347,20 @@ typedef struct { int MouseFilter,MouseBias; int SmoothInput; + // JBF 20031211: Store the input settings because + // (currently) jmact can't regurgitate them + int MouseFunctions[MAXMOUSEBUTTONS][2]; + int MouseDigitalFunctions[MAXMOUSEAXES][2]; + int MouseAnalogueAxes[MAXMOUSEAXES]; + int MouseAnalogueScale[MAXMOUSEAXES]; + int JoystickFunctions[MAXJOYBUTTONS][2]; + int JoystickDigitalFunctions[MAXJOYAXES][2]; + int JoystickAnalogueAxes[MAXJOYAXES]; + int JoystickAnalogueScale[MAXJOYAXES]; + int JoystickAnalogueDead[MAXJOYAXES]; + int JoystickAnalogueSaturate[MAXJOYAXES]; + byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; + // // Sound variables // @@ -384,20 +398,6 @@ typedef struct { int CheckForUpdates; int LastUpdateCheck; int useprecache; - - // JBF 20031211: Store the input settings because - // (currently) jmact can't regurgitate them - int MouseFunctions[MAXMOUSEBUTTONS][2]; - int MouseDigitalFunctions[MAXMOUSEAXES][2]; - int MouseAnalogueAxes[MAXMOUSEAXES]; - int MouseAnalogueScale[MAXMOUSEAXES]; - int JoystickFunctions[MAXJOYBUTTONS][2]; - int JoystickDigitalFunctions[MAXJOYAXES][2]; - int JoystickAnalogueAxes[MAXJOYAXES]; - int JoystickAnalogueScale[MAXJOYAXES]; - int JoystickAnalogueDead[MAXJOYAXES]; - int JoystickAnalogueSaturate[MAXJOYAXES]; - byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; } config_t; typedef struct { @@ -561,7 +561,6 @@ typedef struct { spriteinterpolate sprpos[MAXSPRITES]; - typedef struct { int floorz,ceilingz,lastvx,lastvy,bposx,bposy,bposz; int flags; @@ -592,7 +591,7 @@ extern char display_mirror,loadfromgrouponly,rtsplaying; extern int groupfile; extern int ototalclock; -extern int *animateptr[MAXANIMATES]; +extern intptr_t *animateptr[MAXANIMATES]; extern int animategoal[MAXANIMATES]; extern int animatevel[MAXANIMATES]; // extern int oanimateval[MAXANIMATES]; diff --git a/polymer/eduke32/source/funct.h b/polymer/eduke32/source/funct.h index ebf595053..d935954a1 100644 --- a/polymer/eduke32/source/funct.h +++ b/polymer/eduke32/source/funct.h @@ -150,7 +150,7 @@ extern void lotsofglass(int i,int wallnum,int n); extern void spriteglass(int i,int n); extern void ceilingglass(int i,int sectnum,int n); extern void lotsofcolourglass(int i,int wallnum,int n); -extern int GetTime(void); +extern inline int GetTime(void); extern void CONFIG_GetSetupFilename(void); extern int32 CONFIG_FunctionNameToNum(char *func); extern char *CONFIG_FunctionNumToName(int32 func); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d8289bd3a..22072daca 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -12696,7 +12696,7 @@ static void SetupGameButtons(void) =================== */ -int GetTime(void) +inline int GetTime(void) { return totalclock; } diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 973658140..fa2fec6cf 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -38,7 +38,8 @@ actordata_t hittype[MAXSPRITES]; short spriteq[1024],spriteqloc,spriteqamount=64; animwalltype animwall[MAXANIMWALLS]; short numanimwalls; -int *animateptr[MAXANIMATES], animategoal[MAXANIMATES], animatevel[MAXANIMATES], animatecnt; +intptr_t *animateptr[MAXANIMATES]; +int animategoal[MAXANIMATES], animatevel[MAXANIMATES], animatecnt; // int oanimateval[MAXANIMATES]; short animatesect[MAXANIMATES]; int msx[2048],msy[2048]; diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 8006d9233..c0ba9624d 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -314,8 +314,8 @@ int loadplayer(int spot) if (kdfread(&animatecnt,sizeof(animatecnt),1,fil) != 1) goto corrupt; if (kdfread(&animatesect[0],2,MAXANIMATES,fil) != MAXANIMATES) goto corrupt; - if (kdfread(&animateptr[0],4,MAXANIMATES,fil) != MAXANIMATES) goto corrupt; - for (i = animatecnt-1;i>=0;i--) animateptr[i] = (int *)((int)animateptr[i]+(int)(§or[0])); + if (kdfread(&animateptr[0],sizeof(intptr_t),MAXANIMATES,fil) != MAXANIMATES) goto corrupt; + for (i = animatecnt-1;i>=0;i--) animateptr[i] = (intptr_t *)((intptr_t)animateptr[i]+(intptr_t)(§or[0])); if (kdfread(&animategoal[0],4,MAXANIMATES,fil) != MAXANIMATES) goto corrupt; if (kdfread(&animatevel[0],4,MAXANIMATES,fil) != MAXANIMATES) goto corrupt; @@ -729,9 +729,9 @@ int saveplayer(int spot) dfwrite(&pskyoff[0],sizeof(pskyoff[0]),MAXPSKYTILES,fil); dfwrite(&animatecnt,sizeof(animatecnt),1,fil); dfwrite(&animatesect[0],2,MAXANIMATES,fil); - for (i = animatecnt-1;i>=0;i--) animateptr[i] = (int *)((int)animateptr[i]-(int)(§or[0])); + for (i = animatecnt-1;i>=0;i--) animateptr[i] = (intptr_t *)((intptr_t)animateptr[i]-(intptr_t)(§or[0])); dfwrite(&animateptr[0],4,MAXANIMATES,fil); - for (i = animatecnt-1;i>=0;i--) animateptr[i] = (int *)((int)animateptr[i]+(int)(§or[0])); + for (i = animatecnt-1;i>=0;i--) animateptr[i] = (intptr_t *)((intptr_t)animateptr[i]+(intptr_t)(§or[0])); dfwrite(&animategoal[0],4,MAXANIMATES,fil); dfwrite(&animatevel[0],4,MAXANIMATES,fil);