aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Percival2019-12-16 23:11:38 +0800
committerScott Percival2019-12-17 22:56:02 +0800
commitff8c089baef318ee5e72b04df8fde40653315d3b (patch)
treef9fc76701801dce0dbca5bb810f82b9b39bafa79
parent127c3468167e6e60866920751c35580c984abbbb (diff)
downloadscummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.tar.gz
scummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.tar.bz2
scummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.zip
DIRECTOR: LINGO: Add c_namepush
-rw-r--r--engines/director/lingo/lingo-bytecode.cpp2
-rw-r--r--engines/director/lingo/lingo-code.cpp7
-rw-r--r--engines/director/lingo/lingo.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 82ec45308b..0d8d598e01 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -57,7 +57,7 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x42, Lingo::c_argcpush, "b" },
{ 0x43, Lingo::c_argcnoretpush, "b" },
{ 0x44, Lingo::c_constpush, "bv" },
- { 0x45, Lingo::c_symbolpush, "b" },
+ { 0x45, Lingo::c_namepush, "b" },
{ 0x53, Lingo::c_jump, "jb" },
{ 0x54, Lingo::c_jump, "jbn" },
{ 0x55, Lingo::c_jumpifz, "jb" },
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index f4536cee7c..6d50a59c23 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -67,6 +67,7 @@ static struct FuncDescr {
{ Lingo::c_stringpush, "c_stringpush", "s" },
{ Lingo::c_symbolpush, "c_symbolpush", "s" }, // D3
{ Lingo::c_constpush, "c_constpush", "i" },
+ { Lingo::c_namepush, "c_namepush", "i" },
{ Lingo::c_varpush, "c_varpush", "s" },
{ Lingo::c_setImmediate,"c_setImmediate","i" },
{ Lingo::c_assign, "c_assign", "" },
@@ -256,6 +257,12 @@ void Lingo::c_constpush() {
g_lingo->push(d);
}
+void Lingo::c_namepush() {
+ Datum d;
+ int i = g_lingo->readInt();
+ g_lingo->push(Datum(new Common::String(g_lingo->_namelist[i])));
+}
+
void Lingo::c_argcpush() {
Datum d;
int argsSize = g_lingo->readInt();
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index bca28773c9..3281445f81 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -289,6 +289,7 @@ public:
static void c_stringpush();
static void c_symbolpush();
static void c_constpush();
+ static void c_namepush();
static void c_varpush();
static void c_argcpush();
static void c_argcnoretpush();