aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-builtins.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-02 20:14:54 +0100
committerEugene Sandulenko2019-12-02 20:14:54 +0100
commitfac37985caf98012288ca7cb734860c5413c0244 (patch)
treea2ded6661176d0da45d92a005406d8c1c0d06e91 /engines/director/lingo/lingo-builtins.cpp
parentfe5ffcea67be71243536bbd069950cd607a21437 (diff)
downloadscummvm-rg350-fac37985caf98012288ca7cb734860c5413c0244.tar.gz
scummvm-rg350-fac37985caf98012288ca7cb734860c5413c0244.tar.bz2
scummvm-rg350-fac37985caf98012288ca7cb734860c5413c0244.zip
DIRECTOR: LINGO: Implemented RETURN as a built-in for the moment
Diffstat (limited to 'engines/director/lingo/lingo-builtins.cpp')
-rw-r--r--engines/director/lingo/lingo-builtins.cpp10
1 files changed, 8 insertions, 2 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")));
}