#include "dusk/endian.h" #include #include "SSystem/SComponent/c_xyz.h" #include "dusk/endian_gx.hpp" #define IMPL_ENUM(type) \ template <> \ type BE::swap(type val) { \ return static_cast(be32(val)); \ } IMPL_ENUM(GXCullMode); IMPL_ENUM(GXAttr); IMPL_ENUM(GXAttrType); IMPL_ENUM(GXCompType); IMPL_ENUM(GXCompCnt); template <> GXColorS10 BE::swap(GXColorS10 val) { return { be16s(val.r), be16s(val.g), be16s(val.b), be16s(val.a), }; } GXVtxDescList BE::swap(GXVtxDescList val) { return { BE::swap(val.attr), BE::swap(val.type), }; } GXVtxAttrFmtList BE::swap(GXVtxAttrFmtList val) { return { BE::swap(val.attr), BE::swap(val.cnt), BE::swap(val.type), val.frac }; } template<> cXy BE::swap(cXy val) { return { BE::swap(val.x), BE::swap(val.y), }; }