aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-30 10:31:23 +0000
committerMartin Kiewitz2010-06-30 10:31:23 +0000
commitc6695b1d6aa778575f4cefc1942253cbb8a65fbf (patch)
treeed165132d59d5671773dd0d06e64c57aecd0b9c3 /engines
parent8de571556012eae3cff13b3b86f8554b5ba070b4 (diff)
downloadscummvm-rg350-c6695b1d6aa778575f4cefc1942253cbb8a65fbf.tar.gz
scummvm-rg350-c6695b1d6aa778575f4cefc1942253cbb8a65fbf.tar.bz2
scummvm-rg350-c6695b1d6aa778575f4cefc1942253cbb8a65fbf.zip
SCI: removing all the remaining debug output from signature matching
svn-id: r50525
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index c7a7b4e843..2eeefe83d9 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -771,7 +771,11 @@ void Kernel::signatureDebug(const char *sig, int argc, const reg_t *argv) {
if (argc) {
reg_t parameter = *argv;
printf("%04x:%04x (", PRINT_REG(parameter));
- kernelSignatureDebugType(findRegType(parameter));
+ int regType = findRegType(parameter);
+ if (regType)
+ kernelSignatureDebugType(regType);
+ else
+ printf("unknown type of %04x:%04x", PRINT_REG(parameter));
printf(")");
argv++;
argc--;
@@ -803,15 +807,11 @@ bool Kernel::signatureMatch(const char *sig, int argc, const reg_t *argv) {
if ((*sig & KSIG_ANY) != KSIG_ANY) {
int type = findRegType(*argv);
- if (!type) {
- warning("[KERNEL] call signature: couldn't determine type of ref %04x:%04x", PRINT_REG(*argv));
- return false;
- }
+ if (!type)
+ return false; // couldn't determine type
- if (!(type & *sig)) {
- warning("[KERNEL] call signature: %d args left, is %d, should be %d", argc, type, *sig);
- return false;
- }
+ if (!(type & *sig))
+ return false; // type mismatch
}
if (!(*sig & KSIG_ELLIPSIS))
@@ -820,15 +820,12 @@ bool Kernel::signatureMatch(const char *sig, int argc, const reg_t *argv) {
--argc;
}
- if (argc) {
- warning("[KERNEL] call signature: too many arguments");
+ if (argc)
return false; // Too many arguments
- }
if (*sig == 0 || (*sig & KSIG_ELLIPSIS))
return true;
- warning("[KERNEL] call signature: too few arguments");
- return false;
+ return false; // Too few arguments
}
void Kernel::setDefaultKernelNames() {