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 short int moustat;
extern short int global_random;
extern int scaredfallz;
extern char buf[1024]; //My own generic input buffer
#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))
{
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))
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)
{
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;
}
@ -2487,11 +2487,19 @@ static void operatefta(void)
gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1+32);
}
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;
}
@ -2508,7 +2516,10 @@ void FTA(int q,player_struct *p)
{
if (p->ftq != q)
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;
pub = NUMPAGES;
@ -5342,7 +5353,7 @@ int spawn(int j, int pn)
if (sp->hitag && sp->picnum == WATERBUBBLEMAKER)
{
// 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);
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);
return(1);
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;
kclose(recfilep);
return 0;
@ -11035,7 +11046,7 @@ RECHECK:
l = min(ud.reccnt,RECSYNCBUFSIZ);
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;
ud.reccnt = 0;
kclose(recfilep);

View File

@ -878,7 +878,7 @@ static void DoThisProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
if (proj < 0 || proj >= MAXSPRITES)
{
// 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,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
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)
{
// 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",
iSet?"set":"get",actorlabels[lLabelID].name,iPlayer,g_i,
OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoPlayer(): tried to %s %s on invalid target player (%d) %d from %s\n",
iSet?"set":"get",playerlabels[lLabelID].name,iPlayer,g_i,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
insptr += (lVar2 == MAXGAMEVARS);
return;
@ -2506,7 +2506,7 @@ static void DoInput(int iSet, int lVar1, int lLabelID, int lVar2)
if (iPlayer<0 || iPlayer >= ud.multimode)
{
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;
}
@ -2988,7 +2988,7 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
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,
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
insptr += (lVar2 == MAXGAMEVARS);
@ -3466,7 +3466,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2)
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);
return;
}
@ -3607,7 +3607,7 @@ static void DoProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
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);
return;
}
@ -3878,7 +3878,7 @@ void OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
{
if (iEventID >= MAXGAMEEVENTS)
{
OSD_Printf(OSDTEXT_DARKRED "OnEvent(): invalid event ID");
OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "OnEvent(): invalid event ID");
return;
}
@ -4471,7 +4471,7 @@ static int parse(void)
int q = *insptr++, i = *insptr++;
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;
}
Bstrcpy(fta_quotes[q],redefined_quotes[i]);
@ -5293,7 +5293,7 @@ static int parse(void)
Bstrcpy(fta_quotes[i],g_player[j].user_name);
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;
case CON_QGETSYSSTR:
if (fta_quotes[i] != NULL)
@ -5315,19 +5315,19 @@ static int parse(void)
Bstrcpy(fta_quotes[i],gametype_names[ud.coop]);
break;
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;
case CON_QSTRCAT:
if (fta_quotes[i] != NULL && fta_quotes[j] != NULL)
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;
case CON_QSTRCPY:
if (fta_quotes[i] != NULL && fta_quotes[j] != NULL)
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;
case CON_CHANGESPRITESTAT:
changespritestat(i,j);
@ -5347,13 +5347,13 @@ static int parse(void)
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;
}
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;
}
@ -5512,7 +5512,7 @@ static int parse(void)
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);
break;
@ -5849,7 +5849,7 @@ static int parse(void)
int z=65536;
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;
}
if (tw == CON_GAMETEXTZ)z=GetGameVarID(*insptr++,g_i,g_p);
@ -5863,7 +5863,7 @@ static int parse(void)
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;
}
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);
break;
}
if (fta_quotes[sq] == NULL) OSD_Printf(OSDTEXT_DARKRED "%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[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 OSDTEXT_BRIGHT "%s %d null quote %d\n",__FILE__,__LINE__,dq);
insptr += 4;
break;
}
@ -6576,7 +6576,7 @@ static int parse(void)
}
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;
}
}
@ -6589,7 +6589,7 @@ static int parse(void)
{
// invalid varID
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
}
}
@ -7475,19 +7475,19 @@ static int parse(void)
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++;
break;
}
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++;
break;
}
FTA(*insptr++,g_player[g_p].ps);
FTA(*(insptr++)|MAXQUOTES,g_player[g_p].ps);
break;
case CON_USERQUOTE:
@ -7497,7 +7497,7 @@ static int parse(void)
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;
}
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");
if ((index < aGameArrays[id].size)&&(index>=0))
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;
}
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;
}
@ -681,7 +681,7 @@ void SetGameArrayID(int id,int index, int lValue)
{
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;
}
aGameArrays[id].plValues[index]=lValue;
@ -691,7 +691,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
{
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;
}
//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)
{
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;
}
// for the current player
@ -712,7 +712,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
{
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;
}
// for the current actor
@ -774,7 +774,7 @@ static intptr_t *GetGameValuePtr(const char *szGameLabel)
{
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;
}

View File

@ -250,7 +250,7 @@ int loadsound(unsigned int num)
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;
}