mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Titlemap - Maincfg variables, unplayability crash fixes
This commit is contained in:
parent
7e43272932
commit
1c93b07c86
5 changed files with 89 additions and 36 deletions
|
@ -3120,6 +3120,25 @@ static void readmaincfg(MYFILE *f)
|
|||
DEH_WriteUndoline(word, va("%d", looptitle), UNDO_NONE);
|
||||
looptitle = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
}
|
||||
else if (fastcmp(word, "TITLEMAP"))
|
||||
{
|
||||
// Support using the actual map name,
|
||||
// i.e., Level AB, Level FZ, etc.
|
||||
|
||||
// Convert to map number
|
||||
if (word2[0] >= 'A' && word2[0] <= 'Z')
|
||||
value = M_MapNumber(word2[0], word2[1]);
|
||||
else
|
||||
value = get_number(word2);
|
||||
|
||||
DEH_WriteUndoline(word, va("%d", titlemap), UNDO_NONE);
|
||||
titlemap = (INT16)value;
|
||||
}
|
||||
else if (fastcmp(word, "HIDETITLEPICS"))
|
||||
{
|
||||
DEH_WriteUndoline(word, va("%d", hidetitlepics), UNDO_NONE);
|
||||
hidetitlepics = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
}
|
||||
else if (fastcmp(word, "TITLESCROLLSPEED"))
|
||||
{
|
||||
DEH_WriteUndoline(word, va("%d", titlescrollspeed), UNDO_NONE);
|
||||
|
|
|
@ -124,6 +124,9 @@ extern INT16 spstage_start;
|
|||
extern INT16 sstage_start;
|
||||
extern INT16 sstage_end;
|
||||
|
||||
extern INT16 titlemap;
|
||||
extern boolean hidetitlepics;
|
||||
|
||||
extern boolean looptitle;
|
||||
extern boolean useNightsSS;
|
||||
|
||||
|
|
|
@ -1425,11 +1425,28 @@ void F_StartTitleScreen(void)
|
|||
else
|
||||
wipegamestate = GS_TITLESCREEN;
|
||||
|
||||
gamemap = 533; titlescrollspeed = (int32_t)ANG1; //@TODO don't hardcode bich
|
||||
if (titlemap)
|
||||
{
|
||||
gamemap = titlemap;
|
||||
|
||||
if (!mapheaderinfo[gamemap-1])
|
||||
P_AllocMapHeader(gamemap-1);
|
||||
|
||||
G_DoLoadLevel(true);
|
||||
G_SetGamestate(GS_TITLESCREEN);
|
||||
players[displayplayer].playerstate = PST_DEAD; // Don't spawn the player in dummy (I'm still a filthy cheater)
|
||||
//CON_ClearHUD();
|
||||
}
|
||||
else
|
||||
{
|
||||
gamemap = 0;
|
||||
|
||||
if (!mapheaderinfo[gamemap-1])
|
||||
P_AllocMapHeader(gamemap-1);
|
||||
|
||||
G_SetGamestate(GS_TITLESCREEN);
|
||||
CON_ClearHUD();
|
||||
}
|
||||
|
||||
// IWAD dependent stuff.
|
||||
|
||||
|
@ -1471,6 +1488,13 @@ void F_TitleScreenDrawer(void)
|
|||
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||
return;
|
||||
|
||||
// rei|miru: use title pics?
|
||||
if (hidetitlepics)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawScaledPatch(30, 14, 0, ttwing);
|
||||
|
||||
if (finalecount < 57)
|
||||
|
@ -1507,6 +1531,8 @@ void F_TitleScreenDrawer(void)
|
|||
}
|
||||
|
||||
V_DrawScaledPatch(48, 142, 0,ttbanner);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// (no longer) De-Demo'd Title Screen
|
||||
|
|
|
@ -60,6 +60,8 @@ void F_StartContinue(void);
|
|||
void F_ContinueTicker(void);
|
||||
void F_ContinueDrawer(void);
|
||||
|
||||
extern INT16 titlemap;
|
||||
extern boolean hidetitlepics;
|
||||
extern INT32 titlescrollspeed;
|
||||
|
||||
//
|
||||
|
|
|
@ -120,6 +120,9 @@ INT16 spstage_start;
|
|||
INT16 sstage_start;
|
||||
INT16 sstage_end;
|
||||
|
||||
INT16 titlemap;
|
||||
boolean hidetitlepics = false;
|
||||
|
||||
boolean looptitle = false;
|
||||
boolean useNightsSS = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue