mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
VC review
- Continue showing up on main in-game pause menu - Flip to top half of screen, to avoid conflict with Round Queue - Show over most UI, including menu
This commit is contained in:
parent
2a68650477
commit
92bd71496e
3 changed files with 42 additions and 28 deletions
|
|
@ -825,6 +825,13 @@ void M_Drawer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (netgame && Playing())
|
||||||
|
{
|
||||||
|
boolean mainpause_open = menuactive && currentMenu == &PAUSE_MainDef;
|
||||||
|
|
||||||
|
ST_DrawServerSplash(!mainpause_open);
|
||||||
|
}
|
||||||
|
|
||||||
// focus lost notification goes on top of everything, even the former everything
|
// focus lost notification goes on top of everything, even the former everything
|
||||||
if (window_notinfocus && cv_showfocuslost.value)
|
if (window_notinfocus && cv_showfocuslost.value)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1314,7 +1314,7 @@ static INT32 ST_ServerSplash_OpacityFlag(INT32 opacity)
|
||||||
return (NUMTRANSMAPS - opacity) << V_ALPHASHIFT;
|
return (NUMTRANSMAPS - opacity) << V_ALPHASHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ST_DrawServerSplash(void)
|
void ST_DrawServerSplash(boolean timelimited)
|
||||||
{
|
{
|
||||||
static const fixed_t SPLASH_LEN = (FRACUNIT * TICRATE) * 3;
|
static const fixed_t SPLASH_LEN = (FRACUNIT * TICRATE) * 3;
|
||||||
static const fixed_t SPLASH_WAIT = (FRACUNIT * TICRATE) / 2;
|
static const fixed_t SPLASH_WAIT = (FRACUNIT * TICRATE) / 2;
|
||||||
|
|
@ -1335,7 +1335,8 @@ static void ST_DrawServerSplash(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splashTime >= SPLASH_LEN)
|
if (timelimited
|
||||||
|
&& splashTime >= SPLASH_LEN)
|
||||||
{
|
{
|
||||||
// We finished drawing it
|
// We finished drawing it
|
||||||
return;
|
return;
|
||||||
|
|
@ -1354,29 +1355,35 @@ static void ST_DrawServerSplash(void)
|
||||||
{
|
{
|
||||||
opacity = splashTic;
|
opacity = splashTic;
|
||||||
}
|
}
|
||||||
else if (splashTic > (SPLASH_LEN >> FRACBITS) - NUMTRANSMAPS)
|
else if (timelimited
|
||||||
|
&& splashTic > (SPLASH_LEN >> FRACBITS) - NUMTRANSMAPS)
|
||||||
{
|
{
|
||||||
opacity = (SPLASH_LEN >> FRACBITS) - splashTic;
|
opacity = (SPLASH_LEN >> FRACBITS) - splashTic;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 opacityFlag = ST_ServerSplash_OpacityFlag(opacity);
|
INT32 opacityFlag = ST_ServerSplash_OpacityFlag(opacity);
|
||||||
|
|
||||||
patch_t *gridPatch = W_CachePatchName("MOTDBG", PU_CACHE);
|
patch_t *gridPatch = W_CachePatchName("MOTDBG", PU_CACHE);
|
||||||
fixed_t gridX = -splashTime / 3;
|
|
||||||
fixed_t gridY = (BASEVIDHEIGHT - gridPatch->height) * FRACUNIT;
|
|
||||||
INT32 gridOpacity = ST_ServerSplash_OpacityFlag(opacity / 2);
|
|
||||||
fixed_t maxX = (vid.width * FRACUNIT) / vid.dupx;
|
|
||||||
|
|
||||||
while (gridX < maxX)
|
if (gridPatch && gridPatch->width)
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch(
|
fixed_t gridX = -(splashTime / 3) % (gridPatch->width * FRACUNIT);
|
||||||
gridX, gridY,
|
fixed_t gridY = (gridPatch->height) * FRACUNIT;
|
||||||
FRACUNIT,
|
INT32 gridOpacity = ST_ServerSplash_OpacityFlag(opacity / 2);
|
||||||
(V_SNAPTOLEFT|V_SNAPTOBOTTOM) | V_SUBTRACT | gridOpacity,
|
fixed_t maxX = (vid.width * FRACUNIT) / vid.dupx;
|
||||||
gridPatch,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
gridX += (gridPatch->width * FRACUNIT);
|
while (gridX < maxX)
|
||||||
|
{
|
||||||
|
V_DrawFixedPatch(
|
||||||
|
gridX, gridY,
|
||||||
|
FRACUNIT,
|
||||||
|
(V_SNAPTOLEFT|V_SNAPTOBOTTOM) | V_SUBTRACT | V_VFLIP | gridOpacity,
|
||||||
|
gridPatch,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
gridX += (gridPatch->width * FRACUNIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're a bit crunched atm to do this but hopefully in the future
|
// We're a bit crunched atm to do this but hopefully in the future
|
||||||
|
|
@ -1384,7 +1391,7 @@ static void ST_DrawServerSplash(void)
|
||||||
// sends on client join instead.
|
// sends on client join instead.
|
||||||
patch_t *iconPatch = W_CachePatchName("MOTDICON", PU_CACHE);
|
patch_t *iconPatch = W_CachePatchName("MOTDICON", PU_CACHE);
|
||||||
fixed_t iconX = (BASEVIDWIDTH - 16 - iconPatch->width) * FRACUNIT;
|
fixed_t iconX = (BASEVIDWIDTH - 16 - iconPatch->width) * FRACUNIT;
|
||||||
fixed_t iconY = (BASEVIDHEIGHT - 8 - iconPatch->height) * FRACUNIT;
|
fixed_t iconY = (8) * FRACUNIT;
|
||||||
V_DrawFixedPatch(
|
V_DrawFixedPatch(
|
||||||
iconX, iconY,
|
iconX, iconY,
|
||||||
FRACUNIT,
|
FRACUNIT,
|
||||||
|
|
@ -1394,7 +1401,15 @@ static void ST_DrawServerSplash(void)
|
||||||
);
|
);
|
||||||
|
|
||||||
fixed_t textX = (BASEVIDWIDTH - 16 - 36) * FRACUNIT;
|
fixed_t textX = (BASEVIDWIDTH - 16 - 36) * FRACUNIT;
|
||||||
fixed_t textY = (BASEVIDHEIGHT - 24) * FRACUNIT;
|
fixed_t textY = (24 - 8) * FRACUNIT;
|
||||||
|
|
||||||
|
V_DrawRightAlignedStringAtFixed(
|
||||||
|
textX, textY,
|
||||||
|
(V_SNAPTORIGHT|V_SNAPTOBOTTOM) | opacityFlag,
|
||||||
|
connectedservername
|
||||||
|
);
|
||||||
|
|
||||||
|
textY += 10*FRACUNIT;
|
||||||
|
|
||||||
if (connectedservercontact[0] != 0)
|
if (connectedservercontact[0] != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1403,14 +1418,7 @@ static void ST_DrawServerSplash(void)
|
||||||
(V_SNAPTORIGHT|V_SNAPTOBOTTOM) | opacityFlag,
|
(V_SNAPTORIGHT|V_SNAPTOBOTTOM) | opacityFlag,
|
||||||
va("Contact @ %c%s", '\x80' + cv_shoutcolor.value, connectedservercontact)
|
va("Contact @ %c%s", '\x80' + cv_shoutcolor.value, connectedservercontact)
|
||||||
);
|
);
|
||||||
textY -= (10 * FRACUNIT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawRightAlignedStringAtFixed(
|
|
||||||
textX, textY,
|
|
||||||
(V_SNAPTORIGHT|V_SNAPTOBOTTOM) | opacityFlag,
|
|
||||||
connectedservername
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ST_Drawer(void)
|
void ST_Drawer(void)
|
||||||
|
|
@ -1487,9 +1495,6 @@ void ST_Drawer(void)
|
||||||
if (stagetitle)
|
if (stagetitle)
|
||||||
ST_drawTitleCard();
|
ST_drawTitleCard();
|
||||||
|
|
||||||
if (netgame)
|
|
||||||
ST_DrawServerSplash();
|
|
||||||
|
|
||||||
// Replay manual-save stuff
|
// Replay manual-save stuff
|
||||||
if (demo.recording && multiplayer && demo.savebutton && demo.savebutton + 3*TICRATE < leveltime)
|
if (demo.recording && multiplayer && demo.savebutton && demo.savebutton + 3*TICRATE < leveltime)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ void ST_preLevelTitleCardDrawer(void);
|
||||||
extern tic_t lt_ticker, lt_lasttic;
|
extern tic_t lt_ticker, lt_lasttic;
|
||||||
extern tic_t lt_exitticker, lt_endtime;
|
extern tic_t lt_exitticker, lt_endtime;
|
||||||
|
|
||||||
|
void ST_DrawServerSplash(boolean timelimited);
|
||||||
|
|
||||||
// return if player a is in the same team as player b
|
// return if player a is in the same team as player b
|
||||||
boolean ST_SameTeam(player_t *a, player_t *b);
|
boolean ST_SameTeam(player_t *a, player_t *b);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue