aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mutationofjb/script.cpp')
-rw-r--r--engines/mutationofjb/script.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/mutationofjb/script.cpp b/engines/mutationofjb/script.cpp
index 0deeccbb73..8985e067fd 100644
--- a/engines/mutationofjb/script.cpp
+++ b/engines/mutationofjb/script.cpp
@@ -40,6 +40,7 @@ static CommandParser** getParsers() {
new ChangeDoorCommandParser,
new ChangeObjectCommandParser,
new ChangeStaticCommandParser,
+ new ChangeSceneCommandParser,
nullptr
};
@@ -97,8 +98,12 @@ bool Script::loadFromStream(Common::SeekableReadStream &stream) {
break;
}
}
+ if (!currentParser) {
+ continue;
+ }
+
if (lastParser) {
- lastParser->transition(parseCtx, lastCmd, currentCmd);
+ lastParser->transition(parseCtx, lastCmd, currentCmd, currentParser);
}
if (currentCmd) {
@@ -109,6 +114,11 @@ bool Script::loadFromStream(Common::SeekableReadStream &stream) {
lastParser = currentParser;
}
+ _lookActionInfos = parseCtx._lookActionInfos;
+ _walkActionInfos = parseCtx._walkActionInfos;
+ _talkActionInfos = parseCtx._talkActionInfos;
+ _useActionInfos = parseCtx._useActionInfos;
+
Common::HashMap<Common::String, Command *> macros;
Common::HashMap<Common::String, Command *> labels;
@@ -126,4 +136,20 @@ Script::~Script() {
destroy();
}
+const ActionInfos &Script::getLookActionInfos() const {
+ return _lookActionInfos;
+}
+
+const ActionInfos &Script::getWalkActionInfos() const {
+ return _walkActionInfos;
+}
+
+const ActionInfos &Script::getTalkActionInfos() const {
+ return _talkActionInfos;
+}
+
+const ActionInfos &Script::getUseActionInfos() const {
+ return _useActionInfos;
+}
+
}