[Scummvm-git-logs] scummvm master -> 7255a5390192a2cfbc4ecc2f70f226c27aef7a69

sev- sev at scummvm.org
Sat Sep 3 15:59:28 CEST 2016


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

Summary:
b5eef9a36a PRINCE: Properly detect translated versions, and mark them via Game Feature
7255a53901 PRINCE: Added detection to Russian version of the game.


Commit: b5eef9a36a49cd5e95d4de5489f6f02277cb22ce
    https://github.com/scummvm/scummvm/commit/b5eef9a36a49cd5e95d4de5489f6f02277cb22ce
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T15:59:19+02:00

Commit Message:
PRINCE: Properly detect translated versions, and mark them via Game Feature

Changed paths:
    engines/prince/detection.h
    engines/prince/prince.cpp
    engines/prince/prince.h



diff --git a/engines/prince/detection.h b/engines/prince/detection.h
index 279194a..2f8be86 100644
--- a/engines/prince/detection.h
+++ b/engines/prince/detection.h
@@ -73,10 +73,14 @@ static const PrinceGameDescription gameDescriptions[] = {
 		{
 			"prince",
 			"The Prince and the Coward",
-			AD_ENTRY1s("databank.ptc", "5fa03833177331214ec1354761b1d2ee", 3565031),
+			{
+				{"databank.ptc", 0, "5fa03833177331214ec1354761b1d2ee", 3565031},
+				{"prince_translation.dat", 0, 0, -1},
+				AD_LISTEND
+			},
 			Common::EN_ANY,
 			Common::kPlatformWindows,
-			ADGF_TESTING,
+			ADGF_TESTING | GF_TRANSLATED,
 			GUIO1(GUIO_NONE)
 		},
 		kPrinceDataDE
@@ -85,10 +89,14 @@ static const PrinceGameDescription gameDescriptions[] = {
 		{
 			"prince",
 			"The Prince and the Coward",
-			AD_ENTRY1s("databank.ptc", "48ec9806bda9d152acbea8ce31c93c49", 3435298),
+			{
+				{"databank.ptc", 0, "48ec9806bda9d152acbea8ce31c93c49", 3435298},
+				{"prince_translation.dat", 0, 0, -1},
+				AD_LISTEND
+			},
 			Common::EN_ANY,
 			Common::kPlatformWindows,
-			ADGF_TESTING,
+			ADGF_TESTING | GF_TRANSLATED,
 			GUIO1(GUIO_NONE)
 		},
 		kPrinceDataPL
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 60a9aab..c501f69 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -232,7 +232,7 @@ void PrinceEngine::init() {
 		error("Can't open sound/databank.ptc");
 
 	PtcArchive *translation = new PtcArchive();
-	if (getLanguage() != Common::PL_POL && getLanguage() != Common::DE_DEU) {
+	if (getFeatures() & GF_TRANSLATED) {
 		if (!translation->openTranslation("all/prince_translation.dat"))
 			error("Can't open prince_translation.dat");
 	}
@@ -245,7 +245,7 @@ void PrinceEngine::init() {
 	SearchMan.add("_all", all);
 	SearchMan.add("_voices", voices);
 	SearchMan.add("_sound", sound);
-	if (getLanguage() != Common::PL_POL && getLanguage() != Common::DE_DEU) {
+	if (getFeatures() & GF_TRANSLATED) {
 		SearchMan.add("translation", translation);
 	}
 
@@ -275,10 +275,10 @@ void PrinceEngine::init() {
 	_debugger = new Debugger(this, _flags);
 
 	_variaTxt = new VariaTxt();
-	if (getLanguage() == Common::PL_POL || getLanguage() == Common::DE_DEU) {
-		Resource::loadResource(_variaTxt, "variatxt.dat", true);
-	} else {
+	if (getFeatures() & GF_TRANSLATED) {
 		Resource::loadResource(_variaTxt, "variatxt_translate.dat", true);
+	} else {
+		Resource::loadResource(_variaTxt, "variatxt.dat", true);
 	}
 
 	_cursor1 = new Cursor();
@@ -288,10 +288,10 @@ void PrinceEngine::init() {
 	Resource::loadResource(_cursor3, "mouse2.cur", true);
 
 	Common::SeekableReadStream *talkTxtStream;
-	if (getLanguage() == Common::PL_POL || getLanguage() == Common::DE_DEU) {
-		talkTxtStream = SearchMan.createReadStreamForMember("talktxt.dat");
-	} else {
+	if (getFeatures() & GF_TRANSLATED) {
 		talkTxtStream = SearchMan.createReadStreamForMember("talktxt_translate.dat");
+	} else {
+		talkTxtStream = SearchMan.createReadStreamForMember("talktxt.dat");
 	}
 	if (!talkTxtStream) {
 		error("Can't load talkTxtStream");
@@ -304,10 +304,10 @@ void PrinceEngine::init() {
 	delete talkTxtStream;
 
 	Common::SeekableReadStream *invTxtStream;
-	if (getLanguage() == Common::PL_POL || getLanguage() == Common::DE_DEU) {
-		invTxtStream = SearchMan.createReadStreamForMember("invtxt.dat");
-	} else {
+	if (getFeatures() & GF_TRANSLATED) {
 		invTxtStream = SearchMan.createReadStreamForMember("invtxt_translate.dat");
+	} else {
+		invTxtStream = SearchMan.createReadStreamForMember("invtxt.dat");
 	}
 	if (!invTxtStream) {
 		error("Can't load invTxtStream");
@@ -384,10 +384,10 @@ void PrinceEngine::init() {
 	_shadowLine = (byte *)malloc(kShadowLineArraySize);
 
 	Common::SeekableReadStream *creditsDataStream;
-	if (getLanguage() == Common::PL_POL || getLanguage() == Common::DE_DEU) {
-		creditsDataStream = SearchMan.createReadStreamForMember("credits.dat");
-	} else {
+	if (getFeatures() & GF_TRANSLATED) {
 		creditsDataStream = SearchMan.createReadStreamForMember("credits_translate.dat");
+	} else {
+		creditsDataStream = SearchMan.createReadStreamForMember("credits.dat");
 	}
 	if (!creditsDataStream) {
 		error("Can't load creditsDataStream");
@@ -398,7 +398,7 @@ void PrinceEngine::init() {
 	creditsDataStream->read(_creditsData, _creditsDataSize);
 	delete creditsDataStream;
 
-	if (getLanguage() != Common::PL_POL && getLanguage() != Common::DE_DEU) {
+	if (getFeatures() & GF_TRANSLATED) {
 		loadMobTranslationTexts();
 	}
 }
@@ -551,7 +551,7 @@ bool PrinceEngine::loadLocation(uint16 locationNr) {
 	} else if (getGameType() == kPrinceDataPL) {
 		Resource::loadResource(_mobList, "mob.lst", false);
 	}
-	if (getLanguage() != Common::PL_POL && getLanguage() != Common::DE_DEU) {
+	if (getFeatures() & GF_TRANSLATED) {
 		// update Mob texts for translated version
 		setMobTranslationTexts();
 	}
diff --git a/engines/prince/prince.h b/engines/prince/prince.h
index 3ec42ae..ee952ec 100644
--- a/engines/prince/prince.h
+++ b/engines/prince/prince.h
@@ -70,6 +70,10 @@ class Animation;
 class Room;
 class Pscr;
 
+enum {
+	GF_TRANSLATED = 1 << 0
+};
+
 struct Text {
 	const char *_str;
 	uint16 _x, _y;


Commit: 7255a5390192a2cfbc4ecc2f70f226c27aef7a69
    https://github.com/scummvm/scummvm/commit/7255a5390192a2cfbc4ecc2f70f226c27aef7a69
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T15:59:19+02:00

Commit Message:
PRINCE: Added detection to Russian version of the game.

The engine requires a bit of work, as this version has all files
unpacked from the PTC archives.

Changed paths:
    engines/prince/detection.h



diff --git a/engines/prince/detection.h b/engines/prince/detection.h
index 2f8be86..b3d6153 100644
--- a/engines/prince/detection.h
+++ b/engines/prince/detection.h
@@ -72,6 +72,18 @@ static const PrinceGameDescription gameDescriptions[] = {
 	{
 		{
 			"prince",
+			"Galador",
+			AD_ENTRY1s("talktxt.dat", "02bb2372f19aca3c65896ed81b2cefb3", 125702),
+			Common::RU_RUS,
+			Common::kPlatformWindows,
+			ADGF_TESTING,
+			GUIO1(GUIO_NONE)
+		},
+		kPrinceDataDE
+	},
+	{
+		{
+			"prince",
 			"The Prince and the Coward",
 			{
 				{"databank.ptc", 0, "5fa03833177331214ec1354761b1d2ee", 3565031},





More information about the Scummvm-git-logs mailing list