From 93bc3570ea33e3f5d21d5b14fe081800f9c7e700 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 26 Aug 2013 14:04:21 -0500 Subject: ZVISION: Create the default implementation for Control::enable()/disable() --- engines/zvision/control.cpp | 18 ++++++++++++++++++ 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. * -- cgit v1.2.3