From 60f736f20fe9493936dab95963b52b18d3353ffc Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 21 Jun 2020 14:50:00 +0200 Subject: FOV fix --- src/core/Camera.cpp | 2 +- src/core/common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 45659f72..e67c68d2 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -3994,7 +3994,7 @@ CCamera::CalculateDerivedValues(void) { m_cameraMatrix = Invert(m_matrix); - float hfov = DEGTORAD(CDraw::GetFOV()/2.0f); + float hfov = DEGTORAD(CDraw::GetScaledFOV()/2.0f); float c = cos(hfov); float s = sin(hfov); diff --git a/src/core/common.h b/src/core/common.h index eb43d8d5..d7c9a1f7 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -111,7 +111,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #define SCREEN_WIDTH ((float)RsGlobal.width) #define SCREEN_HEIGHT ((float)RsGlobal.height) #define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio()) -#define SCREEN_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetFOV() * 0.5f))) +#define SCREEN_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetScaledFOV() * 0.5f))) // This scales from PS2 pixel coordinates to the real resolution #define SCREEN_STRETCH_X(a) ((a) * (float) SCREEN_WIDTH / DEFAULT_SCREEN_WIDTH) -- cgit v1.2.3