From 217775af4ef41ac875d53efe4da8f2d19f46e2af Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Tue, 19 Aug 2025 17:15:39 -0400 Subject: Use precompiled headers, fix weak data issues --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/JSystem/J3DGraphBase') diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 38af7236..c8eaef86 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -992,7 +992,10 @@ struct J3DColorChan { info.mDiffuseFn, info.mAttnFn, ambSrc); } J3DColorChan(u16 id) : mChanCtrl(id) {} - GXAttnFn getAttnFn(); + GXAttnFn getAttnFn() { + u8 attnFnTbl[] = { GX_AF_NONE, GX_AF_SPEC, GX_AF_NONE, GX_AF_SPOT }; + return GXAttnFn(attnFnTbl[mChanCtrl >> 9 & 0x03]); + } GXDiffuseFn getDiffuseFn() { return GXDiffuseFn(mChanCtrl >> 7 & 3); } u8 getLightMask() { return ((mChanCtrl >> 2 & 0x0f) | (mChanCtrl >> 11 & 0x0f) << 4); } void setLightMask(u8 mask) { -- cgit v1.2.3