aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-22 08:00:20 -0400
committerPaul Gilbert2016-07-15 19:23:57 -0400
commit23da68350dee0b211cdcf29734146ac71583044b (patch)
tree5fb6df0d3b6bed30cac8931cd162792fd8656040 /engines/titanic/pet_control
parent4f85562c47d6e4b16e9b0e8e018e09635bf4ba9d (diff)
downloadscummvm-rg350-23da68350dee0b211cdcf29734146ac71583044b.tar.gz
scummvm-rg350-23da68350dee0b211cdcf29734146ac71583044b.tar.bz2
scummvm-rg350-23da68350dee0b211cdcf29734146ac71583044b.zip
TITANIC: Finished CRoomFlags methods
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp7
-rw-r--r--engines/titanic/pet_control/pet_control.h6
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index bc2ab036b2..f7973e008b 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -533,4 +533,11 @@ void CPetControl::resetDials(int flag) {
_conversations.resetDials(_activeNPCName);
}
+int CPetControl::getMailDest(const CRoomFlags &roomFlags) const {
+ if (!roomFlags.isSuccUBusRoomFlags())
+ return roomFlags.getPassengerClassNum();
+
+ return roomFlags.getSuccUBusNum(roomFlags.getSuccUBusRoomName());
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index 3dee76fea6..758069e5f1 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -36,6 +36,7 @@
#include "titanic/pet_control/pet_real_life.h"
#include "titanic/pet_control/pet_remote.h"
#include "titanic/pet_control/pet_rooms.h"
+#include "titanic/room_flags.h"
namespace Titanic {
@@ -319,6 +320,11 @@ public:
bool getC0() const { return _fieldC0 > 0; }
void incC0() { ++_fieldC0; }
void decC0() { --_fieldC0; }
+
+ /**
+ * Get mail destination given the specified flags
+ */
+ int getMailDest(const CRoomFlags &roomFlags) const;
};
} // End of namespace Titanic