summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-08 18:49:47 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-11-08 18:49:47 +0100
commitfe5d0c9cdf582026960c87988adcad31d6e67e13 (patch)
tree93eb6ed7698f9cc2075541b4e58de0b135fff4f5
parentPickups fix (diff)
downloadre3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar.gz
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar.bz2
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar.lz
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar.xz
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.tar.zst
re3-fe5d0c9cdf582026960c87988adcad31d6e67e13.zip
Diffstat (limited to '')
-rw-r--r--src/control/Darkel.cpp4
-rw-r--r--src/control/Garages.cpp2
-rw-r--r--src/core/Frontend.cpp35
-rw-r--r--src/core/Frontend.h2
-rw-r--r--src/core/Game.cpp2
-rw-r--r--src/core/Pad.cpp4
-rw-r--r--src/render/Credits.cpp16
-rw-r--r--src/render/Font.cpp20
-rw-r--r--src/render/Hud.cpp30
-rw-r--r--src/render/SpecialFX.cpp4
10 files changed, 67 insertions, 52 deletions
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp
index e44cdda9..1356638f 100644
--- a/src/control/Darkel.cpp
+++ b/src/control/Darkel.cpp
@@ -73,7 +73,7 @@ CDarkel::DrawMessages()
{
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(30.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(610.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart;
@@ -127,7 +127,7 @@ CDarkel::DrawMessages()
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart;
if (CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart < 5000) {
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
CFont::SetCentreOn();
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff();
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 44a961c9..b27b3c20 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1341,7 +1341,7 @@ void CGarages::PrintMessages()
CFont::SetPropOn();
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn();
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetColor(CRGBA(0, 0, 0, 255));
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index eba0ca18..a52b9bfc 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -767,8 +767,8 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::SetBackGroundOnlyTextOff();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
- CFont::SetCentreSize(SCREEN_WIDTH);
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
switch (m_nCurrScreen) {
case MENUPAGE_CHOOSE_LOAD_SLOT:
@@ -808,7 +808,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
wchar *str;
if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) {
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENULABEL_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENULABEL_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENULABEL_X_MARGIN));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetScale(MENU_X(BIGTEXT2_X_SCALE), MENU_Y(BIGTEXT2_Y_SCALE));
CFont::SetRightJustifyOff();
@@ -848,7 +848,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::PrintString(MENU_X_LEFT_ALIGNED(100.0f), MENU_Y(97.0f), str);
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
}
if (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) {
@@ -1300,14 +1300,17 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, 170.0f, HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, MENU_X_LEFT_ALIGNED(200.0f), SCREEN_WIDTH);
break;
}
-
- nextYToUse = MENU_Y(150.f); // TODO(Miami): Temp
-
+
+ // Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
+#ifndef FIX_BUGS
nextYToUse += MENU_DEFAULT_LINE_HEIGHT * CFont::GetNumberLines(MENU_X_LEFT_ALIGNED(60.0f), MENU_Y(nextYToUse), leftText);
+#endif
- // TODO(Miami): Remove here after audio page is done
+ nextYToUse = 300.0f; // TODO(Miami): temp
// Radio icons
if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_RADIO) {
+
+ // TODO(Miami): Remove those after audio page is done
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_WILDSTYLE], MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(nextYToUse), 0, HOVEROPTION_RADIO_0);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_FLASH], MENU_X_LEFT_ALIGNED(90.0f), MENU_Y(nextYToUse), 1, HOVEROPTION_RADIO_1);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_KCHAT], MENU_X_LEFT_ALIGNED(150.0f), MENU_Y(nextYToUse), 2, HOVEROPTION_RADIO_2);
@@ -1804,7 +1807,7 @@ CMenuManager::DrawControllerSetupScreen()
CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
PREPARE_MENU_HEADER
switch (m_ControlMethod) {
@@ -2256,7 +2259,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
// lstrcpy's changed with strcpy
if (!m_bSkinsEnumerated) {
@@ -3042,7 +3045,7 @@ CMenuManager::SmallMessageScreen(const char* text)
CFont::SetBackGroundOnlyTextOn();
CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(95.0f), SCREEN_SCALE_FROM_BOTTOM(165.0f), SCREEN_STRETCH_FROM_RIGHT(95.0f), SCREEN_SCALE_Y(115.0f)), CRGBA(50, 50, 50, FadeIn(210)));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
- CFont::SetCentreSize(SCREEN_STRETCH_X(430.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(430.0f));
CFont::SetCentreOn();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2);
@@ -4702,8 +4705,8 @@ CMenuManager::PrintMap(void)
CRadar::DrawBlips();
if (m_PrefsShowLegends) {
- CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(84.0f));
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(84.0f));
CFont::SetBackGroundOnlyTextOff();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2);
@@ -4826,8 +4829,8 @@ CMenuManager::PrintMap(void)
#endif
m_bMenuMapActive = false;
- CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(10.0f));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(10.0f));
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
DisplayHelperText("FEH_MPH");
}
@@ -5049,4 +5052,4 @@ uint8 CMenuManager::GetNumberOfMenuOptions()
#undef GetBackJustUp
#undef GetBackJustDown
-#endif \ No newline at end of file
+#endif
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 4c44e5e6..d2091a52 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -11,12 +11,10 @@
#define MENUHEADER_WIDTH 1.0f
#define MENU_UNK_X_MARGIN 10.0f
-#define MENU_UNK_WIDTH 10.0f
#define MENUACTION_SCALE_MULT 0.9f
#define MENULABEL_X_MARGIN 80.0f
-#define MENULABEL_WIDTH 80.0f
#define MENULABEL_POS_X 100.0f
#define MENULABEL_POS_Y 97.0f
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index a8637980..4034c4b6 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -137,7 +137,7 @@ void MessageScreen(char *msg)
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f));
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
+ CFont::SetCentreSize(SCREEN_SCALE_X(450.0f));
CFont::SetJustifyOff();
CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::SetDropColor(CRGBA(32, 32, 32, 255));
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 6752c1c5..983fc588 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -3294,7 +3294,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
@@ -3312,7 +3312,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
diff --git a/src/render/Credits.cpp b/src/render/Credits.cpp
index 75342bad..f45c0aee 100644
--- a/src/render/Credits.cpp
+++ b/src/render/Credits.cpp
@@ -73,7 +73,7 @@ CCredits::Render(void)
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetFontStyle(FONT_STANDARD);
@@ -421,7 +421,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED129"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.8f));
PrintCreditText(1.1f, 0.8f, TheText.Get("CRD111A"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset);
@@ -469,7 +469,7 @@ CCredits::Render(void)
PrintCreditSpace(0.5f, lineoffset);
PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134I"), lineoffset, scrolloffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.7f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.7f));
PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.1f, 0.8f, TheText.Get("CRED135"), lineoffset, scrolloffset);
@@ -505,7 +505,7 @@ CCredits::Render(void)
PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140L"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.85f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.85f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset);
@@ -586,7 +586,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED172"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED217"), lineoffset, scrolloffset);
@@ -709,7 +709,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED332"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.8f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED333"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset);
@@ -747,7 +747,7 @@ CCredits::Render(void)
PrintCreditSpace(1.5f, lineoffset);
- CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset);
@@ -810,4 +810,4 @@ CCredits::Render(void)
bool CCredits::AreCreditsDone(void)
{
return !bCreditsGoing;
-} \ No newline at end of file
+}
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index 787a0c40..78a8599e 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -268,8 +268,8 @@ CFont::Initialise(void)
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
SetJustifyOff();
SetCentreOff();
- SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
- SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
+ SetWrapx(SCREEN_WIDTH);
+ SetCentreSize(SCREEN_WIDTH);
SetBackgroundOff();
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
SetBackGroundOnlyTextOff();
@@ -646,7 +646,14 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s)
y = ystart;
while(*s){
+#ifdef FIX_BUGS
+ float f = Details.centre ? Details.centreSize :
+ Details.rightJustify ? xstart - Details.rightJustifyWrap :
+ Details.wrapX;
+#else
float f = (Details.centre ? Details.centreSize : Details.wrapX);
+#endif
+
#ifdef MORE_LANGUAGES
if (IsJapaneseFont())
f -= SCREEN_SCALE_X(21.0f * 2.0f);
@@ -726,8 +733,15 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s)
x = xstart;
y = ystart;
+#ifdef FIX_BUGS
+ float xEnd = Details.centre ? Details.centreSize :
+ Details.rightJustify ? xstart - Details.rightJustifyWrap :
+ Details.wrapX;
+#else
+ float xEnd = (Details.centre ? Details.centreSize : Details.wrapX);
+#endif
while(*s){
- if(x + GetStringWidth(s) > (Details.centre ? Details.centreSize : Details.wrapX)){
+ if(x + GetStringWidth(s) > xEnd){
// reached end of line
if(x > maxlength)
maxlength = x;
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index cf0e2b70..ed78ac4c 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1095,7 +1095,7 @@ void CHud::Draw()
CFont::SetCentreOff();
CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX));
- CFont::SetCentreSize(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
+ CFont::SetCentreSize(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
if (CTheScripts::IntroTextLines[i].m_bBackground)
CFont::SetBackgroundOn();
@@ -1168,7 +1168,7 @@ void CHud::Draw()
onceItWasWidescreen = true;
if (FrontEndMenuManager.m_PrefsShowSubtitles || !CCutsceneMgr::IsRunning()) {
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(60.0f));
+ CFont::SetCentreSize(SCREEN_WIDTH - SCREEN_SCALE_X(60.0f));
CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.2f));
CFont::PrintString(SCREEN_WIDTH / 2.f, SCREEN_SCALE_FROM_BOTTOM(80.0f), m_Message);
}
@@ -1182,11 +1182,11 @@ void CHud::Draw()
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.22f));
- float offsetX = SCREEN_SCALE_X(140.0f) + SCREEN_SCALE_X(8.0f);
- float center = SCREEN_SCALE_FROM_RIGHT(20.0f) - SCREEN_SCALE_X(8.0f) - offsetX;
- CFont::SetCentreSize(center);
+ float radarBulge = SCREEN_SCALE_X(140.0f) + SCREEN_SCALE_X(8.0f);
+ float rectWidth = SCREEN_WIDTH - SCREEN_SCALE_X(20.0f) - SCREEN_SCALE_X(8.0f) - radarBulge;
+ CFont::SetCentreSize(rectWidth);
- CFont::PrintString(center / 2.0f + offsetX, SCREEN_SCALE_FROM_BOTTOM(105.f + 2.0f), m_Message);
+ CFont::PrintString(rectWidth / 2.0f + radarBulge, SCREEN_SCALE_FROM_BOTTOM(105.f + 2.0f), m_Message);
}
CFont::SetDropShadowPosition(0);
}
@@ -1322,13 +1322,13 @@ void CHud::Draw()
}
CFont::SetPropOn();
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetColor(CRGBA(255, 255, 0, BigMessageAlpha[0])); // unused color
CFont::SetFontStyle(FONT_HEADING);
// Appearently sliding text in here was abandoned very early, since this text is centered now.
- if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
+ if (BigMessageX[0] >= SCALE_AND_CENTER_X(620.0f)) {
BigMessageInUse[0] += CTimer::GetTimeStep();
if (BigMessageInUse[0] >= 120.0f) {
@@ -1356,7 +1356,7 @@ void CHud::Draw()
}
else {
BigMessageAlpha[0] = 0.0f;
- BigMessageX[0] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f);
+ BigMessageX[0] = SCALE_AND_CENTER_X(-60.0f);
BigMessageInUse[0] = 1.0f;
}
}
@@ -1435,7 +1435,7 @@ void CHud::DrawAfterFade()
CFont::SetCentreOff();
CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX));
- CFont::SetCentreSize(SCALE_AND_CENTER_X(line.m_fCenterSize));
+ CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
if (line.m_bBackground)
CFont::SetBackgroundOn();
else
@@ -1481,7 +1481,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
CFont::SetCentreOn();
CFont::SetPropOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(40.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@@ -1495,7 +1495,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
CFont::SetCentreOn();
CFont::SetPropOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(60.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(580.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@@ -1550,7 +1550,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.2f));
CFont::SetCentreOn();
CFont::SetPropOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(80.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(560.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@@ -1581,7 +1581,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f));
CFont::SetPropOn();
- CFont::SetRightJustifyWrap(0.0f);
+ CFont::SetRightJustifyWrap(SCALE_AND_CENTER_X(0.0f));
CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_BANK);
CFont::SetScale(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_AMERICAN ? SCREEN_SCALE_X(1.7f) : SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.8f));
@@ -2067,4 +2067,4 @@ CHud::ResetWastedText(void)
BigMessageInUse[0] = 0.0f;
m_BigMessage[2][0] = 0;
m_BigMessage[0][0] = 0;
-} \ No newline at end of file
+}
diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp
index 7864b0f0..655fdb40 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/render/SpecialFX.cpp
@@ -179,7 +179,7 @@ CSpecialFX::Render2DFXs(void)
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(620.0f)); // unused
CFont::SetCentreOff();
CFont::SetPropOn();
CFont::SetColor(CRGBA(0, 255, 0, 200));
@@ -204,7 +204,7 @@ CSpecialFX::Render2DFXs(void)
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(620.0f)); // unused
CFont::SetCentreOff();
CFont::SetPropOn();
CFont::SetColor(CRGBA(100, 100, 100, 200));