Minimal changes to get it compiling (and not crashing when ran under

valgrind. Changes don't affect 32 bit mode).
Changed aplWeaponClip and friends to int* ,but intptr_t* works as well for me.
Final type will determined once the con code has been checked.



git-svn-id: https://svn.eduke32.com/eduke32@709 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
qbix79 2008-04-24 09:53:16 +00:00
parent 60fbc40611
commit 168573d5aa
8 changed files with 36 additions and 36 deletions

View file

@ -34,7 +34,7 @@ inline void updateinterpolations(void) //Stick at beginning of domovethings
for (;i>=0;i--) oldipos[i] = *curipos[i]; for (;i>=0;i--) oldipos[i] = *curipos[i];
} }
void setinterpolation(intptr_t *posptr) void setinterpolation(int *posptr)
{ {
int i=numinterpolations-1; int i=numinterpolations-1;
@ -46,7 +46,7 @@ void setinterpolation(intptr_t *posptr)
numinterpolations++; numinterpolations++;
} }
void stopinterpolation(intptr_t *posptr) void stopinterpolation(int *posptr)
{ {
int i=numinterpolations-1; int i=numinterpolations-1;

View file

@ -593,7 +593,7 @@ extern char display_mirror,loadfromgrouponly,rtsplaying;
extern int groupfile; extern int groupfile;
extern int ototalclock; extern int ototalclock;
extern intptr_t *animateptr[MAXANIMATES]; extern int *animateptr[MAXANIMATES];
extern int animategoal[MAXANIMATES]; extern int animategoal[MAXANIMATES];
extern int animatevel[MAXANIMATES]; extern int animatevel[MAXANIMATES];
// extern int oanimateval[MAXANIMATES]; // extern int oanimateval[MAXANIMATES];
@ -691,9 +691,9 @@ extern int everyothertime;
extern int mymaxlag, otherminlag, bufferjitter; extern int mymaxlag, otherminlag, bufferjitter;
extern int numinterpolations, startofdynamicinterpolations; extern int numinterpolations, startofdynamicinterpolations;
extern intptr_t oldipos[MAXINTERPOLATIONS]; extern int oldipos[MAXINTERPOLATIONS];
extern intptr_t bakipos[MAXINTERPOLATIONS]; extern int bakipos[MAXINTERPOLATIONS];
extern intptr_t *curipos[MAXINTERPOLATIONS]; extern int *curipos[MAXINTERPOLATIONS];
extern short numclouds,clouds[128],cloudx[128],cloudy[128]; extern short numclouds,clouds[128],cloudx[128],cloudy[128];
extern int cloudtotalclock,totalmemory; extern int cloudtotalclock,totalmemory;

View file

@ -6356,7 +6356,7 @@ int spawn(int j, int pn)
void animatesprites(int x,int y,int a,int smoothratio) void animatesprites(int x,int y,int a,int smoothratio)
{ {
int i, j, k, p, sect; int i, j, k, p, sect;
int l, t1,t3,t4; intptr_t l, t1,t3,t4;
spritetype *s,*t; spritetype *s,*t;
int switchpic; int switchpic;
@ -6914,7 +6914,7 @@ PALONLY:
if (t4) if (t4)
{ {
l = *(int *)(t4+8); l = *(((intptr_t *)t4)+2);
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
@ -6970,7 +6970,7 @@ PALONLY:
break; 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) if (l > 0) while (tilesizx[t->picnum] == 0 && t->picnum > 0)
t->picnum -= l; //Hack, for actors t->picnum -= l; //Hack, for actors

View file

@ -45,23 +45,23 @@ static int num_braces = 0;
int redefined_quote_count = 0; int redefined_quote_count = 0;
intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine int *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine
intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire) int *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire)
intptr_t *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire int *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire
intptr_t *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none) int *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. int *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire.
intptr_t *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon int *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon
intptr_t *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots int *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots
intptr_t *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item int *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item
intptr_t *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn int *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn
intptr_t *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst' int *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst'
intptr_t *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like int *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like
intptr_t *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing. zero for no sound int *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) int *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
intptr_t *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time int *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
intptr_t *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID int *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
intptr_t *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed int *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
intptr_t *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted int *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
int g_iReturnVarID=-1; // var ID of "RETURN" int g_iReturnVarID=-1; // var ID of "RETURN"
int g_iWeaponVarID=-1; // var ID of "WEAPON" int g_iWeaponVarID=-1; // var ID of "WEAPON"

View file

@ -37,9 +37,9 @@ extern int g_iHiTagID; // var ID of "HITAG"
extern int g_iTextureID; // var ID of "TEXTURE" extern int g_iTextureID; // var ID of "TEXTURE"
extern int g_iThisActorID; // var ID of "THISACTOR" 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 otherp;
extern int g_currentweapon; extern int g_currentweapon;

View file

@ -4476,8 +4476,8 @@ static int parse(void)
insptr++; insptr++;
g_t[5] = *insptr++; // Ai g_t[5] = *insptr++; // Ai
g_t[4] = *(intptr_t *)(g_t[5]); // Action g_t[4] = *(intptr_t *)(g_t[5]); // Action
g_t[1] = *(intptr_t *)(g_t[5]+4); // move g_t[1] = *(((intptr_t *)g_t[5])+1); // move
g_sp->hitag = *(intptr_t *)(g_t[5]+8); // move flags 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] = ??? g_t[0] = g_t[2] = g_t[3] = 0; // count, actioncount... g_t[3] = ???
if (g_sp->hitag&random_angle) if (g_sp->hitag&random_angle)
g_sp->ang = TRAND&2047; g_sp->ang = TRAND&2047;

View file

@ -479,14 +479,14 @@ int AddGameVar(const char *pszLabel, int lValue, unsigned int dwFlags)
if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER) if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER)
{ {
if (!aGameVars[i].plValues) if (!aGameVars[i].plValues)
aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(int)); aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(intptr_t));
for (j=0;j<MAXPLAYERS;j++) for (j=0;j<MAXPLAYERS;j++)
aGameVars[i].plValues[j]=lValue; aGameVars[i].plValues[j]=lValue;
} }
else if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR) else if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
{ {
if (!aGameVars[i].plValues) if (!aGameVars[i].plValues)
aGameVars[i].plValues=Bcalloc(MAXSPRITES,sizeof(int)); aGameVars[i].plValues=Bcalloc(MAXSPRITES,sizeof(intptr_t));
for (j=0;j<MAXSPRITES;j++) for (j=0;j<MAXSPRITES;j++)
aGameVars[i].plValues[j]=lValue; aGameVars[i].plValues[j]=lValue;
} }

View file

@ -39,7 +39,7 @@ actordata_t hittype[MAXSPRITES];
short spriteq[1024],spriteqloc,spriteqamount=64; short spriteq[1024],spriteqloc,spriteqamount=64;
animwalltype animwall[MAXANIMWALLS]; animwalltype animwall[MAXANIMWALLS];
short numanimwalls; short numanimwalls;
intptr_t *animateptr[MAXANIMATES]; int *animateptr[MAXANIMATES];
int animategoal[MAXANIMATES], animatevel[MAXANIMATES], animatecnt; int animategoal[MAXANIMATES], animatevel[MAXANIMATES], animatecnt;
// int oanimateval[MAXANIMATES]; // int oanimateval[MAXANIMATES];
short animatesect[MAXANIMATES]; short animatesect[MAXANIMATES];
@ -165,9 +165,9 @@ int mymaxlag, otherminlag, bufferjitter = 1;
short numclouds,clouds[128],cloudx[128],cloudy[128]; short numclouds,clouds[128],cloudx[128],cloudy[128];
int cloudtotalclock = 0,totalmemory = 0; int cloudtotalclock = 0,totalmemory = 0;
int numinterpolations = 0, startofdynamicinterpolations = 0; int numinterpolations = 0, startofdynamicinterpolations = 0;
intptr_t oldipos[MAXINTERPOLATIONS]; int oldipos[MAXINTERPOLATIONS];
intptr_t bakipos[MAXINTERPOLATIONS]; int bakipos[MAXINTERPOLATIONS];
intptr_t *curipos[MAXINTERPOLATIONS]; int *curipos[MAXINTERPOLATIONS];
int nextvoxid = 0; int nextvoxid = 0;