aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-29 18:21:52 -0400
committerPaul Gilbert2016-10-29 18:21:52 -0400
commitfae906b539895ebf6b03c9ccb6090b07efc38d38 (patch)
tree31ed23567167a843002560969d74d48805e93444
parent23d3d08a9128be11ca7ce134c4832453e7f89845 (diff)
downloadscummvm-rg350-fae906b539895ebf6b03c9ccb6090b07efc38d38.tar.gz
scummvm-rg350-fae906b539895ebf6b03c9ccb6090b07efc38d38.tar.bz2
scummvm-rg350-fae906b539895ebf6b03c9ccb6090b07efc38d38.zip
TITANIC: Renaming NPCFLAG enum values for idling
-rw-r--r--engines/titanic/npcs/bellbot.cpp12
-rw-r--r--engines/titanic/npcs/deskbot.cpp4
-rw-r--r--engines/titanic/npcs/doorbot.cpp19
-rw-r--r--engines/titanic/npcs/parrot.cpp4
-rw-r--r--engines/titanic/npcs/true_talk_npc.cpp12
-rw-r--r--engines/titanic/npcs/true_talk_npc.h4
6 files changed, 28 insertions, 27 deletions
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp
index 7aa32eeef3..dd217262a2 100644
--- a/engines/titanic/npcs/bellbot.cpp
+++ b/engines/titanic/npcs/bellbot.cpp
@@ -99,7 +99,7 @@ bool CBellBot::OnSummonBotMsg(COnSummonBotMsg *msg) {
bool CBellBot::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_npcFlags & NPCFLAG_10000) {
performAction(1);
- _npcFlags &= ~NPCFLAG_4;
+ _npcFlags &= ~NPCFLAG_START_IDLING;
CDismissBotMsg dismissMsg;
dismissMsg.execute(this);
}
@@ -113,7 +113,7 @@ bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) {
} else if (clipExistsByEnd("Walk On", msg->_endFrame)) {
setPosition(Point(80, 10));
loadFrame(543);
- _npcFlags |= NPCFLAG_4;
+ _npcFlags |= NPCFLAG_START_IDLING;
if (_npcFlags & NPCFLAG_40000) {
startTalking(this, 157);
_npcFlags &= ~NPCFLAG_40000;
@@ -142,8 +142,8 @@ bool CBellBot::Use(CUse *msg) {
bool CBellBot::DismissBotMsg(CDismissBotMsg *msg) {
if (_npcFlags & NPCFLAG_10000) {
playClip("Walk Off", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- if (_npcFlags & NPCFLAG_4) {
- _npcFlags &= ~NPCFLAG_4;
+ if (_npcFlags & NPCFLAG_START_IDLING) {
+ _npcFlags &= ~NPCFLAG_START_IDLING;
performAction(true);
} else {
performAction(false);
@@ -160,7 +160,7 @@ bool CBellBot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
switch (msg->_action) {
case 1:
case 28: {
- _npcFlags &= ~NPCFLAG_2;
+ _npcFlags &= ~NPCFLAG_IDLING;
CDismissBotMsg dismissMsg;
dismissMsg.execute(this);
break;
@@ -203,7 +203,7 @@ bool CBellBot::MovieFrameMsg(CMovieFrameMsg *msg) {
bool CBellBot::PutBotBackInHisBoxMsg(CPutBotBackInHisBoxMsg *msg) {
petMoveToHiddenRoom();
- _npcFlags &= ~NPCFLAG_4;
+ _npcFlags &= ~NPCFLAG_START_IDLING;
return true;
}
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index c5032f1674..d9324732bc 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -145,7 +145,7 @@ bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) {
_npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000);
endTalking(this, 1, findView());
- _npcFlags |= NPCFLAG_4;
+ _npcFlags |= NPCFLAG_START_IDLING;
flag = true;
}
@@ -300,7 +300,7 @@ bool CDeskbot::TurnOff(CTurnOff *msg) {
stopMovie();
performAction(1, findView());
- _npcFlags = (_npcFlags & ~(NPCFLAG_SPEAKING | NPCFLAG_2 | NPCFLAG_4)) | NPCFLAG_40000;
+ _npcFlags = (_npcFlags & ~(NPCFLAG_SPEAKING | NPCFLAG_IDLING | NPCFLAG_START_IDLING)) | NPCFLAG_40000;
playClip("Closing", 0x14);
}
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 54d76047b3..567f7a5af8 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -82,7 +82,8 @@ void CDoorbot::load(SimpleFile *file) {
}
bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
- debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d", _npcFlags, _introMovieNum);
+ debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d, start=%d, end=%d",
+ _npcFlags, _introMovieNum, msg->_startFrame, msg->_endFrame);
if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
switch (_introMovieNum) {
@@ -121,7 +122,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
CTrueTalkNPC::MovieEndMsg(msg);
} else if (_npcFlags & NPCFLAG_100000) {
if (clipExistsByEnd("Cloak Off", msg->_endFrame)) {
- _npcFlags = (_npcFlags & ~NPCFLAG_8) | NPCFLAG_4;
+ _npcFlags = (_npcFlags & ~NPCFLAG_8) | NPCFLAG_START_IDLING;
endTalking(this, false);
startTalking(this, 221474);
_npcFlags |= NPCFLAG_DOORBOT_INTRO;
@@ -139,7 +140,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
setPosition(Point((600 - _bounds.width()) / 2 + 18, 42));
loadFrame(0);
endTalking(this, true);
- _npcFlags |= NPCFLAG_4;
+ _npcFlags |= NPCFLAG_START_IDLING;
petSetArea(PET_CONVERSATION);
} else if (clipExistsByEnd("Whizz Off Left", msg->_endFrame)
|| clipExistsByEnd("Whizz Off Right", msg->_endFrame)) {
@@ -198,12 +199,12 @@ bool CDoorbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
break;
case 4:
- _npcFlags = (_npcFlags & ~NPCFLAG_2) | NPCFLAG_4000000;
+ _npcFlags = (_npcFlags & ~NPCFLAG_IDLING) | NPCFLAG_4000000;
playClip("Whizz Off Left", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
break;
case 28: {
- _npcFlags &= ~(NPCFLAG_2 | NPCFLAG_4);
+ _npcFlags &= ~(NPCFLAG_IDLING | NPCFLAG_START_IDLING);
CDismissBotMsg dismissMsg;
dismissMsg.execute(this);
break;
@@ -245,7 +246,7 @@ bool CDoorbot::DoorbotNeededInElevatorMsg(CDoorbotNeededInElevatorMsg *msg) {
bool CDoorbot::LeaveViewMsg(CLeaveViewMsg *msg) {
if (!(_npcFlags & NPCFLAG_DOORBOT_INTRO) && (_npcFlags & NPCFLAG_400000)) {
performAction(true);
- _npcFlags &= ~NPCFLAG_4;
+ _npcFlags &= ~NPCFLAG_START_IDLING;
}
return true;
@@ -367,7 +368,7 @@ bool CDoorbot::NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg) {
bool CDoorbot::PutBotBackInHisBoxMsg(CPutBotBackInHisBoxMsg *msg) {
petMoveToHiddenRoom();
- _npcFlags &= ~(NPCFLAG_4 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_DOORBOT_INTRO);
+ _npcFlags &= ~(NPCFLAG_START_IDLING | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_DOORBOT_INTRO);
if (msg->_value)
performAction(true);
@@ -380,8 +381,8 @@ bool CDoorbot::DismissBotMsg(CDismissBotMsg *msg) {
MOVIE_STOP_PREVIOUS | MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
movieEvent();
- if (_npcFlags & NPCFLAG_4) {
- _npcFlags &= ~NPCFLAG_4;
+ if (_npcFlags & NPCFLAG_START_IDLING) {
+ _npcFlags &= ~NPCFLAG_START_IDLING;
performAction(true);
} else {
performAction(false);
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index 7db0fbd0aa..678cf76932 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -362,7 +362,7 @@ bool CParrot::EnterViewMsg(CEnterViewMsg *msg) {
petSetArea(PET_CONVERSATION);
_field12C = 0;
- _npcFlags |= NPCFLAG_4;
+ _npcFlags |= NPCFLAG_START_IDLING;
}
return true;
@@ -404,7 +404,7 @@ bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
bool CParrot::LeaveViewMsg(CLeaveViewMsg *msg) {
performAction(true);
- _npcFlags &= ~NPCFLAG_4;
+ _npcFlags &= ~NPCFLAG_START_IDLING;
return true;
}
diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index 15a70b1749..8d08600c9b 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -111,8 +111,8 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
_speechDuration = msg->_speechDuration;
_startTicks = getTicksCount();
- if (!hasActiveMovie() || (_npcFlags & NPCFLAG_2)) {
- _npcFlags &= ~NPCFLAG_2;
+ if (!hasActiveMovie() || (_npcFlags & NPCFLAG_IDLING)) {
+ _npcFlags &= ~NPCFLAG_IDLING;
stopMovie();
CNPCPlayTalkingAnimationMsg msg1(_speechDuration, 0, nullptr);
@@ -145,8 +145,8 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *m
}
bool CTrueTalkNPC::MovieEndMsg(CMovieEndMsg *msg) {
- if (_npcFlags & NPCFLAG_2) {
- _npcFlags &= ~NPCFLAG_2;
+ if (_npcFlags & NPCFLAG_IDLING) {
+ _npcFlags &= ~NPCFLAG_IDLING;
CNPCQueueIdleAnimMsg idleMsg;
idleMsg.execute(this);
return true;
@@ -175,7 +175,7 @@ bool CTrueTalkNPC::NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg) {
}
bool CTrueTalkNPC::TimerMsg(CTimerMsg *msg) {
- if (_npcFlags & NPCFLAG_4) {
+ if (_npcFlags & NPCFLAG_START_IDLING) {
if (_speechCounter > 0)
return false;
@@ -186,7 +186,7 @@ bool CTrueTalkNPC::TimerMsg(CTimerMsg *msg) {
animMsg.execute(this);
}
- _npcFlags &= ~NPCFLAG_2;
+ _npcFlags &= ~NPCFLAG_IDLING;
}
}
diff --git a/engines/titanic/npcs/true_talk_npc.h b/engines/titanic/npcs/true_talk_npc.h
index e044f10b15..d9ea037a72 100644
--- a/engines/titanic/npcs/true_talk_npc.h
+++ b/engines/titanic/npcs/true_talk_npc.h
@@ -30,8 +30,8 @@
namespace Titanic {
enum NpcFlag {
- NPCFLAG_SPEAKING = 1, NPCFLAG_2 = 2, NPCFLAG_4 = 4, NPCFLAG_8 = 8,
- NPCFLAG_10000 = 0x10000, NPCFLAG_20000 = 0x20000,
+ NPCFLAG_SPEAKING = 1, NPCFLAG_IDLING = 2, NPCFLAG_START_IDLING = 4,
+ NPCFLAG_8 = 8, NPCFLAG_10000 = 0x10000, NPCFLAG_20000 = 0x20000,
NPCFLAG_40000 = 0x40000, NPCFLAG_80000 = 0x80000,
NPCFLAG_100000 = 0x100000, NPCFLAG_200000 = 0x200000,
NPCFLAG_400000 = 0x400000, NPCFLAG_800000 = 0x800000,