mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +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);
|
DEH_WriteUndoline(word, va("%d", looptitle), UNDO_NONE);
|
||||||
looptitle = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
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"))
|
else if (fastcmp(word, "TITLESCROLLSPEED"))
|
||||||
{
|
{
|
||||||
DEH_WriteUndoline(word, va("%d", titlescrollspeed), UNDO_NONE);
|
DEH_WriteUndoline(word, va("%d", titlescrollspeed), UNDO_NONE);
|
||||||
|
|
|
@ -124,6 +124,9 @@ extern INT16 spstage_start;
|
||||||
extern INT16 sstage_start;
|
extern INT16 sstage_start;
|
||||||
extern INT16 sstage_end;
|
extern INT16 sstage_end;
|
||||||
|
|
||||||
|
extern INT16 titlemap;
|
||||||
|
extern boolean hidetitlepics;
|
||||||
|
|
||||||
extern boolean looptitle;
|
extern boolean looptitle;
|
||||||
extern boolean useNightsSS;
|
extern boolean useNightsSS;
|
||||||
|
|
||||||
|
|
|
@ -1425,11 +1425,28 @@ void F_StartTitleScreen(void)
|
||||||
else
|
else
|
||||||
wipegamestate = GS_TITLESCREEN;
|
wipegamestate = GS_TITLESCREEN;
|
||||||
|
|
||||||
gamemap = 533; titlescrollspeed = (int32_t)ANG1; //@TODO don't hardcode bich
|
if (titlemap)
|
||||||
G_DoLoadLevel(true);
|
{
|
||||||
G_SetGamestate(GS_TITLESCREEN);
|
gamemap = titlemap;
|
||||||
players[displayplayer].playerstate = PST_DEAD; // Don't spawn the player in dummy (I'm still a filthy cheater)
|
|
||||||
//CON_ClearHUD();
|
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.
|
// IWAD dependent stuff.
|
||||||
|
|
||||||
|
@ -1471,42 +1488,51 @@ void F_TitleScreenDrawer(void)
|
||||||
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
V_DrawScaledPatch(30, 14, 0, ttwing);
|
// rei|miru: use title pics?
|
||||||
|
if (hidetitlepics)
|
||||||
if (finalecount < 57)
|
|
||||||
{
|
{
|
||||||
if (finalecount == 35)
|
return;
|
||||||
V_DrawScaledPatch(115, 15, 0, ttspop1);
|
|
||||||
else if (finalecount == 36)
|
|
||||||
V_DrawScaledPatch(114, 15, 0,ttspop2);
|
|
||||||
else if (finalecount == 37)
|
|
||||||
V_DrawScaledPatch(113, 15, 0,ttspop3);
|
|
||||||
else if (finalecount == 38)
|
|
||||||
V_DrawScaledPatch(112, 15, 0,ttspop4);
|
|
||||||
else if (finalecount == 39)
|
|
||||||
V_DrawScaledPatch(111, 15, 0,ttspop5);
|
|
||||||
else if (finalecount == 40)
|
|
||||||
V_DrawScaledPatch(110, 15, 0, ttspop6);
|
|
||||||
else if (finalecount >= 41 && finalecount <= 44)
|
|
||||||
V_DrawScaledPatch(109, 15, 0, ttspop7);
|
|
||||||
else if (finalecount >= 45 && finalecount <= 48)
|
|
||||||
V_DrawScaledPatch(108, 12, 0, ttsprep1);
|
|
||||||
else if (finalecount >= 49 && finalecount <= 52)
|
|
||||||
V_DrawScaledPatch(107, 9, 0, ttsprep2);
|
|
||||||
else if (finalecount >= 53 && finalecount <= 56)
|
|
||||||
V_DrawScaledPatch(106, 6, 0, ttswip1);
|
|
||||||
V_DrawScaledPatch(93, 106, 0, ttsonic);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(93, 106, 0,ttsonic);
|
V_DrawScaledPatch(30, 14, 0, ttwing);
|
||||||
if (finalecount/5 & 1)
|
|
||||||
V_DrawScaledPatch(100, 3, 0,ttswave1);
|
|
||||||
else
|
|
||||||
V_DrawScaledPatch(100,3, 0,ttswave2);
|
|
||||||
}
|
|
||||||
|
|
||||||
V_DrawScaledPatch(48, 142, 0,ttbanner);
|
if (finalecount < 57)
|
||||||
|
{
|
||||||
|
if (finalecount == 35)
|
||||||
|
V_DrawScaledPatch(115, 15, 0, ttspop1);
|
||||||
|
else if (finalecount == 36)
|
||||||
|
V_DrawScaledPatch(114, 15, 0,ttspop2);
|
||||||
|
else if (finalecount == 37)
|
||||||
|
V_DrawScaledPatch(113, 15, 0,ttspop3);
|
||||||
|
else if (finalecount == 38)
|
||||||
|
V_DrawScaledPatch(112, 15, 0,ttspop4);
|
||||||
|
else if (finalecount == 39)
|
||||||
|
V_DrawScaledPatch(111, 15, 0,ttspop5);
|
||||||
|
else if (finalecount == 40)
|
||||||
|
V_DrawScaledPatch(110, 15, 0, ttspop6);
|
||||||
|
else if (finalecount >= 41 && finalecount <= 44)
|
||||||
|
V_DrawScaledPatch(109, 15, 0, ttspop7);
|
||||||
|
else if (finalecount >= 45 && finalecount <= 48)
|
||||||
|
V_DrawScaledPatch(108, 12, 0, ttsprep1);
|
||||||
|
else if (finalecount >= 49 && finalecount <= 52)
|
||||||
|
V_DrawScaledPatch(107, 9, 0, ttsprep2);
|
||||||
|
else if (finalecount >= 53 && finalecount <= 56)
|
||||||
|
V_DrawScaledPatch(106, 6, 0, ttswip1);
|
||||||
|
V_DrawScaledPatch(93, 106, 0, ttsonic);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
V_DrawScaledPatch(93, 106, 0,ttsonic);
|
||||||
|
if (finalecount/5 & 1)
|
||||||
|
V_DrawScaledPatch(100, 3, 0,ttswave1);
|
||||||
|
else
|
||||||
|
V_DrawScaledPatch(100,3, 0,ttswave2);
|
||||||
|
}
|
||||||
|
|
||||||
|
V_DrawScaledPatch(48, 142, 0,ttbanner);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// (no longer) De-Demo'd Title Screen
|
// (no longer) De-Demo'd Title Screen
|
||||||
|
|
|
@ -60,6 +60,8 @@ void F_StartContinue(void);
|
||||||
void F_ContinueTicker(void);
|
void F_ContinueTicker(void);
|
||||||
void F_ContinueDrawer(void);
|
void F_ContinueDrawer(void);
|
||||||
|
|
||||||
|
extern INT16 titlemap;
|
||||||
|
extern boolean hidetitlepics;
|
||||||
extern INT32 titlescrollspeed;
|
extern INT32 titlescrollspeed;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -120,6 +120,9 @@ INT16 spstage_start;
|
||||||
INT16 sstage_start;
|
INT16 sstage_start;
|
||||||
INT16 sstage_end;
|
INT16 sstage_end;
|
||||||
|
|
||||||
|
INT16 titlemap;
|
||||||
|
boolean hidetitlepics = false;
|
||||||
|
|
||||||
boolean looptitle = false;
|
boolean looptitle = false;
|
||||||
boolean useNightsSS = false;
|
boolean useNightsSS = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue