diff options
Diffstat (limited to 'engines/zvision/actions.cpp')
-rw-r--r-- | engines/zvision/actions.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index 504c250597..affa8f5a9c 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -111,6 +111,40 @@ bool ActionCrossfade::execute(ZVision *engine) { ////////////////////////////////////////////////////////////////////////////// +// ActionDisableControl +////////////////////////////////////////////////////////////////////////////// + +ActionDisableControl::ActionDisableControl(const Common::String &line) { + sscanf(line.c_str(), "%*[^(](%u)", &_key); +} + +bool ActionDisableControl::execute(ZVision *engine) { + debug("Disabling control %u", _key); + + engine->getScriptManager()->disableControl(_key); + + return true; +} + + +////////////////////////////////////////////////////////////////////////////// +// ActionEnableControl +////////////////////////////////////////////////////////////////////////////// + +ActionEnableControl::ActionEnableControl(const Common::String &line) { + sscanf(line.c_str(), "%*[^(](%u)", &_key); +} + +bool ActionEnableControl::execute(ZVision *engine) { + debug("Enabling control %u", _key); + + engine->getScriptManager()->enableControl(_key); + + return true; +} + + +////////////////////////////////////////////////////////////////////////////// // ActionMusic ////////////////////////////////////////////////////////////////////////////// |