summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
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) {