summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-19 17:15:39 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-20 18:51:42 -0400
commit217775af4ef41ac875d53efe4da8f2d19f46e2af (patch)
treeea7683dbc31668db546d768bf8a165a7950d436e /include/JSystem/J3DGraphBase
parenta32174dff6bbac81945505d8d86e125ce3443405 (diff)
Use precompiled headers, fix weak data issues
Diffstat (limited to 'include/JSystem/J3DGraphBase')
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h5
1 files changed, 4 insertions, 1 deletions
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) {