64 bit fixes for weaponstuff, gamevars, vars readable from con, warnings

git-svn-id: https://svn.eduke32.com/eduke32@794 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
qbix79 2008-06-10 19:32:14 +00:00
parent 567288d392
commit 21519fddff
5 changed files with 147 additions and 147 deletions

View file

@ -891,23 +891,23 @@ extern char g_szBuf[1024];
#define NAM_GRENADE_LIFETIME 120
#define NAM_GRENADE_LIFETIME_VAR 30
extern int *aplWeaponClip[MAX_WEAPONS]; // number of items in clip
extern int *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire)
extern int *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire
extern int *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none)
extern int *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire.
extern int *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon
extern int *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots
extern int *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item
extern int *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn
extern int *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst'
extern int *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like
extern int *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing. zero for no sound
extern int *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
extern int *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
extern int *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
extern int *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
extern int *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
extern intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in clip
extern intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire)
extern intptr_t *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire
extern intptr_t *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none)
extern intptr_t *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire.
extern intptr_t *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon
extern intptr_t *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots
extern intptr_t *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item
extern intptr_t *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn
extern intptr_t *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst'
extern intptr_t *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like
extern intptr_t *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing. zero for no sound
extern intptr_t *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
extern intptr_t *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
extern intptr_t *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
extern intptr_t *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
extern intptr_t *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
extern short timer;

View file

@ -4271,23 +4271,23 @@ static void dumpdebugdata(void)
for (j=0;j<numplayers;j++)
{
fprintf(fp,"Player %d\n\n",j);
fprintf(fp,"WEAPON%d_CLIP %d\n",i,aplWeaponClip[i][j]);
fprintf(fp,"WEAPON%d_RELOAD %d\n",i,aplWeaponReload[i][j]);
fprintf(fp,"WEAPON%d_FIREDELAY %d\n",i,aplWeaponFireDelay[i][j]);
fprintf(fp,"WEAPON%d_TOTALTIME %d\n",i,aplWeaponTotalTime[i][j]);
fprintf(fp,"WEAPON%d_HOLDDELAY %d\n",i,aplWeaponHoldDelay[i][j]);
fprintf(fp,"WEAPON%d_FLAGS %d\n",i,aplWeaponFlags[i][j]);
fprintf(fp,"WEAPON%d_SHOOTS %d\n",i,aplWeaponShoots[i][j]);
fprintf(fp,"WEAPON%d_SPAWNTIME %d\n",i,aplWeaponSpawnTime[i][j]);
fprintf(fp,"WEAPON%d_SPAWN %d\n",i,aplWeaponSpawn[i][j]);
fprintf(fp,"WEAPON%d_SHOTSPERBURST %d\n",i,aplWeaponShotsPerBurst[i][j]);
fprintf(fp,"WEAPON%d_WORKSLIKE %d\n",i,aplWeaponWorksLike[i][j]);
fprintf(fp,"WEAPON%d_INITIALSOUND %d\n",i,aplWeaponInitialSound[i][j]);
fprintf(fp,"WEAPON%d_FIRESOUND %d\n",i,aplWeaponFireSound[i][j]);
fprintf(fp,"WEAPON%d_SOUND2TIME %d\n",i,aplWeaponSound2Time[i][j]);
fprintf(fp,"WEAPON%d_SOUND2SOUND %d\n",i,aplWeaponSound2Sound[i][j]);
fprintf(fp,"WEAPON%d_RELOADSOUND1 %d\n",i,aplWeaponReloadSound1[i][j]);
fprintf(fp,"WEAPON%d_RELOADSOUND2 %d\n",i,aplWeaponReloadSound2[i][j]);
fprintf(fp,"WEAPON%d_CLIP %td\n",i,aplWeaponClip[i][j]);
fprintf(fp,"WEAPON%d_RELOAD %td\n",i,aplWeaponReload[i][j]);
fprintf(fp,"WEAPON%d_FIREDELAY %td\n",i,aplWeaponFireDelay[i][j]);
fprintf(fp,"WEAPON%d_TOTALTIME %td\n",i,aplWeaponTotalTime[i][j]);
fprintf(fp,"WEAPON%d_HOLDDELAY %td\n",i,aplWeaponHoldDelay[i][j]);
fprintf(fp,"WEAPON%d_FLAGS %td\n",i,aplWeaponFlags[i][j]);
fprintf(fp,"WEAPON%d_SHOOTS %td\n",i,aplWeaponShoots[i][j]);
fprintf(fp,"WEAPON%d_SPAWNTIME %td\n",i,aplWeaponSpawnTime[i][j]);
fprintf(fp,"WEAPON%d_SPAWN %td\n",i,aplWeaponSpawn[i][j]);
fprintf(fp,"WEAPON%d_SHOTSPERBURST %td\n",i,aplWeaponShotsPerBurst[i][j]);
fprintf(fp,"WEAPON%d_WORKSLIKE %td\n",i,aplWeaponWorksLike[i][j]);
fprintf(fp,"WEAPON%d_INITIALSOUND %td\n",i,aplWeaponInitialSound[i][j]);
fprintf(fp,"WEAPON%d_FIRESOUND %td\n",i,aplWeaponFireSound[i][j]);
fprintf(fp,"WEAPON%d_SOUND2TIME %td\n",i,aplWeaponSound2Time[i][j]);
fprintf(fp,"WEAPON%d_SOUND2SOUND %td\n",i,aplWeaponSound2Sound[i][j]);
fprintf(fp,"WEAPON%d_RELOADSOUND1 %td\n",i,aplWeaponReloadSound1[i][j]);
fprintf(fp,"WEAPON%d_RELOADSOUND2 %td\n",i,aplWeaponReloadSound2[i][j]);
}
fprintf(fp,"\n");
}
@ -4304,7 +4304,7 @@ static void dumpdebugdata(void)
if (aGameVars[i].plValues[j] != aGameVars[i].lDefault)
{
fprintf(fp,"gamevar %s ",aGameVars[i].szLabel);
fprintf(fp,"%d",aGameVars[i].plValues[j]);
fprintf(fp,"%td",aGameVars[i].plValues[j]);
fprintf(fp," GAMEVAR_FLAG_PERACTOR");
if (aGameVars[i].dwFlags != GAMEVAR_FLAG_PERACTOR)
{
@ -9727,8 +9727,8 @@ static void compilecons(void)
{
int i;
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
labelcode = (int *)&sector[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype = (int *)&wall[0]; // V8: 16384*32/4 = 131072 V7: 8192*32/4 = 65536
labelcode = (intptr_t *)&sector[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype = (intptr_t *)&wall[0]; // V8: 16384*32/4 = 131072 V7: 8192*32/4 = 65536
// if we compile for a V7 engine wall[] should be used for label names since it's bigger
if (userconfiles == 0)
@ -9760,10 +9760,10 @@ static void compilecons(void)
else
{
char *newlabel;
int *newlabelcode;
intptr_t *newlabelcode;
newlabel = (char *)malloc(labelcnt<<6);
newlabelcode = (int *)malloc(labelcnt*sizeof(int));
newlabelcode = (intptr_t *)malloc(labelcnt*sizeof(intptr_t));
if (!newlabel || !newlabelcode)
{
@ -9771,7 +9771,7 @@ static void compilecons(void)
}
copybuf(label, newlabel, (labelcnt*64)/4);
copybuf(labelcode, newlabelcode, (labelcnt*sizeof(int))/4);
copybuf(labelcode, newlabelcode, (labelcnt*sizeof(intptr_t))/4);
label = newlabel;
labelcode = newlabelcode;

View file

@ -45,23 +45,23 @@ static int num_braces = 0;
int redefined_quote_count = 0;
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
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 g_iReturnVarID=-1; // var ID of "RETURN"
int g_iWeaponVarID=-1; // var ID of "WEAPON"
@ -1409,7 +1409,7 @@ static void transvartype(int type)
initprintf("%s:%d: debug: accepted constant %d in place of gamevar.\n",compilefile,line_number,atol(textptr));
*scriptptr++=MAXGAMEVARS;
if (tolower(textptr[1])=='x')
sscanf(textptr+2,"%x",scriptptr);
sscanf(textptr+2,"%tx",scriptptr);
else
*scriptptr=atol(textptr);
scriptptr++;
@ -1621,7 +1621,7 @@ static int transnum(int type)
}
if (!(error || warning) && g_ScriptDebug > 1)
initprintf("%s:%d: debug: accepted constant %d.\n",compilefile,line_number,atol(textptr));
if (tolower(textptr[1])=='x')sscanf(textptr+2,"%x",scriptptr);
if (tolower(textptr[1])=='x')sscanf(textptr+2,"%tx",scriptptr);
else
*scriptptr = atol(textptr);
scriptptr++;
@ -4485,7 +4485,7 @@ repeatcase:
if (!fta_quotes[k])
{
fta_quotes[k] = NULL;
Bsprintf(tempbuf,"Failed allocating %d byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
Bsprintf(tempbuf,"Failed allocating %td byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
gameexit(tempbuf);
}
@ -4504,7 +4504,7 @@ repeatcase:
if (!redefined_quotes[redefined_quote_count])
{
redefined_quotes[redefined_quote_count] = NULL;
Bsprintf(tempbuf,"Failed allocating %d byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
Bsprintf(tempbuf,"Failed allocating %td byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
gameexit(tempbuf);
}
}
@ -4598,7 +4598,7 @@ repeatcase:
g_sounds[k].filename = Bcalloc(BMAX_PATH,sizeof(char));
if (!g_sounds[k].filename)
{
Bsprintf(tempbuf,"Failed allocating %d byte buffer.",sizeof(char) * BMAX_PATH);
Bsprintf(tempbuf,"Failed allocating %td byte buffer.",sizeof(char) * BMAX_PATH);
gameexit(tempbuf);
}

View file

@ -99,7 +99,7 @@ static void ClearGameVars(void)
int ReadGameVars(int fil)
{
int i;
int l;
intptr_t l;
// AddLog("Reading gamevars from savegame");
@ -119,9 +119,9 @@ int ReadGameVars(int fil)
for (i=0;i<iGameVarCount;i++)
{
if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER)
aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(int));
aGameVars[i].plValues=Bcalloc(MAXPLAYERS,sizeof(intptr_t));
else if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
aGameVars[i].plValues=Bcalloc(MAXSPRITES,sizeof(int));
aGameVars[i].plValues=Bcalloc(MAXSPRITES,sizeof(intptr_t));
else
// else nothing 'extra...'
aGameVars[i].plValues=NULL;
@ -139,13 +139,13 @@ int ReadGameVars(int fil)
{
//Bsprintf(g_szBuf,"Reading value array for %s (%d)",aGameVars[i].szLabel,sizeof(int) * MAXPLAYERS);
//AddLog(g_szBuf);
if (kdfread(aGameVars[i].plValues,sizeof(int) * MAXPLAYERS, 1, fil) != 1) goto corrupt;
if (kdfread(aGameVars[i].plValues,sizeof(intptr_t) * MAXPLAYERS, 1, fil) != 1) goto corrupt;
}
else if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
{
//Bsprintf(g_szBuf,"Reading value array for %s (%d)",aGameVars[i].szLabel,sizeof(int) * MAXSPRITES);
//AddLog(g_szBuf);
if (kdfread(&aGameVars[i].plValues[0],sizeof(int), MAXSPRITES, fil) != MAXSPRITES) goto corrupt;
if (kdfread(&aGameVars[i].plValues[0],sizeof(intptr_t), MAXSPRITES, fil) != MAXSPRITES) goto corrupt;
}
// else nothing 'extra...'
}
@ -163,7 +163,7 @@ int ReadGameVars(int fil)
// AddLog(g_szBuf);
for (i=0;i<iGameArrayCount;i++)
{
aGameArrays[i].plValues=Bcalloc(aGameArrays[i].size,sizeof(int));
aGameArrays[i].plValues=Bcalloc(aGameArrays[i].size,sizeof(intptr_t));
}
// Bsprintf(g_szBuf,"CP:%s %d",__FILE__,__LINE__);
@ -181,8 +181,8 @@ int ReadGameVars(int fil)
for (i=0;i<MAXGAMEEVENTS;i++)
if (apScriptGameEvent[i])
{
l = (int)apScriptGameEvent[i]+(int)&script[0];
apScriptGameEvent[i] = (int *)l;
l = (intptr_t)apScriptGameEvent[i]+(intptr_t)&script[0];
apScriptGameEvent[i] = (intptr_t *)l;
}
// Bsprintf(g_szBuf,"CP:%s %d",__FILE__,__LINE__);
@ -213,7 +213,7 @@ corrupt:
void SaveGameVars(FILE *fil)
{
int i;
int l;
intptr_t l;
// AddLog("Saving Game Vars to File");
dfwrite(&iGameVarCount,sizeof(iGameVarCount),1,fil);
@ -232,13 +232,13 @@ void SaveGameVars(FILE *fil)
{
//Bsprintf(g_szBuf,"Writing value array for %s (%d)",aGameVars[i].szLabel,sizeof(int) * MAXPLAYERS);
//AddLog(g_szBuf);
dfwrite(aGameVars[i].plValues,sizeof(int) * MAXPLAYERS, 1, fil);
dfwrite(aGameVars[i].plValues,sizeof(intptr_t) * MAXPLAYERS, 1, fil);
}
else if (aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
{
//Bsprintf(g_szBuf,"Writing value array for %s (%d)",aGameVars[i].szLabel,sizeof(int) * MAXSPRITES);
//AddLog(g_szBuf);
dfwrite(&aGameVars[i].plValues[0],sizeof(int), MAXSPRITES, fil);
dfwrite(&aGameVars[i].plValues[0],sizeof(intptr_t), MAXSPRITES, fil);
}
// else nothing 'extra...'
}
@ -261,15 +261,15 @@ void SaveGameVars(FILE *fil)
for (i=0;i<MAXGAMEEVENTS;i++)
if (apScriptGameEvent[i])
{
l = (int)apScriptGameEvent[i]-(int)&script[0];
apScriptGameEvent[i] = (int *)l;
l = (intptr_t)apScriptGameEvent[i]-(intptr_t)&script[0];
apScriptGameEvent[i] = (intptr_t *)l;
}
dfwrite(apScriptGameEvent,sizeof(apScriptGameEvent),1,fil);
for (i=0;i<MAXGAMEEVENTS;i++)
if (apScriptGameEvent[i])
{
l = (int)apScriptGameEvent[i]+(int)&script[0];
apScriptGameEvent[i] = (int *)l;
l = (intptr_t)apScriptGameEvent[i]+(intptr_t)&script[0];
apScriptGameEvent[i] = (intptr_t *)l;
}
Bsprintf(g_szBuf,"EOF: EDuke32");
@ -303,7 +303,7 @@ void DumpGameVars(FILE *fp)
else if (aGameVars[i].dwFlags & (GAMEVAR_FLAG_CHARPTR))
fprintf(fp,"%d",*((char*)aGameVars[i].lValue));
else
fprintf(fp,"%d",aGameVars[i].lValue);
fprintf(fp,"%td",aGameVars[i].lValue);
if (aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERPLAYER))
fprintf(fp," GAMEVAR_FLAG_PERPLAYER");
else if (aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERACTOR))
@ -382,7 +382,7 @@ int AddGameArray(const char *pszLabel, int asize)
aGameArrays[i].szLabel=Bcalloc(MAXVARLABEL,sizeof(char));
if (aGameArrays[i].szLabel != pszLabel)
Bstrcpy(aGameArrays[i].szLabel,pszLabel);
aGameArrays[i].plValues=Bcalloc(asize,sizeof(int));
aGameArrays[i].plValues=Bcalloc(asize,sizeof(intptr_t));
aGameArrays[i].size=asize;
aGameVars[i].bReset=0;
iGameArrayCount++;
@ -1238,17 +1238,17 @@ static void AddSystemVars()
AddGameVar("TRIPBOMB_CONTROL", TRIPBOMB_TRIPWIRE, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
AddGameVar("PIPEBOMB_CONTROL", NAM?PIPEBOMB_TIMER:PIPEBOMB_REMOTE, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
AddGameVar("RESPAWN_MONSTERS", (int)&ud.respawn_monsters,GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("RESPAWN_ITEMS",(int)&ud.respawn_items, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("RESPAWN_INVENTORY",(int)&ud.respawn_inventory, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MONSTERS_OFF",(int)&ud.monsters_off, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MARKER",(int)&ud.marker, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("FFIRE",(int)&ud.ffire, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("LEVEL",(int)&ud.level_number, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("VOLUME",(int)&ud.volume_number, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("RESPAWN_MONSTERS", (intptr_t)&ud.respawn_monsters,GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("RESPAWN_ITEMS",(intptr_t)&ud.respawn_items, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("RESPAWN_INVENTORY",(intptr_t)&ud.respawn_inventory, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MONSTERS_OFF",(intptr_t)&ud.monsters_off, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MARKER",(intptr_t)&ud.marker, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("FFIRE",(intptr_t)&ud.ffire, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("LEVEL",(intptr_t)&ud.level_number, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("VOLUME",(intptr_t)&ud.volume_number, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("COOP",(int)&ud.coop, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MULTIMODE",(int)&ud.multimode, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("COOP",(intptr_t)&ud.coop, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("MULTIMODE",(intptr_t)&ud.multimode, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("WEAPON", 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYSTEM);
AddGameVar("WORKSLIKE", 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYSTEM);
@ -1260,71 +1260,71 @@ static void AddSystemVars()
AddGameVar("HITAG", 0, GAMEVAR_FLAG_SYSTEM);
AddGameVar("TEXTURE", 0, GAMEVAR_FLAG_SYSTEM);
AddGameVar("THISACTOR", 0, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYSTEM);
AddGameVar("myconnectindex", (int)&myconnectindex, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("screenpeek", (int)&screenpeek, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("currentweapon",(int)&g_currentweapon, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gs",(int)&g_gs, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("looking_arc",(int)&g_looking_arc, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gun_pos",(int)&g_gun_pos, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("weapon_xoffset",(int)&g_weapon_xoffset, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("weaponcount",(int)&g_kb, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("looking_angSR1",(int)&g_looking_angSR1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("xdim",(int)&xdim, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("ydim",(int)&ydim, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowx1",(int)&windowx1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowx2",(int)&windowx2, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowy1",(int)&windowy1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowy2",(int)&windowy2, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("totalclock",(int)&totalclock, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("lastvisinc",(int)&lastvisinc, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("numsectors",(int)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("numplayers",(int)&numplayers, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("viewingrange",(int)&viewingrange, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("yxaspect",(int)&yxaspect, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gravitationalconstant",(int)&gc, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("gametype_flags",(int)&gametype_flags[ud.coop], GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("framerate",(int)&framerate, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myconnectindex", (intptr_t)&myconnectindex, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("screenpeek", (intptr_t)&screenpeek, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("currentweapon",(intptr_t)&g_currentweapon, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gs",(intptr_t)&g_gs, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("looking_arc",(intptr_t)&g_looking_arc, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gun_pos",(intptr_t)&g_gun_pos, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("weapon_xoffset",(intptr_t)&g_weapon_xoffset, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("weaponcount",(intptr_t)&g_kb, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("looking_angSR1",(intptr_t)&g_looking_angSR1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("xdim",(intptr_t)&xdim, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("ydim",(intptr_t)&ydim, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowx1",(intptr_t)&windowx1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowx2",(intptr_t)&windowx2, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowy1",(intptr_t)&windowy1, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("windowy2",(intptr_t)&windowy2, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("totalclock",(intptr_t)&totalclock, GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("lastvisinc",(intptr_t)&lastvisinc, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("numsectors",(intptr_t)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("numplayers",(intptr_t)&numplayers, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("viewingrange",(intptr_t)&viewingrange, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("yxaspect",(intptr_t)&yxaspect, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("gravitationalconstant",(intptr_t)&gc, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("gametype_flags",(intptr_t)&gametype_flags[ud.coop], GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("framerate",(intptr_t)&framerate, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("CLIPMASK0", CLIPMASK0, GAMEVAR_FLAG_SYSTEM|GAMEVAR_FLAG_READONLY);
AddGameVar("CLIPMASK1", CLIPMASK1, GAMEVAR_FLAG_SYSTEM|GAMEVAR_FLAG_READONLY);
AddGameVar("camerax",(int)&ud.camerax, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameray",(int)&ud.cameray, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraz",(int)&ud.cameraz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraang",(int)&ud.cameraang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("camerahoriz",(int)&ud.camerahoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("camerasect",(int)&ud.camerasect, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameradist",(int)&cameradist, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraclock",(int)&cameraclock, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("camerax",(intptr_t)&ud.camerax, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameray",(intptr_t)&ud.cameray, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraz",(intptr_t)&ud.cameraz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraang",(intptr_t)&ud.cameraang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("camerahoriz",(intptr_t)&ud.camerahoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("camerasect",(intptr_t)&ud.camerasect, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameradist",(intptr_t)&cameradist, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("cameraclock",(intptr_t)&cameraclock, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myx",(int)&myx, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myy",(int)&myy, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myz",(int)&myz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyx",(int)&omyx, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyy",(int)&omyy, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyz",(int)&omyz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myxvel",(int)&myxvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myyvel",(int)&myyvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myzvel",(int)&myzvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myx",(intptr_t)&myx, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myy",(intptr_t)&myy, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myz",(intptr_t)&myz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyx",(intptr_t)&omyx, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyy",(intptr_t)&omyy, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyz",(intptr_t)&omyz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myxvel",(intptr_t)&myxvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myyvel",(intptr_t)&myyvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myzvel",(intptr_t)&myzvel, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhoriz",(int)&myhoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhorizoff",(int)&myhorizoff, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyhoriz",(int)&omyhoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyhorizoff",(int)&omyhorizoff, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myang",(int)&myang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyang",(int)&omyang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("mycursectnum",(int)&mycursectnum, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myjumpingcounter",(int)&myjumpingcounter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhoriz",(intptr_t)&myhoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhorizoff",(intptr_t)&myhorizoff, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyhoriz",(intptr_t)&omyhoriz, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyhorizoff",(intptr_t)&omyhorizoff, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myang",(intptr_t)&myang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("omyang",(intptr_t)&omyang, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("mycursectnum",(intptr_t)&mycursectnum, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myjumpingcounter",(intptr_t)&myjumpingcounter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myjumpingtoggle",(int)&myjumpingtoggle, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myonground",(int)&myonground, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhardlanding",(int)&myhardlanding, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myreturntocenter",(int)&myreturntocenter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myjumpingtoggle",(intptr_t)&myjumpingtoggle, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myonground",(intptr_t)&myonground, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhardlanding",(intptr_t)&myhardlanding, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myreturntocenter",(intptr_t)&myreturntocenter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("display_mirror",(int)&display_mirror, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("randomseed",(int)&randomseed, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("display_mirror",(intptr_t)&display_mirror, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("randomseed",(intptr_t)&randomseed, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("NUMWALLS",(int)&numwalls, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("NUMSECTORS",(int)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("NUMWALLS",(intptr_t)&numwalls, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("NUMSECTORS",(intptr_t)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
}
void InitGameVars(void)

View file

@ -246,7 +246,7 @@ void *RTS_GetSound(int32 lump)
if (lumpcache[lump] == NULL)
{
lumplockbyte[lump] = 200;
allocache((int *)&lumpcache[lump],(int)RTS_SoundLength(lump-1),&lumplockbyte[lump]); // JBF 20030910: char * => int *
allocache((intptr_t *)&lumpcache[lump],(int)RTS_SoundLength(lump-1),&lumplockbyte[lump]); // JBF 20030910: char * => int *
RTS_ReadLump(lump, lumpcache[lump]);
}
else