diff options
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 10 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 9f29d4c8b0..fa7886fa4f 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -116,6 +116,7 @@ static struct BuiltinProto { { "preLoadCast", Lingo::b_preLoadCast, -1,0, false }, // D3 c { "quit", Lingo::b_quit, 0, 0, false }, // D2 c { "restart", Lingo::b_restart, 0, 0, false }, // D2 c + { "return", Lingo::b_return, 1, 1, false }, // D2 function { "shutDown", Lingo::b_shutDown, 0, 0, false }, // D2 c { "startTimer", Lingo::b_startTimer, 0, 0, false }, // D2 c // when keyDown // D2 @@ -202,7 +203,7 @@ static struct BuiltinProto { { "enter", Lingo::b_enter, 0, 0, false }, // D2 { "false", Lingo::b_false, 0, 0, false }, // D2 { "quote", Lingo::b_quote, 0, 0, false }, // D2 - { "return", Lingo::b_return, 0, 0, false }, // D2 +// { "return", Lingo::b_returnconst, 0, 0, false }, // D2 // FIXME { "tab", Lingo::b_tab, 0, 0, false }, // D2 { "true", Lingo::b_true, 0, 0, false }, // D2 { "version", Lingo::b_version, 0, 0, false }, // D3 @@ -956,6 +957,11 @@ void Lingo::b_quit(int nargs) { g_lingo->pushVoid(); } +void Lingo::b_return(int nargs) { + // We do not touch the top of the stack, it will be returned + c_procret(); +} + void Lingo::b_restart(int nargs) { b_quit(nargs); @@ -1463,7 +1469,7 @@ void Lingo::b_quote(int nargs) { g_lingo->push(Datum(new Common::String("\""))); } -void Lingo::b_return(int nargs) { +void Lingo::b_returnconst(int nargs) { g_lingo->push(Datum(new Common::String("\r"))); } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 633f78b1f8..443536d5a8 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -467,6 +467,7 @@ public: static void b_restart(int nargs); static void b_shutDown(int nargs); static void b_startTimer(int nargs); + static void b_return(int nargs); static void b_closeDA(int nargs); static void b_closeResFile(int nargs); @@ -512,7 +513,7 @@ public: static void b_enter(int nargs); static void b_false(int nargs); static void b_quote(int nargs); - static void b_return(int nargs); + static void b_returnconst(int nargs); static void b_tab(int nargs); static void b_true(int nargs); static void b_version(int nargs); |