[Scummvm-cvs-logs] SF.net SVN: scummvm:[49950] scummvm/trunk/engines/sci/engine/vm.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jun 17 22:52:53 CEST 2010
Revision: 49950
http://scummvm.svn.sourceforge.net/scummvm/?rev=49950&view=rev
Author: thebluegr
Date: 2010-06-17 20:52:53 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
Don't show warnings for a known script bug in SQ4CD with the Sq4GlobalNarrator object
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/vm.cpp
Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp 2010-06-17 20:49:33 UTC (rev 49949)
+++ scummvm/trunk/engines/sci/engine/vm.cpp 2010-06-17 20:52:53 UTC (rev 49950)
@@ -406,19 +406,24 @@
}
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?
- // 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));
+ // argc can indeed be bigger than 1 in some cases, and it's usually the
+ // result of a script bug
+
+ const char *objectName = s->_segMan->getObjectName(send_obj);
+
+ if (!strcmp(objectName, "Sq4GlobalNarrator") && selector == 606) {
+ // SQ4 has a script bug in the Sq4GlobalNarrator object when invoking the
+ // returnVal selector, which doesn't affect gameplay, thus don't diplay it
+ } else {
+ // Unknown script bug, show it
+ reg_t oldReg = *varp.getPointer(s->_segMan);
+ reg_t newReg = argp[1];
+ const char *selectorName = g_sci->getKernel()->getSelectorName(selector).c_str();
+ warning("send_selector(): argc = %d while modifying variable selector "
+ "%x (%s) of object %04x:%04x (%s) from %04x:%04x to %04x:%04x",
+ argc, selector, selectorName, PRINT_REG(send_obj),
+ objectName, PRINT_REG(oldReg), PRINT_REG(newReg));
+ }
}
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list