diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-09-29 21:53:12 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-09-30 01:41:42 +0200 |
commit | f71953077d2412c4542e616cc9748217dfe046c7 (patch) | |
tree | 3a3adac3c9d143686d198fff3360f8a9945cff67 /src/render/Draw.cpp | |
parent | Merge pull request #727 from erorcun/miami (diff) | |
download | re3-f71953077d2412c4542e616cc9748217dfe046c7.tar re3-f71953077d2412c4542e616cc9748217dfe046c7.tar.gz re3-f71953077d2412c4542e616cc9748217dfe046c7.tar.bz2 re3-f71953077d2412c4542e616cc9748217dfe046c7.tar.lz re3-f71953077d2412c4542e616cc9748217dfe046c7.tar.xz re3-f71953077d2412c4542e616cc9748217dfe046c7.tar.zst re3-f71953077d2412c4542e616cc9748217dfe046c7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Draw.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index ab360aac..131534a3 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -69,3 +69,14 @@ CDraw::SetFOV(float fov) #endif ms_fFOV = fov; } + +#ifdef ASPECT_RATIO_SCALE +float +ScaleAndCenterX(float x) +{ + if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) + return x; + else + return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x); +} +#endif
\ No newline at end of file |