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.
This commit is contained in:
Thierry Crozat 2013-08-16 10:47:11 +01:00
parent 9d36991e16
commit 4a885af83a
3 changed files with 9 additions and 4 deletions

View File

@ -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[] = {

View File

@ -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();
}

View File

@ -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); }