summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-09-27 18:21:16 +0200
committereray orçunus <erayorcunus@gmail.com>2020-09-27 18:22:21 +0200
commit70aac0f460a9e57956de00ae5d84d8bb4bf4643c (patch)
tree92e3d8073b6e9e4ad8ae3ee7d8a2460c7e079cca /src/render/Draw.cpp
parentFixes (diff)
downloadre3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar.gz
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar.bz2
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar.lz
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar.xz
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.tar.zst
re3-70aac0f460a9e57956de00ae5d84d8bb4bf4643c.zip
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r--src/render/Draw.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index db87e76d..4e323ec2 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -70,3 +70,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