aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-09 19:24:07 -0400
committerPaul Gilbert2015-07-09 19:24:07 -0400
commit903875f0fea005adf9e47be59c3480714775ab9c (patch)
tree7346727dcbaf16f43e1e003686fdf5c0d4893062
parentbecac8f5708bbc1c4b395a2319fd0e147dd2355c (diff)
downloadscummvm-rg350-903875f0fea005adf9e47be59c3480714775ab9c.tar.gz
scummvm-rg350-903875f0fea005adf9e47be59c3480714775ab9c.tar.bz2
scummvm-rg350-903875f0fea005adf9e47be59c3480714775ab9c.zip
SHERLOCK: RT: Fix for leaving inside Baker Street
-rw-r--r--engines/sherlock/objects.cpp2
-rw-r--r--engines/sherlock/objects.h2
-rw-r--r--engines/sherlock/user_interface.cpp4
3 files changed, 6 insertions, 2 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index a27807627e..2d939ce6cf 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -855,6 +855,7 @@ WalkSequences &WalkSequences::operator=(const WalkSequences &src) {
ActionType::ActionType() {
_cAnimNum = _cAnimSpeed = 0;
+ _useFlag = 0;
}
void ActionType::load(Common::SeekableReadStream &s) {
@@ -874,7 +875,6 @@ void ActionType::load(Common::SeekableReadStream &s) {
/*----------------------------------------------------------------*/
UseType::UseType(): ActionType() {
- _useFlag = 0;
}
void UseType::load(Common::SeekableReadStream &s, bool isRoseTattoo) {
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index 8cfb466255..996054be43 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -156,6 +156,7 @@ struct ActionType {
int _cAnimNum;
int _cAnimSpeed;
Common::String _names[NAMES_COUNT];
+ int _useFlag; // Which flag USE will set (if any)
ActionType();
@@ -166,7 +167,6 @@ struct ActionType {
};
struct UseType: public ActionType {
- int _useFlag; // Which flag USE will set (if any)
Common::String _target;
Common::String _verb;
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index 37bde6be6c..9db29023c8 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -65,6 +65,10 @@ void UserInterface::checkAction(ActionType &action, int objNum, FixedTextActionI
Talk &talk = *_vm->_talk;
Point32 pt(-1, -1);
+ if (action._useFlag)
+ // Automatically set the given flag
+ _vm->setFlags(action._useFlag);
+
if (objNum >= 1000)
// Ignore actions done on characters
return;