#pragma once #include #include #include #include namespace GX { constexpr u8 MaxLights = 8; using LightMask = std::bitset; } // namespace GX constexpr GXColor GX_BLACK{0, 0, 0, 255}; constexpr GXColor GX_WHITE{255, 255, 255, 255}; constexpr GXColor GX_CLEAR{0, 0, 0, 0}; inline bool operator==(const GXColor& lhs, const GXColor& rhs) noexcept { return lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b && lhs.a == rhs.a; } static inline void GXPosition3f32(const zeus::CVector3f& v) { GXPosition3f32(v.x(), v.y(), v.z()); } static inline void GXNormal3f32(const zeus::CVector3f& v) { GXNormal3f32(v.x(), v.y(), v.z()); } static inline void GXTexCoord2f32(const zeus::CVector2f& v) { GXTexCoord2f32(v.x(), v.y()); } static inline void GXColor4f32(const zeus::CColor& v) { GXColor4f32(v.r(), v.g(), v.b(), v.a()); } static inline GXColor to_gx_color(const zeus::CColor& color) { return { static_cast(color.r() * 255.f), static_cast(color.g() * 255.f), static_cast(color.b() * 255.f), static_cast(color.a() * 255.f), }; } static inline zeus::CColor from_gx_color(GXColor color) { return { static_cast(color.r) / 255.f, static_cast(color.g) / 255.f, static_cast(color.b) / 255.f, static_cast(color.a) / 255.f, }; }