diff options
Diffstat (limited to 'engines/zvision/scripting')
7 files changed, 15 insertions, 15 deletions
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index 517278e155..219f418b13 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -123,7 +123,7 @@ ActionDisableControl::ActionDisableControl(const Common::String &line) { bool ActionDisableControl::execute(ZVision *engine) { debug("Disabling control %u", _key); - + ScriptManager *scriptManager = engine->getScriptManager(); scriptManager->setStateFlags(_key, scriptManager->getStateFlags(_key) | ScriptManager::DISABLED); @@ -194,7 +194,7 @@ bool ActionMusic::execute(ZVision *engine) { } else { audioStream = makeRawZorkStream(_fileName, engine); } - + if (_loop) { Audio::LoopingAudioStream *loopingAudioStream = new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::YES); engine->_mixer->playStream(_soundType, 0, loopingAudioStream, -1, _volume); @@ -327,7 +327,7 @@ ActionSetPartialScreen::ActionSetPartialScreen(const Common::String &line) { bool ActionSetPartialScreen::execute(ZVision *engine) { RenderManager *renderManager = engine->getRenderManager(); - + if (_backgroundColor > 0) { renderManager->clearWorkingWindowTo555Color(_backgroundColor); } diff --git a/engines/zvision/scripting/controls/animation_control.h b/engines/zvision/scripting/controls/animation_control.h index 6c4d6dfcf7..bdb07d39ea 100644 --- a/engines/zvision/scripting/controls/animation_control.h +++ b/engines/zvision/scripting/controls/animation_control.h @@ -56,7 +56,7 @@ private: private: uint32 _animationKey; - + union { RlfAnimation *rlf; Video::VideoDecoder *avi; diff --git a/engines/zvision/scripting/controls/lever_control.cpp b/engines/zvision/scripting/controls/lever_control.cpp index 9724e661b7..c029a2a7a1 100644 --- a/engines/zvision/scripting/controls/lever_control.cpp +++ b/engines/zvision/scripting/controls/lever_control.cpp @@ -84,7 +84,7 @@ LeverControl::~LeverControl() { } else if (_fileType == RLF) { delete _animation.rlf; } - + delete[] _frameInfo; } @@ -194,7 +194,7 @@ void LeverControl::onMouseDown(const Common::Point &screenSpacePos, const Common if (!_enabled) { return; } - + if (_frameInfo[_currentFrame].hotspot.contains(backgroundImageSpacePos)) { _mouseIsCaptured = true; _lastMousePos = backgroundImageSpacePos; @@ -205,7 +205,7 @@ void LeverControl::onMouseUp(const Common::Point &screenSpacePos, const Common:: if (!_enabled) { return; } - + if (_mouseIsCaptured) { _mouseIsCaptured = false; _engine->getScriptManager()->setStateValue(_key, _currentFrame); @@ -220,7 +220,7 @@ bool LeverControl::onMouseMove(const Common::Point &screenSpacePos, const Common if (!_enabled) { return false; } - + bool cursorWasChanged = false; if (_mouseIsCaptured) { @@ -276,7 +276,7 @@ bool LeverControl::process(uint32 deltaTimeInMillis) { renderFrame(_returnRoutesCurrentFrame); } } - + return false; } @@ -387,7 +387,7 @@ void LeverControl::renderFrame(uint frameNumber) { // getFrameData() will automatically optimize to getNextFrame() / getPreviousFrame() if it can frameData = (const uint16 *)_animation.rlf->getFrameData(frameNumber)->getPixels(); width = _animation.rlf->width(); // Use the animation width instead of _animationCoords.width() - height = _animation.rlf->height(); // Use the animation height instead of _animationCoords.height() + height = _animation.rlf->height(); // Use the animation height instead of _animationCoords.height() } else if (_fileType == AVI) { _animation.avi->seekToFrame(frameNumber); const Graphics::Surface *surface = _animation.avi->decodeNextFrame(); diff --git a/engines/zvision/scripting/controls/push_toggle_control.cpp b/engines/zvision/scripting/controls/push_toggle_control.cpp index 82736b7576..a96c95b377 100644 --- a/engines/zvision/scripting/controls/push_toggle_control.cpp +++ b/engines/zvision/scripting/controls/push_toggle_control.cpp @@ -76,7 +76,7 @@ void PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Com if (!_enabled) { return; } - + if (_hotspot.contains(backgroundImageSpacePos)) { _engine->getScriptManager()->setStateValue(_key, 1); } @@ -86,7 +86,7 @@ bool PushToggleControl::onMouseMove(const Common::Point &screenSpacePos, const C if (!_enabled) { return false; } - + if (_hotspot.contains(backgroundImageSpacePos)) { _engine->getCursorManager()->changeCursor(_hoverCursor); return true; diff --git a/engines/zvision/scripting/controls/timer_node.cpp b/engines/zvision/scripting/controls/timer_node.cpp index c8c8a85d34..6f88b056a1 100644 --- a/engines/zvision/scripting/controls/timer_node.cpp +++ b/engines/zvision/scripting/controls/timer_node.cpp @@ -31,7 +31,7 @@ namespace ZVision { - + TimerNode::TimerNode(ZVision *engine, uint32 key, uint timeInSeconds) : Control(engine, key) { if (_engine->getGameId() == GID_NEMESIS) { diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp index 753ce4ac6a..416bac00f3 100644 --- a/engines/zvision/scripting/scr_file_handling.cpp +++ b/engines/zvision/scripting/scr_file_handling.cpp @@ -236,7 +236,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:ttytext*", true)) { // TODO: Implement ActionTTYText } else if (line.matchString("*:universe_music*", true)) { - // TODO: Implement ActionUniverseMusic + // TODO: Implement ActionUniverseMusic } else if (line.matchString("*:copy_file*", true)) { // Not used. Purposely left empty } else { diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp index 41b835e550..da82308051 100644 --- a/engines/zvision/scripting/script_manager.cpp +++ b/engines/zvision/scripting/script_manager.cpp @@ -260,7 +260,7 @@ Control *ScriptManager::getControl(uint32 key) { void ScriptManager::focusControl(uint32 key) { for (ControlList::iterator iter = _activeControls.begin(); iter != _activeControls.end(); ++iter) { uint32 controlKey = (*iter)->getKey(); - + if (controlKey == key) { (*iter)->focus(); } else if (controlKey == _currentlyFocusedControl) { |