diff options
author | Martin Kiewitz | 2010-06-27 16:09:17 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-27 16:09:17 +0000 |
commit | a2cdc475300c7f8e56cd26146f513715ecfa05e0 (patch) | |
tree | cd0a4989f366b4426404931b67ed3d93709dbd76 /engines | |
parent | d7f212647a115b011db7c37f5bcdd6a5eae62235 (diff) | |
download | scummvm-rg350-a2cdc475300c7f8e56cd26146f513715ecfa05e0.tar.gz scummvm-rg350-a2cdc475300c7f8e56cd26146f513715ecfa05e0.tar.bz2 scummvm-rg350-a2cdc475300c7f8e56cd26146f513715ecfa05e0.zip |
SCI: now showing kernel call name when argument signature check fails
svn-id: r50380
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/vm.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index c4552e591d..841d4ede64 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -654,16 +654,16 @@ static reg_t pointer_add(EngineState *s, reg_t base, int offset) { } } -static void callKernelFunc(EngineState *s, int kernelFuncNum, int argc) { +static void callKernelFunc(EngineState *s, int kernelFuncNr, int argc) { - if (kernelFuncNum >= (int)g_sci->getKernel()->_kernelFuncs.size()) - error("Invalid kernel function 0x%x requested", kernelFuncNum); + if (kernelFuncNr >= (int)g_sci->getKernel()->_kernelFuncs.size()) + error("Invalid kernel function 0x%x requested", kernelFuncNr); - const KernelFuncWithSignature &kernelFunc = g_sci->getKernel()->_kernelFuncs[kernelFuncNum]; + const KernelFuncWithSignature &kernelFunc = g_sci->getKernel()->_kernelFuncs[kernelFuncNr]; if (kernelFunc.signature && !g_sci->getKernel()->signatureMatch(kernelFunc.signature, argc, s->xs->sp + 1)) { - error("[VM] Invalid arguments to kernel call %x", kernelFuncNum); + error("[VM] Invalid arguments to kernel call k%s (funcNr %x)", g_sci->getKernel()->getKernelName(kernelFuncNr).c_str(), kernelFuncNr); } reg_t *argv = s->xs->sp + 1; @@ -675,15 +675,15 @@ static void callKernelFunc(EngineState *s, int kernelFuncNum, int argc) { ExecStack *xstack; xstack = add_exec_stack_entry(s->_executionStack, NULL_REG, NULL, NULL_REG, argc, argv - 1, 0, -1, -1, NULL_REG, s->_executionStack.size()-1, SCI_XS_CALLEE_LOCALS); - xstack->selector = kernelFuncNum; + xstack->selector = kernelFuncNr; xstack->type = EXEC_STACK_TYPE_KERNEL; //warning("callk %s", kernelFunc.origName.c_str()); // TODO: SCI2.1 equivalent if (s->loadFromLauncher >= 0 && ( - (kernelFuncNum == 0x8 && getSciVersion() <= SCI_VERSION_1_1) || // DrawPic - (kernelFuncNum == 0x3d && getSciVersion() == SCI_VERSION_2) // GetSaveDir + (kernelFuncNr == 0x8 && getSciVersion() <= SCI_VERSION_1_1) || // DrawPic + (kernelFuncNr == 0x3d && getSciVersion() == SCI_VERSION_2) // GetSaveDir //(kernelFuncNum == 0x28 && getSciVersion() == SCI_VERSION_2_1) // AddPlane )) { @@ -726,7 +726,7 @@ static void callKernelFunc(EngineState *s, int kernelFuncNum, int argc) { s->_executionStack.pop_back(); } else { Common::String warningMsg = "Dummy function " + kernelFunc.origName + - Common::String::printf("[0x%x]", kernelFuncNum) + + Common::String::printf("[0x%x]", kernelFuncNr) + " invoked - ignoring. Params: " + Common::String::printf("%d", argc) + " ("; |