This commit is contained in:
Fire-Head 2021-01-05 04:17:18 +03:00
parent bc7161754f
commit 11de714d9d
11 changed files with 36 additions and 38 deletions

Binary file not shown.

View File

@ -141,10 +141,6 @@ int8 CMenuManager::m_nPrefsMSAALevel = 0;
int8 CMenuManager::m_nDisplayMSAALevel = 0; int8 CMenuManager::m_nDisplayMSAALevel = 0;
#endif #endif
#ifdef ASPECT_RATIO_SCALE
int32 CMenuManager::m_PrefsSpriteScalingMode = SCL_AUTO;
#endif
#ifdef NO_ISLAND_LOADING #ifdef NO_ISLAND_LOADING
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW; int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif #endif

View File

@ -636,9 +636,6 @@ public:
static int8 m_nDisplayMSAALevel; static int8 m_nDisplayMSAALevel;
#endif #endif
#ifdef ASPECT_RATIO_SCALE
static int32 m_PrefsSpriteScalingMode;
#endif
enum LANGUAGE enum LANGUAGE
{ {
LANGUAGE_AMERICAN, LANGUAGE_AMERICAN,

View File

@ -73,12 +73,6 @@
#define INVERT_PAD_SELECTOR #define INVERT_PAD_SELECTOR
#endif #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 *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
const char *off_on[] = { "FEM_OFF", "FEM_ON" }; const char *off_on[] = { "FEM_OFF", "FEM_ON" };
@ -337,15 +331,6 @@ wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
} }
#endif #endif
#ifdef ASPECT_RATIO_SCALE
const char* SpriteScalingModes[] =
{
"FEM_PC",
"FEM_PS2",
"FEM_AUT"
};
#endif
CMenuScreenCustom aScreens[MENUPAGES] = { CMenuScreenCustom aScreens[MENUPAGES] = {
// MENUPAGE_NONE = 0 // MENUPAGE_NONE = 0
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, }, { "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, },
@ -400,7 +385,6 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
#endif #endif
MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_WIDESCREEN, "FED_WIS", { 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 }, MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
VIDEOMODE_SELECTOR VIDEOMODE_SELECTOR
MULTISAMPLING_SELECTOR MULTISAMPLING_SELECTOR
@ -832,7 +816,6 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
HUD_ASPECT_RATIO_SELECTOR
VIDEOMODE_SELECTOR VIDEOMODE_SELECTOR
MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },

View File

@ -1298,9 +1298,12 @@ void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &i
#endif #endif
{ {
#ifdef ASPECT_RATIO_SCALE #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 #else
#define _RADAR_WIDTH RADAR_WIDTH #define _RADAR_WIDTH RADAR_WIDTH
#define _RADAR_HEIGHT RADAR_HEIGHT
#endif #endif
#ifdef FIX_BUGS #ifdef FIX_BUGS
@ -1308,7 +1311,7 @@ void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &i
#else #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 #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);
} }
} }

View File

@ -214,6 +214,12 @@ void LoadINISettings()
CustomPipes::LightmapMult = CheckAndReadIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult); CustomPipes::LightmapMult = CheckAndReadIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult);
CustomPipes::GlossMult = CheckAndReadIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult); CustomPipes::GlossMult = CheckAndReadIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
#endif #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() void SaveINISettings()
@ -253,6 +259,12 @@ void SaveINISettings()
CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed); CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed);
#endif #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) if (changed)
cfg.write_file("re3.ini"); cfg.write_file("re3.ini");
} }

View File

@ -20,6 +20,12 @@ uint8 CDraw::FadeRed;
uint8 CDraw::FadeGreen; uint8 CDraw::FadeGreen;
uint8 CDraw::FadeBlue; 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 float
CDraw::FindAspectRatio(void) CDraw::FindAspectRatio(void)
{ {
@ -80,7 +86,7 @@ CDraw::SetFOV(float fov)
#ifdef ASPECT_RATIO_SCALE #ifdef ASPECT_RATIO_SCALE
float CDraw::ScaleY(float y) float CDraw::ScaleY(float y)
{ {
switch ( CMenuManager::m_PrefsSpriteScalingMode ) switch ( ms_nScalingMode )
{ {
case SCL_PC: return y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC); case SCL_PC: return y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
default: default:

View File

@ -18,7 +18,6 @@ enum eSpriteScalingMode
{ {
SCL_PC, SCL_PC,
SCL_PS2, SCL_PS2,
SCL_AUTO,
}; };
class CDraw class CDraw
@ -41,6 +40,11 @@ public:
static uint8 FadeRed; static uint8 FadeRed;
static uint8 FadeGreen; static uint8 FadeGreen;
static uint8 FadeBlue; 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 void SetNearClipZ(float nearclip) { ms_fNearClipZ = nearclip; }
static float GetNearClipZ(void) { return ms_fNearClipZ; } static float GetNearClipZ(void) { return ms_fNearClipZ; }

View File

@ -1060,14 +1060,17 @@ void CHud::Draw()
DrawRadar DrawRadar
*/ */
#ifdef ASPECT_RATIO_SCALE #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 #else
#define _RADAR_WIDTH RADAR_WIDTH #define _RADAR_WIDTH RADAR_WIDTH
#define _RADAR_HEIGHT RADAR_HEIGHT
#endif #endif
if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) { if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) {
CRadar::DrawMap(); CRadar::DrawMap();
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(_RADAR_WIDTH), SCREEN_SCALE_Y(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)); rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + _RADAR_HEIGHT));
#ifdef PS2_HUD #ifdef PS2_HUD
#ifdef FIX_BUGS #ifdef FIX_BUGS

View File

@ -41,7 +41,7 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
*outh = fovScale * recip * SCREEN_HEIGHT; *outh = fovScale * recip * SCREEN_HEIGHT;
#ifdef ASPECT_RATIO_SCALE #ifdef ASPECT_RATIO_SCALE
if ( CMenuManager::m_PrefsSpriteScalingMode==SCL_AUTO ) if ( CDraw::ms_bFixSprites )
*outw = fovScale * recip * SCREEN_HEIGHT; *outw = fovScale * recip * SCREEN_HEIGHT;
#endif #endif

View File

@ -8058,9 +8058,6 @@ NEO
[FEM_PS2] [FEM_PS2]
PS2 PS2
[FEM_PC]
PC
[FEM_XBX] [FEM_XBX]
XBOX XBOX
@ -8073,9 +8070,6 @@ INVERT PAD VERTICALLY
[FEM_TWP] [FEM_TWP]
Toggle Waypoint Toggle Waypoint
[FEC_SCL]
SPRITE SCALING MODE
{ end of file } { end of file }
[DUMMY] [DUMMY]