Merge pull request #1573 from TwilitRealm/j2dindtexmtx-be

Endian-swap indirect texture matrix in J2D data
This commit is contained in:
TakaRikka
2026-05-17 18:23:15 -07:00
committed by GitHub
3 changed files with 29 additions and 1 deletions
@@ -116,7 +116,7 @@ private:
*
*/
struct J2DIndTexMtxInfo {
/* 0x00 */ Mtx23 mMtx;
/* 0x00 */ BE(Mtx23) mMtx;
/* 0x18 */ s8 mScaleExp;
J2DIndTexMtxInfo& operator=(const J2DIndTexMtxInfo& other) {
+6
View File
@@ -68,8 +68,14 @@ void J2DIndTevStage::load(u8 tevStage) {
}
void J2DIndTexMtx::load(u8 indTexMtx) {
#ifdef TARGET_PC
Mtx23 mtx;
mIndTexMtxInfo.mMtx.to_host(mtx);
GXSetIndTexMtx((GXIndTexMtxID)(GX_ITM_0 + indTexMtx), mtx, mIndTexMtxInfo.mScaleExp);
#else
GXSetIndTexMtx((GXIndTexMtxID)(GX_ITM_0 + indTexMtx), mIndTexMtxInfo.mMtx,
mIndTexMtxInfo.mScaleExp);
#endif
}
void J2DIndTexCoordScale::load(u8 indTexStage) {