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
|
||||
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();
|
||||
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,42 +1488,51 @@ void F_TitleScreenDrawer(void)
|
|||
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||
return;
|
||||
|
||||
V_DrawScaledPatch(30, 14, 0, ttwing);
|
||||
|
||||
if (finalecount < 57)
|
||||
// rei|miru: use title pics?
|
||||
if (hidetitlepics)
|
||||
{
|
||||
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);
|
||||
return;
|
||||
}
|
||||
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(30, 14, 0, ttwing);
|
||||
|
||||
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
|
||||
|
|
|
@ -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