Update colour_t to use a union

This commit is contained in:
2023-12-27 22:03:14 +00:00
parent 0345f90405
commit 9b22ce61d5
3 changed files with 23 additions and 19 deletions

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 {