summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
authorTakaRikka <takarikka@outlook.com>2023-08-02 01:29:00 -0700
committerTakaRikka <takarikka@outlook.com>2023-08-02 01:31:23 -0700
commit623622b9b6aba64d43831ffa32291599b7dcf820 (patch)
tree5b3d971615ba3fd1f9dfd3ecdefe321d96813888 /include/JSystem/J3DGraphBase
parent9773c9dbf11bf68b24d66b7718af02d131ad300a (diff)
more kankyo work / d_a_kytag08 work
Diffstat (limited to 'include/JSystem/J3DGraphBase')
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h
index 65c064050f..d86ade35cc 100644
--- a/include/JSystem/J3DGraphBase/J3DMatBlock.h
+++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h
@@ -541,7 +541,7 @@ private:
extern const u16 j3dDefaultZModeID;
inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) {
- return param_0 * 0x10 + param_2 + param_1 * 2;
+ return ((param_1 * 2) & 0x1FE) + (param_0 * 0x10) + param_2;
}
struct J3DZModeInfo {
@@ -631,6 +631,10 @@ struct J3DAlphaComp {
mRef1 = param_1.field_0x4;
u32 p1_mref1 = param_1.mRef1;
field_0x0 = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, p1_mref1);
+
+ // this matches for `dKy_bg_MAxx_proc` but causes `addWarpMaterial` to fail,
+ // while the above matches for `addWarpMaterial` but causes `dKy_bg_MAxx_proc` to fail?
+ // field_0x0 = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, param_1.mRef1);
}
/* 0x00 */ u16 field_0x0;