diff --git a/src/d_main.c b/src/d_main.c index 93183e6e0..4057bf8d6 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -587,10 +587,10 @@ static void D_Display(void) // of problems could be solved (including GL support) if (gamestate != GS_TITLESCREEN && G_GamestateUsesLevel() == true - && timeinmap < 16) + && lt_fade < 16) { // Level fade-in - V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2)); + V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(lt_fade*2)); } VID_DisplaySoftwareScreen(); diff --git a/src/g_game.c b/src/g_game.c index 66a6bf0a2..ac05c0b6f 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1198,6 +1198,12 @@ void G_DoLoadLevel(boolean resetplayer) // void G_StartTitleCard(void) { + // clear the hud + CON_ClearHUD(); + + // prepare status bar + ST_startTitleCard(); // <-- always must be called to init some variables + // The title card has been disabled for this map. // Oh well. if (demo.rewinding || !G_IsTitleCardAvailable()) @@ -1206,12 +1212,6 @@ void G_StartTitleCard(void) return; } - // clear the hud - CON_ClearHUD(); - - // prepare status bar - ST_startTitleCard(); - // play the sound if (gamestate != GS_CEREMONY) { diff --git a/src/st_stuff.c b/src/st_stuff.c index ae6804234..85eb89706 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -541,6 +541,7 @@ void ST_drawDebugInfo(void) tic_t lt_ticker = 0, lt_lasttic = 0; tic_t lt_exitticker = 0, lt_endtime = 0; +tic_t lt_fade = 0; // SRB2KART: HUD shit for new titlecards: static patch_t *tcchev1; @@ -590,6 +591,7 @@ INT32 eggx1, eggx2, eggy1, eggy2; #define BASE_CHEV2Y (135) #define TTANIMTHRESHOLD (TICRATE) +#define TTFADESTART (TTANIMTHRESHOLD-4) #define TTANIMSTART (TTANIMTHRESHOLD-16) #define TTANIMENDTHRESHOLD (TICRATE*3) #define TTANIMEND (TICRATE*4) @@ -673,6 +675,7 @@ void ST_startTitleCard(void) // initialize HUD variables lt_ticker = lt_exitticker = lt_lasttic = 0; lt_endtime = 4*TICRATE; // + (10*NEWTICRATERATIO); + lt_fade = 0; } // @@ -700,6 +703,11 @@ void ST_runTitleCard(void) INT32 auxticker; boolean doroundicon = (marathonmode || (roundqueue.size > 0 && roundqueue.position > 0)); + if (run && lt_fade < 16) + { + lt_fade++; + } + if (!G_IsTitleCardAvailable()) return; @@ -740,9 +748,20 @@ void ST_runTitleCard(void) } // No matter the circumstances, scroll the WARN... bannerx = -((lt_ticker*2)%((encoremode ? twarn2 : twarn)->width)); + + if (run && lt_ticker < PRELEVELTIME) + { + lt_fade--; + } } else { + // LEVEL FADE + if (run && lt_ticker < TTFADESTART) + { + lt_fade--; // don't fade yet + } + // TITLECARD START if (lt_ticker < TTANIMSTART) { @@ -1529,10 +1548,10 @@ void ST_Drawer(void) } // See d_main.c and V_DrawCustomFadeScreen for the hacks that prevents this being here - /*if (timeinmap < 16) + /*if (lt_fade < 16) { // Level fade-in - V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2)); + V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(lt_fade*2)); }*/ if (stagetitle) diff --git a/src/st_stuff.h b/src/st_stuff.h index 6754acf0e..27ef903be 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -74,6 +74,7 @@ void ST_preLevelTitleCardDrawer(void); extern tic_t lt_ticker, lt_lasttic; extern tic_t lt_exitticker, lt_endtime; +extern tic_t lt_fade; void ST_DrawServerSplash(boolean timelimited);