From 40856e6d06c4a71ccabcafcacaebc8fa23549ca3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 9 Jul 2016 13:19:51 +0200 Subject: DIRECTOR: Lingo: Implemented string() built-in function --- engines/director/lingo/lingo-builtins.cpp | 7 +++++++ engines/director/lingo/lingo.h | 1 + 2 files changed, 8 insertions(+) (limited to 'engines') 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); -- cgit v1.2.3