1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-26 14:46:16 +00:00
oot/include/color.h

35 lines
495 B
C
Raw Normal View History

#ifndef COLOR_H
#define COLOR_H
2020-03-17 04:31:30 +00:00
typedef struct {
u8 r, g, b;
2020-03-17 04:31:30 +00:00
} Color_RGB8;
typedef struct {
u8 r, g, b, a;
} Color_RGBA8;
// only use when necessary for alignment purposes
typedef union Color_RGBA8_u32 {
struct {
u8 r, g, b, a;
};
u32 rgba;
} Color_RGBA8_u32;
2020-03-22 21:50:11 +00:00
typedef struct {
2020-03-17 04:31:30 +00:00
f32 r, g, b, a;
} Color_RGBAf;
typedef union {
struct {
u16 r : 5;
u16 g : 5;
u16 b : 5;
u16 a : 1;
};
u16 rgba;
} Color_RGBA16;
2020-03-17 04:31:30 +00:00
#endif