1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-22 19:19:59 +00:00

Add russian lang support

This commit is contained in:
Sergeanur 2020-03-29 09:35:13 +03:00
parent db92864fe2
commit bb8868eba7
13 changed files with 697 additions and 515 deletions

BIN
gamefiles/JAPANESE.gxt Normal file

Binary file not shown.

BIN
gamefiles/fonts_j.txd Normal file

Binary file not shown.

BIN
gamefiles/fonts_r.txd Normal file

Binary file not shown.

BIN
gamefiles/russian.gxt Normal file

Binary file not shown.

View file

@ -1707,6 +1707,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;
@ -1714,6 +1725,11 @@ void CMenuManager::InitialiseChangedLanguageSettings()
case LANGUAGE_GERMAN:
CGame::germanGame = true;
break;
#ifdef MORE_LANGUAGES
case LANGUAGE_RUSSIAN:
CGame::russianGame = true;
break;
#endif
default:
break;
}
@ -2916,6 +2932,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();

View file

@ -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

View file

@ -78,6 +78,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
bool

View file

@ -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];

View file

@ -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,
},

View file

@ -172,6 +172,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

File diff suppressed because it is too large Load diff

View file

@ -39,9 +39,23 @@ enum {
ALIGN_RIGHT,
};
#ifdef MORE_LANGUAGES
enum
{
FONT_LANGSET_EFIGS,
FONT_LANGSET_RUSSIAN
};
#endif
class CFont
{
#ifdef MORE_LANGUAGES
static int16 Size[2][3][193];
static uint8 LanguageSet;
static int32 Slot;
#else
static int16 Size[3][193];
#endif
static int16 

static CSprite2d *Sprite; //[3]
public:
@ -136,4 +150,6 @@ public:
if(Details.alphaFade < 255.0f)
Details.dropColor.a *= Details.alphaFade/255.0f;
}
static void ReloadFonts(uint8 set);
};

View file

@ -43,6 +43,11 @@ CText::Load(void)
case LANGUAGE_SPANISH:
sprintf(filename, "SPANISH.GXT");
break;
#ifdef MORE_LANGUAGES
case LANGUAGE_RUSSIAN:
sprintf(filename, "RUSSIAN.GXT");
break;
#endif
}
length = CFileMgr::LoadFile(filename, filedata, 0x40000, "rb");