mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Ran everything through astyle again and disabled hightile when drawing console text because the HRP font looks like shit when scaled down to that size
git-svn-id: https://svn.eduke32.com/eduke32@900 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fe97d1abb1
commit
cb1b36fb64
4 changed files with 115 additions and 109 deletions
|
@ -4452,31 +4452,31 @@ repeatcase:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_DEFINEGAMENAME:
|
case CON_DEFINEGAMENAME:
|
||||||
|
{
|
||||||
|
char gamename[32];
|
||||||
|
scriptptr--;
|
||||||
|
while (*textptr == ' ' || *textptr == '\t') textptr++;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0)
|
||||||
{
|
{
|
||||||
char gamename[32];
|
gamename[i] = *textptr;
|
||||||
scriptptr--;
|
textptr++,i++;
|
||||||
while (*textptr == ' ' || *textptr == '\t') textptr++;
|
if (i >= (signed)sizeof(gamename)-1)
|
||||||
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0)
|
|
||||||
{
|
{
|
||||||
gamename[i] = *textptr;
|
initprintf("%s:%d: error: game name exceeds limit of %d characters.\n",compilefile,line_number,sizeof(gamename)-1);
|
||||||
textptr++,i++;
|
error++;
|
||||||
if (i >= (signed)sizeof(gamename)-1)
|
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++;
|
||||||
{
|
break;
|
||||||
initprintf("%s:%d: error: game name exceeds limit of %d characters.\n",compilefile,line_number,sizeof(gamename)-1);
|
|
||||||
error++;
|
|
||||||
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
gamename[i] = '\0';
|
|
||||||
duke3dgrpstring = Bstrdup(gamename);
|
|
||||||
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
|
|
||||||
wm_setapptitle(tempbuf);
|
|
||||||
}
|
}
|
||||||
return 0;
|
gamename[i] = '\0';
|
||||||
|
duke3dgrpstring = Bstrdup(gamename);
|
||||||
|
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
|
||||||
|
wm_setapptitle(tempbuf);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
case CON_DEFINEGAMETYPE:
|
case CON_DEFINEGAMETYPE:
|
||||||
scriptptr--; //remove opcode from compiled code
|
scriptptr--; //remove opcode from compiled code
|
||||||
|
|
|
@ -2593,7 +2593,7 @@ static void DoWall(int iSet, int lVar1, int lLabelID, int lVar2)
|
||||||
if (iWall<0 || iWall >= numwalls)
|
if (iWall<0 || iWall >= numwalls)
|
||||||
{
|
{
|
||||||
insptr += (lVar2 == MAXGAMEVARS);
|
insptr += (lVar2 == MAXGAMEVARS);
|
||||||
OSD_Printf(CON_ERROR "DoWall(): Invalid wall %d\n",line_num,iWall);
|
OSD_Printf(CON_ERROR "DoWall(): Invalid wall %d\n",line_num,iWall);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2769,8 +2769,8 @@ static void DoSector(int iSet, int lVar1, int lLabelID, int lVar2)
|
||||||
|
|
||||||
if (iSector<0 || iSector >= numsectors)
|
if (iSector<0 || iSector >= numsectors)
|
||||||
{
|
{
|
||||||
OSD_Printf(CON_ERROR "DoSector(): Invalid sector %d\n",line_num,iSector);
|
OSD_Printf(CON_ERROR "DoSector(): Invalid sector %d\n",line_num,iSector);
|
||||||
insptr += (lVar2 == MAXGAMEVARS);
|
insptr += (lVar2 == MAXGAMEVARS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4794,7 +4794,7 @@ static int parse(void)
|
||||||
|
|
||||||
case CON_SOUNDONCE:
|
case CON_SOUNDONCE:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDONCE: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDONCE: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
||||||
if (!isspritemakingsound(g_i,*insptr))
|
if (!isspritemakingsound(g_i,*insptr))
|
||||||
spritesound((short) *insptr,g_i);
|
spritesound((short) *insptr,g_i);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
@ -4802,14 +4802,14 @@ static int parse(void)
|
||||||
|
|
||||||
case CON_IFSOUND:
|
case CON_IFSOUND:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_IFSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_IFSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
||||||
parseifelse(isspritemakingsound(g_i,*insptr));
|
parseifelse(isspritemakingsound(g_i,*insptr));
|
||||||
// parseifelse(SoundOwner[*insptr][0].i == g_i);
|
// parseifelse(SoundOwner[*insptr][0].i == g_i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_STOPSOUND:
|
case CON_STOPSOUND:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_STOPSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_STOPSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
||||||
if (isspritemakingsound(g_i,*insptr))
|
if (isspritemakingsound(g_i,*insptr))
|
||||||
stopspritesound((short)*insptr,g_i);
|
stopspritesound((short)*insptr,g_i);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
@ -4817,7 +4817,7 @@ static int parse(void)
|
||||||
|
|
||||||
case CON_GLOBALSOUND:
|
case CON_GLOBALSOUND:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_GLOBALSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_GLOBALSOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
||||||
if (g_p == screenpeek || (gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND))
|
if (g_p == screenpeek || (gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND))
|
||||||
spritesound((short) *insptr,g_player[screenpeek].ps->i);
|
spritesound((short) *insptr,g_player[screenpeek].ps->i);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
@ -4825,7 +4825,7 @@ static int parse(void)
|
||||||
|
|
||||||
case CON_SOUND:
|
case CON_SOUND:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
if (*insptr<0 || *insptr>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUND: Invalid sound %d\n",line_num,*insptr);insptr++;break;}
|
||||||
spritesound((short) *insptr++,g_i);
|
spritesound((short) *insptr++,g_i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5174,8 +5174,8 @@ static int parse(void)
|
||||||
|
|
||||||
if (lVar1<0 || lVar1>=MAXSPRITES) {OSD_Printf(CON_ERROR "CON_CANSEESPR: Invalid sprite %d\n",line_num,lVar1);res=0;}
|
if (lVar1<0 || lVar1>=MAXSPRITES) {OSD_Printf(CON_ERROR "CON_CANSEESPR: Invalid sprite %d\n",line_num,lVar1);res=0;}
|
||||||
if (lVar1<0 || lVar1>=MAXSPRITES) {OSD_Printf(CON_ERROR "CON_CANSEESPR: Invalid sprite %d\n",line_num,lVar1);res=0;}
|
if (lVar1<0 || lVar1>=MAXSPRITES) {OSD_Printf(CON_ERROR "CON_CANSEESPR: Invalid sprite %d\n",line_num,lVar1);res=0;}
|
||||||
else res=cansee(sprite[lVar1].x,sprite[lVar1].y,sprite[lVar1].z,sprite[lVar1].sectnum,
|
else res=cansee(sprite[lVar1].x,sprite[lVar1].y,sprite[lVar1].z,sprite[lVar1].sectnum,
|
||||||
sprite[lVar2].x,sprite[lVar2].y,sprite[lVar2].z,sprite[lVar2].sectnum);
|
sprite[lVar2].x,sprite[lVar2].y,sprite[lVar2].z,sprite[lVar2].sectnum);
|
||||||
|
|
||||||
SetGameVarID(*insptr++, res, g_i, g_p);
|
SetGameVarID(*insptr++, res, g_i, g_p);
|
||||||
break;
|
break;
|
||||||
|
@ -5215,7 +5215,7 @@ static int parse(void)
|
||||||
j=GetGameVarID(*insptr++, g_i, g_p);
|
j=GetGameVarID(*insptr++, g_i, g_p);
|
||||||
if (fta_quotes[j] == NULL)
|
if (fta_quotes[j] == NULL)
|
||||||
{
|
{
|
||||||
OSD_Printf(CON_ERROR "CON_QSTRLEN: null quote %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_QSTRLEN: null quote %d\n",line_num,j);
|
||||||
SetGameVarID(i,-1,g_i,g_p);
|
SetGameVarID(i,-1,g_i,g_p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5238,38 +5238,38 @@ static int parse(void)
|
||||||
case CON_HEADSPRITESTAT:
|
case CON_HEADSPRITESTAT:
|
||||||
if (j >= 0 && j < MAXSTATUS+1)
|
if (j >= 0 && j < MAXSTATUS+1)
|
||||||
SetGameVarID(i,headspritestat[j],g_i,g_p);
|
SetGameVarID(i,headspritestat[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_HEADSPRITESTAT: invalid state %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_HEADSPRITESTAT: invalid state %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
case CON_PREVSPRITESTAT:
|
case CON_PREVSPRITESTAT:
|
||||||
if (j >= 0 && j < MAXSPRITES)
|
if (j >= 0 && j < MAXSPRITES)
|
||||||
SetGameVarID(i,prevspritestat[j],g_i,g_p);
|
SetGameVarID(i,prevspritestat[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_PREVSPRITESTAT: invalid sprite ID %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_PREVSPRITESTAT: invalid sprite ID %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
case CON_NEXTSPRITESTAT:
|
case CON_NEXTSPRITESTAT:
|
||||||
if (j >= 0 && j < MAXSPRITES)
|
if (j >= 0 && j < MAXSPRITES)
|
||||||
SetGameVarID(i,nextspritestat[j],g_i,g_p);
|
SetGameVarID(i,nextspritestat[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_NEXTSPRITESTAT: invalid sprite ID %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_NEXTSPRITESTAT: invalid sprite ID %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
case CON_HEADSPRITESECT:
|
case CON_HEADSPRITESECT:
|
||||||
if (j >= 0 && j < MAXSECTORS+1)
|
if (j >= 0 && j < MAXSECTORS+1)
|
||||||
SetGameVarID(i,headspritesect[j],g_i,g_p);
|
SetGameVarID(i,headspritesect[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_HEADSPRITESECT: invalid state %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_HEADSPRITESECT: invalid state %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
case CON_PREVSPRITESECT:
|
case CON_PREVSPRITESECT:
|
||||||
if (j >= 0 && j < MAXSPRITES)
|
if (j >= 0 && j < MAXSPRITES)
|
||||||
SetGameVarID(i,prevspritesect[j],g_i,g_p);
|
SetGameVarID(i,prevspritesect[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_PREVSPRITESECT: invalid sprite ID %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_PREVSPRITESECT: invalid sprite ID %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
case CON_NEXTSPRITESECT:
|
case CON_NEXTSPRITESECT:
|
||||||
if (j >= 0 || j < MAXSPRITES)
|
if (j >= 0 || j < MAXSPRITES)
|
||||||
SetGameVarID(i,nextspritesect[j],g_i,g_p);
|
SetGameVarID(i,nextspritesect[j],g_i,g_p);
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_NEXTSPRITESECT: invalid sprite ID %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_NEXTSPRITESECT: invalid sprite ID %d\n",line_num,j);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -5281,15 +5281,15 @@ static int parse(void)
|
||||||
int i = GetGameVarID(*insptr++, g_i, g_p),
|
int i = GetGameVarID(*insptr++, g_i, g_p),
|
||||||
f=GetGameVarID(*insptr++, g_i, g_p);
|
f=GetGameVarID(*insptr++, g_i, g_p);
|
||||||
j=GetGameVarID(*insptr++, g_i, g_p);
|
j=GetGameVarID(*insptr++, g_i, g_p);
|
||||||
if (i<0 || i>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_GETKEYNAME: invalid quote ID %d\n",line_num,i);else
|
if (i<0 || i>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_GETKEYNAME: invalid quote ID %d\n",line_num,i);else
|
||||||
if (fta_quotes[i] == NULL) OSD_Printf(CON_ERROR "CON_GETKEYNAME: null quote %d\n",line_num,i);else
|
if (fta_quotes[i] == NULL) OSD_Printf(CON_ERROR "CON_GETKEYNAME: null quote %d\n",line_num,i);else
|
||||||
if (f<0 || f>=NUMGAMEFUNCTIONS) OSD_Printf(CON_ERROR "CON_GETKEYNAME: invalid finction %d\n",line_num,f);else
|
if (f<0 || f>=NUMGAMEFUNCTIONS) OSD_Printf(CON_ERROR "CON_GETKEYNAME: invalid finction %d\n",line_num,f);else
|
||||||
{
|
{
|
||||||
if (j<2)
|
if (j<2)
|
||||||
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][j]));
|
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][j]));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][0]));
|
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][0]));
|
||||||
if (!*tempbuf)
|
if (!*tempbuf)
|
||||||
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][1]));
|
Bstrcpy(tempbuf,KB_ScanCodeToString(ud.config.KeyboardKeys[f][1]));
|
||||||
}
|
}
|
||||||
|
@ -5310,29 +5310,29 @@ static int parse(void)
|
||||||
st = GetGameVarID(*insptr++, g_i, g_p);
|
st = GetGameVarID(*insptr++, g_i, g_p);
|
||||||
ln = GetGameVarID(*insptr++, g_i, g_p);
|
ln = GetGameVarID(*insptr++, g_i, g_p);
|
||||||
|
|
||||||
if (q1<0 || q1>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_QSUBSTR: invalid quote ID %d\n",line_num,q1);else
|
if (q1<0 || q1>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_QSUBSTR: invalid quote ID %d\n",line_num,q1);else
|
||||||
if (fta_quotes[q1] != NULL) OSD_Printf(CON_ERROR "CON_QSUBSTR: null quote %d\n",line_num,q1);else
|
if (fta_quotes[q1] != NULL) OSD_Printf(CON_ERROR "CON_QSUBSTR: null quote %d\n",line_num,q1);else
|
||||||
if (q2<0 || q2>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_QSUBSTR: invalid quote ID %d\n",line_num,q2);else
|
if (q2<0 || q2>=MAXQUOTES) OSD_Printf(CON_ERROR "CON_QSUBSTR: invalid quote ID %d\n",line_num,q2);else
|
||||||
if (fta_quotes[q2] != NULL) OSD_Printf(CON_ERROR "CON_QSUBSTR: null quote %d\n",line_num,q2);else
|
if (fta_quotes[q2] != NULL) OSD_Printf(CON_ERROR "CON_QSUBSTR: null quote %d\n",line_num,q2);else
|
||||||
{
|
{
|
||||||
s1=fta_quotes[q1];
|
s1=fta_quotes[q1];
|
||||||
s2=fta_quotes[q2];
|
s2=fta_quotes[q2];
|
||||||
while (*s2&&st--)s2++;
|
while (*s2&&st--)s2++;
|
||||||
while ((*s1=*s2)&&ln--) {s1++;s2++;}
|
while ((*s1=*s2)&&ln--) {s1++;s2++;}
|
||||||
*s1=0;
|
*s1=0;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case CON_GETPNAME:
|
case CON_GETPNAME:
|
||||||
case CON_QSTRCAT:
|
case CON_QSTRCAT:
|
||||||
case CON_QSTRCPY:
|
case CON_QSTRCPY:
|
||||||
case CON_QGETSYSSTR:
|
case CON_QGETSYSSTR:
|
||||||
case CON_CHANGESPRITESTAT:
|
case CON_CHANGESPRITESTAT:
|
||||||
case CON_CHANGESPRITESECT:
|
case CON_CHANGESPRITESECT:
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
int i = GetGameVarID(*insptr++, g_i, g_p), j;
|
int i = GetGameVarID(*insptr++, g_i, g_p), j;
|
||||||
if (tw == CON_GETPNAME && *insptr == g_iThisActorID)
|
if (tw == CON_GETPNAME && *insptr == g_iThisActorID)
|
||||||
{
|
{
|
||||||
j = g_p;
|
j = g_p;
|
||||||
|
@ -5550,7 +5550,7 @@ static int parse(void)
|
||||||
{
|
{
|
||||||
int wallnum = GetGameVarID(*insptr++, g_i, g_p), newx = GetGameVarID(*insptr++, g_i, g_p), newy = GetGameVarID(*insptr++, g_i, g_p);
|
int wallnum = GetGameVarID(*insptr++, g_i, g_p), newx = GetGameVarID(*insptr++, g_i, g_p), newy = GetGameVarID(*insptr++, g_i, g_p);
|
||||||
|
|
||||||
if (wallnum<0 || wallnum>=numwalls) {OSD_Printf(CON_ERROR "CON_DRAGPOINT: Invalid wall %d\n",line_num,wallnum);break;}
|
if (wallnum<0 || wallnum>=numwalls) {OSD_Printf(CON_ERROR "CON_DRAGPOINT: Invalid wall %d\n",line_num,wallnum);break;}
|
||||||
dragpoint(wallnum,newx,newy);
|
dragpoint(wallnum,newx,newy);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5730,21 +5730,21 @@ static int parse(void)
|
||||||
switch (tw)
|
switch (tw)
|
||||||
{
|
{
|
||||||
case CON_SOUNDONCEVAR:
|
case CON_SOUNDONCEVAR:
|
||||||
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDONCEVAR: Invalid sound %d\n",line_num,j);break;}
|
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDONCEVAR: Invalid sound %d\n",line_num,j);break;}
|
||||||
if (!isspritemakingsound(g_i,j))
|
if (!isspritemakingsound(g_i,j))
|
||||||
spritesound((short)j,g_i);
|
spritesound((short)j,g_i);
|
||||||
break;
|
break;
|
||||||
case CON_GLOBALSOUNDVAR:
|
case CON_GLOBALSOUNDVAR:
|
||||||
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_GLOBALSOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_GLOBALSOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
||||||
spritesound((short)j,g_player[screenpeek].ps->i);
|
spritesound((short)j,g_player[screenpeek].ps->i);
|
||||||
break;
|
break;
|
||||||
case CON_STOPSOUNDVAR:
|
case CON_STOPSOUNDVAR:
|
||||||
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_STOPSOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_STOPSOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
||||||
if (isspritemakingsound(g_i,j))
|
if (isspritemakingsound(g_i,j))
|
||||||
stopspritesound((short)j,g_i);
|
stopspritesound((short)j,g_i);
|
||||||
break;
|
break;
|
||||||
case CON_SOUNDVAR:
|
case CON_SOUNDVAR:
|
||||||
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
if (j<0 || j>=MAXSOUNDS) {OSD_Printf(CON_ERROR "CON_SOUNDVAR: Invalid sound %d\n",line_num,j);break;}
|
||||||
spritesound((short)j,g_i);
|
spritesound((short)j,g_i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5985,12 +5985,12 @@ static int parse(void)
|
||||||
int sect1=GetGameVarID(*insptr++,g_i,g_p);
|
int sect1=GetGameVarID(*insptr++,g_i,g_p);
|
||||||
int x2=GetGameVarID(*insptr++,g_i,g_p), y2=GetGameVarID(*insptr++,g_i,g_p), z2=GetGameVarID(*insptr++,g_i,g_p);
|
int x2=GetGameVarID(*insptr++,g_i,g_p), y2=GetGameVarID(*insptr++,g_i,g_p), z2=GetGameVarID(*insptr++,g_i,g_p);
|
||||||
int sect2=GetGameVarID(*insptr++,g_i,g_p), rvar=*insptr++;
|
int sect2=GetGameVarID(*insptr++,g_i,g_p), rvar=*insptr++;
|
||||||
|
|
||||||
if (sect1<0 || sect1>=numsectors || sect2<0 || sect2>=numsectors)
|
if (sect1<0 || sect1>=numsectors || sect2<0 || sect2>=numsectors)
|
||||||
{
|
{
|
||||||
OSD_Printf(CON_ERROR "CON_CANSEE: Invalid sector\n",line_num);
|
OSD_Printf(CON_ERROR "CON_CANSEE: Invalid sector\n",line_num);
|
||||||
SetGameVarID(rvar, 0, g_i, g_p);
|
SetGameVarID(rvar, 0, g_i, g_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetGameVarID(rvar, cansee(x1,y1,z1,sect1,x2,y2,z2,sect2), g_i, g_p);
|
SetGameVarID(rvar, cansee(x1,y1,z1,sect1,x2,y2,z2,sect2), g_i, g_p);
|
||||||
break;
|
break;
|
||||||
|
@ -6061,12 +6061,12 @@ static int parse(void)
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
int sectnum = GetGameVarID(*insptr++,g_i,g_p), x = GetGameVarID(*insptr++,g_i,g_p), y = GetGameVarID(*insptr++,g_i,g_p);
|
int sectnum = GetGameVarID(*insptr++,g_i,g_p), x = GetGameVarID(*insptr++,g_i,g_p), y = GetGameVarID(*insptr++,g_i,g_p);
|
||||||
if (sectnum<0 || sectnum>=numsectors)
|
if (sectnum<0 || sectnum>=numsectors)
|
||||||
{
|
{
|
||||||
OSD_Printf(CON_ERROR "CON_GETCEILZOFSLOPE/CON_SETCEILZOFSLOPE: Invalid sector %d\n",line_num,sectnum);
|
OSD_Printf(CON_ERROR "CON_GETCEILZOFSLOPE/CON_SETCEILZOFSLOPE: Invalid sector %d\n",line_num,sectnum);
|
||||||
insptr++;
|
insptr++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tw == CON_GETFLORZOFSLOPE)
|
if (tw == CON_GETFLORZOFSLOPE)
|
||||||
{
|
{
|
||||||
|
@ -6377,9 +6377,9 @@ static int parse(void)
|
||||||
g_player[g_p].ps->inven_icon = 7;
|
g_player[g_p].ps->inven_icon = 7;
|
||||||
g_player[g_p].ps->boot_amount = *insptr;
|
g_player[g_p].ps->boot_amount = *insptr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OSD_Printf(CON_ERROR "CON_ADDINVENTORY: Invalid inventory ID %d\n",line_num,*(insptr-1));
|
OSD_Printf(CON_ERROR "CON_ADDINVENTORY: Invalid inventory ID %d\n",line_num,*(insptr-1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
insptr++;
|
insptr++;
|
||||||
break;
|
break;
|
||||||
|
@ -7074,9 +7074,9 @@ static int parse(void)
|
||||||
checkavailweapon(g_player[j].ps);
|
checkavailweapon(g_player[j].ps);
|
||||||
else checkavailinven(g_player[j].ps);
|
else checkavailinven(g_player[j].ps);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
OSD_Printf(CON_ERROR "CON_CHECKAVAILWEAPON/CON_CHECKAVAILINVEN: Invalid player ID %d\n",line_num,j);
|
OSD_Printf(CON_ERROR "CON_CHECKAVAILWEAPON/CON_CHECKAVAILINVEN: Invalid player ID %d\n",line_num,j);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_GETPLAYERANGLE:
|
case CON_GETPLAYERANGLE:
|
||||||
|
|
|
@ -2552,15 +2552,15 @@ cheat_for_port_credits:
|
||||||
mgametextpal(d,yy, r_animsmoothing && enabled ? "Yes" : "No", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
|
mgametextpal(d,yy, r_animsmoothing && enabled ? "Yes" : "No", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
{
|
{
|
||||||
int ovsync = vsync;
|
int ovsync = vsync;
|
||||||
if (x==io) vsync = !vsync;
|
if (x==io) vsync = !vsync;
|
||||||
modval(0,1,(int *)&vsync,1,probey==io);
|
modval(0,1,(int *)&vsync,1,probey==io);
|
||||||
mgametextpal(d,yy, vsync? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
mgametextpal(d,yy, vsync? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
||||||
if (vsync != ovsync)
|
if (vsync != ovsync)
|
||||||
setvsync(vsync);
|
setvsync(vsync);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2938,15 +2938,15 @@ cheat_for_port_credits:
|
||||||
mgametextpal(d,yy, ud.idplayers ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
mgametextpal(d,yy, ud.idplayers ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
int osdmode = OSD_GetTextMode();
|
int osdmode = OSD_GetTextMode();
|
||||||
if (x==io) osdmode = !osdmode;
|
if (x==io) osdmode = !osdmode;
|
||||||
modval(0,1,(int *)&osdmode,1,probey==io);
|
modval(0,1,(int *)&osdmode,1,probey==io);
|
||||||
mgametextpal(d,yy, osdmode? "Fast" : "Nice", MENUHIGHLIGHT(io), 0);
|
mgametextpal(d,yy, osdmode? "Fast" : "Nice", MENUHIGHLIGHT(io), 0);
|
||||||
if (OSD_GetTextMode() != osdmode)
|
if (OSD_GetTextMode() != osdmode)
|
||||||
OSD_SetTextMode(osdmode);
|
OSD_SetTextMode(osdmode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
if (x==io) ud.config.ForceSetup = 1-ud.config.ForceSetup;
|
if (x==io) ud.config.ForceSetup = 1-ud.config.ForceSetup;
|
||||||
modval(0,1,(int *)&ud.config.ForceSetup,1,probey==io);
|
modval(0,1,(int *)&ud.config.ForceSetup,1,probey==io);
|
||||||
|
|
|
@ -6,12 +6,14 @@
|
||||||
void GAME_drawosdchar(int x, int y, char ch, int shade, int pal)
|
void GAME_drawosdchar(int x, int y, char ch, int shade, int pal)
|
||||||
{
|
{
|
||||||
short ac;
|
short ac;
|
||||||
|
int ht = usehightile;
|
||||||
|
|
||||||
if (ch == 32) return;
|
if (ch == 32) return;
|
||||||
ac = ch-'!'+STARTALPHANUM;
|
ac = ch-'!'+STARTALPHANUM;
|
||||||
if (ac < STARTALPHANUM || ac > ENDALPHANUM) return;
|
if (ac < STARTALPHANUM || ac > ENDALPHANUM) return;
|
||||||
|
usehightile = 0;
|
||||||
rotatesprite(((x<<3)+x)<<16, (y<<3)<<16, 65536l, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1);
|
rotatesprite(((x<<3)+x)<<16, (y<<3)<<16, 65536l, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1);
|
||||||
|
usehightile = ht;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
||||||
|
@ -19,6 +21,9 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
||||||
short ac;
|
short ac;
|
||||||
char *ptr = OSD_GetTextPtr();
|
char *ptr = OSD_GetTextPtr();
|
||||||
char *fmt = OSD_GetFmtPtr();
|
char *fmt = OSD_GetFmtPtr();
|
||||||
|
int ht = usehightile;
|
||||||
|
|
||||||
|
usehightile = 0;
|
||||||
|
|
||||||
for (x = (x<<3)+x; len>0; len--, ch++, x++)
|
for (x = (x<<3)+x; len>0; len--, ch++, x++)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +33,7 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ac = *ch-'!'+STARTALPHANUM;
|
ac = *ch-'!'+STARTALPHANUM;
|
||||||
if (ac < STARTALPHANUM || ac > ENDALPHANUM) return;
|
if (ac < STARTALPHANUM || ac > ENDALPHANUM) { usehightile = ht; return; }
|
||||||
|
|
||||||
// use the format byte if the text falls within the bounds of the console buffer
|
// use the format byte if the text falls within the bounds of the console buffer
|
||||||
if (ch > ptr && ch < (ptr + TEXTSIZE))
|
if (ch > ptr && ch < (ptr + TEXTSIZE))
|
||||||
|
@ -41,6 +46,7 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
||||||
pal, 8|16, 0, 0, xdim-1, ydim-1);
|
pal, 8|16, 0, 0, xdim-1, ydim-1);
|
||||||
x += OSDCHAR_WIDTH;
|
x += OSDCHAR_WIDTH;
|
||||||
}
|
}
|
||||||
|
usehightile = ht;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GAME_drawosdcursor(int x, int y, int type, int lastkeypress)
|
void GAME_drawosdcursor(int x, int y, int type, int lastkeypress)
|
||||||
|
|
Loading…
Reference in a new issue