summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Draw.cpp8
-rw-r--r--src/render/Draw.h6
-rw-r--r--src/render/Hud.cpp9
-rw-r--r--src/render/Sprite.cpp2
4 files changed, 19 insertions, 6 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 2a4739c9..42015176 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -20,6 +20,12 @@ uint8 CDraw::FadeRed;
uint8 CDraw::FadeGreen;
uint8 CDraw::FadeBlue;
+#ifdef ASPECT_RATIO_SCALE
+int32 CDraw::ms_nScalingMode = SCL_PS2;
+int32 CDraw::ms_bFixRadar = true;
+int32 CDraw::ms_bFixSprites = true;
+#endif
+
float
CDraw::FindAspectRatio(void)
{
@@ -80,7 +86,7 @@ CDraw::SetFOV(float fov)
#ifdef ASPECT_RATIO_SCALE
float CDraw::ScaleY(float y)
{
- switch ( CMenuManager::m_PrefsSpriteScalingMode )
+ switch ( ms_nScalingMode )
{
case SCL_PC: return y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
default:
diff --git a/src/render/Draw.h b/src/render/Draw.h
index bacbe18f..bd97f76f 100644
--- a/src/render/Draw.h
+++ b/src/render/Draw.h
@@ -18,7 +18,6 @@ enum eSpriteScalingMode
{
SCL_PC,
SCL_PS2,
- SCL_AUTO,
};
class CDraw
@@ -41,6 +40,11 @@ public:
static uint8 FadeRed;
static uint8 FadeGreen;
static uint8 FadeBlue;
+#ifdef ASPECT_RATIO_SCALE
+ static int32 ms_nScalingMode;
+ static int32 ms_bFixRadar;
+ static int32 ms_bFixSprites;
+#endif
static void SetNearClipZ(float nearclip) { ms_fNearClipZ = nearclip; }
static float GetNearClipZ(void) { return ms_fNearClipZ; }
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 2adcbb81..b6f173c7 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1060,14 +1060,17 @@ void CHud::Draw()
DrawRadar
*/
#ifdef ASPECT_RATIO_SCALE
-#define _RADAR_WIDTH ((CMenuManager::m_PrefsSpriteScalingMode==SCL_AUTO) ? (RADAR_HEIGHT) : (RADAR_WIDTH))
+// The values are from from an early screenshot taken before R* broke radar
+#define _RADAR_WIDTH ((CDraw::ms_bFixRadar) ? (82.0f) : (RADAR_WIDTH))
+#define _RADAR_HEIGHT ((CDraw::ms_bFixRadar) ? (82.0f) : (RADAR_HEIGHT))
#else
#define _RADAR_WIDTH RADAR_WIDTH
+#define _RADAR_HEIGHT RADAR_HEIGHT
#endif
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));
- rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+ 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 PS2_HUD
#ifdef FIX_BUGS
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index 4be64ef2..390737f3 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -41,7 +41,7 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
*outh = fovScale * recip * SCREEN_HEIGHT;
#ifdef ASPECT_RATIO_SCALE
- if ( CMenuManager::m_PrefsSpriteScalingMode==SCL_AUTO )
+ if ( CDraw::ms_bFixSprites )
*outw = fovScale * recip * SCREEN_HEIGHT;
#endif