display.h (653B)
1 #ifndef TA_DISPLAY_H
2 #define TA_DISPLAY_H
3
4 #include <tuxanci2/syscall.h>
5 #include <tuxanci2/abi.h>
6 #include <stdint.h>
7 #include <stdbool.h>
8
9 #define TA_DISPLAY_RGB(red, green, blue) ((((uint32_t)(red) & 255u) << 16) | (((uint32_t)(green) & 255u) << 8) | ((uint32_t)(blue) & 255u))
10
11 static inline uint32_t ta_display_width(void) {
12 return ta_syscall(TA_SYS_DISPLAY_WIDTH, 0, 0, 0, 0, 0, 0);
13 }
14
15 static inline uint32_t ta_display_height(void) {
16 return ta_syscall(TA_SYS_DISPLAY_HEIGHT, 0, 0, 0, 0, 0, 0);
17 }
18
19 static inline bool ta_display_sprite_mode(void) {
20 return ta_syscall(TA_SYS_DISPLAY_SPRITE_MODE, 0, 0, 0, 0, 0, 0) != 0;
21 }
22
23 #endif // TA_DISPLAY_H