diff options
author | aap <aap@papnet.eu> | 2020-06-21 14:50:00 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-06-21 14:50:00 +0200 |
commit | 98baa36f1a83362a67c46c2eb75539876b64b5b9 (patch) | |
tree | b8051af78f2479d156729b640b5b336158b1f22a /src/render | |
parent | ps2 cam transitions done (hopefully) (diff) | |
download | re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar.gz re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar.bz2 re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar.lz re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar.xz re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.tar.zst re3-98baa36f1a83362a67c46c2eb75539876b64b5b9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Draw.cpp | 6 | ||||
-rw-r--r-- | src/render/Draw.h | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index b31cc624..bb37a3a3 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -6,6 +6,7 @@ #ifdef ASPECT_RATIO_SCALE float CDraw::ms_fAspectRatio = DEFAULT_ASPECT_RATIO; +float CDraw::ms_fScaledFOV = 45.0f; #endif float CDraw::ms_fNearClipZ; @@ -61,8 +62,7 @@ void CDraw::SetFOV(float fov) { #ifdef ASPECT_RATIO_SCALE - ms_fFOV = ConvertFOV(fov); -#else - ms_fFOV = fov; + ms_fScaledFOV = ConvertFOV(fov); #endif + ms_fFOV = fov; } diff --git a/src/render/Draw.h b/src/render/Draw.h index 55958a2a..5c4f95b1 100644 --- a/src/render/Draw.h +++ b/src/render/Draw.h @@ -16,14 +16,15 @@ private: static float ms_fNearClipZ; static float ms_fFarClipZ; static float ms_fFOV; -public: - static float ms_fLODDistance; // set but unused? - #ifdef ASPECT_RATIO_SCALE // we use this variable to scale a lot of 2D elements // so better cache it static float ms_fAspectRatio; + // similar thing for 3D rendering + static float ms_fScaledFOV; #endif +public: + static float ms_fLODDistance; // set but unused? static uint8 FadeValue; static uint8 FadeRed; @@ -37,6 +38,11 @@ public: static void SetFOV(float fov); static float GetFOV(void) { return ms_fFOV; } +#ifdef ASPECT_RATIO_SCALE + static float GetScaledFOV(void) { return ms_fScaledFOV; } +#else + static float GetScaledFOV(void) { return ms_fFOV; } +#endif static float FindAspectRatio(void); #ifdef ASPECT_RATIO_SCALE |