Update colour_t to use a union

This commit is contained in:
abdelrahman committed 2023-12-27 22:03:14 +00:00
1 parent 0345f90405
commit 9b22ce61d5
3 files changed
+23 -19

No files matched your search

+10 -3
View File
@@ -7,10 +7,17 @@
#include <stdbool.h>
typedef struct {
u8 r;
u8 g;
u8 b;
u8 a;
u8 b;
u8 g;
u8 r;
} rgba_t;
typedef struct {
union {
rgba_t rgba;
u32 colour;
};
} colour_t;
typedef struct {