diff options
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2ElvModuleList.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/T2DLL/T2ElvModuleList.cpp b/src/T2DLL/T2ElvModuleList.cpp index d1f2224..4fc835b 100644 --- a/src/T2DLL/T2ElvModuleList.cpp +++ b/src/T2DLL/T2ElvModuleList.cpp @@ -63,43 +63,43 @@ void T2ElvModuleList::CalcBaseQDRect(RECT& outRect) { } int T2ElvModuleList::DestructModule(T2TowerDoc* towerDoc, T2Mover* mover, POINT inPt) { - int result = -1; - int zoomLevel = towerDoc->towerDoc_vf108(); + RECT theBaseQDRect; + int theModuleIndex = -1; + int theZoomLevel = towerDoc->towerDoc_vf108(); POINT pt = inPt; - RECT baseQDRect; - CalcBaseQDRect(baseQDRect); + CalcBaseQDRect(theBaseQDRect); - T2ElevatorModule *foundModule = NULL; - LArrayIterator iterator(*this, GetCount() + 1); - T2ElevatorModule *elevatorModule; + T2ElevatorModule *theElevatorModuleToRemove = NULL; + LArrayIterator iter(*this, GetCount() + 1); + T2ElevatorModule *theModule; - while (!foundModule && iterator.Previous(&elevatorModule)) { - if (elevatorModule->IsPtInArea(pt, baseQDRect)) - foundModule = elevatorModule; + while (!theElevatorModuleToRemove && iter.Previous(&theModule)) { + if (theModule->IsPtInArea(pt, theBaseQDRect)) + theElevatorModuleToRemove = theModule; } - if (foundModule) { - result = foundModule->GetIndex(); - foundModule->Remove(towerDoc, mover); + if (theElevatorModuleToRemove) { + theModuleIndex = theElevatorModuleToRemove->GetIndex(); + theElevatorModuleToRemove->Remove(towerDoc, mover); mModuleCount--; } - return result; + return theModuleIndex; } BOOL T2ElvModuleList::IsHomePosition(int position) { - BOOL result = false; + BOOL isHomePosition = false; LArrayIterator iterator(*this); - T2ElevatorModule *elevatorModule = NULL; + T2ElevatorModule *theModule = NULL; - while (iterator.Next(&elevatorModule) && !result) { - if (elevatorModule && elevatorModule->GetHomePosition() == position) - result = true; + while (iterator.Next(&theModule) && !isHomePosition) { + if (theModule && theModule->GetHomePosition() == position) + isHomePosition = true; } - return result; + return isHomePosition; } void T2ElvModuleList::MoverExpanded(T2Mover* mover, EEquipPos pos, int count) { @@ -138,13 +138,13 @@ void T2ElvModuleList::MoverExpanded(T2Mover* mover, EEquipPos pos, int count) { /*virtual*/ void T2ElvModuleList::Read(T2Archive& archive, T2TowerDoc* towerDoc) { T2MoverModuleList::Read(archive, towerDoc); - int count; - archive >> count; - mMaxModule = count; + int numOfModules; + archive >> numOfModules; + mMaxModule = numOfModules; BOOL ok = true; - for (int i = 0; i < count && ok; i++) { + for (int i = 0; i < numOfModules && ok; i++) { T2ElevatorModule *elevatorModule = new T2ElevatorModule(i); if (elevatorModule) { elevatorModule->Load(archive, towerDoc); @@ -152,11 +152,11 @@ void T2ElvModuleList::MoverExpanded(T2Mover* mover, EEquipPos pos, int count) { } } - LArrayIterator iterator(*this); - T2ElevatorModule *elevatorModule; + LArrayIterator iter(*this); + T2ElevatorModule *theModule; - while (iterator.Next(&elevatorModule)) { - if (elevatorModule->IsUsed()) + while (iter.Next(&theModule)) { + if (theModule->IsUsed()) mModuleCount++; } |