mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 09:02:06 +00:00
Titlemap - Maincfg variables, unplayability crash fixes
This commit is contained in:
parent
e87bb36c03
commit
f076ff2ca7
7 changed files with 99 additions and 46 deletions
|
@ -489,7 +489,7 @@ static void D_Display(void)
|
|||
if (rendermode != render_none)
|
||||
{
|
||||
// miru: we can use the mapheaderinfo to change the forced wipe the instant the map loads
|
||||
if (mapheaderinfo[gamemap-1]->postlevelwipe && mapheaderinfo[gamemap-1]->postlevelwipe < 100)
|
||||
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->postlevelwipe && mapheaderinfo[gamemap-1]->postlevelwipe < 100)
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, mapheaderinfo[gamemap-1]->wipecolor);
|
||||
|
|
|
@ -3018,6 +3018,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);
|
||||
|
|
|
@ -127,6 +127,9 @@ extern INT16 sstage_end;
|
|||
extern INT16 bootmap; // rei/miru: bootmap for loading a map on startup (skips intro+title)
|
||||
//extern INT16 returnTobootmap; // rei/miru: return to bootmap when attempting to go to the REAL title?
|
||||
|
||||
extern INT16 titlemap;
|
||||
extern boolean hidetitlepics;
|
||||
|
||||
extern boolean looptitle;
|
||||
extern boolean useNightsSS;
|
||||
|
||||
|
|
|
@ -1423,11 +1423,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.
|
||||
|
||||
|
@ -1469,42 +1486,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;
|
||||
|
||||
//
|
||||
|
|
|
@ -122,6 +122,9 @@ INT16 sstage_end;
|
|||
INT16 bootmap; // rei/miru: bootmap for loading a map on startup (skips intro+title)
|
||||
//INT16 returnTobootmap; // rei/miru: return to bootmap when attempting to go to the REAL title?
|
||||
|
||||
INT16 titlemap;
|
||||
boolean hidetitlepics = false;
|
||||
|
||||
boolean looptitle = false;
|
||||
boolean useNightsSS = false;
|
||||
|
||||
|
|
|
@ -2602,22 +2602,22 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
// But only if we didn't do the special stage wipe
|
||||
if (rendermode != render_none && !ranspecialwipe)
|
||||
{
|
||||
// miru: we could add the option to render different wipes here
|
||||
if (mapheaderinfo[gamemap-1]->levelwipe && mapheaderinfo[gamemap-1]->levelwipe < 100)
|
||||
{
|
||||
// miru: we could add the option to render different wipes here
|
||||
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->levelwipe && mapheaderinfo[gamemap-1]->levelwipe < 100)
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, mapheaderinfo[gamemap-1]->wipecolor);
|
||||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(mapheaderinfo[gamemap-1]->levelwipe, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
F_RunWipe(mapheaderinfo[gamemap-1]->levelwipe, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
||||
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue