Files
tp/include/JSystem/JUtility.h
T
TakaRikka daf45f768d move J2D / JUTResFont (#144)
* move some JSystem and meter2_info stuff

* more J2D / JUTTexture / JUTPalette

* setup dScnKy_env_light_c
2021-08-28 16:25:03 +02:00

30 lines
602 B
C++

#ifndef JUTILITY_H
#define JUTILITY_H
#include "dolphin/gx/GXTexture.h"
#include "dolphin/types.h"
namespace JUtility {
struct TColor : _GXColor {
TColor() { set(-1); }
TColor(u32 raw) { *(u32*)&r = raw; }
void set(u32 col) { *(u32*)&r = col; }
void set(u8 oR, u8 oG, u8 oB, u8 oA) {
r = oR;
g = oG;
b = oB;
a = oA;
}
u32 toUInt32() const { return *(u32*)&r; }
operator u32() const { return toUInt32(); }
void operator=(const TColor& rhs) { ((_GXColor*)this)->operator=(rhs); }
};
} // namespace JUtility
#endif /* JUTILITY_H */