aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-26 10:35:54 +0000
committerFilippos Karapetis2010-05-26 10:35:54 +0000
commit1bee6daff006970b0f1e7186d43c05540a2bb316 (patch)
tree6ef6aa2cd5aec1c89d4819b079f556f2fcb0c363
parent9a66bfb575ff536d1a110a43c238b944fe2ea9c7 (diff)
downloadscummvm-rg350-1bee6daff006970b0f1e7186d43c05540a2bb316.tar.gz
scummvm-rg350-1bee6daff006970b0f1e7186d43c05540a2bb316.tar.bz2
scummvm-rg350-1bee6daff006970b0f1e7186d43c05540a2bb316.zip
Added more info to the warning thrown when argc > 1 while modifying a variable selector in send_selector()
svn-id: r49232
-rw-r--r--engines/sci/engine/vm.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 28e7484098..8ee60874ea 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -411,12 +411,21 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt
printSendActions = false;
}
- if (argc > 1)
+ if (argc > 1) {
// argc can indeed be bigger than 1 in some cases, and it seems correct
// (i.e. we should skip that many bytes later on)... question is, why
// does this occur? Could such calls be used to point to data after X bytes in the heap?
// What are the skipped bytes in this case?
- warning("send_selector(): more than 1 parameter (%d) while modifying a variable selector", argc);
+ // In SQ4CD, this occurs with the returnVal selector of object Sq4GlobalNarrator when the
+ // game starts, and right after the narrator is heard (e.g. after he talks when examining
+ // something)
+ reg_t oldReg = *varp.getPointer(s->_segMan);
+ reg_t newReg = argp[1];
+ warning("send_selector(): argc = %d while modifying variable selector "
+ "%x (%s) of object %04x:%04x (%s) from %04x:%04x to %04x:%04x",
+ argc, selector, g_sci->getKernel()->getSelectorName(selector).c_str(), PRINT_REG(send_obj),
+ s->_segMan->getObjectName(send_obj), PRINT_REG(oldReg), PRINT_REG(newReg));
+ }
{
CallsStruct call;