mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-26 06:11:01 +00:00
ST_drawLivesArea stuff.
This commit is contained in:
parent
6b8839d5aa
commit
ed29efd9eb
1 changed files with 77 additions and 57 deletions
|
@ -845,26 +845,49 @@ static void ST_drawLivesArea(void)
|
|||
hudinfo[HUD_LIVES].f|V_PERPLAYER|V_HUDTRANS, faceprefix[stplyr->skin], colormap);
|
||||
}
|
||||
|
||||
// Lives number
|
||||
// Metal Sonic recording
|
||||
if (metalrecording)
|
||||
{
|
||||
if (((2*leveltime)/TICRATE) & 1)
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8,
|
||||
hudinfo[HUD_LIVES].f|V_PERPLAYER|V_REDMAP|V_HUDTRANS, "REC");
|
||||
}
|
||||
else if (G_GametypeUsesLives() || gametype == GT_RACE)
|
||||
// Spectator
|
||||
else if (stplyr->spectator)
|
||||
v_colmap = V_GRAYMAP;
|
||||
// Tag
|
||||
else if (gametyperules & GTR_TAG)
|
||||
{
|
||||
// x
|
||||
V_DrawScaledPatch(hudinfo[HUD_LIVES].x+22, hudinfo[HUD_LIVES].y+10,
|
||||
hudinfo[HUD_LIVES].f|V_PERPLAYER|V_HUDTRANS, stlivex);
|
||||
|
||||
// lives number
|
||||
if (gametype == GT_RACE)
|
||||
if (stplyr->pflags & PF_TAGIT)
|
||||
{
|
||||
livescount = INFLIVES;
|
||||
notgreyedout = true;
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "IT!");
|
||||
v_colmap = V_ORANGEMAP;
|
||||
}
|
||||
else if ((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 3)
|
||||
}
|
||||
// Team name
|
||||
else if (G_GametypeHasTeams())
|
||||
{
|
||||
if (stplyr->ctfteam == 1)
|
||||
{
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "RED");
|
||||
v_colmap = V_REDMAP;
|
||||
}
|
||||
else if (stplyr->ctfteam == 2)
|
||||
{
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "BLUE");
|
||||
v_colmap = V_BLUEMAP;
|
||||
}
|
||||
}
|
||||
// Lives number
|
||||
else
|
||||
{
|
||||
boolean candrawlives = true;
|
||||
|
||||
// Co-op and Competition, normal life counter
|
||||
if (G_GametypeUsesLives())
|
||||
{
|
||||
// Handle cooplives here
|
||||
if ((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 3)
|
||||
{
|
||||
INT32 i;
|
||||
livescount = 0;
|
||||
|
@ -894,7 +917,28 @@ static void ST_drawLivesArea(void)
|
|||
livescount = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? INFLIVES : stplyr->lives);
|
||||
notgreyedout = true;
|
||||
}
|
||||
}
|
||||
// Infinity symbol (Race)
|
||||
else if (G_PlatformGametype() && !(gametyperules & GTR_LIVES))
|
||||
{
|
||||
livescount = INFLIVES;
|
||||
notgreyedout = true;
|
||||
}
|
||||
// Otherwise nothing, sorry.
|
||||
// Special Stages keep not showing lives,
|
||||
// as G_GametypeUsesLives() returns false in
|
||||
// Special Stages, and the infinity symbol
|
||||
// cannot show up because Special Stages
|
||||
// still have the GTR_LIVES gametype rule
|
||||
// by default.
|
||||
else
|
||||
candrawlives = false;
|
||||
|
||||
// Draw the lives counter here.
|
||||
if (candrawlives)
|
||||
{
|
||||
// x
|
||||
V_DrawScaledPatch(hudinfo[HUD_LIVES].x+22, hudinfo[HUD_LIVES].y+10, hudinfo[HUD_LIVES].f|V_PERPLAYER|V_HUDTRANS, stlivex);
|
||||
if (livescount == INFLIVES)
|
||||
V_DrawCharacter(hudinfo[HUD_LIVES].x+50, hudinfo[HUD_LIVES].y+8,
|
||||
'\x16' | 0x80 | hudinfo[HUD_LIVES].f|V_PERPLAYER|V_HUDTRANS, false);
|
||||
|
@ -908,31 +952,7 @@ static void ST_drawLivesArea(void)
|
|||
hudinfo[HUD_LIVES].f|V_PERPLAYER|(notgreyedout ? V_HUDTRANS : V_HUDTRANSHALF), va("%d",livescount));
|
||||
}
|
||||
}
|
||||
// Spectator
|
||||
else if (stplyr->spectator)
|
||||
v_colmap = V_GRAYMAP;
|
||||
// Tag
|
||||
else if (gametyperules & GTR_TAG)
|
||||
{
|
||||
if (stplyr->pflags & PF_TAGIT)
|
||||
{
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "IT!");
|
||||
v_colmap = V_ORANGEMAP;
|
||||
}
|
||||
}
|
||||
// Team name
|
||||
else if (G_GametypeHasTeams())
|
||||
{
|
||||
if (stplyr->ctfteam == 1)
|
||||
{
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "RED");
|
||||
v_colmap = V_REDMAP;
|
||||
}
|
||||
else if (stplyr->ctfteam == 2)
|
||||
{
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVES].x+58, hudinfo[HUD_LIVES].y+8, V_HUDTRANS|hudinfo[HUD_LIVES].f|V_PERPLAYER, "BLUE");
|
||||
v_colmap = V_BLUEMAP;
|
||||
}
|
||||
#undef ST_drawLivesX
|
||||
}
|
||||
|
||||
// name
|
||||
|
|
Loading…
Reference in a new issue