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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sat Sep 4 20:23:39 CEST 2010


Revision: 52531
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52531&view=rev
Author:   m_kiewitz
Date:     2010-09-04 18:23:37 +0000 (Sat, 04 Sep 2010)

Log Message:
-----------
SCI: kDoBresen changes for sci1early+

including change to compare dest and current position directly, otherwise we would trigger ::moveDone one cycle too late in case the current move completed - fixes lsl5 patti upside down bug #3059336 and lb2cd (cd only!) laura bow getting transformed into a boiler-flame (bug #3050602) - lsl5 was not a real regression, the timing of previous kDoBresen way just off, so it didn't happen in that scene, but happened in lb2cd

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

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-09-04 18:03:35 UTC (rev 52530)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-09-04 18:23:37 UTC (rev 52531)
@@ -362,17 +362,27 @@
 		writeSelectorValue(segMan, mover, SELECTOR(b_i1), mover_i1);
 		writeSelectorValue(segMan, mover, SELECTOR(b_i2), mover_i2);
 		writeSelectorValue(segMan, mover, SELECTOR(b_di), mover_di);
-	}
-	if (handleMoveCount)
-		writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
 
-	if ((getSciVersion() >= SCI_VERSION_1_EGA)) {
-		// Sierra SCI compared client_x&mover_x and client_y&mover_y
-		//  those variables were not initialized in case the moveSpeed
-		//  compare failed
-		if (completed)
-			invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
+		if ((getSciVersion() >= SCI_VERSION_1_EGA)) {
+			// this calling code here was right before the last return in
+			//  sci1ega and got changed to this position since sci1early
+			//  this was an uninitialized issue in sierra sci
+			if ((handleMoveCount) && (getSciVersion() >= SCI_VERSION_1_EARLY))
+				writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
+			// We need to compare directly in here, complete may have happened during
+			//  the current move
+			if ((client_x == mover_x) && (client_y == mover_y))
+				invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
+			if (getSciVersion() >= SCI_VERSION_1_EARLY)
+				return s->r_acc;
+		}
 	}
+	if (handleMoveCount) {
+		if (getSciVersion() <= SCI_VERSION_1_EGA)
+			writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
+		else
+			writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), client_moveSpeed);
+	}
 	return s->r_acc;
 }
 


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