2021-09-15 19:24:19 -04:00
|
|
|
#ifndef COLOR_H
|
|
|
|
#define COLOR_H
|
2020-03-17 00:31:30 -04:00
|
|
|
|
2024-09-07 23:23:25 +02:00
|
|
|
#include "ultra64/ultratypes.h"
|
|
|
|
|
2024-08-12 00:07:48 -07:00
|
|
|
typedef struct Color_RGB8 {
|
2020-06-17 15:44:22 -04:00
|
|
|
u8 r, g, b;
|
2020-03-17 00:31:30 -04:00
|
|
|
} Color_RGB8;
|
|
|
|
|
2024-08-12 00:07:48 -07:00
|
|
|
typedef struct Color_RGBA8 {
|
2020-09-29 20:18:46 -04:00
|
|
|
u8 r, g, b, a;
|
|
|
|
} Color_RGBA8;
|
|
|
|
|
|
|
|
// only use when necessary for alignment purposes
|
2024-06-25 15:13:31 -04:00
|
|
|
typedef union Color_RGBA8_u32 {
|
2020-04-16 23:36:12 +02:00
|
|
|
struct {
|
|
|
|
u8 r, g, b, a;
|
|
|
|
};
|
|
|
|
u32 rgba;
|
2020-09-29 20:18:46 -04:00
|
|
|
} Color_RGBA8_u32;
|
2020-05-18 20:24:00 +02:00
|
|
|
|
2024-08-12 00:07:48 -07:00
|
|
|
typedef struct Color_RGBAf {
|
2020-03-17 00:31:30 -04:00
|
|
|
f32 r, g, b, a;
|
|
|
|
} Color_RGBAf;
|
|
|
|
|
2024-08-12 00:07:48 -07:00
|
|
|
typedef union Color_RGBA16 {
|
2021-03-20 14:10:10 -05:00
|
|
|
struct {
|
|
|
|
u16 r : 5;
|
|
|
|
u16 g : 5;
|
|
|
|
u16 b : 5;
|
|
|
|
u16 a : 1;
|
|
|
|
};
|
|
|
|
u16 rgba;
|
2021-08-01 13:15:21 -04:00
|
|
|
} Color_RGBA16;
|
2021-03-20 14:10:10 -05:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
#endif
|