diff options
author | Ľubomír Remák | 2018-03-22 19:48:57 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | e1d173ed7541f9da79f60a65d974da3ebbb29e7a (patch) | |
tree | 505833c76c52396d154a49474c5509729020e4f5 /engines/mutationofjb/commands/changecommand.cpp | |
parent | 63c0dac9613caef3778a4cb9765bb8b628e5a1c2 (diff) | |
download | scummvm-rg350-e1d173ed7541f9da79f60a65d974da3ebbb29e7a.tar.gz scummvm-rg350-e1d173ed7541f9da79f60a65d974da3ebbb29e7a.tar.bz2 scummvm-rg350-e1d173ed7541f9da79f60a65d974da3ebbb29e7a.zip |
MUTATIONOFJB: Add changescene debug command and fix macro debug commands.
Diffstat (limited to 'engines/mutationofjb/commands/changecommand.cpp')
-rw-r--r-- | engines/mutationofjb/commands/changecommand.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/mutationofjb/commands/changecommand.cpp b/engines/mutationofjb/commands/changecommand.cpp index e4699ebb74..a4316bde3b 100644 --- a/engines/mutationofjb/commands/changecommand.cpp +++ b/engines/mutationofjb/commands/changecommand.cpp @@ -21,6 +21,8 @@ */ #include "mutationofjb/commands/changecommand.h" +#include "mutationofjb/script.h" +#include "mutationofjb/gamedata.h" #include "common/translation.h" namespace MutationOfJB { @@ -295,8 +297,8 @@ const char *ChangeCommand::getOperationAsString() const { } } -Command::ExecuteResult ChangeDoorCommand::execute(GameData &gameData) { - Scene *const scene = gameData.getScene(_sceneId); +Command::ExecuteResult ChangeDoorCommand::execute(ScriptExecutionContext &scriptExecCtx) { + Scene *const scene = scriptExecCtx.getGameData().getScene(_sceneId); if (!scene) { return Finished; } @@ -352,8 +354,8 @@ Common::String ChangeDoorCommand::debugString() const { return Common::String::format("scene%d.door%d.%s %s %s", _sceneId, _entityId, getRegisterAsString(), getOperationAsString(), getValueAsString().c_str()); } -Command::ExecuteResult ChangeObjectCommand::execute(GameData &gameData) { - Scene *const scene = gameData.getScene(_sceneId); +Command::ExecuteResult ChangeObjectCommand::execute(ScriptExecutionContext &scriptExecCtx) { + Scene *const scene = scriptExecCtx.getGameData().getScene(_sceneId); if (!scene) { return Finished; } @@ -415,8 +417,8 @@ Common::String ChangeObjectCommand::debugString() const { return Common::String::format("scene%d.object%d.%s %s %s", _sceneId, _entityId, getRegisterAsString(), getOperationAsString(), getValueAsString().c_str()); } -Command::ExecuteResult ChangeStaticCommand::execute(GameData &gameData) { - Scene *const scene = gameData.getScene(_sceneId); +Command::ExecuteResult ChangeStaticCommand::execute(ScriptExecutionContext &scriptExecCtx) { + Scene *const scene = scriptExecCtx.getGameData().getScene(_sceneId); if (!scene) { return Finished; } @@ -466,8 +468,8 @@ Common::String ChangeStaticCommand::debugString() const { return Common::String::format("scene%d.static%d.%s %s %s", _sceneId, _entityId, getRegisterAsString(), getOperationAsString(), getValueAsString().c_str()); } -Command::ExecuteResult ChangeSceneCommand::execute(GameData &gameData) { - Scene *const scene = gameData.getScene(_sceneId); +Command::ExecuteResult ChangeSceneCommand::execute(ScriptExecutionContext &scriptExecCtx) { + Scene *const scene = scriptExecCtx.getGameData().getScene(_sceneId); if (!scene) { return Finished; } |