summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-03-31 10:28:10 +0200
committerGitHub <noreply@github.com>2020-03-31 10:28:10 +0200
commit348d426f6425ab31479e95f98828c5e2272cbd63 (patch)
tree611cf59f1c46b60908057affe8d86eb9b39a23ad /src/core
parentMerge pull request #366 from Nick007J/master (diff)
parentMerge remote-tracking branch 'origin/master' into MoreLanguages (diff)
downloadre3-348d426f6425ab31479e95f98828c5e2272cbd63.tar
re3-348d426f6425ab31479e95f98828c5e2272cbd63.tar.gz
re3-348d426f6425ab31479e95f98828c5e2272cbd63.tar.bz2
re3-348d426f6425ab31479e95f98828c5e2272cbd63.tar.lz
re3-348d426f6425ab31479e95f98828c5e2272cbd63.tar.xz
re3-348d426f6425ab31479e95f98828c5e2272cbd63.tar.zst
re3-348d426f6425ab31479e95f98828c5e2272cbd63.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Frontend.cpp24
-rw-r--r--src/core/Frontend.h6
-rw-r--r--src/core/Game.cpp3
-rw-r--r--src/core/Game.h3
-rw-r--r--src/core/MenuScreens.h3
-rw-r--r--src/core/config.h1
6 files changed, 40 insertions, 0 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index a469a215..72d7d912 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1727,6 +1727,17 @@ void CMenuManager::InitialiseChangedLanguageSettings()
CTimer::Update();
CGame::frenchGame = false;
CGame::germanGame = false;
+#ifdef MORE_LANGUAGES
+ switch (CMenuManager::m_PrefsLanguage) {
+ case LANGUAGE_RUSSIAN:
+ CFont::ReloadFonts(FONT_LANGSET_RUSSIAN);
+ break;
+ default:
+ CFont::ReloadFonts(FONT_LANGSET_EFIGS);
+ break;
+ }
+#endif
+
switch (CMenuManager::m_PrefsLanguage) {
case LANGUAGE_FRENCH:
CGame::frenchGame = true;
@@ -1734,6 +1745,11 @@ void CMenuManager::InitialiseChangedLanguageSettings()
case LANGUAGE_GERMAN:
CGame::germanGame = true;
break;
+#ifdef MORE_LANGUAGES
+ case LANGUAGE_RUSSIAN:
+ CGame::russianGame = true;
+ break;
+#endif
default:
break;
}
@@ -2935,6 +2951,14 @@ CMenuManager::ProcessButtonPresses(void)
CMenuManager::InitialiseChangedLanguageSettings();
SaveSettings();
break;
+#ifdef MORE_LANGUAGES
+ case MENUACTION_LANG_RUS:
+ m_PrefsLanguage = LANGUAGE_RUSSIAN;
+ m_bFrontEnd_ReloadObrTxtGxt = true;
+ CMenuManager::InitialiseChangedLanguageSettings();
+ SaveSettings();
+ break;
+#endif
case MENUACTION_POPULATESLOTS_CHANGEMENU:
PcSaveHelper.PopulateSlotInfo();
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 3dbed164..c055c6ab 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -51,6 +51,9 @@ enum eLanguages
LANGUAGE_GERMAN,
LANGUAGE_ITALIAN,
LANGUAGE_SPANISH,
+#ifdef MORE_LANGUAGES
+ LANGUAGE_RUSSIAN,
+#endif
};
enum eFrontendSprites
@@ -301,6 +304,9 @@ enum eMenuAction
MENUACTION_UNK108,
MENUACTION_UNK109,
MENUACTION_UNK110,
+#ifdef MORE_LANGUAGES
+ MENUACTION_LANG_RUS,
+#endif
};
enum eCheckHover
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 3306277c..8571e93e 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -99,6 +99,9 @@ bool &CGame::germanGame = *(bool*)0x95CD1E;
bool &CGame::noProstitutes = *(bool*)0x95CDCF;
bool &CGame::playingIntro = *(bool*)0x95CDC2;
char *CGame::aDatFile = (char*)0x773A48;
+#ifdef MORE_LANGUAGES
+bool CGame::russianGame = false;
+#endif
int &gameTxdSlot = *(int*)0x628D88;
diff --git a/src/core/Game.h b/src/core/Game.h
index b6728a2f..318ff54b 100644
--- a/src/core/Game.h
+++ b/src/core/Game.h
@@ -16,6 +16,9 @@ public:
static bool &nastyGame;
static bool &frenchGame;
static bool &germanGame;
+#ifdef MORE_LANGUAGES
+ static bool russianGame;
+#endif
static bool &noProstitutes;
static bool &playingIntro;
static char *aDatFile; //[32];
diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.h
index 427d01bf..ace6a719 100644
--- a/src/core/MenuScreens.h
+++ b/src/core/MenuScreens.h
@@ -65,6 +65,9 @@ const CMenuScreen aScreens[] = {
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE,
+#ifdef MORE_LANGUAGES
+ MENUACTION_LANG_RUS, "FEL_RUS", SAVESLOT_NONE, MENUPAGE_NONE,
+#endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
diff --git a/src/core/config.h b/src/core/config.h
index 0d39550a..b4f3b7b2 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -175,6 +175,7 @@ enum Config {
#define FIX_BUGS // fixes bugs that we've came across during reversing, TODO: use this more
#define TOGGLEABLE_BETA_FEATURES // toggleable from debug menu. not too many things
+#define MORE_LANGUAGES // Add more translations to the game
// Pad
#define XINPUT