Make GXVtxDescList and GXVtxAttrFmtList not be behind BE

Fixes a stub call because we couldn't pass the BE form to the API
This commit is contained in:
PJB3005
2026-02-27 01:04:44 +01:00
parent 10e77f77e6
commit 4213b055ea
9 changed files with 92 additions and 38 deletions
+28 -10
View File
@@ -1,15 +1,6 @@
#include <dolphin/gx.h>
#include "dusk/endian.h"
template <>
GXColorS10 BE<GXColorS10>::swap(GXColorS10 val) {
return {
be16s(val.r),
be16s(val.g),
be16s(val.b),
be16s(val.a),
};
}
#include "dusk/endian_gx.hpp"
#define IMPL_ENUM(type) \
template <> \
@@ -21,3 +12,30 @@ IMPL_ENUM(GXCullMode);
IMPL_ENUM(GXAttr);
IMPL_ENUM(GXAttrType);
IMPL_ENUM(GXCompType);
IMPL_ENUM(GXCompCnt);
template <>
GXColorS10 BE<GXColorS10>::swap(GXColorS10 val) {
return {
be16s(val.r),
be16s(val.g),
be16s(val.b),
be16s(val.a),
};
}
GXVtxDescList BE<GXVtxDescList>::swap(GXVtxDescList val) {
return {
BE<GXAttr>::swap(val.attr),
BE<GXAttrType>::swap(val.type),
};
}
GXVtxAttrFmtList BE<GXVtxAttrFmtList>::swap(GXVtxAttrFmtList val) {
return {
BE<GXAttr>::swap(val.attr),
BE<GXCompCnt>::swap(val.cnt),
BE<GXCompType>::swap(val.type),
val.frac
};
}