diff options
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 9 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.h | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
4 files changed, 15 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 05553fe806..0e1d4f0733 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -38,6 +38,7 @@ static struct BuiltinProto { { "exp", Lingo::b_exp, 1, 1, true }, // D4 { "float", Lingo::b_float, 1, 1, true }, // D4 { "integer",Lingo::b_integer, 1, 1, true }, + { "integerp",Lingo::b_integerp, 1, 1, true }, { "log", Lingo::b_log, 1, 1, true }, // D4 { "pi", Lingo::b_pi, 0, 0, true }, // D4 { "power", Lingo::b_power, 2, 2, true }, // D4 @@ -220,6 +221,14 @@ void Lingo::b_integer(int nargs) { g_lingo->push(d); } +void Lingo::b_integerp(int nargs) { + Datum d = g_lingo->pop(); + int res = (d.type == INT) ? 1 : 0; + d.toInt(); + d.u.i = res; + g_lingo->push(d); +} + void Lingo::b_log(int nargs) { Datum d = g_lingo->pop(); d.toFloat(); diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 3f4f9cc432..3b00c092ec 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -37,9 +37,11 @@ TheEntity entities[] = { { kTheExitLock, "exitlock", false }, { kTheFloatPrecision, "floatPrecision", false }, { kTheFrame, "frame", false }, + { kTheFreeBlock, "freeBlock", false }, + { kTheFreeBytes, "freeBytes", false }, { kTheItemDelimiter, "itemDelimiter", false }, { kTheKey, "key", false }, - { kTheKeyCode, "keycode", false }, + { kTheKeyCode, "keyCode", false }, { kTheLastClick, "lastClick", false }, { kTheLastEvent, "lastEvent", false }, { kTheLastFrame, "lastFrame", false }, diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h index 5fea4ba009..7a27c0ad84 100644 --- a/engines/director/lingo/lingo-the.h +++ b/engines/director/lingo/lingo-the.h @@ -28,6 +28,8 @@ namespace Director { enum TheEntityType { kTheNOEntity = 0, kTheFrame = 1, + kTheFreeBlock, + kTheFreeBytes, kThePathName, kTheMenu, kTheMenuItem, diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index a8b8c04355..6fd5f1974a 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -271,6 +271,7 @@ public: static void b_exp(int nargs); static void b_float(int nargs); static void b_integer(int nargs); + static void b_integerp(int nargs); static void b_log(int nargs); static void b_pi(int nargs); static void b_power(int nargs); |