Update colour_t to use a union
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user