diff options
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.cpp | 5 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.h | 1 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 1 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.h | 1 | ||||
-rw-r--r-- | engines/sherlock/user_interface.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/user_interface.h | 3 |
6 files changed, 10 insertions, 9 deletions
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index 4f3622b8bc..bdb169e707 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -84,8 +84,6 @@ ScalpelUserInterface::ScalpelUserInterface(SherlockEngine *vm): UserInterface(vm _keyPress = '\0'; _lookHelp = 0; - _bgFound = 0; - _oldBgFound = -1; _help = _oldHelp = 0; _key = _oldKey = '\0'; _temp = _oldTemp = 0; @@ -103,9 +101,8 @@ ScalpelUserInterface::~ScalpelUserInterface() { } void ScalpelUserInterface::reset() { - _oldKey = -1; + UserInterface::reset(); _help = _oldHelp = -1; - _oldTemp = _temp = -1; } void ScalpelUserInterface::drawInterface(int bufferNum) { diff --git a/engines/sherlock/scalpel/scalpel_user_interface.h b/engines/sherlock/scalpel/scalpel_user_interface.h index 224b2f850c..7829ffca9f 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.h +++ b/engines/sherlock/scalpel/scalpel_user_interface.h @@ -49,7 +49,6 @@ class ScalpelUserInterface: public UserInterface { private: char _keyPress; int _lookHelp; - int _bgFound, _oldBgFound; int _help, _oldHelp; int _key, _oldKey; int _temp, _oldTemp; diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index f1f2c2b1c3..e918036c8f 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -35,7 +35,6 @@ TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm), _invGraphic = nullptr; _scrollSize = _scrollSpeed = 0; _drawMenu = false; - _bgFound = _oldBgFound = -1; _bgShape = nullptr; _personFound = false; _lockoutTimer = 0; diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h index 2adbb4066e..0f71803b52 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.h +++ b/engines/sherlock/tattoo/tattoo_user_interface.h @@ -131,7 +131,6 @@ public: Common::Point _currentScroll, _targetScroll; int _scrollSize, _scrollSpeed; bool _drawMenu; - int _bgFound, _oldBgFound; int _arrowZone, _oldArrowZone; Object *_bgShape; bool _personFound; diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp index 9e7d0df7c6..9e21be8928 100644 --- a/engines/sherlock/user_interface.cpp +++ b/engines/sherlock/user_interface.cpp @@ -46,6 +46,7 @@ UserInterface::UserInterface(SherlockEngine *vm) : _vm(vm) { _windowBounds = Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH - 1, SHERLOCK_SCREEN_HEIGHT - 1); _lookScriptFlag = false; + _bgFound = _oldBgFound = -1; _key = _oldKey = '\0'; _selector = _oldSelector = -1; _temp = _oldTemp = 0; @@ -53,7 +54,6 @@ UserInterface::UserInterface(SherlockEngine *vm) : _vm(vm) { _lookHelp = 0; } - void UserInterface::checkAction(ActionType &action, int objNum, FixedTextActionId fixedTextActionId) { Events &events = *_vm->_events; FixedText &fixedText = *_vm->_fixedText; @@ -188,5 +188,11 @@ void UserInterface::checkAction(ActionType &action, int objNum, FixedTextActionI events.setCursor(ARROW); } +void UserInterface::reset() { + _bgFound = _oldBgFound = -1; + _oldKey = -1; + _oldTemp = _temp = -1; +} + } // End of namespace Sherlock diff --git a/engines/sherlock/user_interface.h b/engines/sherlock/user_interface.h index 3f37f1fa83..306e0216a3 100644 --- a/engines/sherlock/user_interface.h +++ b/engines/sherlock/user_interface.h @@ -72,6 +72,7 @@ public: bool _helpStyle; Common::Rect _windowBounds; bool _lookScriptFlag; + int _bgFound, _oldBgFound; // TODO: Not so sure these should be in the base class. May want to refactor them to SherlockEngine, or refactor // various Scalpel dialogs to keep their own private state of key/selections @@ -92,7 +93,7 @@ public: /** * Resets the user interface */ - virtual void reset() {} + virtual void reset(); /** * Draw the user interface onto the screen's back buffers |