From 38cf75e885983b88d03272f35e39f5d874eae575 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Sep 2016 16:10:59 +0200 Subject: PRINCE: Make Russian version of the game start. Crashes right after the intro AVI. --- engines/prince/prince.cpp | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'engines/prince/prince.cpp') diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index c501f6944d..903f609d80 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -219,33 +219,40 @@ void PrinceEngine::init() { debugEngine("Adding all path: %s", gameDataDir.getPath().c_str()); - PtcArchive *all = new PtcArchive(); - if (!all->open("all/databank.ptc")) - error("Can't open all/databank.ptc"); - - PtcArchive *voices = new PtcArchive(); - if (!voices->open("voices/databank.ptc")) - error("Can't open voices/databank.ptc"); - - PtcArchive *sound = new PtcArchive(); - if (!sound->open("sound/databank.ptc")) - error("Can't open sound/databank.ptc"); - - PtcArchive *translation = new PtcArchive(); - if (getFeatures() & GF_TRANSLATED) { - if (!translation->openTranslation("all/prince_translation.dat")) - error("Can't open prince_translation.dat"); + if (getLanguage() != Common::RU_RUS) { + PtcArchive *all = new PtcArchive(); + if (!all->open("all/databank.ptc")) + error("Can't open all/databank.ptc"); + + PtcArchive *voices = new PtcArchive(); + if (!voices->open("voices/databank.ptc")) + error("Can't open voices/databank.ptc"); + + PtcArchive *sound = new PtcArchive(); + if (!sound->open("sound/databank.ptc")) + error("Can't open sound/databank.ptc"); + + SearchMan.addSubDirectoryMatching(gameDataDir, "all"); + + // Prefix the archive names, so that "all" doesn't conflict with the + // "all" directory, if that happens to be named in all lower case. + // It isn't on the CD, but we should try to stay case-insensitive. + SearchMan.add("_all", all); + SearchMan.add("_voices", voices); + SearchMan.add("_sound", sound); + } else { + SearchMan.addSubDirectoryMatching(gameDataDir, "all"); + SearchMan.addSubDirectoryMatching(gameDataDir, "voices"); + SearchMan.addSubDirectoryMatching(gameDataDir, "sound"); } - SearchMan.addSubDirectoryMatching(gameDataDir, "all"); - - // Prefix the archive names, so that "all" doesn't conflict with the - // "all" directory, if that happens to be named in all lower case. - // It isn't on the CD, but we should try to stay case-insensitive. - SearchMan.add("_all", all); - SearchMan.add("_voices", voices); - SearchMan.add("_sound", sound); if (getFeatures() & GF_TRANSLATED) { + PtcArchive *translation = new PtcArchive(); + if (getFeatures() & GF_TRANSLATED) { + if (!translation->openTranslation("all/prince_translation.dat")) + error("Can't open prince_translation.dat"); + } + SearchMan.add("translation", translation); } -- cgit v1.2.3