diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 3b12753b0..fd3fde409 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -34,7 +34,7 @@ inline void updateinterpolations(void) //Stick at beginning of domovethings for (;i>=0;i--) oldipos[i] = *curipos[i]; } -void setinterpolation(intptr_t *posptr) +void setinterpolation(int *posptr) { int i=numinterpolations-1; @@ -46,7 +46,7 @@ void setinterpolation(intptr_t *posptr) numinterpolations++; } -void stopinterpolation(intptr_t *posptr) +void stopinterpolation(int *posptr) { int i=numinterpolations-1; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 8b6aa00cd..97328090b 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -593,7 +593,7 @@ extern char display_mirror,loadfromgrouponly,rtsplaying; extern int groupfile; extern int ototalclock; -extern intptr_t *animateptr[MAXANIMATES]; +extern int *animateptr[MAXANIMATES]; extern int animategoal[MAXANIMATES]; extern int animatevel[MAXANIMATES]; // extern int oanimateval[MAXANIMATES]; @@ -691,9 +691,9 @@ extern int everyothertime; extern int mymaxlag, otherminlag, bufferjitter; extern int numinterpolations, startofdynamicinterpolations; -extern intptr_t oldipos[MAXINTERPOLATIONS]; -extern intptr_t bakipos[MAXINTERPOLATIONS]; -extern intptr_t *curipos[MAXINTERPOLATIONS]; +extern int oldipos[MAXINTERPOLATIONS]; +extern int bakipos[MAXINTERPOLATIONS]; +extern int *curipos[MAXINTERPOLATIONS]; extern short numclouds,clouds[128],cloudx[128],cloudy[128]; extern int cloudtotalclock,totalmemory; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7242710b4..3b3b8a823 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -6356,7 +6356,7 @@ int spawn(int j, int pn) void animatesprites(int x,int y,int a,int smoothratio) { int i, j, k, p, sect; - int l, t1,t3,t4; + intptr_t l, t1,t3,t4; spritetype *s,*t; int switchpic; @@ -6914,7 +6914,7 @@ PALONLY: if (t4) { - l = *(int *)(t4+8); + l = *(((intptr_t *)t4)+2); #if defined(POLYMOST) && defined(USE_OPENGL) if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) @@ -6970,7 +6970,7 @@ PALONLY: break; } - t->picnum += k + (*(int *)t4) + l * t3; + t->picnum += k + (*(intptr_t *)t4) + l * t3; if (l > 0) while (tilesizx[t->picnum] == 0 && t->picnum > 0) t->picnum -= l; //Hack, for actors diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index ccb3e11f9..4ea04ee15 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -45,23 +45,23 @@ static int num_braces = 0; int redefined_quote_count = 0; -intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine -intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire) -intptr_t *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire -intptr_t *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none) -intptr_t *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire. -intptr_t *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon -intptr_t *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots -intptr_t *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item -intptr_t *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn -intptr_t *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst' -intptr_t *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like -intptr_t *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing. zero for no sound -intptr_t *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic) -intptr_t *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time -intptr_t *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID -intptr_t *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed -intptr_t *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted +int *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine +int *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire) +int *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire +int *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none) +int *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire. +int *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon +int *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots +int *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item +int *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn +int *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst' +int *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like +int *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing. zero for no sound +int *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic) +int *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time +int *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID +int *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed +int *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted int g_iReturnVarID=-1; // var ID of "RETURN" int g_iWeaponVarID=-1; // var ID of "WEAPON" diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index ca06c2fb9..0ed19cd8e 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -37,9 +37,9 @@ extern int g_iHiTagID; // var ID of "HITAG" extern int g_iTextureID; // var ID of "TEXTURE" extern int g_iThisActorID; // var ID of "THISACTOR" -extern int *actorLoadEventScrptr[MAXTILES]; +extern intptr_t *actorLoadEventScrptr[MAXTILES]; -extern int *apScriptGameEvent[MAXGAMEEVENTS]; +extern intptr_t *apScriptGameEvent[MAXGAMEEVENTS]; extern int otherp; extern int g_currentweapon; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index fd8099025..b6c31335e 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -4476,8 +4476,8 @@ static int parse(void) insptr++; g_t[5] = *insptr++; // Ai g_t[4] = *(intptr_t *)(g_t[5]); // Action - g_t[1] = *(intptr_t *)(g_t[5]+4); // move - g_sp->hitag = *(intptr_t *)(g_t[5]+8); // move flags + g_t[1] = *(((intptr_t *)g_t[5])+1); // move + g_sp->hitag = *(((intptr_t *)g_t[5])+2); // move flags g_t[0] = g_t[2] = g_t[3] = 0; // count, actioncount... g_t[3] = ??? if (g_sp->hitag&random_angle) g_sp->ang = TRAND&2047; diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 73f824b44..c059e076c 100755 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -479,14 +479,14 @@ int AddGameVar(const char *pszLabel, int lValue, unsigned int dwFlags) if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER) { if (!aGameVars[i].plValues) - aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(int)); + aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(intptr_t)); for (j=0;j