summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2PaletteAnime.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-01 02:43:29 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-01 02:43:29 +0100
commit5c6a48b2ff362a70416a6a00fda7d06e0f276f2d (patch)
tree62cf542c68d91aa6f7a4e3bfa9eddca4ab352970 /src/T2DLL/T2PaletteAnime.h
parentc0c336500955a23e344651e5412c9d9d441ef4ee (diff)
downloadt2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.tar.gz
t2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.zip
i am in hell
Diffstat (limited to 'src/T2DLL/T2PaletteAnime.h')
-rw-r--r--src/T2DLL/T2PaletteAnime.h58
1 files changed, 34 insertions, 24 deletions
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;
+ }
+}