summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-06-16 00:20:55 +0200
committer_AG <gennariarmando@outlook.com>2019-06-16 00:24:13 +0200
commitb83a0d469af25f9756698378e6e928abaa4ec7d0 (patch)
tree57d7b6352c1d7c093218a2035eecc812f6b43907 /src/main.cpp
parentNew updates for Hud.cpp and more. (diff)
downloadre3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.gz
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.bz2
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.lz
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.xz
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.zst
re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9b8fc145..38666979 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -86,6 +86,7 @@ RwRGBA gColourTop;
void
Idle(void *arg)
{
+ CDraw::CalculateAspectRatio();
CTimer::Update();
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
@@ -141,7 +142,7 @@ Idle(void *arg)
}else{
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
// ASPECT
- CameraSize(Scene.camera, nil, viewWindow, 4.0f/3.0f);
+ CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
if(!RsCameraBeginUpdate(Scene.camera))
@@ -161,6 +162,7 @@ Idle(void *arg)
void
FrontendIdle(void)
{
+ CDraw::CalculateAspectRatio();
CTimer::Update();
CSprite2d::SetRecipNearClip();
CSprite2d::InitPerFrame();
@@ -173,7 +175,7 @@ FrontendIdle(void)
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
// ASPECT
- CameraSize(Scene.camera, nil, viewWindow, 4.0f/3.0f);
+ CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
if(!RsCameraBeginUpdate(Scene.camera))
@@ -190,13 +192,13 @@ FrontendIdle(void)
bool
DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha)
{
+ CDraw::CalculateAspectRatio();
CRGBA TopColor(TopRed, TopGreen, TopBlue, Alpha);
CRGBA BottomColor(BottomRed, BottomGreen, BottomBlue, Alpha);
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
// ASPECT
- float aspectRatio = CMenuManager::m_PrefsUseWideScreen ? 16.0f/9.0f : 4.0f/3.0f;
- CameraSize(Scene.camera, nil, viewWindow, aspectRatio);
+ CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
@@ -214,10 +216,10 @@ DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomR
bool
DoRWStuffStartOfFrame_Horizon(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha)
{
+ CDraw::CalculateAspectRatio();
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
// ASPECT
- float aspectRatio = CMenuManager::m_PrefsUseWideScreen ? 16.0f/9.0f : 4.0f/3.0f;
- CameraSize(Scene.camera, nil, viewWindow, aspectRatio);
+ CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);