mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Changes:
Allow everything but the level and the text prompt to run before the level fade-in Call HU_Ticker() in GS_GAMEEND Fix titlecard display Only hide the console messages when starting a game instead of between levels Delete ST_Ticker
This commit is contained in:
parent
b7ecc77c02
commit
cd8989979a
6 changed files with 34 additions and 74 deletions
|
@ -710,9 +710,10 @@ void CON_ToggleOff(void)
|
|||
|
||||
con_destlines = 0;
|
||||
con_curlines = 0;
|
||||
CON_ClearHUD();
|
||||
con_forcepic = 0;
|
||||
|
||||
CON_ClearHUD();
|
||||
|
||||
I_UpdateMouseGrab();
|
||||
|
||||
Unlock_state();
|
||||
|
|
34
src/g_game.c
34
src/g_game.c
|
@ -1878,6 +1878,10 @@ void G_StartLevel(boolean resetplayer)
|
|||
G_SetMouseDeltas(0, 0, 1);
|
||||
G_SetMouseDeltas(0, 0, 2);
|
||||
|
||||
// If starting a game, hide the console messages
|
||||
if (gamestate != GS_LEVEL)
|
||||
CON_ClearHUD();
|
||||
|
||||
if (titlemapinaction)
|
||||
return;
|
||||
|
||||
|
@ -2031,9 +2035,6 @@ void G_DoLoadLevel(void)
|
|||
G_SetMouseDeltas(0, 0, 1);
|
||||
G_SetMouseDeltas(0, 0, 2);
|
||||
|
||||
// clear hud messages remains (usually from game startup)
|
||||
CON_ClearHUD();
|
||||
|
||||
if (demoplayback && !timingdemo)
|
||||
precache = true;
|
||||
if (timingdemo)
|
||||
|
@ -2112,7 +2113,6 @@ void TitleCard_Start(void)
|
|||
return;
|
||||
}
|
||||
|
||||
CON_ClearHUD();
|
||||
TitleCard_LoadGraphics();
|
||||
|
||||
titlecard.running = true;
|
||||
|
@ -2697,24 +2697,18 @@ void G_Ticker(boolean run)
|
|||
switch (gamestate)
|
||||
{
|
||||
case GS_LEVEL:
|
||||
if (titlecard.running)
|
||||
{
|
||||
if (run)
|
||||
TitleCard_Run();
|
||||
if (titlecard.prelevel)
|
||||
{
|
||||
G_CheckPlayerReborn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (titlecard.running && run)
|
||||
TitleCard_Run();
|
||||
if (titledemo)
|
||||
F_TitleDemoTicker();
|
||||
P_Ticker(run); // tic the game
|
||||
ST_Ticker(run);
|
||||
F_TextPromptTicker();
|
||||
if (!titlecard.prelevel)
|
||||
{
|
||||
P_Ticker(run); // tic the game
|
||||
F_TextPromptTicker();
|
||||
}
|
||||
|
||||
AM_Ticker();
|
||||
HU_Ticker();
|
||||
|
||||
break;
|
||||
|
||||
case GS_INTERMISSION:
|
||||
|
@ -2748,6 +2742,7 @@ void G_Ticker(boolean run)
|
|||
case GS_GAMEEND:
|
||||
if (run)
|
||||
F_GameEndTicker();
|
||||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_EVALUATION:
|
||||
|
@ -3598,9 +3593,6 @@ void G_DoReborn(INT32 playernum)
|
|||
G_SetMouseDeltas(0, 0, 1);
|
||||
G_SetMouseDeltas(0, 0, 2);
|
||||
|
||||
// clear hud messages remains (usually from game startup)
|
||||
CON_ClearHUD();
|
||||
|
||||
// Starpost support
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
|
@ -2138,10 +2138,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
|||
HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
|
||||
}
|
||||
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentPatch (x, y-4, V_80TRANS, livesback);
|
||||
else
|
||||
V_DrawSmallScaledPatch (x, y-4, 0, livesback);
|
||||
V_DrawSmallScaledPatch (x, y-4, greycheck ? V_80TRANS : 0, livesback);
|
||||
|
||||
if (tab[i].color == 0)
|
||||
{
|
||||
|
@ -2150,10 +2147,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
|||
V_DrawSmallScaledPatch(x, y-4, 0, superprefix[players[tab[i].num].skin]);
|
||||
else
|
||||
{
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentPatch(x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]);
|
||||
else
|
||||
V_DrawSmallScaledPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin]);
|
||||
V_DrawSmallScaledPatch(x, y-4, greycheck ? V_80TRANS : 0, faceprefix[players[tab[i].num].skin]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2167,7 +2161,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
|||
{
|
||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
else
|
||||
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
||||
}
|
||||
|
@ -2177,10 +2171,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
|||
V_DrawRightAlignedString(x, y+4, V_ALLOWLOWERCASE|(greycheck ? V_60TRANS : 0), va("%dx", players[tab[i].num].lives));
|
||||
else if (G_TagGametype() && players[tab[i].num].pflags & PF_TAGIT)
|
||||
{
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentPatch(x-32, y-4, V_60TRANS, tagico);
|
||||
else
|
||||
V_DrawSmallScaledPatch(x-32, y-4, 0, tagico);
|
||||
V_DrawSmallScaledPatch(x-32, y-4, greycheck ? V_60TRANS : 0, tagico);
|
||||
}
|
||||
|
||||
if (players[tab[i].num].exiting || (players[tab[i].num].pflags & PF_FINISHED))
|
||||
|
@ -2436,7 +2427,7 @@ void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
|||
{
|
||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
else
|
||||
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
||||
}
|
||||
|
@ -2510,10 +2501,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
|
|||
V_DrawSmallScaledPatch (x, y-4, 0, superprefix[players[tab[i].num].skin]);
|
||||
else
|
||||
{
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]);
|
||||
else
|
||||
V_DrawSmallScaledPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin]);
|
||||
V_DrawSmallScaledPatch (x, y-4, greycheck ? V_80TRANS : 0, faceprefix[players[tab[i].num].skin]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2527,7 +2515,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
|
|||
{
|
||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
|
||||
if (greycheck)
|
||||
V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
||||
else
|
||||
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
||||
}
|
||||
|
|
|
@ -206,13 +206,6 @@ boolean ST_SameTeam(player_t *a, player_t *b)
|
|||
|
||||
static boolean st_stopped = true;
|
||||
|
||||
void ST_Ticker(boolean run)
|
||||
{
|
||||
(void)run;
|
||||
if (st_stopped)
|
||||
return;
|
||||
}
|
||||
|
||||
// 0 is default, any others are special palettes.
|
||||
INT32 st_palette = 0;
|
||||
INT32 st_translucency = 10;
|
||||
|
@ -1292,7 +1285,7 @@ void TitleCard_Draw(void)
|
|||
colormap = R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE);
|
||||
|
||||
if (titlecard.prelevel)
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol|V_PERPLAYER);
|
||||
|
||||
if (!LUA_HudEnabled(hud_stagetitle) || titlecard.ticker >= (titlecard.endtime + TICRATE))
|
||||
{
|
||||
|
@ -1315,24 +1308,18 @@ void TitleCard_Draw(void)
|
|||
if (lvlttlxpos < 0)
|
||||
lvlttlxpos = 0;
|
||||
|
||||
if (!splitscreen || (splitscreen && stplyr == &players[displayplayer]))
|
||||
{
|
||||
INT32 zzticker = titlecard.ticker;
|
||||
V_DrawMappedPatch(FixedInt(titlecard.zigzag), (-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap);
|
||||
V_DrawMappedPatch(FixedInt(titlecard.zigzag), (zigzag->height-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap);
|
||||
V_DrawMappedPatch(FixedInt(titlecard.zigzag), (-zztext->height+zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap);
|
||||
V_DrawMappedPatch(FixedInt(titlecard.zigzag), (zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap);
|
||||
}
|
||||
INT32 zzticker = titlecard.ticker;
|
||||
V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap);
|
||||
V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (zigzag->height-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap);
|
||||
V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (-zztext->height+zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap);
|
||||
V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap);
|
||||
|
||||
if (actnum)
|
||||
{
|
||||
if (!splitscreen)
|
||||
{
|
||||
if (actnum > 9) // slightly offset the act diamond for two-digit act numbers
|
||||
V_DrawMappedPatch(ttlnumxpos + (V_LevelActNumWidth(actnum)/4) + ttlscroll, 104 - ttlscroll, 0, actpat, colormap);
|
||||
else
|
||||
V_DrawMappedPatch(ttlnumxpos + ttlscroll, 104 - ttlscroll, 0, actpat, colormap);
|
||||
}
|
||||
if (actnum > 9) // slightly offset the act diamond for two-digit act numbers
|
||||
V_DrawSplitscreenPatch(ttlnumxpos + (V_LevelActNumWidth(actnum)/4) + ttlscroll, 104 - ttlscroll, 0, actpat, colormap);
|
||||
else
|
||||
V_DrawSplitscreenPatch(ttlnumxpos + ttlscroll, 104 - ttlscroll, 0, actpat, colormap);
|
||||
V_DrawLevelActNum(ttlnumxpos + ttlscroll, 104, V_PERPLAYER, actnum);
|
||||
}
|
||||
|
||||
|
@ -1358,7 +1345,7 @@ void TitleCard_DrawOverWipe(void)
|
|||
if (!(titlecard.running && titlecard.wipe && st_overlay))
|
||||
return;
|
||||
|
||||
stplyr = &players[consoleplayer];
|
||||
stplyr = &players[displayplayer];
|
||||
TitleCard_PreDraw();
|
||||
TitleCard_Draw();
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
// STATUS BAR
|
||||
//
|
||||
|
||||
// Called by main loop.
|
||||
void ST_Ticker(boolean run);
|
||||
|
||||
// Called by main loop.
|
||||
void ST_Drawer(void);
|
||||
|
||||
|
|
|
@ -155,10 +155,6 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
|||
#define V_PERPLAYER 0x80000000 // automatically adjust coordinates/scaling for splitscreen mode
|
||||
|
||||
// defines for old functions
|
||||
#define V_DrawPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s|V_NOSCALESTART|V_NOSCALEPATCH, p, NULL)
|
||||
#define V_DrawTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, c)
|
||||
#define V_DrawSmallTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, c)
|
||||
#define V_DrawTinyTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, c)
|
||||
#define V_DrawMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, c)
|
||||
#define V_DrawSmallMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, c)
|
||||
#define V_DrawTinyMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, c)
|
||||
|
@ -166,9 +162,8 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
|||
#define V_DrawSmallScaledPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, NULL)
|
||||
#define V_DrawTinyScaledPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, NULL)
|
||||
#define V_DrawTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, NULL)
|
||||
#define V_DrawSmallTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, NULL)
|
||||
#define V_DrawTinyTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, NULL)
|
||||
#define V_DrawSciencePatch(x,y,s,p,sc) V_DrawFixedPatch(x,y,sc,s,p,NULL)
|
||||
#define V_DrawSplitscreenPatch(x,y,s,p,c) V_DrawCroppedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, FRACUNIT, (s)|V_PERPLAYER, p, c, 0, 0, ((p)->width)<<FRACBITS, ((p)->height)<<FRACBITS)
|
||||
#define V_DrawFixedPatch(x,y,sc,s,p,c) V_DrawStretchyFixedPatch(x,y,sc,sc,s,p,c)
|
||||
void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, INT32 scrn, patch_t *patch, const UINT8 *colormap, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
|
|
Loading…
Reference in a new issue