[Scummvm-git-logs] scummvm master -> 59c06b58de994d7136cb25def8e696d95b2d1f88
moralrecordings
code at moral.net.au
Sun May 17 15:09:16 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
59c06b58de DIRECTOR: LINGO: Add more bytecode stubs
Commit: 59c06b58de994d7136cb25def8e696d95b2d1f88
https://github.com/scummvm/scummvm/commit/59c06b58de994d7136cb25def8e696d95b2d1f88
Author: Scott Percival (code at moral.net.au)
Date: 2020-05-17T23:08:50+08:00
Commit Message:
DIRECTOR: LINGO: Add more bytecode stubs
Changed paths:
engines/director/lingo/lingo-bytecode.cpp
engines/director/lingo/lingo-code.cpp
engines/director/lingo/lingo-code.h
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index c25edca2f9..1f6075eccc 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -69,9 +69,11 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x45, LC::c_namepush, "b" },
{ 0x46, LC::cb_objectpush, "b" },
{ 0x49, LC::cb_globalpush, "b" },
+ { 0x4a, LC::cb_thepush, "b" },
{ 0x4b, LC::cb_varpush, "bpa" },
{ 0x4c, LC::cb_varpush, "bpv" },
{ 0x4f, LC::cb_globalassign,"b" },
+ { 0x50, LC::cb_theassign, "b" },
{ 0x51, LC::cb_varassign, "bpa" },
{ 0x52, LC::cb_varassign, "bpv" },
{ 0x53, LC::c_jump, "jb" },
@@ -81,8 +83,14 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x57, LC::cb_call, "b" },
{ 0x58, LC::cb_methodcall, "b" },
{ 0x59, LC::cb_v4assign, "b" },
+ { 0x5a, LC::cb_v4assign2, "b" },
+ { 0x5b, LC::cb_delete, "b" },
{ 0x5c, LC::cb_v4theentitypush, "b" },
{ 0x5d, LC::cb_v4theentityassign, "b" },
+ { 0x5f, LC::cb_thepush2, "b" },
+ { 0x60, LC::cb_theassign2, "b" },
+ { 0x61, LC::cb_objectfieldpush, "b" },
+ { 0x62, LC::cb_objectfieldassign, "b" },
{ 0x64, LC::cb_stackpeek, "b" },
{ 0x65, LC::cb_stackdrop, "b" },
{ 0x66, LC::cb_v4theentitynamepush, "b" },
@@ -93,9 +101,11 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x85, LC::c_namepush, "w" },
{ 0x86, LC::cb_objectpush, "w" },
{ 0x89, LC::cb_globalpush, "w" },
+ { 0x8a, LC::cb_thepush, "w" },
{ 0x8b, LC::cb_varpush, "wpa" },
{ 0x8c, LC::cb_varpush, "wpv" },
{ 0x8f, LC::cb_globalassign,"w" },
+ { 0x90, LC::cb_theassign, "w" },
{ 0x91, LC::cb_varassign, "wpa" },
{ 0x92, LC::cb_varassign, "wpv" },
{ 0x93, LC::c_jump, "jw" },
@@ -105,8 +115,13 @@ static LingoV4Bytecode lingoV4[] = {
{ 0x97, LC::cb_call, "w" },
{ 0x98, LC::cb_methodcall, "w" },
{ 0x99, LC::cb_v4assign, "w" },
+ { 0x9a, LC::cb_v4assign2, "w" },
{ 0x9c, LC::cb_v4theentitypush, "w" },
{ 0x9d, LC::cb_v4theentityassign, "w" },
+ { 0x9f, LC::cb_thepush2, "w" },
+ { 0xa0, LC::cb_theassign2, "w" },
+ { 0xa1, LC::cb_objectfieldpush, "w" },
+ { 0xa2, LC::cb_objectfieldassign, "w" },
{ 0xa6, LC::cb_v4theentitynamepush, "w" },
{ 0, 0, 0 }
};
@@ -255,6 +270,12 @@ void LC::cb_unk2() {
warning("STUB: opcode 0x%02x (%d, %d)", opcode, arg1, arg2);
}
+void LC::cb_delete() {
+ g_lingo->readInt();
+ g_lingo->printSTUBWithArglist("cb_delete", 9);
+ g_lingo->dropStack(9);
+}
+
void LC::cb_field() {
LB::b_field(1);
Datum field = g_lingo->pop();
@@ -452,6 +473,23 @@ void LC::cb_globalassign() {
g_lingo->varAssign(target, source);
}
+void LC::cb_objectfieldassign() {
+ int fieldNameId = g_lingo->readInt();
+ Common::String fieldName = g_lingo->getName(fieldNameId);
+ Datum object = g_lingo->pop();
+ Datum value = g_lingo->pop();
+ warning("STUB: cb_objectfieldassign(%s, %s, %s)", object.asString(true).c_str(), fieldName.c_str(), value.asString(true).c_str());
+}
+
+void LC::cb_objectfieldpush() {
+ int fieldNameId = g_lingo->readInt();
+ Common::String fieldName = g_lingo->getName(fieldNameId);
+ Datum object = g_lingo->pop();
+ warning("STUB: cb_objectfieldpush(%s, %s)", object.asString(true).c_str(), fieldName.c_str());
+ Datum result;
+ result.type = VOID;
+ g_lingo->push(result);
+}
void LC::cb_objectpush() {
int nameId = g_lingo->readInt();
@@ -462,6 +500,37 @@ void LC::cb_objectpush() {
g_lingo->push(result);
}
+void LC::cb_theassign() {
+ int nameId = g_lingo->readInt();
+ Common::String name = g_lingo->getName(nameId);
+ Datum value = g_lingo->pop();
+ warning("STUB: cb_theassign(%s, %s)", name.c_str(), value.asString().c_str());
+}
+
+void LC::cb_theassign2() {
+ int nameId = g_lingo->readInt();
+ Common::String name = g_lingo->getName(nameId);
+ Datum value = g_lingo->pop();
+ warning("STUB: cb_theassign2(%s, %s)", name.c_str(), value.asString().c_str());
+}
+
+void LC::cb_thepush() {
+ int nameId = g_lingo->readInt();
+ Common::String name = g_lingo->getName(nameId);
+ warning("STUB: cb_thepush(%s)", name.c_str());
+ Datum result;
+ result.type = VOID;
+ g_lingo->push(result);
+}
+
+void LC::cb_thepush2() {
+ int nameId = g_lingo->readInt();
+ Common::String name = g_lingo->getName(nameId);
+ warning("STUB: cb_thepush2(%s)", name.c_str());
+ Datum result;
+ result.type = VOID;
+ g_lingo->push(result);
+}
void LC::cb_varpush() {
int nameId = g_lingo->readInt();
@@ -509,6 +578,13 @@ void LC::cb_varassign() {
}
+void LC::cb_v4assign2() {
+ g_lingo->readInt();
+ g_lingo->printSTUBWithArglist("cb_v4assign2", 10);
+ g_lingo->dropStack(10);
+}
+
+
void LC::cb_v4theentitypush() {
int bank = g_lingo->readInt();
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 1dc2f2f030..1d0fee12da 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -140,6 +140,7 @@ static struct FuncDescr {
{ LC::c_wordToOf, "c_wordToOf", "" }, // D3
{ LC::c_xpop, "c_xpop", "" },
{ LC::cb_call, "cb_call", "N" },
+ { LC::cb_delete, "cb_delete", "i" },
{ LC::cb_field, "cb_field", "" },
{ LC::cb_globalassign, "cb_globalassign", "N" },
{ LC::cb_globalpush, "cb_globalpush", "N" },
@@ -147,13 +148,20 @@ static struct FuncDescr {
{ LC::cb_proplist, "cb_proplist", "" },
{ LC::cb_localcall, "cb_localcall", "i" },
{ LC::cb_methodcall, "cb_methodcall", "N" },
+ { LC::cb_objectfieldassign, "cb_objectfieldassign", "N" },
+ { LC::cb_objectfieldpush, "cb_objectfieldpush", "N" },
{ LC::cb_objectpush, "cb_objectpush", "N" },
+ { LC::cb_theassign, "cb_theassign", "N" },
+ { LC::cb_theassign2, "cb_theassign2", "N" },
+ { LC::cb_thepush, "cb_thepush", "N" },
+ { LC::cb_thepush2, "cb_thepush2", "N" },
{ LC::cb_unk, "cb_unk", "i" },
{ LC::cb_unk1, "cb_unk1", "ii" },
{ LC::cb_unk2, "cb_unk2", "iii" },
{ LC::cb_varassign, "cb_varassign", "N" },
{ LC::cb_varpush, "cb_varpush", "N" },
{ LC::cb_v4assign, "cb_v4assign", "i" },
+ { LC::cb_v4assign2, "cb_v4assign2", "i" },
{ LC::cb_v4theentitypush,"cb_v4theentitypush","i" },
{ LC::cb_v4theentitynamepush,"cb_v4theentitynamepush","N" },
{ LC::cb_v4theentityassign,"cb_v4theentityassign","i" },
diff --git a/engines/director/lingo/lingo-code.h b/engines/director/lingo/lingo-code.h
index 82b2be01db..1ee29385b9 100644
--- a/engines/director/lingo/lingo-code.h
+++ b/engines/director/lingo/lingo-code.h
@@ -146,19 +146,27 @@ namespace LC {
// bytecode-related instructions
void cb_call();
+ void cb_delete();
void cb_field();
void cb_globalassign();
void cb_globalpush();
void cb_list();
void cb_localcall();
void cb_methodcall();
+ void cb_objectfieldassign();
+ void cb_objectfieldpush();
void cb_objectpush();
+ void cb_theassign();
+ void cb_theassign2();
+ void cb_thepush();
+ void cb_thepush2();
void cb_proplist();
void cb_stackpeek();
void cb_stackdrop();
void cb_varassign();
void cb_varpush();
void cb_v4assign();
+ void cb_v4assign2();
void cb_v4theentitypush();
void cb_v4theentitynamepush();
void cb_v4theentityassign();
More information about the Scummvm-git-logs
mailing list