summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-16 18:14:48 +0200
committerGitHub <noreply@github.com>2019-06-16 18:14:48 +0200
commitbb526541a956f2876936b2e2320c5da9d32d94d1 (patch)
tree593f1f52b771e2acb82c923e016fcbf73b204a7a /src/main.cpp
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
parentChanges for the pull request. (diff)
downloadre3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.gz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.bz2
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.lz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.xz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.zst
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.zip
Diffstat (limited to '')
-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);