J3DMatBlock, J3DMaterialFactory work (#2233)

This commit is contained in:
Caroline Madsen
2024-11-01 16:46:27 -04:00
committed by GitHub
parent c01fc04c93
commit 426e64d26b
17 changed files with 896 additions and 5278 deletions
File diff suppressed because it is too large Load Diff
@@ -113,6 +113,7 @@ public:
*/
class J3DPatchedMaterial : public J3DMaterial {
public:
J3DPatchedMaterial() { initialize(); }
/* 80316FB8 */ void initialize();
/* 80316FD8 */ virtual void makeDisplayList();
+2 -2
View File
@@ -56,8 +56,8 @@ public:
}
void setCurrentTexMtx(u8 param_1, u8 param_2, u8 param_3, u8 param_4,
u8 param_5, u8 param_6, u8 param_7, u8 param_8) {
mMtxIdxRegA = ((param_1 & 0xff) << 6) | (param_2 << 0xc)| (param_3 << 0x12) | (param_4 << 0x18);
u8 param_5, u8 param_6, u8 param_7, u8 param_8) {
mMtxIdxRegA = (param_1 << 6) | (param_2 << 0xc) | (param_3 << 0x12) | (param_4 << 0x18);
mMtxIdxRegB = (param_5) | param_6 << 6 | param_7 << 0xc | param_8 << 0x12;
}
};
+2 -2
View File
@@ -65,7 +65,7 @@ public:
/* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
static J3DShapeMtx_LoadFunc sMtxLoadPipeline[4];
static u16 sMtxLoadCache[10 + 2 /* padding */];
static u16 sMtxLoadCache[10];
static u32 sCurrentPipeline;
static u8* sCurrentScaleFlag;
static u8 sNBTFlag;
@@ -190,4 +190,4 @@ private:
/* 0xC */ u16* mUseMtxIndexTable;
};
#endif /* J3DSHAPEMTX_H */
#endif /* J3DSHAPEMTX_H */
@@ -96,6 +96,7 @@ struct J3DTexCoord : public J3DTexCoordInfo {
u8 getTexGenMtx() { return mTexGenMtx & 0xff; }
u16 getTexMtxReg() { return mTexMtxReg & 0xff; }
void setTexGenMtx(u8 param_1) { mTexGenMtx = param_1; }
void setTexMtxReg(u16 reg) { mTexMtxReg = reg; }
J3DTexCoord& operator=(const J3DTexCoord& other) {
// Fake match (__memcpy or = doesn't match)
*(u32*)this = *(u32*)&other;