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/T2WorldDef.h | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'src/T2DLL/T2WorldDef.h') 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); +} -- cgit v1.2.3