diff options
author | Scott Percival | 2019-12-03 23:06:11 +0800 |
---|---|---|
committer | Scott Percival | 2019-12-03 23:07:28 +0800 |
commit | 324cffbde63902408836f8b6b7833162404edaae (patch) | |
tree | 934de2a6350d396f8152669e1d42651682bbdfa6 /engines/director/lingo/lingo-bytecode.cpp | |
parent | de23a76c2691309b276585de5d40950ded5c5c2a (diff) | |
download | scummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.tar.gz scummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.tar.bz2 scummvm-rg350-324cffbde63902408836f8b6b7833162404edaae.zip |
DIRECTOR: LINGO: Add cb_v4theentitynamepush
Diffstat (limited to 'engines/director/lingo/lingo-bytecode.cpp')
-rw-r--r-- | engines/director/lingo/lingo-bytecode.cpp | 18 |
1 files changed, 18 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(); |