mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-01 16:01:09 +00:00
Enhance toaster's awesome intermission work a bit further
- Further divide the 2 screens' functionality; the first screen is purely for match results, the second screen is purely for rank results. (only time/score is on the first page, only rank and rank increase is on the second page, instead of time/score and rank increase being on the first page, then rank increase carries over to the rank page...) - The page switch now happens at exactly the halfway point of the intermission timer - It now uses a cool picture of the view buffer, like SRB2 SP, except faded, instead of the previous intermission tile. - Fixed an issue with the previous commit.
This commit is contained in:
parent
b231421c80
commit
5e51c9b847
3 changed files with 59 additions and 58 deletions
12
src/f_wipe.c
12
src/f_wipe.c
|
@ -46,9 +46,9 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
99, // wipe_credits_intermediate (0)
|
||||
|
||||
0, // wipe_level_toblack
|
||||
UINT8_MAX, // wipe_intermission_toblack
|
||||
0, // wipe_voting_toblack,
|
||||
UINT8_MAX, // wipe_continuing_toblack
|
||||
UINT8_MAX, // wipe_intermission_toblack
|
||||
0, // wipe_voting_toblack,
|
||||
UINT8_MAX, // wipe_continuing_toblack
|
||||
3, // wipe_titlescreen_toblack
|
||||
0, // wipe_timeattack_toblack
|
||||
99, // wipe_credits_toblack
|
||||
|
@ -57,9 +57,9 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
||||
UINT8_MAX, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
0, // wipe_specinter_toblack
|
||||
0, // wipe_multinter_toblack
|
||||
0, // wipe_speclevel_towhite
|
||||
UINT8_MAX, // wipe_specinter_toblack
|
||||
UINT8_MAX, // wipe_multinter_toblack
|
||||
99, // wipe_speclevel_towhite
|
||||
|
||||
0, // wipe_level_final
|
||||
0, // wipe_intermission_final
|
||||
|
|
|
@ -1125,7 +1125,7 @@ boolean P_EndingMusic(player_t *player)
|
|||
boolean looping = true;
|
||||
|
||||
if (!P_IsLocalPlayer(player)) // Only applies to a local player
|
||||
return;
|
||||
return false;
|
||||
|
||||
// Event - Level Finish
|
||||
if (splitscreen
|
||||
|
|
103
src/y_inter.c
103
src/y_inter.c
|
@ -263,6 +263,9 @@ void Y_IntermissionDrawer(void)
|
|||
else
|
||||
V_DrawPatchFill(bgtile);
|
||||
|
||||
if (usebuffer) // Fade everything out
|
||||
V_DrawFadeScreen(0xFF00, 16);
|
||||
|
||||
if (!splitscreen)
|
||||
whiteplayer = demoplayback ? displayplayer : consoleplayer;
|
||||
|
||||
|
@ -335,7 +338,7 @@ void Y_IntermissionDrawer(void)
|
|||
{
|
||||
INT32 y = 48;
|
||||
char name[MAXPLAYERNAME+1];
|
||||
const char *timeheader = (intertype == int_race) ? "TIME" : "HITS";
|
||||
const char *timeheader = (data.match.rankingsmode ? "RANK" : (intertype == int_race ? "TIME" : "SCORE"));
|
||||
|
||||
// draw the level name
|
||||
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring);
|
||||
|
@ -348,21 +351,13 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawCenteredString(x+6+(BASEVIDWIDTH/2), 32, hilicol, "#");
|
||||
V_DrawString(x+36+(BASEVIDWIDTH/2), 32, hilicol, "NAME");
|
||||
|
||||
if (!data.match.rankingsmode)
|
||||
{
|
||||
V_DrawRightAlignedString(x+110, 32, hilicol, timeheader);
|
||||
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+110, 32, hilicol, timeheader);
|
||||
}
|
||||
|
||||
V_DrawRightAlignedString(x+152, 32, hilicol, "SCORE");
|
||||
V_DrawRightAlignedString(x+152, 32, hilicol, timeheader);
|
||||
}
|
||||
else if (!data.match.rankingsmode)
|
||||
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+62, 32, hilicol, timeheader);
|
||||
|
||||
V_DrawCenteredString(x+6, 32, hilicol, "#");
|
||||
V_DrawString(x+36, 32, hilicol, "NAME");
|
||||
|
||||
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+152, 32, hilicol, "SCORE");
|
||||
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+152, 32, hilicol, timeheader);
|
||||
|
||||
for (i = 0; i < data.match.numplayers; i++)
|
||||
{
|
||||
|
@ -391,34 +386,36 @@ void Y_IntermissionDrawer(void)
|
|||
: V_ALLOWLOWERCASE),
|
||||
name);
|
||||
|
||||
snprintf(strtime, sizeof strtime, "%d", data.match.scores[i]-data.match.increase[i]);
|
||||
if (data.match.rankingsmode)
|
||||
{
|
||||
if (data.match.increase[i] > 9)
|
||||
snprintf(strtime, sizeof strtime, "(+%02d)", data.match.increase[i]);
|
||||
else
|
||||
snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[i]);
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+120, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+120+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
|
||||
snprintf(strtime, sizeof strtime, "%d", data.match.scores[i]-data.match.increase[i]);
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
}
|
||||
else
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
|
||||
if (!data.match.rankingsmode)
|
||||
{
|
||||
if (data.match.val[i] == (UINT32_MAX-1))
|
||||
{
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedThinString(x+134, y-1, 0, "NO CONTEST");
|
||||
V_DrawRightAlignedThinString(x+152, y-1, 0, "NO CONTEST");
|
||||
else
|
||||
V_DrawRightAlignedThinString(x+80+BASEVIDWIDTH/2, y-1, 0, "NO CONTEST");
|
||||
V_DrawRightAlignedThinString(x+152+BASEVIDWIDTH/2, y-1, 0, "NO CONTEST");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.match.numplayers <= 8) // Only draw this with less than 8 players, otherwise we won't be able to fit the times in
|
||||
{
|
||||
if (data.match.increase[i] > 9)
|
||||
snprintf(strtime, sizeof strtime, "(+%02d)", data.match.increase[i]);
|
||||
else
|
||||
snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[i]);
|
||||
|
||||
V_DrawString(x+84+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
}
|
||||
|
||||
if (intertype == int_race)
|
||||
{
|
||||
snprintf(strtime, sizeof strtime, "%i:%02i.%02i", G_TicsToMinutes(data.match.val[i], true),
|
||||
|
@ -426,16 +423,16 @@ void Y_IntermissionDrawer(void)
|
|||
strtime[sizeof strtime - 1] = '\0';
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+134, y, 0, strtime);
|
||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+80+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+110, y, 0, va("%i", data.match.val[i]));
|
||||
V_DrawRightAlignedString(x+152, y, 0, va("%i", data.match.val[i]));
|
||||
else
|
||||
V_DrawRightAlignedString(x+62+BASEVIDWIDTH/2, y, 0, va("%i", data.match.val[i]));
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, va("%i", data.match.val[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -880,26 +877,30 @@ void Y_Ticker(void)
|
|||
if (intertic < TICRATE || intertic & 1)
|
||||
return;
|
||||
|
||||
for (q = 0; q < data.match.numplayers; q++)
|
||||
if (data.match.rankingsmode && intertic > sorttic+(2*TICRATE))
|
||||
{
|
||||
if (data.match.increase[q]) {
|
||||
data.match.increase[q]--;
|
||||
r++;
|
||||
if (data.match.increase[q])
|
||||
kaching = false;
|
||||
for (q = 0; q < data.match.numplayers; q++)
|
||||
{
|
||||
if (data.match.increase[q]) {
|
||||
data.match.increase[q]--;
|
||||
r++;
|
||||
if (data.match.increase[q])
|
||||
kaching = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r)
|
||||
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
||||
else
|
||||
{
|
||||
if (modeattacking)
|
||||
endtic = intertic + 10*TICRATE; // 10 second pause after end of tally
|
||||
|
||||
if (r)
|
||||
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
||||
else
|
||||
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
|
||||
}
|
||||
|
||||
if (netgame || multiplayer)
|
||||
sorttic = intertic + 5*TICRATE; // 5 second pause after end of tally
|
||||
if (modeattacking)
|
||||
endtic = intertic + 8*TICRATE; // 8 second pause after end of tally
|
||||
else if (netgame || multiplayer)
|
||||
{
|
||||
if (sorttic == -1)
|
||||
sorttic = intertic + max((cv_inttime.value/2)-2, 2)*TICRATE; // 8 second pause after match results
|
||||
}
|
||||
}
|
||||
/*else if (intertype == int_match) //|| intertype == int_ctf || intertype == int_teammatch) // match
|
||||
|
@ -1420,9 +1421,9 @@ void Y_StartIntermission(void)
|
|||
|
||||
data.match.levelstring[sizeof data.match.levelstring - 1] = '\0';
|
||||
|
||||
bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
|
||||
usetile = true;
|
||||
useinterpic = false;
|
||||
//bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
|
||||
usetile = useinterpic = false;
|
||||
usebuffer = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue