[Scummvm-git-logs] scummvm master -> 38cf75e885983b88d03272f35e39f5d874eae575

sev- sev at scummvm.org
Sat Sep 3 16:12:02 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
38cf75e885 PRINCE: Make Russian version of the game start.


Commit: 38cf75e885983b88d03272f35e39f5d874eae575
    https://github.com/scummvm/scummvm/commit/38cf75e885983b88d03272f35e39f5d874eae575
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T16:10:59+02:00

Commit Message:
PRINCE: Make Russian version of the game start.

Crashes right after the intro AVI.

Changed paths:
    engines/prince/prince.cpp



diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index c501f69..903f609 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);
 	}
 





More information about the Scummvm-git-logs mailing list