[Scummvm-git-logs] scummvm master -> 03e4962b4957f7d2c9fe5a887c15c80602f3dd15
sev-
noreply at scummvm.org
Sun Mar 2 22:18:05 UTC 2025
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:
03e4962b49 DIRECTOR: Improve debug output
Commit: 03e4962b4957f7d2c9fe5a887c15c80602f3dd15
https://github.com/scummvm/scummvm/commit/03e4962b4957f7d2c9fe5a887c15c80602f3dd15
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-03-02T23:13:16+01:00
Commit Message:
DIRECTOR: Improve debug output
Changed paths:
engines/director/lingo/lingo-code.cpp
engines/director/types.cpp
engines/director/types.h
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 4615086224c..e5b62fe7c2c 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -1725,8 +1725,8 @@ void LC::call(const Symbol &funcSym, int nargs, bool allowRetVal) {
// Lingo supports providing a different number of arguments than expected,
// and several games rely on this behaviour.
if (funcSym.nargs > nargs) {
- debugC(1, kDebugLingoExec, "Incorrect number of arguments for handler '%s' (%d, expected %d to %d). Adding extra %d voids",
- funcSym.name->c_str(), nargs, funcSym.nargs, funcSym.maxArgs, funcSym.nargs - nargs);
+ debugC(1, kDebugLingoExec, "Incorrect number of arguments for handler '%s' of type %s (%d, expected %d to %d). Adding extra %d voids",
+ funcSym.name->c_str(), symbolType2str(funcSym.type), nargs, funcSym.nargs, funcSym.maxArgs, funcSym.nargs - nargs);
while (nargs < funcSym.nargs) {
Datum d;
d.u.s = nullptr;
diff --git a/engines/director/types.cpp b/engines/director/types.cpp
index 3932dddf80c..75f807337ba 100644
--- a/engines/director/types.cpp
+++ b/engines/director/types.cpp
@@ -129,7 +129,6 @@ const char *const inkType[] = {
"Dark"
};
-
const char *inkType2str(InkType type) {
if (type <= kInkTypeMask)
return inkType[type];
@@ -141,6 +140,26 @@ const char *inkType2str(InkType type) {
}
+const char *const symbolType[] = {
+ "VOIDSYM",
+ "OPCODE",
+ "CBLTIN",
+ "FBLTIN",
+ "HBLTIN",
+ "KBLTIN",
+ "FBLTIN_LIST",
+ "HBLTIN_LIST",
+ "HANDLER",
+};
+
+const char *symbolType2str(SymbolType type) {
+ if (type >= VOIDSYM && type <= HANDLER)
+ return symbolType[type];
+
+ warning("BUILDBOT: Unknown SymbolType: %d", type);
+ return "<unknown>";
+}
+
#define defFlag(x) { x, #x }
struct FlagsList {
diff --git a/engines/director/types.h b/engines/director/types.h
index a8b994e07b4..fb9e32a1e6f 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -460,6 +460,7 @@ const char *scriptType2str(ScriptType scr);
const char *castType2str(CastType type);
const char *spriteType2str(SpriteType type);
const char *inkType2str(InkType type);
+const char *symbolType2str(SymbolType type);
Common::String objectType2str(int fl);
} // End of namespace Director
More information about the Scummvm-git-logs
mailing list