diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
commit | c2efba6907fab934a04959b9bb644cf7141cc955 (patch) | |
tree | c047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2FireBurning.cpp | |
parent | 1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff) | |
download | t2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip |
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2FireBurning.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/T2DLL/T2FireBurning.cpp b/src/T2DLL/T2FireBurning.cpp index 3ec86e0..eee04c3 100644 --- a/src/T2DLL/T2FireBurning.cpp +++ b/src/T2DLL/T2FireBurning.cpp @@ -114,18 +114,18 @@ T2FireBurning::T2FireBurning(T2TowerEvent* inTowerEvent, CResFile* inResFile, in return 0; } -/*virtual*/ void T2FireBurning::StartEvent(T2TowerDoc* inDoc, POINT inPt, const T2Tenant* inTenant) { - T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C(); +/*virtual*/ void T2FireBurning::StartEvent(T2TowerDoc* inTowerDoc, POINT inPt, const T2Tenant* inTenant) { + T2FloorInfo *theFloorInfo = inTowerDoc->towerDoc_vf12C(); mFightAction = kFireFightNull; mFireArray = new LArray; - inDoc->towerDoc_vf144(ViewMode_0); - inDoc->towerDoc_vf2A8(25); - inDoc->SetFireBurning(true); - inDoc->towerDoc_vf1A0(true); - inDoc->towerDoc_vf2A0()->EnableIcon(false); - inDoc->GetTowerMainView()->tmv_vf154(); - inDoc->towerDoc_vf1B4(); + inTowerDoc->towerDoc_vf144(ViewMode_0); + inTowerDoc->towerDoc_vf2A8(25); + inTowerDoc->SetFireBurning(true); + inTowerDoc->towerDoc_vf1A0(true); + inTowerDoc->towerDoc_vf2A0()->EnableIcon(false); + inTowerDoc->GetTowerMainView()->tmv_vf154(); + inTowerDoc->towerDoc_vf1B4(); Sounds->FadeOut(); Sounds->AddSound("FIREBURNING:", SoundPriority_1, 8100, GetWorldModuleHandle()); @@ -134,25 +134,26 @@ T2FireBurning::T2FireBurning(T2TowerEvent* inTowerEvent, CResFile* inResFile, in Sounds->Play("FIREBURNING:", SoundMask_10, SoundFlags_10 | SoundFlags_10000, NULL, PlayMode_0, 100); CString dialogText; - dialogText.Format("%d", inDoc->towerDoc_vf12C()->UnitToFloor(inPt.y)); + dialogText.Format("%d", inTowerDoc->towerDoc_vf12C()->UnitToFloor(inPt.y)); dialogText += LoadStringTable(GetWorldModuleHandle(), 8100, 3); - DoDialog(inDoc, 8100, 5100, 3, dialogText); + DoDialog(inTowerDoc, 8100, 5100, 3, dialogText); if (!mImage) - mImage = new T2BitImage(inDoc->mWorldDef->mModuleHandle, 5000, true); + mImage = new T2BitImage(inTowerDoc->mWorldDef->mModuleHandle, 5000, true); if (!mImageObj) { mImageObj = new T2ImageObj; - mImageObj->AddObject(inDoc->mWorldDef->mModuleHandle, 5000, mImage); + mImageObj->AddObject(inTowerDoc->mWorldDef->mModuleHandle, 5000, mImage); SIZE size; mImageObj->GetObjectSize(mImageObj->FindObject("FIRE", 0), &size); mFireWidth = size.cx / 8; } - MakeFire(inPt, inDoc); + MakeFire(inPt, inTowerDoc); - T2TowerMainView *theTowerMainView = inDoc->GetTowerMainView(); + // should this be called theView? as per Mac asserts + T2TowerMainView *theTowerMainView = inTowerDoc->GetTowerMainView(); CRect area; inTenant->GetEquipArea(area); @@ -163,13 +164,13 @@ T2FireBurning::T2FireBurning(T2TowerEvent* inTowerEvent, CResFile* inResFile, in Sounds->Play("FIREBURNING:FIRE", SoundMask_10, SoundFlags_10 | SoundFlags_10000, NULL, PlayMode_3, 100); dialogText = LoadStringTable(GetWorldModuleHandle(), 8100, 4); - switch (DoDialog(inDoc, 8110, 5101, 1, dialogText)) { + switch (DoDialog(inTowerDoc, 8110, 5101, 1, dialogText)) { case 8114: - mHelicopter = new T2Helicopter(inDoc, inTenant); + mHelicopter = new T2Helicopter(inTowerDoc, inTenant); mFightAction = kFireFightHelicopter; break; case 8115: - CallFireman(inDoc, inTenant); + CallFireman(inTowerDoc, inTenant); mFightAction = kFireFightFireman; break; case 8116: @@ -636,6 +637,7 @@ BOOL T2Fire::ExtinguishByFireman(T2TowerDoc* inDoc, T2PeoplePtrList* inPeopleLis mSprite->GetSpriteRect(mFireSpriteID, rect); CPoint theFirePos = rect.TopLeft(); + // should this be theFirePt? as per Mac asserts theFirePos.x += rect.Width() / 2; UT2Coordinate::QDToUnit(theFirePos, 0); |