[Scummvm-git-logs] scummvm master -> 1912619c84ac30039c99225dd1b6280a41a11d1e

neuromancer noreply at scummvm.org
Sat Oct 12 10:57:16 UTC 2024


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:
88b09b45ba FREESCAPE: improved multi-language support for castle dos
26995bad7c FREESCAPE: improved multi-language support for castle dos
1912619c84 FREESCAPE: border screen multi-language support for castle dos


Commit: 88b09b45baf976b2c944098d36c3b33b0207a55d
    https://github.com/scummvm/scummvm/commit/88b09b45baf976b2c944098d36c3b33b0207a55d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-12T12:58:46+02:00

Commit Message:
FREESCAPE: improved multi-language support for castle dos

Changed paths:
    engines/freescape/detection.cpp
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/dos.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 00ec7269d05..c45cf31fe5a 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -775,7 +775,7 @@ static const ADGameDescription gameDescriptions[] = {
 			{"CMH.EXE", 0, "26337adc7861300e5395e992e42b6329", 59968},
 			AD_LISTEND
 		},
-		Common::EN_ANY,
+		Common::UNK_LANG, // Multi-language
 		Common::kPlatformDOS,
 		ADGF_UNSTABLE,
 		GUIO4(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDEREGA, GUIO_RENDERCGA)
@@ -791,7 +791,7 @@ static const ADGameDescription gameDescriptions[] = {
 			{"CMT.EXE", 0, "5814e68a175f74ebce0773a73e7488c7", 78768},
 			AD_LISTEND
 		},
-		Common::EN_ANY,
+		Common::UNK_LANG, // Multi-language
 		Common::kPlatformDOS,
 		ADGF_UNSTABLE,
 		GUIO4(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDEREGA, GUIO_RENDERCGA)
@@ -807,7 +807,7 @@ static const ADGameDescription gameDescriptions[] = {
 			{"CMH.EXE", 0, "03b6f4c5b8931259e42e229de06ac5fc", 35645},
 			AD_LISTEND
 		},
-		Common::EN_ANY,
+		Common::UNK_LANG, // Multi-language
 		Common::kPlatformDOS,
 		ADGF_UNSTABLE,
 		GUIO4(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDEREGA, GUIO_RENDERCGA)
@@ -823,7 +823,7 @@ static const ADGameDescription gameDescriptions[] = {
 			{"CMT.EXE", 0, "8c8621b5927d090bb7a4dca8d39cbfcf", 78816},
 			AD_LISTEND
 		},
-		Common::EN_ANY,
+		Common::UNK_LANG, // Multi-language
 		Common::kPlatformDOS,
 		ADGF_UNSUPPORTED,
 		GUIO4(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDEREGA, GUIO_RENDERCGA)
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index fed27371786..03e2863d2ea 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -1081,49 +1081,39 @@ void CastleEngine::selectCharacterScreen() {
 	surface->create(_screenW, _screenH, _gfx->_texturePixelFormat);
 	surface->fillRect(_fullscreenViewArea, color);
 
-	switch (_language) {
-		case Common::ES_ESP:
-			// No accent in "príncipe" since it is not supported by the font
-			if (isDOS()) {
-				lines.push_back("Elija su personaje");
-				lines.push_back("");
-				lines.push_back("");
-				lines.push_back("            1. Principe");
-				lines.push_back("            2. Princesa");
-			} else if (isSpectrum()) {
-				lines.push_back(centerAndPadString("*******************", 21));
-				lines.push_back(centerAndPadString("Seleccion el ", 21));
-				lines.push_back(centerAndPadString("personaje que quiera", 21));
-				lines.push_back(centerAndPadString("ser y precione enter", 21));
-				lines.push_back("");
-				lines.push_back(centerAndPadString("1. Principe", 21));
-				lines.push_back(centerAndPadString("2. Princesa", 21));
-				lines.push_back("");
-				lines.push_back(centerAndPadString("*******************", 21));
-			}
-			break;
-		default: //case Common::EN_ANY:
-			if (isDOS()) {
-				lines.push_back("Select your character");
-				lines.push_back("");
-				lines.push_back("");
-				lines.push_back("            1. Prince");
-				lines.push_back("            2. Princess");
-			} else if (isSpectrum()) {
-				lines.push_back(centerAndPadString("*******************", 21));
-				lines.push_back(centerAndPadString("Select your character", 21));
-				lines.push_back(centerAndPadString("you wish to play", 21));
-				lines.push_back(centerAndPadString("and press enter", 21));
-				lines.push_back("");
-				lines.push_back(centerAndPadString("1. Prince  ", 21));
-				lines.push_back(centerAndPadString("2. Princess", 21));
-				lines.push_back("");
-				lines.push_back(centerAndPadString("*******************", 21));
-			}
-			break;
+	if (_language != Common::ES_ESP) {
+		int x = 0;
+		int y = 0;
+
+		Common::Array<RiddleText> selectMessage = _riddleList[21]._lines;
+		for (int i = 0; i < int(selectMessage.size()); i++) {
+			x = x + selectMessage[i]._dx;
+			y = y + selectMessage[i]._dy;
+			drawStringInSurface(selectMessage[i]._text, x, y, color, color, surface);
+		}
+		drawFullscreenSurface(surface);
+	} else {
+		// No accent in "príncipe" since it is not supported by the font
+		if (isDOS()) {
+			lines.push_back("Elija su personaje");
+			lines.push_back("");
+			lines.push_back("");
+			lines.push_back("            1. Principe");
+			lines.push_back("            2. Princesa");
+		} else if (isSpectrum()) {
+			lines.push_back(centerAndPadString("*******************", 21));
+			lines.push_back(centerAndPadString("Seleccion el ", 21));
+			lines.push_back(centerAndPadString("personaje que quiera", 21));
+			lines.push_back(centerAndPadString("ser y precione enter", 21));
+			lines.push_back("");
+			lines.push_back(centerAndPadString("1. Principe", 21));
+			lines.push_back(centerAndPadString("2. Princesa", 21));
+			lines.push_back("");
+			lines.push_back(centerAndPadString("*******************", 21));
+		}
+		drawStringsInSurface(lines, surface);
 	}
 
-	drawStringsInSurface(lines, surface);
 	_system->lockMouse(false);
 	_system->showMouse(true);
 	Common::Rect princeSelector(82, 100, 163, 109);
diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index 71571435af2..6e5cc75057e 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -269,13 +269,15 @@ void CastleEngine::loadAssetsDOSFullGame() {
 		switch (_language) {
 			case Common::ES_ESP:
 				stream = decryptFile("CMLS");
-				loadRiddles(stream, 0xaae - 2 - 20 * 2, 20);
+				loadRiddles(stream, 0xaae - 2 - 21 * 2, 21);
 				break;
 			case Common::FR_FRA:
 				stream = decryptFile("CMLF");
+				loadRiddles(stream, 0xaae - 2 - 22 * 2, 22);
 				break;
 			case Common::DE_DEU:
 				stream = decryptFile("CMLG");
+				loadRiddles(stream, 0xaae - 2 - 22 * 2, 22);
 				break;
 			case Common::EN_ANY:
 				stream = decryptFile("CMLE");


Commit: 26995bad7ceb428c91a6028a5c6b9b9391826f42
    https://github.com/scummvm/scummvm/commit/26995bad7ceb428c91a6028a5c6b9b9391826f42
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-12T12:58:46+02:00

Commit Message:
FREESCAPE: improved multi-language support for castle dos

Changed paths:
    engines/freescape/games/castle/castle.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 03e2863d2ea..1622312ea6b 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -732,7 +732,10 @@ void CastleEngine::loadRiddles(Common::SeekableReadStream *file, int offset, int
 			debugC(1, kFreescapeDebugParser, "extra byte: %x", file->readByte());
 			while (size-- > 0) {
 				byte c = file->readByte();
-				if (c != 0)
+				if (c > 0x7F) {
+					file->seek(-1, SEEK_CUR);
+					break;
+				} else if (c != 0)
 					message = message + c;
 			}
 


Commit: 1912619c84ac30039c99225dd1b6280a41a11d1e
    https://github.com/scummvm/scummvm/commit/1912619c84ac30039c99225dd1b6280a41a11d1e
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-12T12:58:46+02:00

Commit Message:
FREESCAPE: border screen multi-language support for castle dos

Changed paths:
    engines/freescape/games/castle/castle.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 1622312ea6b..bb8eba2c541 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -1056,7 +1056,31 @@ void CastleEngine::updateTimeVariables() {
 }
 
 void CastleEngine::borderScreen() {
-	FreescapeEngine::borderScreen();
+
+	if (isSpectrum())
+		FreescapeEngine::borderScreen();
+	else {
+		uint32 color = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0x00, 0x00, 0x00);
+		Graphics::Surface *surface = new Graphics::Surface();
+		surface->create(_screenW, _screenH, _gfx->_texturePixelFormat);
+		surface->fillRect(_fullscreenViewArea, color);
+
+		int x = 40;
+		int y = 34;
+
+		Common::Array<RiddleText> selectMessage = _riddleList[19]._lines;
+		for (int i = 0; i < int(selectMessage.size()); i++) {
+			x = x + selectMessage[i]._dx;
+			y = y + selectMessage[i]._dy;
+			// Color is not important, as the font has already a palette
+			drawStringInSurface(selectMessage[i]._text, x, y, 0, 0, surface);
+		}
+		drawFullscreenSurface(surface);
+		drawBorderScreenAndWait(surface, 6 * 60);
+		surface->free();
+		delete surface;
+	}
+
 	if (isAmiga() && isDemo()) {
 		// Skip character selection
 	} else




More information about the Scummvm-git-logs mailing list