aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorMarisa-Chan2013-10-29 18:33:37 +0000
committerMarisa-Chan2013-10-29 18:33:37 +0000
commit66c9d1d0fd8c9df57bcf986dd124c879eae2f35d (patch)
treea3f68c40f8719a9621c421f897acd98f6be5c53f /engines/zvision
parent6ace820da623b8579972ae58c50ec782dfcf2589 (diff)
downloadscummvm-rg350-66c9d1d0fd8c9df57bcf986dd124c879eae2f35d.tar.gz
scummvm-rg350-66c9d1d0fd8c9df57bcf986dd124c879eae2f35d.tar.bz2
scummvm-rg350-66c9d1d0fd8c9df57bcf986dd124c879eae2f35d.zip
ZVISION: Add engine pointer to actionResult for manipulations with
engine.
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/actions.cpp112
-rw-r--r--engines/zvision/actions.h101
-rw-r--r--engines/zvision/scr_file_handling.cpp32
-rw-r--r--engines/zvision/script_manager.cpp2
4 files changed, 133 insertions, 114 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp
index 3c0adb4082..68c279754d 100644
--- a/engines/zvision/actions.cpp
+++ b/engines/zvision/actions.cpp
@@ -43,12 +43,13 @@ namespace ZVision {
// ActionAdd
//////////////////////////////////////////////////////////////////////////////
-ActionAdd::ActionAdd(const Common::String &line) {
+ActionAdd::ActionAdd(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%u,%u)", &_key, &_value);
}
-bool ActionAdd::execute(ZVision *engine) {
- engine->getScriptManager()->addToStateValue(_key, _value);
+bool ActionAdd::execute() {
+ _engine->getScriptManager()->addToStateValue(_key, _value);
return true;
}
@@ -57,12 +58,13 @@ bool ActionAdd::execute(ZVision *engine) {
// ActionAssign
//////////////////////////////////////////////////////////////////////////////
-ActionAssign::ActionAssign(const Common::String &line) {
+ActionAssign::ActionAssign(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%u, %u)", &_key, &_value);
}
-bool ActionAssign::execute(ZVision *engine) {
- engine->getScriptManager()->setStateValue(_key, _value);
+bool ActionAssign::execute() {
+ _engine->getScriptManager()->setStateValue(_key, _value);
return true;
}
@@ -71,11 +73,12 @@ bool ActionAssign::execute(ZVision *engine) {
// ActionAttenuate
//////////////////////////////////////////////////////////////////////////////
-ActionAttenuate::ActionAttenuate(const Common::String &line) {
+ActionAttenuate::ActionAttenuate(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%u, %d)", &_key, &_attenuation);
}
-bool ActionAttenuate::execute(ZVision *engine) {
+bool ActionAttenuate::execute() {
// TODO: Implement
return true;
}
@@ -85,13 +88,14 @@ bool ActionAttenuate::execute(ZVision *engine) {
// ActionChangeLocation
//////////////////////////////////////////////////////////////////////////////
-ActionChangeLocation::ActionChangeLocation(const Common::String &line) {
+ActionChangeLocation::ActionChangeLocation(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%c, %c, %c%c, %u)", &_world, &_room, &_node, &_view, &_offset);
}
-bool ActionChangeLocation::execute(ZVision *engine) {
+bool ActionChangeLocation::execute() {
// We can't directly call ScriptManager::ChangeLocationIntern() because doing so clears all the Puzzles, and thus would corrupt the current puzzle checking
- engine->getScriptManager()->changeLocation(_world, _room, _node, _view, _offset);
+ _engine->getScriptManager()->changeLocation(_world, _room, _node, _view, _offset);
// Tell the puzzle system to stop checking any more puzzles
return false;
}
@@ -101,13 +105,14 @@ bool ActionChangeLocation::execute(ZVision *engine) {
// ActionCrossfade
//////////////////////////////////////////////////////////////////////////////
-ActionCrossfade::ActionCrossfade(const Common::String &line) {
+ActionCrossfade::ActionCrossfade(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(),
"%*[^(](%u %u %u %u %u %u %u)",
&_keyOne, &_keyTwo, &_oneStartVolume, &_twoStartVolume, &_oneEndVolume, &_twoEndVolume, &_timeInMillis);
}
-bool ActionCrossfade::execute(ZVision *engine) {
+bool ActionCrossfade::execute() {
// TODO: Implement
return true;
}
@@ -117,11 +122,12 @@ bool ActionCrossfade::execute(ZVision *engine) {
// ActionDisableControl
//////////////////////////////////////////////////////////////////////////////
-ActionDisableControl::ActionDisableControl(const Common::String &line) {
+ActionDisableControl::ActionDisableControl(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%u)", &_key);
}
-bool ActionDisableControl::execute(ZVision *engine) {
+bool ActionDisableControl::execute() {
debug("Disabling control %u", _key);
@@ -133,11 +139,12 @@ bool ActionDisableControl::execute(ZVision *engine) {
// ActionEnableControl
//////////////////////////////////////////////////////////////////////////////
-ActionEnableControl::ActionEnableControl(const Common::String &line) {
+ActionEnableControl::ActionEnableControl(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^(](%u)", &_key);
}
-bool ActionEnableControl::execute(ZVision *engine) {
+bool ActionEnableControl::execute() {
debug("Enabling control %u", _key);
@@ -149,7 +156,9 @@ bool ActionEnableControl::execute(ZVision *engine) {
// ActionMusic
//////////////////////////////////////////////////////////////////////////////
-ActionMusic::ActionMusic(const Common::String &line) : _volume(255) {
+ActionMusic::ActionMusic(ZVision *engine, const Common::String &line) :
+ ResultAction(engine),
+ _volume(255) {
uint type;
char fileNameBuffer[25];
uint loop;
@@ -176,7 +185,7 @@ ActionMusic::ActionMusic(const Common::String &line) : _volume(255) {
}
}
-bool ActionMusic::execute(ZVision *engine) {
+bool ActionMusic::execute() {
Audio::RewindableAudioStream *audioStream;
if (_fileName.contains(".wav")) {
@@ -185,14 +194,14 @@ bool ActionMusic::execute(ZVision *engine) {
audioStream = Audio::makeWAVStream(file, DisposeAfterUse::YES);
}
} else {
- audioStream = makeRawZorkStream(_fileName, engine);
+ audioStream = makeRawZorkStream(_fileName, _engine);
}
if (_loop) {
Audio::LoopingAudioStream *loopingAudioStream = new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::YES);
- engine->_mixer->playStream(_soundType, 0, loopingAudioStream, -1, _volume);
+ _engine->_mixer->playStream(_soundType, 0, loopingAudioStream, -1, _volume);
} else {
- engine->_mixer->playStream(_soundType, 0, audioStream, -1, _volume);
+ _engine->_mixer->playStream(_soundType, 0, audioStream, -1, _volume);
}
return true;
@@ -203,7 +212,8 @@ bool ActionMusic::execute(ZVision *engine) {
// ActionPreloadAnimation
//////////////////////////////////////////////////////////////////////////////
-ActionPreloadAnimation::ActionPreloadAnimation(const Common::String &line) {
+ActionPreloadAnimation::ActionPreloadAnimation(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
char fileName[25];
// The two %*u are always 0 and dont seem to have a use
@@ -212,7 +222,7 @@ ActionPreloadAnimation::ActionPreloadAnimation(const Common::String &line) {
_fileName = Common::String(fileName);
}
-bool ActionPreloadAnimation::execute(ZVision *engine) {
+bool ActionPreloadAnimation::execute() {
// TODO: We ignore the mask and framerate atm. Mask refers to a key color used for binary alpha. We assume the framerate is the default framerate embedded in the videos
// TODO: Check if the Control already exists
@@ -226,7 +236,8 @@ bool ActionPreloadAnimation::execute(ZVision *engine) {
// ActionPlayAnimation
//////////////////////////////////////////////////////////////////////////////
-ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) {
+ActionPlayAnimation::ActionPlayAnimation(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
char fileName[25];
// The two %*u are always 0 and dont seem to have a use
@@ -237,7 +248,7 @@ ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) {
_fileName = Common::String(fileName);
}
-bool ActionPlayAnimation::execute(ZVision *engine) {
+bool ActionPlayAnimation::execute() {
// TODO: Implement
return true;
}
@@ -247,15 +258,16 @@ bool ActionPlayAnimation::execute(ZVision *engine) {
// ActionPlayPreloadAnimation
//////////////////////////////////////////////////////////////////////////////
-ActionPlayPreloadAnimation::ActionPlayPreloadAnimation(const Common::String &line) {
+ActionPlayPreloadAnimation::ActionPlayPreloadAnimation(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(),
"%*[^:]:%*[^:]:%u(%u %u %u %u %u %u %u %u)",
&_animationKey, &_controlKey, &_x1, &_y1, &_x2, &_y2, &_startFrame, &_endFrame, &_loopCount);
}
-bool ActionPlayPreloadAnimation::execute(ZVision *engine) {
+bool ActionPlayPreloadAnimation::execute() {
// Find the control
- AnimationControl *control = (AnimationControl *)engine->getScriptManager()->getControl(_controlKey);
+ AnimationControl *control = (AnimationControl *)_engine->getScriptManager()->getControl(_controlKey);
// Set the needed values within the control
control->setAnimationKey(_animationKey);
@@ -271,8 +283,8 @@ bool ActionPlayPreloadAnimation::execute(ZVision *engine) {
// ActionQuit
//////////////////////////////////////////////////////////////////////////////
-bool ActionQuit::execute(ZVision *engine) {
- engine->quitGame();
+bool ActionQuit::execute() {
+ _engine->quitGame();
return true;
}
@@ -282,13 +294,14 @@ bool ActionQuit::execute(ZVision *engine) {
// ActionRandom
//////////////////////////////////////////////////////////////////////////////
-ActionRandom::ActionRandom(const Common::String &line) {
+ActionRandom::ActionRandom(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^:]:%*[^:]:%u, %u)", &_key, &_max);
}
-bool ActionRandom::execute(ZVision *engine) {
- uint randNumber = engine->getRandomSource()->getRandomNumber(_max);
- engine->getScriptManager()->setStateValue(_key, randNumber);
+bool ActionRandom::execute() {
+ uint randNumber = _engine->getRandomSource()->getRandomNumber(_max);
+ _engine->getScriptManager()->setStateValue(_key, randNumber);
return true;
}
@@ -297,7 +310,8 @@ bool ActionRandom::execute(ZVision *engine) {
// ActionSetPartialScreen
//////////////////////////////////////////////////////////////////////////////
-ActionSetPartialScreen::ActionSetPartialScreen(const Common::String &line) {
+ActionSetPartialScreen::ActionSetPartialScreen(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
char fileName[25];
uint color;
@@ -311,9 +325,8 @@ ActionSetPartialScreen::ActionSetPartialScreen(const Common::String &line) {
_backgroundColor = color;
}
-bool ActionSetPartialScreen::execute(ZVision *engine) {
- RenderManager *renderManager = engine->getRenderManager();
-
+bool ActionSetPartialScreen::execute() {
+ RenderManager *renderManager = _engine->getRenderManager();
if (_backgroundColor >= 0)
renderManager->renderImageToBackground(_fileName, _x, _y, _backgroundColor);
else
@@ -327,15 +340,16 @@ bool ActionSetPartialScreen::execute(ZVision *engine) {
// ActionSetScreen
//////////////////////////////////////////////////////////////////////////////
-ActionSetScreen::ActionSetScreen(const Common::String &line) {
+ActionSetScreen::ActionSetScreen(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
char fileName[25];
sscanf(line.c_str(), "%*[^(](%25[^)])", fileName);
_fileName = Common::String(fileName);
}
-bool ActionSetScreen::execute(ZVision *engine) {
- engine->getRenderManager()->setBackgroundImage(_fileName);
+bool ActionSetScreen::execute() {
+ _engine->getRenderManager()->setBackgroundImage(_fileName);
return true;
}
@@ -345,7 +359,8 @@ bool ActionSetScreen::execute(ZVision *engine) {
// ActionStreamVideo
//////////////////////////////////////////////////////////////////////////////
-ActionStreamVideo::ActionStreamVideo(const Common::String &line) {
+ActionStreamVideo::ActionStreamVideo(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
char fileName[25];
uint skipline; //skipline - render video with skip every second line, not skippable.
@@ -355,7 +370,7 @@ ActionStreamVideo::ActionStreamVideo(const Common::String &line) {
_skippable = true;
}
-bool ActionStreamVideo::execute(ZVision *engine) {
+bool ActionStreamVideo::execute() {
ZorkAVIDecoder decoder;
if (!decoder.loadFile(_fileName)) {
return true;
@@ -366,7 +381,7 @@ bool ActionStreamVideo::execute(ZVision *engine) {
destRect = Common::Rect(_x1, _y1, _x2, _y2);
}
- engine->playVideo(decoder, destRect, _skippable);
+ _engine->playVideo(decoder, destRect, _skippable);
return true;
}
@@ -375,12 +390,13 @@ bool ActionStreamVideo::execute(ZVision *engine) {
// ActionTimer
//////////////////////////////////////////////////////////////////////////////
-ActionTimer::ActionTimer(const Common::String &line) {
+ActionTimer::ActionTimer(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
sscanf(line.c_str(), "%*[^:]:%*[^:]:%u(%u)", &_key, &_time);
}
-bool ActionTimer::execute(ZVision *engine) {
- engine->getScriptManager()->addSideFX(new TimerNode(engine, _key, _time));
+bool ActionTimer::execute() {
+ _engine->getScriptManager()->addSideFX(new TimerNode(_engine, _key, _time));
return true;
}
diff --git a/engines/zvision/actions.h b/engines/zvision/actions.h
index 15923d66d1..f779c1fa2f 100644
--- a/engines/zvision/actions.h
+++ b/engines/zvision/actions.h
@@ -39,6 +39,7 @@ class ZVision;
*/
class ResultAction {
public:
+ ResultAction(ZVision *engine) : _engine(engine) {}
virtual ~ResultAction() {}
/**
* This is called by the script system whenever a Puzzle's criteria are found to be true.
@@ -48,7 +49,9 @@ public:
* @param engine A pointer to the base engine so the ResultAction can access all the necessary methods
* @return Should the script system continue to test any remaining puzzles (true) or immediately break and go on to the next frame (false)
*/
- virtual bool execute(ZVision *engine) = 0;
+ virtual bool execute() = 0;
+protected:
+ ZVision *_engine;
};
@@ -85,8 +88,8 @@ public:
class ActionAdd : public ResultAction {
public:
- ActionAdd(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionAdd(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -95,8 +98,8 @@ private:
class ActionAssign : public ResultAction {
public:
- ActionAssign(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionAssign(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -105,8 +108,8 @@ private:
class ActionAttenuate : public ResultAction {
public:
- ActionAttenuate(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionAttenuate(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -115,8 +118,8 @@ private:
class ActionChangeLocation : public ResultAction {
public:
- ActionChangeLocation(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionChangeLocation(ZVision *engine, const Common::String &line);
+ bool execute();
private:
char _world;
@@ -128,8 +131,8 @@ private:
class ActionCrossfade : public ResultAction {
public:
- ActionCrossfade(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionCrossfade(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _keyOne;
@@ -143,16 +146,16 @@ private:
class ActionDebug : public ResultAction {
public:
- ActionDebug(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDebug(ZVision *engine, const Common::String &line);
+ bool execute();
private:
};
class ActionDelayRender : public ResultAction {
public:
- ActionDelayRender(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDelayRender(ZVision *engine, const Common::String &line);
+ bool execute();
private:
// TODO: Check if this should actually be frames or if it should be milliseconds/seconds
@@ -161,8 +164,8 @@ private:
class ActionDisableControl : public ResultAction {
public:
- ActionDisableControl(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDisableControl(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -170,38 +173,38 @@ private:
class ActionDisableVenus : public ResultAction {
public:
- ActionDisableVenus(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDisableVenus(ZVision *engine, const Common::String &line);
+ bool execute();
private:
};
class ActionDisplayMessage : public ResultAction {
public:
- ActionDisplayMessage(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDisplayMessage(ZVision *engine, const Common::String &line);
+ bool execute();
private:
};
class ActionDissolve : public ResultAction {
public:
- ActionDissolve();
- bool execute(ZVision *engine);
+ ActionDissolve(ZVision *engine);
+ bool execute();
};
class ActionDistort : public ResultAction {
public:
- ActionDistort(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionDistort(ZVision *engine, const Common::String &line);
+ bool execute();
private:
};
class ActionEnableControl : public ResultAction {
public:
- ActionEnableControl(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionEnableControl(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -209,8 +212,8 @@ private:
class ActionMusic : public ResultAction {
public:
- ActionMusic(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionMusic(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -222,8 +225,8 @@ private:
class ActionPlayAnimation : public ResultAction {
public:
- ActionPlayAnimation(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionPlayAnimation(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -241,8 +244,8 @@ private:
class ActionPlayPreloadAnimation : public ResultAction {
public:
- ActionPlayPreloadAnimation(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionPlayPreloadAnimation(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _animationKey;
@@ -258,8 +261,8 @@ private:
class ActionPreloadAnimation : public ResultAction {
public:
- ActionPreloadAnimation(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionPreloadAnimation(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -270,21 +273,21 @@ private:
class ActionQuit : public ResultAction {
public:
- ActionQuit() {}
- bool execute(ZVision *engine);
+ ActionQuit(ZVision *engine) : ResultAction(engine) {}
+ bool execute();
};
// TODO: See if this exists in ZGI. It doesn't in ZNem
class ActionUnloadAnimation : public ResultAction {
public:
- ActionUnloadAnimation(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionUnloadAnimation(ZVision *engine, const Common::String &line);
+ bool execute();
};
class ActionRandom : public ResultAction {
public:
- ActionRandom(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionRandom(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
@@ -293,8 +296,8 @@ private:
class ActionSetPartialScreen : public ResultAction {
public:
- ActionSetPartialScreen(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionSetPartialScreen(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint _x;
@@ -305,8 +308,8 @@ private:
class ActionSetScreen : public ResultAction {
public:
- ActionSetScreen(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionSetScreen(ZVision *engine, const Common::String &line);
+ bool execute();
private:
Common::String _fileName;
@@ -314,8 +317,8 @@ private:
class ActionStreamVideo : public ResultAction {
public:
- ActionStreamVideo(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionStreamVideo(ZVision *engine, const Common::String &line);
+ bool execute();
private:
enum {
@@ -333,8 +336,8 @@ private:
class ActionTimer : public ResultAction {
public:
- ActionTimer(const Common::String &line);
- bool execute(ZVision *engine);
+ ActionTimer(ZVision *engine, const Common::String &line);
+ bool execute();
private:
uint32 _key;
diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp
index 4d18306ce4..5a96a569ec 100644
--- a/engines/zvision/scr_file_handling.cpp
+++ b/engines/zvision/scr_file_handling.cpp
@@ -163,19 +163,19 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
// Parse for the action type
if (line.matchString("*:add*", true)) {
- actionList.push_back(new ActionAdd(line));
+ actionList.push_back(new ActionAdd(_engine, line));
} else if (line.matchString("*:animplay*", true)) {
- actionList.push_back(new ActionPlayAnimation(line));
+ actionList.push_back(new ActionPlayAnimation(_engine, line));
} else if (line.matchString("*:animpreload*", true)) {
- actionList.push_back(new ActionPreloadAnimation(line));
+ actionList.push_back(new ActionPreloadAnimation(_engine, line));
} else if (line.matchString("*:animunload*", true)) {
- //actionList.push_back(new ActionUnloadAnimation(line));
+ //actionList.push_back(new ActionUnloadAnimation(_engine, line));
} else if (line.matchString("*:attenuate*", true)) {
// TODO: Implement ActionAttenuate
} else if (line.matchString("*:assign*", true)) {
- actionList.push_back(new ActionAssign(line));
+ actionList.push_back(new ActionAssign(_engine, line));
} else if (line.matchString("*:change_location*", true)) {
- actionList.push_back(new ActionChangeLocation(line));
+ actionList.push_back(new ActionChangeLocation(_engine, line));
} else if (line.matchString("*:crossfade*", true)) {
// TODO: Implement ActionCrossfade
} else if (line.matchString("*:debug*", true)) {
@@ -183,7 +183,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (line.matchString("*:delay_render*", true)) {
// TODO: Implement ActionDelayRender
} else if (line.matchString("*:disable_control*", true)) {
- actionList.push_back(new ActionDisableControl(line));
+ actionList.push_back(new ActionDisableControl(_engine, line));
} else if (line.matchString("*:disable_venus*", true)) {
// TODO: Implement ActionDisableVenus
} else if (line.matchString("*:display_message*", true)) {
@@ -193,7 +193,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (line.matchString("*:distort*", true)) {
// TODO: Implement ActionDistort
} else if (line.matchString("*:enable_control*", true)) {
- actionList.push_back(new ActionEnableControl(line));
+ actionList.push_back(new ActionEnableControl(_engine, line));
} else if (line.matchString("*:flush_mouse_events*", true)) {
// TODO: Implement ActionFlushMouseEvents
} else if (line.matchString("*:inventory*", true)) {
@@ -203,17 +203,17 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (line.matchString("*:menu_bar_enable*", true)) {
// TODO: Implement ActionMenuBarEnable
} else if (line.matchString("*:music*", true)) {
- actionList.push_back(new ActionMusic(line));
+ actionList.push_back(new ActionMusic(_engine, line));
} else if (line.matchString("*:pan_track*", true)) {
// TODO: Implement ActionPanTrack
} else if (line.matchString("*:playpreload*", true)) {
- actionList.push_back(new ActionPlayPreloadAnimation(line));
+ actionList.push_back(new ActionPlayPreloadAnimation(_engine, line));
} else if (line.matchString("*:preferences*", true)) {
// TODO: Implement ActionPreferences
} else if (line.matchString("*:quit*", true)) {
- actionList.push_back(new ActionQuit());
+ actionList.push_back(new ActionQuit(_engine));
} else if (line.matchString("*:random*", true)) {
- actionList.push_back(new ActionRandom(line));
+ actionList.push_back(new ActionRandom(_engine, line));
} else if (line.matchString("*:region*", true)) {
// TODO: Implement ActionRegion
} else if (line.matchString("*:restore_game*", true)) {
@@ -223,19 +223,19 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (line.matchString("*:save_game*", true)) {
// TODO: Implement ActionSaveGame
} else if (line.matchString("*:set_partial_screen*", true)) {
- actionList.push_back(new ActionSetPartialScreen(line));
+ actionList.push_back(new ActionSetPartialScreen(_engine, line));
} else if (line.matchString("*:set_screen*", true)) {
- actionList.push_back(new ActionSetScreen(line));
+ actionList.push_back(new ActionSetScreen(_engine, line));
} else if (line.matchString("*:set_venus*", true)) {
// TODO: Implement ActionSetVenus
} else if (line.matchString("*:stop*", true)) {
// TODO: Implement ActionStop
} else if (line.matchString("*:streamvideo*", true)) {
- actionList.push_back(new ActionStreamVideo(line));
+ actionList.push_back(new ActionStreamVideo(_engine, line));
} else if (line.matchString("*:syncsound*", true)) {
// TODO: Implement ActionSyncSound
} else if (line.matchString("*:timer*", true)) {
- actionList.push_back(new ActionTimer(line));
+ actionList.push_back(new ActionTimer(_engine, line));
} else if (line.matchString("*:ttytext*", true)) {
// TODO: Implement ActionTTYText
} else if (line.matchString("*:universe_music*", true)) {
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index 74035fd41f..3054466cd0 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -205,7 +205,7 @@ void ScriptManager::checkPuzzleCriteria(Puzzle *puzzle, uint counter) {
bool shouldContinue = true;
for (Common::List<ResultAction *>::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); ++resultIter) {
- shouldContinue = shouldContinue && (*resultIter)->execute(_engine);
+ shouldContinue = shouldContinue && (*resultIter)->execute();
if (!shouldContinue) {
break;
}