aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-22 14:57:30 -0500
committerPaul Gilbert2017-01-22 14:57:30 -0500
commitfac26795b66eaeb5fd3c3adf946e8c6c216a85ff (patch)
tree97f10d6457eb6bedbee6e1a391e89225d6a9b38e
parent5e61ea80c9f55e3d3cd5cf1d178037eacc35cef2 (diff)
downloadscummvm-rg350-fac26795b66eaeb5fd3c3adf946e8c6c216a85ff.tar.gz
scummvm-rg350-fac26795b66eaeb5fd3c3adf946e8c6c216a85ff.tar.bz2
scummvm-rg350-fac26795b66eaeb5fd3c3adf946e8c6c216a85ff.zip
TITANIC: Added a SuccUBusAction enum
-rw-r--r--engines/titanic/npcs/bilge_succubus.cpp18
-rw-r--r--engines/titanic/npcs/succubus.cpp18
-rw-r--r--engines/titanic/npcs/succubus.h5
3 files changed, 22 insertions, 19 deletions
diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp
index d5436ebc55..8995d4b075 100644
--- a/engines/titanic/npcs/bilge_succubus.cpp
+++ b/engines/titanic/npcs/bilge_succubus.cpp
@@ -127,12 +127,12 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
_isChicken = mailObject->getName() == "Chicken";
_isFeathers = mailObject->getName() == "Feathers";
- _field158 = 0;
+ _sendAction = SA_SENT;
if (_v2) {
if (_isFeathers) {
startTalking(this, 230022);
- _field158 = 1;
+ _sendAction = SA_FEATHERS;
if (_sendStartFrame >= 0)
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
@@ -145,7 +145,7 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
}
} else {
startTalking(this, 230012);
- _field158 = 2;
+ _sendAction = SA_EATEN;
if (_sendStartFrame >= 0)
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
if (_receiveStartFrame >= 0)
@@ -156,7 +156,7 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
} else {
if (_isFeathers) {
startTalking(this, 230022);
- _field158 = 3;
+ _sendAction = SA_BILGE_FEATHERS;
if (_sendStartFrame >= 0)
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
@@ -168,7 +168,7 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
sendMail(petRoomFlags, roomFlags);
startTalking(this, 230012);
if (_sendStartFrame >= 0) {
- _field158 = 4;
+ _sendAction = SA_BILGE_SENT;
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
}
}
@@ -207,7 +207,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
}
} else if (msg->_endFrame == _sendEndFrame) {
- switch (_field158) {
+ switch (_sendAction) {
case 1:
stopSound(_soundHandle);
_soundHandle = playSound("z#3.wav");
@@ -269,10 +269,10 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
CBodyInBilgeRoomMsg bodyMsg;
bodyMsg.execute("Service Elevator Entity");
decTransitions();
- _field158 = 0;
+ _sendAction = SA_SENT;
} else {
- _field158 = 0;
+ _sendAction = SA_SENT;
}
}
@@ -346,7 +346,7 @@ bool CBilgeSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) {
}
if (_sendStartFrame >= 0) {
- _field158 = 5;
+ _sendAction = SA_BILGE_EATEN;
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
}
diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp
index de3c3793e1..d9383ce0e7 100644
--- a/engines/titanic/npcs/succubus.cpp
+++ b/engines/titanic/npcs/succubus.cpp
@@ -73,7 +73,7 @@ CSuccUBus::CSuccUBus() : CTrueTalkNPC() {
_afterReceiveEndFrame = 0;
_trayOutStartFrame = 224;
_trayOutEndFrame = 248;
- _field158 = 0;
+ _sendAction = SA_SENT;
_field15C = 0;
_string2 = "NULL";
_startFrame1 = 28;
@@ -125,7 +125,7 @@ void CSuccUBus::save(SimpleFile *file, int indent) {
file->writeNumberLine(_afterReceiveEndFrame, indent);
file->writeNumberLine(_trayOutStartFrame, indent);
file->writeNumberLine(_trayOutEndFrame, indent);
- file->writeNumberLine(_field158, indent);
+ file->writeNumberLine(_sendAction, indent);
file->writeNumberLine(_field15C, indent);
file->writeQuotedLine(_string2, indent);
@@ -189,7 +189,7 @@ void CSuccUBus::load(SimpleFile *file) {
_afterReceiveEndFrame = file->readNumber();
_trayOutStartFrame = file->readNumber();
_trayOutEndFrame = file->readNumber();
- _field158 = file->readNumber();
+ _sendAction = (SuccUBusAction)file->readNumber();
_field15C = file->readNumber();
_string2 = file->readString();
@@ -307,7 +307,7 @@ bool CSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) {
if (_sendStartFrame >= 0) {
playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
- _field158 = 2;
+ _sendAction = SA_EATEN;
}
// WORKAROUND: The original had code below to return the chicken
@@ -417,7 +417,7 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
_isFeathers = mailObject->getName() == "Feathers";
_isChicken = mailObject->getName() == "Chicken";
- _field158 = 0;
+ _sendAction = SA_SENT;
_field188 = 0;
_inProgress = true;
incTransitions();
@@ -433,7 +433,7 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
startTalking(this, 230022, findView());
}
- _field158 = 1;
+ _sendAction = SA_FEATHERS;
if (_sendStartFrame >= 0)
playMovie(_sendStartFrame, _sendEndFrame, 0);
@@ -509,7 +509,7 @@ bool CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
startTalking(this, 230004, findView());
if (_receiveStartFrame >= 0) {
- _field158 = 1;
+ _sendAction = SA_FEATHERS;
_inProgress = true;
incTransitions();
playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT);
@@ -599,9 +599,9 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
}
if (msg->_endFrame == _sendEndFrame) {
- if (_field158 == 1) {
+ if (_sendAction == SA_FEATHERS) {
startTalking(this, 230022, findView());
- } else if (_field158 == 2) {
+ } else if (_sendAction == SA_EATEN) {
startTalking(this, 230017, findView());
} else if (_sendLost) {
startTalking(this, 230019, findView());
diff --git a/engines/titanic/npcs/succubus.h b/engines/titanic/npcs/succubus.h
index 7c0edf711a..1627af63f3 100644
--- a/engines/titanic/npcs/succubus.h
+++ b/engines/titanic/npcs/succubus.h
@@ -28,6 +28,9 @@
namespace Titanic {
+enum SuccUBusAction { SA_SENT = 0, SA_FEATHERS = 1, SA_EATEN = 2,
+ SA_BILGE_FEATHERS = 3, SA_BILGE_SENT = 4, SA_BILGE_EATEN = 5 };
+
class CSuccUBus : public CTrueTalkNPC {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
@@ -72,7 +75,7 @@ protected:
int _afterReceiveEndFrame;
int _trayOutStartFrame;
int _trayOutEndFrame;
- int _field158;
+ SuccUBusAction _sendAction;
bool _field15C;
CString _string2;
int _startFrame1;