From 5c6a48b2ff362a70416a6a00fda7d06e0f276f2d Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 02:43:29 +0100 Subject: i am in hell --- src/T2DLL/T2People.cpp | 346 ++++++++++++++++++++++++++----------------------- 1 file changed, 183 insertions(+), 163 deletions(-) (limited to 'src/T2DLL/T2People.cpp') diff --git a/src/T2DLL/T2People.cpp b/src/T2DLL/T2People.cpp index a238b1c..ce92a22 100644 --- a/src/T2DLL/T2People.cpp +++ b/src/T2DLL/T2People.cpp @@ -4,6 +4,7 @@ #include "T2DateTime.h" #include "T2FloorInfo.h" #include "T2ImageObj.h" +#include "T2MetroRailway.h" #include "T2Mover.h" #include "T2Name.h" #include "T2NameList.h" @@ -131,28 +132,28 @@ int T2People::GetWidth() const { } int T2People::GetRouteType() { - int result = kRouteType0; + int theRouteType = kRouteType0; T2SilhouetteDef *silhouetteDef = mSilhouetteDef[mStyle]; if (!IsSetSpecialFlag(kSpecialFlag80)) { T2SilhouetteDef *silhouetteDef = mSilhouetteDef[mStyle]; if (silhouetteDef) - result = silhouetteDef->GetRouteType(); + theRouteType = silhouetteDef->GetRouteType(); } else { - result = kRouteTypeNeg1; + theRouteType = kRouteTypeNeg1; } - return result; + return theRouteType; } BOOL T2People::CalcWaitPersonArea(T2FloorInfo* floorInfo, RECT& rect) { - BOOL result = false; + BOOL ok = false; - T2Request *request = floorInfo->GetRequest(mCurrEquipID); - if (request) - result = request->CalcPersonArea(this, rect); + T2Request *theRequest = floorInfo->GetRequest(mCurrEquipID); + if (theRequest) + ok = theRequest->CalcPersonArea(this, rect); - return result; + return ok; } void T2People::CalcWalkingSilhouetteArea(RECT& rect) const { @@ -235,9 +236,9 @@ unsigned int T2People::GetCurTenantID() const { if (!IsWalk()) { if (IsReachDestination(towerDoc->towerDoc_vf12C()->GetGroundLine() - 1)) { T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); - T2Tenant *tenant = floorInfo->GetTenant(mDstTenant); - if (tenant) - tenant->EnterTenant(towerDoc, this); + T2Tenant *theDstTenant = floorInfo->GetTenant(mDstTenant); + if (theDstTenant) + theDstTenant->EnterTenant(towerDoc, this); } } break; @@ -268,20 +269,20 @@ unsigned int T2People::GetCurTenantID() const { } void T2People::IdleWaitMover(T2TowerDoc* towerDoc) { - T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); - BOOL changed = IncStress(5); + T2FloorInfo *theFloorInfo = towerDoc->towerDoc_vf12C(); + BOOL didChange = IncStress(5); if (mStress >= 300) { - T2Request *request = floorInfo->GetRequest(mCurrEquipID); + T2Request *request = theFloorInfo->GetRequest(mCurrEquipID); request->Leave(this); JumpToDestination(towerDoc); IncEstimate(-50); - changed = false; + didChange = false; } - if (changed) { + if (didChange) { RECT rect; - CalcWaitPersonArea(floorInfo, rect); + CalcWaitPersonArea(theFloorInfo, rect); towerDoc->GetTowerMainView()->tmv_vf128(rect, false); } } @@ -335,7 +336,7 @@ void T2People::MoveToLobby(T2TowerDoc* towerDoc) { } BOOL T2People::MoveToParking(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; T2RegistedTenantDB *registedTenantDB = towerDoc->towerDoc_vf174(); if (registedTenantDB) { @@ -348,53 +349,65 @@ BOOL T2People::MoveToParking(T2TowerDoc* towerDoc) { if (parking) { SetDestinationToReturn(); parking->EnterTenant(towerDoc, this); - result = true; + ok = true; } } - return result; + return ok; } BOOL T2People::MoveToSubway(T2TowerDoc* towerDoc) { - // TODO: T2MetroRailway - return 0; + BOOL ok = false; + + T2TowerEvent *event = towerDoc->mWorldDef->GetTowerEvent(); + T2DateTime *now = towerDoc->towerDoc_vf120(); + T2Transport *metro = event->GetMetroRailway(); + if (metro) { + T2Transport *available = metro->GetAvailable(now); + if (available) { + available->Enter(this); + ok = true; + } + } + + return ok; } BOOL T2People::MoveToShip(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; - T2TowerEvent *towerEvent = towerDoc->mWorldDef->GetTowerEvent(); + T2TowerEvent *event = towerDoc->mWorldDef->GetTowerEvent(); T2DateTime *now = towerDoc->towerDoc_vf120(); - T2Transport *transport = towerEvent->GetCruise(); - if (transport) { - T2Transport *available = transport->GetAvailable(now); + T2Transport *cruise = event->GetCruise(); + if (cruise) { + T2Transport *available = cruise->GetAvailable(now); if (available) { available->Enter(this); - result = true; + ok = true; } } - return result; + return ok; } void T2People::MoveByEStair(T2TowerDoc* towerDoc) { T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); if (floorInfo) { - T2Tenant *curTenant = floorInfo->GetTenant(mCurrEquipID); - T2Tenant *dstFloor = floorInfo->GetFloor(mCurrDestPos.y, mCurrDestPos.x); + T2Tenant *theCurTenant = floorInfo->GetTenant(mCurrEquipID); + T2Tenant *theDstFloor = floorInfo->GetFloor(mCurrDestPos.y, mCurrDestPos.x); - if (curTenant && dstFloor) { + if (theCurTenant && theDstFloor) { RECT dstRect; - dstFloor->GetEquipArea(dstRect); + theDstFloor->GetEquipArea(dstRect); if (mCurrDestPos.x == dstRect.left) mDirection = 0; else if (mCurrDestPos.x == (dstRect.right - 2)) mDirection = 1; - curTenant->Leave(this); - dstFloor->Enter(this); + theCurTenant->Leave(this); + theDstFloor->Enter(this); } else { ChangeStatus(kStatus3); } @@ -423,13 +436,13 @@ void T2People::SolveNoRoute(T2TowerDoc* towerDoc) { T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); if (IsWalk()) { // "道がないよ~" - there is no way - CString msg = "\x93\xB9\x82\xAA\x82\xC8\x82\xA2\x82\xE6\x81\x60"; - towerDoc->towerDoc_vf13C()->PeopleBalloonMessage(msg, this); + CString theMessage = "\x93\xB9\x82\xAA\x82\xC8\x82\xA2\x82\xE6\x81\x60"; + towerDoc->towerDoc_vf13C()->PeopleBalloonMessage(theMessage, this); - RECT rect; - CalcWalkingSilhouetteArea(rect); - floorInfo->SetTenantDrawModeByRect(rect, DrawMode1); - towerDoc->GetTowerMainView()->tmv_vf128(rect, false); + RECT theRect; + CalcWalkingSilhouetteArea(theRect); + floorInfo->SetTenantDrawModeByRect(theRect, DrawMode1); + towerDoc->GetTowerMainView()->tmv_vf128(theRect, false); } T2Tenant *tenant = floorInfo->GetTenant(mCurrEquipID); @@ -447,7 +460,7 @@ void T2People::SolveNoRoute(T2TowerDoc* towerDoc) { } BOOL T2People::FindRoute(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; int status = mStatus; T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); @@ -461,7 +474,7 @@ BOOL T2People::FindRoute(T2TowerDoc* towerDoc) { status = kStatus10; else status = kStatus14; - result = true; + ok = true; } else { int routeType = GetRouteType(); if (towerDoc->towerDoc_vf124()->GetNextRoute(mCurPosition, mCurrDestPos, routeType)) { @@ -469,13 +482,13 @@ BOOL T2People::FindRoute(T2TowerDoc* towerDoc) { status = kStatus5; else status = kStatus13; - result = true; + ok = true; } } } } - if (result) { + if (ok) { if (mCurPosition.x < mCurrDestPos.x) mDirection = 0; else @@ -488,7 +501,7 @@ BOOL T2People::FindRoute(T2TowerDoc* towerDoc) { trafficInfo->Pass(mCurPosition, mCurrDestPos, 1); } - return result; + return ok; } void T2People::JumpToDestination(T2TowerDoc* towerDoc) { @@ -510,7 +523,7 @@ void T2People::GoOutTower(T2TowerDoc* towerDoc) { } void T2People::IdleSearchedPerson(T2TowerDoc* towerDoc) { - BOOL flag = false; + BOOL changed = false; int varC; if (someGlobalPeople == this) @@ -523,23 +536,23 @@ void T2People::IdleSearchedPerson(T2TowerDoc* towerDoc) { case kStatus13: case kStatus14: if (mDirection != 1) - flag = WalkSearchedPersonRight(towerDoc); + changed = WalkSearchedPersonRight(towerDoc); else - flag = WalkSearchedPersonLeft(towerDoc); + changed = WalkSearchedPersonLeft(towerDoc); break; case kStatus2: { T2TowerMainView *mainView = towerDoc->GetTowerMainView(); - RECT rect; - CalcWalkingSilhouetteArea(rect); - mainView->tmv_vf128(rect, false); + RECT area; + CalcWalkingSilhouetteArea(area); + mainView->tmv_vf128(area, false); mStatus = kStatus3; break; } } - if (flag) { + if (changed) { switch (mStatus) { case kStatus5: if (!IsRegistRequest(towerDoc)) @@ -549,9 +562,9 @@ void T2People::IdleSearchedPerson(T2TowerDoc* towerDoc) { case kStatus10: { T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); - T2Tenant *tenant = floorInfo->GetTenant(mDstTenant); - if (tenant) - tenant->EnterTenant(towerDoc, this); + T2Tenant *theDstTenant = floorInfo->GetTenant(mDstTenant); + if (theDstTenant) + theDstTenant->EnterTenant(towerDoc, this); else ChangeStatus(kStatus4); break; @@ -573,88 +586,88 @@ void T2People::IdleSearchedPerson(T2TowerDoc* towerDoc) { } BOOL T2People::WalkSearchedPersonRight(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; T2FloorInfo *floorInfo = towerDoc->mFloorInfo; - T2TowerMainView *towerMainView = towerDoc->GetTowerMainView(); + T2TowerMainView *theMainView = towerDoc->GetTowerMainView(); RECT rect; SetRect(&rect, mCurPosition.x, mCurPosition.y, mCurPosition.x + 2, mCurPosition.y + 1); floorInfo->SetTenantDrawModeByRect(rect, DrawMode1); - towerMainView->tmv_vf128(rect, false); + theMainView->tmv_vf128(rect, false); - int var = 2; + int theWalkWidth = 2; - if ((mCurPosition.x + var) > mCurrDestPos.x) { + if ((mCurPosition.x + theWalkWidth) < mCurrDestPos.x) { if (mWalkStyle != 1) ChangeWalkStyle(1); else ChangeWalkStyle(0); } else { - var = mCurrDestPos.x - mCurPosition.x; + theWalkWidth = mCurrDestPos.x - mCurPosition.x; ChangeWalkStyle(0); - result = true; + ok = true; } - mCurPosition.x += var; - OffsetRect(&rect, var, 0); - towerMainView->tmv_vf128(rect, false); + mCurPosition.x += theWalkWidth; + OffsetRect(&rect, theWalkWidth, 0); + theMainView->tmv_vf128(rect, false); if (mCurPosition.y != (floorInfo->GetGroundLine() - 1)) - IncStress(var / 4); + IncStress(theWalkWidth / 4); - return result; + return ok; } BOOL T2People::WalkSearchedPersonLeft(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); - T2TowerMainView *towerMainView = towerDoc->GetTowerMainView(); + T2TowerMainView *theMainView = towerDoc->GetTowerMainView(); RECT rect; SetRect(&rect, mCurPosition.x, mCurPosition.y, mCurPosition.x + 2, mCurPosition.y + 1); floorInfo->SetTenantDrawModeByRect(rect, DrawMode1); - towerMainView->tmv_vf128(rect, false); + theMainView->tmv_vf128(rect, false); - int var = 2; + int theWalkWidth = 2; - if ((mCurPosition.x - var) > mCurrDestPos.x) { + if ((mCurPosition.x - theWalkWidth) > mCurrDestPos.x) { if (mWalkStyle != 1) ChangeWalkStyle(1); else ChangeWalkStyle(0); } else { - var = mCurPosition.x - mCurrDestPos.x; + theWalkWidth = mCurPosition.x - mCurrDestPos.x; ChangeWalkStyle(0); - result = true; + ok = true; } #line 809 - _ASSERT(var >= 0); + _ASSERT(theWalkWidth >= 0); - mCurPosition.x -= var; - OffsetRect(&rect, -var, 0); - towerMainView->tmv_vf128(rect, false); + mCurPosition.x -= theWalkWidth; + OffsetRect(&rect, -theWalkWidth, 0); + theMainView->tmv_vf128(rect, false); if (mCurPosition.y != (floorInfo->GetGroundLine() - 1)) - IncStress(var / 4); + IncStress(theWalkWidth / 4); - return result; + return ok; } BOOL T2People::IsReachDestination(int y) { - BOOL result = false; + BOOL ok = false; int var = 16; if (mDirection != 1) { if ((mCurPosition.x + var) >= mCurrDestPos.x) { var = mCurrDestPos.x - mCurPosition.x; - result = true; + ok = true; } mCurPosition.x += var; } else { if ((mCurPosition.x - var) <= mCurrDestPos.x) { var = mCurPosition.x - mCurrDestPos.x; - result = true; + ok = true; } mCurPosition.x -= var; } @@ -662,18 +675,18 @@ BOOL T2People::IsReachDestination(int y) { if (mCurPosition.y != y) IncStress(var / 4); - return result; + return ok; } BOOL T2People::IsRegistRequest(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL done = false; - T2FloorInfo *floorInfo = towerDoc->mFloorInfo; - T2Request *request = floorInfo->GetRequest(mCurPosition.y, mCurPosition.x); - if (request) - result = request->Regist(towerDoc, this); + T2FloorInfo *theFloorInfo = towerDoc->mFloorInfo; + T2Request *theRequest = theFloorInfo->GetRequest(mCurPosition.y, mCurPosition.x); + if (theRequest) + done = theRequest->Regist(towerDoc, this); - return result; + return done; } void T2People::ChangeStatus(int status) { @@ -700,7 +713,12 @@ void T2People::SetSilhouette() { T2SilhouetteDef *silhouetteDef = mSilhouetteDef[mStyle]; if (silhouetteDef) { - m18 = silhouetteDef->GetSilhouette((mDirection != -1) ? mDirection : 0, mWalkStyle); + int var; + if (mDirection != -1) + var = mDirection; + else + var = 0; + m18 = silhouetteDef->GetSilhouette(var, mWalkStyle); } else { m18 = 0; } @@ -724,7 +742,7 @@ void T2People::SetAnimePattern(int fillerStart, int fillerRange, int hStart, int } BOOL T2People::StopOnHisWay(T2TenantMemberDef* tenantMemberDef, int econoType, int score, RECT rect, int bindTime, int tenantType, int tenantID, int startTime) { - BOOL result = false; + BOOL ok = false; BOOL negScoreFlag = false; if (score < 0) { @@ -739,18 +757,18 @@ BOOL T2People::StopOnHisWay(T2TenantMemberDef* tenantMemberDef, int econoType, i if (SetDestinationToReturn()) { SetDestination(tenantID, startTime); ChangeStatus(kStatus3); - result = true; + ok = true; } } } } } - return result; + return ok; } BOOL T2People::CalledInTenant(T2TenantMemberDef* tenantMemberDef, int econoType, int bindTime, int tenantType, unsigned int tenantID, unsigned int startTime) { - BOOL result = false; + BOOL ok = false; if (CalcFreeTime(startTime) > bindTime && mPrevTenantType != tenantType) { #line 992 @@ -758,11 +776,11 @@ BOOL T2People::CalledInTenant(T2TenantMemberDef* tenantMemberDef, int econoType, if (mPeopleType->CheckWithDemand(tenantMemberDef, econoType)) { SetDestination(tenantID, startTime); - result = true; + ok = true; } } - return result; + return ok; } int T2People::CalcFreeTime(unsigned int time) { @@ -878,23 +896,23 @@ BOOL T2People::StressChanged() { BOOL changed = false; if (!IsSpecialColor()) { - int col = mColor; + int color = mColor; T2PeopleDef *def = (T2PeopleDef *) GetMatterDef(); if (!def) return false; if (mStress < def->GetStressBlueLimit()) - col = 1; + color = 1; else if (mStress < def->GetStressYellowLimit()) - col = 7; + color = 7; else if (mStress < (def->GetStressMax() - 10)) - col = 9; + color = 9; else - col = 9; + color = 9; - if (mColor != col) { - mColor = col; + if (mColor != color) { + mColor = color; changed = true; } } @@ -944,29 +962,29 @@ void T2People::ClearColor() { } BOOL T2People::VIPEstimation() { - BOOL result = false; + BOOL ok = false; if (IsVIP()) - result = CalcCurrEstimate() > 200; + ok = CalcCurrEstimate() > 200; - return result; + return ok; } BOOL T2People::SearchToilet(T2TowerDoc* towerDoc) { - BOOL result = false; + BOOL ok = false; if (SetDestinationToReturn()) { - T2RegistedTenantDB *registedTenantDB = towerDoc->towerDoc_vf174(); - T2RouteNavigator *routeNavigator = towerDoc->towerDoc_vf124(); - if (registedTenantDB && routeNavigator) { + T2RegistedTenantDB *theDB = towerDoc->towerDoc_vf174(); + T2RouteNavigator *theNavi = towerDoc->towerDoc_vf124(); + if (theDB && theNavi) { int toiletStatus; - T2Tenant *toilet = registedTenantDB->SearchToilet(routeNavigator, mCurPosition, toiletStatus); + T2Tenant *theToilet = theDB->SearchToilet(theNavi, mCurPosition, toiletStatus); - if (toilet) { - toilet->IncReserveCount(1); - SetDestination(toilet->GetEquipID()); + if (theToilet) { + theToilet->IncReserveCount(1); + SetDestination(theToilet->GetEquipID()); SetStatus(kStatus3); - result = true; + ok = true; } else { SetReturnToDestination(); T2TowerMessage *towerMessage = towerDoc->towerDoc_vf13C(); @@ -988,7 +1006,7 @@ BOOL T2People::SearchToilet(T2TowerDoc* towerDoc) { } } - return result; + return ok; } void T2People::DrawSearchedPerson(T2TowerDoc* towerDoc) { @@ -1050,9 +1068,9 @@ void T2People::Draw(T2TowerDoc* towerDoc, T2Equip* equip) { UT2Coordinate::UnitToQD(rect, towerDoc->towerDoc_vf108()); - int objectID = equip->GetEquipDef()->mImageObj->FindObject(1003, mFiller); - if (objectID >= 0) - equip->GetEquipDef()->mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), objectID, rect, towerDoc->towerDoc_vf108()); + int theInd = equip->GetEquipDef()->mImageObj->FindObject(1003, mFiller); + if (theInd >= 0) + equip->GetEquipDef()->mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), theInd, rect, towerDoc->towerDoc_vf108()); } } @@ -1064,9 +1082,9 @@ void T2People::DrawAt(T2TowerDoc* towerDoc, T2Equip* equip, POINT pt) { UT2Coordinate::UnitToQD(rect, towerDoc->towerDoc_vf108()); - int objectID = equip->GetEquipDef()->mImageObj->FindObject(1003, mFiller); - if (objectID >= 0) - equip->GetEquipDef()->mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), objectID, rect); + int theInd = equip->GetEquipDef()->mImageObj->FindObject(1003, mFiller); + if (theInd >= 0) + equip->GetEquipDef()->mImageObj->DrawObject(towerDoc->towerDoc_vf10C(), theInd, rect); } } @@ -1133,43 +1151,43 @@ void T2People::Interview(T2TowerDoc* towerDoc) { } BOOL T2People::GetInterviewWords(T2TowerDoc* towerDoc, CString& outStr) { - OptionEvent11Data eventData; + OptionEvent11Data optionEvent; - eventData.str = &outStr; - eventData.people = this; - if (!DispatchOptionEvent(OptionEventType_11, &eventData)) + optionEvent.people = this; + optionEvent.str = &outStr; + if (!DispatchOptionEvent(OptionEventType_11, &optionEvent)) return outStr != ""; - unsigned int flags = 0; + unsigned int theFlags = 0; - T2PeopleDef *peopleDef = (T2PeopleDef *) GetMatterDef(); - T2FloorInfo *floorInfo = towerDoc->towerDoc_vf12C(); - T2Tenant *dstTenant = floorInfo->GetTenant(mDstTenant); - T2Tenant *workTenant = floorInfo->GetTenant(GetWorkTenant()); + T2PeopleDef *thePeopleDef = (T2PeopleDef *) GetMatterDef(); + T2FloorInfo *theFloorInfo = towerDoc->towerDoc_vf12C(); + T2Tenant *theDstTenant = theFloorInfo->GetTenant(mDstTenant); + T2Tenant *theWorkTenant = theFloorInfo->GetTenant(GetWorkTenant()); - T2EquipDef *equipDef = NULL; + T2EquipDef *theEquipDef = NULL; if (mDstTenant != 1) { - if (dstTenant) { - equipDef = dstTenant->GetEquipDef(); - if (dstTenant == workTenant) - flags |= 1; + if (theDstTenant) { + theEquipDef = theDstTenant->GetEquipDef(); + if (theDstTenant == theWorkTenant) + theFlags |= 1; } } else { - flags |= 8; - equipDef = towerDoc->mTenantTemplates->FindTenantDef(mPrevTenantType); - if (workTenant && workTenant->GetEquipDef() == equipDef) - flags |= 1; + theFlags |= 8; + theEquipDef = towerDoc->mTenantTemplates->FindTenantDef(mPrevTenantType); + if (theWorkTenant && theWorkTenant->GetEquipDef() == theEquipDef) + theFlags |= 1; } if (mStyle == kPeopleStyle1) - flags |= 2; + theFlags |= 2; else if (mStyle == kPeopleStyle2) - flags |= 4; + theFlags |= 4; unsigned int level = 0; if (IsVIP()) { if (mDstTenant == 1 && VIPEstimation()) - flags |= 0x10; + theFlags |= 0x10; switch (towerDoc->towerDoc_vf138()) { case 1: @@ -1184,40 +1202,40 @@ BOOL T2People::GetInterviewWords(T2TowerDoc* towerDoc, CString& outStr) { } } else if (IsMaru()) { level = 6; - flags &= ~1; + theFlags &= ~1; } else if (IsReggae()) { level = 7; - } else if (IsSetSpecialFlag(kSpecialFlag4) && (!dstTenant || dstTenant->GetRegistID() != kTenantRegistID4)) { + } else if (IsSetSpecialFlag(kSpecialFlag4) && (!theDstTenant || theDstTenant->GetRegistID() != kTenantRegistID4)) { level = 1; - } else if (IsSetSpecialFlag(kSpecialFlag2) && (!dstTenant || dstTenant->GetRegistID() != kTenantRegistID7)) { + } else if (IsSetSpecialFlag(kSpecialFlag2) && (!theDstTenant || theDstTenant->GetRegistID() != kTenantRegistID7)) { level = 2; } - T2WordDefArray *wordDefArray = NULL; + T2WordDefArray *theWordDefArray = NULL; if (level != 0) { - wordDefArray = towerDoc->towerDoc_vf170()->mWordDefArray; + theWordDefArray = towerDoc->towerDoc_vf170()->mWordDefArray; } else { - if (mStatus == kStatus6 && peopleDef && mStress >= peopleDef->GetStressYellowLimit()) { - T2Request *request = floorInfo->GetRequest(mCurrEquipID); + if (mStatus == kStatus6 && thePeopleDef && mStress >= thePeopleDef->GetStressYellowLimit()) { + T2Request *request = theFloorInfo->GetRequest(mCurrEquipID); if (request) { unsigned int moverID = request->GetMoverID(); if (moverID) { - T2Mover *mover = floorInfo->GetMover(moverID); - equipDef = mover ? mover->GetEquipDef() : NULL; + T2Mover *mover = theFloorInfo->GetMover(moverID); + theEquipDef = mover ? mover->GetEquipDef() : NULL; } } } - wordDefArray = equipDef ? equipDef->mWordDefArray : NULL; + theWordDefArray = theEquipDef ? theEquipDef->mWordDefArray : NULL; } - if (wordDefArray) - wordDefArray->GetWords(GetSex(), GetAge(), flags, level, outStr); + if (theWordDefArray) + theWordDefArray->GetWords(GetSex(), GetAge(), theFlags, level, outStr); - eventData.str = &outStr; - eventData.people = this; - DispatchOptionEvent(OptionEventType_12, &eventData); + optionEvent.people = this; + optionEvent.str = &outStr; + DispatchOptionEvent(OptionEventType_12, &optionEvent); return outStr != ""; } @@ -1257,6 +1275,7 @@ void T2People::BreakoutEmergency(T2TowerDoc* towerDoc) { T2Matter::LoadSelf(archive, towerDoc); if (IsUsed()) { +#pragma var_order(uc, s, us, i, peopleTypeCode, linkID, linkCode) unsigned char uc; short s; unsigned short us; @@ -1328,6 +1347,7 @@ void T2People::BreakoutEmergency(T2TowerDoc* towerDoc) { T2Matter::SaveSelf(archive); if (IsUsed()) { +#pragma var_order(linkPeople, uc, s, emptyLinkID, us, i, peopleTypeCode, linkCode) unsigned char uc; short s; unsigned short us; @@ -1466,13 +1486,13 @@ void T2People::GetName(CString& outStr) { } } -void T2People::ClearSpecialFlag(unsigned int flag) { +inline void T2People::ClearSpecialFlag(unsigned int flag) { mSpecialFlag &= ~flag; if ((flag & kSpecialFlag4) > 0) mColor = 1; } -void T2People::SetSpecialFlag(unsigned int flag) { +inline void T2People::SetSpecialFlag(unsigned int flag) { mSpecialFlag |= flag; if ((flag & kSpecialFlag4) > 0) mColor = 17; -- cgit v1.2.3