aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/control.cpp18
-rw-r--r--engines/zvision/control.h4
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.
*