mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-07 00:41:13 +00:00
Per Sal's request, only show the time/play the failure sound for the current time attack challenge - and if there is none, only show the emblems in a row.
This commit is contained in:
parent
cc64c71027
commit
66b59f3dfd
1 changed files with 28 additions and 16 deletions
44
src/k_kart.c
44
src/k_kart.c
|
@ -4622,7 +4622,10 @@ static void K_drawKartTimestamp(void)
|
||||||
if (modeattacking) // emblem time!
|
if (modeattacking) // emblem time!
|
||||||
{
|
{
|
||||||
INT32 workx = TIME_XB + 96, worky = TIME_Y+18;
|
INT32 workx = TIME_XB + 96, worky = TIME_Y+18;
|
||||||
UINT8 curemb = 0;
|
SINT8 curemb = 0;
|
||||||
|
patch_t *emblempic[3] = {NULL, NULL, NULL};
|
||||||
|
UINT8 *emblemcol[3] = {NULL, NULL, NULL};
|
||||||
|
|
||||||
emblem_t *emblem = M_GetLevelEmblems(gamemap);
|
emblem_t *emblem = M_GetLevelEmblems(gamemap);
|
||||||
while (emblem)
|
while (emblem)
|
||||||
{
|
{
|
||||||
|
@ -4632,8 +4635,18 @@ static void K_drawKartTimestamp(void)
|
||||||
{
|
{
|
||||||
case ET_TIME:
|
case ET_TIME:
|
||||||
{
|
{
|
||||||
static boolean canplaysound[3] = {true, true, true};
|
static boolean canplaysound = true;
|
||||||
tic_t timetoreach = emblem->var;
|
tic_t timetoreach = emblem->var;
|
||||||
|
|
||||||
|
if (emblem->collected)
|
||||||
|
{
|
||||||
|
emblempic[curemb] = W_CachePatchName(M_GetEmblemPatch(emblem), PU_CACHE);
|
||||||
|
emblemcol[curemb] = R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE);
|
||||||
|
if (++curemb == 3)
|
||||||
|
break;
|
||||||
|
goto bademblem;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(targettext, 9, "%i:%02i.%02i",
|
snprintf(targettext, 9, "%i:%02i.%02i",
|
||||||
G_TicsToMinutes(timetoreach, false),
|
G_TicsToMinutes(timetoreach, false),
|
||||||
G_TicsToSeconds(timetoreach),
|
G_TicsToSeconds(timetoreach),
|
||||||
|
@ -4642,14 +4655,14 @@ static void K_drawKartTimestamp(void)
|
||||||
if (stplyr->realtime > timetoreach)
|
if (stplyr->realtime > timetoreach)
|
||||||
{
|
{
|
||||||
splitflags = (splitflags &~ V_HUDTRANS)|V_HUDTRANSHALF;
|
splitflags = (splitflags &~ V_HUDTRANS)|V_HUDTRANSHALF;
|
||||||
if (canplaysound[curemb])
|
if (canplaysound)
|
||||||
{
|
{
|
||||||
S_StartSound(NULL, sfx_s3k72); //sfx_s26d); -- you STOLE fizzy lifting drinks
|
S_StartSound(NULL, sfx_s3k72); //sfx_s26d); -- you STOLE fizzy lifting drinks
|
||||||
canplaysound[curemb] = false;
|
canplaysound = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!canplaysound[curemb])
|
else if (!canplaysound)
|
||||||
canplaysound[curemb] = true;
|
canplaysound = true;
|
||||||
|
|
||||||
targettext[8] = 0;
|
targettext[8] = 0;
|
||||||
}
|
}
|
||||||
|
@ -4658,22 +4671,21 @@ static void K_drawKartTimestamp(void)
|
||||||
goto bademblem;
|
goto bademblem;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emblem->collected)
|
|
||||||
V_DrawSmallMappedPatch(workx - 65, worky, splitflags, W_CachePatchName(M_GetEmblemPatch(emblem), PU_CACHE),
|
|
||||||
R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE));
|
|
||||||
else
|
|
||||||
V_DrawSmallScaledPatch(workx, worky, splitflags, W_CachePatchName("NEEDIT", PU_CACHE));
|
|
||||||
|
|
||||||
V_DrawRightAlignedString(workx, worky, splitflags, targettext);
|
V_DrawRightAlignedString(workx, worky, splitflags, targettext);
|
||||||
|
workx -= 69; // i SWEAR i wasn't aiming for this
|
||||||
|
V_DrawSmallScaledPatch(workx + 4, worky, splitflags, W_CachePatchName("NEEDIT", PU_CACHE));
|
||||||
|
|
||||||
if (!emblem->collected || ++curemb >= 3)
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
worky += 10;
|
|
||||||
|
|
||||||
bademblem:
|
bademblem:
|
||||||
emblem = M_GetLevelEmblems(-1);
|
emblem = M_GetLevelEmblems(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (curemb--)
|
||||||
|
{
|
||||||
|
workx -= 16;
|
||||||
|
V_DrawSmallMappedPatch(workx + 4, worky, splitflags, emblempic[curemb], emblemcol[curemb]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue