SCUMM: Allow more than one Mac font

Indiana Jones and the Last Crusade uses two fonts, thoug at the moment
it uses the wrong font during the intro. I'm not sure why.
This commit is contained in:
Torbjörn Andersson 2021-06-18 20:37:28 +02:00 committed by Torbjörn Andersson
parent ee32378ac2
commit 0ffe2ada11
3 changed files with 88 additions and 36 deletions

View file

@ -1297,12 +1297,38 @@ Common::Error ScummEngine::init() {
if (_game.platform == Common::kPlatformMacintosh) {
Common::MacResManager resource;
if (_game.id == GID_LOOM) {
// \xAA is a trademark glyph in Mac OS Roman. We try
// that, but also the Windows version, the UTF-8
// version, and just plain without in case the file
// system can't handle exotic characters like that.
// \xAA is a trademark glyph in Mac OS Roman. We try that, but
// also the Windows version, the UTF-8 version, and just plain
// without in case the file system can't handle exotic
// characters like that.
if (_game.id == GID_INDY3) {
static const char *indyFileNames[] = {
"Indy\xAA",
"Indy\x99",
"Indy\xE2\x84\xA2",
"Indy"
};
for (int i = 0; i < ARRAYSIZE(indyFileNames); i++) {
if (resource.exists(indyFileNames[i])) {
macResourceFile = indyFileNames[i];
_textSurfaceMultiplier = 2;
_macScreen = new Graphics::Surface();
_macScreen->create(640, 400, Graphics::PixelFormat::createFormatCLUT8());
break;
}
}
if (macResourceFile.empty()) {
GUI::MessageDialog dialog(_(
"Could not find the 'Indy' Macintosh executable. High-resolution fonts will\n"
"be disabled."), _("OK"));
dialog.runModal();
}
} else if (_game.id == GID_LOOM) {
static const char *loomFileNames[] = {
"Loom\xAA",
"Loom\x99",
@ -1445,7 +1471,9 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
Common::String macFontFile;
if (_game.platform == Common::kPlatformMacintosh) {
if (_game.id == GID_LOOM) {
if (_game.id == GID_INDY3) {
macFontFile = macResourceFile;
} if (_game.id == GID_LOOM) {
macInstrumentFile = macResourceFile;
macFontFile = macResourceFile;
_macCursorFile = macResourceFile;