aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-29 20:25:19 -0400
committerPaul Gilbert2016-07-10 16:37:35 -0400
commit7af7838b863893b1a67dfc3a7d82fe0febff8b07 (patch)
tree00c79934d23a116053695731d3ec5673cd757f09 /engines/titanic/pet_control
parente47494a4894301cf4034c6aad4abd65f45b38eca (diff)
downloadscummvm-rg350-7af7838b863893b1a67dfc3a7d82fe0febff8b07.tar.gz
scummvm-rg350-7af7838b863893b1a67dfc3a7d82fe0febff8b07.tar.bz2
scummvm-rg350-7af7838b863893b1a67dfc3a7d82fe0febff8b07.zip
TITANIC: Implement PET Conversations displayNPC
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_conversations.cpp42
-rw-r--r--engines/titanic/pet_control/pet_conversations.h7
-rw-r--r--engines/titanic/pet_control/pet_section.h6
3 files changed, 53 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index 988df5de33..8f0450c4c5 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -138,6 +138,48 @@ void CPetConversations::leave() {
stopNPCTimer();
}
+void CPetConversations::displayNPC(CGameObject *npc) {
+ if (npc) {
+ displayMessage(CString());
+ CString msg = "Talking to ";
+ CString name = npc->getName();
+ int id = 1;
+
+ if (name.contains("Doorbot")) {
+ msg += "the DoorBot";
+ } else if (name.contains("DeskBot")) {
+ id = 2;
+ msg += "the DeskBot";
+ } else if (name.contains("LiftBot")) {
+ id = 3;
+ msg += "a LiftBot";
+ } else if (name.contains("Parrot")) {
+ id = 4;
+ msg += "the Parrot";
+ } else if (name.contains("BarBot")) {
+ id = 5;
+ msg += "the BarBot";
+ } else if (name.contains("ChatterBot")) {
+ id = 6;
+ msg += "a ChatterBot";
+ } else if (name.contains("BellBot")) {
+ id = 7;
+ msg += "the BellBot";
+ } else if (name.contains("Maitre")) {
+ id = 8;
+ msg += "the Maitre d'Bot";
+ } else if (name.contains("Succubus") || name.contains("Sub")) {
+ id = 9;
+ msg += "a Succ-U-Bus";
+ } else {
+ msg += "Unknown";
+ }
+
+ _log.setNPC(1, id);
+ displayMessage(msg);
+ }
+}
+
bool CPetConversations::setupControl(CPetControl *petControl) {
if (petControl) {
_petControl = petControl;
diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h
index c3eefa9e69..ad993ec3b2 100644
--- a/engines/titanic/pet_control/pet_conversations.h
+++ b/engines/titanic/pet_control/pet_conversations.h
@@ -171,7 +171,12 @@ public:
/**
* Called when a section is being left, to switch to another area
*/
- virtual void leave();
+ virtual void leave();
+
+ /**
+ * Display a title for an NPC
+ */
+ virtual void displayNPC(CGameObject *npc);
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h
index d582f38f0d..995feee27b 100644
--- a/engines/titanic/pet_control/pet_section.h
+++ b/engines/titanic/pet_control/pet_section.h
@@ -153,7 +153,11 @@ public:
virtual CGameObject *getBackground(int index) const { return nullptr; }
- virtual void proc32() {}
+ /**
+ * Display a title for an NPC
+ */
+ virtual void displayNPC(CGameObject *npc);
+
virtual void proc33() {}
virtual void proc34() {}
virtual void proc35() {}