diff options
author | Eugene Sandulenko | 2016-08-11 23:04:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-11 23:04:29 +0200 |
commit | 22408230ec9e82665a80fd4476a9f2747ffaff0e (patch) | |
tree | 3c13dbae97125418e2ce7be7337e7fe3071c2a67 | |
parent | 8f41fd07c557388e1f83b91078d9e4f13548695f (diff) | |
download | scummvm-rg350-22408230ec9e82665a80fd4476a9f2747ffaff0e.tar.gz scummvm-rg350-22408230ec9e82665a80fd4476a9f2747ffaff0e.tar.bz2 scummvm-rg350-22408230ec9e82665a80fd4476a9f2747ffaff0e.zip |
DIRECTOR: Lingo: Added all D2 constants
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 69 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 6 |
2 files changed, 72 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index f20d1bfe1c..f8125dba8a 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -106,7 +106,13 @@ static struct BuiltinProto { { "mci", Lingo::b_mci, 1, 1, false }, { "mciwait", Lingo::b_mciwait, 1, 1, false }, // Constants + { "backspace", Lingo::b_backspace, 0, 0, false }, // D2 + { "empty", Lingo::b_empty, 0, 0, false }, // D2 + { "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 + { "tab", Lingo::b_tab, 0, 0, false }, // D2 { "true", Lingo::b_true, 0, 0, false }, // D2 { 0, 0, 0, 0, false } @@ -603,11 +609,29 @@ void Lingo::b_mciwait(int nargs) { /////////////////// // Constants /////////////////// -void Lingo::b_true(int nargs) { +void Lingo::b_backspace(int nargs) { Datum d; - d.type = INT; - d.u.i = 1; + d.type = STRING; + d.u.s = new Common::String("\b"); + + g_lingo->push(d); +} + +void Lingo::b_empty(int nargs) { + Datum d; + + d.type = STRING; + d.u.s = new Common::String(""); + + g_lingo->push(d); +} + +void Lingo::b_enter(int nargs) { + Datum d; + + d.type = STRING; + d.u.s = new Common::String("\n"); g_lingo->push(d); } @@ -621,6 +645,45 @@ void Lingo::b_false(int nargs) { g_lingo->push(d); } +void Lingo::b_quote(int nargs) { + Datum d; + + d.type = STRING; + d.u.s = new Common::String("\""); + + g_lingo->push(d); +} + +void Lingo::b_return(int nargs) { + Datum d; + + d.type = STRING; + d.u.s = new Common::String("\r"); + + g_lingo->push(d); +} + +void Lingo::b_tab(int nargs) { + Datum d; + + d.type = STRING; + d.u.s = new Common::String("\t"); + + g_lingo->push(d); +} + +void Lingo::b_true(int nargs) { + Datum d; + + d.type = INT; + d.u.i = 1; + + g_lingo->push(d); +} + +/////////////////// +// Factory +/////////////////// void Lingo::b_factory(int nargs) { // This is intentionally empty } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 90adcbb972..0d004a0045 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -325,7 +325,13 @@ public: static void b_mci(int nargs); static void b_mciwait(int nargs); + static void b_backspace(int nargs); + static void b_empty(int nargs); + 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_tab(int nargs); static void b_true(int nargs); static void b_factory(int nargs); |