mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-13 06:19:14 +00:00
Add russian support
This commit is contained in:
parent
59bf3a1cc4
commit
cba1f85026
BIN
gamefiles/TEXT/russian.gxt
Normal file
BIN
gamefiles/TEXT/russian.gxt
Normal file
Binary file not shown.
BIN
gamefiles/models/fonts_r.txd
Normal file
BIN
gamefiles/models/fonts_r.txd
Normal file
Binary file not shown.
|
@ -387,7 +387,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
|||
#if (defined GTAVC_JP_PATCH || defined SUPPORT_JAPANESE_SCRIPT)
|
||||
case COMMAND_IS_JAPANESE_GAME:
|
||||
#ifdef MORE_LANGUAGES
|
||||
UpdateCompareFlag(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_JAPANESE);
|
||||
UpdateCompareFlag(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_JAPANESE);
|
||||
#elif (defined GTAVC_JP_PATCH)
|
||||
UpdateCompareFlag(true);
|
||||
#else
|
||||
|
|
|
@ -181,38 +181,6 @@ void IslandLoadingAfterChange(int8 before, int8 after) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
void LangPolSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_POLISH;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void LangRusSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_RUSSIAN;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void LangJapSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef MULTISAMPLING
|
||||
void GraphicsGoBack() {
|
||||
}
|
||||
|
@ -471,11 +439,6 @@ CMenuScreenCustom aScreens[] = {
|
|||
MENUACTION_LANG_GER, "FEL_GER", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_ITA, "FEL_ITA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_SPA, "FEL_SPA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#ifdef MORE_LANGUAGES
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_POL", { new CCFODynamic(nil, nil, nil, nil, LangPolSelect) }, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_RUS", { new CCFODynamic(nil, nil, nil, nil, LangRusSelect) }, 0, 0, MENUALIGN_CENTER
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_JAP", { new CCFODynamic(nil, nil, nil, nil, LangJapSelect) }, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, MENUALIGN_CENTER,
|
||||
},
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ enum Config {
|
|||
#endif
|
||||
|
||||
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
|
||||
//#define MORE_LANGUAGES // Add more translations to the game
|
||||
#define MORE_LANGUAGES // Add more translations to the game
|
||||
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
|
||||
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
|
||||
#define FIX_HIGH_FPS_BUGS_ON_FRONTEND
|
||||
|
|
|
@ -90,16 +90,51 @@ mysrand(unsigned int seed)
|
|||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||
#include "frontendoption.h"
|
||||
|
||||
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
void LangPolSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_POLISH;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void LangRusSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_RUSSIAN;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void LangJapSelect(int8 action)
|
||||
{
|
||||
if (action == FEOPTION_ACTION_SELECT) {
|
||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
|
||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
CustomFrontendOptionsPopulate(void)
|
||||
{
|
||||
// Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
|
||||
|
||||
int fd;
|
||||
// These work only if we have neo folder, so they're dynamically added
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
|
||||
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
|
||||
int fd = CFileMgr::OpenFile("neo/neo.txd","r");
|
||||
fd = CFileMgr::OpenFile("neo/neo.txd","r");
|
||||
if (fd) {
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
FrontendOptionSetCursor(MENUPAGE_GRAPHICS_SETTINGS, -3, false);
|
||||
|
@ -116,6 +151,38 @@ CustomFrontendOptionsPopulate(void)
|
|||
#endif
|
||||
CFileMgr::CloseFile(fd);
|
||||
}
|
||||
#endif
|
||||
// Add outsourced language translations, if files are found
|
||||
#ifdef MORE_LANGUAGES
|
||||
int fd2;
|
||||
FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, 5, false);
|
||||
#if 0
|
||||
if (fd = CFileMgr::OpenFile("text/polish.gxt")) {
|
||||
if (fd2 = CFileMgr::OpenFile("models/fonts_p.txd")) {
|
||||
FrontendOptionAddDynamic("FEL_POL", 0, 0, MENUALIGN_CENTER, nil, nil, LangPolSelect, nil, nil);
|
||||
CFileMgr::CloseFile(fd2);
|
||||
}
|
||||
CFileMgr::CloseFile(fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fd = CFileMgr::OpenFile("text/russian.gxt")) {
|
||||
if (fd2 = CFileMgr::OpenFile("models/fonts_r.txd")) {
|
||||
FrontendOptionAddDynamic("FEL_RUS", 0, 0, MENUALIGN_CENTER, nil, nil, LangRusSelect, nil, nil);
|
||||
CFileMgr::CloseFile(fd2);
|
||||
}
|
||||
CFileMgr::CloseFile(fd);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (fd = CFileMgr::OpenFile("text/japanese.gxt")) {
|
||||
if (fd2 = CFileMgr::OpenFile("models/fonts_j.txd")) {
|
||||
FrontendOptionAddDynamic("FEL_JAP", 0, 0, MENUALIGN_CENTER, nil, nil, LangJapSelect, nil, nil);
|
||||
CFileMgr::CloseFile(fd2);
|
||||
}
|
||||
CFileMgr::CloseFile(fd);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -71,8 +71,8 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
18, 10, 17, 17, 17, 17, 17, 15, 12, 16, 5, 30, 30, 30, 30, 30,
|
||||
// A, B, C, D, E, F, G, H, I, J, K, L, M, N, O,
|
||||
12, 16, 19, 16, 19, 18, 18, 17, 22, 11, 17, 18, 18, 30, 22, 19,
|
||||
#ifdef FIX_BUGS
|
||||
//P, Q, R, S, T, U, V, W, X, Y, Z, ??, ??, ??, ¡, \,
|
||||
#ifdef FIX_BUGS
|
||||
22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 10, 19,
|
||||
#else
|
||||
22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 19, 19,
|
||||
|
@ -85,8 +85,8 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
16, 16, 16, 16, 33, 17, 18, 18, 18, 18, 11, 11, 11, 11, 19, 19,
|
||||
//Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê,
|
||||
19, 19, 19, 19, 19, 19, 15, 14, 14, 14, 14, 20, 14, 11, 11, 11,
|
||||
#ifdef FIX_BUGS
|
||||
//ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿,
|
||||
#ifdef FIX_BUGS
|
||||
11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 22, 18, 21,
|
||||
#else
|
||||
11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 24, 18, 21,
|
||||
|
@ -96,7 +96,7 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
//??,??
|
||||
//space, unprop
|
||||
19, 16
|
||||
},
|
||||
{
|
||||
|
@ -110,8 +110,8 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
20, 7, 20, 20, 21, 20, 20, 19, 21, 20, 8, 30, 24, 30, 24, 19,
|
||||
//TM,A, B, C, D, E, F, G, H, I, J, K, L, M, N, O,
|
||||
20, 22, 22, 21, 22, 18, 18, 22, 22, 9, 14, 21, 18, 27, 21, 24,
|
||||
#ifdef FIX_BUGS
|
||||
//P, Q, R, S, T, U, V, W, X, Y, Z, *I, \, *I, ¡, °,
|
||||
#ifdef FIX_BUGS
|
||||
22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 7, 19,
|
||||
#else
|
||||
22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 10, 19,
|
||||
|
@ -124,8 +124,8 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
20, 20, 20, 20, 29, 22, 19, 19, 19, 19, 9, 9, 9, 9, 23, 23,
|
||||
//Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê,
|
||||
23, 23, 24, 24, 24, 24, 20, 19, 17, 17, 17, 30, 16, 17, 17, 17,
|
||||
#ifdef FIX_BUGS
|
||||
//ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿,
|
||||
#ifdef FIX_BUGS
|
||||
17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 21, 17, 19,
|
||||
#else
|
||||
17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 19, 20, 20,
|
||||
|
@ -136,113 +136,114 @@ int16 CFont::Size[MAX_FONTS][210] = {
|
|||
16, 19, 19, 9, 19, 20, 14, 29, 19, 19, 19, 19, 19, 19, 21, 19,
|
||||
//V2,W2,X2, Y2, Z2, À2, Á2, Â2, Ä2, Æ2, Ç2, È2, É2, Ê2, Ë2, Ì2,
|
||||
20, 32, 20, 19, 19, 19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9,
|
||||
#ifdef FIX_BUGS
|
||||
//Í2,Î2,Ï2, Ò2, Ó2, Ô2, Ö2, Ù2, Ú2, Û2, Ü2, ß2, Ñ2, ¿2, '2, .2,
|
||||
#ifdef FIX_BUGS
|
||||
9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 10, 9,
|
||||
#else
|
||||
9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 21, 10, 9,
|
||||
#endif
|
||||
//??,??
|
||||
//space, unprop
|
||||
10, 20
|
||||
}
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
},
|
||||
{
|
||||
{ 13, 12, 31, 35, 23, 35, 31, 9, 14, 15, 25, 30, 11, 17,
|
||||
13, 31, 23, 16, 22, 21, 24, 23, 23, 20, 23, 22, 10,
|
||||
35, 26, 26, 26, 26, 30, 26, 24, 23, 24, 22, 21, 24,
|
||||
26, 10, 20, 26, 22, 29, 26, 25, 23, 25, 24, 24, 22,
|
||||
25, 24, 29, 29, 23, 25, 37, 22, 37, 35, 37, 35, 21,
|
||||
22, 21, 21, 22, 13, 22, 21, 10, 16, 22, 11, 32, 21,
|
||||
21, 23, 22, 16, 20, 14, 21, 20, 30, 25, 21, 21, 13,
|
||||
33, 13, 13, 13, 24, 22, 22, 19, 26, 21, 30, 20, 23,
|
||||
23, 21, 24, 26, 23, 22, 23, 21, 22, 20, 20, 26, 25,
|
||||
24, 22, 31, 32, 23, 30, 22, 22, 32, 23, 19, 18, 18,
|
||||
15, 22, 19, 27, 19, 20, 20, 18, 22, 24, 20, 19, 19,
|
||||
20, 19, 16, 19, 28, 20, 20, 18, 26, 27, 19, 26, 18,
|
||||
19, 27, 19, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
||||
26, 26, 26, 18, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
||||
26, 26, 26, 26, 26, 26, 26, 26, 26, 20 },
|
||||
{ 13, 9, 21, 35, 23, 35, 35, 11, 35, 35, 25, 35, 11,
|
||||
17, 13, 33, 28, 14, 22, 21, 24, 23, 23, 21, 23, 22,
|
||||
10, 35, 13, 35, 13, 33, 5, 25, 22, 23, 24, 21, 21, 24,
|
||||
24, 9, 20, 24, 21, 27, 25, 25, 22, 25, 23, 20, 23, 23,
|
||||
23, 31, 23, 23, 23, 37, 33, 37, 35, 37, 35, 21, 19,
|
||||
19, 21, 19, 17, 21, 21, 8, 17, 18, 14, 24, 21, 21, 20,
|
||||
22, 19, 20, 20, 19, 20, 26, 21, 20, 21, 33, 33, 33,
|
||||
33, 35, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 16, },
|
||||
{ 15, 14, 16, 25, 19,
|
||||
26, 22, 11, 18, 18, 27, 26, 13, 19, 9, 27, 19, 18, 19,
|
||||
19, 22, 19, 20, 18, 19, 20, 12, 32, 15, 32, 15, 35,
|
||||
15, 19, 19, 19, 19, 19, 16, 19, 20, 9, 19, 20, 14, 29,
|
||||
19, 20, 19, 19, 19, 19, 21, 19, 20, 32, 20, 19, 19,
|
||||
33, 31, 39, 37, 39, 37, 21, 21, 21, 23, 21, 19, 23, 23, 10, 19, 20, 16, 26, 23,
|
||||
21, 21, 20, 20, 22, 21, 22, 22, 26, 22, 22, 23, 35,
|
||||
35, 35, 35, 37, 19, 19, 19, 19, 19, 19, 29, 19, 19,
|
||||
19, 20, 22, 31, 19, 19, 19, 19, 19, 29, 19, 29, 19,
|
||||
21, 19, 30, 31, 21, 29, 19, 19, 29, 19, 21, 23, 32,
|
||||
21, 21, 30, 31, 22, 21, 32, 33, 23, 32, 21, 21, 32,
|
||||
21, 19, 19, 30, 31, 22, 22, 21, 32, 33, 23, 32, 21,
|
||||
21, 32, 21, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 11, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19 },
|
||||
},
|
||||
|
||||
{
|
||||
5, 9, 9, 0, 17, 17, 23, 3, 21, 18, 0, 8, 3, 8, 3, 0,
|
||||
16, 9, 16, 16, 15, 19, 15, 14, 17, 17, 4, 4, 0, 0, 0, 17,
|
||||
19, 17, 19, 15, 21, 18, 19, 16, 21, 13, 15, 21, 20, 28, 21, 18,
|
||||
22, 17, 21, 20, 18, 18, 20, 26, 22, 18, 18, 0, 8, 0, 9, 8,
|
||||
0, 14, 11, 12, 16, 11, 13, 13, 15, 10, 14, 15, 11, 21, 17, 10,
|
||||
20, 15, 12, 12, 16, 17, 13, 16, 13, 21, 11, 0, 0, 0, 0, 0,
|
||||
20, 19, 19, 22, 27, 15, 18, 18, 20, 26, 21, 23, 17, 22, 21, 17,
|
||||
26, 25, 26, 17, 20, 26, 17, 16, 11, 12, 13, 21, 11, 17, 17, 12,
|
||||
21, 17, 17, 15, 24, 16, 10, 20, 23, 16, 7, 9, 16, 23, 12, 11,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
|
||||
19, 16
|
||||
},
|
||||
{
|
||||
11, 5, 10, 15, 19, 22, 20, 5, 9, 8, 11, 12, 5, 12, 6, 12,
|
||||
19, 5, 18, 19, 20, 18, 19, 18, 20, 19, 5, 6, 26, 12, 30, 19,
|
||||
23, 21, 20, 20, 20, 16, 16, 21, 19, 5, 13, 19, 16, 24, 20, 21,
|
||||
20, 21, 20, 19, 17, 20, 21, 30, 22, 21, 20, 25, 13, 30, 5, 9,
|
||||
10, 15, 15, 14, 15, 16, 10, 15, 15, 5, 5, 15, 5, 23, 15, 16,
|
||||
15, 15, 9, 16, 10, 15, 17, 24, 18, 15, 15, 27, 5, 19, 2, 2,
|
||||
20, 20, 16, 23, 30, 19, 20, 20, 21, 24, 19, 19, 20, 23, 22, 19,
|
||||
27, 29, 25, 20, 20, 28, 24, 16, 16, 14, 19, 25, 16, 16, 16, 17,
|
||||
19, 16, 16, 17, 25, 19, 15, 23, 26, 21, 16, 14, 22, 20, 16, 19,
|
||||
15, 14, 15, 16, 17, 15, 15, 15, 15, 15, 7, 15, 15, 15, 15, 15,
|
||||
13, 15, 15, 7, 15, 16, 13, 23, 15, 15, 15, 15, 15, 15, 17, 15,
|
||||
16, 24, 17, 17, 17, 15, 15, 13, 20, 23, 15, 17, 17, 16, 24, 15,
|
||||
15, 15, 23, 18, 15, 23, 26, 23, 16, 15, 23, 15, 15, 19, 2, 2,
|
||||
10, 20
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
13, 12, 31, 35, 23, 35, 31, 9, 14, 15, 25, 30, 11, 17, 13, 31,
|
||||
23, 16, 22, 21, 24, 23, 23, 20, 23, 22, 10, 35, 26, 26, 26, 26,
|
||||
30, 26, 24, 23, 24, 22, 21, 24, 26, 10, 20, 26, 22, 29, 26, 25,
|
||||
23, 25, 24, 24, 22, 25, 24, 29, 29, 23, 25, 37, 22, 37, 35, 37,
|
||||
35, 21, 22, 21, 21, 22, 13, 22, 21, 10, 16, 22, 11, 32, 21, 21,
|
||||
23, 22, 16, 20, 14, 21, 20, 30, 25, 21, 21, 33, 33, 33, 33, 35,
|
||||
27, 27, 27, 27, 32, 24, 23, 23, 23, 23, 11, 11, 11, 11, 26, 26,
|
||||
26, 26, 26, 26, 26, 25, 26, 21, 21, 21, 21, 32, 23, 22, 22, 22,
|
||||
22, 11, 11, 11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 26, 21, 24,
|
||||
12, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
||||
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 18, 26, 26,
|
||||
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
||||
20
|
||||
//FONT2 EFIGS
|
||||
//SPC,!, $, %, &, ', [, ], +, , -, .,
|
||||
12, 9, 22, 17, 19, 19, 25, 4, 33, 33, 25, 35, 11, 10, 6, 33,
|
||||
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ??,
|
||||
18, 10, 17, 17, 17, 17, 17, 15, 12, 16, 5, 30, 30, 30, 30, 30,
|
||||
// A, B, C, D, E, F, G, H, I, J, K, L, M, N, O,
|
||||
12, 16, 19, 16, 19, 18, 18, 17, 22, 11, 17, 18, 18, 30, 22, 19,
|
||||
//P, Q, R, S, T, U, V, W, X, Y, Z, ??, ??, ??, ¡, \,
|
||||
22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 10, 19,
|
||||
//??,a, b, c, d, e, f, g, h, i, j, k, l, m, n, o,
|
||||
12, 14, 11, 11, 16, 11, 12, 14, 14, 10, 13, 12, 10, 19, 18, 12,
|
||||
//p, q, r, s, t, u, v, w, x, y, z, ??, ??, ??, ??, ??,
|
||||
16, 13, 13, 11, 12, 15, 12, 15, 13, 12, 12, 37, 33, 37, 35, 37,
|
||||
//À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó,
|
||||
16, 16, 16, 16, 33, 17, 18, 18, 18, 18, 11, 11, 11, 11, 19, 19,
|
||||
//Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê,
|
||||
19, 19, 19, 19, 19, 19, 15, 14, 14, 14, 14, 20, 14, 11, 11, 11,
|
||||
//ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿,
|
||||
11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 22, 18, 21,
|
||||
//i,BLANKS
|
||||
10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
//space, unprop
|
||||
19, 16
|
||||
},
|
||||
|
||||
{
|
||||
13, 9, 21, 35, 23, 35, 35, 11, 35, 35, 25, 35, 11, 17, 13, 33,
|
||||
28, 14, 22, 21, 24, 23, 23, 21, 23, 22, 10, 35, 13, 35, 13, 33,
|
||||
5, 25, 22, 23, 24, 21, 21, 24, 24, 9, 20, 24, 21, 27, 25, 25,
|
||||
22, 25, 23, 20, 23, 23, 23, 31, 23, 23, 23, 37, 33, 37, 35, 37,
|
||||
35, 21, 19, 19, 21, 19, 17, 21, 21, 8, 17, 18, 14, 24, 21, 21,
|
||||
20, 22, 19, 20, 20, 19, 20, 26, 21, 20, 21, 33, 33, 33, 33, 35,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
16
|
||||
},
|
||||
|
||||
{
|
||||
15, 14, 16, 25, 19, 26, 22, 11, 18, 18, 27, 26, 13, 19, 9, 27,
|
||||
19, 18, 19, 19, 22, 19, 20, 18, 19, 20, 12, 32, 15, 32, 15, 35,
|
||||
15, 19, 19, 19, 19, 19, 16, 19, 20, 9, 19, 20, 14, 29, 19, 20,
|
||||
19, 19, 19, 19, 21, 19, 20, 32, 20, 19, 19, 33, 31, 39, 37, 39,
|
||||
37, 21, 21, 21, 23, 21, 19, 23, 23, 10, 19, 20, 16, 26, 23, 23,
|
||||
20, 20, 20, 22, 21, 22, 22, 26, 22, 22, 23, 35, 35, 35, 35, 37,
|
||||
19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9, 9, 9, 9, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 30, 19, 19, 19, 19,
|
||||
19, 10, 10, 10, 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 23, 35,
|
||||
12, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 11, 19, 19,
|
||||
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
||||
19
|
||||
//FONT1 EFIGS
|
||||
//Characters with a '2' refer to the Pricedown font.
|
||||
//Characters that are referred as '*I' are characters that contain icons for PS2/XBOX, but contain regular characters on PC
|
||||
//in order to display them properly in the Keyboard controls menu.
|
||||
//!2,!, *I,(R), $, %, &, ', [, ], *I, +, , -, ., *I,
|
||||
15, 7, 31, 25, 20, 23, 21, 7, 11, 10, 26, 14, 6, 12, 6, 26,
|
||||
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, *I, *I, *I, *I, ?,
|
||||
20, 7, 20, 20, 21, 20, 20, 19, 21, 20, 8, 30, 24, 30, 24, 19,
|
||||
//TM,A, B, C, D, E, F, G, H, I, J, K, L, M, N, O,
|
||||
20, 22, 22, 21, 22, 18, 18, 22, 22, 9, 14, 21, 18, 27, 21, 24,
|
||||
//P, Q, R, S, T, U, V, W, X, Y, Z, *I, \, *I, ¡, °,
|
||||
22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 7, 19,
|
||||
//(C),a, b, c, d, e, f, g, h, i, j, k, l, m, n, o,
|
||||
10, 17, 17, 16, 17, 17, 11, 17, 17, 7, 7, 18, 7, 25, 17, 17,
|
||||
//p, q, r, s, t, u, v, w, x, y, z, *I, *I, $2, (2, )2,
|
||||
17, 17, 11, 17, 11, 17, 18, 25, 19, 18, 17, 28, 26, 20, 15, 15,
|
||||
//À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó,
|
||||
20, 20, 20, 20, 29, 22, 19, 19, 19, 19, 9, 9, 9, 9, 23, 23,
|
||||
//Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê,
|
||||
23, 23, 24, 24, 24, 24, 20, 19, 17, 17, 17, 30, 16, 17, 17, 17,
|
||||
//ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿,
|
||||
17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 21, 17, 19,
|
||||
//02,12,22, 32, 42, 52, 62, 72, 82, 92, :2, A2, B2, C2, D2, E2,
|
||||
20, 18, 19, 19, 21, 19, 19, 19, 19, 19, 16, 19, 19, 19, 20, 19,
|
||||
//F2,G2,H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2,
|
||||
16, 19, 19, 9, 19, 20, 14, 29, 19, 19, 19, 19, 19, 19, 21, 19,
|
||||
//V2,W2,X2, Y2, Z2, À2, Á2, Â2, Ä2, Æ2, Ç2, È2, É2, Ê2, Ë2, Ì2,
|
||||
20, 32, 20, 19, 19, 19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9,
|
||||
//Í2,Î2,Ï2, Ò2, Ó2, Ô2, Ö2, Ù2, Ú2, Û2, Ü2, ß2, Ñ2, ¿2, '2, .2,
|
||||
9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 10, 9,
|
||||
//space, unprop
|
||||
10, 20
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -417,9 +418,8 @@ CFont::ReloadFonts(uint8 set)
|
|||
if (Slot != -1 && LanguageSet != set) {
|
||||
Sprite[0].Delete();
|
||||
Sprite[1].Delete();
|
||||
Sprite[2].Delete();
|
||||
if (IsJapanese())
|
||||
Sprite[3].Delete();
|
||||
Sprite[2].Delete();
|
||||
CTxdStore::PushCurrentTxd();
|
||||
CTxdStore::RemoveTxd(Slot);
|
||||
switch (set)
|
||||
|
@ -441,12 +441,9 @@ CFont::ReloadFonts(uint8 set)
|
|||
CTxdStore::SetCurrentTxd(Slot);
|
||||
Sprite[0].SetTexture("font2", "font2_mask");
|
||||
if (set == FONT_LANGSET_JAPANESE) {
|
||||
Sprite[1].SetTexture("FONTJAP", "FONTJAP_mask");
|
||||
Sprite[3].SetTexture("FONTJAP", "FONTJAP_mask");
|
||||
Sprite[2].SetTexture("FONTJAP", "FONTJAP_mask");
|
||||
}
|
||||
else
|
||||
Sprite[1].SetTexture("pager", "pager_mask");
|
||||
Sprite[2].SetTexture("font1", "font1_mask");
|
||||
Sprite[1].SetTexture("font1", "font1_mask");
|
||||
CTxdStore::PopCurrentTxd();
|
||||
}
|
||||
LanguageSet = set;
|
||||
|
@ -579,7 +576,7 @@ CFont::PrintChar(float x, float y, wchar c)
|
|||
xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.009f,
|
||||
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.0021f + 0.01f);
|
||||
#ifdef MORE_LANGUAGES
|
||||
}else if (IsJapaneseFont()) {
|
||||
/*}else if (IsJapaneseFont()) {
|
||||
if (Details.dropShadowPosition != 0) {
|
||||
CSprite2d::AddSpriteToBank(Details.bank + Details.style, // BUG: game doesn't add bank
|
||||
CRect(x + SCREEN_SCALE_X(Details.dropShadowPosition),
|
||||
|
@ -600,7 +597,7 @@ CFont::PrintChar(float x, float y, wchar c)
|
|||
xoff * w / 1024.0f, yoff / 25.6f,
|
||||
xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, yoff / 25.6f,
|
||||
xoff * w / 1024.0f, (yoff + 1.0f) / 25.6f - 0.002f,
|
||||
xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f);
|
||||
xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f);*/
|
||||
#endif
|
||||
} else {
|
||||
if (bDontPrint) return;
|
||||
|
@ -722,7 +719,7 @@ CFont::RenderFontBuffer()
|
|||
FontRenderStatePointer.pRenderState = (CFontRenderState*)FontRenderStateBuf;
|
||||
}
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0 //def MORE_LANGUAGES
|
||||
bool
|
||||
CFont::PrintString(float x, float y, wchar *start, wchar *&end, float spwidth, float japX)
|
||||
{
|
||||
|
@ -899,7 +896,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s)
|
|||
float xleft = Details.centre ? xstart - x/2 :
|
||||
Details.rightJustify ? xstart - x :
|
||||
xstart;
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0//def MORE_LANGUAGES
|
||||
PrintString(xleft, y, start, s, spaceWidth, xstart);
|
||||
#else
|
||||
PrintString(xleft, y, Details.anonymous_25, start, s, spaceWidth);
|
||||
|
@ -937,7 +934,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s)
|
|||
#endif
|
||||
lineLength = x;
|
||||
s = t+1;
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0 //def MORE_LANGUAGES
|
||||
if (IsJapaneseFont() && !*s) {
|
||||
x += GetStringWidth(s);
|
||||
if (IsAnsiCharacter(s))
|
||||
|
@ -969,7 +966,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s)
|
|||
float xleft = Details.centre ? xstart - x/2 :
|
||||
Details.rightJustify ? xstart - x :
|
||||
xstart;
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0 //def MORE_LANGUAGES
|
||||
if (PrintString(xleft, y, start, s, 0.0f, xstart) && IsJapaneseFont()) {
|
||||
start = s;
|
||||
if (!Details.centre && !Details.rightJustify)
|
||||
|
@ -995,7 +992,7 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s)
|
|||
wchar *t;
|
||||
n = 0;
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0//def MORE_LANGUAGES
|
||||
bool bSomeJapBool = false;
|
||||
|
||||
if (IsJapanese()) {
|
||||
|
@ -1198,37 +1195,33 @@ CFont::GetCharacterWidth(wchar c)
|
|||
{
|
||||
#ifdef MORE_LANGUAGES
|
||||
if (IsJapanese()) {
|
||||
if (!Details.proportional)
|
||||
if (!RenderState.proportional)
|
||||
return Size[0][Details.style][192];
|
||||
if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_BANK) {
|
||||
switch (Details.style)
|
||||
if (c <= 94 || Details.style == FONT_HEADING || RenderState.style == FONT_BANK) {
|
||||
switch (RenderState.style)
|
||||
{
|
||||
case FONT_JAPANESE:
|
||||
return Size_jp[c];
|
||||
default:
|
||||
return Size[0][Details.style][c];
|
||||
return Size[0][RenderState.style][c];
|
||||
}
|
||||
}
|
||||
if (c < 254 && Details.style == FONT_PAGER)
|
||||
return 29.4f;
|
||||
|
||||
switch (Details.style)
|
||||
switch (RenderState.style)
|
||||
{
|
||||
case FONT_JAPANESE:
|
||||
return 29.4f;
|
||||
case FONT_BANK:
|
||||
return 10.0f;
|
||||
case FONT_PAGER:
|
||||
return 31.5f;
|
||||
default:
|
||||
return Size[0][Details.style][c];
|
||||
return Size[0][RenderState.style][c];
|
||||
}
|
||||
}
|
||||
|
||||
else if (Details.proportional)
|
||||
return Size[LanguageSet][Details.style][c];
|
||||
else if (RenderState.proportional)
|
||||
return Size[LanguageSet][RenderState.style][c];
|
||||
else
|
||||
return Size[LanguageSet][Details.style][192];
|
||||
return Size[LanguageSet][RenderState.style][209];
|
||||
#else
|
||||
|
||||
if (RenderState.proportional)
|
||||
|
@ -1256,8 +1249,6 @@ CFont::GetCharacterSize(wchar c)
|
|||
return Size[0][Details.style][c] * Details.scaleX;
|
||||
}
|
||||
}
|
||||
if (c < 254 && (Details.style == FONT_PAGER))
|
||||
return 29.4f * Details.scaleX;
|
||||
|
||||
switch (Details.style)
|
||||
{
|
||||
|
@ -1265,16 +1256,20 @@ CFont::GetCharacterSize(wchar c)
|
|||
return 29.4f * Details.scaleX;
|
||||
case FONT_BANK:
|
||||
return 10.0f * Details.scaleX;
|
||||
case FONT_PAGER:
|
||||
return 31.5f * Details.scaleX;
|
||||
default:
|
||||
return Size[0][Details.style][c] * Details.scaleX;
|
||||
}
|
||||
}
|
||||
else if(Details.proportional)
|
||||
return Size[LanguageSet][Details.style][c] * Details.scaleX;
|
||||
else
|
||||
return Size[LanguageSet][Details.style][209] * Details.scaleX;
|
||||
{
|
||||
if (!Details.bFontHalfTexture && c == 30) c = 61; // wanted star
|
||||
if (Details.bFontHalfTexture)
|
||||
c = FindNewCharacter(c);
|
||||
if (Details.proportional)
|
||||
return Size[LanguageSet][Details.style][c] * Details.scaleX;
|
||||
else
|
||||
return Size[LanguageSet][Details.style][209] * Details.scaleX;
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
|
@ -1546,7 +1541,7 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold)
|
|||
return s;
|
||||
}
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
#if 0//def MORE_LANGUAGES
|
||||
wchar*
|
||||
CFont::ParseToken(wchar *s, bool japShit)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ enum
|
|||
class CFont
|
||||
{
|
||||
#ifdef MORE_LANGUAGES
|
||||
static int16 Size[LANGSET_MAX][MAX_FONTS][193];
|
||||
static int16 Size[LANGSET_MAX][MAX_FONTS][210];
|
||||
static uint8 LanguageSet;
|
||||
static int32 Slot;
|
||||
#else
|
||||
|
@ -156,11 +156,11 @@ public:
|
|||
#endif
|
||||
static int GetNumberLines(float xstart, float ystart, wchar *s);
|
||||
static void GetTextRect(CRect *rect, float xstart, float ystart, wchar *s);
|
||||
#ifdef MORE_LANGUAGES
|
||||
static bool PrintString(float x, float y, wchar *start, wchar* &end, float spwidth, float japX);
|
||||
#else
|
||||
//#ifdef MORE_LANGUAGES
|
||||
// static bool PrintString(float x, float y, wchar *start, wchar* &end, float spwidth, float japX);
|
||||
//#else
|
||||
static void PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth);
|
||||
#endif
|
||||
//#endif
|
||||
static void PrintStringFromBottom(float x, float y, wchar *str);
|
||||
static float GetCharacterWidth(wchar c);
|
||||
static float GetCharacterSize(wchar c);
|
||||
|
@ -169,12 +169,12 @@ public:
|
|||
static float GetStringWidth_Jap(wchar* s);
|
||||
#endif
|
||||
static uint16 *GetNextSpace(wchar *s);
|
||||
#ifdef MORE_LANGUAGES
|
||||
static uint16 *ParseToken(wchar *s, bool japShit = false);
|
||||
#else
|
||||
//#ifdef MORE_LANGUAGES
|
||||
// static uint16 *ParseToken(wchar *s, bool japShit = false);
|
||||
//#else
|
||||
static uint16 *ParseToken(wchar *s);
|
||||
static uint16 *ParseToken(wchar *s, CRGBA &color, bool &flash, bool &bold);
|
||||
#endif
|
||||
//#endif
|
||||
static void DrawFonts(void);
|
||||
static void RenderFontBuffer(void);
|
||||
static uint16 character_code(uint8 c);
|
||||
|
@ -212,6 +212,6 @@ public:
|
|||
static bool IsAnsiCharacter(wchar* s);
|
||||
static bool IsJapanesePunctuation(wchar* str);
|
||||
static bool IsJapanese() { return LanguageSet == FONT_LANGSET_JAPANESE; }
|
||||
static bool IsJapaneseFont() { return IsJapanese() && (Details.style == FONT_JAPANESE || Details.style == FONT_PAGER); }
|
||||
static bool IsJapaneseFont() { return IsJapanese() && (Details.style == FONT_JAPANESE); }
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -258,13 +258,13 @@ CText::LoadMissionText(char *MissionTableName)
|
|||
sprintf(filename, "SPANISH.GXT");
|
||||
break;
|
||||
#ifdef MORE_LANGUAGES
|
||||
case LANGUAGE_POLISH:
|
||||
case CMenuManager::LANGUAGE_POLISH:
|
||||
sprintf(filename, "POLISH.GXT");
|
||||
break;
|
||||
case LANGUAGE_RUSSIAN:
|
||||
case CMenuManager::LANGUAGE_RUSSIAN:
|
||||
sprintf(filename, "RUSSIAN.GXT");
|
||||
break;
|
||||
case LANGUAGE_JAPANESE:
|
||||
case CMenuManager::LANGUAGE_JAPANESE:
|
||||
sprintf(filename, "JAPANESE.GXT");
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue