From 5c6a48b2ff362a70416a6a00fda7d06e0f276f2d Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 02:43:29 +0100 Subject: i am in hell --- src/T2DLL/T2PaletteAnime.h | 58 +++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'src/T2DLL/T2PaletteAnime.h') diff --git a/src/T2DLL/T2PaletteAnime.h b/src/T2DLL/T2PaletteAnime.h index 778834d..31497b2 100644 --- a/src/T2DLL/T2PaletteAnime.h +++ b/src/T2DLL/T2PaletteAnime.h @@ -1,7 +1,7 @@ #pragma once #include "common.h" -class AFX_EXT_CLASS T2PaletteAnime { +class AFX_CLASS_EXPORT T2PaletteAnime { public: T2PaletteAnime(T2WorldDef*, T2DateTime*); virtual ~T2PaletteAnime(); @@ -17,34 +17,15 @@ public: T2PaletteAnimeDef* GetPaletteAnimeDef() const { return mPaletteAnimeDef; } int GetSkyState() const { return mSkyState; } int GetSkyCount() const { return mSkyCount; } + void IncSECount(); int GetSECount() const { return mSECount; } LOGPALETTE* GetInterPalette() { return mInterCTab; } int GetSEKind() const { return mSEKind; } BOOL IsUpdated() const { return mPaletteUpdated; } void ClearUpdate() { mPaletteUpdated = false; } - void IncSECount() { - mSECount++; - if (mSECount >= 60) - mSECount = 0; - } - BOOL IsFine() const { - BOOL result = true; - if (mSkyState == 3 || mSkyState == 4) - result = false; - return result; - } - BOOL IsSnow() const { return (mSkyState == 4); } - BOOL IsShininDay() const { - switch (mSkyState) { - case 3: - case 4: - case 9: - case 10: - return false; - default: - return true; - } - } + BOOL IsFine() const; + BOOL IsSnow() const; + BOOL IsShininDay() const; protected: void RotatePalette(LOGPALETTE*, unsigned int, unsigned int) const; @@ -70,3 +51,32 @@ private: T2DayLightFilter *mDayLightFilter; T2WeatherFilter *mWeatherFilter; }; + +inline void T2PaletteAnime::IncSECount() { + mSECount++; + if (mSECount >= 60) + mSECount = 0; +} + +inline BOOL T2PaletteAnime::IsFine() const { + BOOL result = true; + if (mSkyState == 3 || mSkyState == 4) + result = false; + return result; +} + +inline BOOL T2PaletteAnime::IsSnow() const { + return (mSkyState == 4); +} + +inline BOOL T2PaletteAnime::IsShininDay() const { + switch (mSkyState) { + case 3: + case 4: + case 9: + case 10: + return false; + default: + return true; + } +} -- cgit v1.2.3