summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2TowerEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2TowerEvent.cpp')
-rw-r--r--src/T2DLL/T2TowerEvent.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/T2DLL/T2TowerEvent.cpp b/src/T2DLL/T2TowerEvent.cpp
index 84dc878..11287d6 100644
--- a/src/T2DLL/T2TowerEvent.cpp
+++ b/src/T2DLL/T2TowerEvent.cpp
@@ -290,18 +290,18 @@ void T2TowerEvent::StopEvent() {
int T2TowerEvent::Idle(T2TowerDoc* inDoc) {
T2EventItem *theEvent;
- T2DateTime *theNow = inDoc->towerDoc_vf120();
+ T2DateTime *theNow = inDoc->GetNow();
int nowMinutes = theNow->GetRawMinutes();
- if ((nowMinutes == 0 && _8 != nowMinutes) || mLevel != inDoc->towerDoc_vf138()) {
+ if ((nowMinutes == 0 && _8 != nowMinutes) || mLevel != inDoc->GetLevel()) {
#pragma var_order(day, eventIteratorWaiting, eventIteratorStandby, theLevelBit)
- mLevel = inDoc->towerDoc_vf138();
+ mLevel = inDoc->GetLevel();
unsigned int theLevelBit = (mLevel > 0) ? (1 << (mLevel - 1)) : 0;
int day = theNow->CalcLapseDays(12) + 1;
LArrayIterator eventIteratorStandby(mStandby);
while (eventIteratorStandby.Next(&theEvent)) {
- if (theEvent->_4 || ((theEvent->GetLevelBit() & theLevelBit) && theEvent->IsBeginDay(day))) {
+ if (theEvent->mForceStart || ((theEvent->GetLevelBit() & theLevelBit) && theEvent->IsBeginDay(day))) {
mStandby.Remove(&theEvent);
eventIteratorStandby.Reset();
StoreWaitSequence(theEvent);
@@ -310,7 +310,7 @@ int T2TowerEvent::Idle(T2TowerDoc* inDoc) {
LArrayIterator eventIteratorWaiting(mWaiting);
while (eventIteratorWaiting.Next(&theEvent)) {
- if (!theEvent->_4 && !(theEvent->GetLevelBit() & theLevelBit)) {
+ if (!theEvent->mForceStart && !(theEvent->GetLevelBit() & theLevelBit)) {
mWaiting.Remove(&theEvent);
eventIteratorWaiting.Reset();
mStandby.Add(&theEvent);
@@ -488,12 +488,12 @@ void T2TowerEvent::DrawRubble(T2TowerDoc* inDoc, T2Tenant* inTenant) {
CRect rect1, rect2;
inTenant->GetEquipArea(rect1);
- UT2Coordinate::UnitToQD(rect1, rect2, inDoc->towerDoc_vf108(), true);
- rect2.bottom = rect2.top + UT2Coordinate::UnitVSize(inDoc->towerDoc_vf108());
+ UT2Coordinate::UnitToQD(rect1, rect2, inDoc->GetZoomLevel(), true);
+ rect2.bottom = rect2.top + UT2Coordinate::UnitVSize(inDoc->GetZoomLevel());
for (int i = 0; i < rect1.Height(); i++) {
- inDoc->mWorldDef->mImageObj->DrawObject(inDoc->towerDoc_vf10C(), objectID, rect2, inDoc->towerDoc_vf108());
- rect2.OffsetRect(0, UT2Coordinate::UnitVSize(inDoc->towerDoc_vf108()));
+ inDoc->mWorldDef->mImageObj->DrawObject(inDoc->GetImage(), objectID, rect2, inDoc->GetZoomLevel());
+ rect2.OffsetRect(0, UT2Coordinate::UnitVSize(inDoc->GetZoomLevel()));
}
}
}