diff options
author | Eugene Sandulenko | 2016-07-09 13:19:51 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 40856e6d06c4a71ccabcafcacaebc8fa23549ca3 (patch) | |
tree | 5de19b1156dbfa798d90268de254a42fcfafa1d8 | |
parent | a8498f41a0c890870e053024abac0506152729a7 (diff) | |
download | scummvm-rg350-40856e6d06c4a71ccabcafcacaebc8fa23549ca3.tar.gz scummvm-rg350-40856e6d06c4a71ccabcafcacaebc8fa23549ca3.tar.bz2 scummvm-rg350-40856e6d06c4a71ccabcafcacaebc8fa23549ca3.zip |
DIRECTOR: Lingo: Implemented string() built-in function
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 7 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 0fe742a50a..48de072254 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -41,6 +41,7 @@ static struct BuiltinProto { { "random", Lingo::b_random, 1}, { "sin", Lingo::b_sin, 1}, { "sqrt", Lingo::b_sqrt, 1}, + { "string", Lingo::b_string, 1}, { "tan", Lingo::b_tan, 1}, { 0, 0, 0 } }; @@ -145,6 +146,12 @@ void Lingo::b_sqrt() { g_lingo->push(d); } +void Lingo::b_string() { + Datum d = g_lingo->pop(); + d.toString(); + g_lingo->push(d); +} + void Lingo::b_tan() { Datum d = g_lingo->pop(); d.toFloat(); diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index c88efabe31..8cb454f3aa 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -226,6 +226,7 @@ public: static void b_random(); static void b_sin(); static void b_sqrt(); + static void b_string(); static void b_tan(); void func_mci(Common::String &s); |