mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-22 07:41:52 +01:00
Fixes
This commit is contained in:
parent
f0890b1112
commit
fe353a7cc9
@ -1390,7 +1390,7 @@ void CGarages::PrintMessages()
|
|||||||
CFont::SetBackgroundOff();
|
CFont::SetBackgroundOff();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
|
|
||||||
#if defined(PS2) || defined (FIX_BUGS)
|
#if defined(PS2) || defined (FIX_BUGS)
|
||||||
|
@ -110,7 +110,7 @@ int8 CMenuManager::m_bFrontEnd_ReloadObrTxtGxt;
|
|||||||
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
||||||
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
||||||
|
|
||||||
char CMenuManager::m_PrefsSkinFile[256] = "$$\"\"";
|
char CMenuManager::m_PrefsSkinFile[256] = DEFAULT_SKIN_NAME;
|
||||||
|
|
||||||
int32 CMenuManager::m_KeyPressedCode = -1;
|
int32 CMenuManager::m_KeyPressedCode = -1;
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ ScaleAndCenterX(float x)
|
|||||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); \
|
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); \
|
||||||
CFont::SetRightJustifyOn(); \
|
CFont::SetRightJustifyOn(); \
|
||||||
CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); \
|
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) \
|
#define ProcessSlider(value, increaseAction, decreaseAction, hoverStartX, hoverEndX) \
|
||||||
do { \
|
do { \
|
||||||
@ -596,7 +596,7 @@ CMenuManager::DisplayHelperText()
|
|||||||
|
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetScale(SCREEN_SCALE_X(SMALLESTTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLESTTEXT_Y_SCALE));
|
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?
|
// TODO: name this cases?
|
||||||
switch (m_nHelperTextMsgId) {
|
switch (m_nHelperTextMsgId) {
|
||||||
@ -732,7 +732,7 @@ CMenuManager::Draw()
|
|||||||
nextYToUse += 24.0f + 10.0f;
|
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::SetScale(MENU_X(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_X), MENU_Y(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_Y));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
||||||
@ -788,7 +788,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 320;
|
columnWidth = 320;
|
||||||
headerHeight = 240;
|
headerHeight = 240;
|
||||||
lineHeight = 24;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
break;
|
break;
|
||||||
@ -805,7 +805,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 50;
|
columnWidth = 50;
|
||||||
headerHeight = 0;
|
headerHeight = 0;
|
||||||
lineHeight = 20;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = MEDIUMTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = MEDIUMTEXT_Y_SCALE));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
break;
|
break;
|
||||||
@ -815,7 +815,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 120;
|
columnWidth = 120;
|
||||||
headerHeight = 38;
|
headerHeight = 38;
|
||||||
lineHeight = 20;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = SMALLTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = SMALLTEXT_Y_SCALE));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
break;
|
break;
|
||||||
@ -827,7 +827,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 320;
|
columnWidth = 320;
|
||||||
headerHeight = 60;
|
headerHeight = 60;
|
||||||
lineHeight = 24;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
break;
|
break;
|
||||||
@ -835,7 +835,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 320;
|
columnWidth = 320;
|
||||||
headerHeight = 140;
|
headerHeight = 140;
|
||||||
lineHeight = 24;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
break;
|
break;
|
||||||
@ -843,7 +843,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 320;
|
columnWidth = 320;
|
||||||
headerHeight = 117;
|
headerHeight = 117;
|
||||||
lineHeight = 24;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
break;
|
break;
|
||||||
@ -852,7 +852,7 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 180;
|
columnWidth = 180;
|
||||||
headerHeight = 60;
|
headerHeight = 60;
|
||||||
lineHeight = 24;
|
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));
|
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -860,14 +860,14 @@ CMenuManager::Draw()
|
|||||||
columnWidth = 320;
|
columnWidth = 320;
|
||||||
headerHeight = 40;
|
headerHeight = 40;
|
||||||
lineHeight = 24;
|
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::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PS2_LIKE_MENU
|
#ifdef PS2_LIKE_MENU
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (m_nCurrScreen) {
|
switch (m_nCurrScreen) {
|
||||||
@ -1580,7 +1580,12 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
|
|||||||
nextX += CFont::GetStringWidth(seperator, true) + bindingMargin;
|
nextX += CFont::GetStringWidth(seperator, true) + bindingMargin;
|
||||||
}
|
}
|
||||||
CFont::PrintString(nextX, nextY, settingText);
|
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) {
|
if (controllerAction == -1) {
|
||||||
@ -1629,7 +1634,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
|
|||||||
}
|
}
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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::SetColor(CRGBA(255, 255, 255, FadeIn(255)));
|
||||||
if (m_bKeyChangeNotProcessed) {
|
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
|
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::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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)
|
if (!m_bKeyIsOK)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
|
||||||
|
|
||||||
@ -1647,24 +1652,24 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
|
|||||||
} else {
|
} else {
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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::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::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::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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_bKeyIsOK = false;
|
||||||
m_bKeyChangeNotProcessed = false;
|
m_bKeyChangeNotProcessed = false;
|
||||||
}
|
}
|
||||||
} else if (optionIdx == m_nSelectedListRow) {
|
} else if (optionIdx == m_nSelectedListRow) {
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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::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::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::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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)));
|
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
||||||
|
|
||||||
// List header
|
// 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::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_1_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CAC"));
|
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::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CCR"));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X_LEFT_ALIGNED(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
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;
|
int yStart;
|
||||||
if (m_ControlMethod == CONTROL_CLASSIC)
|
if (m_ControlMethod == CONTROL_CLASSIC)
|
||||||
yStart = CONTSETUP_LIST_HEADER_HEIGHT + 29;
|
yStart = CONTSETUP_LIST_HEADER_HEIGHT + 29;
|
||||||
@ -1916,7 +1921,7 @@ CMenuManager::DrawControllerSetupScreen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Back button and it's shadow
|
// 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::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
||||||
@ -2174,7 +2179,7 @@ CMenuManager::DrawFrontEndNormal()
|
|||||||
if (CheckHover(xStart, xStart + optionWidth, optionTop, optionBottom))
|
if (CheckHover(xStart, xStart + optionWidth, optionTop, optionBottom))
|
||||||
hoveredBottomBarOption = i;
|
hoveredBottomBarOption = i;
|
||||||
|
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
CFont::SetScale(MENU_X(0.35f), MENU_Y(0.7f));
|
CFont::SetScale(MENU_X(0.35f), MENU_Y(0.7f));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
if (hoveredBottomBarOption == i && hoveredBottomBarOption != curBottomBarOption)
|
if (hoveredBottomBarOption == i && hoveredBottomBarOption != curBottomBarOption)
|
||||||
@ -2442,7 +2447,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
m_pSelectedSkin->nextSkin = new tSkinInfo;
|
m_pSelectedSkin->nextSkin = new tSkinInfo;
|
||||||
m_pSelectedSkin = m_pSelectedSkin->nextSkin;
|
m_pSelectedSkin = m_pSelectedSkin->nextSkin;
|
||||||
m_pSelectedSkin->skinId = 0;
|
m_pSelectedSkin->skinId = 0;
|
||||||
strcpy(m_pSelectedSkin->skinNameOriginal, "$$\"\"");
|
strcpy(m_pSelectedSkin->skinNameOriginal, DEFAULT_SKIN_NAME);
|
||||||
strcpy(m_pSelectedSkin->skinNameDisplayed, UnicodeToAscii(TheText.Get("FET_DSN")));
|
strcpy(m_pSelectedSkin->skinNameDisplayed, UnicodeToAscii(TheText.Get("FET_DSN")));
|
||||||
int nextSkinId = 1;
|
int nextSkinId = 1;
|
||||||
m_pSelectedSkin->nextSkin = nil;
|
m_pSelectedSkin->nextSkin = nil;
|
||||||
@ -2451,7 +2456,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
SYSTEMTIME SystemTime;
|
SYSTEMTIME SystemTime;
|
||||||
HANDLE handle = FindFirstFile("skins\\*.bmp", &FindFileData);
|
HANDLE handle = FindFirstFile("skins\\*.bmp", &FindFileData);
|
||||||
for (int i = 1; handle != INVALID_HANDLE_VALUE && i; i = FindNextFile(handle, &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->nextSkin = new tSkinInfo;
|
||||||
m_pSelectedSkin = m_pSelectedSkin->nextSkin;
|
m_pSelectedSkin = m_pSelectedSkin->nextSkin;
|
||||||
m_pSelectedSkin->skinId = nextSkinId;
|
m_pSelectedSkin->skinId = nextSkinId;
|
||||||
@ -2525,7 +2530,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
} else {
|
} else {
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
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::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_DATE_COLUMN_RIGHT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_DAT"));
|
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
|
// Skin list
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X(PLAYERSETUP_ROW_TEXT_X_SCALE), MENU_Y(PLAYERSETUP_ROW_TEXT_Y_SCALE));
|
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) {
|
if (m_nSkinsTotal > 0) {
|
||||||
for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin->skinId != m_nFirstVisibleRowOnList;
|
for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin->skinId != m_nFirstVisibleRowOnList;
|
||||||
m_pSelectedSkin = m_pSelectedSkin->nextSkin);
|
m_pSelectedSkin = m_pSelectedSkin->nextSkin);
|
||||||
@ -2698,7 +2703,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
|
|
||||||
// Big apply button
|
// Big apply button
|
||||||
if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
|
if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
switch (m_PrefsLanguage) {
|
switch (m_PrefsLanguage) {
|
||||||
case LANGUAGE_FRENCH:
|
case LANGUAGE_FRENCH:
|
||||||
CFont::SetScale(MENU_X(1.1f), MENU_Y(1.9f));
|
CFont::SetScale(MENU_X(1.1f), MENU_Y(1.9f));
|
||||||
@ -2718,7 +2723,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(20.0f), MENU_Y(220.0f), TheText.Get("FET_APL"));
|
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));
|
CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE));
|
||||||
|
|
||||||
@ -2796,7 +2801,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
|||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
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::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
||||||
@ -2898,6 +2903,8 @@ CMenuManager::InitialiseChangedLanguageSettings()
|
|||||||
CGame::frenchGame = false;
|
CGame::frenchGame = false;
|
||||||
CGame::germanGame = false;
|
CGame::germanGame = false;
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
|
CGame::russianGame = false;
|
||||||
|
CGame::japaneseGame = false;
|
||||||
switch (m_PrefsLanguage) {
|
switch (m_PrefsLanguage) {
|
||||||
case LANGUAGE_POLISH:
|
case LANGUAGE_POLISH:
|
||||||
CFont::ReloadFonts(FONT_LANGSET_POLISH);
|
CFont::ReloadFonts(FONT_LANGSET_POLISH);
|
||||||
@ -2922,16 +2929,17 @@ CMenuManager::InitialiseChangedLanguageSettings()
|
|||||||
CGame::germanGame = true;
|
CGame::germanGame = true;
|
||||||
break;
|
break;
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
case LANGUAGE_POLISH:
|
|
||||||
CGame::polishGame = true;
|
|
||||||
break;
|
|
||||||
case LANGUAGE_RUSSIAN:
|
case LANGUAGE_RUSSIAN:
|
||||||
CGame::russianGame = true;
|
CGame::russianGame = true;
|
||||||
break;
|
break;
|
||||||
|
case LANGUAGE_JAPANESE:
|
||||||
|
CGame::japaneseGame = true;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
PcSaveHelper.PopulateSlotInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3087,8 +3095,8 @@ CMenuManager::LoadSettings()
|
|||||||
|
|
||||||
if (!SkinFound) {
|
if (!SkinFound) {
|
||||||
OutputDebugString("Default skin set as no other skins are available OR saved skin not found!");
|
OutputDebugString("Default skin set as no other skins are available OR saved skin not found!");
|
||||||
strcpy(m_PrefsSkinFile, "$$\"\"");
|
strcpy(m_PrefsSkinFile, DEFAULT_SKIN_NAME);
|
||||||
strcpy(m_aSkinName, "$$\"\"");
|
strcpy(m_aSkinName, DEFAULT_SKIN_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3162,7 +3170,7 @@ CMenuManager::MessageScreen(const char *text)
|
|||||||
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f));
|
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f));
|
||||||
CFont::SetRightJustifyWrap(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));
|
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::SetCentreSize(SCREEN_SCALE_X(380.0f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, 255));
|
CFont::SetColor(CRGBA(255, 217, 106, 255));
|
||||||
@ -3192,7 +3200,7 @@ void
|
|||||||
CMenuManager::PrintBriefs()
|
CMenuManager::PrintBriefs()
|
||||||
{
|
{
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
CFont::SetRightJustifyOff();
|
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
|
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;
|
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));
|
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::SetBackgroundOff();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreOff();
|
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));
|
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(0.4f, 0.4f);
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); // X
|
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));
|
CRGBA(235, 170, 50, 255));
|
||||||
|
|
||||||
CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f));
|
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)));
|
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255)));
|
||||||
|
|
||||||
float nextX = MENU_X(30.0f), nextY = 95.0f;
|
float nextX = MENU_X(30.0f), nextY = 95.0f;
|
||||||
|
@ -97,8 +97,8 @@ bool CGame::noProstitutes;
|
|||||||
bool CGame::playingIntro;
|
bool CGame::playingIntro;
|
||||||
char CGame::aDatFile[32];
|
char CGame::aDatFile[32];
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
bool CGame::polishGame = false;
|
|
||||||
bool CGame::russianGame = false;
|
bool CGame::russianGame = false;
|
||||||
|
bool CGame::japaneseGame = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int gameTxdSlot;
|
int gameTxdSlot;
|
||||||
|
@ -17,8 +17,8 @@ public:
|
|||||||
static bool frenchGame;
|
static bool frenchGame;
|
||||||
static bool germanGame;
|
static bool germanGame;
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
static bool polishGame;
|
|
||||||
static bool russianGame;
|
static bool russianGame;
|
||||||
|
static bool japaneseGame;
|
||||||
#endif
|
#endif
|
||||||
static bool noProstitutes;
|
static bool noProstitutes;
|
||||||
static bool playingIntro;
|
static bool playingIntro;
|
||||||
|
2599
src/render/Font.cpp
2599
src/render/Font.cpp
File diff suppressed because it is too large
Load Diff
@ -49,25 +49,23 @@ enum
|
|||||||
FONT_LANGSET_EFIGS,
|
FONT_LANGSET_EFIGS,
|
||||||
FONT_LANGSET_RUSSIAN,
|
FONT_LANGSET_RUSSIAN,
|
||||||
FONT_LANGSET_POLISH,
|
FONT_LANGSET_POLISH,
|
||||||
FONT_LANGSET_JAPANESE
|
FONT_LANGSET_JAPANESE,
|
||||||
LANGSET_MAX
|
LANGSET_MAX
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FONTJAP(style) (CFont::LanguageSet == FONT_LANGSET_JAPANESE ? FONT_JAPANESE : style)
|
#define FONT_LOCALE(style) (CFont::IsJapanese() ? FONT_JAPANESE : style)
|
||||||
|
#else
|
||||||
|
#define FONT_LOCALE(style) (style)
|
||||||
|
#endif
|
||||||
|
|
||||||
class CFont
|
class CFont
|
||||||
{
|
{
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
static int16 Size[LANGSET_MAX][MAX_FONTS][193];
|
static int16 Size[LANGSET_MAX][MAX_FONTS][193];
|
||||||
public:
|
|
||||||
static uint8 LanguageSet;
|
static uint8 LanguageSet;
|
||||||
private:
|
|
||||||
static int32 Slot;
|
static int32 Slot;
|
||||||
static CSprite2d Sprite[4];
|
|
||||||
#else
|
#else
|
||||||
static int16 Size[MAX_FONTS][193];
|
static int16 Size[MAX_FONTS][193];
|
||||||
static CSprite2d* Sprite; //[3]
|
|
||||||
#endif
|
#endif
|
||||||
static int16 NewLine;
|
static int16 NewLine;
|
||||||
static CSprite2d Sprite[MAX_FONTS];
|
static CSprite2d Sprite[MAX_FONTS];
|
||||||
@ -89,6 +87,9 @@ public:
|
|||||||
static float GetCharacterWidth(wchar c);
|
static float GetCharacterWidth(wchar c);
|
||||||
static float GetCharacterSize(wchar c);
|
static float GetCharacterSize(wchar c);
|
||||||
static float GetStringWidth(wchar *s, bool spaces = false);
|
static float GetStringWidth(wchar *s, bool spaces = false);
|
||||||
|
#ifdef MORE_LANGUAGES
|
||||||
|
static float GetStringWidth_Jap(wchar* s);
|
||||||
|
#endif
|
||||||
static uint16 *GetNextSpace(wchar *s);
|
static uint16 *GetNextSpace(wchar *s);
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
static uint16 *ParseToken(wchar *s, wchar*, bool japShit = false);
|
static uint16 *ParseToken(wchar *s, wchar*, bool japShit = false);
|
||||||
@ -158,16 +159,16 @@ public:
|
|||||||
static void SetRightJustifyWrap(float wrap) { Details.rightJustifyWrap = wrap; }
|
static void SetRightJustifyWrap(float wrap) { Details.rightJustifyWrap = wrap; }
|
||||||
static void SetAlphaFade(float fade) { Details.alphaFade = fade; }
|
static void SetAlphaFade(float fade) { Details.alphaFade = fade; }
|
||||||
static void SetDropShadowPosition(int16 pos) { Details.dropShadowPosition = pos; }
|
static void SetDropShadowPosition(int16 pos) { Details.dropShadowPosition = pos; }
|
||||||
static void SetBackgroundColor(const CRGBA &col);
|
static void SetBackgroundColor(CRGBA col);
|
||||||
static void SetColor(const CRGBA &col);
|
static void SetColor(CRGBA col);
|
||||||
static void SetDropColor(const CRGBA &col);
|
static void SetDropColor(CRGBA col);
|
||||||
|
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
static void ReloadFonts(uint8 set);
|
static void ReloadFonts(uint8 set);
|
||||||
|
|
||||||
// japanese stuff
|
// japanese stuff
|
||||||
static bool IsAnsiCharacter(wchar* s);
|
static bool IsAnsiCharacter(wchar* s);
|
||||||
static bool IsJapanesePunctuation(wchar* a1);
|
static bool IsJapanesePunctuation(wchar* str);
|
||||||
static bool IsJapanese() { return LanguageSet == FONT_LANGSET_JAPANESE; }
|
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 || Details.style == FONT_PAGER); }
|
||||||
#endif
|
#endif
|
||||||
|
@ -660,7 +660,7 @@ void CHud::Draw()
|
|||||||
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
|
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::SetRightJustifyWrap(0.0f);
|
CFont::SetRightJustifyWrap(0.0f);
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
CFont::SetBackGroundOnlyTextOn();
|
CFont::SetBackGroundOnlyTextOn();
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
@ -701,7 +701,7 @@ void CHud::Draw()
|
|||||||
CFont::SetCentreOff();
|
CFont::SetCentreOff();
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::SetRightJustifyWrap(0.0f);
|
CFont::SetRightJustifyWrap(0.0f);
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
CFont::SetColor(CRGBA(244, 20, 20, 255));
|
CFont::SetColor(CRGBA(244, 20, 20, 255));
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
|
CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
@ -852,7 +852,7 @@ void CHud::Draw()
|
|||||||
else
|
else
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
|
|
||||||
CFont::SetFontStyle(FONTJAP(CTheScripts::IntroTextLines[i].m_nFont));
|
CFont::SetFontStyle(FONT_LOCALE(CTheScripts::IntroTextLines[i].m_nFont));
|
||||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -892,7 +892,7 @@ void CHud::Draw()
|
|||||||
CFont::SetScale(SCREEN_SCALE_X(0.48f), SCREEN_SCALE_Y(1.120f));
|
CFont::SetScale(SCREEN_SCALE_X(0.48f), SCREEN_SCALE_Y(1.120f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
float offsetX = SCREEN_SCALE_X(40.0f) + SCREEN_SCALE_X(8.0f);
|
float offsetX = SCREEN_SCALE_X(40.0f) + SCREEN_SCALE_X(8.0f);
|
||||||
float center = SCREEN_SCALE_FROM_RIGHT(50.0f) - SCREEN_SCALE_X(8.0f) - offsetX;
|
float center = SCREEN_SCALE_FROM_RIGHT(50.0f) - SCREEN_SCALE_X(8.0f) - offsetX;
|
||||||
@ -1080,18 +1080,22 @@ void CHud::DrawAfterFade()
|
|||||||
|
|
||||||
if (CGame::germanGame)
|
if (CGame::germanGame)
|
||||||
CFont::SetScale(SCREEN_SCALE_X(0.52f * 0.85f), SCREEN_SCALE_Y(1.1f * 0.85f));
|
CFont::SetScale(SCREEN_SCALE_X(0.52f * 0.85f), SCREEN_SCALE_Y(1.1f * 0.85f));
|
||||||
else if (CFont::LanguageSet == FONT_LANGSET_JAPANESE)
|
#ifdef MORE_LANGUAGES
|
||||||
|
else if (CFont::IsJapanese())
|
||||||
CFont::SetScale(SCREEN_SCALE_X(0.52f) * 1.35f, SCREEN_SCALE_Y(1.1f) * 1.25f);
|
CFont::SetScale(SCREEN_SCALE_X(0.52f) * 1.35f, SCREEN_SCALE_Y(1.1f) * 1.25f);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f));
|
CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f));
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(175, 175, 175, 255));
|
CFont::SetColor(CRGBA(175, 175, 175, 255));
|
||||||
CFont::SetJustifyOff();
|
CFont::SetJustifyOff();
|
||||||
if (CFont::LanguageSet == FONT_LANGSET_JAPANESE)
|
#ifdef MORE_LANGUAGES
|
||||||
|
if (CFont::IsJapanese())
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(229.0f + 26.0f - 4.0f));
|
CFont::SetWrapx(SCREEN_SCALE_X(229.0f + 26.0f - 4.0f));
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f));
|
CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f));
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
CFont::SetBackgroundOn();
|
CFont::SetBackgroundOn();
|
||||||
CFont::SetBackGroundOnlyTextOff();
|
CFont::SetBackGroundOnlyTextOff();
|
||||||
CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
|
CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
|
||||||
@ -1169,7 +1173,7 @@ void CHud::DrawAfterFade()
|
|||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[3]);
|
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[3]);
|
||||||
@ -1186,7 +1190,7 @@ void CHud::DrawAfterFade()
|
|||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) - SCREEN_SCALE_Y(2.0f), m_BigMessage[4]);
|
CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) - SCREEN_SCALE_Y(2.0f), m_BigMessage[4]);
|
||||||
|
|
||||||
@ -1243,7 +1247,7 @@ void CHud::DrawAfterFade()
|
|||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::SetFontStyle(FONTJAP(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
#ifdef BETA_SLIDING_TEXT
|
#ifdef BETA_SLIDING_TEXT
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
|
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "crossplatform.h"
|
#include "crossplatform.h"
|
||||||
|
|
||||||
#include "FileMgr.h"
|
#include "FileMgr.h"
|
||||||
|
#ifdef MORE_LANGUAGES
|
||||||
|
#include "Game.h"
|
||||||
|
#endif
|
||||||
#include "GenericGameStorage.h"
|
#include "GenericGameStorage.h"
|
||||||
#include "Messages.h"
|
#include "Messages.h"
|
||||||
#include "PCSave.h"
|
#include "PCSave.h"
|
||||||
@ -131,7 +134,12 @@ C_PcSave::PopulateSlotInfo()
|
|||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
char date[70];
|
char date[70];
|
||||||
sprintf(date, "%02d %s %04d %02d:%02d:%02d", st.wDay, UnicodeToAsciiForSaveLoad(TheText.Get(month)), st.wYear, st.wHour, st.wMinute, st.wSecond);
|
#ifdef MORE_LANGUAGES
|
||||||
|
if (CGame::japaneseGame)
|
||||||
|
sprintf(date, "%02d %02d %04d %02d:%02d:%02d", st.wDay, st.wMonth, st.wYear, st.wHour, st.wMinute, st.wSecond);
|
||||||
|
else
|
||||||
|
#endif // MORE_LANGUAGES
|
||||||
|
sprintf(date, "%02d %s %04d %02d:%02d:%02d", st.wDay, UnicodeToAsciiForSaveLoad(TheText.Get(month)), st.wYear, st.wHour, st.wMinute, st.wSecond);
|
||||||
AsciiToUnicode(date, SlotSaveDate[i]);
|
AsciiToUnicode(date, SlotSaveDate[i]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,317 +1,319 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include "FileMgr.h"
|
#include "FileMgr.h"
|
||||||
#include "Frontend.h"
|
#ifdef MORE_LANGUAGES
|
||||||
#include "Messages.h"
|
#include "Game.h"
|
||||||
#include "Text.h"
|
#endif
|
||||||
|
#include "Frontend.h"
|
||||||
static wchar WideErrorString[25];
|
#include "Messages.h"
|
||||||
|
#include "Text.h"
|
||||||
CText TheText;
|
|
||||||
|
static wchar WideErrorString[25];
|
||||||
CText::CText(void)
|
|
||||||
{
|
CText TheText;
|
||||||
encoding = 'e';
|
|
||||||
memset(WideErrorString, 0, sizeof(WideErrorString));
|
CText::CText(void)
|
||||||
}
|
{
|
||||||
|
encoding = 'e';
|
||||||
void
|
memset(WideErrorString, 0, sizeof(WideErrorString));
|
||||||
CText::Load(void)
|
}
|
||||||
{
|
|
||||||
uint8 *filedata;
|
void
|
||||||
char filename[32], type[4];
|
CText::Load(void)
|
||||||
int length;
|
{
|
||||||
int offset, sectlen;
|
uint8 *filedata;
|
||||||
|
char filename[32], type[4];
|
||||||
Unload();
|
int length;
|
||||||
filedata = new uint8[0x40000];
|
int offset, sectlen;
|
||||||
|
|
||||||
CFileMgr::SetDir("TEXT");
|
Unload();
|
||||||
switch(CMenuManager::m_PrefsLanguage){
|
filedata = new uint8[0x40000];
|
||||||
case LANGUAGE_AMERICAN:
|
|
||||||
sprintf(filename, "AMERICAN.GXT");
|
CFileMgr::SetDir("TEXT");
|
||||||
break;
|
switch(CMenuManager::m_PrefsLanguage){
|
||||||
case LANGUAGE_FRENCH:
|
case LANGUAGE_AMERICAN:
|
||||||
sprintf(filename, "FRENCH.GXT");
|
sprintf(filename, "AMERICAN.GXT");
|
||||||
break;
|
break;
|
||||||
case LANGUAGE_GERMAN:
|
case LANGUAGE_FRENCH:
|
||||||
sprintf(filename, "GERMAN.GXT");
|
sprintf(filename, "FRENCH.GXT");
|
||||||
break;
|
break;
|
||||||
case LANGUAGE_ITALIAN:
|
case LANGUAGE_GERMAN:
|
||||||
sprintf(filename, "ITALIAN.GXT");
|
sprintf(filename, "GERMAN.GXT");
|
||||||
break;
|
break;
|
||||||
case LANGUAGE_SPANISH:
|
case LANGUAGE_ITALIAN:
|
||||||
sprintf(filename, "SPANISH.GXT");
|
sprintf(filename, "ITALIAN.GXT");
|
||||||
break;
|
break;
|
||||||
#ifdef MORE_LANGUAGES
|
case LANGUAGE_SPANISH:
|
||||||
case LANGUAGE_POLISH:
|
sprintf(filename, "SPANISH.GXT");
|
||||||
sprintf(filename, "POLISH.GXT");
|
break;
|
||||||
break;
|
#ifdef MORE_LANGUAGES
|
||||||
case LANGUAGE_RUSSIAN:
|
case LANGUAGE_POLISH:
|
||||||
sprintf(filename, "RUSSIAN.GXT");
|
sprintf(filename, "POLISH.GXT");
|
||||||
break;
|
break;
|
||||||
case LANGUAGE_JAPANESE:
|
case LANGUAGE_RUSSIAN:
|
||||||
sprintf(filename, "JAPANESE.GXT");
|
sprintf(filename, "RUSSIAN.GXT");
|
||||||
break;
|
break;
|
||||||
#endif
|
case LANGUAGE_JAPANESE:
|
||||||
}
|
sprintf(filename, "JAPANESE.GXT");
|
||||||
|
break;
|
||||||
length = CFileMgr::LoadFile(filename, filedata, 0x40000, "rb");
|
#endif
|
||||||
CFileMgr::SetDir("");
|
}
|
||||||
|
|
||||||
offset = 0;
|
length = CFileMgr::LoadFile(filename, filedata, 0x40000, "rb");
|
||||||
while(offset < length){
|
CFileMgr::SetDir("");
|
||||||
type[0] = filedata[offset++];
|
|
||||||
type[1] = filedata[offset++];
|
offset = 0;
|
||||||
type[2] = filedata[offset++];
|
while(offset < length){
|
||||||
type[3] = filedata[offset++];
|
type[0] = filedata[offset++];
|
||||||
sectlen = (int)filedata[offset+3]<<24 | (int)filedata[offset+2]<<16 |
|
type[1] = filedata[offset++];
|
||||||
(int)filedata[offset+1]<<8 | (int)filedata[offset+0];
|
type[2] = filedata[offset++];
|
||||||
offset += 4;
|
type[3] = filedata[offset++];
|
||||||
if(sectlen != 0){
|
sectlen = (int)filedata[offset+3]<<24 | (int)filedata[offset+2]<<16 |
|
||||||
if(strncmp(type, "TKEY", 4) == 0)
|
(int)filedata[offset+1]<<8 | (int)filedata[offset+0];
|
||||||
keyArray.Load(sectlen, filedata, &offset);
|
offset += 4;
|
||||||
else if(strncmp(type, "TDAT", 4) == 0)
|
if(sectlen != 0){
|
||||||
data.Load(sectlen, filedata, &offset);
|
if(strncmp(type, "TKEY", 4) == 0)
|
||||||
else
|
keyArray.Load(sectlen, filedata, &offset);
|
||||||
offset += sectlen;
|
else if(strncmp(type, "TDAT", 4) == 0)
|
||||||
}
|
data.Load(sectlen, filedata, &offset);
|
||||||
}
|
else
|
||||||
|
offset += sectlen;
|
||||||
keyArray.Update(data.chars);
|
}
|
||||||
|
}
|
||||||
delete[] filedata;
|
|
||||||
}
|
keyArray.Update(data.chars);
|
||||||
|
|
||||||
void
|
delete[] filedata;
|
||||||
CText::Unload(void)
|
}
|
||||||
{
|
|
||||||
CMessages::ClearAllMessagesDisplayedByGame();
|
void
|
||||||
data.Unload();
|
CText::Unload(void)
|
||||||
keyArray.Unload();
|
{
|
||||||
}
|
CMessages::ClearAllMessagesDisplayedByGame();
|
||||||
|
data.Unload();
|
||||||
wchar*
|
keyArray.Unload();
|
||||||
CText::Get(const char *key)
|
}
|
||||||
{
|
|
||||||
return keyArray.Search(key);
|
wchar*
|
||||||
}
|
CText::Get(const char *key)
|
||||||
|
{
|
||||||
wchar UpperCaseTable[128] = {
|
return keyArray.Search(key);
|
||||||
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
|
}
|
||||||
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
|
||||||
150, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
|
wchar UpperCaseTable[128] = {
|
||||||
138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
|
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
|
||||||
149, 173, 173, 175, 176, 177, 178, 179, 180, 181, 182,
|
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
||||||
183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
|
150, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
|
||||||
194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
|
138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
|
||||||
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
|
149, 173, 173, 175, 176, 177, 178, 179, 180, 181, 182,
|
||||||
216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
|
183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
|
||||||
227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
|
194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
|
||||||
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
|
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
|
||||||
249, 250, 251, 252, 253, 254, 255
|
216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
|
||||||
};
|
227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
|
||||||
|
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
|
||||||
wchar FrenchUpperCaseTable[128] = {
|
249, 250, 251, 252, 253, 254, 255
|
||||||
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
|
};
|
||||||
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
|
||||||
150, 65, 65, 65, 65, 132, 133, 69, 69, 69, 69, 73, 73,
|
wchar FrenchUpperCaseTable[128] = {
|
||||||
73, 73, 79, 79, 79, 79, 85, 85, 85, 85, 173, 173, 175,
|
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
|
||||||
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
|
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
||||||
187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
|
150, 65, 65, 65, 65, 132, 133, 69, 69, 69, 69, 73, 73,
|
||||||
198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
73, 73, 79, 79, 79, 79, 85, 85, 85, 85, 173, 173, 175,
|
||||||
209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
|
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
|
||||||
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
|
187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
|
||||||
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
|
198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
||||||
242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
|
209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
|
||||||
253, 254, 255
|
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
|
||||||
};
|
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
|
||||||
|
242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
|
||||||
wchar
|
253, 254, 255
|
||||||
CText::GetUpperCase(wchar c)
|
};
|
||||||
{
|
|
||||||
switch (encoding)
|
wchar
|
||||||
{
|
CText::GetUpperCase(wchar c)
|
||||||
case 'e':
|
{
|
||||||
if (c >= 'a' && c <= 'z')
|
switch (encoding)
|
||||||
return c - 32;
|
{
|
||||||
break;
|
case 'e':
|
||||||
case 'f':
|
if (c >= 'a' && c <= 'z')
|
||||||
if (c >= 'a' && c <= 'z')
|
return c - 32;
|
||||||
return c - 32;
|
break;
|
||||||
|
case 'f':
|
||||||
if (c >= 128 && c <= 255)
|
if (c >= 'a' && c <= 'z')
|
||||||
return FrenchUpperCaseTable[c-128];
|
return c - 32;
|
||||||
break;
|
|
||||||
case 'g':
|
if (c >= 128 && c <= 255)
|
||||||
case 'i':
|
return FrenchUpperCaseTable[c-128];
|
||||||
case 's':
|
break;
|
||||||
if (c >= 'a' && c <= 'z')
|
case 'g':
|
||||||
return c - 32;
|
case 'i':
|
||||||
|
case 's':
|
||||||
if (c >= 128 && c <= 255)
|
if (c >= 'a' && c <= 'z')
|
||||||
return UpperCaseTable[c-128];
|
return c - 32;
|
||||||
break;
|
|
||||||
default:
|
if (c >= 128 && c <= 255)
|
||||||
break;
|
return UpperCaseTable[c-128];
|
||||||
}
|
break;
|
||||||
return c;
|
default:
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
void
|
return c;
|
||||||
CText::UpperCase(wchar *s)
|
}
|
||||||
{
|
|
||||||
while(*s){
|
void
|
||||||
*s = GetUpperCase(*s);
|
CText::UpperCase(wchar *s)
|
||||||
s++;
|
{
|
||||||
}
|
while(*s){
|
||||||
}
|
*s = GetUpperCase(*s);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
void
|
}
|
||||||
CKeyArray::Load(uint32 length, uint8 *data, int *offset)
|
|
||||||
{
|
|
||||||
uint32 i;
|
void
|
||||||
uint8 *rawbytes;
|
CKeyArray::Load(uint32 length, uint8 *data, int *offset)
|
||||||
|
{
|
||||||
numEntries = length / sizeof(CKeyEntry);
|
uint32 i;
|
||||||
entries = new CKeyEntry[numEntries];
|
uint8 *rawbytes;
|
||||||
rawbytes = (uint8*)entries;
|
|
||||||
|
numEntries = length / sizeof(CKeyEntry);
|
||||||
for(i = 0; i < length; i++)
|
entries = new CKeyEntry[numEntries];
|
||||||
rawbytes[i] = data[(*offset)++];
|
rawbytes = (uint8*)entries;
|
||||||
}
|
|
||||||
|
for(i = 0; i < length; i++)
|
||||||
void
|
rawbytes[i] = data[(*offset)++];
|
||||||
CKeyArray::Unload(void)
|
}
|
||||||
{
|
|
||||||
delete[] entries;
|
void
|
||||||
entries = nil;
|
CKeyArray::Unload(void)
|
||||||
numEntries = 0;
|
{
|
||||||
}
|
delete[] entries;
|
||||||
|
entries = nil;
|
||||||
void
|
numEntries = 0;
|
||||||
CKeyArray::Update(wchar *chars)
|
}
|
||||||
{
|
|
||||||
int i;
|
void
|
||||||
for(i = 0; i < numEntries; i++)
|
CKeyArray::Update(wchar *chars)
|
||||||
entries[i].value = (wchar*)((uint8*)chars + (uintptr)entries[i].value);
|
{
|
||||||
}
|
int i;
|
||||||
|
for(i = 0; i < numEntries; i++)
|
||||||
CKeyEntry*
|
entries[i].value = (wchar*)((uint8*)chars + (uintptr)entries[i].value);
|
||||||
CKeyArray::BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 high)
|
}
|
||||||
{
|
|
||||||
int mid;
|
CKeyEntry*
|
||||||
int diff;
|
CKeyArray::BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 high)
|
||||||
|
{
|
||||||
if(low > high)
|
int mid;
|
||||||
return nil;
|
int diff;
|
||||||
|
|
||||||
mid = (low + high)/2;
|
if(low > high)
|
||||||
diff = strcmp(key, entries[mid].key);
|
return nil;
|
||||||
if(diff == 0)
|
|
||||||
return &entries[mid];
|
mid = (low + high)/2;
|
||||||
if(diff < 0)
|
diff = strcmp(key, entries[mid].key);
|
||||||
return BinarySearch(key, entries, low, mid-1);
|
if(diff == 0)
|
||||||
if(diff > 0)
|
return &entries[mid];
|
||||||
return BinarySearch(key, entries, mid+1, high);
|
if(diff < 0)
|
||||||
return nil;
|
return BinarySearch(key, entries, low, mid-1);
|
||||||
}
|
if(diff > 0)
|
||||||
|
return BinarySearch(key, entries, mid+1, high);
|
||||||
wchar*
|
return nil;
|
||||||
CKeyArray::Search(const char *key)
|
}
|
||||||
{
|
|
||||||
CKeyEntry *found;
|
wchar*
|
||||||
char errstr[25];
|
CKeyArray::Search(const char *key)
|
||||||
int i;
|
{
|
||||||
|
CKeyEntry *found;
|
||||||
found = BinarySearch(key, entries, 0, numEntries-1);
|
char errstr[25];
|
||||||
if(found)
|
int i;
|
||||||
return found->value;
|
|
||||||
sprintf(errstr, "%s missing", key);
|
found = BinarySearch(key, entries, 0, numEntries-1);
|
||||||
for(i = 0; i < 25; i++)
|
if(found)
|
||||||
WideErrorString[i] = errstr[i];
|
return found->value;
|
||||||
return WideErrorString;
|
sprintf(errstr, "%s missing", key);
|
||||||
}
|
for(i = 0; i < 25; i++)
|
||||||
|
WideErrorString[i] = errstr[i];
|
||||||
|
return WideErrorString;
|
||||||
void
|
}
|
||||||
CData::Load(uint32 length, uint8 *data, int *offset)
|
|
||||||
{
|
|
||||||
uint32 i;
|
void
|
||||||
uint8 *rawbytes;
|
CData::Load(uint32 length, uint8 *data, int *offset)
|
||||||
|
{
|
||||||
numChars = length / sizeof(wchar);
|
uint32 i;
|
||||||
chars = new wchar[numChars];
|
uint8 *rawbytes;
|
||||||
rawbytes = (uint8*)chars;
|
|
||||||
|
numChars = length / sizeof(wchar);
|
||||||
for(i = 0; i < length; i++)
|
chars = new wchar[numChars];
|
||||||
rawbytes[i] = data[(*offset)++];
|
rawbytes = (uint8*)chars;
|
||||||
}
|
|
||||||
|
for(i = 0; i < length; i++)
|
||||||
void
|
rawbytes[i] = data[(*offset)++];
|
||||||
CData::Unload(void)
|
}
|
||||||
{
|
|
||||||
delete[] chars;
|
void
|
||||||
chars = nil;
|
CData::Unload(void)
|
||||||
numChars = 0;
|
{
|
||||||
}
|
delete[] chars;
|
||||||
|
chars = nil;
|
||||||
void
|
numChars = 0;
|
||||||
AsciiToUnicode(const char *src, wchar *dst)
|
}
|
||||||
{
|
|
||||||
while((*dst++ = *src++) != '\0');
|
void
|
||||||
}
|
AsciiToUnicode(const char *src, wchar *dst)
|
||||||
|
{
|
||||||
#include "Game.h"
|
while((*dst++ = (unsigned char)*src++) != '\0');
|
||||||
|
}
|
||||||
char*
|
|
||||||
UnicodeToAscii(wchar *src)
|
char*
|
||||||
{
|
UnicodeToAscii(wchar *src)
|
||||||
static char aStr[256];
|
{
|
||||||
int len;
|
static char aStr[256];
|
||||||
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
|
int len;
|
||||||
if(*src < 128 || (CGame::russianGame && *src < 256))
|
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
|
||||||
aStr[len] = *src;
|
#ifdef MORE_LANGUAGES
|
||||||
else
|
if(*src < 128 || ((CGame::russianGame || CGame::japaneseGame) && *src < 256))
|
||||||
aStr[len] = '#';
|
#else
|
||||||
aStr[len] = '\0';
|
if(*src < 128)
|
||||||
return aStr;
|
#endif
|
||||||
}
|
aStr[len] = *src;
|
||||||
|
else
|
||||||
char*
|
aStr[len] = '#';
|
||||||
UnicodeToAsciiForSaveLoad(wchar *src)
|
aStr[len] = '\0';
|
||||||
{
|
return aStr;
|
||||||
static char aStr[256];
|
}
|
||||||
int len;
|
|
||||||
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
|
char*
|
||||||
if(*src < 256)
|
UnicodeToAsciiForSaveLoad(wchar *src)
|
||||||
aStr[len] = *src;
|
{
|
||||||
else
|
static char aStr[256];
|
||||||
aStr[len] = '#';
|
int len;
|
||||||
aStr[len] = '\0';
|
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
|
||||||
return aStr;
|
if(*src < 256)
|
||||||
}
|
aStr[len] = *src;
|
||||||
|
else
|
||||||
void
|
aStr[len] = '#';
|
||||||
UnicodeStrcpy(wchar *dst, const wchar *src)
|
aStr[len] = '\0';
|
||||||
{
|
return aStr;
|
||||||
while((*dst++ = *src++) != '\0');
|
}
|
||||||
}
|
|
||||||
|
void
|
||||||
int
|
UnicodeStrcpy(wchar *dst, const wchar *src)
|
||||||
UnicodeStrlen(const wchar *str)
|
{
|
||||||
{
|
while((*dst++ = *src++) != '\0');
|
||||||
int len;
|
}
|
||||||
for(len = 0; *str != '\0'; len++, str++);
|
|
||||||
return len;
|
int
|
||||||
}
|
UnicodeStrlen(const wchar *str)
|
||||||
|
{
|
||||||
void
|
int len;
|
||||||
TextCopy(wchar *dst, const wchar *src)
|
for(len = 0; *str != '\0'; len++, str++);
|
||||||
{
|
return len;
|
||||||
while((*dst++ = *src++) != '\0');
|
}
|
||||||
}
|
|
||||||
|
void
|
||||||
|
TextCopy(wchar *dst, const wchar *src)
|
||||||
InjectHook(0x52C2F0, &UnicodeToAscii, PATCH_JUMP);
|
{
|
||||||
|
while((*dst++ = *src++) != '\0');
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user