From 623622b9b6aba64d43831ffa32291599b7dcf820 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Wed, 2 Aug 2023 01:29:00 -0700 Subject: more kankyo work / d_a_kytag08 work --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/JSystem/J3DGraphBase') 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; -- cgit v1.2.3