diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/game/pet/pet_position.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_doors.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_navigation.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/moves/enter_sec_class_state.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 15 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.h | 11 |
8 files changed, 33 insertions, 23 deletions
diff --git a/engines/titanic/game/pet/pet_position.cpp b/engines/titanic/game/pet/pet_position.cpp index 1dbedc4404..8ed16aef3c 100644 --- a/engines/titanic/game/pet/pet_position.cpp +++ b/engines/titanic/game/pet/pet_position.cpp @@ -153,7 +153,7 @@ bool CPETPosition::EnterViewMsg(CEnterViewMsg *msg) { roomNum = 6; if (pet) { - pet->setRooms1CC(1); + pet->setRoomsSublevel(1); pet->setRoomsRoomNum(roomNum); pet->resetRoomsHighlight(); diff --git a/engines/titanic/game/sgt/sgt_doors.cpp b/engines/titanic/game/sgt/sgt_doors.cpp index 2dabd21077..31d1c472ea 100644 --- a/engines/titanic/game/sgt/sgt_doors.cpp +++ b/engines/titanic/game/sgt/sgt_doors.cpp @@ -58,7 +58,7 @@ bool CSGTDoors::EnterViewMsg(CEnterViewMsg *msg) { static const int START_FRAMES[7] = { 0, 26, 30, 34, 38, 42, 46 }; static const int END_FRAMES[7] = { 12, 29, 33, 37, 41, 45, 49 }; - if (pet->getRooms1CC() == 1) + if (pet->getRoomsSublevel() == 1) playMovie(START_FRAMES[roomNum], END_FRAMES[roomNum], MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); else @@ -87,7 +87,7 @@ bool CSGTDoors::LeaveRoomMsg(CLeaveRoomMsg *msg) { static const int START_FRAMES[7] = { 12, 69, 65, 61, 57, 53, 49 }; static const int END_FRAMES[7] = { 25, 72, 68, 64, 60, 56, 52 }; - if (pet->getRooms1CC() == 1) + if (pet->getRoomsSublevel() == 1) playMovie(START_FRAMES[roomNum], END_FRAMES[roomNum], MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); else diff --git a/engines/titanic/game/sgt/sgt_navigation.cpp b/engines/titanic/game/sgt/sgt_navigation.cpp index d0b57ba1ec..605649b82a 100644 --- a/engines/titanic/game/sgt/sgt_navigation.cpp +++ b/engines/titanic/game/sgt/sgt_navigation.cpp @@ -65,11 +65,11 @@ bool CSGTNavigation::StatusChangeMsg(CStatusChangeMsg *msg) { if (isEquals("SGTLL")) { static const int FRAMES[7] = { 0, 149, 112, 74, 0, 36, 74 }; _statics->_changeViewNum = msg->_newStatus; - if (pet->getRooms1CC() != _statics->_changeViewNum) { + if (pet->getRoomsSublevel() != _statics->_changeViewNum) { changeView("SGTLittleLift.Node 1.N"); } - int startVal = pet->getRooms1CC(); + int startVal = pet->getRoomsSublevel(); if (startVal > _statics->_changeViewNum) playMovie(FRAMES[startVal], FRAMES[_statics->_changeViewNum], MOVIE_WAIT_FOR_FINISH); else @@ -77,7 +77,7 @@ bool CSGTNavigation::StatusChangeMsg(CStatusChangeMsg *msg) { _cursorId = _statics->_changeViewNum != 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID; - pet->setRooms1CC(_statics->_changeViewNum); + pet->setRoomsSublevel(_statics->_changeViewNum); pet->resetRoomsHighlight(); } @@ -121,7 +121,7 @@ bool CSGTNavigation::EnterViewMsg(CEnterViewMsg *msg) { if (isEquals("SGTLL")) { static const int FRAMES[3] = { 0, 36, 74 }; CPetControl *pet = getPetControl(); - loadFrame(FRAMES[pet->getRooms1CC() - 1]); + loadFrame(FRAMES[pet->getRoomsSublevel() - 1]); } return true; diff --git a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp index 6d1951b72b..d3756b994a 100644 --- a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp @@ -67,7 +67,7 @@ bool CEnterExitSecClassMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CPetControl *pet = getPetControl(); if (pet) { pet->setRoomsRoomNum(_roomNum); - pet->setRooms1CC(1); + pet->setRoomsSublevel(1); } } else if (compareRoomNameTo("SecClassLittleLift")) { if (_statics->_state == 1) { @@ -85,7 +85,7 @@ bool CEnterExitSecClassMiniLift::StatusChangeMsg(CStatusChangeMsg *msg) { CPetControl *pet = getPetControl(); if (pet) - pet->setRooms1CC(_statics->_state); + pet->setRoomsSublevel(_statics->_state); _cursorId = _statics->_state == 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID; return true; diff --git a/engines/titanic/moves/enter_sec_class_state.cpp b/engines/titanic/moves/enter_sec_class_state.cpp index 9ea8ae732a..b7209f83d8 100644 --- a/engines/titanic/moves/enter_sec_class_state.cpp +++ b/engines/titanic/moves/enter_sec_class_state.cpp @@ -98,7 +98,7 @@ bool CEnterSecClassState::StatusChangeMsg(CStatusChangeMsg *msg) { bool CEnterSecClassState::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); if (pet) { - pet->setRooms1CC(_mode); + pet->setRoomsSublevel(_mode); pet->resetRoomsHighlight(); } diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 6e64d8d344..a6915e6e13 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -499,11 +499,18 @@ public: return _rooms.getWellEntry(); } - void setRooms1CC(int v) { - _rooms.set1CC(v); + /** + * Sets the sub-level an SGT or 2nd class room is on + */ + void setRoomsSublevel(int level) { + _rooms.setSublevel(level); } - int getRooms1CC() const { - return _rooms.get1CC(); + + /** + * Gets the current sub-level for a stateroom + */ + int getRoomsSublevel() const { + return _rooms.getSublevel(); } /** diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index e330241d28..4bc27094d7 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -30,7 +30,7 @@ CPetRooms::CPetRooms() : _chevRightOnDim(nullptr), _chevRightOffDim(nullptr), _chevLeftOnLit(nullptr), _chevLeftOffLit(nullptr), _chevRightOnLit(nullptr), _chevRightOffLit(nullptr), - _floorNum(1), _elevatorNum(0), _roomNum(0), _field1CC(1), + _floorNum(1), _elevatorNum(0), _roomNum(0), _sublevel(1), _wellEntry(0), _elevatorBroken(true) { } @@ -139,7 +139,7 @@ void CPetRooms::load(SimpleFile *file, int param) { _floorNum = file->readNumber(); _elevatorNum = file->readNumber(); _roomNum = file->readNumber(); - _field1CC = file->readNumber(); + _sublevel = file->readNumber(); _wellEntry = file->readNumber(); _elevatorBroken = file->readNumber(); } @@ -155,7 +155,7 @@ void CPetRooms::save(SimpleFile *file, int indent) { file->writeNumberLine(_floorNum, indent); file->writeNumberLine(_elevatorNum, indent); file->writeNumberLine(_roomNum, indent); - file->writeNumberLine(_field1CC, indent); + file->writeNumberLine(_sublevel, indent); file->writeNumberLine(_wellEntry, indent); file->writeNumberLine(_elevatorBroken, indent); } @@ -260,7 +260,7 @@ uint CPetRooms::getRoomFlags() const { roomFlags.setElevatorNum(_elevatorNum == 1 || _elevatorNum == 2 ? 2 : 4); } - roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_field1CC > 1 ? 3 : 1)); + roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_sublevel > 1 ? 3 : 1)); } else { roomFlags.setRoomBits(0); } @@ -268,7 +268,7 @@ uint CPetRooms::getRoomFlags() const { case THIRD_CLASS: roomFlags.setElevatorNum(_elevatorNum); - roomFlags.setRoomBits(_roomNum + _field1CC * 6 - 6); + roomFlags.setRoomBits(_roomNum + _sublevel * 6 - 6); break; default: diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index 6b71359ce6..ecfeadf2b9 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -47,7 +47,7 @@ private: int _floorNum; int _elevatorNum; int _roomNum; - int _field1CC; + int _sublevel; int _wellEntry; bool _elevatorBroken; private: @@ -199,8 +199,8 @@ public: int getElevatorNum() const { return _elevatorNum; } void setRoomNum(int roomNum) { _roomNum = roomNum; } int getRoomNum() const { return _roomNum; } - void set1CC(int val) { _field1CC = val; } - int get1CC() const { return _field1CC; } + void setSublevel(int level) { _sublevel = level; } + int getSublevel() const { return _sublevel; } /** * Sets the entry number for arriving at the well @@ -212,9 +212,12 @@ public: */ int getWellEntry() const { return _wellEntry; } + /** + * Sets the broken elevator flag + */ void setElevatorBroken(bool flag) { _elevatorBroken = flag; } }; } // End of namespace Titanic -#endif /* TITANIC_PET_ROOMS_SECTION_H */ +#endif /* TITANIC_PET_ROOMS_H */ |