Endian-swap indirect texture matrix in J2D data

Fixes copy/delete effects on the file screen.
This commit is contained in:
doop
2026-05-18 00:46:45 +00:00
parent f33827a969
commit 2be2615e61
3 changed files with 29 additions and 1 deletions
+22
View File
@@ -227,6 +227,28 @@ struct BE<Mtx> {
}
};
typedef f32 Mtx23[2][3];
template <>
struct BE<Mtx23> {
BE<f32> contents[2][3];
auto& operator[](int x) {
return contents[x];
}
auto& operator[](int x) const {
return contents[x];
}
void to_host(Mtx23& mtx) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 4; j++) {
mtx[i][j] = contents[i][j];
}
}
}
};
template<typename T>
void be_swap(T& val) {
val = BE<T>::swap(val);