diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2021-01-08 17:43:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 17:43:31 +0100 |
commit | 6e42c791cf3bbcb59363ab913a4d909b5345ab1b (patch) | |
tree | f39e4ab8a86ccfae72bf59b3ce984a02cc13b50a /src/core/common.h | |
parent | Merge pull request #930 from Nick007J/master (diff) | |
parent | bb .ini hello defines (diff) | |
download | re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.gz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.bz2 re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.lz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.xz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.zst re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/common.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/common.h b/src/core/common.h index 50002ab5..5767b087 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -121,7 +121,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #include "skeleton.h" #include "Draw.h" -#if defined(USE_PROPER_SCALING) +#if defined(PROPER_SCALING) || defined(PS2_HUD) #ifdef FORCE_PC_SCALING #define DEFAULT_SCREEN_WIDTH (640) #define DEFAULT_SCREEN_HEIGHT (448) @@ -155,8 +155,8 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #define SCREEN_HEIGHT ((float)RsGlobal.height) #endif -#define SCREEN_HEIGHT_PAL (512) -#define SCREEN_HEIGHT_NTSC (448) +#define SCREEN_HEIGHT_PAL ((float)512) +#define SCREEN_HEIGHT_NTSC ((float)448) #define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio()) #define SCREEN_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetScaledFOV() * 0.5f))) @@ -175,8 +175,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #ifdef ASPECT_RATIO_SCALE #define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO) -extern float ScaleAndCenterX(float x); -#define SCALE_AND_CENTER_X(x) ScaleAndCenterX(x) +#define SCALE_AND_CENTER_X(x) ((SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) ? (x) : (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X((x))) #else #define SCREEN_SCALE_AR(a) (a) #define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x) |