summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-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);