[Scummvm-git-logs] scummvm master -> ca60920d6b159c49961fee5d460e07031b9e9590

sev- sev at scummvm.org
Mon Jan 13 00:25:51 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:
ca60920d6b DIRECTOR: LINGO: Show entity and field names in bytecode decompilation


Commit: ca60920d6b159c49961fee5d460e07031b9e9590
    https://github.com/scummvm/scummvm/commit/ca60920d6b159c49961fee5d460e07031b9e9590
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-01-13T01:25:27+01:00

Commit Message:
DIRECTOR: LINGO: Show entity and field names in bytecode decompilation

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-codegen.cpp


diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 80c1ce8..91e4d1b 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -75,10 +75,10 @@ static struct FuncDescr {
 	{ LC::c_setImmediate,	"c_setImmediate",	"i" },
 	{ LC::c_assign,			"c_assign",			""  },
 	{ LC::c_eval,			"c_eval",			"s" },
-	{ LC::c_theentitypush,	"c_theentitypush",	"ii" }, // entity, field
-	{ LC::c_theentityassign,"c_theentityassign","ii" },
-	{ LC::c_objectfieldpush,"c_objectfieldpush","si" }, // object, field
-	{ LC::c_objectfieldassign,"c_objectfieldassign","si" },
+	{ LC::c_theentitypush,	"c_theentitypush",	"EF" }, // entity, field
+	{ LC::c_theentityassign,"c_theentityassign","EF" },
+	{ LC::c_objectfieldpush,"c_objectfieldpush","sF" }, // object, field
+	{ LC::c_objectfieldassign,"c_objectfieldassign","sF" },
 	{ LC::c_swap,			"c_swap",			"" },
 	{ LC::c_add,			"c_add",			"" },
 	{ LC::c_sub,			"c_sub",			"" },
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 8c1126b..3e43f67 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -142,6 +142,22 @@ Common::String Lingo::decodeInstruction(ScriptData *sd, uint pc, uint *newPc) {
 					res += Common::String::format(" \"%s\"", s);
 					break;
 				}
+			case 'E':
+				{
+					i = (*sd)[pc++];
+					int v = READ_UINT32(&i);
+
+					res += Common::String::format(" %s", entity2str(v));
+					break;
+				}
+			case 'F':
+				{
+					i = (*sd)[pc++];
+					int v = READ_UINT32(&i);
+
+					res += Common::String::format(" %s", field2str(v));
+					break;
+				}
 			default:
 				warning("decodeInstruction: Unknown parameter type: %c", pars[-1]);
 			}




More information about the Scummvm-git-logs mailing list