summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2TenantDef.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-01 02:43:29 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-01 02:43:29 +0100
commit5c6a48b2ff362a70416a6a00fda7d06e0f276f2d (patch)
tree62cf542c68d91aa6f7a4e3bfa9eddca4ab352970 /src/T2DLL/T2TenantDef.cpp
parentc0c336500955a23e344651e5412c9d9d441ef4ee (diff)
downloadt2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.tar.gz
t2win-5c6a48b2ff362a70416a6a00fda7d06e0f276f2d.zip
i am in hell
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2TenantDef.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/T2DLL/T2TenantDef.cpp b/src/T2DLL/T2TenantDef.cpp
index 6b5f40a..365a0bf 100644
--- a/src/T2DLL/T2TenantDef.cpp
+++ b/src/T2DLL/T2TenantDef.cpp
@@ -83,22 +83,22 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res
/*virtual*/ void T2TenantDef::DrawProc(T2HaveOutViewObject* obj, const RECT& inRect, T2TowerDoc* towerDoc) const {
T2Tenant *tenant = (T2Tenant *) obj;
- RECT rect = inRect;
+ RECT tenantRect = inRect;
- int id;
+ int objID;
int pattern;
- BOOL someFlag;
+ BOOL includeRoofAndFloor;
if (towerDoc->mViewMode != 1) {
- id = 100;
- someFlag = true;
+ objID = 100;
+ includeRoofAndFloor = true;
pattern = 0;
pattern += tenant->mValiation * 1000;
pattern += mHeight * 100;
pattern += tenant->GetPatIndex();
} else {
- id = 101;
- someFlag = false;
+ objID = 101;
+ includeRoofAndFloor = false;
pattern = (towerDoc->mWorldDef->GetOutViewKind() + 1) * 10000;
pattern += tenant->mValiation * 1000;
pattern += mHeight * 100;
@@ -108,13 +108,13 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res
pattern += 1;
}
- UT2Coordinate::UnitToQD(rect, towerDoc->towerDoc_vf108(), !someFlag);
+ UT2Coordinate::UnitToQD(tenantRect, towerDoc->towerDoc_vf108(), !includeRoofAndFloor);
- int objIndex = mImageObj->FindObject(id, pattern);
- if (objIndex >= 0) {
- mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), objIndex, rect, towerDoc->towerDoc_vf108());
+ int objectIndex = mImageObj->FindObject(objID, pattern);
+ if (objectIndex >= 0) {
+ mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), objectIndex, tenantRect, towerDoc->towerDoc_vf108());
} else if (tenant->m58) {
- towerDoc->towerDoc_vf10C()->FillRect(rect, 1);
+ towerDoc->towerDoc_vf10C()->FillRect(tenantRect, 1);
} else {
CString err;
#ifdef _MSC_VER
@@ -140,8 +140,8 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res
}
/*virtual*/ unsigned int T2TenantDef::IdleProc(T2HaveOutViewObject* obj, T2TowerDoc* towerDoc) {
- T2Equip *equip = (T2Equip *) obj;
- int status = equip->GetStatus();
+ T2Equip *theEquip = (T2Equip *) obj;
+ int status = theEquip->GetStatus();
unsigned int result = 0;
if (status < kStatus10) {
@@ -149,26 +149,26 @@ T2TenantDef::T2TenantDef(DWORD type, T2PluginSpecifier& specifier, CResFile* res
result = 1;
status++;
- equip->SetStatus(status);
+ theEquip->SetStatus(status);
if (status == kStatus10) {
- BuildFinish(towerDoc, equip);
- towerDoc->mTowerMainView->tmv_vf128(equip->mArea, true);
+ BuildFinish(towerDoc, theEquip);
+ towerDoc->mTowerMainView->tmv_vf128(theEquip->mArea, true);
}
}
- T2Tenant *tenant = (T2Tenant *) equip;
- status = tenant->GetStatus();
+ T2Tenant *theTenant = (T2Tenant *) theEquip;
+ status = theTenant->GetStatus();
- if (status >= kStatus9 && ChangeStatusOnIdle(towerDoc, tenant, status)) {
+ if (status >= kStatus9 && ChangeStatusOnIdle(towerDoc, theTenant, status)) {
if (status == kStatus9)
- tenant->SetDrawMode(DrawMode2);
+ theTenant->SetDrawMode(DrawMode2);
else
- tenant->SetDrawMode(DrawMode1);
+ theTenant->SetDrawMode(DrawMode1);
}
- if (tenant->GetDrawMode() != DrawMode0)
- towerDoc->mTowerMainView->tmv_vf128(tenant->mArea, false);
+ if (theTenant->GetDrawMode() != DrawMode0)
+ towerDoc->mTowerMainView->tmv_vf128(theTenant->mArea, false);
return result;
}