summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-24 16:21:50 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-24 16:21:50 +0100
commite79e8b30e04403504a20bffbd2f419370c1177cc (patch)
tree8d8e99750f57d9ade2a51d17b2c2662e9b71dfd1 /src/core/common.h
parentFix CCollision::DistToLine (diff)
downloadre3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar.gz
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar.bz2
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar.lz
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar.xz
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.tar.zst
re3-e79e8b30e04403504a20bffbd2f419370c1177cc.zip
Diffstat (limited to 'src/core/common.h')
-rw-r--r--src/core/common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/common.h b/src/core/common.h
index e1d64523..b059b8b7 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -204,11 +204,11 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
#define PSP_DEFAULT_SCREEN_WIDTH (480)
#define PSP_DEFAULT_SCREEN_HEIGHT (272)
-#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_SCALE_TO_PS2_X(a) ((float)a * ((float)DEFAULT_SCREEN_WIDTH / (float)PSP_DEFAULT_SCREEN_WIDTH))
+#define PSP_SCALE_TO_PS2_Y(a) ((float)a * ((float)DEFAULT_SCREEN_HEIGHT / (float)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_X(a) ((a) * (float) SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH)
+#define PSP_SCREEN_SCALE_Y(a) ((a) * (float) SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH)
#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))