summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.cpp
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-07-03 17:26:15 +0200
committer_AG <gennariarmando@outlook.com>2019-07-03 17:30:26 +0200
commit69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37 (patch)
treec7136d627079976fc976cd7b6d66e7ef46cf79f1 /src/render/Draw.cpp
parentfixed boat rendering (diff)
downloadre3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar.gz
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar.bz2
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar.lz
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar.xz
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.tar.zst
re3-69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37.zip
Diffstat (limited to '')
-rw-r--r--src/render/Draw.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 922d96d4..f825ba42 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -20,12 +20,24 @@ uint8 &CDraw::FadeBlue = *(uint8*)0x95CD53;
float
CDraw::FindAspectRatio(void)
{
+#ifndef ASPECT_RATIO_SCALE
if(FrontEndMenuManager.m_PrefsUseWideScreen)
return 16.0f/9.0f;
else
return 4.0f/3.0f;
+#else
+ switch (FrontEndMenuManager.m_PrefsUseWideScreen) {
+ case AR_AUTO:
+ return SCREEN_WIDTH / SCREEN_HEIGHT;
+ case AR_4_3:
+ return 4.0f / 3.0f;
+ case AR_16_9:
+ return 16.0f / 9.0f;
+ };
+#endif
}
+#ifdef ASPECT_RATIO_SCALE
// convert a 4:3 hFOV to vFOV,
// then convert that vFOV to hFOV for our aspect ratio,
// i.e. HOR+
@@ -41,6 +53,7 @@ CDraw::ConvertFOV(float hfov)
hfov = atan(tan(vfov/2) * ar2) *2;
return RADTODEG(hfov);
}
+#endif
void
CDraw::SetFOV(float fov)