From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2TenantDef.h | 96 +++++++++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 35 deletions(-) (limited to 'src/T2DLL/T2TenantDef.h') diff --git a/src/T2DLL/T2TenantDef.h b/src/T2DLL/T2TenantDef.h index 0657566..b0984f7 100644 --- a/src/T2DLL/T2TenantDef.h +++ b/src/T2DLL/T2TenantDef.h @@ -1,51 +1,77 @@ #pragma once #include "common.h" +#include "T2EquipDef.h" -class T2TenantDef { +class AFX_EXT_CLASS T2TenantDef : public T2EquipDef { public: - T2TenantDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2TenantPlugin*); + T2TenantDef(DWORD, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2TenantPlugin*); virtual ~T2TenantDef(); virtual void GetName(CString&); - virtual int InitObject(T2Object*); - virtual void DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const; - virtual int DrawData(int); + virtual BOOL InitObject(T2Object*); + virtual BOOL IsTenant() { return true; } + virtual int CalcPayment(T2TowerDoc*, RECT& inRect, unsigned int); + virtual unsigned int IdleProc(T2HaveOutViewObject*, T2TowerDoc*); + virtual void DrawProc(T2HaveOutViewObject*, const RECT& inRect, T2TowerDoc*) const; + virtual int CalcMentenanceCostProc(const T2HaveOutViewObject*) const; + virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT& inRect, unsigned int, BOOL); virtual void DrawPeople(T2TowerDoc*, T2Equip*); + virtual BOOL EmergencyProc(T2TowerDoc*, T2Equip*); + virtual int DrawData(int); virtual int DrawAttribute(int); - virtual unsigned int IdleProc(T2HaveOutViewObject*, T2TowerDoc*); - virtual int ChangeStatusOnIdle(T2TowerDoc*, T2Tenant*, int); - virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int); - virtual int CalcPayment(T2TowerDoc*, RECT&, unsigned int); + virtual BOOL ChangeStatusOnIdle(T2TowerDoc*, T2Tenant*, int); virtual void EnterTenant(T2TowerDoc*, T2Tenant*, T2People*); virtual void LeaveTenant(T2TowerDoc*, T2Tenant*, T2People*); - virtual void BuildStartProc(T2TowerDoc*, T2Tenant*); virtual void DoPeopleAnimation(T2TowerDoc*, T2Tenant*); - virtual int GetQTMovieName(T2Tenant*, CString&); + virtual void BuildStartProc(T2TowerDoc*, T2Tenant*); + virtual BOOL GetQTMovieName(T2Tenant*, CString&); + void SetCustomerTable(T2SubPlugin*); void MakeCustomerTableDef(int, const char*); + + BOOL IsFloor() { return IsSetAttribute(kTenantAttrIsFloor); } + BOOL IsValiableLength() { return IsSetAttribute(kTenantAttrIsValiableLength); } + BOOL IsHome() { return IsSetAttribute(kTenantAttrIsHome); } + BOOL IsConcat() { return IsSetAttribute(kTenantAttrIsConcat); } + BOOL IsPeopleAnime() { return IsSetAttribute(kTenantAttrIsPeopleAnime); } + int GetEntranceV() { return mEntranceV; } + int GetEntranceH() { return mEntranceH; } + int GetExitV() { return mExitV; } + int GetExitH() { return mExitH; } + int GetNumOfPattern() const { return mNumOfPattern; } + int GetNumOfKind() { return mNumOfKind; } + int GetBelongCapacity() const { return mBelongCapacity; } + unsigned int GetRegistID() const { return mRegistID; } + unsigned int GetDownFlag() const { return mDownFlag; } + int GetSenseOfNoise() const { return mSenseOfNoise; } + T2PeopleAnimeDef* GetPeopleAnimeDef() const { return mPeopleAnimeDef; } + T2TenantMemberTableDef* GetEmployeeTableDef() const { return mEmployeeTableDef; } + T2TenantMemberTableDef* GetCustomerTableDef() const { return mCustomerTableDef; } + + int mNumOfKind; + int mNumOfPattern; + int mBelongCapacity; + int mEntranceV; + int mEntranceH; + int mExitV; + int mExitH; + int mOpenTime; + int mCloseTime; + int mBindTime; + int m180; + CString m184; + int m188; + T2TenantMemberTableDef *mEmployeeTableDef; + T2TenantMemberTableDef *mCustomerTableDef; + int m194; + int m198; + unsigned int mRegistID; + unsigned int mDownFlag; + int mSenseOfNoise; + T2PeopleAnimeDef *mPeopleAnimeDef; + int m1AC; + int m1B0; + int m1B4; + protected: float CalcNumOfCustomerUnit(); -public: - virtual int EmergencyProc(T2TowerDoc*, T2Equip*); - virtual int CalcMentenanceCostProc(const T2HaveOutViewObject*) const; - - virtual int IsTenant() {} - int IsFloor() {} - int IsValiableLength() {} - int IsHome() {} - int IsConcat() {} - int IsPeopleAnime() {} - int GetEntranceV() {} - int GetEntranceH() {} - int GetExitV() {} - int GetExitH() {} - int GetNumOfPattern() const {} - int GetNumOfKind() {} - int GetBelongCapacity() const {} - unsigned int GetRegistID() const {} - unsigned int GetDownFlag() const {} - int GetSenseOfNoise() const {} - T2PeopleAnimeDef* GetPeopleAnimeDef() const {} - T2TenantMemberTableDef* GetEmployeeTableDef() const {} - T2TenantMemberTableDef* GetCustomerTableDef() const {} - T2TenantDef& operator=(T2TenantDef&) {} }; -- cgit v1.2.3