[Scummvm-cvs-logs] scummvm master -> 3b69816a7d02f5c6ef03efd48062abd532cced18

bluegr md5 at scummvm.org
Sun Jul 8 15:20:04 CEST 2012


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

Summary:
4c43d6d85d SCI: Add a hack in kGetAngleWorker to fix bug #3540976
2ef3f5e695 SCI: Update the virtual file selected in the QFG4 character import screen
10b3fdf247 SCI: Show information for correct file naming in the QFG4 import room
3b69816a7d SCI: Add another English floppy version of KQ5 (bug #3536863)


Commit: 4c43d6d85dc70e1b9b82629f1af1e9a37a136013
    https://github.com/scummvm/scummvm/commit/4c43d6d85dc70e1b9b82629f1af1e9a37a136013
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T06:15:43-07:00

Commit Message:
SCI: Add a hack in kGetAngleWorker to fix bug #3540976

kGetAngle(Worker) 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(). This
temporary hack will do for now till the implementation of kGetAngle is
done again. A simpler atan2-based implementation has also been added for
future reference

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



diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 7570856..cbfe00d 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -78,6 +78,25 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) {
 }
 
 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().
+	// The differences in the return values are the cause of bug #3540976
+	// and perhaps bug #3037267 as well.
+
+	// HACK: Return the expected value for Longbow, scene 150 (bug #3540976).
+	// This is a temporary solution, till the function returns the expected
+	// results.
+	if (g_sci->getGameId() == GID_LONGBOW && g_sci->getEngineState()->currentRoomNumber() == 150) {
+		if (x1 == 207 && y1 == 88 && x2 == 107 && y2 == 184)
+			return 226;
+	}
+
+#if 0
+	// A simpler atan2-based implementation
+	return (360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360;
+#endif
+
 	int16 xRel = x2 - x1;
 	int16 yRel = y1 - y2; // y-axis is mirrored.
 	int16 angle;


Commit: 2ef3f5e6957ce072f9bb5df0fe3f65da578b836c
    https://github.com/scummvm/scummvm/commit/2ef3f5e6957ce072f9bb5df0fe3f65da578b836c
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T06:15:45-07:00

Commit Message:
SCI: Update the virtual file selected in the QFG4 character import screen

This makes the character import screen in QFG4 functional, as the virtual
file index was never updated

Changed paths:
    engines/sci/engine/kgraphics.cpp
    engines/sci/engine/klists.cpp



diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index ec8e0db..5b483eb 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -950,8 +950,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
 		}
 	}
 	if (objName == "savedHeros") {
-		// Import of QfG character files dialog is shown
-		// display additional popup information before letting user use it
+		// Import of QfG character files dialog is shown.
+		// display additional popup information before letting user use it.
 		reg_t changeDirButton = s->_segMan->findObjectByName("changeDirItem");
 		if (!changeDirButton.isNull()) {
 			// check if checkDirButton is still enabled, in that case we are called the first time during that room
@@ -964,6 +964,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
 						"for Quest for Glory 2. Example: 'qfg2-thief.sav'.");
 			}
 		}
+
+		// For the SCI32 version of this, check kListAt().
 		s->_chosenQfGImportItem = readSelectorValue(s->_segMan, controlObject, SELECTOR(mark));
 	}
 
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 15d18eb..342fa95 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -506,6 +506,11 @@ reg_t kListAt(EngineState *s, int argc, reg_t *argv) {
 		curIndex++;
 	}
 
+	// Update the virtual file selected in the character import screen of QFG4.
+	// For the SCI0-SCI1.1 version of this, check kDrawControl().
+	if (g_sci->inQfGImportRoom() && !strcmp(s->_segMan->getObjectName(curObject), "SelectorDText"))
+		s->_chosenQfGImportItem = listIndex;
+
 	return curObject;
 }
 


Commit: 10b3fdf2478dce3712de6213678f54335d5c46a0
    https://github.com/scummvm/scummvm/commit/10b3fdf2478dce3712de6213678f54335d5c46a0
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T06:15:47-07:00

Commit Message:
SCI: Show information for correct file naming in the QFG4 import room

This information is shown in previous QFG versions, but it had to be
placed in a SCI32 graphics function in order to be shown in QFG4 too

Changed paths:
    engines/sci/engine/kgraphics.cpp
    engines/sci/graphics/frameout.cpp



diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 5b483eb..6d938b6 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -951,7 +951,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
 	}
 	if (objName == "savedHeros") {
 		// Import of QfG character files dialog is shown.
-		// display additional popup information before letting user use it.
+		// Display additional popup information before letting user use it.
+		// For the SCI32 version of this, check kernelAddPlane().
 		reg_t changeDirButton = s->_segMan->findObjectByName("changeDirItem");
 		if (!changeDirButton.isNull()) {
 			// check if checkDirButton is still enabled, in that case we are called the first time during that room
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index b13c7f4..cb56e24 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -117,6 +117,8 @@ void GfxFrameout::showCurrentScrollText() {
 	}
 }
 
+extern void showScummVMDialog(const Common::String &message);
+
 void GfxFrameout::kernelAddPlane(reg_t object) {
 	PlaneEntry newPlane;
 
@@ -142,6 +144,19 @@ void GfxFrameout::kernelAddPlane(reg_t object) {
 		_coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight);
 	}
 
+	// Import of QfG character files dialog is shown in QFG4.
+	// Display additional popup information before letting user use it.
+	// For the SCI0-SCI1.1 version of this, check kDrawControl().
+	if (g_sci->inQfGImportRoom() && !strcmp(_segMan->getObjectName(object), "DSPlane")) {
+		showScummVMDialog("Characters saved inside ScummVM are shown "
+				"automatically. Character files saved in the original "
+				"interpreter need to be put inside ScummVM's saved games "
+				"directory and a prefix needs to be added depending on which "
+				"game it was saved in: 'qfg1-' for Quest for Glory 1, 'qfg2-' "
+				"for Quest for Glory 2, 'qfg3-' for Quest for Glory 3. "
+				"Example: 'qfg2-thief.sav'.");
+	}
+
 	newPlane.object = object;
 	newPlane.priority = readSelectorValue(_segMan, object, SELECTOR(priority));
 	newPlane.lastPriority = 0xFFFF; // hidden


Commit: 3b69816a7d02f5c6ef03efd48062abd532cced18
    https://github.com/scummvm/scummvm/commit/3b69816a7d02f5c6ef03efd48062abd532cced18
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-08T06:18:26-07:00

Commit Message:
SCI: Add another English floppy version of KQ5 (bug #3536863)

According to this bug report, there exists another English version
with the same file checksums as the vanilla English version, patched to
Polish. We need a better way of distinguishing the two versions. Until
we do, this is a duplicate entry of the Polish floppy version

Changed paths:
    engines/sci/detection_tables.h



diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 07b4733..8a6184c 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1238,6 +1238,26 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		AD_LISTEND},
 	 	Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)	},
 
+	// King's Quest 5 - English DOS Floppy
+	// VERSION file reports "0.000.051"
+	// Supplied by misterhands in bug report #3536863.
+	// FIXME: According to bug #3536863, there exists another English version
+	// with the same file checksums as the vanilla English version, patched to
+	// Polish. We need a better way of distinguishing the two versions. Until
+	// we do, this is a duplicate entry of the Polish version below.
+	{"kq5", "", {
+		{"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998},
+		{"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398},
+		{"resource.001", 0, "c0f48d4a7ebeaa6aa074fc98d77423e9", 1018560},
+		{"resource.002", 0, "7f188a95acdb60bbe32a8379ba299393", 1307048},
+		{"resource.003", 0, "0860785af59518b94d54718dddcd6907", 1348500},
+		{"resource.004", 0, "c4745dd1e261c22daa6477961d08bf6c", 1239887},
+		{"resource.005", 0, "6556ff8e7c4d1acf6a78aea154daa76c", 1287869},
+		{"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456},
+		{"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176},
+		AD_LISTEND},
+	 	Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)	},
+
 	// King's Quest 5 - English DOS Floppy (supplied by omer_mor in bug report #3036996)
 	// VERSION file reports "0.000.051"
 	{"kq5", "", {
@@ -1356,6 +1376,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 
 	// King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722, includes english language?!)
 	// SCI interpreter version 1.000.060
+	// FIXME: According to bug #3536863, this is actually a patched English version.
+	// The vanilla English version has the same MD5 checksums.
+	// We need a better way of detecting this. Until we do, a duplicate English
+	// entry has been placed above.
 	{"kq5", "", {
 		{"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998},
 		{"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398},






More information about the Scummvm-git-logs mailing list