Files
mm/include/color.h
T
EllipticEllipsis 7134e81898 sys_initial_check OK, documented, error message files debinarised (#437)
* OK

* Symbols and other documentation

* Remove externs

* spec

* More documentation, decompile the texture files,
some uintptr_t and size_t

* Top-of-file comment

* Move symbols back into right order

* Use some defines

* Missed an osTvType and a size_t

* Add missing header to os.h

* Use segment symbol macros

* Remove duplicate header

* Address review suggestions
2021-11-15 19:57:16 -03:00

49 lines
779 B
C

#ifndef _COLOR_H_
#define _COLOR_H_
#include "PR/ultratypes.h"
// For checking the alpha bit in an RGBA16 pixel
#define RGBA16_PIXEL_OPAQUE 1
typedef struct {
/* 0x0 */ u8 r;
/* 0x1 */ u8 g;
/* 0x2 */ u8 b;
} Color_RGB8; // size = 0x3
typedef struct {
/* 0x0 */ u8 r;
/* 0x1 */ u8 g;
/* 0x2 */ u8 b;
/* 0x3 */ u8 a;
} Color_RGBA8; // size = 0x4
// only use when necessary for alignment purposes
typedef union {
struct {
u8 r, g, b, a;
};
u32 rgba;
} Color_RGBA8_u32;
typedef struct {
f32 r, g, b, a;
} Color_RGBAf;
typedef struct {
u32 r, g, b, a;
} Color_RGBAu32;
typedef union {
struct {
u16 r : 5;
u16 g : 5;
u16 b : 5;
u16 a : 1;
};
u16 rgba;
} Color_RGBA16;
#endif