[Scummvm-git-logs] scummvm master -> 846afef3dca819ff039a0b395ae009b07da089e2

athrxx noreply at scummvm.org
Sun Jun 4 13:33:19 UTC 2023


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:
846afef3dc KYRA: (EOB II/ZH) - fix final sequence


Commit: 846afef3dca819ff039a0b395ae009b07da089e2
    https://github.com/scummvm/scummvm/commit/846afef3dca819ff039a0b395ae009b07da089e2
Author: athrxx (athrxx at scummvm.org)
Date: 2023-06-04T15:31:59+02:00

Commit Message:
KYRA: (EOB II/ZH) - fix final sequence

The Chinese version doesn't have the credits, neither the player nor the required data files. So the enigne would crash when trying to load these. I have also checked with the original that it doesn't do anything else for the credits.

Changed paths:
    devtools/create_kyradat/resources/eob2_dos_chinese.h
    engines/kyra/sequence/sequences_darkmoon.cpp


diff --git a/devtools/create_kyradat/resources/eob2_dos_chinese.h b/devtools/create_kyradat/resources/eob2_dos_chinese.h
index 37c614494fd..ab21e37060b 100644
--- a/devtools/create_kyradat/resources/eob2_dos_chinese.h
+++ b/devtools/create_kyradat/resources/eob2_dos_chinese.h
@@ -999,8 +999,8 @@ static const char *const kEoB2FinaleCPSFilesDOSChinese[13] = {
 	"DESTROY2.CPS",
 	"MAGIC.CPS",
 	"DESTROY3.CPS",
-	"CREDITS2.CPS",
-	"CREDITS3.CPS",
+	"",
+	"",
 	"HEROES.CPS",
 	"THANKS.CPS"
 };
diff --git a/engines/kyra/sequence/sequences_darkmoon.cpp b/engines/kyra/sequence/sequences_darkmoon.cpp
index a64d2e1ccd2..93a604a900e 100644
--- a/engines/kyra/sequence/sequences_darkmoon.cpp
+++ b/engines/kyra/sequence/sequences_darkmoon.cpp
@@ -949,8 +949,11 @@ void DarkMoonEngine::seq_playFinale() {
 	removeInputTop();
 	resetSkipFlag(true);
 
-	sq.loadScene(10, 2);
-	sq.loadScene(9, 2);
+	// The Chinese version has neither the credits player nor the data files for it.
+	if (_flags.lang != Common::ZH_TWN) {
+		sq.loadScene(10, 2);
+		sq.loadScene(9, 2);
+	}
 
 	if (_flags.platform == Common::kPlatformAmiga) {
 		sq.setPalette(7);
@@ -965,22 +968,24 @@ void DarkMoonEngine::seq_playFinale() {
 	if (!skipFlag() && !shouldQuit() && _flags.platform != Common::kPlatformAmiga)
 		snd_playSong(_flags.platform == Common::kPlatformFMTowns ? 16 : (_flags.platform == Common::kPlatformPC98 ? 52 : 1));
 
-	int temp = 0;
+	if (_flags.lang != Common::ZH_TWN) {
+		int temp = 0;
 
-	static const char *const tryFiles[2] = {
-		"CREDITS.TXT",
-		"CREDITS4.CPS"
-	};
+		static const char *const tryFiles[2] = {
+			"CREDITS.TXT",
+			"CREDITS4.CPS"
+		};
 
-	const uint8 *creditsFileData = 0;
-	for (int i = 0; i < ARRAYSIZE(tryFiles) && !creditsFileData; ++i)
-		creditsFileData = _res->fileData(tryFiles[i], 0);
+		const uint8 *creditsFileData = 0;
+		for (int i = 0; i < ARRAYSIZE(tryFiles) && !creditsFileData; ++i)
+			creditsFileData = _res->fileData(tryFiles[i], 0);
 
-	const uint8 *creditsData = creditsFileData ? creditsFileData : _staticres->loadRawData(kEoB2CreditsData, temp);
+		const uint8 *creditsData = creditsFileData ? creditsFileData : _staticres->loadRawData(kEoB2CreditsData, temp);
 
-	seq_playCredits(&sq, creditsData, 18, 2, 6, 2);
+		seq_playCredits(&sq, creditsData, 18, 2, 6, 2);
 
-	delete[] creditsFileData;
+		delete[] creditsFileData;
+	}
 
 	sq.delay(90);
 




More information about the Scummvm-git-logs mailing list