[Scummvm-git-logs] scummvm master -> 2fe65d95ef86433460c2c59eca9de022564c2926
athrxx
noreply at scummvm.org
Thu Aug 18 18:35:52 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2124de037e SCUMM: fix savename encodings
2fe65d95ef SCUMM: limit render modes to suitable targets
Commit: 2124de037e51b4a619c180572f452a4ddfcd4886
https://github.com/scummvm/scummvm/commit/2124de037e51b4a619c180572f452a4ddfcd4886
Author: athrxx (athrxx at scummvm.org)
Date: 2022-08-18T20:35:21+02:00
Commit Message:
SCUMM: fix savename encodings
I used kISO8859_1 which works fine most of the
time, but it is still not correct. Now, we just call
getDialogCodePage(), so we get the code page
that matches the current game font...
Changed paths:
engines/scumm/saveload.cpp
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index b875c4e3805..487f46a3480 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -228,10 +228,7 @@ void ScummEngine::copyHeapSaveGameToFile(int slot, const char *saveName) {
if (!saveFile) {
saveFailed = true;
} else {
- // This will not work for Russian, Japanese, Chinese, Korean.
- // But it has to be investigated if we can just insert the
- // codePage returned by getDialogCodePage() here...
- Common::String temp = Common::U32String(saveName, Common::kISO8859_1).encode(Common::kUtf8);
+ Common::String temp = Common::U32String(saveName, getDialogCodePage()).encode(Common::kUtf8);
Common::strlcpy(hdr.name, temp.c_str(), sizeof(hdr.name));
saveSaveGameHeader(saveFile, hdr);
@@ -950,10 +947,7 @@ bool ScummEngine::getSavegameName(int slot, Common::String &desc) {
}
Common::U32String temp(desc.c_str(), Common::kUtf8);
- // This will not work for Russian, Japanese, Chinese, Korean.
- // But it has to be investigated if we can just insert the
- // codePage returned by getDialogCodePage() here...
- desc = temp.encode(Common::kISO8859_1);
+ desc = temp.encode(getDialogCodePage());
return result;
}
Commit: 2fe65d95ef86433460c2c59eca9de022564c2926
https://github.com/scummvm/scummvm/commit/2fe65d95ef86433460c2c59eca9de022564c2926
Author: athrxx (athrxx at scummvm.org)
Date: 2022-08-18T20:35:38+02:00
Commit Message:
SCUMM: limit render modes to suitable targets
While we already tried to prevent invalid render mode
selections there were still some possible misconfigurations.
I have no idea why on earth people do things like select
CGA mode on Mac or Amiga, but it happens...
Changed paths:
engines/scumm/scumm.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 5620369ce2f..eb00b2db88e 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -265,7 +265,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
switch (_renderMode) {
case Common::kRenderHercA:
case Common::kRenderHercG:
- if (_game.version > 2 && _game.id != GID_MONKEY_EGA)
+ if ((_game.version > 2 && _game.id != GID_MONKEY_EGA) || _game.platform != Common::kPlatformDOS)
_renderMode = Common::kRenderDefault;
break;
@@ -277,11 +277,18 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
case Common::kRenderCGA:
case Common::kRenderEGA:
+ if ((_game.version >= 4 && !(_game.features & GF_16COLOR) && !_supportsEGADithering)
+ || (_game.features & GF_OLD256) || _game.platform != Common::kPlatformDOS)
+ _renderMode = Common::kRenderDefault;
+ break;
+
case Common::kRenderAmiga:
- if ((_game.version >= 4 && !(_game.features & GF_16COLOR)
- && !(_game.platform == Common::kPlatformAmiga && _renderMode == Common::kRenderEGA)
- && !_supportsEGADithering)
- || (_game.features & GF_OLD256))
+ if (_game.platform != Common::kPlatformAmiga)
+ _renderMode = Common::kRenderDefault;
+ break;
+
+ case Common::kRenderMacintosh:
+ if (_game.platform != Common::kPlatformMacintosh)
_renderMode = Common::kRenderDefault;
break;
@@ -291,6 +298,11 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
}
break;
+ case Common::kRenderFMTowns:
+ if (_game.platform != Common::kPlatformFMTowns)
+ _renderMode = Common::kRenderDefault;
+ break;
+
default:
break;
}
More information about the Scummvm-git-logs
mailing list