aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;