summaryrefslogtreecommitdiffstats
path: root/src/render/Hud.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-12 11:45:56 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-12 11:55:07 +0100
commitcb4b4d584c4d08791207ff92870b400a84faa742 (patch)
treefc740c000f1283fb695de5556cdd59efcf71e65b /src/render/Hud.cpp
parentMerge branch 'lcs-dev' into lcs (diff)
parentpremake: add startrpoject; add lto option; fix copying of binary to gamedir; update premake5.exe (diff)
downloadre3-cb4b4d584c4d08791207ff92870b400a84faa742.tar
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.gz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.bz2
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.lz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.xz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.zst
re3-cb4b4d584c4d08791207ff92870b400a84faa742.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 1c870fd2..d7a9d75d 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();