Update colour_t to use a union
This commit is contained in:
1 parent
0345f90405
commit
9b22ce61d5
3 files changed
+23
-19
No files matched your search
+10
-3
@@ -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