diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-19 17:15:39 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-20 18:51:42 -0400 |
| commit | 217775af4ef41ac875d53efe4da8f2d19f46e2af (patch) | |
| tree | ea7683dbc31668db546d768bf8a165a7950d436e /include/JSystem/J3DGraphBase | |
| parent | a32174dff6bbac81945505d8d86e125ce3443405 (diff) | |
Use precompiled headers, fix weak data issues
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMatBlock.h | 5 |
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) { |
