summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2021-01-05 02:17:18 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2021-01-05 02:17:18 +0100
commit11de714d9dbeabb59129d29acb9e433c538ba4ba (patch)
tree99e973277c2986aceb45886684cee34191cfa6e4 /src/core
parentfix compiling (diff)
downloadre3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar.gz
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar.bz2
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar.lz
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar.xz
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.tar.zst
re3-11de714d9dbeabb59129d29acb9e433c538ba4ba.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Frontend.cpp4
-rw-r--r--src/core/Frontend.h3
-rw-r--r--src/core/MenuScreensCustom.cpp17
-rw-r--r--src/core/Radar.cpp7
-rw-r--r--src/core/re3.cpp12
5 files changed, 17 insertions, 26 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 93322fd9..a8041902 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -141,10 +141,6 @@ int8 CMenuManager::m_nPrefsMSAALevel = 0;
int8 CMenuManager::m_nDisplayMSAALevel = 0;
#endif
-#ifdef ASPECT_RATIO_SCALE
-int32 CMenuManager::m_PrefsSpriteScalingMode = SCL_AUTO;
-#endif
-
#ifdef NO_ISLAND_LOADING
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 68f249ee..8cf3dd28 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -636,9 +636,6 @@ public:
static int8 m_nDisplayMSAALevel;
#endif
-#ifdef ASPECT_RATIO_SCALE
- static int32 m_PrefsSpriteScalingMode;
-#endif
enum LANGUAGE
{
LANGUAGE_AMERICAN,
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index 42ddd908..9a763f8c 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -73,12 +73,6 @@
#define INVERT_PAD_SELECTOR
#endif
-#ifdef ASPECT_RATIO_SCALE
- #define HUD_ASPECT_RATIO_SELECTOR MENUACTION_CFO_SELECT, "FEC_SCL", { new CCFOSelect((int8*)&CMenuManager::m_PrefsSpriteScalingMode, "SpriteScaling", SpriteScalingModes, ARRAY_SIZE(SpriteScalingModes), false, nil) },
-#else
- #define HUD_ASPECT_RATIO_SELECTOR
-#endif
-
const char *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
@@ -337,15 +331,6 @@ wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
}
#endif
-#ifdef ASPECT_RATIO_SCALE
-const char* SpriteScalingModes[] =
-{
- "FEM_PC",
- "FEM_PS2",
- "FEM_AUT"
-};
-#endif
-
CMenuScreenCustom aScreens[MENUPAGES] = {
// MENUPAGE_NONE = 0
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, },
@@ -400,7 +385,6 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
#endif
MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
- HUD_ASPECT_RATIO_SELECTOR
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
VIDEOMODE_SELECTOR
MULTISAMPLING_SELECTOR
@@ -832,7 +816,6 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
- HUD_ASPECT_RATIO_SELECTOR
VIDEOMODE_SELECTOR
MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 2b72e0fb..7af51929 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1298,9 +1298,12 @@ void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &i
#endif
{
#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
#ifdef FIX_BUGS
@@ -1308,7 +1311,7 @@ void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &i
#else
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/re3.cpp b/src/core/re3.cpp
index 87244e2a..14457db4 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -214,6 +214,12 @@ 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()
@@ -253,6 +259,12 @@ 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");
}