summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2MoverDef.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-01 23:04:04 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-01 23:04:04 +0100
commitc2efba6907fab934a04959b9bb644cf7141cc955 (patch)
treec047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2MoverDef.cpp
parent1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff)
downloadt2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz
t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2MoverDef.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/T2DLL/T2MoverDef.cpp b/src/T2DLL/T2MoverDef.cpp
index 3928cfb..3d39f27 100644
--- a/src/T2DLL/T2MoverDef.cpp
+++ b/src/T2DLL/T2MoverDef.cpp
@@ -168,36 +168,36 @@ BOOL T2MoverDef::InitObject(T2Mover* mover, const POINT&) {
}
/*virtual*/ int T2MoverDef::CalcMentenanceCostProc(const T2HaveOutViewObject* obj) const {
- int result = 0;
+ int cost = 0;
T2ToolDef *otherDef = obj->GetToolDef();
if (otherDef->IsSetAttribute(kToolAttrNormalMenteCost)) {
- result = otherDef->GetOutMoney(0);
+ cost = GetOutMoney(0);
int moduleCount = ((T2Mover *) obj)->mModuleList->GetModuleCount();
if (((T2Mover *) obj)->IsStair())
moduleCount /= 2;
- result = result * moduleCount;
+ cost = cost * moduleCount;
}
- return result;
+ return cost;
}
/*virtual*/ T2InfoDialog* T2MoverDef::ShowInfoDialog(T2TowerDoc* towerDoc, T2Mover* mover, CPoint pt) {
- int var = 0;
- PARTCODE partCode = GetPartFromPoint(towerDoc, mover, pt, &var);
+ int theIndex = 0;
+ PARTCODE part = GetPartFromPoint(towerDoc, mover, pt, &theIndex);
T2InfoDialog *dialog = NULL;
- if (partCode != PartCode_0) {
+ if (part != PartCode_0) {
CRect rect;
AfxGetMainWnd()->GetWindowRect(rect);
T2DLGTEMPLATE tmpl;
tmpl.pt = rect.CenterPoint();
tmpl.moduleHandle = mModuleHandle;
- tmpl.resID = GetInfoDialogID(towerDoc, mover, partCode, var);
- dialog = ConstructInfoDialog(mover, partCode, var);
+ tmpl.resID = GetInfoDialogID(towerDoc, mover, part, theIndex);
+ dialog = ConstructInfoDialog(mover, part, theIndex);
dialog->Realize(this, &tmpl, towerDoc, mImageObj, NULL, true, NULL, 0, true);
}