[Scummvm-cvs-logs] scummvm master -> cfcaba92841d17a265e028d95ff61b289beccbca

m-kiewitz m_kiewitz at users.sourceforge.net
Tue Apr 21 14:55:09 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cfcaba9284 SCI: kDoBresen adjustments for SCI<=1_EGA, thx wjp


Commit: cfcaba92841d17a265e028d95ff61b289beccbca
    https://github.com/scummvm/scummvm/commit/cfcaba92841d17a265e028d95ff61b289beccbca
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-04-21T14:55:05+02:00

Commit Message:
SCI: kDoBresen adjustments for SCI<=1_EGA, thx wjp

Changed paths:
    engines/sci/engine/kmovement.cpp



diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 51d49ee..9b83dbc 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -305,12 +305,23 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
 		for (uint i = 0; i < clientVarNum; ++i)
 			clientBackup[i] = clientObject->getVariable(i);
 
-		if (mover_xAxis) {
-			if (ABS(mover_x - client_x) < ABS(mover_dx))
-				completed = true;
+		if ((getSciVersion() <= SCI_VERSION_1_EGA_ONLY)) {
+			if (mover_xAxis) {
+				if (ABS(mover_x - client_x) < ABS(mover_dx))
+					completed = true;
+			} else {
+				if (ABS(mover_y - client_y) < ABS(mover_dy))
+					completed = true;
+			}
 		} else {
-			if (ABS(mover_y - client_y) < ABS(mover_dy))
-				completed = true;
+			// SCI1EARLY+ code
+			if (mover_xAxis) {
+				if (ABS(mover_x - client_x) <= ABS(mover_dx))
+					completed = true;
+			} else {
+				if (ABS(mover_y - client_y) <= ABS(mover_dy))
+					completed = true;
+			}
 		}
 		if (completed) {
 			client_x = mover_x;
@@ -336,10 +347,10 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
 		bool collision = false;
 		reg_t cantBeHere = NULL_REG;
 
+		// 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. Resetting the result was always done in SSCI
+		s->r_acc = NULL_REG;
 		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;






More information about the Scummvm-git-logs mailing list