diff options
Diffstat (limited to 'engines/prince')
-rw-r--r-- | engines/prince/detection.h | 16 | ||||
-rw-r--r-- | engines/prince/prince.cpp | 32 | ||||
-rw-r--r-- | engines/prince/prince.h | 4 |
3 files changed, 32 insertions, 20 deletions
diff --git a/engines/prince/detection.h b/engines/prince/detection.h index 279194a22d..2f8be86427 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 60a9aab652..c501f6944d 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 3ec42ae9db..ee952ec5cc 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; |