aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/game.cpp
diff options
context:
space:
mode:
authorĽubomír Remák2018-03-24 01:43:33 +0100
committerEugene Sandulenko2018-08-25 23:12:01 +0200
commit7a1898730155dce824451d98bbe65b430832d575 (patch)
tree2f09454562fc770f349489d35004ed62cf6534b8 /engines/mutationofjb/game.cpp
parent938f222d4857b45e0f1f7e4726040ab0bf1d9b67 (diff)
downloadscummvm-rg350-7a1898730155dce824451d98bbe65b430832d575.tar.gz
scummvm-rg350-7a1898730155dce824451d98bbe65b430832d575.tar.bz2
scummvm-rg350-7a1898730155dce824451d98bbe65b430832d575.zip
MUTATIONOFJB: Support for running commands.
Diffstat (limited to 'engines/mutationofjb/game.cpp')
-rw-r--r--engines/mutationofjb/game.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/engines/mutationofjb/game.cpp b/engines/mutationofjb/game.cpp
index 047971b83d..6436c7ad74 100644
--- a/engines/mutationofjb/game.cpp
+++ b/engines/mutationofjb/game.cpp
@@ -27,12 +27,15 @@
#include "mutationofjb/room.h"
#include "mutationofjb/script.h"
#include "mutationofjb/util.h"
+#include "mutationofjb/commands/command.h"
#include "common/util.h"
#include "common/str.h"
+#include "common/translation.h"
namespace MutationOfJB {
-Game::Game(MutationOfJBEngine *vm) : _vm(vm) {
+Game::Game(MutationOfJBEngine *vm)
+: _vm(vm), _scriptExecCtx(*this) {
_gameData = new GameData;
loadGameData(false);
@@ -105,18 +108,9 @@ void Game::changeScene(uint8 sceneId, bool partB) {
scriptFile.close();
}
-Command *Game::getMacro(const Common::String &name) const {
- Command *cmd = nullptr;
- if (_localScript) {
- cmd = _localScript->getMacro(name);
- }
-
- if (!cmd && _globalScript) {
- cmd = _globalScript->getMacro(name);
- }
-
- return cmd;
+void Game::update() {
+ _scriptExecCtx.runActiveCommand();
}
}