mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-26 09:23:44 +00:00
More scaling macro
This commit is contained in:
parent
d28e9a7b62
commit
2d00d9cbe6
1 changed files with 7 additions and 2 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue