[Scummvm-cvs-logs] SF.net SVN: scummvm:[51485] scummvm/trunk/engines/sci/engine

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Jul 30 00:52:48 CEST 2010


Revision: 51485
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51485&view=rev
Author:   m_kiewitz
Date:     2010-07-29 22:52:48 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
SCI: fixing hoyle 3

hoyle 3 is using kCanBeHere, but it has cantBeHere and canBeHere selectors so our auto detection would fail
it also has a cantBeHere stub in Actor, thus it won't set acc at all. We reset acc because of that before calling cantBeHere selector (!) of the actors (canBeHere isnt used) so that we wont get a collision otherwise because acc is non zero when calling kDoBresen (fixes all sorts of bugs, clone2727 should clean it up :P

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kmovement.cpp

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-29 22:04:23 UTC (rev 51484)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-29 22:52:48 UTC (rev 51485)
@@ -716,8 +716,11 @@
 	_kernelNames = Common::StringArray(s_defaultKernelNames, ARRAYSIZE(s_defaultKernelNames));
 
 	// Some (later) SCI versions replaced CanBeHere by CantBeHere
-	if (_selectorCache.cantBeHere != -1)
-		_kernelNames[0x4d] = "CantBeHere";
+	if (_selectorCache.cantBeHere != -1) {
+		// hoyle 3 has cantBeHere selector but is assuming to call kCanBeHere
+		if (g_sci->getGameId() != GID_HOYLE3)
+			_kernelNames[0x4d] = "CantBeHere";
+	}
 
 	switch (getSciVersion()) {
 	case SCI_VERSION_0_EARLY:

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-07-29 22:04:23 UTC (rev 51484)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-07-29 22:52:48 UTC (rev 51485)
@@ -328,9 +328,10 @@
 	bool collision = false;
 	reg_t cantBeHere = NULL_REG;
 
-	// FIXME here -> cantBeHere detection doesn't work in hoyle 3
-	//  it's using kCanBeHere but it just has a selector called cantBeHere, so this here doesn't work
 	if (SELECTOR(cantBeHere) != -1) {
+		// adding this here for hoyle 3 to get happy. CantBeHere is a dummy in hoyle 3 and acc is != 0 so we would
+		//  get a collision otherwise
+		s->r_acc = NULL_REG;
 		invokeSelector(s, client, SELECTOR(cantBeHere), argc, argv);
 		if (!s->r_acc.isNull())
 			collision = true;
@@ -357,8 +358,6 @@
 		if (completed)
 			invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
 
-	// FIXME here -> cantBeHere detection doesn't work in hoyle 3
-	//  it's using kCanBeHere but it just has a selector called cantBeHere, so this here doesn't work
 	if (SELECTOR(cantBeHere) != -1)
 		return cantBeHere;
 	return make_reg(0, completed);


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