diff options
author | Paul Gilbert | 2016-11-05 11:02:39 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-11-05 11:02:39 -0400 |
commit | 6eac69f45a436535e6c56e27cb144eed8719317f (patch) | |
tree | b15cbc2aba460682e329ffb13fa9bc4c059fcb6e /engines/titanic/pet_control | |
parent | 1c3ba9be1428b6344a2d7417aa9905cada6e6508 (diff) | |
download | scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.tar.gz scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.tar.bz2 scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.zip |
TITANIC: Replaced int passenger class with PassengerClass enum
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_control.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_conversations.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.h | 5 |
5 files changed, 9 insertions, 8 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 689ff0162f..294a99bbb1 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -696,7 +696,7 @@ void CPetControl::resetDials0() { int CPetControl::getMailDest(const CRoomFlags &roomFlags) const { if (!roomFlags.isSuccUBusRoomFlags()) - return roomFlags.getPassengerClassNum(); + return (int)roomFlags.getPassengerClassNum(); return roomFlags.getSuccUBusNum(roomFlags.getSuccUBusRoomName()); } diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index e95643b967..cdef505104 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -422,14 +422,14 @@ public: /** * Gives the player a new assigned room in the specified passenger class */ - void reassignRoom(int passClassNum) { + void reassignRoom(PassengerClass passClassNum) { _rooms.reassignRoom(passClassNum); } /** * Change the current location passenger class */ - bool changeLocationClass(int newClassNum) { + bool changeLocationClass(PassengerClass newClassNum) { return _rooms.changeLocationClass(newClassNum); } diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 03cdefbd34..57076fece5 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -427,7 +427,7 @@ int CPetConversations::canSummonBot(const CString &name) { void CPetConversations::summonBot(const CString &name) { if (_petControl) { - if (_petControl->getPassengerClass() >= 4) { + if (_petControl->getPassengerClass() >= UNCHECKED) { _petControl->displayMessage(AT_LEAST_3RD_CLASS_FOR_HELP); } else { _petControl->summonBot(name, 0); diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index 7a0c23c9b9..a10bd0d63d 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -277,7 +277,7 @@ uint CPetRooms::getRoomFlags() const { return roomFlags.get(); } -void CPetRooms::reassignRoom(int passClassNum) { +void CPetRooms::reassignRoom(PassengerClass passClassNum) { CPetRoomsGlyph *glyph = _glyphs.findAssignedRoom(); if (glyph) // Flag the old assigned room as no longer assigned @@ -330,7 +330,7 @@ CPetRoomsGlyph *CPetRooms::addGlyph(uint roomFlags, bool highlight_) { } } -bool CPetRooms::changeLocationClass(int newClassNum) { +bool CPetRooms::changeLocationClass(PassengerClass newClassNum) { CPetRoomsGlyph *glyph = _glyphs.findAssignedRoom(); if (!glyph) return 0; diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index 28d6553a33..efc7e3c969 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -26,6 +26,7 @@ #include "titanic/pet_control/pet_section.h" #include "titanic/pet_control/pet_text.h" #include "titanic/pet_control/pet_rooms_glyphs.h" +#include "titanic/game_location.h" namespace Titanic { @@ -155,12 +156,12 @@ public: /** * Gives the player a new assigned room in the specified passenger class */ - void reassignRoom(int passClassNum); + void reassignRoom(PassengerClass passClassNum); /** * Change the current location passenger class */ - bool changeLocationClass(int newClassNum); + bool changeLocationClass(PassengerClass newClassNum); /** * Returns true if a room glyph exists with the given flags |