aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorScott Percival2019-12-03 23:06:11 +0800
committerScott Percival2019-12-03 23:07:28 +0800
commit324cffbde63902408836f8b6b7833162404edaae (patch)
tree934de2a6350d396f8152669e1d42651682bbdfa6 /engines/director
parentde23a76c2691309b276585de5d40950ded5c5c2a (diff)
downloadscummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.tar.gz
scummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.tar.bz2
scummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.zip
DIRECTOR: LINGO: Add cb_v4theentitynamepush
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-bytecode.cpp18
-rw-r--r--engines/director/lingo/lingo-code.cpp1
-rw-r--r--engines/director/lingo/lingo.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 462650e408..371f55cf13 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -63,6 +63,7 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x55, Lingo::c_jumpifz, "jb" },
{ 0x5c, Lingo::cb_v4theentitypush, "b" },
{ 0x5d, Lingo::cb_v4theentityassign, "b" },
+ { 0x66, Lingo::cb_v4theentitynamepush, "b" },
{ 0x81, Lingo::c_intpush, "w" },
{ 0x82, Lingo::c_argspush, "w" },
{ 0x83, Lingo::c_arraypush, "w" },
@@ -241,6 +242,23 @@ void Lingo::cb_v4theentitypush() {
}
+void Lingo::cb_v4theentitynamepush() {
+ int nameId = g_lingo->readInt();
+ Common::String name = g_lingo->_namelist[nameId];
+
+ Datum id;
+ id.u.s = NULL;
+ id.type = VOID;
+
+ TheEntity *entity = g_lingo->_theEntities[name];
+
+ debugC(3, kDebugLingoExec, "cb_v4theentitynamepush: calling getTheEntity(0x%02x, id, kTheNOField)", entity->entity, name.c_str());
+ Datum result = g_lingo->getTheEntity(entity->entity, id, kTheNOField);
+
+ g_lingo->push(result);
+}
+
+
void Lingo::cb_v4theentityassign() {
int bank = g_lingo->readInt();
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index ff274fdc62..3575dc32eb 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -133,6 +133,7 @@ static struct FuncDescr {
{ Lingo::c_unk1, "c_unk1", "ii" },
{ Lingo::c_unk2, "c_unk2", "iii" },
{ Lingo::cb_v4theentitypush,"c_v4theentitypush","i" },
+ { Lingo::cb_v4theentitynamepush,"c_v4theentitynamepush","i" },
{ Lingo::cb_v4theentityassign,"c_v4theentityassign","i" },
{ 0, 0, 0 }
};
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 9cbe6c3507..65f985094a 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -348,6 +348,7 @@ public:
// bytecode-related instructions
static void cb_v4theentitypush();
+ static void cb_v4theentitynamepush();
static void cb_v4theentityassign();
void printSTUBWithArglist(const char *funcname, int nargs, const char *prefix = "STUB:");