mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-24 06:21:18 +00:00
Goner Setup Polish
- Imply passage of time when returning from Tutorial to Outro by resetting all the background variables - Add an additive layer to the Options cogs, so they show up over an extremely dark background - Metal Sonic will not focus on Tails/Eggman until video is restored - Don't draw the Miles Electric transparent unless it's completely in its upright position
This commit is contained in:
parent
b308a81e9d
commit
c6edfa0de5
4 changed files with 68 additions and 44 deletions
|
|
@ -207,6 +207,7 @@ extern menu_t MAIN_GonerDef;
|
|||
|
||||
void M_GonerTick(void);
|
||||
void M_GonerBGTick(void);
|
||||
void M_GonerBGImplyPassageOfTime(void);
|
||||
void M_DrawGonerBack(void);
|
||||
void M_GonerProfile(INT32 choice);
|
||||
void M_GonerTutorial(INT32 choice);
|
||||
|
|
|
|||
|
|
@ -3930,10 +3930,13 @@ void M_DrawMPServerBrowser(void)
|
|||
// Draws the cogs and also the options background!
|
||||
void M_DrawOptionsCogs(void)
|
||||
{
|
||||
boolean trulystarted = M_GameTrulyStarted();
|
||||
UINT32 tick = ((optionsmenu.ticker/10) % 3) + 1;
|
||||
|
||||
// the background isn't drawn outside of being in the main menu state.
|
||||
if (gamestate == GS_MENU && M_GameTrulyStarted())
|
||||
if (gamestate == GS_MENU && trulystarted)
|
||||
{
|
||||
patch_t *back[3] = {W_CachePatchName("OPT_BG1", PU_CACHE), W_CachePatchName("OPT_BG2", PU_CACHE), W_CachePatchName("OPT_BG3", PU_CACHE)};
|
||||
patch_t *back = W_CachePatchName(va("OPT_BG%u", tick), PU_CACHE);
|
||||
INT32 tflag = 0;
|
||||
UINT8 *c;
|
||||
UINT8 *c2; // colormap for the one we're changing
|
||||
|
|
@ -3941,19 +3944,24 @@ void M_DrawOptionsCogs(void)
|
|||
if (optionsmenu.fade)
|
||||
{
|
||||
c2 = R_GetTranslationColormap(TC_DEFAULT, optionsmenu.lastcolour, GTC_CACHE);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, back[(optionsmenu.ticker/10) %3], c2);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, back, c2);
|
||||
|
||||
// prepare fade flag:
|
||||
tflag = min(V_90TRANS, (optionsmenu.fade)<<V_ALPHASHIFT);
|
||||
|
||||
}
|
||||
c = R_GetTranslationColormap(TC_DEFAULT, optionsmenu.currcolour, GTC_CACHE);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, tflag, back[(optionsmenu.ticker/10) %3], c);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, tflag, back, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
patch_t *back_pause[3] = {W_CachePatchName("OPT_BAK1", PU_CACHE), W_CachePatchName("OPT_BAK2", PU_CACHE), W_CachePatchName("OPT_BAK3", PU_CACHE)};
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, V_MODULATE, back_pause[(optionsmenu.ticker/10) %3], NULL);
|
||||
patch_t *back_pause = W_CachePatchName(va("OPT_BAK%u", tick), PU_CACHE);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, V_MODULATE, back_pause, NULL);
|
||||
|
||||
if (!trulystarted)
|
||||
{
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, (V_ADD|V_70TRANS), back_pause, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -586,6 +586,7 @@ void M_StartControlPanel(void)
|
|||
)
|
||||
{
|
||||
gamedata->gonerlevel = GDGONER_OUTRO;
|
||||
M_GonerBGImplyPassageOfTime();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ public:
|
|||
GonerBGData()
|
||||
{
|
||||
x = focusx = 0;
|
||||
y = focusy = 0;
|
||||
y = focusy = 20*FRACUNIT;
|
||||
|
||||
darkframes = 0;
|
||||
|
||||
|
|
@ -228,39 +228,46 @@ public:
|
|||
|
||||
void Tick()
|
||||
{
|
||||
gonerspeakers_t focuscurrent = MAXGONERSPEAKERS;
|
||||
if (currentMenu == &MAIN_GonerDef && !LinesOutput.empty())
|
||||
{
|
||||
focuscurrent = LinesOutput.front().speaker;
|
||||
}
|
||||
|
||||
if (focuslast != focuscurrent)
|
||||
{
|
||||
focusdelta = FRACUNIT;
|
||||
x = focusx;
|
||||
y = focusy;
|
||||
|
||||
switch (focuscurrent)
|
||||
{
|
||||
case GONERSPEAKER_TAILS:
|
||||
focusx = -10*FRACUNIT;
|
||||
focusy = 0;
|
||||
break;
|
||||
case GONERSPEAKER_EGGMAN:
|
||||
focusx = 10*FRACUNIT;
|
||||
focusy = 0;
|
||||
break;
|
||||
default:
|
||||
focusx = 0;
|
||||
focusy = 20*FRACUNIT;
|
||||
break;
|
||||
}
|
||||
|
||||
focuslast = focuscurrent;
|
||||
}
|
||||
|
||||
// This is the visual feed sputtering in and out.
|
||||
if (darkframes)
|
||||
darkframes--;
|
||||
else if (gamedata->gonerlevel > GDGONER_VIDEO)
|
||||
{
|
||||
// Everything in here is Metal Sonic's response to stimulus.
|
||||
|
||||
gonerspeakers_t focuscurrent = MAXGONERSPEAKERS;
|
||||
if (currentMenu == &MAIN_GonerDef && !LinesOutput.empty())
|
||||
{
|
||||
focuscurrent = LinesOutput.front().speaker;
|
||||
}
|
||||
|
||||
if (focuslast != focuscurrent)
|
||||
{
|
||||
focusdelta = FRACUNIT;
|
||||
x = focusx;
|
||||
y = focusy;
|
||||
|
||||
switch (focuscurrent)
|
||||
{
|
||||
case GONERSPEAKER_TAILS:
|
||||
focusx = -10*FRACUNIT;
|
||||
focusy = 0;
|
||||
break;
|
||||
case GONERSPEAKER_EGGMAN:
|
||||
focusx = 10*FRACUNIT;
|
||||
focusy = 0;
|
||||
break;
|
||||
default:
|
||||
focusx = 0;
|
||||
focusy = 20*FRACUNIT;
|
||||
break;
|
||||
}
|
||||
|
||||
focuslast = focuscurrent;
|
||||
}
|
||||
}
|
||||
|
||||
// Everything below this is the real world.
|
||||
|
||||
if (miles_timetoblink == 0)
|
||||
{
|
||||
|
|
@ -630,6 +637,7 @@ void M_AddGonerLines(void)
|
|||
LinesToDigest.emplace_front(GONERSPEAKER_TAILS, 0,
|
||||
"Remember, MS-1. Even when you move on from this setup, you "\
|
||||
"can always change your ""\x87""Options""\x80"" at any time from the menu.");
|
||||
LinesToDigest.emplace_front(0, Miles_Look_Electric);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -637,7 +645,6 @@ void M_AddGonerLines(void)
|
|||
{
|
||||
if (!leftoff)
|
||||
{
|
||||
LinesToDigest.emplace_front(0, Miles_Look_Electric);
|
||||
LinesToDigest.emplace_front(GONERSPEAKER_EGGMAN, TICRATE/3,
|
||||
"And... the training data is completed.");
|
||||
}
|
||||
|
|
@ -764,6 +771,11 @@ void M_GonerBGTick(void)
|
|||
goner_background.Tick();
|
||||
}
|
||||
|
||||
void M_GonerBGImplyPassageOfTime(void)
|
||||
{
|
||||
goner_background = GonerBGData();
|
||||
}
|
||||
|
||||
void M_GonerTick(void)
|
||||
{
|
||||
static bool first = true;
|
||||
|
|
@ -1010,17 +1022,19 @@ void M_DrawGonerBack(void)
|
|||
)));
|
||||
}
|
||||
|
||||
if (goner_background.miles_electric_delta < FRACUNIT)
|
||||
bool drawarms = false;
|
||||
|
||||
if (goner_background.miles_electric_delta == FRACUNIT)
|
||||
{
|
||||
drawarms = (milesfocus && goner_background.miles_electric);
|
||||
}
|
||||
else
|
||||
{
|
||||
goner_background.miles_electric_delta += renderdeltatics/(TICRATE/3);
|
||||
if (goner_background.miles_electric_delta > FRACUNIT)
|
||||
goner_background.miles_electric_delta = FRACUNIT;
|
||||
}
|
||||
|
||||
bool drawarms = (
|
||||
goner_background.miles_electric
|
||||
&& milesfocus
|
||||
);
|
||||
if (drawarms)
|
||||
{
|
||||
miles.patch("GON_TA1");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue