mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
miru asked me for help and im a smelly toast
* Fix Crashes With Respect To Switching Between The Normal Title And Her Magic One * Clean Up A Bit Of Code
This commit is contained in:
parent
1c93b07c86
commit
217f7ebd38
4 changed files with 50 additions and 55 deletions
|
@ -319,7 +319,7 @@ static void D_Display(void)
|
||||||
switch (gamestate)
|
switch (gamestate)
|
||||||
{
|
{
|
||||||
case GS_TITLESCREEN:
|
case GS_TITLESCREEN:
|
||||||
if (!gamemap) {
|
if (!titlemapinaction) {
|
||||||
F_TitleScreenDrawer();
|
F_TitleScreenDrawer();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ static void D_Display(void)
|
||||||
|
|
||||||
// clean up border stuff
|
// clean up border stuff
|
||||||
// see if the border needs to be initially drawn
|
// see if the border needs to be initially drawn
|
||||||
if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && gamemap))
|
if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction))
|
||||||
{
|
{
|
||||||
// draw the view directly
|
// draw the view directly
|
||||||
|
|
||||||
|
@ -440,11 +440,12 @@ static void D_Display(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gamestate == GS_LEVEL)
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
ST_Drawer();
|
ST_Drawer();
|
||||||
|
HU_Drawer();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
F_TitleScreenDrawer();
|
F_TitleScreenDrawer();
|
||||||
|
|
||||||
HU_Drawer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// change gamma if needed
|
// change gamma if needed
|
||||||
|
|
|
@ -32,11 +32,13 @@
|
||||||
#include "y_inter.h"
|
#include "y_inter.h"
|
||||||
#include "m_cond.h"
|
#include "m_cond.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_setup.h"
|
||||||
|
|
||||||
// Stage of animation:
|
// Stage of animation:
|
||||||
// 0 = text, 1 = art screen
|
// 0 = text, 1 = art screen
|
||||||
static INT32 finalecount;
|
static INT32 finalecount;
|
||||||
INT32 titlescrollspeed = 80;
|
INT32 titlescrollspeed = 80;
|
||||||
|
boolean titlemapinaction = false;
|
||||||
|
|
||||||
static INT32 timetonext; // Delay between screen changes
|
static INT32 timetonext; // Delay between screen changes
|
||||||
static INT32 continuetime; // Short delay when continuing
|
static INT32 continuetime; // Short delay when continuing
|
||||||
|
@ -1427,27 +1429,26 @@ void F_StartTitleScreen(void)
|
||||||
|
|
||||||
if (titlemap)
|
if (titlemap)
|
||||||
{
|
{
|
||||||
|
titlemapinaction = true;
|
||||||
gamemap = titlemap;
|
gamemap = titlemap;
|
||||||
|
|
||||||
if (!mapheaderinfo[gamemap-1])
|
if (!mapheaderinfo[gamemap-1])
|
||||||
P_AllocMapHeader(gamemap-1);
|
P_AllocMapHeader(gamemap-1);
|
||||||
|
|
||||||
G_DoLoadLevel(true);
|
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)
|
players[displayplayer].playerstate = PST_DEAD; // Don't spawn the player in dummy (I'm still a filthy cheater)
|
||||||
|
camera.subsector = NULL; // toast is filthy too
|
||||||
//CON_ClearHUD();
|
//CON_ClearHUD();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gamemap = 0;
|
titlemapinaction = false;
|
||||||
|
gamemap = 1; // g_game.c
|
||||||
if (!mapheaderinfo[gamemap-1])
|
|
||||||
P_AllocMapHeader(gamemap-1);
|
|
||||||
|
|
||||||
G_SetGamestate(GS_TITLESCREEN);
|
|
||||||
CON_ClearHUD();
|
CON_ClearHUD();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_SetGamestate(GS_TITLESCREEN);
|
||||||
|
|
||||||
// IWAD dependent stuff.
|
// IWAD dependent stuff.
|
||||||
|
|
||||||
S_ChangeMusicInternal("_title", looptitle);
|
S_ChangeMusicInternal("_title", looptitle);
|
||||||
|
@ -1480,9 +1481,8 @@ void F_TitleScreenDrawer(void)
|
||||||
return; // We likely came here from retrying. Don't do a damn thing.
|
return; // We likely came here from retrying. Don't do a damn thing.
|
||||||
|
|
||||||
// Draw that sky!
|
// Draw that sky!
|
||||||
if (!gamemap) {
|
if (!titlemapinaction)
|
||||||
F_SkyScroll(titlescrollspeed);
|
F_SkyScroll(titlescrollspeed);
|
||||||
}
|
|
||||||
|
|
||||||
// Don't draw outside of the title screewn, or if the patch isn't there.
|
// Don't draw outside of the title screewn, or if the patch isn't there.
|
||||||
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||||
|
@ -1490,11 +1490,8 @@ void F_TitleScreenDrawer(void)
|
||||||
|
|
||||||
// rei|miru: use title pics?
|
// rei|miru: use title pics?
|
||||||
if (hidetitlepics)
|
if (hidetitlepics)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
V_DrawScaledPatch(30, 14, 0, ttwing);
|
V_DrawScaledPatch(30, 14, 0, ttwing);
|
||||||
|
|
||||||
if (finalecount < 57)
|
if (finalecount < 57)
|
||||||
|
@ -1531,8 +1528,6 @@ void F_TitleScreenDrawer(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawScaledPatch(48, 142, 0,ttbanner);
|
V_DrawScaledPatch(48, 142, 0,ttbanner);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// (no longer) De-Demo'd Title Screen
|
// (no longer) De-Demo'd Title Screen
|
||||||
|
@ -1546,7 +1541,7 @@ void F_TitleScreenTicker(boolean run)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Do a lil' camera spin if a title map is loaded.
|
// Do a lil' camera spin if a title map is loaded.
|
||||||
if (gamemap) {
|
if (titlemapinaction) {
|
||||||
camera.x = camera.y = camera.height = camera.aiming = 0;
|
camera.x = camera.y = camera.height = camera.aiming = 0;
|
||||||
camera.z = 128*FRACUNIT;
|
camera.z = 128*FRACUNIT;
|
||||||
camera.angle += titlescrollspeed;
|
camera.angle += titlescrollspeed;
|
||||||
|
|
|
@ -60,9 +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;
|
||||||
|
extern boolean titlemapinaction;
|
||||||
|
|
||||||
//
|
//
|
||||||
// WIPE
|
// WIPE
|
||||||
|
|
|
@ -120,7 +120,7 @@ INT16 spstage_start;
|
||||||
INT16 sstage_start;
|
INT16 sstage_start;
|
||||||
INT16 sstage_end;
|
INT16 sstage_end;
|
||||||
|
|
||||||
INT16 titlemap;
|
INT16 titlemap = 0;
|
||||||
boolean hidetitlepics = false;
|
boolean hidetitlepics = false;
|
||||||
|
|
||||||
boolean looptitle = false;
|
boolean looptitle = false;
|
||||||
|
@ -1988,7 +1988,7 @@ void G_Ticker(boolean run)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_TITLESCREEN:
|
case GS_TITLESCREEN:
|
||||||
if (gamemap) P_Ticker(run); // then intentionally fall through
|
if (titlemapinaction) P_Ticker(run); // then intentionally fall through
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
F_TitleScreenTicker(run);
|
F_TitleScreenTicker(run);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue