aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-11 08:29:11 +0200
committerEugene Sandulenko2016-08-11 08:51:00 +0200
commit5b7ad5cd15fc8b99b1a7be7f9bdaa6f4002a8f2c (patch)
treefe0a62edd911f64e5b88b67e3a26245b6a378dee
parent5c09e6f76e74204f59f35669f4587769d3ee3794 (diff)
downloadscummvm-rg350-5b7ad5cd15fc8b99b1a7be7f9bdaa6f4002a8f2c.tar.gz
scummvm-rg350-5b7ad5cd15fc8b99b1a7be7f9bdaa6f4002a8f2c.tar.bz2
scummvm-rg350-5b7ad5cd15fc8b99b1a7be7f9bdaa6f4002a8f2c.zip
DIRECTOR: Lingo: Added constants 'true' and 'false'
-rw-r--r--engines/director/lingo/lingo-builtins.cpp28
-rw-r--r--engines/director/lingo/lingo.h3
2 files changed, 30 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 5001eeabb9..573a005bb5 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -104,7 +104,11 @@ static struct BuiltinProto {
// Sound
{ "beep", Lingo::b_beep, 0, 1, false }, // D2
{ "mci", Lingo::b_mci, 1, 1, false },
- { "mciwait", Lingo::b_mciwait, 1, 1, false },
+ { "mciwait", Lingo::b_mciwait, 1, 1, false },
+ // Constants
+ { "false", Lingo::b_false, 0, 0, false }, // D2
+ { "true", Lingo::b_true, 0, 0, false }, // D2
+
{ 0, 0, 0, 0, false }
};
@@ -513,6 +517,8 @@ void Lingo::b_puppetPalette(int nargs) {
}
void Lingo::b_puppetSound(int nargs) {
+ g_lingo->convertVOIDtoString(0, nargs);
+
g_lingo->printStubWithArglist("b_puppetSound", nargs);
g_lingo->dropStack(nargs);
@@ -594,5 +600,25 @@ void Lingo::b_mciwait(int nargs) {
g_lingo->func_mciwait(*d.u.s);
}
+///////////////////
+// Constants
+///////////////////
+void Lingo::b_true(int nargs) {
+ Datum d;
+
+ d.type = INT;
+ d.u.i = 1;
+
+ g_lingo->push(d);
+}
+
+void Lingo::b_false(int nargs) {
+ Datum d;
+
+ d.type = INT;
+ d.u.i = 0;
+
+ g_lingo->push(d);
+}
} // End of namespace Director
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index a42b796014..35bdea9635 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -322,6 +322,9 @@ public:
static void b_mci(int nargs);
static void b_mciwait(int nargs);
+ static void b_false(int nargs);
+ static void b_true(int nargs);
+
void func_mci(Common::String &s);
void func_mciwait(Common::String &s);
void func_goto(Datum &frame, Datum &movie);