aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/lingo/lingo-code.cpp11
-rw-r--r--engines/director/lingo/lingo.cpp2
-rw-r--r--engines/director/lingo/lingo.h1
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index d614612812..1423534512 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -458,11 +458,18 @@ void Lingo::c_call() {
g_lingo->_currentScript = sym->u.defn;
g_lingo->execute(0);
- g_lingo->_returning = 0;
+ g_lingo->_returning = false;
}
void Lingo::c_procret() {
- warning("STUB: c_procret()");
+ CFrame *fp = g_lingo->_callstack.back();
+
+ g_lingo->_currentScript = fp->retscript;
+ g_lingo->_pc = fp->retpc;
+
+ delete fp;
+
+ g_lingo->_returning = true;
}
}
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 332ee9356c..b65fd81d9a 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -81,6 +81,7 @@ Lingo::Lingo(DirectorEngine *vm) : _vm(vm) {
_eventHandlerTypes[t->handler] = t->name;
_currentScript = 0;
+ _currentScriptType = kMovieScript;
_pc = 0;
_returning = false;
_indef = false;
@@ -118,6 +119,7 @@ void Lingo::addCode(Common::String code, ScriptType type, uint16 id) {
}
_currentScript = new ScriptData;
+ _currentScriptType = type;
_scripts[type][id] = _currentScript;
parse(code.c_str());
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 3bbac61fe2..b270860380 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -172,6 +172,7 @@ public:
public:
ScriptData *_currentScript;
+ ScriptType _currentScriptType;
bool _returning;
bool _indef;