mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Pause menu: display map icon, map name and currently playing song credit
This commit is contained in:
parent
1a0525b0c0
commit
ce7d22d029
1 changed files with 67 additions and 4 deletions
|
|
@ -53,6 +53,7 @@
|
||||||
#include "k_grandprix.h" // K_CanChangeRules
|
#include "k_grandprix.h" // K_CanChangeRules
|
||||||
#include "k_rank.h" // K_GetGradeColor
|
#include "k_rank.h" // K_GetGradeColor
|
||||||
#include "k_zvote.h" // K_GetMidVoteLabel
|
#include "k_zvote.h" // K_GetMidVoteLabel
|
||||||
|
#include "k_boss.h"
|
||||||
|
|
||||||
#include "y_inter.h" // Y_RoundQueueDrawer
|
#include "y_inter.h" // Y_RoundQueueDrawer
|
||||||
|
|
||||||
|
|
@ -5330,9 +5331,12 @@ void M_DrawPause(void)
|
||||||
INT16 ypos = -50; // Draw 3 items from selected item (y=100 - 3 items spaced by 50 px each... you get the idea.)
|
INT16 ypos = -50; // Draw 3 items from selected item (y=100 - 3 items spaced by 50 px each... you get the idea.)
|
||||||
INT16 dypos;
|
INT16 dypos;
|
||||||
|
|
||||||
fixed_t t = M_DueFrac(pausemenu.openoffset.start, 6);
|
fixed_t mt = M_DueFrac(pausemenu.openoffset.start, 6);
|
||||||
INT16 offset = menutransition.tics ? floor(pow(2, (double)menutransition.tics)) :
|
|
||||||
(pausemenu.openoffset.dist ? Easing_InQuad(t, 0, 256) : Easing_OutQuad(t, 256, 0));
|
if (pausemenu.openoffset.dist)
|
||||||
|
mt = FRACUNIT - mt;
|
||||||
|
|
||||||
|
INT16 offset = menutransition.tics ? floor(pow(2, (double)menutransition.tics)) : Easing_OutQuad(mt, 256, 0);
|
||||||
INT16 arrxpos = 150 + 2*offset; // To draw the background arrow.
|
INT16 arrxpos = 150 + 2*offset; // To draw the background arrow.
|
||||||
|
|
||||||
INT16 j = 0;
|
INT16 j = 0;
|
||||||
|
|
@ -5341,10 +5345,69 @@ void M_DrawPause(void)
|
||||||
patch_t *arrstart = W_CachePatchName("M_PTIP", PU_CACHE);
|
patch_t *arrstart = W_CachePatchName("M_PTIP", PU_CACHE);
|
||||||
patch_t *arrfill = W_CachePatchName("M_PFILL", PU_CACHE);
|
patch_t *arrfill = W_CachePatchName("M_PFILL", PU_CACHE);
|
||||||
|
|
||||||
t = M_DueFrac(pausemenu.offset.start, 3);
|
fixed_t t = M_DueFrac(pausemenu.offset.start, 3);
|
||||||
|
|
||||||
//V_DrawFadeScreen(0xFF00, 16);
|
//V_DrawFadeScreen(0xFF00, 16);
|
||||||
|
|
||||||
|
{
|
||||||
|
INT32 x = Easing_OutQuad(mt, -BASEVIDWIDTH, 0);
|
||||||
|
INT32 y = 56;
|
||||||
|
|
||||||
|
if (g_realsongcredit)
|
||||||
|
{
|
||||||
|
V_DrawThinString(x + 2, y, 0, g_realsongcredit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
|
const char *name = bossinfo.valid && bossinfo.enemyname ?
|
||||||
|
bossinfo.enemyname : mapheaderinfo[gamemap-1]->menuttl;
|
||||||
|
char *buf = NULL;
|
||||||
|
|
||||||
|
if (!name[0])
|
||||||
|
{
|
||||||
|
buf = G_BuildMapTitle(gamemap);
|
||||||
|
name = buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
INT32 width = V_StringScaledWidth(
|
||||||
|
FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
0,
|
||||||
|
MED_FONT,
|
||||||
|
name
|
||||||
|
) / FRACUNIT;
|
||||||
|
|
||||||
|
y += 11;
|
||||||
|
|
||||||
|
V_DrawFill(x + 1, y + 8, width + 20, 3, 31);
|
||||||
|
|
||||||
|
V_DrawStringScaled(
|
||||||
|
(x + 19) * FRACUNIT,
|
||||||
|
y * FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
V_AQUAMAP,
|
||||||
|
NULL,
|
||||||
|
MED_FONT,
|
||||||
|
name
|
||||||
|
);
|
||||||
|
|
||||||
|
K_DrawMapThumbnail(
|
||||||
|
(x + 1) * FRACUNIT,
|
||||||
|
(y - 1) * FRACUNIT,
|
||||||
|
16 * FRACUNIT,
|
||||||
|
0,
|
||||||
|
gamemap - 1,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
Z_Free(buf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// "PAUSED"
|
// "PAUSED"
|
||||||
if (!paused && !demo.playback && !modeattacking && !netgame) // as close to possible as P_AutoPause, but not dependent on menuactive
|
if (!paused && !demo.playback && !modeattacking && !netgame) // as close to possible as P_AutoPause, but not dependent on menuactive
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue