[Scummvm-cvs-logs] scummvm master -> 22408230ec9e82665a80fd4476a9f2747ffaff0e
sev-
sev at scummvm.org
Thu Aug 11 23:12:33 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
22408230ec DIRECTOR: Lingo: Added all D2 constants
Commit: 22408230ec9e82665a80fd4476a9f2747ffaff0e
https://github.com/scummvm/scummvm/commit/22408230ec9e82665a80fd4476a9f2747ffaff0e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-11T23:04:29+02:00
Commit Message:
DIRECTOR: Lingo: Added all D2 constants
Changed paths:
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index f20d1bf..f8125db 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 90adcbb..0d004a0 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);
More information about the Scummvm-git-logs
mailing list