[Scummvm-cvs-logs] scummvm master -> a96aad55592101810f71dd8813767ddbe2e76ece
dreammaster
dreammaster at scummvm.org
Thu Jun 18 02:04:07 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a96aad5559 SHERLOCK: RT: Fix crash in second intro scene
Commit: a96aad55592101810f71dd8813767ddbe2e76ece
https://github.com/scummvm/scummvm/commit/a96aad55592101810f71dd8813767ddbe2e76ece
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-17T20:03:08-04:00
Commit Message:
SHERLOCK: RT: Fix crash in second intro scene
Changed paths:
engines/sherlock/scalpel/scalpel_user_interface.cpp
engines/sherlock/scalpel/scalpel_user_interface.h
engines/sherlock/tattoo/tattoo_user_interface.cpp
engines/sherlock/tattoo/tattoo_user_interface.h
engines/sherlock/user_interface.cpp
engines/sherlock/user_interface.h
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index 4f3622b..bdb169e 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 224b2f8..7829ffc 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 f1f2c2b..e918036 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 2adbb40..0f71803 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 9e7d0df..9e21be8 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 3f37f1f..306e021 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
More information about the Scummvm-git-logs
mailing list