diff options
author | Eugene Sandulenko | 2016-06-26 13:07:20 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 125600a91f1770046ca9d3206282d73b1d3e31c5 (patch) | |
tree | 0e990d71b8b69e208c6c4f55d1ae80b34576a5df | |
parent | 3d543c62ba44013d89af5bd0804147e1d6c6c56b (diff) | |
download | scummvm-rg350-125600a91f1770046ca9d3206282d73b1d3e31c5.tar.gz scummvm-rg350-125600a91f1770046ca9d3206282d73b1d3e31c5.tar.bz2 scummvm-rg350-125600a91f1770046ca9d3206282d73b1d3e31c5.zip |
DIRECTOR: Lingo: Initial implementation of c_procret()
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 11 | ||||
-rw-r--r-- | engines/director/lingo/lingo.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
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; |