aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
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