d_a_e_vt mostly done (#2158)

This commit is contained in:
TakaRikka
2024-05-24 19:47:15 -07:00
committed by GitHub
parent 38ac3e9227
commit 411a832fbb
34 changed files with 4390 additions and 873 deletions
+15 -3
View File
@@ -617,6 +617,8 @@ struct J3DZModeInfo {
/* 0x3 */ u8 pad;
};
extern u8 j3dZModeTable[96];
/**
* @ingroup jsystem-j3d
*
@@ -629,6 +631,14 @@ struct J3DZMode {
mZModeID = calcZModeID(info.field_0x0, info.field_0x1, info.field_0x2);
}
void setCompareEnable(u8 i_compare) {
mZModeID = calcZModeID(i_compare, j3dZModeTable[mZModeID * 3 + 1], j3dZModeTable[mZModeID * 3 + 2]);
}
void setUpdateEnable(u8 i_enable) {
mZModeID = calcZModeID(j3dZModeTable[mZModeID * 3], j3dZModeTable[mZModeID * 3 + 1], i_enable);
}
/* 0x0 */ u16 mZModeID;
};
@@ -655,6 +665,8 @@ extern const J3DBlendInfo j3dDefaultBlendInfo;
struct J3DBlend : public J3DBlendInfo {
J3DBlend() : J3DBlendInfo(j3dDefaultBlendInfo) {}
J3DBlend(J3DBlendInfo const& info) : J3DBlendInfo(info) {}
void setDstFactor(u8 i_factor) { mDstFactor = i_factor; }
};
extern const J3DFogInfo j3dDefaultFogInfo;
@@ -746,7 +758,7 @@ public:
/* 8000DF54 */ virtual J3DAlphaComp* getAlphaComp();
/* 80317370 */ virtual void setBlend(J3DBlend const*);
/* 8000E018 */ virtual void setBlend(J3DBlend const&);
/* 8000DF4C */ virtual bool getBlend();
/* 8000DF4C */ virtual J3DBlend* getBlend();
/* 80317374 */ virtual void setZMode(J3DZMode const*);
/* 8000E014 */ virtual void setZMode(J3DZMode);
/* 8000DF44 */ virtual J3DZMode* getZMode();
@@ -834,7 +846,7 @@ public:
/* 803219E0 */ virtual J3DAlphaComp* getAlphaComp();
/* 803219F4 */ virtual void setBlend(J3DBlend const*);
/* 803219E8 */ virtual void setBlend(J3DBlend const&);
/* 80321A00 */ virtual bool getBlend();
/* 80321A00 */ virtual J3DBlend* getBlend();
/* 80321A14 */ virtual void setZMode(J3DZMode const*);
/* 80321A08 */ virtual void setZMode(J3DZMode);
/* 80321A20 */ virtual J3DZMode* getZMode();
@@ -879,7 +891,7 @@ public:
/* 80321B44 */ virtual J3DAlphaComp* getAlphaComp();
/* 80321B58 */ virtual void setBlend(J3DBlend const*);
/* 80321B4C */ virtual void setBlend(J3DBlend const&);
/* 80321B64 */ virtual bool getBlend();
/* 80321B64 */ virtual J3DBlend* getBlend();
/* 80321B78 */ virtual void setZMode(J3DZMode const*);
/* 80321B6C */ virtual void setZMode(J3DZMode);
/* 80321B84 */ virtual J3DZMode* getZMode();
@@ -76,12 +76,16 @@ public:
u32 getTexGenNum() const { return mTexGenBlock->getTexGenNum(); }
u8 getTevStageNum() const { return mTevBlock->getTevStageNum(); }
J3DTexCoord* getTexCoord(u32 idx) { return mTexGenBlock->getTexCoord(idx); }
J3DZMode* getZMode() { return mPEBlock->getZMode(); }
J3DBlend* getBlend() { return mPEBlock->getBlend(); }
void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); }
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 setTexMtx(u32 idx, J3DTexMtx* mtx) { mTexGenBlock->setTexMtx(idx, mtx); }
void setZCompLoc(u8 i_comploc) { mPEBlock->setZCompLoc(i_comploc); }
void setMaterialMode(u32 i_mode) { mMaterialMode = i_mode; }
public:
/* 0x04 */ J3DMaterial* mNext;