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

bluegr md5 at scummvm.org
Sun Jul 8 21:02:42 CEST 2012


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

Summary:
50dc5009c8 SCI: Ignore another leftover script from KQ7 in the debugger
262c7a1fb7 SCI: Fix a typo and add some comments to kGetAngleWorker()
b2fb2730d6 SCI: Also set the filename of the videoState struct when playing AVIs


Commit: 50dc5009c85f3713d6917d5aba1cbb1428da1c30
    https://github.com/scummvm/scummvm/commit/50dc5009c85f3713d6917d5aba1cbb1428da1c30
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T12:01:11-07:00

Commit Message:
SCI: Ignore another leftover script from KQ7 in the debugger

Changed paths:
    engines/sci/console.cpp



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 40a6fd1..564bbbb 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -2987,8 +2987,9 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) {
 		// Ignore specific leftover scripts, which require other non-existing scripts
 		if ((_engine->getGameId() == GID_HOYLE3         && itr->getNumber() == 995) ||
 		    (_engine->getGameId() == GID_KQ5            && itr->getNumber() == 980) ||
-		    (_engine->getGameId() == GID_SLATER         && itr->getNumber() == 947) ||
-			(_engine->getGameId() == GID_MOTHERGOOSE256 && itr->getNumber() == 980)) {
+			(_engine->getGameId() == GID_KQ7            && itr->getNumber() == 111) ||
+			(_engine->getGameId() == GID_MOTHERGOOSE256 && itr->getNumber() == 980) ||
+		    (_engine->getGameId() == GID_SLATER         && itr->getNumber() == 947)) {
 			continue;
 		}
 


Commit: 262c7a1fb73cb89a7c2db562374bdc0ce6f85d18
    https://github.com/scummvm/scummvm/commit/262c7a1fb73cb89a7c2db562374bdc0ce6f85d18
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T12:01:13-07:00

Commit Message:
SCI: Fix a typo and add some comments to kGetAngleWorker()

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



diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index cbfe00d..05c8845 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -77,10 +77,16 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) {
 	return make_reg(0, (int16) sqrt((float) ABS(argv[0].toSint16())));
 }
 
+/**
+ * Returns the angle (in degrees) between the two points determined by (x1, y1)
+ * and (x2, y2). The angle ranges from 0 to 359 degrees.
+ * What this function does is pretty simple but apparently the original is not
+ * accurate.
+ */
 uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
 	// TODO: This has been implemented based on behavior observed with a test
 	// program created with SCI Studio. However, the return values have subtle
-	// differences from the original, which uses atan().
+	// differences from the original, which uses custom implementation of atan().
 	// The differences in the return values are the cause of bug #3540976
 	// and perhaps bug #3037267 as well.
 
@@ -94,7 +100,7 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
 
 #if 0
 	// A simpler atan2-based implementation
-	return (360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360;
+	return (int16)(360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360;
 #endif
 
 	int16 xRel = x2 - x1;
@@ -122,6 +128,7 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
 	// Convert from grads to degrees by merging grad 0 with grad 1,
 	// grad 10 with grad 11, grad 20 with grad 21, etc. This leads to
 	// "degrees" that equal either one or two grads.
+	// This subtraction is meant to change from 400 "degrees" into 360 degrees
 	angle -= (angle + 9) / 10;
 	return angle;
 }


Commit: b2fb2730d67deccf819701ae98cb49daddf6ac4f
    https://github.com/scummvm/scummvm/commit/b2fb2730d67deccf819701ae98cb49daddf6ac4f
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T12:01:15-07:00

Commit Message:
SCI: Also set the filename of the videoState struct when playing AVIs

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



diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 61d2f93..cb2a763 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -209,6 +209,8 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
 				warning("Failed to open movie file %s", filename.c_str());
 				delete videoDecoder;
 				videoDecoder = 0;
+			} else {
+				s->_videoState.fileName = filename;
 			}
 			break;
 		}






More information about the Scummvm-git-logs mailing list