PRINCE: support amateur Russian localization from "Russian project"

This commit is contained in:
Denis Telyukh 2020-10-29 23:17:58 +07:00 committed by Eugene Sandulenko
parent b2f11dd8ba
commit ae9a76d527
4 changed files with 47 additions and 7 deletions

View File

@ -79,6 +79,18 @@ static const PrinceGameDescription gameDescriptions[] = {
},
kPrinceDataDE
},
{
{
"prince",
"",
AD_ENTRY1s("databank.ptc", "eb702d16e88c8c41f963d449287c8023", 3730152),
Common::RU_RUS,
Common::kPlatformWindows,
GF_RUSPROJEDITION | ADGF_USEEXTRAASTITLE | ADGF_DROPPLATFORM,
GUIO1(GUIO_NONE)
},
kPrinceDataDE
},
{
{
"prince",

View File

@ -34,9 +34,10 @@ enum PrinceGameType {
};
enum {
GF_TRANSLATED = 1 << 0,
GF_EXTRACTED = 1 << 1,
GF_NOVOICES = 1 << 2
GF_TRANSLATED = 1 << 0,
GF_EXTRACTED = 1 << 1,
GF_NOVOICES = 1 << 2,
GF_RUSPROJEDITION = 1 << 3
};
struct PrinceGameDescription {

View File

@ -531,8 +531,12 @@ void PrinceEngine::checkOptions() {
optText = optionsTextEN[i];
break;
case Common::RU_RUS:
optText = optionsTextRU[i];
break;
if (getFeatures() & GF_RUSPROJEDITION) {
optText = optionsTextRU2[i];
} else {
optText = optionsTextRU[i];
}
break;
default:
break;
};
@ -583,8 +587,12 @@ void PrinceEngine::checkInvOptions() {
invText = invOptionsTextEN[i];
break;
case Common::RU_RUS:
invText = invOptionsTextRU[i];
break;
if (getFeatures() & GF_RUSPROJEDITION) {
invText = invOptionsTextRU2[i];
} else {
invText = invOptionsTextRU[i];
}
break;
default:
error("Unknown game language %d", getLanguage());
break;

View File

@ -101,4 +101,23 @@ const char *optionsTextRU[] = {
"Ujdjhbnm "
};
// RU localization from "Russian Project"
const char *invOptionsTextRU2[] = {
"n""\x91""\x8c""\x8e""\x92""\x90""\x85""\x92""\x9c",
"h""\x91""\x8f""\x8e""\x8b""\x9c""\x87"".",
"n""\x92""\x8a""\x90""\x9b""\x92""\x9c""/r""\x8e""\x8b""\x8a""\x80""\x92""\x9c",
"g""\x80""\x8a""\x90""\x9b""\x92""\x9c""/r""\x9f""\x8d""\x93""\x92""\x9c",
"d""\x80""\x92""\x9c"
};
const char *optionsTextRU2[] = {
"o""\x8e""\x84""\x8e""\x89""\x92""\x88",
"n""\x91""\x8c""\x8e""\x92""\x90""\x85""\x92""\x9c",
"b""\x87""\x9f""\x92""\x9c",
"h""\x91""\x8f""\x8e""\x8b""\x9c""\x87"".",
"n""\x92""\x8a""\x90""\x9b""\x92""\x9c""/r""\x8e""\x8b""\x8a""\x80""\x92""\x9c",
"g""\x80""\x8a""\x90""\x9b""\x92""\x9c""/r""\x9f""\x8d""\x93""\x92""\x9c",
"c""\x8e""\x82""\x8e""\x90""\x88""\x92""\x9c"
};
} // End of namespace Prince