mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More record attack stuff.
Show emblem requirements. Committed because I need sleep...
This commit is contained in:
parent
8ba122a3fd
commit
676c81bfd1
1 changed files with 44 additions and 32 deletions
76
src/m_menu.c
76
src/m_menu.c
|
|
@ -8725,6 +8725,7 @@ void M_DrawTimeAttackMenu(void)
|
||||||
patch_t *PictureOfLevel;
|
patch_t *PictureOfLevel;
|
||||||
lumpnum_t lumpnum;
|
lumpnum_t lumpnum;
|
||||||
char beststr[40];
|
char beststr[40];
|
||||||
|
char reqscore[40], reqtime[40], reqrings[40];
|
||||||
|
|
||||||
M_DrawLevelPlatterHeader(32-lsheadingheight/2, cv_nextmap.string, true, false);
|
M_DrawLevelPlatterHeader(32-lsheadingheight/2, cv_nextmap.string, true, false);
|
||||||
|
|
||||||
|
|
@ -8749,43 +8750,26 @@ void M_DrawTimeAttackMenu(void)
|
||||||
'\x1D' | V_YELLOWMAP, false);
|
'\x1D' | V_YELLOWMAP, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawString(104 - 72, 32+lsheadingheight/2, 0, "* LEVEL RECORDS *");
|
|
||||||
|
|
||||||
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->score)
|
|
||||||
sprintf(beststr, "(none)");
|
|
||||||
else
|
|
||||||
sprintf(beststr, "%u", mainrecords[cv_nextmap.value-1]->score);
|
|
||||||
|
|
||||||
V_DrawString(104-72, 48+lsheadingheight/2, V_YELLOWMAP, "SCORE:");
|
|
||||||
V_DrawRightAlignedString(104+72, 48+lsheadingheight/2, V_ALLOWLOWERCASE, beststr);
|
|
||||||
|
|
||||||
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->time)
|
|
||||||
sprintf(beststr, "(none)");
|
|
||||||
else
|
|
||||||
sprintf(beststr, "%i:%02i.%02i", G_TicsToMinutes(mainrecords[cv_nextmap.value-1]->time, true),
|
|
||||||
G_TicsToSeconds(mainrecords[cv_nextmap.value-1]->time),
|
|
||||||
G_TicsToCentiseconds(mainrecords[cv_nextmap.value-1]->time));
|
|
||||||
|
|
||||||
V_DrawString(104-72, 58+lsheadingheight/2, V_YELLOWMAP, "TIME:");
|
|
||||||
V_DrawRightAlignedString(104+72, 58+lsheadingheight/2, V_ALLOWLOWERCASE, beststr);
|
|
||||||
|
|
||||||
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->rings)
|
|
||||||
sprintf(beststr, "(none)");
|
|
||||||
else
|
|
||||||
sprintf(beststr, "%hu", mainrecords[cv_nextmap.value-1]->rings);
|
|
||||||
|
|
||||||
V_DrawString(104-72, 68+lsheadingheight/2, V_YELLOWMAP, "RINGS:");
|
|
||||||
V_DrawRightAlignedString(104+72, 68+lsheadingheight/2, V_ALLOWLOWERCASE, beststr);
|
|
||||||
|
|
||||||
// Draw record emblems.
|
|
||||||
em = M_GetLevelEmblems(cv_nextmap.value);
|
em = M_GetLevelEmblems(cv_nextmap.value);
|
||||||
|
// Draw record emblems.
|
||||||
while (em)
|
while (em)
|
||||||
{
|
{
|
||||||
switch (em->type)
|
switch (em->type)
|
||||||
{
|
{
|
||||||
case ET_SCORE: yHeight = 48; break;
|
case ET_SCORE:
|
||||||
case ET_TIME: yHeight = 58; break;
|
yHeight = 48;
|
||||||
case ET_RINGS: yHeight = 68; break;
|
sprintf(reqscore, "%u", em->var);
|
||||||
|
break;
|
||||||
|
case ET_TIME:
|
||||||
|
yHeight = 58;
|
||||||
|
sprintf(reqtime, "%i:%02i.%02i", G_TicsToMinutes((tic_t)em->var, true),
|
||||||
|
G_TicsToSeconds((tic_t)em->var),
|
||||||
|
G_TicsToCentiseconds((tic_t)em->var));
|
||||||
|
break;
|
||||||
|
case ET_RINGS:
|
||||||
|
yHeight = 68;
|
||||||
|
sprintf(reqrings, "%u", em->var);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
goto skipThisOne;
|
goto skipThisOne;
|
||||||
}
|
}
|
||||||
|
|
@ -8799,6 +8783,34 @@ void M_DrawTimeAttackMenu(void)
|
||||||
skipThisOne:
|
skipThisOne:
|
||||||
em = M_GetLevelEmblems(-1);
|
em = M_GetLevelEmblems(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
V_DrawString(104 - 72, 32+lsheadingheight/2, 0, "* LEVEL RECORDS *");
|
||||||
|
|
||||||
|
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->score)
|
||||||
|
sprintf(beststr, "(none)");
|
||||||
|
else
|
||||||
|
sprintf(beststr, "%u", mainrecords[cv_nextmap.value-1]->score);
|
||||||
|
|
||||||
|
V_DrawString(104-72, 48+lsheadingheight/2, V_YELLOWMAP, "SCORE:");
|
||||||
|
V_DrawRightAlignedString(104+72, 48+lsheadingheight/2, V_ALLOWLOWERCASE, va("%s%s", beststr,reqscore));
|
||||||
|
|
||||||
|
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->time)
|
||||||
|
sprintf(beststr, "(none)");
|
||||||
|
else
|
||||||
|
sprintf(beststr, "%i:%02i.%02i", G_TicsToMinutes(mainrecords[cv_nextmap.value-1]->time, true),
|
||||||
|
G_TicsToSeconds(mainrecords[cv_nextmap.value-1]->time),
|
||||||
|
G_TicsToCentiseconds(mainrecords[cv_nextmap.value-1]->time));
|
||||||
|
|
||||||
|
V_DrawString(104-72, 58+lsheadingheight/2, V_YELLOWMAP, "TIME:");
|
||||||
|
V_DrawRightAlignedString(104+72, 58+lsheadingheight/2, V_ALLOWLOWERCASE, va("%s%s", beststr,reqtime));
|
||||||
|
|
||||||
|
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->rings)
|
||||||
|
sprintf(beststr, "(none)");
|
||||||
|
else
|
||||||
|
sprintf(beststr, "%hu", mainrecords[cv_nextmap.value-1]->rings);
|
||||||
|
|
||||||
|
V_DrawString(104-72, 68+lsheadingheight/2, V_YELLOWMAP, "RINGS:");
|
||||||
|
V_DrawRightAlignedString(104+72, 68+lsheadingheight/2, V_ALLOWLOWERCASE, va("%s%s", beststr,reqrings));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ALWAYS DRAW level and skin even when not on this menu!
|
// ALWAYS DRAW level and skin even when not on this menu!
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue