diff options
author | Eugene Sandulenko | 2016-07-08 23:39:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 598be95ab4379fac72af28c35a087ed681a8731a (patch) | |
tree | a299cc24a106ee5e95185943b49ccaabe92c0051 | |
parent | 4763228ef36bc8af38567f4ccbf4583051da0740 (diff) | |
download | scummvm-rg350-598be95ab4379fac72af28c35a087ed681a8731a.tar.gz scummvm-rg350-598be95ab4379fac72af28c35a087ed681a8731a.tar.bz2 scummvm-rg350-598be95ab4379fac72af28c35a087ed681a8731a.zip |
DIRECTOR: Lingo: Support string Datum printing
-rw-r--r-- | engines/director/director.cpp | 3 | ||||
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 6c925847c2..d18dcc5c88 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -127,7 +127,8 @@ Common::Error DirectorEngine::run() { if x = 4 then put 4\n\ else put 5\n\ end repeat\n\ - set z = \"foo\"\n\ + set z = \"foo bar baz\"\n\ + put z\n\ ", kMovieScript, 2); _lingo->executeScript(kMovieScript, 2); diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 72e771ddef..67345e181d 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -92,6 +92,9 @@ void Lingo::c_printtop(void) { warning("Nameless var. val: %d", d.u.sym->u.val); } break; + case STRING: + warning("%s", d.u.s->c_str()); + break; default: warning("--unknown--"); } @@ -169,7 +172,7 @@ void Lingo::c_assign() { } bool Lingo::verify(Symbol *s) { - if (s->type != INT && s->type != VOID && s->type != FLOAT) { + if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING) { warning("attempt to evaluate non-variable '%s'", s->name); return false; |