summaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-16 18:14:48 +0200
committerGitHub <noreply@github.com>2019-06-16 18:14:48 +0200
commitbb526541a956f2876936b2e2320c5da9d32d94d1 (patch)
tree593f1f52b771e2acb82c923e016fcbf73b204a7a /src/common.h
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
parentChanges for the pull request. (diff)
downloadre3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.gz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.bz2
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.lz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.xz
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.tar.zst
re3-bb526541a956f2876936b2e2320c5da9d32d94d1.zip
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 4187e0c3..d31ad18c 100644
--- a/src/common.h
+++ b/src/common.h
@@ -59,6 +59,9 @@ extern void **rwengine;
#define RwEngineInstance (*rwengine)
#include "skel\skeleton.h"
+#include "Draw.h"
+
+#define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio())
#define SCREENW (RsGlobal.maximumWidth)
#define SCREENH (RsGlobal.maximumHeight)
@@ -67,7 +70,7 @@ extern void **rwengine;
#define DEFAULT_SCREEN_HEIGHT (448)
#define SCREEN_WIDTH Float(RsGlobal.width)
#define SCREEN_HEIGHT Float(RsGlobal.height)
-#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)))
+#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float((1.3333334f) / (SCREEN_ASPECT_RATIO))
#define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT)))
#define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a))
#define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))