diff options
author | Martin Kiewitz | 2010-01-13 11:14:04 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-13 11:14:04 +0000 |
commit | 7db58ae29e9503a51ed27979b4959a9170ccd390 (patch) | |
tree | eef646861bcbb085c9d18a3f0f97c03501415f52 | |
parent | b44a56aa92c0411d034b71395b5f26494f367343 (diff) | |
download | scummvm-rg350-7db58ae29e9503a51ed27979b4959a9170ccd390.tar.gz scummvm-rg350-7db58ae29e9503a51ed27979b4959a9170ccd390.tar.bz2 scummvm-rg350-7db58ae29e9503a51ed27979b4959a9170ccd390.zip |
SCI: fix kernel signature for kDrawCel (fixes island of dr. brain), added debugging output for kernel_matches_signature
svn-id: r47288
-rw-r--r-- | engines/sci/engine/kernel.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 4993e9245b..f043d66d72 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -201,7 +201,7 @@ SciKernelFunction kfunct_mappers[] = { /*0e*/ DEFUN("NumCels", kNumCels, "o"), /*0f*/ DEFUN("CelWide", kCelWide, "iOi*"), /*10*/ DEFUN("CelHigh", kCelHigh, "iOi*"), - /*11*/ DEFUN("DrawCel", kDrawCel, "iiiiiii*r*"), + /*11*/ DEFUN("DrawCel", kDrawCel, "iiiiii*i*r*"), /*12*/ DEFUN("AddToPic", kAddToPic, "Il*"), // FIXME: signature check removed (set to .*) as kNewWindow is different in Mac versions /*13*/ DEFUN("NewWindow", kNewWindow, "*."), @@ -693,8 +693,10 @@ bool kernel_matches_signature(SegManager *segMan, const char *sig, int argc, con return false; } - if (!(type & *sig)) + if (!(type & *sig)) { + warning("kernel_matches_signature: %d args left, is %d, should be %d", argc, type, *sig); return false; + } } if (!(*sig & KSIG_ELLIPSIS)) @@ -703,10 +705,14 @@ bool kernel_matches_signature(SegManager *segMan, const char *sig, int argc, con --argc; } - if (argc) + if (argc) { + warning("kernel_matches_signature: too many arguments"); return false; // Too many arguments - else - return (*sig == 0 || (*sig & KSIG_ELLIPSIS)); + } + if (*sig == 0 || (*sig & KSIG_ELLIPSIS)) + return true; + warning("kernel_matches_signature: too few arguments"); + return false; } void kernel_sleep(SciEvent *event, uint32 msecs ) { |