diff options
author | _AG <gennariarmando@outlook.com> | 2019-06-16 00:20:55 +0200 |
---|---|---|
committer | _AG <gennariarmando@outlook.com> | 2019-06-16 00:24:13 +0200 |
commit | b83a0d469af25f9756698378e6e928abaa4ec7d0 (patch) | |
tree | 57d7b6352c1d7c093218a2035eecc812f6b43907 /src/common.h | |
parent | New updates for Hud.cpp and more. (diff) | |
download | re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.gz re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.bz2 re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.lz re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.xz re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.tar.zst re3-b83a0d469af25f9756698378e6e928abaa4ec7d0.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 966af022..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))) * Float(1.33334f / (CMenuManager::m_PrefsUseWideScreen ? 16.0f / 9.0f : 4.0f / 3.0f)) +#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)) |