mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
move J2D / JUTResFont (#144)
* move some JSystem and meter2_info stuff * more J2D / JUTTexture / JUTPalette * setup dScnKy_env_light_c
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#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 */
|
||||
Reference in New Issue
Block a user