diff options
author | Scott Percival | 2019-12-16 23:11:38 +0800 |
---|---|---|
committer | Scott Percival | 2019-12-17 22:56:02 +0800 |
commit | ff8c089baef318ee5e72b04df8fde40653315d3b (patch) | |
tree | f9fc76701801dce0dbca5bb810f82b9b39bafa79 /engines | |
parent | 127c3468167e6e60866920751c35580c984abbbb (diff) | |
download | scummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.tar.gz scummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.tar.bz2 scummvm-rg350-ff8c089baef318ee5e72b04df8fde40653315d3b.zip |
DIRECTOR: LINGO: Add c_namepush
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-bytecode.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 7 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
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(); |