[Scummvm-git-logs] scummvm master -> 7dcffdeeeb53cadb0bf7c433e74f81fa275e159f
neuromancer
noreply at scummvm.org
Fri Aug 2 20:24:56 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:
b6596689cd FREESCAPE: added more code to support castle in spanish for zx
2673220035 FREESCAPE: more code to support castle in spanish for zx
7dcffdeeeb FREESCAPE: avoid crash when loading castle for dos
Commit: b6596689cdc372e5ee6b7e60cd46d672a2d6e032
https://github.com/scummvm/scummvm/commit/b6596689cdc372e5ee6b7e60cd46d672a2d6e032
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-02T22:22:53+02:00
Commit Message:
FREESCAPE: added more code to support castle in spanish for zx
Changed paths:
engines/freescape/detection.cpp
engines/freescape/games/castle/zx.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index e4c84c60952..c5faee858aa 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -686,6 +686,15 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO3(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDERZX)
},
+ {
+ "castlemaster",
+ "",
+ AD_ENTRY1s("castlemaster.zx.data", "54cea8dbb89d944aa77efdcde73870c3", 36864),
+ Common::ES_ESP,
+ Common::kPlatformZX,
+ ADGF_UNSTABLE,
+ GUIO3(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDERZX)
+ },
{
"castlemaster",
"Demo",
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 11af3b09ffc..314297bd691 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -87,12 +87,24 @@ void CastleEngine::loadAssetsZXFullGame() {
if (!file.isOpen())
error("Failed to open castlemaster.zx.data");
- loadRiddles(&file, 0x1460 - 1 - 3, 8);
+ switch (_language) {
+ case Common::ES_ESP:
+ loadRiddles(&file, 0xcf0 - 1 - 1 - 1, 8);
+ loadMessagesVariableSize(&file, 0xf3d, 71);
+ load8bitBinary(&file, 0x632b - 2, 16);
+ break;
+ case Common::EN_ANY:
+ loadRiddles(&file, 0x1460 - 1 - 3, 8);
+ loadMessagesVariableSize(&file, 0x4bd, 71);
+ load8bitBinary(&file, 0x6a3b, 16);
+ break;
+ default:
+ error("Language not supported");
+ break;
+ }
+
//loadMessagesFixedSize(&file, 0x4bc + 1, 16, 27);
loadFonts(&file, 0x1219, _font);
- loadMessagesVariableSize(&file, 0x4bd, 71);
-
- load8bitBinary(&file, 0x6a3b, 16);
loadSpeakerFxZX(&file, 0xc91, 0xccd);
loadColorPalette();
Commit: 2673220035be11b6fb1b76c3a0169a7291b0e247
https://github.com/scummvm/scummvm/commit/2673220035be11b6fb1b76c3a0169a7291b0e247
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-02T22:22:53+02:00
Commit Message:
FREESCAPE: more code to support castle in spanish for zx
Changed paths:
engines/freescape/detection.cpp
engines/freescape/games/castle/zx.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index c5faee858aa..70967a94e9e 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -689,7 +689,7 @@ static const ADGameDescription gameDescriptions[] = {
{
"castlemaster",
"",
- AD_ENTRY1s("castlemaster.zx.data", "54cea8dbb89d944aa77efdcde73870c3", 36864),
+ AD_ENTRY1s("castlemaster.zx.data", "3e6f6b283fa00a3073edce2392950601", 36309),
Common::ES_ESP,
Common::kPlatformZX,
ADGF_UNSTABLE,
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 314297bd691..281c5f63ded 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -87,26 +87,26 @@ void CastleEngine::loadAssetsZXFullGame() {
if (!file.isOpen())
error("Failed to open castlemaster.zx.data");
+ loadMessagesVariableSize(&file, 0x4bd, 71);
switch (_language) {
case Common::ES_ESP:
loadRiddles(&file, 0xcf0 - 1 - 1 - 1, 8);
loadMessagesVariableSize(&file, 0xf3d, 71);
- load8bitBinary(&file, 0x632b - 2, 16);
+ load8bitBinary(&file, 0x6aab - 2, 16);
+ loadSpeakerFxZX(&file, 0xca0, 0xcdc);
+ loadFonts(&file, 0x1218 + 16, _font);
break;
case Common::EN_ANY:
loadRiddles(&file, 0x1460 - 1 - 3, 8);
- loadMessagesVariableSize(&file, 0x4bd, 71);
load8bitBinary(&file, 0x6a3b, 16);
+ loadSpeakerFxZX(&file, 0xc91, 0xccd);
+ loadFonts(&file, 0x1219, _font);
break;
default:
error("Language not supported");
break;
}
- //loadMessagesFixedSize(&file, 0x4bc + 1, 16, 27);
- loadFonts(&file, 0x1219, _font);
- loadSpeakerFxZX(&file, 0xc91, 0xccd);
-
loadColorPalette();
_gfx->readFromPalette(2, r, g, b);
uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
@@ -121,7 +121,7 @@ void CastleEngine::loadAssetsZXFullGame() {
background->create(backgroundWidth * 8, backgroundHeight, _gfx->_texturePixelFormat);
background->fillRect(Common::Rect(0, 0, backgroundWidth * 8, backgroundHeight), 0);
- file.seek(0xfc4);
+ file.seek(_language == Common::ES_ESP ? 0xfd3 : 0xfc4);
_background = loadFrames(&file, background, backgroundWidth, backgroundHeight, front);
for (auto &it : _areaMap) {
Commit: 7dcffdeeeb53cadb0bf7c433e74f81fa275e159f
https://github.com/scummvm/scummvm/commit/7dcffdeeeb53cadb0bf7c433e74f81fa275e159f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-02T22:22:53+02:00
Commit Message:
FREESCAPE: avoid crash when loading castle for dos
Changed paths:
engines/freescape/games/castle/dos.cpp
diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index 6752046fd98..2776e8dee5d 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -125,21 +125,19 @@ void CastleEngine::loadAssetsDOSFullGame() {
break;
case Common::FR_FRA:
stream = decryptFile("CMLF");
- loadMessagesVariableSize(stream, 0x11, 164);
break;
case Common::DE_DEU:
stream = decryptFile("CMLG");
- loadMessagesVariableSize(stream, 0x11, 164);
break;
case Common::EN_ANY:
stream = decryptFile("CMLE");
loadRiddles(stream, 0xaae, 11);
- loadMessagesVariableSize(stream, 0x11, 164);
break;
default:
error("Invalid or unsupported language: %x", _language);
}
+ loadMessagesVariableSize(stream, 0x11, 164);
delete stream;
stream = decryptFile("CMEDF");
More information about the Scummvm-git-logs
mailing list