Merge branch 'HUDfixes' into 'master'

HUD fixes

See merge request STJr/SRB2Internal!234
This commit is contained in:
Monster Iestyn 2019-06-24 17:47:44 -04:00
commit 88f7ff06d8
3 changed files with 216 additions and 104 deletions

View file

@ -8833,6 +8833,7 @@ struct {
{"V_6WIDTHSPACE",V_6WIDTHSPACE}, {"V_6WIDTHSPACE",V_6WIDTHSPACE},
{"V_OLDSPACING",V_OLDSPACING}, {"V_OLDSPACING",V_OLDSPACING},
{"V_MONOSPACE",V_MONOSPACE}, {"V_MONOSPACE",V_MONOSPACE},
{"V_MAGENTAMAP",V_MAGENTAMAP}, {"V_MAGENTAMAP",V_MAGENTAMAP},
{"V_YELLOWMAP",V_YELLOWMAP}, {"V_YELLOWMAP",V_YELLOWMAP},
{"V_GREENMAP",V_GREENMAP}, {"V_GREENMAP",V_GREENMAP},
@ -8848,6 +8849,7 @@ struct {
{"V_BROWNMAP",V_BROWNMAP}, {"V_BROWNMAP",V_BROWNMAP},
{"V_ROSYMAP",V_ROSYMAP}, {"V_ROSYMAP",V_ROSYMAP},
{"V_INVERTMAP",V_INVERTMAP}, {"V_INVERTMAP",V_INVERTMAP},
{"V_TRANSLUCENT",V_TRANSLUCENT}, {"V_TRANSLUCENT",V_TRANSLUCENT},
{"V_10TRANS",V_10TRANS}, {"V_10TRANS",V_10TRANS},
{"V_20TRANS",V_20TRANS}, {"V_20TRANS",V_20TRANS},

View file

@ -751,40 +751,102 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
cstart = "\x83"; cstart = "\x83";
// Follow palette order at r_draw.c Color_Names // Follow palette order at r_draw.c Color_Names
if (color <= SKINCOLOR_SILVER switch (color)
|| color == SKINCOLOR_AETHER) {
cstart = "\x80"; // White default:
else if (color <= SKINCOLOR_BLACK case SKINCOLOR_WHITE:
|| color == SKINCOLOR_SLATE) case SKINCOLOR_BONE:
cstart = "\x86"; // Grey case SKINCOLOR_CLOUDY:
else if (color <= SKINCOLOR_YOGURT) case SKINCOLOR_GREY:
cstart = "\x85"; // Red case SKINCOLOR_SILVER:
else if (color <= SKINCOLOR_BEIGE) case SKINCOLOR_AETHER:
cstart = "\x86"; // Grey case SKINCOLOR_SLATE:
else if (color <= SKINCOLOR_LAVENDER) cstart = "\x80"; // white
cstart = "\x81"; // Purple break;
else if (color <= SKINCOLOR_PEACHY) case SKINCOLOR_CARBON:
cstart = "\x85"; // Red case SKINCOLOR_JET:
else if (color <= SKINCOLOR_RUST) case SKINCOLOR_BLACK:
cstart = "\x87"; // Orange cstart = "\x86"; // V_GRAYMAP
else if (color == SKINCOLOR_GOLD break;
|| color == SKINCOLOR_YELLOW) case SKINCOLOR_PINK:
cstart = "\x82"; // Yellow case SKINCOLOR_RUBY:
else if (color == SKINCOLOR_SANDY case SKINCOLOR_SALMON:
|| color == SKINCOLOR_OLIVE) case SKINCOLOR_RED:
cstart = "\x81"; // Purple case SKINCOLOR_CRIMSON:
else if (color <= SKINCOLOR_MINT) case SKINCOLOR_FLAME:
cstart = "\x83"; // Green cstart = "\x85"; // V_REDMAP
else if (color <= SKINCOLOR_DUSK) break;
cstart = "\x84"; // Blue case SKINCOLOR_YOGURT:
else if (color == SKINCOLOR_PINK case SKINCOLOR_BROWN:
|| color == SKINCOLOR_PASTEL case SKINCOLOR_TAN:
|| color == SKINCOLOR_BUBBLEGUM case SKINCOLOR_BEIGE:
|| color == SKINCOLOR_MAGENTA case SKINCOLOR_QUAIL:
|| color == SKINCOLOR_ROSY) cstart = "\x8d"; // V_BROWNMAP
cstart = "\x85"; // Red break;
else if (color <= SKINCOLOR_PLUM) case SKINCOLOR_MOSS:
cstart = "\x81"; // Purple case SKINCOLOR_GREEN:
case SKINCOLOR_FOREST:
case SKINCOLOR_EMERALD:
case SKINCOLOR_MINT:
cstart = "\x83"; // V_GREENMAP
break;
case SKINCOLOR_AZURE:
cstart = "\x8c"; // V_AZUREMAP
break;
case SKINCOLOR_LAVENDER:
case SKINCOLOR_PASTEL:
case SKINCOLOR_PURPLE:
cstart = "\x89"; // V_PURPLEMAP
break;
case SKINCOLOR_PEACHY:
case SKINCOLOR_LILAC:
case SKINCOLOR_PLUM:
case SKINCOLOR_ROSY:
cstart = "\x8e"; // V_ROSYMAP
break;
case SKINCOLOR_SUNSET:
case SKINCOLOR_APRICOT:
case SKINCOLOR_ORANGE:
case SKINCOLOR_RUST:
cstart = "\x87"; // V_ORANGEMAP
break;
case SKINCOLOR_GOLD:
case SKINCOLOR_SANDY:
case SKINCOLOR_YELLOW:
case SKINCOLOR_OLIVE:
cstart = "\x82"; // V_YELLOWMAP
break;
case SKINCOLOR_LIME:
case SKINCOLOR_PERIDOT:
cstart = "\x8b"; // V_PERIDOTMAP
break;
case SKINCOLOR_SEAFOAM:
case SKINCOLOR_AQUA:
cstart = "\x8a"; // V_AQUAMAP
break;
case SKINCOLOR_TEAL:
case SKINCOLOR_WAVE:
case SKINCOLOR_CYAN:
case SKINCOLOR_SKY:
case SKINCOLOR_CERULEAN:
case SKINCOLOR_ICY:
case SKINCOLOR_SAPPHIRE:
case SKINCOLOR_VAPOR:
cstart = "\x88"; // V_SKYMAP
break;
case SKINCOLOR_CORNFLOWER:
case SKINCOLOR_BLUE:
case SKINCOLOR_COBALT:
case SKINCOLOR_DUSK:
cstart = "\x84"; // V_BLUEMAP
break;
case SKINCOLOR_BUBBLEGUM:
case SKINCOLOR_MAGENTA:
case SKINCOLOR_NEON:
case SKINCOLOR_VIOLET:
cstart = "\x81"; // V_MAGENTAMAP
break;
}
} }
prefix = cstart; prefix = cstart;
@ -1327,7 +1389,7 @@ static char *CHAT_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
// 30/7/18: chaty is now the distance at which the lowest point of the chat will be drawn if that makes any sense. // 30/7/18: chaty is now the distance at which the lowest point of the chat will be drawn if that makes any sense.
INT16 chatx = 13, chaty = 169; // let's use this as our coordinates, shh INT16 chatx = 13, chaty = 169; // let's use this as our coordinates
// chat stuff by VincyTM LOL XD! // chat stuff by VincyTM LOL XD!
@ -1406,7 +1468,6 @@ static void HU_drawMiniChat(void)
if (splitscreen > 1) if (splitscreen > 1)
y += 16; y += 16;
}*/ }*/
y -= (G_RingSlingerGametype() ? 16 : 0);
dx = 0; dx = 0;
dy = 0; dy = 0;
@ -1502,11 +1563,10 @@ static void HU_drawChatLog(INT32 offset)
if (splitscreen) if (splitscreen)
{ {
y -= BASEVIDHEIGHT/2; y -= BASEVIDHEIGHT/2;
if (splitscreen > 1) //if (splitscreen > 1)
y += 16; //y += 16;
} }
#endif #endif
y -= (G_RingSlingerGametype() ? 16 : 0);
chat_topy = y + chat_scroll*charheight; chat_topy = y + chat_scroll*charheight;
chat_bottomy = chat_topy + boxh*charheight; chat_bottomy = chat_topy + boxh*charheight;
@ -1616,7 +1676,6 @@ static void HU_DrawChat(void)
} }
} }
#endif #endif
y -= (G_RingSlingerGametype() ? 16 : 0);
if (teamtalk) if (teamtalk)
{ {
@ -1709,7 +1768,6 @@ static void HU_DrawChat(void)
p_dispy += 16; p_dispy += 16;
} }
#endif #endif
p_dispy -= (G_RingSlingerGametype() ? 16 : 0);
i = 0; i = 0;
for(i=0; (i<MAXPLAYERS); i++) for(i=0; (i<MAXPLAYERS); i++)
@ -2229,7 +2287,7 @@ void HU_Erase(void)
//====================================================================== //======================================================================
#define supercheckdef ((players[tab[i].num].powers[pw_super] && players[tab[i].num].mo && (players[tab[i].num].mo->state < &states[S_PLAY_SUPER_TRANS1] || players[tab[i].num].mo->state >= &states[S_PLAY_SUPER_TRANS6])) || (players[tab[i].num].powers[pw_carry] == CR_NIGHTSMODE && skins[players[tab[i].num].skin].flags & SF_SUPER)) #define supercheckdef ((players[tab[i].num].powers[pw_super] && players[tab[i].num].mo && (players[tab[i].num].mo->state < &states[S_PLAY_SUPER_TRANS1] || players[tab[i].num].mo->state >= &states[S_PLAY_SUPER_TRANS6])) || (players[tab[i].num].powers[pw_carry] == CR_NIGHTSMODE && skins[players[tab[i].num].skin].flags & SF_SUPER))
#define greycheckdef ((players[tab[i].num].mo && ((players[tab[i].num].rings <= 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres <= 0 && (maptol & TOL_NIGHTS)))) || players[tab[i].num].spectator) #define greycheckdef (players[tab[i].num].spectator || players[tab[i].num].playerstate == PST_DEAD || (G_IsSpecialStage(gamemap) && players[tab[i].num].exiting))
// //
// HU_drawPing // HU_drawPing
@ -2237,7 +2295,7 @@ void HU_Erase(void)
void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext) void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
{ {
UINT8 numbars = 1; // how many ping bars do we draw? UINT8 numbars = 1; // how many ping bars do we draw?
UINT8 barcolor = 128; // color we use for the bars (green, yellow or red) UINT8 barcolor = 35; // color we use for the bars (green, yellow or red)
SINT8 i = 0; SINT8 i = 0;
SINT8 yoffset = 6; SINT8 yoffset = 6;
INT32 dx = x+1 - (V_SmallStringWidth(va("%dms", ping), V_ALLOWLOWERCASE)/2); INT32 dx = x+1 - (V_SmallStringWidth(va("%dms", ping), V_ALLOWLOWERCASE)/2);
@ -2245,12 +2303,12 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
if (ping < 128) if (ping < 128)
{ {
numbars = 3; numbars = 3;
barcolor = 184; barcolor = 112;
} }
else if (ping < 256) else if (ping < 256)
{ {
numbars = 2; // Apparently ternaries w/ multiple statements don't look good in C so I decided against it. numbars = 2; // Apparently ternaries w/ multiple statements don't look good in C so I decided against it.
barcolor = 103; barcolor = 73;
} }
if (!notext || vid.width >= 640) // how sad, we're using a shit resolution. if (!notext || vid.width >= 640) // how sad, we're using a shit resolution.
@ -2302,7 +2360,9 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
| V_ALLOWLOWERCASE, tab[i].name); | V_ALLOWLOWERCASE, tab[i].name);
// Draw emeralds // Draw emeralds
if (!players[tab[i].num].powers[pw_super] if (players[tab[i].num].powers[pw_invulnerability] && (players[tab[i].num].powers[pw_invulnerability] == players[tab[i].num].powers[pw_sneakers]) && ((leveltime/7) & 1))
HU_DrawEmeralds(x-12,y+2,255);
else if (!players[tab[i].num].powers[pw_super]
|| ((leveltime/7) & 1)) || ((leveltime/7) & 1))
{ {
HU_DrawEmeralds(x-12,y+2,tab[i].emeralds); HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
@ -2412,6 +2472,7 @@ static void HU_Draw32TeamTabRankings(playersort_t *tab, INT32 whiteplayer)
INT32 redplayers = 0, blueplayers = 0; INT32 redplayers = 0, blueplayers = 0;
const UINT8 *colormap; const UINT8 *colormap;
char name[MAXPLAYERNAME+1]; char name[MAXPLAYERNAME+1];
boolean greycheck, supercheck;
V_DrawFill(160, 26, 1, 154, 0); //Draw a vertical line to separate the two teams. V_DrawFill(160, 26, 1, 154, 0); //Draw a vertical line to separate the two teams.
V_DrawFill(1, 26, 318, 1, 0); //And a horizontal line to make a T. V_DrawFill(1, 26, 318, 1, 0); //And a horizontal line to make a T.
@ -2422,6 +2483,9 @@ static void HU_Draw32TeamTabRankings(playersort_t *tab, INT32 whiteplayer)
if (players[tab[i].num].spectator) if (players[tab[i].num].spectator)
continue; //ignore them. continue; //ignore them.
greycheck = greycheckdef;
supercheck = supercheckdef;
if (tab[i].color == skincolor_redteam) //red if (tab[i].color == skincolor_redteam) //red
{ {
redplayers++; redplayers++;
@ -2437,10 +2501,13 @@ static void HU_Draw32TeamTabRankings(playersort_t *tab, INT32 whiteplayer)
else //er? not on red or blue, so ignore them else //er? not on red or blue, so ignore them
continue; continue;
greycheck = greycheckdef;
supercheck = supercheckdef;
strlcpy(name, tab[i].name, 8); strlcpy(name, tab[i].name, 8);
V_DrawString(x + 10, y, V_DrawString(x + 10, y,
((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0) ((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0)
| (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT) | (greycheck ? 0 : V_TRANSLUCENT)
| V_ALLOWLOWERCASE, name); | V_ALLOWLOWERCASE, name);
if (gametype == GT_CTF) if (gametype == GT_CTF)
@ -2452,13 +2519,19 @@ static void HU_Draw32TeamTabRankings(playersort_t *tab, INT32 whiteplayer)
} }
// Draw emeralds // Draw emeralds
if (!players[tab[i].num].powers[pw_super] if (players[tab[i].num].powers[pw_invulnerability] && (players[tab[i].num].powers[pw_invulnerability] == players[tab[i].num].powers[pw_sneakers]) && ((leveltime/7) & 1))
{
HU_Draw32Emeralds(x+60, y+2, 255);
//HU_DrawEmeralds(x-12,y+2,255);
}
else if (!players[tab[i].num].powers[pw_super]
|| ((leveltime/7) & 1)) || ((leveltime/7) & 1))
{ {
HU_Draw32Emeralds(x+60, y+2, tab[i].emeralds); HU_Draw32Emeralds(x+60, y+2, tab[i].emeralds);
//HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
} }
if (players[tab[i].num].powers[pw_super]) if (supercheck)
{ {
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], colormap);
@ -2466,12 +2539,12 @@ static void HU_Draw32TeamTabRankings(playersort_t *tab, INT32 whiteplayer)
else else
{ {
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
if ((players[tab[i].num].rings <= 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres <= 0 && (maptol & TOL_NIGHTS))) if (players[tab[i].num].spectator || players[tab[i].num].playerstate == PST_DEAD)
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], colormap);
else else
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], colormap);
} }
V_DrawRightAlignedThinString(x+128, y, (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count)); V_DrawRightAlignedThinString(x+128, y, ((players[tab[i].num].spectator || players[tab[i].num].playerstate == PST_DEAD) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
if (!splitscreen) if (!splitscreen)
{ {
if (!(tab[i].num == serverplayer)) if (!(tab[i].num == serverplayer))
@ -2574,7 +2647,9 @@ void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
} }
// Draw emeralds // Draw emeralds
if (!players[tab[i].num].powers[pw_super] if (players[tab[i].num].powers[pw_invulnerability] && (players[tab[i].num].powers[pw_invulnerability] == players[tab[i].num].powers[pw_sneakers]) && ((leveltime/7) & 1))
HU_DrawEmeralds(x-12,y+2,255);
else if (!players[tab[i].num].powers[pw_super]
|| ((leveltime/7) & 1)) || ((leveltime/7) & 1))
{ {
HU_DrawEmeralds(x-12,y+2,tab[i].emeralds); HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
@ -2646,7 +2721,9 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
V_DrawSmallScaledPatch(x - SHORT(exiticon->width)/2 - 1, y-3, 0, exiticon); V_DrawSmallScaledPatch(x - SHORT(exiticon->width)/2 - 1, y-3, 0, exiticon);
// Draw emeralds // Draw emeralds
if (!players[tab[i].num].powers[pw_super] if (players[tab[i].num].powers[pw_invulnerability] && (players[tab[i].num].powers[pw_invulnerability] == players[tab[i].num].powers[pw_sneakers]) && ((leveltime/7) & 1))
HU_DrawEmeralds(x-12,y+2,255);
else if (!players[tab[i].num].powers[pw_super]
|| ((leveltime/7) & 1)) || ((leveltime/7) & 1))
{ {
HU_DrawEmeralds(x-12,y+2,tab[i].emeralds); HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
@ -2716,6 +2793,7 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
INT32 i; INT32 i;
const UINT8 *colormap; const UINT8 *colormap;
char name[MAXPLAYERNAME+1]; char name[MAXPLAYERNAME+1];
boolean greycheck, supercheck;
V_DrawFill(160, 26, 1, 154, 0); //Draw a vertical line to separate the two sides. V_DrawFill(160, 26, 1, 154, 0); //Draw a vertical line to separate the two sides.
V_DrawFill(1, 26, 318, 1, 0); //And a horizontal line to make a T. V_DrawFill(1, 26, 318, 1, 0); //And a horizontal line to make a T.
@ -2723,9 +2801,12 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
for (i = 0; i < scorelines; i++) for (i = 0; i < scorelines; i++)
{ {
if (players[tab[i].num].spectator) if (players[tab[i].num].spectator && gametype != GT_COOP)
continue; //ignore them. continue; //ignore them.
greycheck = greycheckdef;
supercheck = supercheckdef;
strlcpy(name, tab[i].name, 7); strlcpy(name, tab[i].name, 7);
if (!splitscreen) // don't draw it on splitscreen, if (!splitscreen) // don't draw it on splitscreen,
{ {
@ -2737,7 +2818,7 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
V_DrawString(x + 10, y, V_DrawString(x + 10, y,
((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0) ((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0)
| (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT) | (greycheck ? 0 : V_TRANSLUCENT)
| V_ALLOWLOWERCASE, name); | V_ALLOWLOWERCASE, name);
if (G_GametypeUsesLives()) //show lives if (G_GametypeUsesLives()) //show lives
@ -2746,7 +2827,12 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
V_DrawFixedPatch((x-10)*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, tagico, 0); V_DrawFixedPatch((x-10)*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, tagico, 0);
// Draw emeralds // Draw emeralds
if (!players[tab[i].num].powers[pw_super] if (players[tab[i].num].powers[pw_invulnerability] && (players[tab[i].num].powers[pw_invulnerability] == players[tab[i].num].powers[pw_sneakers]) && ((leveltime/7) & 1))
{
HU_Draw32Emeralds(x+60, y+2, 255);
//HU_DrawEmeralds(x-12,y+2,255);
}
else if (!players[tab[i].num].powers[pw_super]
|| ((leveltime/7) & 1)) || ((leveltime/7) & 1))
{ {
HU_Draw32Emeralds(x+60, y+2, tab[i].emeralds); HU_Draw32Emeralds(x+60, y+2, tab[i].emeralds);
@ -2761,7 +2847,7 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], 0); V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], 0);
else else
{ {
if ((players[tab[i].num].rings <= 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres <= 0 && (maptol & TOL_NIGHTS))) if (greycheck)
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], 0); V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], 0);
else else
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], 0); V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], 0);
@ -2769,7 +2855,7 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
} }
else else
{ {
if (players[tab[i].num].powers[pw_super]) if (supercheck)
{ {
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], colormap);
@ -2777,7 +2863,7 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
else else
{ {
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
if ((players[tab[i].num].rings <= 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres <= 0 && (maptol & TOL_NIGHTS))) if (greycheck)
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], colormap);
else else
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], colormap); V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], colormap);
@ -2792,13 +2878,13 @@ static void HU_Draw32TabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scor
if (players[tab[i].num].exiting) if (players[tab[i].num].exiting)
V_DrawRightAlignedThinString(x+128, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime))); V_DrawRightAlignedThinString(x+128, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime)));
else else
V_DrawRightAlignedThinString(x+128, y, (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count)); V_DrawRightAlignedThinString(x+128, y, (greycheck ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
} }
else else
V_DrawRightAlignedThinString(x+128, y, (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT), va("%i:%02i.%02i", G_TicsToMinutes(tab[i].count,true), G_TicsToSeconds(tab[i].count), G_TicsToCentiseconds(tab[i].count))); V_DrawRightAlignedThinString(x+128, y, (greycheck ? 0 : V_TRANSLUCENT), va("%i:%02i.%02i", G_TicsToMinutes(tab[i].count,true), G_TicsToSeconds(tab[i].count), G_TicsToCentiseconds(tab[i].count)));
} }
else else
V_DrawRightAlignedThinString(x+128, y, (((players[tab[i].num].rings > 0 && !(maptol & TOL_NIGHTS)) || (players[tab[i].num].spheres > 0 && (maptol & TOL_NIGHTS))) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count)); V_DrawRightAlignedThinString(x+128, y, (greycheck ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
y += 9; y += 9;
if (i == 16) if (i == 16)
@ -3034,7 +3120,7 @@ static void HU_DrawRankings(void)
// shush, we'll do it anyway. // shush, we'll do it anyway.
if (G_GametypeHasTeams()) if (G_GametypeHasTeams())
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request HU_DrawTeamTabRankings(tab, whiteplayer);
else if (scorelines <= 9 && !cv_compactscoreboard.value) else if (scorelines <= 9 && !cv_compactscoreboard.value)
HU_DrawTabRankings(40, 32, tab, scorelines, whiteplayer); HU_DrawTabRankings(40, 32, tab, scorelines, whiteplayer);
else if (scorelines <= 20 && !cv_compactscoreboard.value) else if (scorelines <= 20 && !cv_compactscoreboard.value)
@ -3093,6 +3179,16 @@ static void HU_DrawNetplayCoopOverlay(void)
{ {
int i; int i;
if (token
#ifdef HAVE_BLUA
&& LUA_HudEnabled(hud_tokens)
#endif
)
{
V_DrawString(168, 10, 0, va("- %d", token));
V_DrawSmallScaledPatch(148, 6, 0, tokenicon);
}
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
if (!LUA_HudEnabled(hud_coopemeralds)) if (!LUA_HudEnabled(hud_coopemeralds))
return; return;
@ -3101,7 +3197,7 @@ static void HU_DrawNetplayCoopOverlay(void)
for (i = 0; i < 7; ++i) for (i = 0; i < 7; ++i)
{ {
if (emeralds & (1 << i)) if (emeralds & (1 << i))
V_DrawScaledPatch(20 + (i * 20), 6, 0, emeraldpics[0][i]); V_DrawScaledPatch(20 + (i * 10), 9, 0, emeraldpics[1][i]);
} }
} }

View file

@ -1968,37 +1968,27 @@ static void ST_drawMatchHUD(void)
static void ST_drawTextHUD(void) static void ST_drawTextHUD(void)
{ {
INT32 y = 176 - 16; // HUD_LIVES INT32 y = 42 + 16; // HUD_RINGS
boolean dof12 = false, dospecheader = false; boolean donef12 = false;
#define textHUDdraw(str) \ #define textHUDdraw(str) \
{\ {\
V_DrawThinString(16, y, V_PERPLAYER|V_HUDTRANS|V_SNAPTOLEFT|V_SNAPTOBOTTOM, str);\ V_DrawThinString(16, y, V_PERPLAYER|V_HUDTRANS|V_SNAPTOLEFT|V_SNAPTOBOTTOM, str);\
y -= 8;\ y += 8;\
} }
if (F_GetPromptHideHud(y)) if (F_GetPromptHideHud(y))
return; return;
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (!stplyr->spectator)) if (stplyr->spectator && (gametype != GT_COOP || stplyr->playerstate == PST_LIVE))
textHUDdraw(M_GetText("\x86""Spectator mode:"))
if (circuitmap)
{ {
if (leveltime < hidetime * TICRATE) if (stplyr->exiting)
{ textHUDdraw(M_GetText("\x82""FINISHED!"))
if (stplyr->pflags & PF_TAGIT) else
{ textHUDdraw(va("Lap:""\x82 %u/%d", stplyr->laps+1, cv_numlaps.value))
textHUDdraw(M_GetText("Waiting for players to hide..."))
textHUDdraw(M_GetText("\x82""You are blindfolded!"))
}
else if (gametype == GT_HIDEANDSEEK)
textHUDdraw(M_GetText("Hide before time runs out!"))
else
textHUDdraw(M_GetText("Flee before you are hunted!"))
}
else if (gametype == GT_HIDEANDSEEK && !(stplyr->pflags & PF_TAGIT))
{
textHUDdraw(M_GetText("You cannot move while hiding."))
dof12 = true;
}
} }
if (!stplyr->spectator && stplyr->exiting && cv_playersforexit.value && gametype == GT_COOP) if (!stplyr->spectator && stplyr->exiting && cv_playersforexit.value && gametype == GT_COOP)
@ -2027,13 +2017,23 @@ static void ST_drawTextHUD(void)
if (exiting < total) if (exiting < total)
{ {
if (!splitscreen && !donef12)
{
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
donef12 = true;
}
total -= exiting; total -= exiting;
textHUDdraw(va(M_GetText("%d player%s remaining"), total, ((total == 1) ? "" : "s"))) textHUDdraw(va(M_GetText("%d player%s remaining"), total, ((total == 1) ? "" : "s")))
dof12 = true;
} }
} }
else if (gametype != GT_COOP && (stplyr->exiting || (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1))) else if (gametype != GT_COOP && (stplyr->exiting || (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)))
dof12 = true; {
if (!splitscreen && !donef12)
{
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
donef12 = true;
}
}
else if (!G_PlatformGametype() && stplyr->playerstate == PST_DEAD && stplyr->lives) //Death overrides spectator text. else if (!G_PlatformGametype() && stplyr->playerstate == PST_DEAD && stplyr->lives) //Death overrides spectator text.
{ {
INT32 respawntime = cv_respawntime.value - stplyr->deadtimer/TICRATE; INT32 respawntime = cv_respawntime.value - stplyr->deadtimer/TICRATE;
@ -2045,6 +2045,15 @@ static void ST_drawTextHUD(void)
} }
else if (stplyr->spectator && (gametype != GT_COOP || stplyr->playerstate == PST_LIVE)) else if (stplyr->spectator && (gametype != GT_COOP || stplyr->playerstate == PST_LIVE))
{ {
if (!splitscreen && !donef12)
{
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
donef12 = true;
}
textHUDdraw(M_GetText("\x82""JUMP:""\x80 Rise"))
textHUDdraw(M_GetText("\x82""SPIN:""\x80 Lower"))
if (G_IsSpecialStage(gamemap) && (maptol & TOL_NIGHTS)) if (G_IsSpecialStage(gamemap) && (maptol & TOL_NIGHTS))
textHUDdraw(M_GetText("\x82""Wait for the stage to end...")) textHUDdraw(M_GetText("\x82""Wait for the stage to end..."))
else if (gametype == GT_COOP) else if (gametype == GT_COOP)
@ -2076,28 +2085,33 @@ static void ST_drawTextHUD(void)
} }
else else
textHUDdraw(M_GetText("\x82""FIRE:""\x80 Enter game")) textHUDdraw(M_GetText("\x82""FIRE:""\x80 Enter game"))
textHUDdraw(M_GetText("\x82""SPIN:""\x80 Lower"))
textHUDdraw(M_GetText("\x82""JUMP:""\x80 Rise"))
dof12 = true;
dospecheader = true;
} }
if (!splitscreen && dof12) if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (!stplyr->spectator))
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
if (circuitmap)
{ {
if (stplyr->exiting) if (leveltime < hidetime * TICRATE)
textHUDdraw(M_GetText("\x82""FINISHED!")) {
else if (stplyr->pflags & PF_TAGIT)
textHUDdraw(va("Lap:""\x82 %u/%d", stplyr->laps+1, cv_numlaps.value)) {
textHUDdraw(M_GetText("\x82""You are blindfolded!"))
textHUDdraw(M_GetText("Waiting for players to hide..."))
}
else if (gametype == GT_HIDEANDSEEK)
textHUDdraw(M_GetText("Hide before time runs out!"))
else
textHUDdraw(M_GetText("Flee before you are hunted!"))
}
else if (gametype == GT_HIDEANDSEEK && !(stplyr->pflags & PF_TAGIT))
{
if (!splitscreen && !donef12)
{
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
donef12 = true;
}
textHUDdraw(M_GetText("You cannot move while hiding."))
}
} }
if (dospecheader)
textHUDdraw(M_GetText("\x86""Spectator mode:"))
#undef textHUDdraw #undef textHUDdraw
} }