diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-08 17:31:48 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-08 17:31:48 +0100 |
commit | 368d2f3279b474056e888dcccea234f32614b506 (patch) | |
tree | 6ab081b692b3a7e9185076049d4f0655565235e8 /src/render | |
parent | upd (diff) | |
download | re3-368d2f3279b474056e888dcccea234f32614b506.tar re3-368d2f3279b474056e888dcccea234f32614b506.tar.gz re3-368d2f3279b474056e888dcccea234f32614b506.tar.bz2 re3-368d2f3279b474056e888dcccea234f32614b506.tar.lz re3-368d2f3279b474056e888dcccea234f32614b506.tar.xz re3-368d2f3279b474056e888dcccea234f32614b506.tar.zst re3-368d2f3279b474056e888dcccea234f32614b506.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Draw.cpp | 20 | ||||
-rw-r--r-- | src/render/Draw.h | 15 | ||||
-rw-r--r-- | src/render/Hud.cpp | 12 | ||||
-rw-r--r-- | src/render/Sprite.cpp | 9 |
4 files changed, 7 insertions, 49 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index 42015176..fcd5d18f 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -20,12 +20,6 @@ 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) { @@ -81,16 +75,4 @@ CDraw::SetFOV(float fov) ms_fScaledFOV = fov; #endif ms_fFOV = fov; -} - -#ifdef ASPECT_RATIO_SCALE -float CDraw::ScaleY(float y) -{ - switch ( ms_nScalingMode ) - { - case SCL_PC: return y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC); - default: - return y; - } -} -#endif
\ No newline at end of file +}
\ No newline at end of file diff --git a/src/render/Draw.h b/src/render/Draw.h index bd97f76f..45f7906f 100644 --- a/src/render/Draw.h +++ b/src/render/Draw.h @@ -14,12 +14,6 @@ enum eAspectRatio AR_MAX, }; -enum eSpriteScalingMode -{ - SCL_PC, - SCL_PS2, -}; - class CDraw { private: @@ -40,11 +34,6 @@ 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; } @@ -67,8 +56,4 @@ public: #else static float GetAspectRatio(void) { return FindAspectRatio(); } #endif - -#ifdef ASPECT_RATIO_SCALE - static float ScaleY(float y); -#endif }; diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 84146fba..ae7b7eb3 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -1059,18 +1059,10 @@ void CHud::Draw() /* DrawRadar */ -#ifdef ASPECT_RATIO_SCALE -// The values are 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 390737f3..c31c75d2 100644 --- a/src/render/Sprite.cpp +++ b/src/render/Sprite.cpp @@ -37,13 +37,12 @@ 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 = fovScale * recip * SCREEN_HEIGHT; +#else *outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH; - *outh = fovScale * recip * SCREEN_HEIGHT; - -#ifdef ASPECT_RATIO_SCALE - if ( CDraw::ms_bFixSprites ) - *outw = fovScale * recip * SCREEN_HEIGHT; #endif + *outh = fovScale * recip * SCREEN_HEIGHT; return true; } |