diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 02:43:29 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 02:43:29 +0100 |
commit | 5c6a48b2ff362a70416a6a00fda7d06e0f276f2d (patch) | |
tree | 62cf542c68d91aa6f7a4e3bfa9eddca4ab352970 /src/T2DLL/T2WorldDef.h | |
parent | c0c336500955a23e344651e5412c9d9d441ef4ee (diff) | |
download | t2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.tar.gz t2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.zip |
i am in hell
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2WorldDef.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/T2DLL/T2WorldDef.h b/src/T2DLL/T2WorldDef.h index d1e9092..6aa3ee6 100644 --- a/src/T2DLL/T2WorldDef.h +++ b/src/T2DLL/T2WorldDef.h @@ -13,19 +13,29 @@ struct GradeDef { int m14; // grade up animation start frame }; -class AFX_EXT_CLASS T2WorldDef : public T2TemplatePlugin { +class AFX_CLASS_EXPORT T2WorldDef : public T2TemplatePlugin { public: T2WorldDef(DWORD inType, T2PluginSpecifier& inSpecifier, CResFile* inResFile, T2WorldPlugin* inPlugin); public: virtual ~T2WorldDef(); virtual void GetName(CString& outStr); virtual int GetSortKey() { return mWorldType; } + CPalette* GetPalette() { return GetPaletteAnimeDef()->GetTowerPalette(); } + BOOL IsUseMatterObject() const { return false; } + int GetOutViewKind() const { return mOutViewKind; } + T2PaletteAnimeDef* GetPaletteAnimeDef() const { return mPaletteAnimeDef; } + T2SeasonParamDef* GetSeasonParamDef() const { return mSeasonParamDef; } virtual int GetInitialFunds() const { return mInitialFunds; } + int GetHeight() const { return mHeight; } + int GetWidth() const { return mWidth; } + void GetBuildArea(RECT& rect) const { rect = mBuildArea; } virtual BOOL IsHoliday(T2DateTime* inDateTime) const { return false; } virtual BOOL IsRainyDay(T2DateTime* inDateTime) const { return false; } - virtual int ExchangeMoney(int v) const { - return (mMoneyNumerator == 1 && mMoneyDenominator == 1) ? v : ((v / mMoneyDenominator) * mMoneyNumerator); - } + BOOL IsStoppableFloor(int y) { + return !((y >= (mGroundLine - mLobbyHeight) && y < (mGroundLine - 1))); + } + int GetLobbyHeight() { return mLobbyHeight; } + virtual int ExchangeMoney(int v) const; virtual void DrawWorld(T2TowerDoc* inDoc); virtual void DoAnimate(T2TowerDoc* inDoc); virtual void DrawBkgnd(const RECT& inRect, T2TowerDoc* inDoc); @@ -39,6 +49,7 @@ public: virtual void DrawCrane(T2TowerDoc* inDoc, const RECT& inRect); virtual const char* GetMoneyUnit() { return mMoneyUnit; } virtual T2EventItem* MakeXEvent(T2TowerEvent* inTowerEvent, CResFile*, unsigned long, int); + T2Maru_Reggae* GetReggae() { return NULL; } virtual T2Transport* GetCruise(T2TowerEvent* inTowerEvent) { return NULL; } virtual void InitializeBkgndInfo(BkgndInfo* inBkgndInfoPtr); virtual void InitializeFloorInfo(T2FloorInfo* inFloorInfo); @@ -59,8 +70,8 @@ public: virtual void ViewModeChanged(T2TowerDoc* inDoc, VIEWMODE); virtual void ReplaceSkyOffscreen(int inResID); virtual BOOL3 ChangeFastSEProc(T2PaletteAnime* inPaletteAnime) { return BOOL3_NEG1; } + virtual BOOL3 ChangeSEProc(T2PaletteAnime* inPaletteAnime) { return BOOL3_NEG1; } virtual BOOL3 ChangeFastSEProc(T2PaletteAnime* inPaletteAnime, T2DateTime* inDateTime) { return BOOL3_NEG1; } - virtual BOOL3 ChangeSEProc(T2PaletteAnime* inPaletteAnime) { return BOOL3_NEG1; } virtual BOOL3 ChangeSkyColorProc(T2PaletteAnime* inPaletteAnime) { return BOOL3_NEG1; } virtual BOOL3 AdjustSkyStateProc(T2PaletteAnime* inPaletteAnime, T2DateTime* inDateTime) { return BOOL3_NEG1; } virtual BOOL UseOwnSkyPaletteFunction() { return false; } @@ -68,7 +79,10 @@ public: virtual void WriteStatisticsProc(T2TowerDoc* inDoc, T2Archive& inArchive); virtual void ReadStatisticsProc(T2TowerDoc* inDoc, T2Archive& inArchive); virtual BOOL CheckTreasure(T2TowerDoc* inDoc, T2TreasureStatus* inTreasureStatus); - virtual unsigned long OptionProc(unsigned long, void*) { return 0; } + int GetCashAmount(int i) const { + return (i >= 0 && i < 8) ? mCashAmount[i] : 0; + } + virtual unsigned long OptionProc(unsigned long, void*) { return 0; } unsigned int GetToiletDenomi(unsigned int inVal) const; unsigned int GetColdDenomi(unsigned int inVal1, unsigned int inVal2) const; @@ -86,23 +100,6 @@ public: T2BlackOut* GetBlackOut(); BOOL IsBlackOut(); - CPalette* GetPalette() { return GetPaletteAnimeDef()->GetTowerPalette(); } - BOOL IsUseMatterObject() const { return false; } - int GetOutViewKind() const { return mOutViewKind; } - T2PaletteAnimeDef* GetPaletteAnimeDef() const { return mPaletteAnimeDef; } - T2SeasonParamDef* GetSeasonParamDef() const { return mSeasonParamDef; } - int GetHeight() const { return mHeight; } - int GetWidth() const { return mWidth; } - void GetBuildArea(RECT& rect) const { rect = mBuildArea; } - BOOL IsStoppableFloor(int y) { - return !((y >= (mGroundLine - mLobbyHeight) && y < (mGroundLine - 1))); - } - int GetLobbyHeight() { return mLobbyHeight; } - T2Maru_Reggae* GetReggae() { return NULL; } - int GetCashAmount(int i) const { - return (i >= 0 && i < 8) ? mCashAmount[i] : 0; - } - protected: virtual void DrawClock(T2MWControl* inControl, T2DateTime& inDateTime); virtual void DrawCalendar(T2MWControl* inControl, T2DateTime& inDateTime, T2TowerDoc* inDoc); @@ -226,3 +223,7 @@ protected: CString mMoneyUnit; T2TowerEvent *mTowerEvent; }; + +inline /*virtual*/ int T2WorldDef::ExchangeMoney(int v) const { + return (mMoneyNumerator == 1 && mMoneyDenominator == 1) ? v : ((v / mMoneyDenominator) * mMoneyNumerator); +} |