mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
map header option
This commit is contained in:
parent
e40bf85a6f
commit
6920d20a0f
6 changed files with 31 additions and 7 deletions
|
@ -1573,6 +1573,13 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_MIXNIGHTSCOUNTDOWN;
|
||||
}
|
||||
else if (fastcmp(word, "NOTITLECARD"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_NOTITLECARD;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARD;
|
||||
}
|
||||
|
||||
// Individual triggers for menu flags
|
||||
else if (fastcmp(word, "HIDDEN"))
|
||||
|
@ -9012,6 +9019,7 @@ struct {
|
|||
{"LF_NOZONE",LF_NOZONE},
|
||||
{"LF_SAVEGAME",LF_SAVEGAME},
|
||||
{"LF_MIXNIGHTSCOUNTDOWN",LF_MIXNIGHTSCOUNTDOWN},
|
||||
{"LF_NOTITLECARD",LF_NOTITLECARD},
|
||||
// And map flags
|
||||
{"LF2_HIDEINMENU",LF2_HIDEINMENU},
|
||||
{"LF2_HIDEINSTATS",LF2_HIDEINSTATS},
|
||||
|
|
|
@ -349,6 +349,7 @@ typedef struct
|
|||
#define LF_NOZONE 16 ///< Don't include "ZONE" on level title
|
||||
#define LF_SAVEGAME 32 ///< Save the game upon loading this level
|
||||
#define LF_MIXNIGHTSCOUNTDOWN 64 ///< Play sfx_timeup instead of music change for NiGHTS countdown
|
||||
#define LF_NOTITLECARD 128 ///< Don't start the title card
|
||||
|
||||
#define LF2_HIDEINMENU 1 ///< Hide in the multiplayer menu
|
||||
#define LF2_HIDEINSTATS 2 ///< Hide in the statistics screen
|
||||
|
|
|
@ -375,6 +375,7 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
|||
|
||||
// draw level title
|
||||
if ((WipeStageTitle && st_overlay)
|
||||
&& !(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)
|
||||
&& *mapheaderinfo[gamemap-1]->lvlttl != '\0')
|
||||
{
|
||||
ST_runTitleCard();
|
||||
|
|
|
@ -1712,6 +1712,14 @@ void G_DoLoadLevel(boolean resetplayer)
|
|||
//
|
||||
void G_StartTitleCard(void)
|
||||
{
|
||||
// The title card has been disabled for this map.
|
||||
// Oh well.
|
||||
if (mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)
|
||||
{
|
||||
WipeStageTitle = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// clear the hud
|
||||
CON_ClearHUD();
|
||||
|
||||
|
|
|
@ -3226,15 +3226,21 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
#endif
|
||||
}
|
||||
|
||||
// Stage title!
|
||||
// No render mode, stop here.
|
||||
if (rendermode == render_none)
|
||||
return true;
|
||||
|
||||
// Title card!
|
||||
G_StartTitleCard();
|
||||
|
||||
// Can the title card actually run, though?
|
||||
if (rendermode != render_none
|
||||
&& WipeStageTitle
|
||||
&& ranspecialwipe != 2
|
||||
&& *mapheaderinfo[gamemap-1]->lvlttl != '\0'
|
||||
)
|
||||
if (!WipeStageTitle)
|
||||
return true;
|
||||
if (ranspecialwipe == 2)
|
||||
return true;
|
||||
|
||||
// If so...
|
||||
if ((!(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)) && (*mapheaderinfo[gamemap-1]->lvlttl != '\0'))
|
||||
G_PreLevelTitleCard(lt_ticker, true);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -2539,7 +2539,7 @@ static void ST_overlayDrawer(void)
|
|||
// Check for a valid level title
|
||||
// If the HUD is enabled
|
||||
// And, if Lua is running, if the HUD library has the stage title enabled
|
||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer)))
|
||||
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD) && *mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer)))
|
||||
{
|
||||
stagetitle = true;
|
||||
ST_preDrawTitleCard();
|
||||
|
|
Loading…
Reference in a new issue