mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
Replaced the 'dynquote' primitive with 'qsprintf' and fixed a parsing bug with some of the level and sound name definition stuff.
git-svn-id: https://svn.eduke32.com/eduke32@290 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
11e8db76a8
commit
e2ccbf6870
5 changed files with 33 additions and 25 deletions
|
@ -9087,7 +9087,6 @@ void app_main(int argc,char **argv)
|
|||
{
|
||||
Bsprintf(ud.user_name[j],"PLAYER %d",j+1);
|
||||
ps[j].team = ud.pteam[j] = i;
|
||||
initprintf("p %d t %d\n",j,ps[j].team);
|
||||
i = 1-i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,7 +408,7 @@ char *keyw[] = {
|
|||
"precache", // 261
|
||||
"definegamefuncname", // 262
|
||||
"redefinequote", // 263
|
||||
"dynquote", // 264
|
||||
"qsprintf", // 264
|
||||
"getpname", // 265
|
||||
"qstrcat", // 266
|
||||
"qstrcpy", // 267
|
||||
|
@ -2788,7 +2788,8 @@ char parsecommand(void)
|
|||
ReportError(WARNING_EVENTSYNC);
|
||||
return 0;
|
||||
|
||||
case CON_DYNQUOTE:
|
||||
case CON_QSPRINTF:
|
||||
transnum(LABEL_DEFINE);
|
||||
transnum(LABEL_DEFINE);
|
||||
for(j = 0;j < 4;j++)
|
||||
{
|
||||
|
@ -4309,7 +4310,7 @@ repeatcase:
|
|||
transnum(LABEL_DEFINE);
|
||||
scriptptr--;
|
||||
j = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (j < 0 || j > MAXVOLUMES-1)
|
||||
{
|
||||
|
@ -4342,7 +4343,7 @@ repeatcase:
|
|||
transnum(LABEL_DEFINE);
|
||||
scriptptr--;
|
||||
j = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (j < 0 || j > NUMGAMEFUNCTIONS-1)
|
||||
{
|
||||
|
@ -4376,7 +4377,7 @@ repeatcase:
|
|||
transnum(LABEL_DEFINE);
|
||||
scriptptr--;
|
||||
j = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (j < 0 || j > 4)
|
||||
{
|
||||
|
@ -4413,7 +4414,7 @@ repeatcase:
|
|||
scriptptr--; //remove it from compiled code
|
||||
gametype_flags[j] = *scriptptr; //put it into the flags
|
||||
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (j < 0 || j > MAXGAMETYPES-1)
|
||||
{
|
||||
|
@ -4449,7 +4450,7 @@ repeatcase:
|
|||
transnum(LABEL_DEFINE);
|
||||
scriptptr--;
|
||||
k = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (j < 0 || j > MAXVOLUMES-1)
|
||||
{
|
||||
|
@ -4468,7 +4469,7 @@ repeatcase:
|
|||
}
|
||||
|
||||
i = 0;
|
||||
while( *textptr != ' ' && *textptr != 0x0a )
|
||||
while( *textptr != ' ' && *textptr != 0x0d && *textptr != 0x0a )
|
||||
{
|
||||
level_file_names[j*11+k][i] = *textptr;
|
||||
textptr++,i++;
|
||||
|
@ -4482,21 +4483,21 @@ repeatcase:
|
|||
}
|
||||
level_names[j*11+k][i] = '\0';
|
||||
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
partime[j*11+k] =
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*26*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*26);
|
||||
|
||||
textptr += 5;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
designertime[j*11+k] =
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*26*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*26);
|
||||
|
||||
textptr += 5;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
skipcomments();
|
||||
|
||||
i = 0;
|
||||
|
||||
|
@ -4544,8 +4545,7 @@ repeatcase:
|
|||
|
||||
i = 0;
|
||||
|
||||
while( *textptr == ' ' )
|
||||
textptr++;
|
||||
skipcomments();
|
||||
|
||||
if (tw == CON_REDEFINEQUOTE)
|
||||
{
|
||||
|
@ -4613,8 +4613,9 @@ repeatcase:
|
|||
}
|
||||
scriptptr--;
|
||||
i = 0;
|
||||
while( *textptr == ' ' )
|
||||
textptr++;
|
||||
|
||||
skipcomments();
|
||||
|
||||
while( *textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ')
|
||||
{
|
||||
cheatquotes[k][i] = *textptr;
|
||||
|
@ -4643,7 +4644,7 @@ repeatcase:
|
|||
i = 0;
|
||||
skipcomments();
|
||||
|
||||
while( *textptr != ' ' )
|
||||
while( *textptr != ' ' && *textptr != 0x0d && *textptr != 0x0a)
|
||||
{
|
||||
sounds[k][i] = *textptr;
|
||||
textptr++,i++;
|
||||
|
|
|
@ -695,7 +695,7 @@ enum keywords {
|
|||
CON_PRECACHE, // 261
|
||||
CON_DEFINEGAMEFUNCNAME, // 262
|
||||
CON_REDEFINEQUOTE, // 263
|
||||
CON_DYNQUOTE, // 264
|
||||
CON_QSPRINTF, // 264
|
||||
CON_GETPNAME, // 265
|
||||
CON_QSTRCAT, // 266
|
||||
CON_QSTRCPY, // 267
|
||||
|
|
|
@ -5364,21 +5364,23 @@ SKIPJIBS:
|
|||
ps[g_p].pals[j] = *insptr++;
|
||||
break;
|
||||
|
||||
case CON_DYNQUOTE:
|
||||
case CON_QSPRINTF:
|
||||
{
|
||||
long var1, var2, var3, var4;
|
||||
long var1, var2, var3, var4, sq, dq;
|
||||
insptr++;
|
||||
if(fta_quotes[*insptr] != NULL)
|
||||
dq = *insptr++;
|
||||
sq = *insptr++;
|
||||
if(fta_quotes[sq] != NULL && fta_quotes[dq] != NULL)
|
||||
{
|
||||
Bstrcpy(tempbuf,fta_quotes[*insptr++]);
|
||||
Bstrcpy(tempbuf,fta_quotes[sq]);
|
||||
var1 = GetGameVarID(*insptr++, g_i, g_p);
|
||||
var2 = GetGameVarID(*insptr++, g_i, g_p);
|
||||
var3 = GetGameVarID(*insptr++, g_i, g_p);
|
||||
var4 = GetGameVarID(*insptr++, g_i, g_p);
|
||||
Bsprintf(fta_quotes[122],tempbuf,var1,var2,var3,var4);
|
||||
FTA(122,&ps[g_p]);
|
||||
Bsprintf(fta_quotes[dq],tempbuf,var1,var2,var3,var4);
|
||||
} else {
|
||||
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
|
||||
if(fta_quotes[sq] == NULL) OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,sq);
|
||||
if(fta_quotes[dq] == NULL) OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,dq);
|
||||
insptr += 5;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -61,6 +61,12 @@ static int osdcmd_setsoundfilter(const osdfuncparm_t *parm);
|
|||
# include <cmath>
|
||||
#endif
|
||||
|
||||
#ifdef JFAUD
|
||||
#define MAXCACHE1DSIZE (16*1048576)
|
||||
#else
|
||||
#define MAXCACHE1DSIZE (32*1048576)
|
||||
#endif
|
||||
|
||||
class KenFile : public JFAudFile {
|
||||
private:
|
||||
int fh;
|
||||
|
|
Loading…
Reference in a new issue