aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-02-09 23:26:52 +0100
committerEugene Sandulenko2017-02-09 23:26:52 +0100
commit39aa4ecd84735ed067a10a7aad80629b74a92321 (patch)
treea6b75c3efb9e423e5ba1952901aa80144bf35399 /engines/director
parentd87cddca4e13d17feffab0645a0e5eb31e9f5658 (diff)
downloadscummvm-rg350-39aa4ecd84735ed067a10a7aad80629b74a92321.tar.gz
scummvm-rg350-39aa4ecd84735ed067a10a7aad80629b74a92321.tar.bz2
scummvm-rg350-39aa4ecd84735ed067a10a7aad80629b74a92321.zip
DIRECTOR: Lingo: Documented D4 "Variables" Lingo
This completes the Director 4.0 grammar. Woo hoo!
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-builtins.cpp21
-rw-r--r--engines/director/lingo/lingo.h2
2 files changed, 21 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 5b17c0c206..98a4399e4e 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -125,9 +125,11 @@ static struct BuiltinProto {
{ "pictureP", Lingo::b_pictureP, 1, 1, true }, // D4 f
{ "stringp", Lingo::b_stringp, 1, 1, true }, // D2 f
{ "symbolp", Lingo::b_symbolp, 1, 1, true }, // D2 f
+ { "voidP", Lingo::b_voidP, 1, 1, true }, // D4 f
// Misc
{ "alert", Lingo::b_alert, 1, 1, false }, // D2 c
{ "birth", Lingo::b_birth, -1,0, false }, // D4 f
+ { "clearGlobals", Lingo::b_clearGlobals, 0, 0, false }, // D4 c
{ "cursor", Lingo::b_cursor, 1, 1, false }, // D2 c
{ "framesToHMS", Lingo::b_framesToHMS, 4, 4, false }, // D3 f
{ "HMStoFrames", Lingo::b_HMStoFrames, 4, 4, false }, // D3 f
@@ -135,8 +137,8 @@ static struct BuiltinProto {
{ "printFrom", Lingo::b_printFrom, -1,0, false }, // D2 c
// put // D2
// set // D2
- { "showGlobals", Lingo::b_showGlobals, 0, 0, false }, // D2
- { "showLocals", Lingo::b_showLocals, 0, 0, false }, // D2
+ { "showGlobals", Lingo::b_showGlobals, 0, 0, false }, // D2 c
+ { "showLocals", Lingo::b_showLocals, 0, 0, false }, // D2 c
// Score
{ "constrainH", Lingo::b_constrainH, 2, 2, true }, // D2 f
{ "constrainV", Lingo::b_constrainV, 2, 2, true }, // D2 f
@@ -288,6 +290,7 @@ static const char *builtinFunctions[] = {
"true",
"value",
"version",
+ "voidP",
"window",
"xFactoryList",
0
@@ -1005,6 +1008,14 @@ void Lingo::b_symbolp(int nargs) {
g_lingo->push(d);
}
+void Lingo::b_voidP(int nargs) {
+ Datum d = g_lingo->pop();
+ int res = (d.type == VOID) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
+ g_lingo->push(d);
+}
+
///////////////////
// Misc
@@ -1027,6 +1038,12 @@ void Lingo::b_birth(int nargs) {
g_lingo->push(Datum(0));
}
+void Lingo::b_clearGlobals(int nargs) {
+ g_lingo->printSTUBWithArglist("b_clearGlobals", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
void Lingo::b_cursor(int nargs) {
Datum d = g_lingo->pop();
d.toInt();
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index b15691acc7..550156c1c7 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -376,9 +376,11 @@ public:
static void b_pictureP(int nargs);
static void b_stringp(int nargs);
static void b_symbolp(int nargs);
+ static void b_voidP(int nargs);
static void b_alert(int nargs);
static void b_birth(int nargs);
+ static void b_clearGlobals(int nargs);
static void b_cursor(int nargs);
static void b_framesToHMS(int nargs);
static void b_HMStoFrames(int nargs);