diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 6 | ||||
-rw-r--r-- | engines/titanic/game/transport/lift.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 7 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.h | 4 |
6 files changed, 19 insertions, 14 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 19cae3f330..9134a50915 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -1604,10 +1604,10 @@ int CGameObject::petGetRoomsWellEntry() const { return petControl ? petControl->getRoomsWellEntry() : 0; } -void CGameObject::petSetRooms1D4(int v) { +void CGameObject::petSetRoomsElevatorBroken(bool flag) { CPetControl *pet = getPetControl(); if (pet) - pet->setRooms1D4(v); + pet->setRoomsElevatorBroken(flag); } void CGameObject::petOnSummonBot(const CString &name, int val) { diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 744887a04b..078e63267d 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -908,8 +908,10 @@ public: */ void petSetRoomsWellEntry(int entryNum); - void petSetRooms1D4(int v); - + /** + * Sets the flag for whether elevator 4 has yet been fixed + */ + void petSetRoomsElevatorBroken(bool flag); /** * Show the PET diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp index 091631a20c..a6f45bda98 100644 --- a/engines/titanic/game/transport/lift.cpp +++ b/engines/titanic/game/transport/lift.cpp @@ -300,7 +300,7 @@ bool CLift::ActMsg(CActMsg *msg) { } else if (msg->_action == "AddRightHead") { _hasHead = true; _hasCorrectHead = true; - petSetRooms1D4(0); + petSetRoomsElevatorBroken(false); CActMsg actMsg1("Lift.Node 1.N"); actMsg1.execute("RPanInLiftW"); diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index af5ceb0a2a..0a8b6295be 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -551,8 +551,11 @@ public: return _rooms.getAssignedElevatorNum(); } - void setRooms1D4(int val) { - _rooms.set1D4(val); + /** + * Sets the flag for whether elevator 4 has yet been fixed + */ + void setRoomsElevatorBroken(bool flag) { + _rooms.setElevatorBroken(flag); } bool isRoom59706() const { diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index ebf8381eed..f8017373ec 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -30,8 +30,8 @@ CPetRooms::CPetRooms() : _chevRightOnDim(nullptr), _chevRightOffDim(nullptr), _chevLeftOnLit(nullptr), _chevLeftOffLit(nullptr), _chevRightOnLit(nullptr), _chevRightOffLit(nullptr), - _floorNum(0), _elevatorNum(0), _roomNum(0), _field1CC(0), - _wellEntry(0), _field1D4(0) { + _floorNum(1), _elevatorNum(0), _roomNum(0), _field1CC(1), + _wellEntry(0), _elevatorBroken(true) { } bool CPetRooms::setup(CPetControl *petControl) { @@ -141,7 +141,7 @@ void CPetRooms::load(SimpleFile *file, int param) { _roomNum = file->readNumber(); _field1CC = file->readNumber(); _wellEntry = file->readNumber(); - _field1D4 = file->readNumber(); + _elevatorBroken = file->readNumber(); } } @@ -157,7 +157,7 @@ void CPetRooms::save(SimpleFile *file, int indent) { file->writeNumberLine(_roomNum, indent); file->writeNumberLine(_field1CC, indent); file->writeNumberLine(_wellEntry, indent); - file->writeNumberLine(_field1D4, indent); + file->writeNumberLine(_elevatorBroken, indent); } void CPetRooms::enter(PetArea oldArea) { @@ -285,7 +285,7 @@ void CPetRooms::reassignRoom(PassengerClass passClassNum) { glyph->setMode(RGM_PREV_ASSIGNED_ROOM); CRoomFlags roomFlags; - roomFlags.setRandomLocation(passClassNum, _field1D4); + roomFlags.setRandomLocation(passClassNum, _elevatorBroken); glyph = addRoom(roomFlags, true); if (glyph) { // Flag the new room as assigned to the player, and highlight it diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index efc7e3c969..19c97c0d4e 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -49,7 +49,7 @@ private: int _roomNum; int _field1CC; int _wellEntry; - int _field1D4; + bool _elevatorBroken; private: /** * Setup the control @@ -212,7 +212,7 @@ public: */ int getWellEntry() const { return _wellEntry; } - void set1D4(int val) { _field1D4 = val; } + void setElevatorBroken(bool flag) { _elevatorBroken = flag; } }; } // End of namespace Titanic |