diff options
author | aap <aap@papnet.eu> | 2019-06-16 18:14:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-16 18:14:48 +0200 |
commit | bb526541a956f2876936b2e2320c5da9d32d94d1 (patch) | |
tree | 593f1f52b771e2acb82c923e016fcbf73b204a7a /src/common.h | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
parent | Changes for the pull request. (diff) | |
download | re3-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.h | 5 |
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)) |