diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-23 21:06:17 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-23 21:06:17 +0100 |
commit | 2d00d9cbe6b4bb9740f28fd39958a62b4cf38226 (patch) | |
tree | b569c33e10cdf3d602e9249bc5ce4dc22c103130 /src/core/common.h | |
parent | Merge remote-tracking branch 'upstream/lcs' into lcs (diff) | |
download | re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar.gz re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar.bz2 re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar.lz re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar.xz re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.tar.zst re3-2d00d9cbe6b4bb9740f28fd39958a62b4cf38226.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/common.h b/src/core/common.h index fbc28225..e1d64523 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -200,10 +200,15 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x) #endif +// these are temp marcos while we don't implement all PSP UI coordinates #define PSP_DEFAULT_SCREEN_WIDTH (480) #define PSP_DEFAULT_SCREEN_HEIGHT (272) -#define PSP_SCREEN_SCALE_X(a) SCREEN_SCALE_AR(SCREEN_STRETCH_X(a * ((float)DEFAULT_SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH))) -#define PSP_SCREEN_SCALE_Y(a) SCREEN_STRETCH_Y(a* ((float)DEFAULT_SCREEN_HEIGHT / PSP_DEFAULT_SCREEN_HEIGHT)) + +#define PSP_SCALE_TO_PS2_X(a) (a * ((float)DEFAULT_SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH)) +#define PSP_SCALE_TO_PS2_Y(a) (a * ((float)DEFAULT_SCREEN_HEIGHT / PSP_DEFAULT_SCREEN_HEIGHT)) + +#define PSP_SCREEN_SCALE_X(a) SCREEN_STRETCH_X(PSP_SCALE_TO_PS2_X(a)) +#define PSP_SCREEN_SCALE_Y(a) SCREEN_STRETCH_Y(PSP_SCALE_TO_PS2_Y(a)) #define PSP_SCREEN_SCALE_FROM_RIGHT(a) (SCREEN_WIDTH - PSP_SCREEN_SCALE_X(a)) #define PSP_SCREEN_SCALE_FROM_BOTTOM(a) (SCREEN_HEIGHT - PSP_SCREEN_SCALE_Y(a)) |