aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-26 12:39:44 -0400
committerPaul Gilbert2016-07-15 19:25:09 -0400
commit6f063c4703e5705edbba7ad39ef9c0656b74bc75 (patch)
tree64cb04d4e3f3a327f6a080ffef8e7af6c0f12152 /engines/titanic/npcs
parent0146a3c6b6bdb16eef6f46e116b0d9fe9883858f (diff)
downloadscummvm-rg350-6f063c4703e5705edbba7ad39ef9c0656b74bc75.tar.gz
scummvm-rg350-6f063c4703e5705edbba7ad39ef9c0656b74bc75.tar.bz2
scummvm-rg350-6f063c4703e5705edbba7ad39ef9c0656b74bc75.zip
TITANIC: Fleshing out CGameObject and CPetControl methods
Diffstat (limited to 'engines/titanic/npcs')
-rw-r--r--engines/titanic/npcs/deskbot.cpp16
-rw-r--r--engines/titanic/npcs/true_talk_npc.cpp10
-rw-r--r--engines/titanic/npcs/true_talk_npc.h10
3 files changed, 19 insertions, 17 deletions
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index eb42a8e21d..3fe92367ce 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -80,7 +80,7 @@ bool CDeskbot::TurnOn(CTurnOn *msg) {
setVisible(true);
playClip("BellRinging", 4);
playSound("b#69.wav");
- setPetArea(PET_CONVERSATION);
+ petSetArea(PET_CONVERSATION);
_npcFlags |= NPCFLAG_20000;
_deskbotActive = true;
@@ -110,7 +110,7 @@ bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) {
bool flag = false;
if (_npcFlags & NPCFLAG_10000) {
if (_classNum) {
- setPetArea(PET_ROOMS);
+ petSetArea(PET_ROOMS);
dec54();
unlockMouse();
playSound("z#47.wav", 100, 0, 0);
@@ -169,25 +169,25 @@ bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
case 19:
inc54();
lockMouse();
- setPetArea(PET_CONVERSATION);
+ petSetArea(PET_CONVERSATION);
playClip("ReprogramPETInHand", 4);
_npcFlags |= NPCFLAG_10000;
_classNum = msg->_param1;
switch (_classNum) {
case 1:
- petDisplayMsg("You have been upgraded to 1st Class status. Enjoy hugely.");
+ petDisplayMessage("You have been upgraded to 1st Class status. Enjoy hugely.");
setPassengerClass(_classNum);
- reassignRoom(_classNum);
+ petReassignRoom(_classNum);
break;
case 2:
- petDisplayMsg("You have been upgraded to 2nd Class status. Enjoy.");
+ petDisplayMessage("You have been upgraded to 2nd Class status. Enjoy.");
setPassengerClass(_classNum);
- reassignRoom(_classNum);
+ petReassignRoom(_classNum);
break;
case 3:
setPassengerClass(3);
- reassignRoom(_classNum);
+ petReassignRoom(_classNum);
break;
default:
break;
diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index 32c6412fef..00b68c2913 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -197,10 +197,6 @@ void CTrueTalkNPC::processInput(CTextInputMsg *msg, CViewItem *view) {
talkManager->processInput(this, msg, view);
}
-void CTrueTalkNPC::performAction(int actionNum, CViewItem *view) {
- // TODO
-}
-
int CTrueTalkNPC::startAnimTimer(const CString &action, uint firstDuration, uint duration) {
CTimeEventInfo *timer = new CTimeEventInfo(g_vm->_events->getTicksCount(),
duration > 0, firstDuration, duration, this, 0, action);
@@ -209,4 +205,10 @@ int CTrueTalkNPC::startAnimTimer(const CString &action, uint firstDuration, uint
return timer->_id;
}
+void CTrueTalkNPC::setView(CViewItem *view) {
+ CTrueTalkManager *talkManager = getGameManager()->getTalkManager();
+ if (talkManager)
+ talkManager->start3(this, view);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/npcs/true_talk_npc.h b/engines/titanic/npcs/true_talk_npc.h
index a1303c3e5d..1a10a0aa9b 100644
--- a/engines/titanic/npcs/true_talk_npc.h
+++ b/engines/titanic/npcs/true_talk_npc.h
@@ -64,11 +64,6 @@ protected:
void processInput(CTextInputMsg *msg, CViewItem *view);
/**
- * Perform an action
- */
- void performAction(int actionNum, CViewItem *view = nullptr);
-
- /**
* Start an animation timer
*/
int startAnimTimer(const CString &action, uint firstDuration, uint duration);
@@ -85,6 +80,11 @@ public:
* Load the data for the class from file
*/
virtual void load(SimpleFile *file);
+
+ /**
+ * Set the view for the NPC
+ */
+ void setView(CViewItem *view);
};
} // End of namespace Titanic