diff options
author | Thierry Crozat | 2013-08-16 10:47:11 +0100 |
---|---|---|
committer | Thierry Crozat | 2013-08-16 10:47:11 +0100 |
commit | 4a885af83a21af25d4d26cf768871aa2bcebb69e (patch) | |
tree | 63e06ebbf1268f94cb892718e44b86f7377aa395 | |
parent | 9d36991e16e7e806bd376b10200e10bb76a03225 (diff) | |
download | scummvm-rg350-4a885af83a21af25d4d26cf768871aa2bcebb69e.tar.gz scummvm-rg350-4a885af83a21af25d4d26cf768871aa2bcebb69e.tar.bz2 scummvm-rg350-4a885af83a21af25d4d26cf768871aa2bcebb69e.zip |
MORTEVIELLE: Improve reading of menu file
Do not try to read the menu.mor file as it has a different format not
supported (and detection for it was already removed). Also only tries
to read the menu for the original language. This avoids using the
French menu with the German game when both files are present in
the search path.
-rw-r--r-- | engines/mortevielle/detection.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/menu.cpp | 10 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/engines/mortevielle/detection.cpp b/engines/mortevielle/detection.cpp index 7d0f3c4d88..8e2eab52b8 100644 --- a/engines/mortevielle/detection.cpp +++ b/engines/mortevielle/detection.cpp @@ -36,6 +36,8 @@ uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->desc.f Common::Language MortevielleEngine::getLanguage() const { return _gameDescription->desc.language; } +Common::Language MortevielleEngine::getOriginalLanguage() const { return _gameDescription->originalLanguage; } + } static const PlainGameDescriptor MortevielleGame[] = { diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp index 67199b97bc..7962c176af 100644 --- a/engines/mortevielle/menu.cpp +++ b/engines/mortevielle/menu.cpp @@ -638,11 +638,13 @@ void Menu::initMenu() { } if (!enMenuLoaded) { - if (!f.open("menufr.mor")) + if (_vm->getOriginalLanguage() == Common::FR_FRA) { + if (!f.open("menufr.mor")) + error("Missing file - menufr.mor"); + } else { // Common::DE_DEU if (!f.open("menual.mor")) - if (!f.open("menu.mor")) - error("Missing file - menufr.mor or menual.mor or menu.mor"); - + error("Missing file - menual.mor"); + } f.read(_charArr, 7 * 24); f.close(); } diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 27a3d5697a..d3930f7107 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -461,6 +461,7 @@ public: virtual Common::Error run(); uint32 getGameFlags() const; Common::Language getLanguage() const; + Common::Language getOriginalLanguage() const; static Common::String generateSaveFilename(const Common::String &target, int slot); Common::String generateSaveFilename(int slot) { return generateSaveFilename(_targetName, slot); } |