Additional Goner BG polish

- Helper functions for eased X/Y
- Don't jump Metal's camera around when doing things rapidly
- Don't have ctrl alt del open mouths when not on the main Goner menu itself
This commit is contained in:
toaster 2023-12-18 20:14:23 +00:00
parent f955c639e8
commit c93e02af4a

View file

@ -221,11 +221,22 @@ public:
bool NeutralMouthCheck() bool NeutralMouthCheck()
{ {
return (LinesOutput.empty() return (currentMenu != &MAIN_GonerDef
|| LinesOutput.empty()
|| goner_typewriter.textDone || goner_typewriter.textDone
|| goner_typewriter.text.empty()); || goner_typewriter.text.empty());
} }
fixed_t GetX()
{
return Easing_InOutCubic(focusdelta, focusx, x);
}
fixed_t GetY()
{
return Easing_InOutCubic(focusdelta, focusy, y);
}
void Tick() void Tick()
{ {
// This is the visual feed sputtering in and out. // This is the visual feed sputtering in and out.
@ -243,9 +254,9 @@ public:
if (focuslast != focuscurrent) if (focuslast != focuscurrent)
{ {
x = GetX();
y = GetY();
focusdelta = FRACUNIT; focusdelta = FRACUNIT;
x = focusx;
y = focusy;
switch (focuscurrent) switch (focuscurrent)
{ {
@ -919,16 +930,8 @@ void M_DrawGonerBack(void)
return; return;
drawer = drawer.xy( drawer = drawer.xy(
FixedToFloat(Easing_InOutCubic( FixedToFloat(goner_background.GetX()),
goner_background.focusdelta, FixedToFloat(goner_background.GetY())
goner_background.focusx,
goner_background.x
)),
FixedToFloat(Easing_InOutCubic(
goner_background.focusdelta,
goner_background.focusy,
goner_background.y
))
); );
if (goner_background.focusdelta && renderdeltatics <= 2*FRACUNIT) if (goner_background.focusdelta && renderdeltatics <= 2*FRACUNIT)