diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-06 10:49:52 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-06 10:49:52 +0100 |
commit | 96a63139221587c6be9659c1e07eacd3a8e7f048 (patch) | |
tree | 23aef453ef216c97b762637f553d131646fd5985 /src/T2DLL | |
parent | 27fc86e8c0450a7fe33d76344c4d53e23a70a6c3 (diff) | |
download | t2win-96a63139221587c6be9659c1e07eacd3a8e7f048.tar.gz t2win-96a63139221587c6be9659c1e07eacd3a8e7f048.zip |
add untested Burger code
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Maru_Reggae.cpp | 4 | ||||
-rw-r--r-- | src/T2DLL/T2People.cpp | 4 | ||||
-rw-r--r-- | src/T2DLL/T2RouteNavigator.h | 2 | ||||
-rw-r--r-- | src/T2DLL/T2Settlement.cpp | 2 | ||||
-rw-r--r-- | src/T2DLL/T2SoundPlayer.h | 6 | ||||
-rw-r--r-- | src/T2DLL/T2Tenant.cpp | 2 | ||||
-rw-r--r-- | src/T2DLL/T2Tenant.h | 38 | ||||
-rw-r--r-- | src/T2DLL/T2TenantDef.cpp | 14 | ||||
-rw-r--r-- | src/T2DLL/T2ToolDef.h | 7 | ||||
-rw-r--r-- | src/T2DLL/T2TowerMessage.h | 2 | ||||
-rw-r--r-- | src/T2DLL/T2VisitVIP.cpp | 2 |
11 files changed, 49 insertions, 34 deletions
diff --git a/src/T2DLL/T2Maru_Reggae.cpp b/src/T2DLL/T2Maru_Reggae.cpp index ee863ea..1c6fd2c 100644 --- a/src/T2DLL/T2Maru_Reggae.cpp +++ b/src/T2DLL/T2Maru_Reggae.cpp @@ -379,7 +379,7 @@ void T2Maru_Reggae::ReggaeReception(T2TowerDoc* inDoc, T2People* inPeople) { if ((mCounter % 60) == 0) { CString message; MakeClaimMessage(inDoc, theTenant, message); - inDoc->towerDoc_vf13C()->InfoBarMessage(message, 180, NULL); + inDoc->GetTowerMessage()->InfoBarMessage(message, 180, NULL); if (!mGuardman) mGuardman = new T2Guardman(this, inDoc, theTenant); @@ -409,7 +409,7 @@ void T2Maru_Reggae::ReggaeReception(T2TowerDoc* inDoc, T2People* inPeople) { curPos = inPeople->GetCurPosition(); theTenant = inDoc->GetFloorInfo()->GetTenant(curPos.y, curPos.x); MakeClaimMessage(inDoc, theTenant, message); - inDoc->towerDoc_vf13C()->CancelInfoBarMessage(message); + inDoc->GetTowerMessage()->CancelInfoBarMessage(message); // "レゲエのおじさんは警備員につかまりました。" // Uncle Reggae was caught by a security guard. diff --git a/src/T2DLL/T2People.cpp b/src/T2DLL/T2People.cpp index c83373a..4ce0737 100644 --- a/src/T2DLL/T2People.cpp +++ b/src/T2DLL/T2People.cpp @@ -437,7 +437,7 @@ void T2People::SolveNoRoute(T2TowerDoc* towerDoc) { if (IsWalk()) { // "道がないよ~" - there is no way CString theMessage = "\x93\xB9\x82\xAA\x82\xC8\x82\xA2\x82\xE6\x81\x60"; - towerDoc->towerDoc_vf13C()->PeopleBalloonMessage(theMessage, this); + towerDoc->GetTowerMessage()->PeopleBalloonMessage(theMessage, this); RECT theRect; CalcWalkingSilhouetteArea(theRect); @@ -987,7 +987,7 @@ BOOL T2People::SearchToilet(T2TowerDoc* towerDoc) { ok = true; } else { SetReturnToDestination(); - T2TowerMessage *towerMessage = towerDoc->towerDoc_vf13C(); + T2TowerMessage *towerMessage = towerDoc->GetTowerMessage(); if (towerMessage) { // "トイレが混んでいる" - toilet is crowded CString msg = "\x83\x67\x83\x43\x83\x8C\x82\xAA\x8D\xAC\x82\xF1\x82\xC5\x82\xA2\x82\xE9"; diff --git a/src/T2DLL/T2RouteNavigator.h b/src/T2DLL/T2RouteNavigator.h index a667e07..b12a6b9 100644 --- a/src/T2DLL/T2RouteNavigator.h +++ b/src/T2DLL/T2RouteNavigator.h @@ -3,7 +3,9 @@ enum { kRouteTypeNeg1 = -1, + // Normal people movement kRouteType0 = 0, + // Trash disposal kRouteType1 = 1, kRouteType2 = 2, kRouteType3 = 3, diff --git a/src/T2DLL/T2Settlement.cpp b/src/T2DLL/T2Settlement.cpp index 30ea8e5..ed60b5f 100644 --- a/src/T2DLL/T2Settlement.cpp +++ b/src/T2DLL/T2Settlement.cpp @@ -154,7 +154,7 @@ void T2Settlement::EmitPayToolMessage(T2TowerDoc* towerDoc, T2ToolDef* inToolDef SetTimeLimitOfMessage(towerDoc, inToolDef, type, theTimeLimit); delete theTimeLimit; - towerDoc->towerDoc_vf13C()->InfoBarMessage(str, 120, "Cash"); + towerDoc->GetTowerMessage()->InfoBarMessage(str, 120, "Cash"); } } diff --git a/src/T2DLL/T2SoundPlayer.h b/src/T2DLL/T2SoundPlayer.h index 667ac13..01eb326 100644 --- a/src/T2DLL/T2SoundPlayer.h +++ b/src/T2DLL/T2SoundPlayer.h @@ -10,15 +10,19 @@ enum PLAYMODE { enum SOUNDPRIORITY { SoundPriority_0, - SoundPriority_1 + SoundPriority_1, + SoundPriority_2, + SoundPriority_3 }; enum { + SoundMask_2 = 2, SoundMask_10 = 0x10, SoundMask_20 = 0x20, }; enum { + SoundFlags_1 = 1, SoundFlags_10 = 0x10, SoundFlags_20 = 0x20, SoundFlags_10000 = 0x10000 diff --git a/src/T2DLL/T2Tenant.cpp b/src/T2DLL/T2Tenant.cpp index 0a29db6..dadaf21 100644 --- a/src/T2DLL/T2Tenant.cpp +++ b/src/T2DLL/T2Tenant.cpp @@ -852,7 +852,7 @@ void T2Tenant::CollectCustomer(T2TowerDoc* inDoc, int inNum) { } } - CollectCustomer(inDoc, (T2Tenant *) NULL); + CollectCustomer(inDoc); } int T2Tenant::CollectEmployee(T2TowerDoc* inDoc) { diff --git a/src/T2DLL/T2Tenant.h b/src/T2DLL/T2Tenant.h index e3ac271..6b374fc 100644 --- a/src/T2DLL/T2Tenant.h +++ b/src/T2DLL/T2Tenant.h @@ -10,6 +10,12 @@ enum { kTenantStatus2 = 2, kTenantStatus9 = 9, kTenantStatus10 = 10, + // means it's opening tomorrow + kTenantStatus11 = 11, + kTenantStatus12 = 12, + kTenantStatus13 = 13, + kTenantStatus14 = 14, + kTenantStatus15 = 15, kTenantStatus30 = 30, kTenantStatus9999 = 9999, kTenantStatus10000 = 10000, @@ -25,16 +31,26 @@ enum { }; enum { - kTenantRegistID1 = 1, // hotel rooms - kTenantRegistID2 = 2, // trash facilities - kTenantRegistID3 = 3, // parking - kTenantRegistID4 = 4, // hospital - kTenantRegistID5 = 5, // security - kTenantRegistID6 = 6, // school - kTenantRegistID7 = 7, // toilets - kTenantRegistID8 = 8, // metro railway - kTenantRegistID9 = 9, // boat deck - kTenantRegistID10 = 10, // ticket booth + // hotel rooms + kTenantRegistID1 = 1, + // trash facilities + kTenantRegistID2 = 2, + // parking + kTenantRegistID3 = 3, + // hospital + kTenantRegistID4 = 4, + // security + kTenantRegistID5 = 5, + // school + kTenantRegistID6 = 6, + // toilets + kTenantRegistID7 = 7, + // metro railway + kTenantRegistID8 = 8, + // boat deck + kTenantRegistID9 = 9, + // ticket booth + kTenantRegistID10 = 10, }; class AFX_CLASS_EXPORT T2Tenant : public T2Equip { @@ -104,7 +120,7 @@ public: void UpdatePatternIndex(); void UpdatePatternIndex(int inIndex); int GetNumOfPattern() const; - void CollectCustomer(T2TowerDoc* inDoc, T2Tenant* inTenant); + void CollectCustomer(T2TowerDoc* inDoc, T2Tenant* inTenant = NULL); void CollectCustomer(T2TowerDoc* inDoc, int inNum); int CollectEmployee(T2TowerDoc* inDoc); void RegistBelongPeople(T2People* inPeople); diff --git a/src/T2DLL/T2TenantDef.cpp b/src/T2DLL/T2TenantDef.cpp index 3cde569..e05e982 100644 --- a/src/T2DLL/T2TenantDef.cpp +++ b/src/T2DLL/T2TenantDef.cpp @@ -144,14 +144,14 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res int status = theEquip->GetStatus(); unsigned int result = 0; - if (status < kStatus10) { - if (status <= kStatus2 || status == kStatus9) + if (status < kTenantStatus10) { + if (status <= kTenantStatus2 || status == kTenantStatus9) result = 1; status++; theEquip->SetStatus(status); - if (status == kStatus10) { + if (status == kTenantStatus10) { BuildFinish(towerDoc, theEquip); towerDoc->mTowerMainView->InvalUnitRect(theEquip->mArea, true); } @@ -160,8 +160,8 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res T2Tenant *theTenant = (T2Tenant *) theEquip; status = theTenant->GetStatus(); - if (status >= kStatus9 && ChangeStatusOnIdle(towerDoc, theTenant, status)) { - if (status == kStatus9) + if (status >= kTenantStatus9 && ChangeStatusOnIdle(towerDoc, theTenant, status)) { + if (status == kTenantStatus9) theTenant->SetDrawMode(DrawMode2); else theTenant->SetDrawMode(DrawMode1); @@ -181,7 +181,7 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res if (GetCategory() != 100 && rect.top <= towerDoc->mWorldDef->mTopFloorLine) { if (inShowError) { // EN: Only Final item can be placed on the top floor of building. - towerDoc->towerDoc_vf13C()->BuildErr(68, NULL); + towerDoc->GetTowerMessage()->BuildErr(68, NULL); } return AreaCheckCode_0; } @@ -189,7 +189,7 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res if (rect.bottom > towerDoc->mWorldDef->mBottomFloorLine) { if (inShowError) { // EN: Can not place items beyond the edges of the floor below. - towerDoc->towerDoc_vf13C()->BuildErr(2, NULL); + towerDoc->GetTowerMessage()->BuildErr(2, NULL); } return AreaCheckCode_0; } diff --git a/src/T2DLL/T2ToolDef.h b/src/T2DLL/T2ToolDef.h index bb42d77..d819b5c 100644 --- a/src/T2DLL/T2ToolDef.h +++ b/src/T2DLL/T2ToolDef.h @@ -110,13 +110,6 @@ public: int GetOutMoney(unsigned int id) const; void SetOutMoney(unsigned int id, int money); -protected: - friend class T2Mover; - friend class T2Settlement; - friend class T2TemplatePluginList; - friend class T2ToolHelpWnd; - friend class T2TowerDoc; - int mToolType; int mWidth; int mHeight; diff --git a/src/T2DLL/T2TowerMessage.h b/src/T2DLL/T2TowerMessage.h index 67d40ad..300963d 100644 --- a/src/T2DLL/T2TowerMessage.h +++ b/src/T2DLL/T2TowerMessage.h @@ -30,7 +30,7 @@ public: void SpendTime(); void SpendTime2(); void CancelInfoBarMessage(const CString& inText); - void PassiveInfoBarMessage(const char* inText, int inDelay, const char* inSoundID); + void PassiveInfoBarMessage(const char* inText, int inDelay, const char* inSoundID = NULL); void SetCaptureRect(RECT inRect); private: diff --git a/src/T2DLL/T2VisitVIP.cpp b/src/T2DLL/T2VisitVIP.cpp index 0b190d9..fdda3e1 100644 --- a/src/T2DLL/T2VisitVIP.cpp +++ b/src/T2DLL/T2VisitVIP.cpp @@ -177,7 +177,7 @@ T2VisitVIP::T2VisitVIP(T2TowerEvent* inTowerEvent, int inSubID, int inLevelBit, // "の設置が必要です。" - installation is required. str += "\x82\xCC\x90\xDD\x92\x75\x82\xAA\x95\x4B\x97\x76\x82\xC5\x82\xB7\x81\x42"; - inDoc->towerDoc_vf13C()->InfoBarMessage(str, 900, NULL); + inDoc->GetTowerMessage()->InfoBarMessage(str, 900, NULL); } else if (!theSpecifier) { inDoc->mA0 |= mVisitFlag; mStatus = kVisitVIPStatus4; |