aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichiesams2013-08-23 23:59:28 -0500
committerrichiesams2013-08-24 00:23:32 -0500
commit2431f60c02197585bd252393a013f8e50a2ae30a (patch)
treee8ca24643b9afabb843bc2366b4a2cf6bedf896b
parentadb3bd7b711ba9daf62e06bbe55d2ca55e5219b4 (diff)
downloadscummvm-rg350-2431f60c02197585bd252393a013f8e50a2ae30a.tar.gz
scummvm-rg350-2431f60c02197585bd252393a013f8e50a2ae30a.tar.bz2
scummvm-rg350-2431f60c02197585bd252393a013f8e50a2ae30a.zip
ZVISION: Make Control purely virtual
-rw-r--r--engines/zvision/control.h9
-rw-r--r--engines/zvision/script_manager.cpp4
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/zvision/control.h b/engines/zvision/control.h
index 32a2b863b0..17408c79f1 100644
--- a/engines/zvision/control.h
+++ b/engines/zvision/control.h
@@ -37,13 +37,10 @@ class ZVision;
class Control {
public:
- Control() : _key(0), _enabled(false) {}
+ Control() : _enabled(false) {}
virtual ~Control() {}
- virtual bool enable(ZVision *engine) = 0;
- virtual bool disable(ZVision *engine) { return true; }
-
-public:
- uint32 _key;
+ virtual bool enable() = 0;
+ virtual bool disable() = 0;
protected:
bool _enabled;
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index 9a4e9d13be..d671c6178c 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -216,7 +216,7 @@ bool ScriptManager::enableControl(uint32 key) {
if (!_activeControls.contains(key)) {
return false;
} else {
- return _activeControls[key]->enable(_engine);
+ return _activeControls[key]->enable();
}
}
@@ -272,7 +272,7 @@ void ScriptManager::changeLocationIntern() {
// Enable all the controls
for (Common::HashMap<uint32, Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) {
- (*iter)._value->enable(_engine);
+ (*iter)._value->enable();
}
// Add all the local puzzles to the queue to be checked