From c0c09f272034d61efa38709d0e3fd1ea79bfd98f Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 31 Mar 2020 08:38:22 +0300 Subject: Japanese --- src/core/Frontend.cpp | 29 +++++++++++++++++++---------- src/core/Frontend.h | 2 ++ src/core/MenuScreens.h | 1 + 3 files changed, 22 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 4fefe9a9..d4264a05 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -576,7 +576,7 @@ void CMenuManager::Draw() if (aScreens[m_nCurrScreen].m_ScreenName[0] != '\0') { CFont::SetRightJustifyOn(); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); #ifdef PS2_LIKE_MENU CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(1.3f)); @@ -590,7 +590,7 @@ void CMenuManager::Draw() nextYToUse += 24.0f + 10.0f; } - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetScale(MENU_X(0.9f * actionTextScaleX), MENU_Y(0.9f * actionTextScaleY)); CFont::SetRightJustifyOff(); // AG used SetAlignment(ALIGN_LEFT); CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); @@ -646,7 +646,7 @@ void CMenuManager::Draw() columnWidth = 320; headerHeight = 240; lineHeight = 24; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); CFont::SetCentreOn(); break; @@ -663,7 +663,7 @@ void CMenuManager::Draw() columnWidth = 50; headerHeight = 0; lineHeight = 20; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.55f), MENU_Y(actionTextScaleY = 0.8f)); CFont::SetRightJustifyOff(); break; @@ -673,7 +673,7 @@ void CMenuManager::Draw() columnWidth = 120; headerHeight = 38; lineHeight = 20; - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetScale(MENU_X(actionTextScaleX = 0.45f), MENU_Y(actionTextScaleY = 0.7f)); CFont::SetRightJustifyOff(); break; @@ -685,7 +685,7 @@ void CMenuManager::Draw() columnWidth = 320; headerHeight = 60; lineHeight = 24; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); CFont::SetCentreOn(); break; @@ -693,7 +693,7 @@ void CMenuManager::Draw() columnWidth = 320; headerHeight = 140; lineHeight = 24; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); CFont::SetCentreOn(); break; @@ -701,7 +701,7 @@ void CMenuManager::Draw() columnWidth = 320; headerHeight = 117; lineHeight = 24; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); CFont::SetCentreOn(); break; @@ -710,7 +710,7 @@ void CMenuManager::Draw() columnWidth = 180; headerHeight = 60; lineHeight = 24; - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); break; #endif @@ -718,7 +718,7 @@ void CMenuManager::Draw() columnWidth = 320; headerHeight = 40; lineHeight = 24; - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(actionTextScaleX = 0.75f), MENU_Y(actionTextScaleY = 0.9f)); CFont::SetCentreOn(); break; @@ -1736,6 +1736,9 @@ void CMenuManager::InitialiseChangedLanguageSettings() case LANGUAGE_RUSSIAN: CFont::ReloadFonts(FONT_LANGSET_RUSSIAN); break; + case LANGUAGE_JAPANESE: + CFont::ReloadFonts(FONT_LANGSET_JAPANESE); + break; default: CFont::ReloadFonts(FONT_LANGSET_EFIGS); break; @@ -2962,6 +2965,12 @@ CMenuManager::ProcessButtonPresses(void) CMenuManager::InitialiseChangedLanguageSettings(); SaveSettings(); break; + case MENUACTION_LANG_JAP: + m_PrefsLanguage = LANGUAGE_JAPANESE; + 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 30e4f652..04c24aff 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -53,6 +53,7 @@ enum eLanguages LANGUAGE_SPANISH, #ifdef MORE_LANGUAGES LANGUAGE_RUSSIAN, + LANGUAGE_JAPANESE, #endif }; @@ -306,6 +307,7 @@ enum eMenuAction MENUACTION_UNK110, #ifdef MORE_LANGUAGES MENUACTION_LANG_RUS, + MENUACTION_LANG_JAP, #endif }; diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.h index ace6a719..45c5e5d6 100644 --- a/src/core/MenuScreens.h +++ b/src/core/MenuScreens.h @@ -67,6 +67,7 @@ const CMenuScreen aScreens[] = { MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE, #ifdef MORE_LANGUAGES MENUACTION_LANG_RUS, "FEL_RUS", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_LANG_JAP, "FEL_JAP", SAVESLOT_NONE, MENUPAGE_NONE, #endif MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, }, -- cgit v1.2.3 From 3e460d94acd6e08301b0be2d4de58fe8f65aff57 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 16 Apr 2020 00:24:49 +0300 Subject: More japanese --- src/core/Frontend.cpp | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src/core') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 75effc8a..5d5d0af7 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -578,7 +578,7 @@ CMenuManager::DisplayHelperText() CFont::SetCentreOn(); CFont::SetScale(SCREEN_SCALE_X(SMALLESTTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); // TODO: name this cases? switch (m_nHelperTextMsgId) { @@ -846,7 +846,7 @@ CMenuManager::Draw() } #ifdef PS2_LIKE_MENU - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); #endif switch (m_nCurrScreen) { @@ -1614,7 +1614,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 } CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); if (m_bKeyChangeNotProcessed) { CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_CIG")); // BACKSPACE TO CLEAR - LMB,RETURN TO CHANGE @@ -1624,7 +1624,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(0); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); if (!m_bKeyIsOK) DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); @@ -1632,24 +1632,24 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 } else { CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_CIG")); // BACKSPACE TO CLEAR - LMB,RETURN TO CHANGE CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); m_bKeyIsOK = false; m_bKeyChangeNotProcessed = false; } } else if (optionIdx == m_nSelectedListRow) { CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetColor(CRGBA(55, 55, 55, FadeIn(255))); CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_EIG")); // CANNOT SET A CONTROL FOR THIS ACTION CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); } } } @@ -1739,7 +1739,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); CFont::SetRightJustifyOn(); CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); switch (m_ControlMethod) { case CONTROL_STANDARD: CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), @@ -1807,7 +1807,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); // List header - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT)); CFont::SetRightJustifyOff(); CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_1_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CAC")); @@ -1815,7 +1815,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CCR")); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X_LEFT_ALIGNED(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); int yStart; if (m_ControlMethod == CONTROL_CLASSIC) yStart = CONTSETUP_LIST_HEADER_HEIGHT + 29; @@ -1904,7 +1904,7 @@ CMenuManager::DrawControllerSetupScreen() } // Back button and it's shadow - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y)); CFont::SetRightJustifyOn(); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90))); @@ -2162,7 +2162,7 @@ CMenuManager::DrawFrontEndNormal() if (CheckHover(xStart, xStart + optionWidth, optionTop, optionBottom)) hoveredBottomBarOption = i; - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetScale(MENU_X(0.35f), MENU_Y(0.7f)); CFont::SetRightJustifyOff(); if (hoveredBottomBarOption == i && hoveredBottomBarOption != curBottomBarOption) @@ -2420,7 +2420,7 @@ CMenuManager::DrawPlayerSetupScreen() CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); CFont::SetRightJustifyOn(); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS")); // lstrcpy's changed with strcpy @@ -2515,7 +2515,7 @@ CMenuManager::DrawPlayerSetupScreen() } else { CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); } - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT)); CFont::SetRightJustifyOn(); CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_DATE_COLUMN_RIGHT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_DAT")); @@ -2534,7 +2534,7 @@ CMenuManager::DrawPlayerSetupScreen() // Skin list CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(PLAYERSETUP_ROW_TEXT_X_SCALE), MENU_Y(PLAYERSETUP_ROW_TEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); if (m_nSkinsTotal > 0) { for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin->skinId != m_nFirstVisibleRowOnList; m_pSelectedSkin = m_pSelectedSkin->nextSkin); @@ -2688,7 +2688,7 @@ CMenuManager::DrawPlayerSetupScreen() // Big apply button if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) { - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); switch (m_PrefsLanguage) { case LANGUAGE_FRENCH: CFont::SetScale(MENU_X(1.1f), MENU_Y(1.9f)); @@ -2708,7 +2708,7 @@ CMenuManager::DrawPlayerSetupScreen() CFont::SetRightJustifyOff(); CFont::PrintString(MENU_X_LEFT_ALIGNED(20.0f), MENU_Y(220.0f), TheText.Get("FET_APL")); } - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE)); @@ -2786,7 +2786,7 @@ CMenuManager::DrawPlayerSetupScreen() m_nHoverOption = HOVEROPTION_NOT_HOVERING; } } - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE)); CFont::SetRightJustifyOn(); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90))); @@ -3146,7 +3146,7 @@ CMenuManager::MessageScreen(const char *text) CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f)); CFont::SetRightJustifyWrap(SCREEN_SCALE_FROM_RIGHT(170.0f)); CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_SCALE_FROM_BOTTOM(220.0f)), CRGBA(50, 50, 50, 210)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetCentreSize(SCREEN_SCALE_X(380.0f)); CFont::SetCentreOn(); CFont::SetColor(CRGBA(255, 217, 106, 255)); @@ -3176,7 +3176,7 @@ void CMenuManager::PrintBriefs() { CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why @@ -3231,7 +3231,7 @@ CMenuManager::PrintErrorMessage() return; CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(140.0f), SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f)), CRGBA(64, 16, 16, 224)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetBackgroundOff(); CFont::SetPropOn(); CFont::SetCentreOff(); @@ -3319,7 +3319,7 @@ CMenuManager::PrintStats() /* CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); CFont::SetRightJustifyOn(); - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONTJAP(FONT_HEADING)); CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); CFont::PrintString(MENU_X_RIGHT_ALIGNED(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); */ @@ -5034,7 +5034,7 @@ CMenuManager::PrintController(void) m_aFrontEndSprites[FE_ARROWS4].Draw(MENU_X_LEFT_ALIGNED(160.0f), MENU_Y(160.0f), MENU_X(235.2f), MENU_Y(175.2f), CRGBA(255, 255, 255, 255)); } - CFont::SetFontStyle(FONT_BANK); // X + CFont::SetFontStyle(FONTJAP(FONT_BANK)); // X // CFont::SetScale(0.4f, 0.4f); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); // X @@ -5410,7 +5410,7 @@ CMenuManager::PrintMap(void) CRGBA(235, 170, 50, 255)); CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONTJAP(FONT_BANK)); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); float nextX = MENU_X(30.0f), nextY = 95.0f; -- cgit v1.2.3 From fe353a7cc9831a09026842106bd3ff0fdb3242b4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 26 Apr 2020 23:49:24 +0300 Subject: Fixes --- src/core/Frontend.cpp | 90 ++++++++++++++++++++++++++++----------------------- src/core/Game.cpp | 2 +- src/core/Game.h | 2 +- 3 files changed, 51 insertions(+), 43 deletions(-) (limited to 'src/core') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index f3823f1d..e9125b23 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -110,7 +110,7 @@ int8 CMenuManager::m_bFrontEnd_ReloadObrTxtGxt; int32 CMenuManager::m_PrefsMusicVolume = 102; int32 CMenuManager::m_PrefsSfxVolume = 102; -char CMenuManager::m_PrefsSkinFile[256] = "$$\"\""; +char CMenuManager::m_PrefsSkinFile[256] = DEFAULT_SKIN_NAME; int32 CMenuManager::m_KeyPressedCode = -1; @@ -286,7 +286,7 @@ ScaleAndCenterX(float x) CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); \ CFont::SetRightJustifyOn(); \ CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); \ - CFont::SetFontStyle(FONT_HEADING); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); #define ProcessSlider(value, increaseAction, decreaseAction, hoverStartX, hoverEndX) \ do { \ @@ -596,7 +596,7 @@ CMenuManager::DisplayHelperText() CFont::SetCentreOn(); CFont::SetScale(SCREEN_SCALE_X(SMALLESTTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); // TODO: name this cases? switch (m_nHelperTextMsgId) { @@ -732,7 +732,7 @@ CMenuManager::Draw() nextYToUse += 24.0f + 10.0f; } - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_X), MENU_Y(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_Y)); CFont::SetRightJustifyOff(); CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); @@ -788,7 +788,7 @@ CMenuManager::Draw() columnWidth = 320; headerHeight = 240; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); CFont::SetCentreOn(); break; @@ -805,7 +805,7 @@ CMenuManager::Draw() columnWidth = 50; headerHeight = 0; lineHeight = 20; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = MEDIUMTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = MEDIUMTEXT_Y_SCALE)); CFont::SetRightJustifyOff(); break; @@ -815,7 +815,7 @@ CMenuManager::Draw() columnWidth = 120; headerHeight = 38; lineHeight = 20; - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = SMALLTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = SMALLTEXT_Y_SCALE)); CFont::SetRightJustifyOff(); break; @@ -827,7 +827,7 @@ CMenuManager::Draw() columnWidth = 320; headerHeight = 60; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); CFont::SetCentreOn(); break; @@ -835,7 +835,7 @@ CMenuManager::Draw() columnWidth = 320; headerHeight = 140; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); CFont::SetCentreOn(); break; @@ -843,7 +843,7 @@ CMenuManager::Draw() columnWidth = 320; headerHeight = 117; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); CFont::SetCentreOn(); break; @@ -852,7 +852,7 @@ CMenuManager::Draw() columnWidth = 180; headerHeight = 60; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); break; #endif @@ -860,14 +860,14 @@ CMenuManager::Draw() columnWidth = 320; headerHeight = 40; lineHeight = 24; - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); CFont::SetCentreOn(); break; } #ifdef PS2_LIKE_MENU - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); #endif switch (m_nCurrScreen) { @@ -1580,7 +1580,12 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 nextX += CFont::GetStringWidth(seperator, true) + bindingMargin; } CFont::PrintString(nextX, nextY, settingText); - nextX += CFont::GetStringWidth(settingText, true) + bindingMargin; +#ifdef MORE_LANGUAGES + if (CFont::IsJapanese()) + nextX += CFont::GetStringWidth_Jap(settingText) + bindingMargin; + else +#endif + nextX += CFont::GetStringWidth(settingText, true) + bindingMargin; } } if (controllerAction == -1) { @@ -1629,7 +1634,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 } CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); if (m_bKeyChangeNotProcessed) { CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_CIG")); // BACKSPACE TO CLEAR - LMB,RETURN TO CHANGE @@ -1639,7 +1644,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); if (!m_bKeyIsOK) DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); @@ -1647,24 +1652,24 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 } else { CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_CIG")); // BACKSPACE TO CLEAR - LMB,RETURN TO CHANGE CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); m_bKeyIsOK = false; m_bKeyChangeNotProcessed = false; } } else if (optionIdx == m_nSelectedListRow) { CFont::SetCentreOn(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetColor(CRGBA(55, 55, 55, FadeIn(255))); CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_EIG")); // CANNOT SET A CONTROL FOR THIS ACTION CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); } } } @@ -1819,7 +1824,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); // List header - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT)); CFont::SetRightJustifyOff(); CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_1_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CAC")); @@ -1827,7 +1832,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CCR")); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X_LEFT_ALIGNED(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); int yStart; if (m_ControlMethod == CONTROL_CLASSIC) yStart = CONTSETUP_LIST_HEADER_HEIGHT + 29; @@ -1916,7 +1921,7 @@ CMenuManager::DrawControllerSetupScreen() } // Back button and it's shadow - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y)); CFont::SetRightJustifyOn(); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90))); @@ -2174,7 +2179,7 @@ CMenuManager::DrawFrontEndNormal() if (CheckHover(xStart, xStart + optionWidth, optionTop, optionBottom)) hoveredBottomBarOption = i; - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetScale(MENU_X(0.35f), MENU_Y(0.7f)); CFont::SetRightJustifyOff(); if (hoveredBottomBarOption == i && hoveredBottomBarOption != curBottomBarOption) @@ -2442,7 +2447,7 @@ CMenuManager::DrawPlayerSetupScreen() m_pSelectedSkin->nextSkin = new tSkinInfo; m_pSelectedSkin = m_pSelectedSkin->nextSkin; m_pSelectedSkin->skinId = 0; - strcpy(m_pSelectedSkin->skinNameOriginal, "$$\"\""); + strcpy(m_pSelectedSkin->skinNameOriginal, DEFAULT_SKIN_NAME); strcpy(m_pSelectedSkin->skinNameDisplayed, UnicodeToAscii(TheText.Get("FET_DSN"))); int nextSkinId = 1; m_pSelectedSkin->nextSkin = nil; @@ -2451,7 +2456,7 @@ CMenuManager::DrawPlayerSetupScreen() SYSTEMTIME SystemTime; HANDLE handle = FindFirstFile("skins\\*.bmp", &FindFileData); for (int i = 1; handle != INVALID_HANDLE_VALUE && i; i = FindNextFile(handle, &FindFileData)) { - if (strncmp(FindFileData.cFileName, "$$\"\"", 5) != 0) { + if (strncmp(FindFileData.cFileName, DEFAULT_SKIN_NAME, 5) != 0) { m_pSelectedSkin->nextSkin = new tSkinInfo; m_pSelectedSkin = m_pSelectedSkin->nextSkin; m_pSelectedSkin->skinId = nextSkinId; @@ -2525,7 +2530,7 @@ CMenuManager::DrawPlayerSetupScreen() } else { CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); } - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT)); CFont::SetRightJustifyOn(); CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_DATE_COLUMN_RIGHT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_DAT")); @@ -2544,7 +2549,7 @@ CMenuManager::DrawPlayerSetupScreen() // Skin list CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(PLAYERSETUP_ROW_TEXT_X_SCALE), MENU_Y(PLAYERSETUP_ROW_TEXT_Y_SCALE)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); if (m_nSkinsTotal > 0) { for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin->skinId != m_nFirstVisibleRowOnList; m_pSelectedSkin = m_pSelectedSkin->nextSkin); @@ -2698,7 +2703,7 @@ CMenuManager::DrawPlayerSetupScreen() // Big apply button if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) { - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); switch (m_PrefsLanguage) { case LANGUAGE_FRENCH: CFont::SetScale(MENU_X(1.1f), MENU_Y(1.9f)); @@ -2718,7 +2723,7 @@ CMenuManager::DrawPlayerSetupScreen() CFont::SetRightJustifyOff(); CFont::PrintString(MENU_X_LEFT_ALIGNED(20.0f), MENU_Y(220.0f), TheText.Get("FET_APL")); } - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE)); @@ -2796,7 +2801,7 @@ CMenuManager::DrawPlayerSetupScreen() m_nHoverOption = HOVEROPTION_NOT_HOVERING; } } - CFont::SetFontStyle(FONTJAP(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE)); CFont::SetRightJustifyOn(); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90))); @@ -2898,6 +2903,8 @@ CMenuManager::InitialiseChangedLanguageSettings() CGame::frenchGame = false; CGame::germanGame = false; #ifdef MORE_LANGUAGES + CGame::russianGame = false; + CGame::japaneseGame = false; switch (m_PrefsLanguage) { case LANGUAGE_POLISH: CFont::ReloadFonts(FONT_LANGSET_POLISH); @@ -2922,16 +2929,17 @@ CMenuManager::InitialiseChangedLanguageSettings() CGame::germanGame = true; break; #ifdef MORE_LANGUAGES - case LANGUAGE_POLISH: - CGame::polishGame = true; - break; case LANGUAGE_RUSSIAN: CGame::russianGame = true; break; + case LANGUAGE_JAPANESE: + CGame::japaneseGame = true; + break; #endif default: break; } + PcSaveHelper.PopulateSlotInfo(); } } @@ -3087,8 +3095,8 @@ CMenuManager::LoadSettings() if (!SkinFound) { OutputDebugString("Default skin set as no other skins are available OR saved skin not found!"); - strcpy(m_PrefsSkinFile, "$$\"\""); - strcpy(m_aSkinName, "$$\"\""); + strcpy(m_PrefsSkinFile, DEFAULT_SKIN_NAME); + strcpy(m_aSkinName, DEFAULT_SKIN_NAME); } } @@ -3162,7 +3170,7 @@ CMenuManager::MessageScreen(const char *text) CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f)); CFont::SetRightJustifyWrap(SCREEN_SCALE_FROM_RIGHT(170.0f)); CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_SCALE_FROM_BOTTOM(220.0f)), CRGBA(50, 50, 50, 210)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetCentreSize(SCREEN_SCALE_X(380.0f)); CFont::SetCentreOn(); CFont::SetColor(CRGBA(255, 217, 106, 255)); @@ -3192,7 +3200,7 @@ void CMenuManager::PrintBriefs() { CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why @@ -3247,7 +3255,7 @@ CMenuManager::PrintErrorMessage() return; CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(140.0f), SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f)), CRGBA(64, 16, 16, 224)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetBackgroundOff(); CFont::SetPropOn(); CFont::SetCentreOff(); @@ -5063,7 +5071,7 @@ CMenuManager::PrintController(void) m_aFrontEndSprites[FE_ARROWS4].Draw(MENU_X_LEFT_ALIGNED(160.0f), MENU_Y(160.0f), MENU_X(235.2f), MENU_Y(175.2f), CRGBA(255, 255, 255, 255)); } - CFont::SetFontStyle(FONTJAP(FONT_BANK)); // X + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); // X // CFont::SetScale(0.4f, 0.4f); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); // X @@ -5440,7 +5448,7 @@ CMenuManager::PrintMap(void) CRGBA(235, 170, 50, 255)); CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f)); - CFont::SetFontStyle(FONTJAP(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); float nextX = MENU_X(30.0f), nextY = 95.0f; diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 8633d222..3053c761 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -97,8 +97,8 @@ bool CGame::noProstitutes; bool CGame::playingIntro; char CGame::aDatFile[32]; #ifdef MORE_LANGUAGES -bool CGame::polishGame = false; bool CGame::russianGame = false; +bool CGame::japaneseGame = false; #endif int gameTxdSlot; diff --git a/src/core/Game.h b/src/core/Game.h index 01f5f0e9..48f31abc 100644 --- a/src/core/Game.h +++ b/src/core/Game.h @@ -17,8 +17,8 @@ public: static bool frenchGame; static bool germanGame; #ifdef MORE_LANGUAGES - static bool polishGame; static bool russianGame; + static bool japaneseGame; #endif static bool noProstitutes; static bool playingIntro; -- cgit v1.2.3