summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Radar.cpp15
-rw-r--r--src/core/Radar.h18
-rw-r--r--src/core/common.h6
-rw-r--r--src/core/config.h4
-rw-r--r--src/core/re3.cpp12
5 files changed, 26 insertions, 29 deletions
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index f8227bf7..816da6b9 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1297,21 +1297,12 @@ void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &i
} else
#endif
{
-#ifdef ASPECT_RATIO_SCALE
-// The values are 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
-
#ifdef FIX_BUGS
- out.x = (in.x + 1.0f) * 0.5f * SCREEN_SCALE_X(_RADAR_WIDTH) + SCREEN_SCALE_X(RADAR_LEFT);
+ out.x = (in.x + 1.0f) * 0.5f * SCREEN_SCALE_X(RADAR_WIDTH) + SCREEN_SCALE_X(RADAR_LEFT);
#else
- out.x = (in.x + 1.0f) * 0.5f * SCREEN_SCALE_X(_RADAR_WIDTH) + RADAR_LEFT;
+ out.x = (in.x + 1.0f) * 0.5f * SCREEN_SCALE_X(RADAR_WIDTH) + RADAR_LEFT;
#endif
- out.y = (1.0f - in.y) * 0.5f * SCREEN_SCALE_Y(_RADAR_HEIGHT) + SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + _RADAR_HEIGHT);
+ out.y = (1.0f - in.y) * 0.5f * SCREEN_SCALE_Y(RADAR_HEIGHT) + SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT);
}
}
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 44d94370..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(ASPECT_RATIO_SCALE)
+#if defined(PROPER_SCALING) || defined(PS2_HUD)
#ifdef FORCE_PC_SCALING
#define DEFAULT_SCREEN_WIDTH (640)
#define DEFAULT_SCREEN_HEIGHT (448)
@@ -176,10 +176,6 @@ 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)
#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)))
- #ifndef FORCE_PC_SCALING
- #undef SCREEN_SCALE_Y
- #define SCREEN_SCALE_Y(a) CDraw::ScaleY(SCREEN_STRETCH_Y(a))
- #endif
#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 a9bb1a17..3d5ef281 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
@@ -254,6 +255,8 @@ enum Config {
#define SCREEN_DROPLETS // neo water droplets
#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
@@ -282,6 +285,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/core/re3.cpp b/src/core/re3.cpp
index 14457db4..87244e2a 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -214,12 +214,6 @@ void LoadINISettings()
CustomPipes::LightmapMult = CheckAndReadIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult);
CustomPipes::GlossMult = CheckAndReadIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
#endif
-
-#ifdef ASPECT_RATIO_SCALE
- CDraw::ms_nScalingMode = CheckAndReadIniInt("Draw", "ScalingMode", CDraw::ms_nScalingMode);
- CDraw::ms_bFixRadar = CheckAndReadIniInt("Draw", "FixRadar", CDraw::ms_bFixRadar);
- CDraw::ms_bFixSprites = CheckAndReadIniInt("Draw", "FixSpritesAspectRatio", CDraw::ms_bFixSprites);
-#endif
}
void SaveINISettings()
@@ -259,12 +253,6 @@ void SaveINISettings()
CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed);
#endif
-#ifdef ASPECT_RATIO_SCALE
- CheckAndSaveIniInt("Draw", "ScalingMode", CDraw::ms_nScalingMode, changed);
- CheckAndSaveIniInt("Draw", "FixRadar", CDraw::ms_bFixRadar, changed);
- CheckAndSaveIniInt("Draw", "FixSpritesAspectRatio", CDraw::ms_bFixSprites, changed);
-#endif
-
if (changed)
cfg.write_file("re3.ini");
}