summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gamefiles/TEXT/american.gxtbin220216 -> 220146 bytes
-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
-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
-rw-r--r--utils/gxt/american.txt6
11 files changed, 36 insertions, 38 deletions
diff --git a/gamefiles/TEXT/american.gxt b/gamefiles/TEXT/american.gxt
index b8a677e9..cf4bb1e5 100644
--- a/gamefiles/TEXT/american.gxt
+++ b/gamefiles/TEXT/american.gxt
Binary files differ
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");
}
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
diff --git a/utils/gxt/american.txt b/utils/gxt/american.txt
index 3d5d25c5..76b51a89 100644
--- a/utils/gxt/american.txt
+++ b/utils/gxt/american.txt
@@ -8058,9 +8058,6 @@ NEO
[FEM_PS2]
PS2
-[FEM_PC]
-PC
-
[FEM_XBX]
XBOX
@@ -8073,9 +8070,6 @@ INVERT PAD VERTICALLY
[FEM_TWP]
Toggle Waypoint
-[FEC_SCL]
-SPRITE SCALING MODE
-
{ end of file }
[DUMMY]