From 1eb8da84d77d0c865623421069ec38bfc7b0d461 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 03:41:47 +0100 Subject: game actually works now --- src/T2DLL/T2Mover.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/T2DLL/T2Mover.cpp') diff --git a/src/T2DLL/T2Mover.cpp b/src/T2DLL/T2Mover.cpp index df3d264..f62f502 100644 --- a/src/T2DLL/T2Mover.cpp +++ b/src/T2DLL/T2Mover.cpp @@ -168,9 +168,9 @@ void T2Mover::GetTypicalName(CString& outStr) const { GetEquipArea(rect); T2FloorInfo *theFloorInfo = towerDoc->mFloorInfo; - for (int i = 0; i < mLength; i++) { - if (IsStopPosition(i)) - RemoveStopBoth(towerDoc, i); + for (int p = 0; p < mLength; p++) { + if (IsStopPosition(p)) + RemoveStopBoth(towerDoc, p); } theFloorInfo->FillMoverID(rect, 0); @@ -196,9 +196,9 @@ void T2Mover::GetTypicalName(CString& outStr) const { T2FloorInfo *theFloorInfo = towerDoc->towerDoc_vf12C(); mModuleList->Destruct(towerDoc); - for (int i = 0; i < mLength; i++) { - if (IsStopPosition(i)) - RemoveStopBoth(towerDoc, i); + for (int p = 0; p < mLength; p++) { + if (IsStopPosition(p)) + RemoveStopBoth(towerDoc, p); } theFloorInfo->FillMoverID(rect, 00); @@ -206,11 +206,11 @@ void T2Mover::GetTypicalName(CString& outStr) const { SetUsed(false); - BOOL result = true; + BOOL done = true; towerDoc->towerDoc_vf124()->MoverRemoved(this, 1); - return result; + return done; } /*virtual*/ void T2Mover::Draw(T2TowerDoc* towerDoc, const RECT& rect) { @@ -221,8 +221,8 @@ void T2Mover::GetTypicalName(CString& outStr) const { int T2Mover::GetNumStop() const { int count = 0; - for (int i = 0; i < mLength; i++) { - if (IsStopPosition(i)) + for (int p = 0; p < mLength; p++) { + if (IsStopPosition(p)) count++; } @@ -243,14 +243,14 @@ void T2Mover::AddStopBoth(T2TowerDoc* towerDoc, int position) { BOOL T2Mover::AddStop(T2FloorInfo* floorInfo, int position, ERequestUpDown upDown) { BOOL result = false; - POINT stopPt = PositionToStopPt(position, upDown); - T2Tenant *theFloor = floorInfo->GetFloor(stopPt.y, stopPt.x); + POINT theNewStopPt = PositionToStopPt(position, upDown); + T2Tenant *theFloor = floorInfo->GetFloor(theNewStopPt.y, theNewStopPt.x); if (theFloor) { CRect rect; - GetEquipArea(rect); + theFloor->GetEquipArea(rect); - if (rect.Height() == 1 || stopPt.y == (rect.bottom - 1)) { + if (rect.Height() == 1 || theNewStopPt.y == (rect.bottom - 1)) { if (!IsStopPosition(position)) AddCrossEquipID(floorInfo, position); -- cgit v1.2.3