Skip to content

Commit

Permalink
DIRECTOR: Lingo: Implemented string() built-in function
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent a8498f4 commit 40856e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engines/director/lingo/lingo-builtins.cpp
Expand Up @@ -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 }
};
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions engines/director/lingo/lingo.h
Expand Up @@ -226,6 +226,7 @@ class Lingo {
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);
Expand Down

0 comments on commit 40856e6

Please sign in to comment.