summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-23 17:56:27 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-23 17:56:27 +0100
commit13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6 (patch)
tree2d82e661f282eed626ed3b691395a3e9dfaaf98a /src/core
parentFix ini name (diff)
downloadre3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar.gz
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar.bz2
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar.lz
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar.xz
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.tar.zst
re3-13507d422ba9cf9a17d0ae9cc0f7ec0052e1d6b6.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 349392f4..fbc28225 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -200,6 +200,13 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x)
#endif
+#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_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))
+
#include "maths.h"
#include "Vector.h"
#include "Vector2D.h"