#pragma once #include "common.h" class AFX_EXT_CLASS T2PaletteAnime { public: T2PaletteAnime(T2WorldDef*, T2DateTime*); virtual ~T2PaletteAnime(); int IsSETime(); void ChangeSE(); void RotateDayLightPalette(unsigned int, unsigned int) const; void MinuteChanged(T2DateTime*); void DoAnimatePalette(); void ReplaceDayLightPalette(int); void SetSkyState(int, int); T2PaletteAnimeDef* GetPaletteAnimeDef() const { return mPaletteAnimeDef; } int GetSkyState() const { return mSkyState; } int GetSkyCount() const { return mSkyCount; } 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; } } protected: void RotatePalette(LOGPALETTE*, unsigned int, unsigned int) const; void AdjustSkyState(T2DateTime*); int IsChangeSkyTime(); void ChangeSkyColor(); private: void Init(); LOGPALETTE* MakeInterCTab(); void AdjustWindowColor(T2DateTime*); T2WorldDef *mWorldDef; T2WorldPlugin *mWorldPlugin; T2PaletteAnimeDef *mPaletteAnimeDef; LOGPALETTE *mInterCTab; BOOL mPaletteUpdated; int mSkyState; int mSkyCount; int mSECount; int mSEKind; unsigned int mSETimeNextTick; T2DayLightFilter *mDayLightFilter; T2WeatherFilter *mWeatherFilter; };