diff options
author | Paul Gilbert | 2016-12-18 14:32:52 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-18 14:32:52 -0500 |
commit | a222fe152928fbcda5b8fffe152553fa4a0a6c15 (patch) | |
tree | 8e224c14fbf8f1c7f01bc802a4526fa7f4b427e7 /engines/titanic/game/transport | |
parent | ac35e6138b67f2712a418370bec6652850ef67c1 (diff) | |
download | scummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.tar.gz scummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.tar.bz2 scummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.zip |
TITANIC: Renaming of lift fields
Diffstat (limited to 'engines/titanic/game/transport')
-rw-r--r-- | engines/titanic/game/transport/lift.cpp | 32 | ||||
-rw-r--r-- | engines/titanic/game/transport/lift.h | 4 | ||||
-rw-r--r-- | engines/titanic/game/transport/lift_indicator.cpp | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp index cb5bcf92a0..091631a20c 100644 --- a/engines/titanic/game/transport/lift.cpp +++ b/engines/titanic/game/transport/lift.cpp @@ -35,43 +35,43 @@ BEGIN_MESSAGE_MAP(CLift, CTransport) ON_MESSAGE(ActMsg) END_MESSAGE_MAP() -int CLift::_v1; +bool CLift::_hasHead; +bool CLift::_hasCorrectHead; int CLift::_elevator1Floor; int CLift::_elevator2Floor; int CLift::_elevator3Floor; int CLift::_elevator4Floor; -int CLift::_v6; void CLift::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_v1, indent); + file->writeNumberLine(_hasHead, indent); file->writeNumberLine(_elevator1Floor, indent); file->writeNumberLine(_elevator2Floor, indent); file->writeNumberLine(_elevator3Floor, indent); file->writeNumberLine(_elevator4Floor, indent); file->writeNumberLine(_liftNum, indent); - file->writeNumberLine(_v6, indent); + file->writeNumberLine(_hasCorrectHead, indent); CTransport::save(file, indent); } void CLift::load(SimpleFile *file) { file->readNumber(); - _v1 = file->readNumber(); + _hasHead = file->readNumber(); _elevator1Floor = file->readNumber(); _elevator2Floor = file->readNumber(); _elevator3Floor = file->readNumber(); _elevator4Floor = file->readNumber(); _liftNum = file->readNumber(); - _v6 = file->readNumber(); + _hasCorrectHead = file->readNumber(); CTransport::load(file); } bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) { CPetControl *pet = getPetControl(); - if ((!_v1 && pet->getRoomsElevatorNum() == 4) || - (!_v6 && pet->getRoomsElevatorNum() == 4)) + if ((!_hasHead && pet->getRoomsElevatorNum() == 4) || + (!_hasCorrectHead && pet->getRoomsElevatorNum() == 4)) return true; int oldFloorNum = msg->_oldStatus; @@ -245,7 +245,7 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) { loadSound("z#519.wav"); loadSound("z#518.wav"); - if (elevNum == 4 && _v1 == 1 && !_v6) { + if (elevNum == 4 && _hasHead && !_hasCorrectHead) { CVisibleMsg visibleMsg; visibleMsg.execute("GetLiftEye"); } @@ -272,7 +272,7 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) { stopGlobalSound(true, -1); CPetControl *pet = getPetControl(); - if (pet->getRoomsElevatorNum() == 4 && _v1 == 1 && !_v6) { + if (pet->getRoomsElevatorNum() == 4 && _hasHead && !_hasCorrectHead) { CVisibleMsg visibleMsg(false); visibleMsg.execute("Eye2"); } @@ -282,24 +282,24 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) { bool CLift::ActMsg(CActMsg *msg) { if (msg->_action == "LoseHead") { - _v1 = 0; - _v6 = 0; + _hasHead = false; + _hasCorrectHead = false; CActMsg actMsg1("Lift.Node 2.N"); actMsg1.execute("RPanInLiftW"); CActMsg actMsg2("Lift.Node 2.S"); actMsg2.execute("LPanInLiftW"); } else if (msg->_action == "AddWrongHead") { - _v1 = 1; - _v6 = 0; + _hasHead = true; + _hasCorrectHead = false; CActMsg actMsg1("Lift.Node 1.N"); actMsg1.execute("RPanInLiftW"); CActMsg actMsg2("Lift.Node 1.S"); actMsg2.execute("LPanInLiftW"); } else if (msg->_action == "AddRightHead") { - _v1 = 1; - _v6 = 1; + _hasHead = true; + _hasCorrectHead = true; petSetRooms1D4(0); CActMsg actMsg1("Lift.Node 1.N"); diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h index c69f7a02e6..3f2fca6c7e 100644 --- a/engines/titanic/game/transport/lift.h +++ b/engines/titanic/game/transport/lift.h @@ -37,12 +37,12 @@ class CLift : public CTransport { bool LeaveRoomMsg(CLeaveRoomMsg *msg); bool ActMsg(CActMsg *msg); public: - static int _v1; + static bool _hasHead; + static bool _hasCorrectHead; static int _elevator1Floor; static int _elevator2Floor; static int _elevator3Floor; static int _elevator4Floor; - static int _v6; int _liftNum; public: diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp index df0ff397da..563e888b3c 100644 --- a/engines/titanic/game/transport/lift_indicator.cpp +++ b/engines/titanic/game/transport/lift_indicator.cpp @@ -151,7 +151,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) { } else { _endFrame = pet->getRoomsFloorNum(); - if (petGetRoomsWellEntry() == 4 && !CLift::_v6 + if (petGetRoomsWellEntry() == 4 && !CLift::_hasCorrectHead && pet->getRoomsFloorNum() != CLift::_elevator4Floor) { petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL); } else { |