diff options
author | Paul Gilbert | 2016-12-18 14:50:08 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-18 14:50:08 -0500 |
commit | c70380aef6a6f2fd1251d085f5a5707142d6d521 (patch) | |
tree | 6a5362fa81b16a38a90af8ed938ed2c53b70a524 /engines/titanic/pet_control | |
parent | a222fe152928fbcda5b8fffe152553fa4a0a6c15 (diff) | |
download | scummvm-rg350-c70380aef6a6f2fd1251d085f5a5707142d6d521.tar.gz scummvm-rg350-c70380aef6a6f2fd1251d085f5a5707142d6d521.tar.bz2 scummvm-rg350-c70380aef6a6f2fd1251d085f5a5707142d6d521.zip |
TITANIC: Renamings for PET Rooms flag for if elevator is broken
Diffstat (limited to 'engines/titanic/pet_control')
-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 |
3 files changed, 12 insertions, 9 deletions
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 |