diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 186bb00fb3..683b35918a 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -79,6 +79,13 @@ public: virtual void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) = 0; }; +static constexpr float XFAC = 0.3f; +static constexpr float YFAC = 0.3f; +static constexpr float ZFAC = 0.12f; +static constexpr float XSPEED = 0.05f; +static constexpr float YSPEED = 0.05f; +static constexpr float ZSPEED = 0.1f; + class MovingBackground : public Animation { public: void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override { @@ -109,16 +116,9 @@ public: } private: - static constexpr float XFAC = 0.3f; - static constexpr float YFAC = 0.3f; - static constexpr float ZFAC = 0.12f; - static constexpr float XSPEED = 0.05f; - static constexpr float YSPEED = 0.05f; - static constexpr float ZSPEED = 0.1f; - - float lastX_ = 0.0f; - float lastY_ = 0.0f; - float lastZ_ = 1.0f + std::max(XFAC, YFAC); + float lastX_ = 0.0f; + float lastY_ = 0.0f; + float lastZ_ = 1.0f + std::max(XFAC, YFAC); }; class WaveAnimation : public Animation {