summaryrefslogtreecommitdiffstats
path: root/src/render/Hud.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2021-01-08 23:01:41 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2021-01-08 23:01:41 +0100
commit7a3ee349da51543f5e273df1a7d932a25602ea2a (patch)
tree89dfabef536de8e7163e4fe1b094957e6d3ac762 /src/render/Hud.cpp
parentTrain anims in enum (diff)
downloadre3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.gz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.bz2
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.lz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.xz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.zst
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.zip
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r--src/render/Hud.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 3432f32c..b3cc5deb 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -28,6 +28,16 @@
// --MIAMI: file done
+#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(0, 207, 133, 255);
@@ -1052,16 +1062,17 @@ void CHud::Draw()
CRadar::DrawMap();
if (FrontEndMenuManager.m_PrefsRadarMode != 1) {
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
+
+ rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+
#ifdef FIX_BUGS
- rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+ rect.Grow(SCREEN_SCALE_X(6.0f), SCREEN_SCALE_X(6.0f), SCREEN_SCALE_Y(6.0f), SCREEN_SCALE_Y(6.0f));
#else
- rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
-#endif
-
rect.Grow(6.0f);
- rect.Translate(0.0f, 2.0f);
+#endif
+ rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(2.0f));
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
- rect.Translate(0.0f, -2.0f);
+ rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(-2.0f));
Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
}
CRadar::DrawBlips();