J3DMatBlock: fix setChanCtrlMacro codegen

This commit is contained in:
LagoLunatic
2024-01-22 00:32:52 -05:00
parent 60bf02dc90
commit f167f18ed0
+2 -1
View File
@@ -945,8 +945,9 @@ inline u16 calcColorChanID(u16 enable, u8 matSrc, u8 lightMask, u8 diffuseFn, u8
}
inline u32 setChanCtrlMacro(u8 enable, GXColorSrc ambSrc, GXColorSrc matSrc, u32 lightMask, GXDiffuseFn diffuseFn, GXAttnFn attnFn) {
u32 ret = matSrc << 0; // Putting this as a separate statement fixes codegen, but regalloc is still wrong
return
matSrc << 0 |
ret |
enable << 1 |
(lightMask & 0x0F) << 2 |
ambSrc << 6 |