diff options
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMatBlock.h | 14 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMaterial.h | 1 |
2 files changed, 6 insertions, 9 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index d99cf2e5..64497f83 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -541,16 +541,14 @@ inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) { return (param_1 * 2) + (param_0 * 0x10) + param_2; } -extern u8 j3dZModeTable[96]; - extern J3DZModeInfo j3dZModeTable[2]; struct J3DZMode { J3DZMode() { mZModeID = j3dDefaultZModeID; } - u8 getCompareEnaable() const { return j3dZModeTable[mZModeID * 3]; } - u8 getFunc() const { return j3dZModeTable[mZModeID * 3 + 1]; } - u8 getUpdateEnable() const { return j3dZModeTable[mZModeID * 3 + 2]; } + u8 getCompareEnaable() const { return j3dZModeTable[mZModeID].mCompareEnable; } + u8 getFunc() const { return j3dZModeTable[mZModeID].mFunc; } + u8 getUpdateEnable() const { return j3dZModeTable[mZModeID].mUpdateEnable; } void setZModeInfo(const J3DZModeInfo& info) { mZModeID = calcZModeID(info.mCompareEnable, info.mFunc, info.mUpdateEnable); @@ -561,11 +559,11 @@ struct J3DZMode { } void setCompareEnable(u8 i_compare) { - mZModeID = calcZModeID(i_compare, j3dZModeTable[mZModeID].field_0x1, j3dZModeTable[mZModeID].field_0x2); + mZModeID = calcZModeID(i_compare, j3dZModeTable[mZModeID].mFunc, j3dZModeTable[mZModeID].mUpdateEnable); } void setUpdateEnable(u8 i_enable) { - mZModeID = calcZModeID(j3dZModeTable[mZModeID].field_0x0, j3dZModeTable[mZModeID].field_0x1, i_enable); + mZModeID = calcZModeID(j3dZModeTable[mZModeID].mCompareEnable, j3dZModeTable[mZModeID].mFunc, i_enable); } /* 0x0 */ u16 mZModeID; @@ -584,7 +582,7 @@ struct J3DBlend : public J3DBlendInfo { } void setType(u8 i_type) { - mType = i_type; + mBlendMode = i_type; } void setSrcFactor(u8 i_src) { diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 239936e8..7bc64fce 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -76,7 +76,6 @@ public: void setTevKColor(u32 i, const J3DGXColor* i_color) { mTevBlock->setTevKColor(i, i_color); } void setMaterialAnm(J3DMaterialAnm* i_anm) { mMaterialAnm = i_anm; } void setCullMode(u8 i_mode) { mColorBlock->setCullMode(i_mode); } - void setMaterialMode(u32 i_mode) { mMaterialMode = i_mode; } public: /* 0x04 */ J3DMaterial* mNext; |
