mirror of
https://github.com/halpz/re3.git
synced 2025-07-26 08:22:46 +00:00
sync with re3
-radardisc shadow fix -fix for the dimension where moon is round -correct radar based on the early gta 3 screenshot -proper scaling based on ps2 gta 3 -ini and debugmenu options
This commit is contained in:
@ -20,6 +20,16 @@ uint8 CDraw::FadeRed;
|
||||
uint8 CDraw::FadeGreen;
|
||||
uint8 CDraw::FadeBlue;
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
bool CDraw::ms_bProperScaling = true;
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
bool CDraw::ms_bFixRadar = true;
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
bool CDraw::ms_bFixSprites = true;
|
||||
#endif
|
||||
|
||||
float
|
||||
CDraw::CalculateAspectRatio(void)
|
||||
{
|
||||
@ -75,13 +85,9 @@ CDraw::SetFOV(float fov)
|
||||
ms_fFOV = fov;
|
||||
}
|
||||
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
float
|
||||
ScaleAndCenterX(float x)
|
||||
#ifdef PROPER_SCALING
|
||||
float CDraw::ScaleY(float y)
|
||||
{
|
||||
if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
|
||||
return x;
|
||||
else
|
||||
return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
|
||||
return ms_bProperScaling ? y : y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -30,6 +30,16 @@ public:
|
||||
static uint8 FadeRed;
|
||||
static uint8 FadeGreen;
|
||||
static uint8 FadeBlue;
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
static bool ms_bProperScaling;
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
static bool ms_bFixRadar;
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
static bool ms_bFixSprites;
|
||||
#endif
|
||||
|
||||
static void SetNearClipZ(float nearclip) { ms_fNearClipZ = nearclip; }
|
||||
static float GetNearClipZ(void) { return ms_fNearClipZ; }
|
||||
@ -50,4 +60,7 @@ public:
|
||||
#endif
|
||||
static float GetAspectRatio(void) { return ms_fAspectRatio; }
|
||||
static void SetAspectRatio(float ratio) { ms_fAspectRatio = ratio; }
|
||||
#ifdef PROPER_SCALING
|
||||
static float ScaleY(float y);
|
||||
#endif
|
||||
};
|
||||
|
@ -28,6 +28,16 @@
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
#if defined(FIX_BUGS)
|
||||
#define SCREEN_SCALE_X_FIX(a) SCREEN_SCALE_X(a)
|
||||
#define SCREEN_SCALE_Y_FIX(a) SCREEN_SCALE_Y(a)
|
||||
#define SCALE_AND_CENTER_X_FIX(a) SCALE_AND_CENTER_X(a)
|
||||
#else
|
||||
#define SCREEN_SCALE_X_FIX(a) (a)
|
||||
#define SCREEN_SCALE_Y_FIX(a) (a)
|
||||
#define SCALE_AND_CENTER_X_FIX(a) (a)
|
||||
#endif
|
||||
|
||||
// Game has colors inlined in code.
|
||||
// For easier modification we collect them here:
|
||||
CRGBA MONEY_COLOR(0, 207, 133, 255);
|
||||
@ -1052,16 +1062,17 @@ void CHud::Draw()
|
||||
CRadar::DrawMap();
|
||||
if (FrontEndMenuManager.m_PrefsRadarMode != 1) {
|
||||
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
|
||||
#ifdef FIX_BUGS
|
||||
rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
#else
|
||||
rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
#endif
|
||||
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
rect.Grow(SCREEN_SCALE_X(6.0f), SCREEN_SCALE_X(6.0f), SCREEN_SCALE_Y(6.0f), SCREEN_SCALE_Y(6.0f));
|
||||
#else
|
||||
rect.Grow(6.0f);
|
||||
rect.Translate(0.0f, 2.0f);
|
||||
#endif
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(2.0f));
|
||||
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
|
||||
rect.Translate(0.0f, -2.0f);
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(-2.0f));
|
||||
Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
|
||||
}
|
||||
CRadar::DrawBlips();
|
||||
|
@ -33,7 +33,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
|
||||
// this is used to scale correctly if you zoom in with sniper rifle
|
||||
float fovScale = fov / CDraw::GetFOV();
|
||||
|
||||
#ifdef FIX_SPRITES
|
||||
*outw = CDraw::ms_bFixSprites ? (fovScale * recip * SCREEN_HEIGHT) : (fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH);
|
||||
#else
|
||||
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
|
||||
#endif
|
||||
*outh = fovScale * recip * SCREEN_HEIGHT;
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user