summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2021-01-08 17:43:31 +0100
committerGitHub <noreply@github.com>2021-01-08 17:43:31 +0100
commit6e42c791cf3bbcb59363ab913a4d909b5345ab1b (patch)
treef39e4ab8a86ccfae72bf59b3ce984a02cc13b50a /src
parentMerge pull request #930 from Nick007J/master (diff)
parentbb .ini hello defines (diff)
downloadre3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.gz
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.bz2
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.lz
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.xz
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.zst
re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/Frontend.cpp28
-rw-r--r--src/core/Radar.h18
-rw-r--r--src/core/common.h9
-rw-r--r--src/core/config.h4
-rw-r--r--src/render/Draw.cpp19
-rw-r--r--src/render/Draw.h8
-rw-r--r--src/render/Hud.cpp527
-rw-r--r--src/render/Sprite.cpp8
8 files changed, 195 insertions, 426 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 2a87c7ad..7bf4be84 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1459,18 +1459,34 @@ CMenuManager::Draw()
#else
switch (m_PrefsUseWideScreen) {
case AR_AUTO:
- sprintf(asciiTemp, "AUTO");
+ rightText = TheText.Get("FEM_AUT");
break;
case AR_4_3:
sprintf(asciiTemp, "4:3");
+ AsciiToUnicode(asciiTemp, unicodeTemp);
+ rightText = unicodeTemp;
+ break;
+ case AR_5_4:
+ sprintf(asciiTemp, "5:4");
+ AsciiToUnicode(asciiTemp, unicodeTemp);
+ rightText = unicodeTemp;
+ break;
+ case AR_16_10:
+ sprintf(asciiTemp, "16:10");
+ AsciiToUnicode(asciiTemp, unicodeTemp);
+ rightText = unicodeTemp;
break;
case AR_16_9:
sprintf(asciiTemp, "16:9");
+ AsciiToUnicode(asciiTemp, unicodeTemp);
+ rightText = unicodeTemp;
+ break;
+ case AR_21_9:
+ sprintf(asciiTemp, "21:9");
+ AsciiToUnicode(asciiTemp, unicodeTemp);
+ rightText = unicodeTemp;
break;
}
-
- AsciiToUnicode(asciiTemp, unicodeTemp);
- rightText = unicodeTemp;
#endif
break;
case MENUACTION_RADIO:
@@ -5252,12 +5268,12 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_WIDESCREEN:
if (changeValueBy > 0) {
m_PrefsUseWideScreen++;
- if (m_PrefsUseWideScreen > 2)
+ if (m_PrefsUseWideScreen > AR_MAX-1)
m_PrefsUseWideScreen = 0;
} else {
m_PrefsUseWideScreen--;
if (m_PrefsUseWideScreen < 0)
- m_PrefsUseWideScreen = 2;
+ m_PrefsUseWideScreen = AR_MAX-1;
}
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings();
diff --git a/src/core/Radar.h b/src/core/Radar.h
index 5caf5bbb..725c8351 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -91,8 +91,26 @@ VALIDATE_SIZE(sRadarTrace, 0x30);
#else
#define RADAR_BOTTOM (47.0f)
#endif
+
+#ifdef FIX_RADAR
+/*
+ The values are from an early screenshot taken before R* broke radar
+*/
+#define RADAR_WIDTH (82.0f)
+#define RADAR_HEIGHT (82.0f)
+#else
+/*
+ broken since forever, someone tried to fix size for 640x512(PAL)
+ http://aap.rockstarvision.com/pics/gta3/ps2screens/gta3_interface.jpg
+ but failed:
+ http://aap.rockstarvision.com/pics/gta3/artwork/gta3_artwork_16.jpg
+ most likely the guy used something like this:
+ int y = 82 * (640.0/512.0)/(640.0/480.0);
+ int x = y * (640.0/512.0);
+*/
#define RADAR_WIDTH (94.0f)
#define RADAR_HEIGHT (76.0f)
+#endif
class CRadar
{
diff --git a/src/core/common.h b/src/core/common.h
index 50002ab5..5767b087 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -121,7 +121,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
#include "skeleton.h"
#include "Draw.h"
-#if defined(USE_PROPER_SCALING)
+#if defined(PROPER_SCALING) || defined(PS2_HUD)
#ifdef FORCE_PC_SCALING
#define DEFAULT_SCREEN_WIDTH (640)
#define DEFAULT_SCREEN_HEIGHT (448)
@@ -155,8 +155,8 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
#define SCREEN_HEIGHT ((float)RsGlobal.height)
#endif
-#define SCREEN_HEIGHT_PAL (512)
-#define SCREEN_HEIGHT_NTSC (448)
+#define SCREEN_HEIGHT_PAL ((float)512)
+#define SCREEN_HEIGHT_NTSC ((float)448)
#define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio())
#define SCREEN_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetScaledFOV() * 0.5f)))
@@ -175,8 +175,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
#ifdef ASPECT_RATIO_SCALE
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
-extern float ScaleAndCenterX(float x);
-#define SCALE_AND_CENTER_X(x) ScaleAndCenterX(x)
+#define SCALE_AND_CENTER_X(x) ((SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) ? (x) : (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X((x)))
#else
#define SCREEN_SCALE_AR(a) (a)
#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x)
diff --git a/src/core/config.h b/src/core/config.h
index 295ddee0..a2b2b6fc 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -241,6 +241,7 @@ enum Config {
//# define HARDCODED_MODEL_FLAGS // sets the flags enabled above from hardcoded model names.
// NB: keep this enabled unless your map IDEs have these flags baked in
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
+#define PROPER_SCALING // use original DEFAULT_SCREEN_WIDTH/DEFAULT_SCREEN_HEIGHT from PS2 instead of PC(R* changed HEIGHT here to make radar look better, but broke other hud elements aspect ratio).
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
#define PS2_ALPHA_TEST // emulate ps2 alpha test
@@ -255,6 +256,8 @@ enum Config {
#define NEW_RENDERER // leeds-like world rendering, needs librw
#endif
+#define FIX_SPRITES // fix sprites aspect ratio(moon, coronas, particle etc)
+
#ifndef EXTENDED_COLOURFILTER
#undef SCREEN_DROPLETS // we need the backbuffer for this effect
#endif
@@ -283,6 +286,7 @@ enum Config {
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
// #define BETA_SLIDING_TEXT
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
+#define FIX_RADAR // use radar size from early version before R* broke it
// #define XBOX_SUBTITLES // the infamous outlines
#define RADIO_OFF_TEXT
#define PC_MENU
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 4e323ec2..fcd5d18f 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -35,8 +35,14 @@ CDraw::FindAspectRatio(void)
default:
case AR_4_3:
return 4.0f / 3.0f;
+ case AR_5_4:
+ return 5.0f / 4.0f;
+ case AR_16_10:
+ return 16.0f / 10.0f;
case AR_16_9:
return 16.0f / 9.0f;
+ case AR_21_9:
+ return 21.0f / 9.0f;
};
#endif
}
@@ -69,15 +75,4 @@ CDraw::SetFOV(float fov)
ms_fScaledFOV = fov;
#endif
ms_fFOV = fov;
-}
-
-#ifdef ASPECT_RATIO_SCALE
-float
-ScaleAndCenterX(float x)
-{
- if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
- return x;
- else
- return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
-}
-#endif \ No newline at end of file
+} \ No newline at end of file
diff --git a/src/render/Draw.h b/src/render/Draw.h
index 5c4f95b1..45f7906f 100644
--- a/src/render/Draw.h
+++ b/src/render/Draw.h
@@ -4,10 +4,14 @@ enum eAspectRatio
{
// Make sure these work the same as FrontEndMenuManager.m_PrefsUseWideScreen
// without widescreen support
+ AR_AUTO,
AR_4_3,
+ AR_5_4,
+ AR_16_10,
AR_16_9,
-
- AR_AUTO,
+ AR_21_9,
+
+ AR_MAX,
};
class CDraw
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index dcc703e9..ae7b7eb3 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -21,6 +21,60 @@
#include "User.h"
#include "World.h"
+#ifdef PS2_HUD
+#define MONEY_X 100.0f
+#define WEAPON_X 91.0f
+#define AMMO_X 59.0f
+#define HEALTH_X 100.0f
+#define STARS_X 49.0f
+#define ZONE_Y 61.0f
+#define VEHICLE_Y 81.0f
+#define CLOCK_X 101.0f
+#define SUBS_Y 83.0f
+#define WASTEDBUSTED_Y 122.0f
+#define BIGMESSAGE_Y 80.0f
+#else
+#define MONEY_X 110.0f
+#define WEAPON_X 99.0f
+#define AMMO_X 66.0f
+#define HEALTH_X 110.0f
+#define STARS_X 60.0f
+#define ZONE_Y 30.0f
+#define VEHICLE_Y 55.0f
+#define CLOCK_X 111.0f
+#define SUBS_Y 68.0f
+#define WASTEDBUSTED_Y 82.0f
+#define BIGMESSAGE_Y 84.0f
+#endif
+
+#ifdef FIX_BUGS
+#define TIMER_RIGHT_OFFSET 34.0f // Taken from VC frenzy timer
+#define BIGMESSAGE_Y_OFFSET 18.0f
+#else
+#define TIMER_RIGHT_OFFSET 27.0f
+#define BIGMESSAGE_Y_OFFSET 20.0f
+#endif
+
+#if defined(PS2_HUD) && !defined(FIX_BUGS)
+ #define SCREEN_SCALE_X_PC(a) (a)
+ #define SCREEN_SCALE_Y_PC(a) (a)
+ #define SCALE_AND_CENTER_X_PC(a) (a)
+#else
+ #define SCREEN_SCALE_X_PC(a) SCREEN_SCALE_X(a)
+ #define SCREEN_SCALE_Y_PC(a) SCREEN_SCALE_Y(a)
+ #define SCALE_AND_CENTER_X_PC(a) SCALE_AND_CENTER_X(a)
+#endif
+
+#if defined(FIX_BUGS)
+ #define SCREEN_SCALE_X_FIX(a) SCREEN_SCALE_X(a)
+ #define SCREEN_SCALE_Y_FIX(a) SCREEN_SCALE_Y(a)
+ #define SCALE_AND_CENTER_X_FIX(a) SCALE_AND_CENTER_X(a)
+#else
+ #define SCREEN_SCALE_X_FIX(a) (a)
+ #define SCREEN_SCALE_Y_FIX(a) (a)
+ #define SCALE_AND_CENTER_X_FIX(a) (a)
+#endif
+
// Game has colors inlined in code.
// For easier modification we collect them here:
CRGBA MONEY_COLOR(89, 115, 150, 255);
@@ -387,11 +441,7 @@ void CHud::Draw()
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpRocketSightTex));
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CSprite::RenderOneXLUSprite(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 1.0f, 40.0f, 40.0f, (100.0f * fMultBright), (200.0f * fMultBright), (100.0f * fMultBright), 255, 1.0f, 255);
-#else
- CSprite::RenderOneXLUSprite(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 1.0f, SCREEN_SCALE_X(40.0f), SCREEN_SCALE_Y(40.0f), (100.0f * fMultBright), (200.0f * fMultBright), (100.0f * fMultBright), 255, 1.0f, 255);
-#endif
+ CSprite::RenderOneXLUSprite(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 1.0f, SCREEN_SCALE_X_PC(40.0f), SCREEN_SCALE_Y_PC(40.0f), (100.0f * fMultBright), (200.0f * fMultBright), (100.0f * fMultBright), 255, 1.0f, 255);
}
else {
// Sniper
@@ -452,24 +502,10 @@ void CHud::Draw()
CFont::SetFontStyle(FONT_HEADING);
CFont::SetPropOff();
CFont::SetColor(CRGBA(0, 0, 0, 255));
-
-#ifdef PS2_HUD
-#define MONEY_X 100.0f
-#else
-#define MONEY_X 110.0f
-#endif
-
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MONEY_X) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(43.0f) + SCREEN_SCALE_Y(2.0f), sPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MONEY_X) + 2.0f, SCREEN_SCALE_Y(43.0f) + 2.0f, sPrint);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MONEY_X) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(43.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint);
CFont::SetColor(MONEY_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MONEY_X), SCREEN_SCALE_Y(43.0f), sPrint);
-#undef MONEY_X
-
/*
DrawAmmo
*/
@@ -506,14 +542,6 @@ void CHud::Draw()
/*
DrawWeaponIcon
*/
-#ifdef PS2_HUD
-#define WEAPON_X 91.0f
-#define AMMO_X 59.0f
-#else
-#define WEAPON_X 99.0f
-#define AMMO_X 66.0f
-#endif
-
Sprites[WeaponType].Draw(
CRect(
SCREEN_SCALE_FROM_RIGHT(WEAPON_X),
@@ -543,19 +571,9 @@ void CHud::Draw()
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(AMMO_X), SCREEN_SCALE_Y(73.0f), sPrint);
}
-#undef WEAPON_X
-#undef AMMO_X
-
/*
DrawHealth
*/
-
-#ifdef PS2_HUD
-#define HEALTH_X 100.0f
-#else
-#define HEALTH_X 110.0f
-#endif
-
CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetJustifyOff();
@@ -579,35 +597,20 @@ void CHud::Draw()
sprintf(sTemp, "%03d", (int32)FindPlayerPed()->m_fHealth);
#endif
AsciiToUnicode(sTemp, sPrint);
-
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y(2.0f), sPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + 2.0f, SCREEN_SCALE_Y(65.0f) + 2.0f, sPrint);
-#endif
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint);
- if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) {
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(56.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y(2.0f), sPrintIcon);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + 2.0f - SCREEN_SCALE_X(56.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + 2.0f, sPrintIcon);
-#endif
- }
+ if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4)
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(56.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon);
+
CFont::SetColor(HEALTH_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X), SCREEN_SCALE_Y(65.0f), sPrint);
- if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) {
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(56.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + 2.0f - SCREEN_SCALE_X(56.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon);
-#endif
- }
+ if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4)
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(56.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon);
}
}
-#undef HEALTH_X
/*
DrawArmour
@@ -624,19 +627,10 @@ void CHud::Draw()
AsciiToUnicode(sTemp, sPrint);
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y(2.0f), sPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + 2.0f, SCREEN_SCALE_Y(65.0f) + 2.0f, sPrint);
-#endif
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint);
- if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 4) {
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(54.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y(2.0f), sPrintIcon);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + 2.0f - SCREEN_SCALE_X(54.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + 2.0f, sPrintIcon);
-#endif
- }
+ if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 4)
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(54.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon);
CFont::SetColor(ARMOUR_COLOR);
@@ -651,13 +645,6 @@ void CHud::Draw()
/*
DrawWantedLevel
*/
-
-#ifdef PS2_HUD
-#define STARS_X 49.0f
-#else
-#define STARS_X 60.0f
-#endif
-
CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetJustifyOff();
@@ -672,11 +659,8 @@ void CHud::Draw()
for (int i = 0; i < 6; i++) {
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(fStarsX + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(87.0f) + SCREEN_SCALE_Y(2.0f), sPrintIcon);
-#else
- CFont::PrintString(fStarsX + 2.0f, SCREEN_SCALE_Y(87.0f) + 2.0f, sPrintIcon);
-#endif
+ CFont::PrintString(fStarsX + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(87.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon);
+
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > i
&& (CTimer::GetTimeInMilliseconds() > FindPlayerPed()->m_pWanted->m_nLastWantedLevelChange
+ 2000 || CTimer::GetFrameCounter() & 4)) {
@@ -687,17 +671,10 @@ void CHud::Draw()
fStarsX -= SCREEN_SCALE_X(23.0f);
}
-
-#undef STARS_X
/*
DrawZoneName
*/
-#ifdef PS2_HUD
-#define ZONE_Y 61.0f
-#else
-#define ZONE_Y 30.0f
-#endif
if (m_pZoneName) {
float fZoneAlpha = 255.0f;
@@ -783,29 +760,16 @@ void CHud::Draw()
CFont::SetBackGroundOnlyTextOff();
CFont::SetFontStyle(FONT_BANK);
CFont::SetColor(CRGBA(0, 0, 0, fZoneAlpha));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(ZONE_Y) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + 1.0f, SCREEN_SCALE_FROM_BOTTOM(ZONE_Y) + 1.0f, m_ZoneToPrint);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X_FIX(1.0f), SCREEN_SCALE_FROM_BOTTOM(ZONE_Y) + SCREEN_SCALE_Y_FIX(1.0f), m_ZoneToPrint);
CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(ZONE_Y), m_ZoneToPrint);
}
}
}
-#undef ZONE_Y
/*
DrawVehicleName
*/
-
-#ifdef PS2_HUD
-#define VEHICLE_Y 81.0f
-#else
-#define VEHICLE_Y 55.0f
-#endif
-
if (m_pVehicleName) {
float fVehicleAlpha = 0.0f;
@@ -890,13 +854,7 @@ void CHud::Draw()
CFont::SetBackGroundOnlyTextOff();
CFont::SetFontStyle(FONT_BANK);
CFont::SetColor(CRGBA(0, 0, 0, fVehicleAlpha));
-
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(VEHICLE_Y) + SCREEN_SCALE_Y(1.0f), m_pVehicleNameToPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + 1.0f, SCREEN_SCALE_FROM_BOTTOM(VEHICLE_Y) + 1.0f, m_pVehicleNameToPrint);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X_FIX(1.0f), SCREEN_SCALE_FROM_BOTTOM(VEHICLE_Y) + SCREEN_SCALE_Y_FIX(1.0f), m_pVehicleNameToPrint);
CFont::SetColor(CRGBA(VEHICLE_COLOR.r, VEHICLE_COLOR.g, VEHICLE_COLOR.b, fVehicleAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(VEHICLE_Y), m_pVehicleNameToPrint);
}
@@ -908,16 +866,10 @@ void CHud::Draw()
m_VehicleFadeTimer = 0;
m_VehicleNameTimer = 0;
}
-#undef VEHICLE_Y
/*
DrawClock
*/
-#ifdef PS2_HUD
-#define CLOCK_X 101.0f
-#else
-#define CLOCK_X 111.0f
-#endif
CFont::SetJustifyOff();
CFont::SetCentreOff();
CFont::SetBackgroundOff();
@@ -932,22 +884,13 @@ void CHud::Draw()
AsciiToUnicode(sTemp, sPrint);
CFont::SetColor(CRGBA(0, 0, 0, 255));
-
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(CLOCK_X) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), sPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(CLOCK_X) + 2.0f, SCREEN_SCALE_Y(22.0f) + 2.0f, sPrint);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(CLOCK_X) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint);
CFont::SetColor(CLOCK_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(CLOCK_X), SCREEN_SCALE_Y(22.0f), sPrint);
-#undef CLOCK_X
-
/*
DrawOnScreenTimer
*/
-
wchar sTimer[16];
if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerProcessed)
@@ -955,11 +898,6 @@ void CHud::Draw()
if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterProcessed)
CounterOnLastFrame = false;
-#ifdef FIX_BUGS
-#define TIMER_RIGHT_OFFSET 34.0f // Taken from VC frenzy timer
-#else
-#define TIMER_RIGHT_OFFSET 27.0f
-#endif
if (CUserDisplay::OnscnTimer.m_bProcessed) {
if (CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerProcessed) {
if (!TimerOnLastFrame)
@@ -983,11 +921,7 @@ void CHud::Draw()
CFont::SetPropOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(110.0f) + SCREEN_SCALE_Y(2.0f), sTimer);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + 2.0f, SCREEN_SCALE_Y(110.0f) + 2.0f, sTimer);
-#endif
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(110.0f) + SCREEN_SCALE_Y_FIX(2.0f), sTimer);
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetColor(TIMER_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET), SCREEN_SCALE_Y(110.0f), sTimer);
@@ -996,12 +930,7 @@ void CHud::Draw()
CFont::SetPropOn();
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::SetScale(SCREEN_SCALE_X(0.8f * 0.8f), SCREEN_SCALE_Y(1.35f));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(80.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(110.0f) + SCREEN_SCALE_Y(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aTimerText));
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(80.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(110.0f) + 2.0f, TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aTimerText));
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(80.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(110.0f) + SCREEN_SCALE_Y_FIX(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aTimerText));
CFont::SetColor(TIMER_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(80.0f), SCREEN_SCALE_Y(110.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aTimerText));
}
@@ -1032,14 +961,8 @@ void CHud::Draw()
CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
CFont::SetPropOff();
CFont::SetBackGroundOnlyTextOn();
-
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), sTimer);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + 2.0f, SCREEN_SCALE_Y(132.0f) + 2.0f, sTimer);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y_FIX(2.0f), sTimer);
CFont::SetColor(COUNTER_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET), SCREEN_SCALE_Y(132.0f), sTimer);
} else {
@@ -1051,23 +974,10 @@ void CHud::Draw()
(
CRect
(
-#ifdef FIX_BUGS
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f),
-#else
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + 4.0f,
-#endif
+ SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X_FIX(4.0f),
SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f),
-#ifdef FIX_BUGS
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(4.0f),
-#else
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + 4.0f,
-#endif
-
-#if !defined(PS2_HUD) || defined(FIX_BUGS)
- SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)
-#else
- SCREEN_SCALE_Y(132.0f) + 11.0f + SCREEN_SCALE_Y(8.0f)
-#endif
+ SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X_FIX(4.0f),
+ SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y_PC(11.0f) + SCREEN_SCALE_Y(8.0f)
),
CRGBA(0, 106, 164, 80)
);
@@ -1076,30 +986,10 @@ void CHud::Draw()
(
CRect
(
-#ifdef FIX_BUGS
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f),
-#else
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + 4.0f,
-#endif
+ SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X_FIX(4.0f),
SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f),
-
-#if !defined(PS2_HUD) || defined(FIX_BUGS)
- SCREEN_SCALE_X(counter) / 2.0f +
-#else
- (float)(counter) / 2.0f +
-#endif
-
-#ifdef FIX_BUGS
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2.0f + SCREEN_SCALE_X(4.0f),
-#else
- SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2.0f + 4.0f,
-#endif
-
-#if !defined(PS2_HUD) || defined(FIX_BUGS)
- SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)
-#else
- SCREEN_SCALE_Y(132.0f) + 11.0f + SCREEN_SCALE_Y(8.0f)
-#endif
+ SCREEN_SCALE_X_PC((float)counter) / 2.0f + SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2.0f + SCREEN_SCALE_X_FIX(4.0f),
+ SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y_PC(11.0f) + SCREEN_SCALE_Y(8.0f)
),
CRGBA(0, 106, 164, 255)
);
@@ -1109,19 +999,13 @@ void CHud::Draw()
CFont::SetPropOn();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetColor(CRGBA(0, 0, 0, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText));
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + 2.0f, TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText));
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y_FIX(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText));
CFont::SetColor(COUNTER_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f), SCREEN_SCALE_Y(132.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText));
}
}
}
}
-#undef TIMER_RIGHT_OFFSET
/////////////////////////////////
/*
@@ -1158,13 +1042,7 @@ void CHud::Draw()
PagerOn = 0;
}
}
-
-#ifdef FIX_BUGS
- Sprites[HUD_PAGER].Draw(CRect(SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X(PagerXOffset), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_X(160.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X(PagerXOffset), SCREEN_SCALE_Y(80.0f) + SCREEN_SCALE_Y(27.0f)), CRGBA(255, 255, 255, 255));
-#else
- Sprites[HUD_PAGER].Draw(CRect(SCREEN_SCALE_X(26.0f) - PagerXOffset, SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_X(160.0f) + SCREEN_SCALE_X(26.0f) - PagerXOffset, SCREEN_SCALE_Y(80.0f) + SCREEN_SCALE_Y(27.0f)), CRGBA(255, 255, 255, 255));
-#endif
-
+ Sprites[HUD_PAGER].Draw(CRect(SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X_FIX(PagerXOffset), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_X(160.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X_FIX(PagerXOffset), SCREEN_SCALE_Y(80.0f) + SCREEN_SCALE_Y(27.0f)), CRGBA(255, 255, 255, 255));
CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.84f), SCREEN_SCALE_Y(1.0f));
CFont::SetColor(PAGER_COLOR);
@@ -1175,12 +1053,7 @@ void CHud::Draw()
CFont::SetJustifyOff();
CFont::SetPropOff();
CFont::SetFontStyle(FONT_PAGER);
-
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_X(52.0f) - SCREEN_SCALE_X(PagerXOffset), SCREEN_SCALE_Y(54.0f), m_PagerMessage);
-#else
- CFont::PrintString(SCREEN_SCALE_X(52.0f) - PagerXOffset, SCREEN_SCALE_Y(54.0f), m_PagerMessage);
-#endif
+ CFont::PrintString(SCREEN_SCALE_X(52.0f) - SCREEN_SCALE_X_FIX(PagerXOffset), SCREEN_SCALE_Y(54.0f), m_PagerMessage);
}
/*
@@ -1189,11 +1062,7 @@ void CHud::Draw()
if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) {
CRadar::DrawMap();
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
-#ifdef FIX_BUGS
- rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
-#else
- rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
-#endif
+ rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
#ifdef PS2_HUD
#ifdef FIX_BUGS
@@ -1226,11 +1095,12 @@ void CHud::Draw()
if (!CTimer::GetIsUserPaused()) {
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroTextLines); i++) {
if (CTheScripts::IntroTextLines[i].m_Text[0] && CTheScripts::IntroTextLines[i].m_bTextBeforeFade) {
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(CTheScripts::IntroTextLines[i].m_fScaleX, CTheScripts::IntroTextLines[i].m_fScaleY);
-#else
- CFont::SetScale(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fScaleX), SCREEN_SCALE_Y(CTheScripts::IntroTextLines[i].m_fScaleY * 0.5f));
+ CFont::SetScale(SCREEN_SCALE_X_PC(CTheScripts::IntroTextLines[i].m_fScaleX), SCREEN_SCALE_Y_PC(CTheScripts::IntroTextLines[i].m_fScaleY)
+#if !defined(PS2_HUD) || defined(FIX_BUGS)
+ * 0.5f
#endif
+ );
+
CFont::SetColor(CTheScripts::IntroTextLines[i].m_sColor);
if (CTheScripts::IntroTextLines[i].m_bJustify)
@@ -1248,18 +1118,10 @@ void CHud::Draw()
else
CFont::SetCentreOff();
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetWrapx(CTheScripts::IntroTextLines[i].m_fWrapX);
-#else
- CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX));
-#endif
-
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetCentreSize(CTheScripts::IntroTextLines[i].m_fCenterSize);
-#else
- CFont::SetCentreSize(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
-#endif
-
+ CFont::SetWrapx(SCALE_AND_CENTER_X_PC(CTheScripts::IntroTextLines[i].m_fWrapX));
+
+ CFont::SetCentreSize(SCREEN_SCALE_X_PC(CTheScripts::IntroTextLines[i].m_fCenterSize));
+
if (CTheScripts::IntroTextLines[i].m_bBackground)
CFont::SetBackgroundOn();
else
@@ -1315,20 +1177,11 @@ void CHud::Draw()
/*
DrawSubtitles
*/
-#ifdef PS2_HUD
-#define SUBS_Y 83.0f
-#else
-#define SUBS_Y 68.0f
-#endif
if (m_Message[0] && !m_BigMessage[2][0] && (FrontEndMenuManager.m_PrefsShowSubtitles == 1 || !TheCamera.m_WideScreenOn)) {
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
CFont::SetBackgroundColor(CRGBA(0, 0, 0, 128));
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(0.48f, 1.12f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(0.48f), SCREEN_SCALE_Y(1.12f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(0.48f), SCREEN_SCALE_Y_PC(1.12f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
@@ -1353,17 +1206,10 @@ void CHud::Draw()
CFont::SetColor(CRGBA(235, 235, 235, 255));
// I'm not sure shadow substaction was intentional here, might be a leftover if CFont::PrintString was used for a shadow draw call
- #if defined(FIX_BUGS)
- CFont::PrintString(rectWidth / 2.0f + radarBulge - SCREEN_SCALE_X(shadow), SCREEN_SCALE_Y(4.0f) + SCREEN_SCALE_FROM_BOTTOM(SUBS_Y) - SCREEN_SCALE_Y(shadow), m_Message);
- #elif defined(PS2_HUD)
- CFont::PrintString(rectWidth / 2.0f + radarBulge - shadow, 4.0f + SCREEN_SCALE_FROM_BOTTOM(SUBS_Y) - shadow, m_Message);
- #else
- CFont::PrintString(rectWidth / 2.0f + radarBulge - shadow, SCREEN_SCALE_Y(4.0f) + SCREEN_SCALE_FROM_BOTTOM(SUBS_Y) - shadow, m_Message);
- #endif
+ CFont::PrintString(rectWidth / 2.0f + radarBulge - SCREEN_SCALE_X_FIX(shadow), SCREEN_SCALE_Y_PC(4.0f) + SCREEN_SCALE_FROM_BOTTOM(SUBS_Y) - SCREEN_SCALE_Y_FIX(shadow), m_Message);
CFont::SetDropShadowPosition(0);
#endif // #ifdef XBOX_SUBTITLES
}
-#undef SUBS_Y
/*
DrawBigMessage
@@ -1376,17 +1222,9 @@ void CHud::Draw()
CFont::SetBackGroundOnlyTextOff();
if (CGame::frenchGame || CGame::germanGame)
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(1.8f, 1.8f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.8f), SCREEN_SCALE_Y_PC(1.8f));
else
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(1.8f, 1.8f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.8f), SCREEN_SCALE_Y_PC(1.8f));
CFont::SetPropOn();
CFont::SetCentreOn();
@@ -1414,30 +1252,18 @@ void CHud::Draw()
}
}
else {
-#ifdef FIX_BUGS
- BigMessageX[0] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
-#else
- BigMessageX[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
-#endif
+ BigMessageX[0] += SCREEN_SCALE_X_FIX(CTimer::GetTimeStepInMilliseconds() * 0.3f);
BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
if (BigMessageAlpha[0] > 255.0f)
BigMessageAlpha[0] = 255.0f;
}
-
CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[0]));
-#ifdef FIX_BUGS
-#define Y_OFFSET 18.0f
-#else
-#define Y_OFFSET 20.0f
-#endif
-#if defined(FIX_BUGS)
- CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(Y_OFFSET) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
-#elif defined(PS2_HUD) // yeah, that's right. ps2 uses y=ScaleX(a)
- CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(120.0f) + 2.0f, m_BigMessage[0]);
+#if defined(PS2_HUD) && !defined(FIX_BUGS) // yeah, that's right. ps2 uses y=ScaleX(a)
+ CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X_FIX(2.0f), (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(120.0f) + SCREEN_SCALE_Y_FIX(2.0f), m_BigMessage[0]);
#else
- CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(Y_OFFSET) + 2.0f, m_BigMessage[0]);
+ CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X_FIX(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y_OFFSET) + SCREEN_SCALE_Y_FIX(2.0f), m_BigMessage[0]);
#endif
CFont::SetColor(CRGBA(BIGMESSAGE_COLOR.r, BIGMESSAGE_COLOR.g, BIGMESSAGE_COLOR.b, BigMessageAlpha[0]));
#if defined(PS2_HUD) && !defined(FIX_BUGS) // same
@@ -1445,16 +1271,10 @@ void CHud::Draw()
#else
CFont::PrintString(SCREEN_WIDTH / 2, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f), m_BigMessage[0]);
#endif
-
-#undef Y_OFFSET
}
else {
BigMessageAlpha[0] = 0.0f;
-#ifdef FIX_BUGS
- BigMessageX[0] = SCALE_AND_CENTER_X(-60.0f);
-#else
- BigMessageX[0] = -60.0f;
-#endif
+ BigMessageX[0] = SCALE_AND_CENTER_X_FIX(-60.0f);
BigMessageInUse[0] = 1.0f;
}
}
@@ -1463,11 +1283,6 @@ void CHud::Draw()
}
// WastedBustedText
-#ifdef PS2_HUD
-#define WASTEDBUSTED_Y 122.0f
-#else
-#define WASTEDBUSTED_Y 82.0f
-#endif
if (m_BigMessage[2][0]) {
if (BigMessageInUse[2] != 0.0f) {
BigMessageAlpha[2] += (CTimer::GetTimeStepInMilliseconds() * 0.4f);
@@ -1477,29 +1292,17 @@ void CHud::Draw()
CFont::SetBackgroundOff();
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
if (CGame::frenchGame || CGame::germanGame)
- CFont::SetScale(1.4f, 1.4f);
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.4f), SCREEN_SCALE_Y_PC(1.4f));
else
- CFont::SetScale(2.0f, 2.0f);
-#else
- if (CGame::frenchGame || CGame::germanGame)
- CFont::SetScale(SCREEN_SCALE_X(1.4f), SCREEN_SCALE_Y(1.4f));
- else
- CFont::SetScale(SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(2.0f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(2.0f), SCREEN_SCALE_Y_PC(2.0f));
CFont::SetPropOn();
CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_HEADING);
CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[2]*0.75f));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_FROM_BOTTOM(WASTEDBUSTED_Y) + SCREEN_SCALE_Y(4.0f), m_BigMessage[2]);
-#else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + 4.0f, SCREEN_SCALE_FROM_BOTTOM(WASTEDBUSTED_Y) + SCREEN_SCALE_Y(4.0f), m_BigMessage[2]);
-#endif
-
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X_FIX(4.0f), SCREEN_SCALE_FROM_BOTTOM(WASTEDBUSTED_Y) + SCREEN_SCALE_Y(4.0f), m_BigMessage[2]);
CFont::SetColor(CRGBA(WASTEDBUSTED_COLOR.r, WASTEDBUSTED_COLOR.g, WASTEDBUSTED_COLOR.b, BigMessageAlpha[2]));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(WASTEDBUSTED_Y), m_BigMessage[2]);
}
@@ -1511,7 +1314,6 @@ void CHud::Draw()
else {
BigMessageInUse[2] = 0.0f;
}
-#undef WASTEDBUSTED_Y
}
}
@@ -1606,28 +1408,16 @@ void CHud::DrawAfterFade()
CFont::SetJustifyOff();
#ifdef MORE_LANGUAGES
if (CFont::IsJapanese())
- #ifdef FIX_BUGS
- CFont::SetWrapx(SCREEN_SCALE_X(229.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X(4.0f));
- #else
- CFont::SetWrapx(SCREEN_SCALE_X(229.0f) + SCREEN_SCALE_X(26.0f) - 4.0f);
- #endif
+ CFont::SetWrapx(SCREEN_SCALE_X(229.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X_FIX(4.0f));
else
#endif
- #ifdef FIX_BUGS
- CFont::SetWrapx(SCREEN_SCALE_X(200.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X(4.0f));
- #else
- CFont::SetWrapx(SCREEN_SCALE_X(200.0f) + SCREEN_SCALE_X(26.0f) - 4.0f);
- #endif
+ CFont::SetWrapx(SCREEN_SCALE_X(200.0f) + SCREEN_SCALE_X(26.0f) - SCREEN_SCALE_X_FIX(4.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
CFont::SetBackgroundOn();
CFont::SetBackGroundOnlyTextOff();
CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
CFont::SetColor(CRGBA(175, 175, 175, 255));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), m_HelpMessageToPrint);
-#else
- CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f) + (150.0f - PagerXOffset) * 0.6f, m_HelpMessageToPrint);
-#endif
+ CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f) + SCREEN_SCALE_Y_FIX((150.0f - PagerXOffset) * 0.6f), m_HelpMessageToPrint);
CFont::SetAlphaFade(255.0f);
}
}
@@ -1635,11 +1425,12 @@ void CHud::DrawAfterFade()
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroTextLines); i++) {
intro_text_line &line = CTheScripts::IntroTextLines[i];
if (line.m_Text[0] != '\0' && !line.m_bTextBeforeFade) {
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(line.m_fScaleX, line.m_fScaleY);
-#else
- CFont::SetScale(SCREEN_SCALE_X(line.m_fScaleX), SCREEN_SCALE_Y(line.m_fScaleY) / 2);
+
+ CFont::SetScale(SCREEN_SCALE_X_PC(line.m_fScaleX), SCREEN_SCALE_Y_PC(line.m_fScaleY)
+#if !defined(PS2_HUD) || defined(FIX_BUGS)
+ / 2
#endif
+ );
CFont::SetColor(line.m_sColor);
if (line.m_bJustify)
CFont::SetJustifyOn();
@@ -1656,13 +1447,8 @@ void CHud::DrawAfterFade()
else
CFont::SetCentreOff();
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetWrapx(line.m_fWrapX);
- CFont::SetCentreSize(line.m_fCenterSize);
-#else
- CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX));
- CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
-#endif
+ CFont::SetWrapx(SCALE_AND_CENTER_X_PC(line.m_fWrapX));
+ CFont::SetCentreSize(SCREEN_SCALE_X_PC(line.m_fCenterSize));
if (line.m_bBackground)
CFont::SetBackgroundOn();
@@ -1706,61 +1492,34 @@ void CHud::DrawAfterFade()
/*
DrawBigMessage2
*/
-#ifdef PS2_HUD
- #define BIGMESSAGE_Y 80.0f
-#else
- #define BIGMESSAGE_Y 84.0f
-#endif
-
// Oddjob
if (m_BigMessage[3][0]) {
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(1.2f, 1.5f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.2f), SCREEN_SCALE_Y_PC(1.5f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 40));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
CFont::SetColor(CRGBA(0, 0, 0, 255));
-
-#ifdef FIX_BUGS
- CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) + SCREEN_SCALE_Y(2.0f), m_BigMessage[3]);
-#else
- CFont::PrintString((SCREEN_WIDTH / 2) + 2.0f, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) + 2.0f, m_BigMessage[3]);
-#endif
-
+ CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X_FIX(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) + SCREEN_SCALE_Y_FIX(2.0f), m_BigMessage[3]);
CFont::SetColor(ODDJOB_COLOR);
-
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y), m_BigMessage[3]);
}
if (!m_BigMessage[1][0] && m_BigMessage[4][0]) {
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(1.2f, 1.5f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.2f), SCREEN_SCALE_Y_PC(1.5f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 20));
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
-
-#ifdef FIX_BUGS
- CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) - SCREEN_SCALE_Y(2.0f), m_BigMessage[4]);
-#else
- CFont::PrintString((SCREEN_WIDTH / 2) - 2.0f, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) - 2.0f, m_BigMessage[4]);
-#endif
+ CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X_FIX(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y) - SCREEN_SCALE_Y_FIX(2.0f), m_BigMessage[4]);
CFont::SetColor(ODDJOB_COLOR);
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(BIGMESSAGE_Y), m_BigMessage[4]);
}
-#undef BIGMESSAGE_Y
// Oddjob result
if (OddJob2OffTimer > 0)
@@ -1819,19 +1578,11 @@ void CHud::DrawAfterFade()
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
#ifdef BETA_SLIDING_TEXT
- #if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + 2.0f, m_BigMessage[5]);
- #else
- 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]);
- #endif
+ CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X_PC(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y_PC(2.0f), m_BigMessage[5]);
CFont::SetColor(ODDJOB2_COLOR);
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
#else
- #if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + 2.0f, m_BigMessage[5]);
- #else
- CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
- #endif
+ CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X_PC(2.0f), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y_PC(2.0f), m_BigMessage[5]);
CFont::SetColor(ODDJOB2_COLOR);
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
#endif
@@ -1847,17 +1598,9 @@ void CHud::DrawAfterFade()
CFont::SetBackgroundOff();
if (CGame::frenchGame || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(0.884f, 1.36f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(0.884f), SCREEN_SCALE_Y(1.36f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(0.884f), SCREEN_SCALE_Y_PC(1.36f));
else
-#if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::SetScale(1.04f, 1.6f);
-#else
- CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f));
-#endif
+ CFont::SetScale(SCREEN_SCALE_X_PC(1.04f), SCREEN_SCALE_Y_PC(1.6f));
CFont::SetPropOn();
#ifdef FIX_BUGS
@@ -1868,11 +1611,7 @@ void CHud::DrawAfterFade()
CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_HEADING);
-#ifdef FIX_BUGS
- if (BigMessageX[1] >= SCREEN_WIDTH - SCREEN_SCALE_X(20.0f))
-#else
- if (BigMessageX[1] >= SCREEN_WIDTH - 20.0f)
-#endif
+ if (BigMessageX[1] >= SCREEN_WIDTH - SCREEN_SCALE_X_FIX(20.0f))
{
BigMessageInUse[1] += CTimer::GetTimeStep();
@@ -1885,11 +1624,7 @@ void CHud::DrawAfterFade()
BigMessageAlpha[1] = 0.0f;
}
} else {
-#ifdef FIX_BUGS
- BigMessageX[1] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
-#else
- BigMessageX[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
-#endif
+ BigMessageX[1] += SCREEN_SCALE_X_FIX(CTimer::GetTimeStepInMilliseconds() * 0.3f);
BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
if (BigMessageAlpha[1] > 255.0f)
@@ -1898,21 +1633,11 @@ void CHud::DrawAfterFade()
CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
#ifdef BETA_SLIDING_TEXT
- #if defined(PS2_HUD) && !defined(FIX_BUGS)
- CFont::PrintString(SCREEN_SCALE_X(2.0f) + BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f) + 2.0f, m_BigMessage[1]);
- #else
- CFont::PrintString(SCREEN_SCALE_X(2.0f) + BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
- #endif
+ CFont::PrintString(SCREEN_SCALE_X(2.0f) + BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y_PC(2.0f), m_BigMessage[1]);
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
CFont::PrintString(BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
#else
- #ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
- #elif defined(PS2_HUD)
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + 2.0f, SCREEN_SCALE_FROM_BOTTOM(120.0f) + 2.0f, m_BigMessage[1]);
- #else
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + 2.0f, SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
- #endif
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y_PC(2.0f), m_BigMessage[1]);
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
#endif
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index 9ec7b002..c31c75d2 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -5,6 +5,10 @@
#include "Camera.h"
#include "Sprite.h"
+#ifdef ASPECT_RATIO_SCALE
+#include "Frontend.h"
+#endif
+
float CSprite::m_f2DNearScreenZ;
float CSprite::m_f2DFarScreenZ;
float CSprite::m_fRecipNearClipPlane;
@@ -33,7 +37,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
// this is used to scale correctly if you zoom in with sniper rifle
float fovScale = fov / CDraw::GetFOV();
+#ifdef FIX_SPRITES
+ *outw = fovScale * recip * SCREEN_HEIGHT;
+#else
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
+#endif
*outh = fovScale * recip * SCREEN_HEIGHT;
return true;