summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Terrorist.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-05 19:04:06 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-05 19:04:06 +0100
commit5e61c1280c15ab9969b94cd360cafd4a11b2dd30 (patch)
tree1fdb60d771c4351b5aa5dcf1a43376c0558625a4 /src/T2DLL/T2Terrorist.cpp
parentc2efba6907fab934a04959b9bb644cf7141cc955 (diff)
downloadt2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.tar.gz
t2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.zip
matched T2.exe
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2Terrorist.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/T2DLL/T2Terrorist.cpp b/src/T2DLL/T2Terrorist.cpp
index 9afd78d..b42e389 100644
--- a/src/T2DLL/T2Terrorist.cpp
+++ b/src/T2DLL/T2Terrorist.cpp
@@ -1,7 +1,7 @@
#include "CResFile.h"
-#include "CT2App.h"
#include "GlobalFunc.h"
#include "LArray.h"
+#include "T2.h"
#include "T2CtrlPalette.h"
#include "T2DateTime.h"
#include "T2Dialog.h"
@@ -57,7 +57,7 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
BOOL found = false;
- T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C();
+ T2FloorInfo *theFloorInfo = inDoc->GetFloorInfo();
RECT theIteratorArea;
int theGroundLine = theFloorInfo->GetGroundLine();
@@ -77,7 +77,7 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
return false;
SetupSound();
- inDoc->towerDoc_vf144(ViewMode_0);
+ inDoc->SetViewMode(kInView);
inDoc->towerDoc_vf1A0(true);
CString text, tempStr;
@@ -96,7 +96,7 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
Sounds->Play("Terrorist:", SoundMask_10, SoundFlags_10 | SoundFlags_10000, NULL, PlayMode_0, 100);
if (DoDialog(inDoc, 8300, 8300, 2, text) == 8303) {
- inDoc->towerDoc_vf270(mRansomFee, kFundGroup2);
+ inDoc->DoPay(mRansomFee, kFundGroup2);
Sounds->Play("Terrorist:ThankYou", SoundMask_10, SoundFlags_10 | SoundFlags_10000, NULL, PlayMode_0, 100);
DWORD time = timeGetTime();
@@ -105,12 +105,12 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
inDoc->towerDoc_vf1A0(false);
} else {
- inDoc->towerDoc_vf2A8(25);
+ inDoc->SetDrawSpeed(25);
inDoc->SetFireBurning(true);
inDoc->towerDoc_vf2A0()->EnableIcon(false);
- inDoc->GetTowerMainView()->tmv_vf154();
+ inDoc->GetMainView()->HideToolSprite();
inDoc->towerDoc_vf2B0(true);
- ((T2MainWindow *) AfxGetMainWnd())->mCtrlPalette->vf108(0);
+ T2_MAIN_WINDOW->mCtrlPalette->vf108(0);
do {
mBombHidePos.x = UT2Utils::Randomize(URect::Width(theIteratorArea)) + theIteratorArea.left;
@@ -120,10 +120,10 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
mBombHideRoomID = theTenant->GetEquipID();
- inDoc->towerDoc_vf1B4();
- inDoc->GetTowerMainView()->tmv_vf120();
+ inDoc->BreakoutEmergency();
+ inDoc->GetMainView()->tmv_vf120();
- T2TowerMainView *theView = inDoc->GetTowerMainView();
+ T2TowerMainView *theView = inDoc->GetMainView();
text = LoadStringTable(GetWorldModuleHandle(), 8300, 4);
DoAlert(inDoc, text, 0);
@@ -133,11 +133,11 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
mAttach = new T2FireAttach(this, 0, true);
theView->AddAttachment(mAttach, NULL, true);
- inDoc->towerDoc_vf2A8(25);
+ inDoc->SetDrawSpeed(25);
- T2EquipPtrList *theList = inDoc->towerDoc_vf174()->GetList(kTenantRegistID5);
+ T2EquipPtrList *theList = inDoc->GetRegistedTenantDB()->GetList(kTenantRegistID5);
if (theList) {
- T2FloorPtrList *theFloorList = inDoc->towerDoc_vf124()->GetFloorPtrList();
+ T2FloorPtrList *theFloorList = inDoc->GetRouteNavi()->GetFloorPtrList();
LArrayIterator floorIterator(*theFloorList);
T2Tenant *theFloor;
while (floorIterator.Next(&theFloor))
@@ -146,7 +146,7 @@ T2Terrorist::T2Terrorist(T2TowerEvent* inTowerEvent, CResFile* inResFile, int in
T2Tenant *iteratorTenant;
LArrayIterator tenantIterator(*theList);
while (tenantIterator.Next(&iteratorTenant)) {
- T2Tenant *theCurrFloor = inDoc->towerDoc_vf12C()->GetTenant(iteratorTenant->GetExitFloorID());
+ T2Tenant *theCurrFloor = inDoc->GetFloorInfo()->GetTenant(iteratorTenant->GetExitFloorID());
if (theCurrFloor) {
CRect area;
theCurrFloor->GetEquipArea(area);
@@ -221,11 +221,11 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag);
/*virtual*/ int T2Terrorist::Exec(T2TowerDoc* inDoc) {
int result = IsExclusive() ? 1 : 0;
- T2DateTime *theNow = inDoc->towerDoc_vf120();
+ T2DateTime *theNow = inDoc->GetNow();
unsigned int nowMinutes = theNow->GetRawMinutes();
if (mStatus == kTerroristStatus1) {
- T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C();
+ T2FloorInfo *theFloorInfo = inDoc->GetFloorInfo();
T2People *theSearcher;
LArrayIterator theIteratorL(*mSearcherL);
@@ -282,10 +282,10 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag);
text += LoadStringTable(GetWorldModuleHandle(), 8300, 9);
if (DoDialog(inDoc, 8300, 8300, 2, text) == 1) {
- inDoc->towerDoc_vf270(mHigherRansomFee, kFundGroup2);
+ inDoc->DoPay(mHigherRansomFee, kFundGroup2);
result = 3;
} else {
- inDoc->towerDoc_vf2A8(25);
+ inDoc->SetDrawSpeed(25);
}
} else if (nowMinutes == mEndTime) {
Sounds->Stop("Terrorist:Tick");
@@ -309,7 +309,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag);
for (int vDir = 0; vDir < 2; vDir++) {
int v = (vDir == 0) ? vA : vF;
if (v > 0 && v < GetWorldDef()->mGroundLine) {
- theTenant = inDoc->towerDoc_vf12C()->GetTenant(v, h);
+ theTenant = inDoc->GetFloorInfo()->GetTenant(v, h);
if (theTenant && !theTenant->IsFire() && !theTenant->IsFireproof())
theTenant->BurntDown(inDoc);
@@ -337,15 +337,15 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag);
break;
}
- T2TowerMainView *theMainView = inDoc->GetTowerMainView();
+ T2TowerMainView *theMainView = inDoc->GetMainView();
CRect theBombArea;
UT2Coordinate::MakeRect(theBombArea, mBombHidePos, 1, 1);
- theMainView->tmv_vf15C(theBombArea);
+ theMainView->CenterOnRect(theBombArea);
- if (inDoc->towerDoc_vf140() != ViewMode_1)
+ if (inDoc->GetViewMode() != kOutView)
inDoc->towerDoc_vf284();
else
- ((T2MainWindow *) AfxGetMainWnd())->mCtrlPalette->vf108(false);
+ T2_MAIN_WINDOW->mCtrlPalette->vf108(false);
text = LoadStringTable(GetWorldModuleHandle(), 8300, 10);
DoAlert(inDoc, text, 0);
@@ -382,7 +382,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
CRect theEquipRect;
CPoint theNextPt;
- T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C();
+ T2FloorInfo *theFloorInfo = inDoc->GetFloorInfo();
T2Tenant *theCurrFloor = theFloorInfo->GetTenant(inPeople->GetCurrEquipID());
CRect theSearchRect;
@@ -449,7 +449,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
CRect theSilhouetteArea;
inPeople->CalcWalkingSilhouetteArea(theSilhouetteArea);
theFloorInfo->SetTenantDrawModeByRect(theSilhouetteArea, DrawMode1);
- inDoc->GetTowerMainView()->tmv_vf128(theSilhouetteArea);
+ inDoc->GetMainView()->InvalUnitRect(theSilhouetteArea);
if (theNextFloor) {
theCurrFloor->Leave(inPeople);
@@ -471,7 +471,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
}
/*virtual*/ void T2Terrorist::StopEvent(T2TowerDoc* inDoc) {
- T2TowerMainView *theMainView = inDoc->GetTowerMainView();
+ T2TowerMainView *theMainView = inDoc->GetMainView();
if (theMainView && mAttach) {
theMainView->RemoveAttachment(mAttach);
delete mAttach;
@@ -479,7 +479,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
}
CRect theSilhouetteArea;
- T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C();
+ T2FloorInfo *theFloorInfo = inDoc->GetFloorInfo();
T2People *theSecurityMan;
LArrayIterator theIteratorL(*mSearcherL);
@@ -501,7 +501,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
theSecurityMan->CalcWalkingSilhouetteArea(theSilhouetteArea);
theFloorInfo->SetTenantDrawModeByRect(theSilhouetteArea, DrawMode1);
- theMainView->tmv_vf128(theSilhouetteArea);
+ theMainView->InvalUnitRect(theSilhouetteArea);
}
}
@@ -526,7 +526,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
theSecurityMan->CalcWalkingSilhouetteArea(theSilhouetteArea);
theFloorInfo->SetTenantDrawModeByRect(theSilhouetteArea, DrawMode1);
- theMainView->tmv_vf128(theSilhouetteArea);
+ theMainView->InvalUnitRect(theSilhouetteArea);
}
}
@@ -537,8 +537,8 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
inDoc->towerDoc_vf1A0(false);
inDoc->SetFireBurning(false);
- if (inDoc->GetTowerMainView())
- inDoc->GetTowerMainView()->tmv_vf150();
+ if (inDoc->GetMainView())
+ inDoc->GetMainView()->UnhideToolSprite();
if (inDoc->towerDoc_vf2A0())
inDoc->towerDoc_vf2A0()->EnableIcon(true);
@@ -546,7 +546,7 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
}
/*virtual*/ unsigned int T2Terrorist::DialogHook(T2EventDialog* inDialog, unsigned int inResult, T2TowerDoc* inDoc) {
- T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C();
+ T2FloorInfo *theFloorInfo = inDoc->GetFloorInfo();
T2Tenant *theTenant = theFloorInfo->GetTenantByPID('KEBI');
BOOL isMissing = (theTenant == NULL);
@@ -556,9 +556,9 @@ static void MoveNextFloor(T2TowerDoc *inDoc, T2People *inPeople, BOOL inFlag) {
break;
if (mStatus == kTerroristStatus1) {
- inResult = (inDoc->towerDoc_vf26C() >= mHigherRansomFee) ? inResult : 0;
+ inResult = (inDoc->GetCurrentFunds() >= mHigherRansomFee) ? inResult : 0;
} else {
- inResult = (inDoc->towerDoc_vf26C() >= mRansomFee) ? inResult : 0;
+ inResult = (inDoc->GetCurrentFunds() >= mRansomFee) ? inResult : 0;
}
if (inResult == 0) {