summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-03 17:35:09 +0200
committerGitHub <noreply@github.com>2019-07-03 17:35:09 +0200
commit92af18c165444080fae8bcd2dc9ea6f439ac0039 (patch)
treec7136d627079976fc976cd7b6d66e7ef46cf79f1 /src/render/Draw.cpp
parentfixed boat rendering (diff)
parentUpdate Frontend. (diff)
downloadre3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar.gz
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar.bz2
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar.lz
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar.xz
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.tar.zst
re3-92af18c165444080fae8bcd2dc9ea6f439ac0039.zip
Diffstat (limited to 'src/render/Draw.cpp')
-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)