diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-16 21:44:05 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-16 21:44:05 +0200 |
commit | beb6f0d4c75fa5f7be4998f78929e0a66fc9540c (patch) | |
tree | 8a1f28b7f4987d222c26749e99529f9002e0f0ca /src/common.h | |
parent | CPed fixes and needed functions for further commits (diff) | |
parent | fix the cleanup... (diff) | |
download | re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.gz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.bz2 re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.lz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.xz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.zst re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 4187e0c3..a9055391 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) @@ -68,10 +71,16 @@ extern void **rwengine; #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_AR(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)) * (4.0/3.0f)/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)) +#define HUD_STRETCH_X SCREEN_STRETCH_X_AR +#define HUD_STRETCH_Y SCREEN_STRETCH_Y +#define HUD_FROM_RIGHT(a) (SCREEN_WIDTH - HUD_STRETCH_X(a)) +#define HUD_FROM_BOTTOM(a) (SCREEN_HEIGHT - HUD_STRETCH_Y(a)) + struct GlobalScene { RpWorld *world; |