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

View File

@ -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:

View File

@ -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; }

View File

@ -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

View File

@ -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