diff options
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r-- | engines/sci/sci.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index c69e35df6d..7147b17b82 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -261,6 +261,9 @@ Common::Error SciEngine::run() { syncSoundSettings(); syncIngameAudioOptions(); + // Load our Mac executable here for icon bar palettes and high-res fonts + loadMacExecutable(); + // Initialize all graphics related subsystems initGraphics(); @@ -857,4 +860,34 @@ void SciEngine::syncIngameAudioOptions() { } } +void SciEngine::loadMacExecutable() { + if (getPlatform() != Common::kPlatformMacintosh || getSciVersion() < SCI_VERSION_1_EARLY || getSciVersion() > SCI_VERSION_1_1) + return; + + Common::String filename; + + switch (getGameId()) { + case GID_KQ6: + filename = "King's Quest VI"; + break; + case GID_FREDDYPHARKAS: + filename = "Freddy Pharkas"; + break; + default: + break; + } + + if (filename.empty()) + return; + + if (!_macExecutable.open(filename) || !_macExecutable.hasResFork()) { + // KQ6/Freddy require the executable to load their icon bar palettes + if (hasMacIconBar()) + error("Could not load Mac resource fork '%s'", filename.c_str()); + + // TODO: Show some sort of warning dialog saying they can't get any + // high-res Mac fonts, when we get to that point ;) + } +} + } // End of namespace Sci |