Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
TColor.h
Go to the documentation of this file.
1#ifndef TCOLOR_H
2#define TCOLOR_H
3
5
6namespace JUtility {
7
12struct TColor : public GXColor {
13 TColor(u8 r, u8 g, u8 b, u8 a) { set(r, g, b, a); }
14 TColor() { set(0xffffffff); }
17
18 // TColor(const TColor& other) { set(other.toUInt32()); }
19
20 operator u32() const { return toUInt32(); }
21 u32 toUInt32() const { return *(u32*)&r; }
22
23 void set(u8 cR, u8 cG, u8 cB, u8 cA) {
24 r = cR;
25 g = cG;
26 b = cB;
27 a = cA;
28 }
29
30 void set(u32 u32Color) { *(u32*)&r = u32Color; }
32};
33} // namespace JUtility
34
35#endif
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static SECTION_DATA u8 color[4]
Definition d_a_obj_crope.cpp:225
Definition TColor.h:6
Definition TColor.h:12
u32 toUInt32() const
Definition TColor.h:21
TColor()
Definition TColor.h:14
void set(u32 u32Color)
Definition TColor.h:30
TColor(u8 r, u8 g, u8 b, u8 a)
Definition TColor.h:13
void set(u8 cR, u8 cG, u8 cB, u8 cA)
Definition TColor.h:23
void set(GXColor gxColor)
Definition TColor.h:31
TColor(u32 u32Color)
Definition TColor.h:15
TColor(GXColor color)
Definition TColor.h:16
Definition d_a_ep.cpp:68
u8 g
Definition GXStruct.h:10
u8 b
Definition GXStruct.h:11
u8 a
Definition GXStruct.h:12
u8 r
Definition GXStruct.h:9
unsigned long u32
Definition types.h:10
unsigned char u8
Definition types.h:8