diff options
author | Paul Gilbert | 2017-01-22 16:32:48 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-01-22 16:32:48 -0500 |
commit | 4847fd49a9cf1c406dc29ff0c29538e467e9d84b (patch) | |
tree | 046395e68f1c051151bf80c5a2089dbe2276f627 | |
parent | fac26795b66eaeb5fd3c3adf946e8c6c216a85ff (diff) | |
download | scummvm-rg350-4847fd49a9cf1c406dc29ff0c29538e467e9d84b.tar.gz scummvm-rg350-4847fd49a9cf1c406dc29ff0c29538e467e9d84b.tar.bz2 scummvm-rg350-4847fd49a9cf1c406dc29ff0c29538e467e9d84b.zip |
TITANIC: Fixes for sending via the Bilge SuccUBus
-rw-r--r-- | engines/titanic/npcs/bilge_succubus.cpp | 16 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 2 | ||||
-rw-r--r-- | engines/titanic/room_flags.h | 5 |
3 files changed, 13 insertions, 10 deletions
diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp index 8995d4b075..f9dc5fa258 100644 --- a/engines/titanic/npcs/bilge_succubus.cpp +++ b/engines/titanic/npcs/bilge_succubus.cpp @@ -119,8 +119,8 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { _sendLost = false; _mailP = mailObject; - uint roomFlags = _roomFlags; - if (!pet->isSuccUBusDest(roomFlags) || pet->getMailDestClass(roomFlags) < getPassengerClass()) { + uint roomFlags = _destRoomFlags; + if (!pet->isSuccUBusDest(roomFlags) || getPassengerClass() > pet->getMailDestClass(roomFlags)) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); _sendLost = true; } @@ -208,15 +208,15 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { } else if (msg->_endFrame == _sendEndFrame) { switch (_sendAction) { - case 1: - stopSound(_soundHandle); - _soundHandle = playSound("z#3.wav"); + case SA_EATEN: + stopSound(_soundHandle, 1); + _soundHandle = playSound("z#3.wav", 1); break; - case 2: + case SA_BILGE_FEATHERS: stopSound(_soundHandle); _soundHandle = playSound("z#12.wav"); break; - case 3: + case SA_BILGE_SENT: if (_isChicken) { startTalking(this, 230018); _isChicken = false; @@ -224,7 +224,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { startTalking(this, 230013); } break; - case 4: + case SA_BILGE_EATEN: startTalking(this, 230017); break; default: diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index a60e386525..554157e166 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -530,7 +530,7 @@ public: * Returns whether the given room flags specify a location with a SuccUBus */ bool isSuccUBusDest(uint roomFlags) { - return CRoomFlags(roomFlags).not5(); + return CRoomFlags(roomFlags).isSuccUBusDest(); } /** diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h index 79b673b7da..3ce86bbddd 100644 --- a/engines/titanic/room_flags.h +++ b/engines/titanic/room_flags.h @@ -223,7 +223,10 @@ public: */ static PassengerClass whatPassengerClass(int floorNum); - bool not5() const { return getConditionally() != 5; } + /** + * Returns true if it's a location with a SuccUBus terminal + */ + bool isSuccUBusDest() const { return getConditionally() != 5; } /** * Returns true if the player is in their 1st class stateroom |