From a2af8fb051f3549c83ca3740cdb1702f91ca7d0f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 2 Nov 2016 20:03:28 -0400 Subject: TITANIC: Change endTalking to setTalking --- engines/titanic/core/game_object.cpp | 2 +- engines/titanic/core/game_object.h | 9 +++++---- engines/titanic/npcs/barbot.cpp | 2 +- engines/titanic/npcs/bellbot.cpp | 2 +- engines/titanic/npcs/bilge_succubus.cpp | 2 +- engines/titanic/npcs/deskbot.cpp | 2 +- engines/titanic/npcs/doorbot.cpp | 6 +++--- engines/titanic/npcs/liftbot.cpp | 6 +++--- engines/titanic/npcs/maitre_d.cpp | 2 +- engines/titanic/npcs/parrot.cpp | 2 +- engines/titanic/npcs/succubus.cpp | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 3ca917b3a1..3738108c69 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -1660,7 +1660,7 @@ void CGameObject::startTalking(CTrueTalkNPC *npc, uint id, CViewItem *view) { } } -void CGameObject::endTalking(CTrueTalkNPC *npc, bool viewFlag, CViewItem *view) { +void CGameObject::setTalking(CTrueTalkNPC *npc, bool viewFlag, CViewItem *view) { CPetControl *pet = getPetControl(); if (pet) pet->setActiveNPC(npc); diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 706f842252..066e51960d 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -932,19 +932,20 @@ public: /*--- CTrueTalkManager Methods ---*/ /** - * Stop a conversation with the NPC + * Start a conversation with the NPC */ - void endTalking(CTrueTalkNPC *npc, bool viewFlag, CViewItem *view = nullptr); + void startTalking(CTrueTalkNPC *npc, uint id, CViewItem *view = nullptr); /** * Start a conversation with the NPC */ - void startTalking(CTrueTalkNPC *npc, uint id, CViewItem *view = nullptr); + void startTalking(const CString &name, uint id, CViewItem *view = nullptr); /** * Start a conversation with the NPC */ - void startTalking(const CString &name, uint id, CViewItem *view = nullptr); + void setTalking(CTrueTalkNPC *npc, bool viewFlag, CViewItem *view = nullptr); + /** * Sets a dial region for a given NPC diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp index 791adaa05c..87aaea611f 100644 --- a/engines/titanic/npcs/barbot.cpp +++ b/engines/titanic/npcs/barbot.cpp @@ -336,7 +336,7 @@ bool CBarbot::TurnOn(CTurnOn *msg) { _fieldC4 = 1; ++_v0; petSetArea(PET_CONVERSATION); - endTalking(this, true); + setTalking(this, true); } return true; diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 9f6f152c6d..25fa7eb3ea 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -119,7 +119,7 @@ bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) { _npcFlags &= ~NPCFLAG_40000; } - endTalking(this, true); + setTalking(this, true); petSetArea(PET_CONVERSATION); } else if (clipExistsByEnd("Walk Off", msg->_endFrame)) { CPutBotBackInHisBoxMsg boxMsg; diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp index d1b89e58b4..006f532a31 100644 --- a/engines/titanic/npcs/bilge_succubus.cpp +++ b/engines/titanic/npcs/bilge_succubus.cpp @@ -431,7 +431,7 @@ bool CBilgeSuccUBus::TurnOn(CTurnOn *msg) { CSUBTransition transMsg; transMsg.execute(this); - endTalking(this, true); + setTalking(this, true); petSetArea(PET_REMOTE); petHighlightGlyph(16); } diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp index daa2e55fa1..baf5db5fee 100644 --- a/engines/titanic/npcs/deskbot.cpp +++ b/engines/titanic/npcs/deskbot.cpp @@ -145,7 +145,7 @@ bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) { if (_npcFlags & NPCFLAG_20000) { _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000); - endTalking(this, 1, findView()); + setTalking(this, true, findView()); _npcFlags |= NPCFLAG_START_IDLING; flag = true; diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp index 06edae24a9..ebab6508c2 100644 --- a/engines/titanic/npcs/doorbot.cpp +++ b/engines/titanic/npcs/doorbot.cpp @@ -123,7 +123,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) { } else if (_npcFlags & NPCFLAG_100000) { if (clipExistsByEnd("Cloak Off", msg->_endFrame)) { _npcFlags = (_npcFlags & ~NPCFLAG_8) | NPCFLAG_START_IDLING; - endTalking(this, false); + setTalking(this, false); startTalking(this, 221474); _npcFlags |= NPCFLAG_DOORBOT_INTRO; _introMovieNum = 0; @@ -139,7 +139,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) { || clipExistsByEnd("Whizz On Right", msg->_endFrame)) { setPosition(Point((600 - _bounds.width()) / 2 + 18, 42)); loadFrame(0); - endTalking(this, true); + setTalking(this, true); _npcFlags |= NPCFLAG_START_IDLING; petSetArea(PET_CONVERSATION); } else if (clipExistsByEnd("Whizz Off Left", msg->_endFrame) @@ -237,7 +237,7 @@ bool CDoorbot::DoorbotNeededInElevatorMsg(CDoorbotNeededInElevatorMsg *msg) { } else { _npcFlags = 0; if (msg->_value) - endTalking(this, true); + setTalking(this, true); } return true; diff --git a/engines/titanic/npcs/liftbot.cpp b/engines/titanic/npcs/liftbot.cpp index ae3d1532dd..04448fc277 100644 --- a/engines/titanic/npcs/liftbot.cpp +++ b/engines/titanic/npcs/liftbot.cpp @@ -82,7 +82,7 @@ bool CLiftBot::EnterViewMsg(CEnterViewMsg *msg) { } else if (!_flag) { if (getName() != "LiftBot") { CViewItem *view = findView(); - endTalking(this, true, view); + setTalking(this, true, view); petSetArea(PET_CONVERSATION); _flag = 1; } @@ -124,7 +124,7 @@ bool CLiftBot::TurnOn(CTurnOn *msg) { _enabled = true; if (!_flag) { if (isEquals("LiftBotTalking")) { - endTalking(this, MOVIE_REPEAT, findView()); + setTalking(this, MOVIE_REPEAT, findView()); petSetArea(PET_CONVERSATION); _flag = true; } @@ -174,7 +174,7 @@ bool CLiftBot::ActMsg(CActMsg *msg) { if (msg->_action == "ActivateLift") { _enabled = true; CViewItem *view = findView(); - endTalking(this, true, view); + setTalking(this, true, view); startTalking(this, 155, view); } else if (msg->_action == "LiftArrive") { CViewItem *view = findView(); diff --git a/engines/titanic/npcs/maitre_d.cpp b/engines/titanic/npcs/maitre_d.cpp index 658b7c7123..cbb406fffa 100644 --- a/engines/titanic/npcs/maitre_d.cpp +++ b/engines/titanic/npcs/maitre_d.cpp @@ -114,7 +114,7 @@ bool CMaitreD::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) { } bool CMaitreD::EnterViewMsg(CEnterViewMsg *msg) { - endTalking(this, true, findView()); + setTalking(this, true, findView()); _field12C = _field134; if (_string3 == "STMusic" && (!_field11C || _string2 == _string3)) diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp index 9c888478dc..c3702e17d4 100644 --- a/engines/titanic/npcs/parrot.cpp +++ b/engines/titanic/npcs/parrot.cpp @@ -352,7 +352,7 @@ bool CParrot::EnterViewMsg(CEnterViewMsg *msg) { _field118 = 1; _npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000); loadFrame(0); - endTalking(this, true, findView()); + setTalking(this, true, findView()); if (_speechCounter > 0) { playRandomClip(NAMES, MOVIE_NOTIFY_OBJECT); diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index 6db8c8d798..bdde682c03 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -671,7 +671,7 @@ bool CSuccUBus::TurnOn(CTurnOn *msg) { CSUBTransition transMsg; transMsg.execute(this); - endTalking(this, true, findView()); + setTalking(this, true, findView()); petSetArea(PET_REMOTE); petHighlightGlyph(16); } -- cgit v1.2.3