image.h (731B)
1 #ifndef TA_IMAGE_H
2 #define TA_IMAGE_H
3
4 #include <tuxanci2/syscall.h>
5 #include <tuxanci2/abi.h>
6 #include <tuxanci2/fixed.h>
7 #include <stdint.h>
8 #include <stdbool.h>
9 #include <stddef.h>
10
11 static inline bool ta_image_init(uint8_t file) {
12 return ta_syscall(TA_SYS_IMAGE_INIT, file, 0, 0, 0, 0, 0) != 0;
13 }
14
15 static inline bool ta_image_draw(uint8_t file, ta_fixed x, ta_fixed y, ta_fixed width, ta_fixed height, uint32_t frame) {
16 return ta_syscall(TA_SYS_IMAGE_DRAW, file, x, y, width, height, frame) != 0;
17 }
18
19 static inline bool ta_image_get_size(uint8_t file, uint32_t *width, uint32_t *height) {
20 return ta_syscall(TA_SYS_IMAGE_GET_SIZE, file, (uint32_t)(size_t)width, (uint32_t)(size_t)height, 0, 0, 0) != 0;
21 }
22
23 #endif // TA_IMAGE_H