diff options
author | richiesams | 2013-08-26 14:04:21 -0500 |
---|---|---|
committer | richiesams | 2013-08-28 16:44:19 -0500 |
commit | 93bc3570ea33e3f5d21d5b14fe081800f9c7e700 (patch) | |
tree | afc308b713f487041776ff6199268c93c8b0973c /engines | |
parent | 52af1f7f1019ddb2f95d1cff034d58f3cffd224a (diff) | |
download | scummvm-rg350-93bc3570ea33e3f5d21d5b14fe081800f9c7e700.tar.gz scummvm-rg350-93bc3570ea33e3f5d21d5b14fe081800f9c7e700.tar.bz2 scummvm-rg350-93bc3570ea33e3f5d21d5b14fe081800f9c7e700.zip |
ZVISION: Create the default implementation for Control::enable()/disable()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/control.cpp | 18 | ||||
-rw-r--r-- | engines/zvision/control.h | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/engines/zvision/control.cpp b/engines/zvision/control.cpp index 1cef2a0ab8..ad0a4c5013 100644 --- a/engines/zvision/control.cpp +++ b/engines/zvision/control.cpp @@ -32,6 +32,24 @@ namespace ZVision { +void Control::enable() { + if (!_enabled) { + _enabled = true; + return; + } + + debug("Control %u is already enabled", _key); +} + +void Control::disable() { + if (_enabled) { + _enabled = false; + return; + } + + debug("Control %u is already disabled", _key); +} + void Control::parseFlatControl(ZVision *engine) { engine->getRenderManager()->getRenderTable()->setRenderState(RenderTable::FLAT); } diff --git a/engines/zvision/control.h b/engines/zvision/control.h index 8d4ea9f65d..b16ca7f73d 100644 --- a/engines/zvision/control.h +++ b/engines/zvision/control.h @@ -40,11 +40,11 @@ public: Control() : _engine(0), _key(0), _enabled(false) {} Control(ZVision *engine, uint32 key) : _engine(engine), _key(key), _enabled(false) {} virtual ~Control() {} - virtual bool enable() = 0; - virtual bool disable() = 0; uint32 getKey() { return _key; } + virtual void enable(); + virtual void disable(); /** * Called when LeftMouse is pushed. Default is NOP. * |