git-svn-id: https://svn.eduke32.com/eduke32@868 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-07-19 04:13:53 +00:00
parent f98227d6f3
commit f7b4de8e6d
5 changed files with 55 additions and 45 deletions

View file

@ -525,7 +525,6 @@ extern short spriteq[1024],spriteqloc,spriteqamount;
extern user_defs ud; extern user_defs ud;
extern short int moustat; extern short int moustat;
extern short int global_random; extern short int global_random;
extern int scaredfallz;
extern char buf[1024]; //My own generic input buffer extern char buf[1024]; //My own generic input buffer
#define MAXQUOTELEN 128 #define MAXQUOTELEN 128

View file

@ -517,7 +517,7 @@ void getpackets(void)
{ {
if (setgamemode(!ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP)) if (setgamemode(!ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP))
{ {
OSD_Printf(OSDTEXT_DARKRED "Failed setting fullscreen video mode.\n"); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "Failed setting fullscreen video mode.\n");
if (setgamemode(ud.config.ScreenMode, ud.config.ScreenWidth, ud.config.ScreenHeight, ud.config.ScreenBPP)) if (setgamemode(ud.config.ScreenMode, ud.config.ScreenWidth, ud.config.ScreenHeight, ud.config.ScreenBPP))
gameexit("Failed to recover from failure to set fullscreen video mode.\n"); gameexit("Failed to recover from failure to set fullscreen video mode.\n");
} }
@ -2456,7 +2456,7 @@ static void operatefta(void)
if (fta_quotes[g_player[screenpeek].ps->ftq] == NULL) if (fta_quotes[g_player[screenpeek].ps->ftq] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,g_player[screenpeek].ps->ftq); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,g_player[screenpeek].ps->ftq);
return; return;
} }
@ -2489,9 +2489,17 @@ static void operatefta(void)
void FTA(int q, player_struct *p) void FTA(int q, player_struct *p)
{ {
if (fta_quotes[p->ftq] == NULL) int cq = 0;
if (q & MAXQUOTES)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,p->ftq); cq = 1;
q &= ~MAXQUOTES;
}
if (fta_quotes[q] == NULL)
{
OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,q);
return; return;
} }
@ -2508,7 +2516,10 @@ void FTA(int q,player_struct *p)
{ {
if (p->ftq != q) if (p->ftq != q)
if (p == g_player[screenpeek].ps) if (p == g_player[screenpeek].ps)
OSD_Printf(OSDTEXT_BLUE "%s\n",stripcolorcodes(fta_quotes[q])); {
if (cq) OSD_Printf(OSDTEXT_BLUE OSDTEXT_BRIGHT "%s\n",stripcolorcodes(fta_quotes[q]));
else OSD_Printf("%s\n",stripcolorcodes(fta_quotes[q]));
}
p->ftq = q; p->ftq = q;
pub = NUMPAGES; pub = NUMPAGES;
@ -5342,7 +5353,7 @@ int spawn(int j, int pn)
if (sp->hitag && sp->picnum == WATERBUBBLEMAKER) if (sp->hitag && sp->picnum == WATERBUBBLEMAKER)
{ {
// JBF 20030913: Pisses off move(), eg. in bobsp2 // JBF 20030913: Pisses off move(), eg. in bobsp2
OSD_Printf(OSDTEXT_DARKRED "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n", OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n",
i,sp->x,sp->y); i,sp->x,sp->y);
sp->hitag = 0; sp->hitag = 0;
} }
@ -10882,7 +10893,7 @@ static int opendemoread(int which_demo) // 0 = mine
newgame(ud.volume_number,ud.level_number,ud.player_skill); newgame(ud.volume_number,ud.level_number,ud.player_skill);
return(1); return(1);
corrupt: corrupt:
OSD_Printf(OSDTEXT_DARKRED "Demo %d header is corrupt.\n",which_demo); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "Demo %d header is corrupt.\n",which_demo);
ud.reccnt = 0; ud.reccnt = 0;
kclose(recfilep); kclose(recfilep);
return 0; return 0;
@ -11035,7 +11046,7 @@ RECHECK:
l = min(ud.reccnt,RECSYNCBUFSIZ); l = min(ud.reccnt,RECSYNCBUFSIZ);
if (kdfread(recsync,sizeof(input)*ud.multimode,l/ud.multimode,recfilep) != l/ud.multimode) if (kdfread(recsync,sizeof(input)*ud.multimode,l/ud.multimode,recfilep) != l/ud.multimode)
{ {
OSD_Printf(OSDTEXT_DARKRED "Demo %d is corrupt.\n", which_demo-1); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "Demo %d is corrupt.\n", which_demo-1);
foundemo = 0; foundemo = 0;
ud.reccnt = 0; ud.reccnt = 0;
kclose(recfilep); kclose(recfilep);

View file

@ -878,7 +878,7 @@ static void DoThisProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
if (proj < 0 || proj >= MAXSPRITES) if (proj < 0 || proj >= MAXSPRITES)
{ {
// OSD_Printf("DoThisProjectile(): invalid projectile (%d)\n",proj); // OSD_Printf("DoThisProjectile(): invalid projectile (%d)\n",proj);
OSD_Printf(OSDTEXT_DARKRED "DoThisProjectile(): tried to %s %s on invalid target projectile (%d) %d %d from %s\n", OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoThisProjectile(): tried to %s %s on invalid target projectile (%d) %d %d from %s\n",
iSet?"set":"get",projectilelabels[lLabelID].name,proj,g_i,g_sp->picnum, iSet?"set":"get",projectilelabels[lLabelID].name,proj,g_i,g_sp->picnum,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended"); (lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
@ -1159,8 +1159,8 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
if (iPlayer<0 || iPlayer >= ud.multimode) if (iPlayer<0 || iPlayer >= ud.multimode)
{ {
// OSD_Printf("DoPlayer(): invalid target player (%d) %d\n",iPlayer,g_i); // OSD_Printf("DoPlayer(): invalid target player (%d) %d\n",iPlayer,g_i);
OSD_Printf(OSDTEXT_DARKRED "DoPlayer(): tried to %s %s on invalid target player (%d) %d from %s\n", OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoPlayer(): tried to %s %s on invalid target player (%d) %d from %s\n",
iSet?"set":"get",actorlabels[lLabelID].name,iPlayer,g_i, iSet?"set":"get",playerlabels[lLabelID].name,iPlayer,g_i,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended"); (lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
return; return;
@ -2506,7 +2506,7 @@ static void DoInput(int iSet, int lVar1, int lLabelID, int lVar2)
if (iPlayer<0 || iPlayer >= ud.multimode) if (iPlayer<0 || iPlayer >= ud.multimode)
{ {
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
OSD_Printf(OSDTEXT_DARKRED "DoInput(): invalid target player (%d) %d\n",iPlayer,g_i); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoInput(): invalid target player (%d) %d\n",iPlayer,g_i);
return; return;
} }
@ -2988,7 +2988,7 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
if (iActor < 0 || iActor >= MAXSPRITES) if (iActor < 0 || iActor >= MAXSPRITES)
{ {
OSD_Printf(OSDTEXT_DARKRED "DoActor(): tried to %s %s on invalid target sprite (%d) %d %d from %s\n", OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoActor(): tried to %s %s on invalid target sprite (%d) %d %d from %s\n",
iSet?"set":"get",actorlabels[lLabelID].name,iActor,g_i,g_sp->picnum, iSet?"set":"get",actorlabels[lLabelID].name,iActor,g_i,g_sp->picnum,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended"); (lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
@ -3466,7 +3466,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2)
if (iActor < 0 || iActor >= MAXSPRITES) if (iActor < 0 || iActor >= MAXSPRITES)
{ {
OSD_Printf(OSDTEXT_DARKRED "DoTsprite(): invalid target sprite (%d) %d %d\n",iActor,g_i,g_sp->picnum); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoTsprite(): invalid target sprite (%d) %d %d\n",iActor,g_i,g_sp->picnum);
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
return; return;
} }
@ -3607,7 +3607,7 @@ static void DoProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
if (lVar1 < 0 || lVar1 >= MAXTILES) if (lVar1 < 0 || lVar1 >= MAXTILES)
{ {
OSD_Printf(OSDTEXT_DARKRED "DoProjectile(): invalid tile (%d)\n",lVar1); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoProjectile(): invalid tile (%d)\n",lVar1);
insptr += (lVar2 == MAXGAMEVARS); insptr += (lVar2 == MAXGAMEVARS);
return; return;
} }
@ -3878,7 +3878,7 @@ void OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
{ {
if (iEventID >= MAXGAMEEVENTS) if (iEventID >= MAXGAMEEVENTS)
{ {
OSD_Printf(OSDTEXT_DARKRED "OnEvent(): invalid event ID"); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "OnEvent(): invalid event ID");
return; return;
} }
@ -4471,7 +4471,7 @@ static int parse(void)
int q = *insptr++, i = *insptr++; int q = *insptr++, i = *insptr++;
if (fta_quotes[q] == NULL || redefined_quotes[i] == NULL) if (fta_quotes[q] == NULL || redefined_quotes[i] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d %d\n",__FILE__,__LINE__,q,i); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d %d\n",__FILE__,__LINE__,q,i);
break; break;
} }
Bstrcpy(fta_quotes[q],redefined_quotes[i]); Bstrcpy(fta_quotes[q],redefined_quotes[i]);
@ -5293,7 +5293,7 @@ static int parse(void)
Bstrcpy(fta_quotes[i],g_player[j].user_name); Bstrcpy(fta_quotes[i],g_player[j].user_name);
else Bsprintf(fta_quotes[i],"%d",j); else Bsprintf(fta_quotes[i],"%d",j);
} }
else OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,i); else OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,i);
break; break;
case CON_QGETSYSSTR: case CON_QGETSYSSTR:
if (fta_quotes[i] != NULL) if (fta_quotes[i] != NULL)
@ -5315,19 +5315,19 @@ static int parse(void)
Bstrcpy(fta_quotes[i],gametype_names[ud.coop]); Bstrcpy(fta_quotes[i],gametype_names[ud.coop]);
break; break;
default: default:
OSD_Printf(OSDTEXT_DARKRED "%s %d unknown str ID %d %d\n",__FILE__,__LINE__,i,j); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d unknown str ID %d %d\n",__FILE__,__LINE__,i,j);
} }
else OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j); else OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j);
break; break;
case CON_QSTRCAT: case CON_QSTRCAT:
if (fta_quotes[i] != NULL && fta_quotes[j] != NULL) if (fta_quotes[i] != NULL && fta_quotes[j] != NULL)
Bstrncat(fta_quotes[i],fta_quotes[j],(MAXQUOTELEN-1)-Bstrlen(fta_quotes[i])); Bstrncat(fta_quotes[i],fta_quotes[j],(MAXQUOTELEN-1)-Bstrlen(fta_quotes[i]));
else OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j); else OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j);
break; break;
case CON_QSTRCPY: case CON_QSTRCPY:
if (fta_quotes[i] != NULL && fta_quotes[j] != NULL) if (fta_quotes[i] != NULL && fta_quotes[j] != NULL)
Bstrcpy(fta_quotes[i],fta_quotes[j]); Bstrcpy(fta_quotes[i],fta_quotes[j]);
else OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j); else OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d %d\n",__FILE__,__LINE__,i,j);
break; break;
case CON_CHANGESPRITESTAT: case CON_CHANGESPRITESTAT:
changespritestat(i,j); changespritestat(i,j);
@ -5347,13 +5347,13 @@ static int parse(void)
if (volnume > MAXVOLUMES-1 || volnume < 0) if (volnume > MAXVOLUMES-1 || volnume < 0)
{ {
OSD_Printf(OSDTEXT_DARKRED "CON_STARTLEVEL: invalid volume (%d)\n",volnume); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CON_STARTLEVEL: invalid volume (%d)\n",volnume);
break; break;
} }
if (levnume > MAXLEVELS-1 || levnume < 0) if (levnume > MAXLEVELS-1 || levnume < 0)
{ {
OSD_Printf(OSDTEXT_DARKRED "CON_STARTLEVEL: invalid level (%d)\n",levnume); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CON_STARTLEVEL: invalid level (%d)\n",levnume);
break; break;
} }
@ -5512,7 +5512,7 @@ static int parse(void)
break; break;
} }
} }
else OSD_Printf(OSDTEXT_DARKRED "CON_DIST/CON_LDIST: error: invalid sprite\n"); else OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CON_DIST/CON_LDIST: error: invalid sprite\n");
SetGameVarID(distvar, distx, g_i, g_p); SetGameVarID(distvar, distx, g_i, g_p);
break; break;
@ -5849,7 +5849,7 @@ static int parse(void)
int z=65536; int z=65536;
if (fta_quotes[q] == NULL) if (fta_quotes[q] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,q); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,q);
break; break;
} }
if (tw == CON_GAMETEXTZ)z=GetGameVarID(*insptr++,g_i,g_p); if (tw == CON_GAMETEXTZ)z=GetGameVarID(*insptr++,g_i,g_p);
@ -5863,7 +5863,7 @@ static int parse(void)
if (fta_quotes[q] == NULL) if (fta_quotes[q] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,q); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,q);
break; break;
} }
minitextshade(x,y,fta_quotes[q],shade,pal,26); minitextshade(x,y,fta_quotes[q],shade,pal,26);
@ -6529,8 +6529,8 @@ static int parse(void)
Bsprintf(fta_quotes[dq],tempbuf,var1,var2,var3,var4); Bsprintf(fta_quotes[dq],tempbuf,var1,var2,var3,var4);
break; break;
} }
if (fta_quotes[sq] == NULL) OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,sq); if (fta_quotes[sq] == NULL) OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,sq);
if (fta_quotes[dq] == NULL) OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,dq); if (fta_quotes[dq] == NULL) OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,dq);
insptr += 4; insptr += 4;
break; break;
} }
@ -6576,7 +6576,7 @@ static int parse(void)
} }
else else
{ {
OSD_Printf(OSDTEXT_DARKRED "CONLOGVAR: L=%d INVALID ARRAY INDEX\n",l); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CONLOGVAR: L=%d INVALID ARRAY INDEX\n",l);
break; break;
} }
} }
@ -6589,7 +6589,7 @@ static int parse(void)
{ {
// invalid varID // invalid varID
insptr++; insptr++;
OSD_Printf(OSDTEXT_DARKRED "CONLOGVAR: L=%d INVALID VARIABLE\n",l); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CONLOGVAR: L=%d INVALID VARIABLE\n",l);
break; // out of switch break; // out of switch
} }
} }
@ -7475,19 +7475,19 @@ static int parse(void)
if (fta_quotes[*insptr] == NULL) if (fta_quotes[*insptr] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,*insptr); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
insptr++; insptr++;
break; break;
} }
if (g_p < 0 || g_p >= MAXPLAYERS) if (g_p < 0 || g_p >= MAXPLAYERS)
{ {
OSD_Printf(OSDTEXT_DARKRED "CON_QUOTE: bad player for quote %d: (%d)\n",*insptr,g_p); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "CON_QUOTE: bad player for quote %d: (%d)\n",*insptr,g_p);
insptr++; insptr++;
break; break;
} }
FTA(*insptr++,g_player[g_p].ps); FTA(*(insptr++)|MAXQUOTES,g_player[g_p].ps);
break; break;
case CON_USERQUOTE: case CON_USERQUOTE:
@ -7497,7 +7497,7 @@ static int parse(void)
if (fta_quotes[i] == NULL) if (fta_quotes[i] == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "%s %d null quote %d\n",__FILE__,__LINE__,i); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,i);
break; break;
} }
adduserquote(fta_quotes[i]); adduserquote(fta_quotes[i]);

View file

@ -621,13 +621,13 @@ int GetGameVarID(int id, int iActor, int iPlayer)
// OSD_Printf("GetGameVarID(): reading from array\n"); // OSD_Printf("GetGameVarID(): reading from array\n");
if ((index < aGameArrays[id].size)&&(index>=0)) if ((index < aGameArrays[id].size)&&(index>=0))
return(m * aGameArrays[id].plValues[index]); return(m * aGameArrays[id].plValues[index]);
OSD_Printf(OSDTEXT_DARKRED "GetGameVarID(): invalid array index (%s[%d])\n",aGameArrays[id].szLabel,index); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "GetGameVarID(): invalid array index (%s[%d])\n",aGameArrays[id].szLabel,index);
return -1; return -1;
} }
if (!(id&(MAXGAMEVARS<<1))) if (!(id&(MAXGAMEVARS<<1)))
{ {
OSD_Printf(OSDTEXT_DARKRED "GetGameVarID(): invalid gamevar ID (%d)\n",id); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "GetGameVarID(): invalid gamevar ID (%d)\n",id);
return -1; return -1;
} }
@ -681,7 +681,7 @@ void SetGameArrayID(int id,int index, int lValue)
{ {
if (id<0 || id >= iGameArrayCount || !((index < aGameArrays[id].size)&&(index>=0))) if (id<0 || id >= iGameArrayCount || !((index < aGameArrays[id].size)&&(index>=0)))
{ {
OSD_Printf(OSDTEXT_DARKRED "SetGameVarID(): tried to set invalid array ID (%d) or index out of bounds from sprite %d (%d), player %d\n",id,g_i,sprite[g_i].picnum,g_p); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "SetGameVarID(): tried to set invalid array ID (%d) or index out of bounds from sprite %d (%d), player %d\n",id,g_i,sprite[g_i].picnum,g_p);
return; return;
} }
aGameArrays[id].plValues[index]=lValue; aGameArrays[id].plValues[index]=lValue;
@ -691,7 +691,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
{ {
if (id<0 || id >= iGameVarCount) if (id<0 || id >= iGameVarCount)
{ {
OSD_Printf(OSDTEXT_DARKRED "SetGameVarID(): tried to set invalid gamevar ID (%d) from sprite %d (%d), player %d\n",id,g_i,sprite[g_i].picnum,g_p); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "SetGameVarID(): tried to set invalid gamevar ID (%d) from sprite %d (%d), player %d\n",id,g_i,sprite[g_i].picnum,g_p);
return; return;
} }
//Bsprintf(g_szBuf,"SGVI: %d ('%s') to %d for %d %d",id,aGameVars[id].szLabel,lValue,iActor,iPlayer); //Bsprintf(g_szBuf,"SGVI: %d ('%s') to %d for %d %d",id,aGameVars[id].szLabel,lValue,iActor,iPlayer);
@ -700,7 +700,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
{ {
if (iPlayer < 0 || iPlayer > MAXPLAYERS-1) if (iPlayer < 0 || iPlayer > MAXPLAYERS-1)
{ {
OSD_Printf(OSDTEXT_DARKRED "SetGameVarID(): invalid player (%d) for per-player gamevar %s from sprite %d (%d), player %d\n",iPlayer,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "SetGameVarID(): invalid player (%d) for per-player gamevar %s from sprite %d (%d), player %d\n",iPlayer,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p);
return; return;
} }
// for the current player // for the current player
@ -712,7 +712,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
{ {
if (iActor < 0 || iActor > MAXSPRITES-1) if (iActor < 0 || iActor > MAXSPRITES-1)
{ {
OSD_Printf(OSDTEXT_DARKRED "SetGameVarID(): invalid sprite (%d) for per-actor gamevar %s from sprite %d (%d), player %d\n",iActor,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "SetGameVarID(): invalid sprite (%d) for per-actor gamevar %s from sprite %d (%d), player %d\n",iActor,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p);
return; return;
} }
// for the current actor // for the current actor
@ -774,7 +774,7 @@ static intptr_t *GetGameValuePtr(const char *szGameLabel)
{ {
if (!aGameVars[i].plValues) if (!aGameVars[i].plValues)
{ {
OSD_Printf(OSDTEXT_DARKRED "GetGameValuePtr(): INTERNAL ERROR: NULL array !!!\n"); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "GetGameValuePtr(): INTERNAL ERROR: NULL array !!!\n");
} }
return aGameVars[i].plValues; return aGameVars[i].plValues;
} }

View file

@ -250,7 +250,7 @@ int loadsound(unsigned int num)
if (g_sounds[num].filename == NULL) if (g_sounds[num].filename == NULL)
{ {
OSD_Printf(OSDTEXT_DARKRED "Sound (#%d) not defined!\n",num); OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "Sound (#%d) not defined!\n",num);
return 0; return 0;
} }