Y_RoundQueueDrawer

Reduces how absolutely monolithic Y_IntermissionDrawer is.
This commit is contained in:
toaster 2023-05-11 14:07:07 +01:00
parent e3c3a8c80a
commit 0a7e8d9bf3
2 changed files with 567 additions and 549 deletions

View file

@ -389,98 +389,18 @@ typedef enum
} bottomprogressionpatch_t; } bottomprogressionpatch_t;
// //
// Y_IntermissionDrawer // Y_RoundQueueDrawer
// //
// Called by D_Display. Nothing is modified here; all it does is draw. (SRB2Kart: er, about that...) // Handles drawing the bottom-of-screen progression.
// Neat concept, huh? // Currently requires intermission y_data to be active, but abstraction is feasible.
// //
void Y_IntermissionDrawer(void) void Y_RoundQueueDrawer(void)
{ {
// INFO SEGMENT if (roundqueue.size == 0)
// Numbers are V_DrawRightAlignedThinString WITH v_6widthspace as flags {
// resbar 1 (48,82) 5 (176, 82)
// 2 (48, 96)
//player icon 1 (55,79) 2 (55,93) 5 (183,79)
// If we early return, skip drawing the 3D scene (software buffer) so it doesn't clobber the frame for the wipe
g_wipeskiprender = true;
if (intertype == int_none || rendermode == render_none)
return; return;
g_wipeskiprender = false;
UINT8 i = 0;
fixed_t x, y, xoffset = 0;
INT32 hilicol = highlightflags;
INT32 whiteplayer = MAXPLAYERS;
if (!r_splitscreen)
whiteplayer = demo.playback ? displayplayers[0] : consoleplayer;
// Patches
patch_t *gthro = W_CachePatchName("R_GTHRO", PU_PATCH); // GOT THROUGH ROUND
patch_t *resbar = W_CachePatchName("R_RESBAR", PU_PATCH); // Results bars for players
// Header bar
patch_t *rtpbr = W_CachePatchName("R_RTPBR", PU_PATCH);
// Checker scroll
patch_t *rbgchk = W_CachePatchName("R_RBGCHK", PU_PATCH);
// Scrolling marquee
patch_t *rrmq = W_CachePatchName("R_RRMQ", PU_PATCH);
// Blending mask for the background
patch_t *mask = W_CachePatchName("R_MASK", PU_PATCH);
fixed_t mqloop = SHORT(rrmq->width)*FRACUNIT;
fixed_t chkloop = SHORT(rbgchk->width)*FRACUNIT;
UINT8 *bgcolor = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_INTERMISSION, GTC_CACHE);
// Draw the background
K_DrawMapThumbnail(0, 0, BASEVIDWIDTH<<FRACBITS, (data.encore ? V_FLIP : 0), prevmap, bgcolor);
// Draw a mask over the BG to get the correct colorization
V_DrawMappedPatch(0, 0, V_ADD|V_TRANSLUCENT, mask, NULL);
// Draw the marquee (scroll pending)
//V_DrawMappedPatch(0, 154, V_SUBTRACT, rrmq, NULL);
// Draw the checker pattern (scroll pending)
//V_DrawMappedPatch(0, 0, V_SUBTRACT, rbgchk, NULL);
for (x = -mqscroll; x < (BASEVIDWIDTH * FRACUNIT); x += mqloop)
{
V_DrawFixedPatch(x, 154<<FRACBITS, FRACUNIT, V_SUBTRACT, rrmq, NULL);
} }
V_DrawFixedPatch(chkscroll, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL);
V_DrawFixedPatch(chkscroll - chkloop, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL);
// Animate scrolling elements if relevant
if (!paused && !P_AutoPause())
{
mqscroll += renderdeltatics;
if (mqscroll > mqloop)
mqscroll %= mqloop;
chkscroll += renderdeltatics;
if (chkscroll > chkloop)
chkscroll %= chkloop;
}
if (renderisnewtic)
{
LUA_HUD_ClearDrawList(luahuddrawlist_intermission);
LUA_HookHUD(luahuddrawlist_intermission, HUD_HOOK(intermission));
}
LUA_HUD_DrawList(luahuddrawlist_intermission);
// The following is functionally a hack. // The following is functionally a hack.
// Due to how interpolation works, it's functionally one frame behind. // Due to how interpolation works, it's functionally one frame behind.
// So we offset certain interpolated timers by this to make our lives easier! // So we offset certain interpolated timers by this to make our lives easier!
@ -490,248 +410,8 @@ void Y_IntermissionDrawer(void)
// still put 35fps in the future. ~toast 100523 // still put 35fps in the future. ~toast 100523
SINT8 interpoffs = (R_UsingFrameInterpolation() ? 1 : 0); SINT8 interpoffs = (R_UsingFrameInterpolation() ? 1 : 0);
if (!LUA_HudEnabled(hud_intermissiontally)) UINT8 i;
goto skiptallydrawer;
if (sorttic != -1 && intertic > sorttic)
{
const INT32 count = (intertic - sorttic);
if (count < 8)
xoffset = -((count * vid.width) / (8 * vid.dupx));
else if (count == 8)
goto skiptallydrawer;
else if (count < 16)
xoffset = (((16 - count) * vid.width) / (8 * vid.dupx));
}
// Draw the header bar
{
V_DrawMappedPatch(20 + xoffset, 24, 0, rtpbr, NULL);
if (data.gotthrough)
{
// Draw "GOT THROUGH ROUND"
V_DrawMappedPatch(50 + xoffset, 42, 0, gthro, NULL);
// Draw round numbers
if (roundqueue.roundnum > 0 && !(grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE))
{
patch_t *roundpatch =
W_CachePatchName(
va("TT_RND%d", roundqueue.roundnum),
PU_PATCH
);
V_DrawMappedPatch(240 + xoffset, 39, 0, roundpatch, NULL);
}
// Draw the player's name
V_DrawTitleCardString(51 + xoffset, 7, data.headerstring, V_6WIDTHSPACE, false, 0, 0);
}
else
{
V_DrawTitleCardString(51 + xoffset, 17, data.headerstring, V_6WIDTHSPACE, false, 0, 0);
}
}
{
SINT8 yspacing = 14;
fixed_t heightcount = (data.numplayers - 1);
fixed_t returny;
boolean verticalresults = (data.numplayers < 4);
x = xoffset;
if (verticalresults)
{
x += (BASEVIDWIDTH/2) - 61;
}
else
{
x += 29;
heightcount /= 2;
}
if (data.numplayers > 10)
{
yspacing--;
}
else if (data.numplayers <= 6)
{
yspacing++;
if (verticalresults)
{
yspacing++;
}
}
y = returny = 106 - (heightcount * yspacing)/2;
for (i = 0; i < data.numplayers; i++)
{
boolean dojitter = data.jitter[data.num[i]] > 0;
data.jitter[data.num[i]] = 0;
if (data.num[i] == MAXPLAYERS)
;
else if (!playeringame[data.num[i]] || players[data.num[i]].spectator == true)
data.num[i] = MAXPLAYERS; // this should be the only field setting in this function
else
{
char strtime[MAXPLAYERNAME+1];
if (dojitter)
y--;
V_DrawMappedPatch(x, y, 0, resbar, NULL);
V_DrawRightAlignedThinString(x+13, y-2, 0, va("%d", data.pos[i]));
if (data.color[i])
{
UINT8 *charcolormap;
if (data.rankingsmode == 0 && (players[data.num[i]].pflags & PF_NOCONTEST) && players[data.num[i]].bot)
{
// RETIRED !!
charcolormap = R_GetTranslationColormap(TC_DEFAULT, *data.color[i], GTC_CACHE);
V_DrawMappedPatch(x+14, y-5, 0, W_CachePatchName("MINIDEAD", PU_CACHE), charcolormap);
}
else
{
charcolormap = R_GetTranslationColormap(*data.character[i], *data.color[i], GTC_CACHE);
V_DrawMappedPatch(x+14, y-5, 0, faceprefix[*data.character[i]][FACE_MINIMAP], charcolormap);
}
}
STRBUFCPY(strtime, data.name[i]);
/* y2 = y;
if ((netgame || (demo.playback && demo.netgame)) && playerconsole[data.num[i]] == 0 && server_lagless && !players[data.num[i]].bot)
{
static UINT8 alagles_timer = 0;
patch_t *alagles;
y2 = ( y - 4 );
V_DrawScaledPatch(x + 36, y2, 0, W_CachePatchName(va("BLAGLES%d", (intertic / 3) % 6), PU_CACHE));
// every 70 tics
if (( leveltime % 70 ) == 0)
{
alagles_timer = 9;
}
if (alagles_timer > 0)
{
alagles = W_CachePatchName(va("ALAGLES%d", alagles_timer), PU_CACHE);
V_DrawScaledPatch(x + 36, y2, 0, alagles);
if (( leveltime % 2 ) == 0)
alagles_timer--;
}
else
{
alagles = W_CachePatchName("ALAGLES0", PU_CACHE);
V_DrawScaledPatch(x + 36, y2, 0, alagles);
}
y2 += SHORT (alagles->height) + 1;
}*/
V_DrawThinString(x+27, y-2, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime);
strtime[0] = '\0';
if (data.rankingsmode)
{
if (powertype != PWRLV_DISABLED && !clientpowerlevels[data.num[i]][powertype])
{
// No power level (guests)
STRBUFCPY(strtime, "----");
}
else
{
/*if (data.increase[data.num[i]] != INT16_MIN)
{
snprintf(strtime, sizeof strtime, " (%d)", data.increase[data.num[i]]);
V_DrawThinString(x+118, y-2, V_6WIDTHSPACE, strtime);
}*/
snprintf(strtime, sizeof strtime, "%d", data.val[i]);
}
}
else
{
if (data.val[i] == (UINT32_MAX-1))
STRBUFCPY(strtime, "RETIRED.");
else
{
if (intertype == int_time)
{
snprintf(strtime, sizeof strtime, "%i'%02i\"%02i", G_TicsToMinutes(data.val[i], true),
G_TicsToSeconds(data.val[i]), G_TicsToCentiseconds(data.val[i]));
strtime[sizeof strtime - 1] = '\0';
}
else
{
snprintf(strtime, sizeof strtime, "%d", data.val[i]);
}
}
}
V_DrawRightAlignedThinString(x+118, y-2, V_6WIDTHSPACE, strtime);
if (dojitter)
y++;
}
y += yspacing;
if (verticalresults == false && i == (data.numplayers-1)/2)
{
x = 169 + xoffset;
y = returny;
}
}
}
// Draw bottom (and top) pieces
skiptallydrawer:
{
if ((modeattacking == ATTACKING_NONE) && (demo.recording || demo.savemode == DSM_SAVED) && !demo.playback)
{
switch (demo.savemode)
{
case DSM_NOTSAVING:
{
INT32 buttonx = BASEVIDWIDTH;
INT32 buttony = 2;
K_drawButtonAnim(buttonx - 76, buttony, V_SNAPTOTOP|V_SNAPTORIGHT, kp_button_b[1], replayprompttic);
V_DrawRightAlignedThinString(buttonx - 55, buttony, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "or");
K_drawButtonAnim(buttonx - 55, buttony, V_SNAPTOTOP|V_SNAPTORIGHT, kp_button_x[1], replayprompttic);
V_DrawRightAlignedThinString(buttonx - 2, buttony, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "Save replay");
break;
}
case DSM_SAVED:
V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "Replay saved!");
break;
case DSM_TITLEENTRY:
ST_DrawDemoTitleEntry();
break;
default: // Don't render any text here
break;
}
}
}
if (!LUA_HudEnabled(hud_intermissionmessages))
return;
if (roundqueue.size > 0)
{
UINT8 *greymap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_GREY, GTC_CACHE); UINT8 *greymap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_GREY, GTC_CACHE);
// Background pieces // Background pieces
@ -758,14 +438,10 @@ skiptallydrawer:
line_flat[BPP_SHADOW] = W_CachePatchName("R_RRMLS3", PU_PATCH); line_flat[BPP_SHADOW] = W_CachePatchName("R_RRMLS3", PU_PATCH);
// Progress markers // Progress markers
patch_t *rpmark[2];
patch_t *level_dot[BPP_MAIN]; patch_t *level_dot[BPP_MAIN];
patch_t *capsu_dot[BPP_MAIN]; patch_t *capsu_dot[BPP_MAIN];
patch_t *prize_dot[BPP_MAIN]; patch_t *prize_dot[BPP_MAIN];
rpmark[0] = W_CachePatchName("R_RPMARK", PU_PATCH);
rpmark[1] = W_CachePatchName("R_R2MARK", PU_PATCH);
level_dot[BPP_AHEAD] = W_CachePatchName("R_RRMRK2", PU_PATCH); level_dot[BPP_AHEAD] = W_CachePatchName("R_RRMRK2", PU_PATCH);
level_dot[BPP_DONE] = W_CachePatchName("R_RRMRK1", PU_PATCH); level_dot[BPP_DONE] = W_CachePatchName("R_RRMRK1", PU_PATCH);
@ -818,10 +494,10 @@ skiptallydrawer:
INT32 widthofroundqueue = 24*(workingqueuesize - 1); INT32 widthofroundqueue = 24*(workingqueuesize - 1);
x = (BASEVIDWIDTH - widthofroundqueue) / 2; INT32 x = (BASEVIDWIDTH - widthofroundqueue) / 2;
INT32 y;
const INT32 desiredx2 = 290; INT32 spacetospecial = 0;
const INT32 spacetospecial = max(desiredx2 - widthofroundqueue - 24, 16);
// The following block handles horizontal easing of the // The following block handles horizontal easing of the
// progression bar on the last non-rankrestricted round. // progression bar on the last non-rankrestricted round.
@ -830,6 +506,9 @@ skiptallydrawer:
fixed_t percentslide = 0; fixed_t percentslide = 0;
SINT8 deferxoffs = 0; SINT8 deferxoffs = 0;
const INT32 desiredx2 = 290;
spacetospecial = max(desiredx2 - widthofroundqueue - 24, 16);
if (roundqueue.position == roundqueue.size) if (roundqueue.position == roundqueue.size)
{ {
percentslide = FRACUNIT; percentslide = FRACUNIT;
@ -853,11 +532,7 @@ skiptallydrawer:
} }
} }
if (percentslide == 0) if (percentslide != 0)
{
;
}
else
{ {
const INT32 differencetocover = (x + widthofroundqueue + spacetospecial - desiredx2); const INT32 differencetocover = (x + widthofroundqueue + spacetospecial - desiredx2);
@ -1236,6 +911,10 @@ skiptallydrawer:
// Draw the player position through the round queue! // Draw the player position through the round queue!
if (playery != 0) if (playery != 0)
{ {
patch_t *rpmark[2];
rpmark[0] = W_CachePatchName("R_RPMARK", PU_PATCH);
rpmark[1] = W_CachePatchName("R_R2MARK", PU_PATCH);
// Change alignment // Change alignment
playerx -= (10 * FRACUNIT); playerx -= (10 * FRACUNIT);
playery -= (14 * FRACUNIT); playery -= (14 * FRACUNIT);
@ -1269,8 +948,344 @@ skiptallydrawer:
); );
} }
} }
}
//
// Y_IntermissionDrawer
//
// Called by D_Display. Nothing is modified here; all it does is draw. (SRB2Kart: er, about that...)
// Neat concept, huh?
//
void Y_IntermissionDrawer(void)
{
// INFO SEGMENT
// Numbers are V_DrawRightAlignedThinString WITH v_6widthspace as flags
// resbar 1 (48,82) 5 (176, 82)
// 2 (48, 96)
//player icon 1 (55,79) 2 (55,93) 5 (183,79)
// If we early return, skip drawing the 3D scene (software buffer) so it doesn't clobber the frame for the wipe
g_wipeskiprender = true;
if (intertype == int_none || rendermode == render_none)
return;
g_wipeskiprender = false;
UINT8 i = 0;
fixed_t x, y, xoffset = 0;
INT32 hilicol = highlightflags;
INT32 whiteplayer = MAXPLAYERS;
if (!r_splitscreen)
whiteplayer = demo.playback ? displayplayers[0] : consoleplayer;
// Patches
patch_t *gthro = W_CachePatchName("R_GTHRO", PU_PATCH); // GOT THROUGH ROUND
patch_t *resbar = W_CachePatchName("R_RESBAR", PU_PATCH); // Results bars for players
// Header bar
patch_t *rtpbr = W_CachePatchName("R_RTPBR", PU_PATCH);
// Checker scroll
patch_t *rbgchk = W_CachePatchName("R_RBGCHK", PU_PATCH);
// Scrolling marquee
patch_t *rrmq = W_CachePatchName("R_RRMQ", PU_PATCH);
// Blending mask for the background
patch_t *mask = W_CachePatchName("R_MASK", PU_PATCH);
fixed_t mqloop = SHORT(rrmq->width)*FRACUNIT;
fixed_t chkloop = SHORT(rbgchk->width)*FRACUNIT;
UINT8 *bgcolor = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_INTERMISSION, GTC_CACHE);
// Draw the background
K_DrawMapThumbnail(0, 0, BASEVIDWIDTH<<FRACBITS, (data.encore ? V_FLIP : 0), prevmap, bgcolor);
// Draw a mask over the BG to get the correct colorization
V_DrawMappedPatch(0, 0, V_ADD|V_TRANSLUCENT, mask, NULL);
// Draw the marquee (scroll pending)
//V_DrawMappedPatch(0, 154, V_SUBTRACT, rrmq, NULL);
// Draw the checker pattern (scroll pending)
//V_DrawMappedPatch(0, 0, V_SUBTRACT, rbgchk, NULL);
for (x = -mqscroll; x < (BASEVIDWIDTH * FRACUNIT); x += mqloop)
{
V_DrawFixedPatch(x, 154<<FRACBITS, FRACUNIT, V_SUBTRACT, rrmq, NULL);
} }
V_DrawFixedPatch(chkscroll, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL);
V_DrawFixedPatch(chkscroll - chkloop, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL);
// Animate scrolling elements if relevant
if (!paused && !P_AutoPause())
{
mqscroll += renderdeltatics;
if (mqscroll > mqloop)
mqscroll %= mqloop;
chkscroll += renderdeltatics;
if (chkscroll > chkloop)
chkscroll %= chkloop;
}
if (renderisnewtic)
{
LUA_HUD_ClearDrawList(luahuddrawlist_intermission);
LUA_HookHUD(luahuddrawlist_intermission, HUD_HOOK(intermission));
}
LUA_HUD_DrawList(luahuddrawlist_intermission);
if (!LUA_HudEnabled(hud_intermissiontally))
goto skiptallydrawer;
if (sorttic != -1 && intertic > sorttic)
{
const INT32 count = (intertic - sorttic);
if (count < 8)
xoffset = -((count * vid.width) / (8 * vid.dupx));
else if (count == 8)
goto skiptallydrawer;
else if (count < 16)
xoffset = (((16 - count) * vid.width) / (8 * vid.dupx));
}
// Draw the header bar
{
V_DrawMappedPatch(20 + xoffset, 24, 0, rtpbr, NULL);
if (data.gotthrough)
{
// Draw "GOT THROUGH ROUND"
V_DrawMappedPatch(50 + xoffset, 42, 0, gthro, NULL);
// Draw round numbers
if (roundqueue.roundnum > 0 && !(grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE))
{
patch_t *roundpatch =
W_CachePatchName(
va("TT_RND%d", roundqueue.roundnum),
PU_PATCH
);
V_DrawMappedPatch(240 + xoffset, 39, 0, roundpatch, NULL);
}
// Draw the player's name
V_DrawTitleCardString(51 + xoffset, 7, data.headerstring, V_6WIDTHSPACE, false, 0, 0);
}
else
{
V_DrawTitleCardString(51 + xoffset, 17, data.headerstring, V_6WIDTHSPACE, false, 0, 0);
}
}
{
SINT8 yspacing = 14;
fixed_t heightcount = (data.numplayers - 1);
fixed_t returny;
boolean verticalresults = (data.numplayers < 4);
x = xoffset;
if (verticalresults)
{
x += (BASEVIDWIDTH/2) - 61;
}
else
{
x += 29;
heightcount /= 2;
}
if (data.numplayers > 10)
{
yspacing--;
}
else if (data.numplayers <= 6)
{
yspacing++;
if (verticalresults)
{
yspacing++;
}
}
y = returny = 106 - (heightcount * yspacing)/2;
for (i = 0; i < data.numplayers; i++)
{
boolean dojitter = data.jitter[data.num[i]] > 0;
data.jitter[data.num[i]] = 0;
if (data.num[i] == MAXPLAYERS)
;
else if (!playeringame[data.num[i]] || players[data.num[i]].spectator == true)
data.num[i] = MAXPLAYERS; // this should be the only field setting in this function
else
{
char strtime[MAXPLAYERNAME+1];
if (dojitter)
y--;
V_DrawMappedPatch(x, y, 0, resbar, NULL);
V_DrawRightAlignedThinString(x+13, y-2, 0, va("%d", data.pos[i]));
if (data.color[i])
{
UINT8 *charcolormap;
if (data.rankingsmode == 0 && (players[data.num[i]].pflags & PF_NOCONTEST) && players[data.num[i]].bot)
{
// RETIRED !!
charcolormap = R_GetTranslationColormap(TC_DEFAULT, *data.color[i], GTC_CACHE);
V_DrawMappedPatch(x+14, y-5, 0, W_CachePatchName("MINIDEAD", PU_CACHE), charcolormap);
}
else
{
charcolormap = R_GetTranslationColormap(*data.character[i], *data.color[i], GTC_CACHE);
V_DrawMappedPatch(x+14, y-5, 0, faceprefix[*data.character[i]][FACE_MINIMAP], charcolormap);
}
}
STRBUFCPY(strtime, data.name[i]);
/* y2 = y;
if ((netgame || (demo.playback && demo.netgame)) && playerconsole[data.num[i]] == 0 && server_lagless && !players[data.num[i]].bot)
{
static UINT8 alagles_timer = 0;
patch_t *alagles;
y2 = ( y - 4 );
V_DrawScaledPatch(x + 36, y2, 0, W_CachePatchName(va("BLAGLES%d", (intertic / 3) % 6), PU_CACHE));
// every 70 tics
if (( leveltime % 70 ) == 0)
{
alagles_timer = 9;
}
if (alagles_timer > 0)
{
alagles = W_CachePatchName(va("ALAGLES%d", alagles_timer), PU_CACHE);
V_DrawScaledPatch(x + 36, y2, 0, alagles);
if (( leveltime % 2 ) == 0)
alagles_timer--;
}
else
{
alagles = W_CachePatchName("ALAGLES0", PU_CACHE);
V_DrawScaledPatch(x + 36, y2, 0, alagles);
}
y2 += SHORT (alagles->height) + 1;
}*/
V_DrawThinString(x+27, y-2, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime);
strtime[0] = '\0';
if (data.rankingsmode)
{
if (powertype != PWRLV_DISABLED && !clientpowerlevels[data.num[i]][powertype])
{
// No power level (guests)
STRBUFCPY(strtime, "----");
}
else
{
/*if (data.increase[data.num[i]] != INT16_MIN)
{
snprintf(strtime, sizeof strtime, " (%d)", data.increase[data.num[i]]);
V_DrawThinString(x+118, y-2, V_6WIDTHSPACE, strtime);
}*/
snprintf(strtime, sizeof strtime, "%d", data.val[i]);
}
}
else
{
if (data.val[i] == (UINT32_MAX-1))
STRBUFCPY(strtime, "RETIRED.");
else
{
if (intertype == int_time)
{
snprintf(strtime, sizeof strtime, "%i'%02i\"%02i", G_TicsToMinutes(data.val[i], true),
G_TicsToSeconds(data.val[i]), G_TicsToCentiseconds(data.val[i]));
strtime[sizeof strtime - 1] = '\0';
}
else
{
snprintf(strtime, sizeof strtime, "%d", data.val[i]);
}
}
}
V_DrawRightAlignedThinString(x+118, y-2, V_6WIDTHSPACE, strtime);
if (dojitter)
y++;
}
y += yspacing;
if (verticalresults == false && i == (data.numplayers-1)/2)
{
x = 169 + xoffset;
y = returny;
}
}
}
// Draw bottom (and top) pieces
skiptallydrawer:
{
if ((modeattacking == ATTACKING_NONE) && (demo.recording || demo.savemode == DSM_SAVED) && !demo.playback)
{
switch (demo.savemode)
{
case DSM_NOTSAVING:
{
INT32 buttonx = BASEVIDWIDTH;
INT32 buttony = 2;
K_drawButtonAnim(buttonx - 76, buttony, V_SNAPTOTOP|V_SNAPTORIGHT, kp_button_b[1], replayprompttic);
V_DrawRightAlignedThinString(buttonx - 55, buttony, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "or");
K_drawButtonAnim(buttonx - 55, buttony, V_SNAPTOTOP|V_SNAPTORIGHT, kp_button_x[1], replayprompttic);
V_DrawRightAlignedThinString(buttonx - 2, buttony, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "Save replay");
break;
}
case DSM_SAVED:
V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|V_6WIDTHSPACE|hilicol, "Replay saved!");
break;
case DSM_TITLEENTRY:
ST_DrawDemoTitleEntry();
break;
default: // Don't render any text here
break;
}
}
}
if (!LUA_HudEnabled(hud_intermissionmessages))
return;
// Returns early if there's no roundqueue entries to draw
Y_RoundQueueDrawer();
if (netgame) if (netgame)
{ {
if (speedscramble != -1 && speedscramble != gamespeed) if (speedscramble != -1 && speedscramble != gamespeed)

View file

@ -19,6 +19,9 @@ extern "C" {
void Y_IntermissionDrawer(void); void Y_IntermissionDrawer(void);
void Y_Ticker(void); void Y_Ticker(void);
// Specific sub-drawers
void Y_RoundQueueDrawer(void);
void Y_StartIntermission(void); void Y_StartIntermission(void);
void Y_EndIntermission(void); void Y_EndIntermission(void);