aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-10 19:19:46 -0400
committerPaul Gilbert2017-10-10 19:19:46 -0400
commit3fd2cf29b14f92015052fc85aee9299de57360e7 (patch)
treebba29105b1e1b4ff82c447c282b30a8c57608c8d /engines/titanic/game
parent1f5908c9bd7f4d19ed71fae1ed31fb2b294bf8ed (diff)
downloadscummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.tar.gz
scummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.tar.bz2
scummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.zip
TITANIC: Only allow moving to SGT TV in assigned room
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/ear_sweet_bowl.cpp2
-rw-r--r--engines/titanic/game/sgt/sgt_nav.cpp17
2 files changed, 13 insertions, 6 deletions
diff --git a/engines/titanic/game/ear_sweet_bowl.cpp b/engines/titanic/game/ear_sweet_bowl.cpp
index 387392b26d..e9190c337a 100644
--- a/engines/titanic/game/ear_sweet_bowl.cpp
+++ b/engines/titanic/game/ear_sweet_bowl.cpp
@@ -49,7 +49,7 @@ bool CEarSweetBowl::MovieEndMsg(CMovieEndMsg *msg) {
if (!doneMsg._value) {
CPetControl *pet = getPetControl();
if (pet)
- pet->hasRoomFlags();
+ pet->isInAssignedRoom();
CIsParrotPresentMsg parrotMsg;
parrotMsg.execute(findRoom());
diff --git a/engines/titanic/game/sgt/sgt_nav.cpp b/engines/titanic/game/sgt/sgt_nav.cpp
index 3be92b4828..904ce64217 100644
--- a/engines/titanic/game/sgt/sgt_nav.cpp
+++ b/engines/titanic/game/sgt/sgt_nav.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/game/sgt/sgt_nav.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -43,7 +44,9 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
CTurnOn onMsg;
CTurnOff offMsg;
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open"
+ && pet->isInAssignedRoom()) {
if (_statics->_vase == "Open")
offMsg.execute("Vase");
if (_statics->_tv == "Closed")
@@ -68,10 +71,14 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool SGTNav::MouseMoveMsg(CMouseMoveMsg *msg) {
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open")
- _cursorId = CURSOR_MOVE_FORWARD;
- else
- _cursorId = CURSOR_ARROW;
+ _cursorId = CURSOR_ARROW;
+
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (pet->isInAssignedRoom()) {
+ _cursorId = CURSOR_MOVE_FORWARD;
+ }
+ }
return true;
}