mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fixes
git-svn-id: https://svn.eduke32.com/eduke32@96 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ef2aa46a05
commit
f1ae584227
2 changed files with 9 additions and 34 deletions
|
@ -41,7 +41,7 @@ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \
|
||||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||||
LIBS=-lm
|
LIBS=-lm
|
||||||
ifneq (0,$(JFAUD))
|
ifneq (0,$(JFAUD))
|
||||||
JFAUDLIBS=../jfaud/libjfaud.a ../jfaud/mpadec/libmpadec/libmpadec.a
|
JFAUDLIBS=../jfaud/libjfaud.a ../jfaud/mpadec/libmpadec.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NASMFLAGS=-s #-g
|
NASMFLAGS=-s #-g
|
||||||
|
|
|
@ -1057,18 +1057,12 @@ void ReadGameVars(long fil)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER)
|
if(aGameVars[i].dwFlags & GAMEVAR_FLAG_PERPLAYER)
|
||||||
{
|
|
||||||
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXPLAYERS);
|
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXPLAYERS);
|
||||||
}
|
|
||||||
else if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
|
else if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
|
||||||
{
|
|
||||||
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXSPRITES);
|
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXSPRITES);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
// else nothing 'extra...'
|
// else nothing 'extra...'
|
||||||
aGameVars[i].plValues=NULL;
|
aGameVars[i].plValues=NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bsprintf(g_szBuf,"CP:%s %d",__FILE__,__LINE__);
|
// Bsprintf(g_szBuf,"CP:%s %d",__FILE__,__LINE__);
|
||||||
|
@ -1203,38 +1197,22 @@ void DumpGameVars(FILE *fp)
|
||||||
fprintf(fp,"gamevar %s ",aGameVars[i].szLabel);
|
fprintf(fp,"gamevar %s ",aGameVars[i].szLabel);
|
||||||
|
|
||||||
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PLONG) )
|
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PLONG) )
|
||||||
{
|
|
||||||
fprintf(fp,"%ld",*((long*)aGameVars[i].lValue));
|
fprintf(fp,"%ld",*((long*)aGameVars[i].lValue));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
fprintf(fp,"%ld",aGameVars[i].lValue);
|
fprintf(fp,"%ld",aGameVars[i].lValue);
|
||||||
}
|
|
||||||
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERPLAYER) )
|
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERPLAYER) )
|
||||||
{
|
|
||||||
fprintf(fp," GAMEVAR_FLAG_PERPLAYER");
|
fprintf(fp," GAMEVAR_FLAG_PERPLAYER");
|
||||||
}
|
|
||||||
else if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERACTOR) )
|
else if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PERACTOR) )
|
||||||
{
|
|
||||||
fprintf(fp," GAMEVAR_FLAG_PERACTOR");
|
fprintf(fp," GAMEVAR_FLAG_PERACTOR");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
fprintf(fp," %ld",aGameVars[i].dwFlags & (GAMEVAR_FLAG_USER_MASK));
|
fprintf(fp," %ld",aGameVars[i].dwFlags & (GAMEVAR_FLAG_USER_MASK));
|
||||||
}
|
|
||||||
fprintf(fp," // ");
|
fprintf(fp," // ");
|
||||||
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_SYSTEM))
|
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_SYSTEM))
|
||||||
{
|
|
||||||
fprintf(fp," (system)");
|
fprintf(fp," (system)");
|
||||||
}
|
|
||||||
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PLONG))
|
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_PLONG))
|
||||||
{
|
|
||||||
fprintf(fp," (pointer)");
|
fprintf(fp," (pointer)");
|
||||||
}
|
|
||||||
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_READONLY) )
|
if(aGameVars[i].dwFlags & (GAMEVAR_FLAG_READONLY) )
|
||||||
{
|
|
||||||
fprintf(fp," (read only)");
|
fprintf(fp," (read only)");
|
||||||
}
|
|
||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1350,24 +1328,16 @@ char AddGameVar(char *pszLabel, long lValue, unsigned long 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=SafeMalloc(sizeof(long) * MAXPLAYERS);
|
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXPLAYERS);
|
||||||
}
|
|
||||||
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=SafeMalloc(sizeof(long) * MAXSPRITES);
|
aGameVars[i].plValues=SafeMalloc(sizeof(long) * MAXSPRITES);
|
||||||
}
|
|
||||||
for(j=0;j<MAXSPRITES;j++)
|
for(j=0;j<MAXSPRITES;j++)
|
||||||
{
|
|
||||||
aGameVars[i].plValues[j]=lValue;
|
aGameVars[i].plValues[j]=lValue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4544,7 +4514,8 @@ repeatcase:
|
||||||
if (!fta_quotes[k])
|
if (!fta_quotes[k])
|
||||||
{
|
{
|
||||||
fta_quotes[k] = NULL;
|
fta_quotes[k] = NULL;
|
||||||
gameexit("Failed allocating 64 byte quote text buffer.");
|
Bsprintf(tempbuf,"Failed allocating %d byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
|
||||||
|
gameexit(tempbuf);
|
||||||
}
|
}
|
||||||
scriptptr--;
|
scriptptr--;
|
||||||
}
|
}
|
||||||
|
@ -4562,7 +4533,8 @@ repeatcase:
|
||||||
if (!redefined_quotes[redefined_quote_count])
|
if (!redefined_quotes[redefined_quote_count])
|
||||||
{
|
{
|
||||||
redefined_quotes[redefined_quote_count] = NULL;
|
redefined_quotes[redefined_quote_count] = NULL;
|
||||||
gameexit("Failed allocating 64 byte quote text buffer.");
|
Bsprintf(tempbuf,"Failed allocating %d byte quote text buffer.",sizeof(char) * MAXQUOTELEN);
|
||||||
|
gameexit(tempbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4924,7 +4896,6 @@ void FreeGameVars(void)
|
||||||
|
|
||||||
if(aGameVars[i].plValues)
|
if(aGameVars[i].plValues)
|
||||||
Bfree(aGameVars[i].plValues);
|
Bfree(aGameVars[i].plValues);
|
||||||
|
|
||||||
aGameVars[i].plValues=NULL;
|
aGameVars[i].plValues=NULL;
|
||||||
}
|
}
|
||||||
iGameVarCount=0;
|
iGameVarCount=0;
|
||||||
|
@ -4943,6 +4914,9 @@ void ClearGameVars(void)
|
||||||
aGameVars[i].lValue=0;
|
aGameVars[i].lValue=0;
|
||||||
aGameVars[i].szLabel[0]=0;
|
aGameVars[i].szLabel[0]=0;
|
||||||
aGameVars[i].dwFlags=0;
|
aGameVars[i].dwFlags=0;
|
||||||
|
|
||||||
|
if(aGameVars[i].plValues)
|
||||||
|
Bfree(aGameVars[i].plValues);
|
||||||
aGameVars[i].plValues=NULL;
|
aGameVars[i].plValues=NULL;
|
||||||
}
|
}
|
||||||
iGameVarCount=0;
|
iGameVarCount=0;
|
||||||
|
@ -5812,6 +5786,7 @@ void loadefs(char *filenam)
|
||||||
*script = (long) scriptptr;
|
*script = (long) scriptptr;
|
||||||
|
|
||||||
Bfree(mptr);
|
Bfree(mptr);
|
||||||
|
mptr = NULL;
|
||||||
|
|
||||||
if(warning|error)
|
if(warning|error)
|
||||||
initprintf("Found %ld warning(s), %ld error(s).\n",warning,error);
|
initprintf("Found %ld warning(s), %ld error(s).\n",warning,error);
|
||||||
|
|
Loading…
Reference in a new issue