mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make timing of level fade-in consistent, relative to title card
This commit is contained in:
parent
9e283a4993
commit
3cdfa86b11
4 changed files with 30 additions and 10 deletions
|
|
@ -587,10 +587,10 @@ static void D_Display(void)
|
||||||
// of problems could be solved (including GL support)
|
// of problems could be solved (including GL support)
|
||||||
if (gamestate != GS_TITLESCREEN
|
if (gamestate != GS_TITLESCREEN
|
||||||
&& G_GamestateUsesLevel() == true
|
&& G_GamestateUsesLevel() == true
|
||||||
&& timeinmap < 16)
|
&& lt_fade < 16)
|
||||||
{
|
{
|
||||||
// Level fade-in
|
// Level fade-in
|
||||||
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2));
|
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(lt_fade*2));
|
||||||
}
|
}
|
||||||
|
|
||||||
VID_DisplaySoftwareScreen();
|
VID_DisplaySoftwareScreen();
|
||||||
|
|
|
||||||
12
src/g_game.c
12
src/g_game.c
|
|
@ -1198,6 +1198,12 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
//
|
//
|
||||||
void G_StartTitleCard(void)
|
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.
|
// The title card has been disabled for this map.
|
||||||
// Oh well.
|
// Oh well.
|
||||||
if (demo.rewinding || !G_IsTitleCardAvailable())
|
if (demo.rewinding || !G_IsTitleCardAvailable())
|
||||||
|
|
@ -1206,12 +1212,6 @@ void G_StartTitleCard(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear the hud
|
|
||||||
CON_ClearHUD();
|
|
||||||
|
|
||||||
// prepare status bar
|
|
||||||
ST_startTitleCard();
|
|
||||||
|
|
||||||
// play the sound
|
// play the sound
|
||||||
if (gamestate != GS_CEREMONY)
|
if (gamestate != GS_CEREMONY)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -541,6 +541,7 @@ void ST_drawDebugInfo(void)
|
||||||
|
|
||||||
tic_t lt_ticker = 0, lt_lasttic = 0;
|
tic_t lt_ticker = 0, lt_lasttic = 0;
|
||||||
tic_t lt_exitticker = 0, lt_endtime = 0;
|
tic_t lt_exitticker = 0, lt_endtime = 0;
|
||||||
|
tic_t lt_fade = 0;
|
||||||
|
|
||||||
// SRB2KART: HUD shit for new titlecards:
|
// SRB2KART: HUD shit for new titlecards:
|
||||||
static patch_t *tcchev1;
|
static patch_t *tcchev1;
|
||||||
|
|
@ -590,6 +591,7 @@ INT32 eggx1, eggx2, eggy1, eggy2;
|
||||||
#define BASE_CHEV2Y (135)
|
#define BASE_CHEV2Y (135)
|
||||||
|
|
||||||
#define TTANIMTHRESHOLD (TICRATE)
|
#define TTANIMTHRESHOLD (TICRATE)
|
||||||
|
#define TTFADESTART (TTANIMTHRESHOLD-4)
|
||||||
#define TTANIMSTART (TTANIMTHRESHOLD-16)
|
#define TTANIMSTART (TTANIMTHRESHOLD-16)
|
||||||
#define TTANIMENDTHRESHOLD (TICRATE*3)
|
#define TTANIMENDTHRESHOLD (TICRATE*3)
|
||||||
#define TTANIMEND (TICRATE*4)
|
#define TTANIMEND (TICRATE*4)
|
||||||
|
|
@ -673,6 +675,7 @@ void ST_startTitleCard(void)
|
||||||
// initialize HUD variables
|
// initialize HUD variables
|
||||||
lt_ticker = lt_exitticker = lt_lasttic = 0;
|
lt_ticker = lt_exitticker = lt_lasttic = 0;
|
||||||
lt_endtime = 4*TICRATE; // + (10*NEWTICRATERATIO);
|
lt_endtime = 4*TICRATE; // + (10*NEWTICRATERATIO);
|
||||||
|
lt_fade = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -700,6 +703,11 @@ void ST_runTitleCard(void)
|
||||||
INT32 auxticker;
|
INT32 auxticker;
|
||||||
boolean doroundicon = (marathonmode || (roundqueue.size > 0 && roundqueue.position > 0));
|
boolean doroundicon = (marathonmode || (roundqueue.size > 0 && roundqueue.position > 0));
|
||||||
|
|
||||||
|
if (run && lt_fade < 16)
|
||||||
|
{
|
||||||
|
lt_fade++;
|
||||||
|
}
|
||||||
|
|
||||||
if (!G_IsTitleCardAvailable())
|
if (!G_IsTitleCardAvailable())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -740,9 +748,20 @@ void ST_runTitleCard(void)
|
||||||
}
|
}
|
||||||
// No matter the circumstances, scroll the WARN...
|
// No matter the circumstances, scroll the WARN...
|
||||||
bannerx = -((lt_ticker*2)%((encoremode ? twarn2 : twarn)->width));
|
bannerx = -((lt_ticker*2)%((encoremode ? twarn2 : twarn)->width));
|
||||||
|
|
||||||
|
if (run && lt_ticker < PRELEVELTIME)
|
||||||
|
{
|
||||||
|
lt_fade--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// LEVEL FADE
|
||||||
|
if (run && lt_ticker < TTFADESTART)
|
||||||
|
{
|
||||||
|
lt_fade--; // don't fade yet
|
||||||
|
}
|
||||||
|
|
||||||
// TITLECARD START
|
// TITLECARD START
|
||||||
if (lt_ticker < TTANIMSTART)
|
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
|
// 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
|
// Level fade-in
|
||||||
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2));
|
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(lt_fade*2));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (stagetitle)
|
if (stagetitle)
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ void ST_preLevelTitleCardDrawer(void);
|
||||||
|
|
||||||
extern tic_t lt_ticker, lt_lasttic;
|
extern tic_t lt_ticker, lt_lasttic;
|
||||||
extern tic_t lt_exitticker, lt_endtime;
|
extern tic_t lt_exitticker, lt_endtime;
|
||||||
|
extern tic_t lt_fade;
|
||||||
|
|
||||||
void ST_DrawServerSplash(boolean timelimited);
|
void ST_DrawServerSplash(boolean timelimited);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue