1
0
mirror of https://github.com/blawar/ooot.git synced 2024-07-02 17:13:34 +00:00
ooot/include/color.h
DaMarkov 7c20a4bf14
Changed Color_RGBA8_u32 struct (#163)
* Changed `Color_RGBA8_u32` struct.

* Removed one color class and a replaced it with the correct one.

* Fixed the color issue in GfxPrint

Co-authored-by: DaMarkov <DaMarkovZED@gmail.com>
2022-02-18 11:02:08 -05:00

33 lines
490 B
C

#pragma once
#include "macros.h"
struct Color_RGB8 {
u8 r, g, b;
};
struct Color_RGBA8 {
Color_RGBA8() = default;
Color_RGBA8(u8 r_, u8 g_, u8 b_, u8 a_) : r(r_), g(g_), b(b_), a(a_) {}
explicit operator u32 () {
return BE32(RGBA8(r, g, b, a));
}
u8 r, g, b, a;
};
struct Color_RGBAf {
f32 r, g, b, a;
};
typedef union {
struct {
u16 r : 5;
u16 g : 5;
u16 b : 5;
u16 a : 1;
};
u16 rgba;
} Color_RGBA16;