summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-16 19:06:01 +0200
committeraap <aap@papnet.eu>2019-06-16 19:06:01 +0200
commit2a207af49a922fe65bb3e69489aa3e075b72c3e3 (patch)
tree84a2905bb318205f01481a2512178c36133a63ea /src/main.cpp
parentMerge pull request #17 from gennariarmando/master (diff)
downloadre3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar.gz
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar.bz2
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar.lz
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar.xz
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.tar.zst
re3-2a207af49a922fe65bb3e69489aa3e075b72c3e3.zip
Diffstat (limited to '')
-rw-r--r--src/main.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 38666979..976de407 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -86,7 +86,6 @@ RwRGBA gColourTop;
void
Idle(void *arg)
{
- CDraw::CalculateAspectRatio();
CTimer::Update();
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
@@ -141,7 +140,7 @@ Idle(void *arg)
Render2dStuff();
}else{
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
- // ASPECT
+ CDraw::CalculateAspectRatio();
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
@@ -162,7 +161,6 @@ Idle(void *arg)
void
FrontendIdle(void)
{
- CDraw::CalculateAspectRatio();
CTimer::Update();
CSprite2d::SetRecipNearClip();
CSprite2d::InitPerFrame();
@@ -174,7 +172,7 @@ FrontendIdle(void)
return;
float viewWindow = tan(DEGTORAD(CDraw::GetFOV() * 0.5f));
- // ASPECT
+ CDraw::CalculateAspectRatio();
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
@@ -192,12 +190,11 @@ 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
+ CDraw::CalculateAspectRatio();
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
@@ -216,9 +213,8 @@ 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
+ CDraw::CalculateAspectRatio();
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);