summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2026-08-28 15:03:03 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2026-08-28 15:03:03 -0400
commitf2be4dc1ffc18f272f5f71fc57186a8a44feb51c (patch)
tree610cc5585c306e9b85d8ce151cb56baf33a68ddf /include/JSystem
parent60a05bdb832864d09f5d4c74ffcfd928026d884f (diff)
Various J3D inline fixes
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/J3DGraphBase/J3DGD.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h83
-rw-r--r--include/JSystem/J3DGraphBase/J3DStruct.h7
-rw-r--r--include/JSystem/J3DGraphBase/J3DTevs.h137
-rw-r--r--include/JSystem/J3DGraphBase/J3DTexture.h30
5 files changed, 193 insertions, 66 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DGD.h b/include/JSystem/J3DGraphBase/J3DGD.h
index 6f41992b..2b117603 100644
--- a/include/JSystem/J3DGraphBase/J3DGD.h
+++ b/include/JSystem/J3DGraphBase/J3DGD.h
@@ -138,7 +138,7 @@ inline void J3DGDSetZCompLoc(u32 compLocEnable) {
}
inline void J3DGDSetTevKonstantSel_SwapModeTable(GXTevStageID stage, GXTevKColorSel colorSel1, GXTevKAlphaSel alphaSel1, GXTevKColorSel colorSel2, GXTevKAlphaSel alphaSel2, GXTevColorChan chan1, GXTevColorChan chan2) {
- J3DGDWriteBPCmd((stage / 2 + 0xF6) << 24 | (chan1 | chan2 << 2 | colorSel1 << 4 | alphaSel1 << 9 | colorSel2 << 14 | alphaSel2 << 19) & 0x00FFFFFF);
+ J3DGDWriteBPCmd((stage / 2 + 0xF6) << 24 | ((chan1 | chan2 << 2 | colorSel1 << 4 | alphaSel1 << 9 | colorSel2 << 14 | alphaSel2 << 19) & 0x00FFFFFF));
}
#endif /* J3DGD_H */
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h
index 0371d2ba..902f8907 100644
--- a/include/JSystem/J3DGraphBase/J3DMatBlock.h
+++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h
@@ -619,6 +619,15 @@ struct J3DZMode {
J3DZMode() { mZModeID = j3dDefaultZModeID; }
explicit J3DZMode(const J3DZModeInfo& info) { setZModeInfo(info); }
+ J3DZMode& operator=(u16 zModeID) {
+ mZModeID = zModeID;
+ return *this;
+ }
+ J3DZMode& operator=(const J3DZMode& other) {
+ mZModeID = other.mZModeID;
+ return *this;
+ }
+
u8 getCompareEnable() const { return j3dZModeTable[mZModeID * 3 + 0]; }
u8 getFunc() const { return j3dZModeTable[mZModeID * 3 + 1]; }
u8 getUpdateEnable() const { return j3dZModeTable[mZModeID * 3 + 2]; }
@@ -639,13 +648,22 @@ struct J3DZMode {
mZModeID = calcZModeID(j3dZModeTable[mZModeID * 3], j3dZModeTable[mZModeID * 3 + 1], i_enable);
}
+ // void operator==(J3DZMode&) {}
+
+private:
/* 0x0 */ u16 mZModeID;
};
struct J3DBlend : public J3DBlendInfo {
- J3DBlend() { *(J3DBlendInfo*)this = j3dDefaultBlendInfo; }
- explicit J3DBlend(const J3DBlendInfo& info) { *(J3DBlendInfo*)this = info; }
- void setBlendInfo(const J3DBlendInfo& info) { *(J3DBlendInfo*)this = info; }
+ J3DBlend() {
+ J3DBlendInfo::operator=(j3dDefaultBlendInfo);
+ }
+ explicit J3DBlend(const J3DBlendInfo& info) {
+ J3DBlendInfo::operator=(info);
+ }
+ void setBlendInfo(const J3DBlendInfo& info) {
+ J3DBlendInfo::operator=(info);
+ }
GXBlendMode getType() const { return (GXBlendMode)mBlendMode; }
void setType(u8 i_type) { mBlendMode = i_type; }
@@ -655,8 +673,8 @@ struct J3DBlend : public J3DBlendInfo {
void setDstFactor(u8 i_dst) { mDstFactor = i_dst; }
GXLogicOp getOp() const { return (GXLogicOp)mLogicOp; }
- void load(u8 ditherEnable) {
- J3DGDSetBlendMode(getType(), getSrcFactor(), getDstFactor(), getOp(), ditherEnable);
+ void load(u8 ditherEnable) const {
+ J3DGDSetBlendMode((GXBlendMode)mBlendMode, (GXBlendFactor)mSrcFactor, (GXBlendFactor)mDstFactor, (GXLogicOp)mLogicOp, ditherEnable);
}
// void operator=(const J3DBlend&) {}
@@ -698,7 +716,21 @@ struct J3DAlphaComp {
mRef1 = info.mRef1;
}
- GXCompare getComp0() const { return GXCompare(j3dAlphaCmpTable[mAlphaCmpID * 3]); }
+ J3DAlphaComp& operator=(u16 id) { mAlphaCmpID = id; return *this; }
+ J3DAlphaComp& operator=(const J3DAlphaComp& rhs) {
+ mAlphaCmpID = rhs.mAlphaCmpID;
+ mRef0 = rhs.mRef0;
+ mRef1 = rhs.mRef1;
+ return *this;
+ }
+ J3DAlphaComp& operator=(J3DAlphaComp& rhs) {
+ mAlphaCmpID = rhs.mAlphaCmpID;
+ mRef0 = rhs.mRef0;
+ mRef1 = rhs.mRef1;
+ return *this;
+ }
+
+ GXCompare getComp0() const { return GXCompare(j3dAlphaCmpTable[mAlphaCmpID * 3 + 0]); }
GXAlphaOp getOp() const { return GXAlphaOp(j3dAlphaCmpTable[mAlphaCmpID * 3 + 1]); }
GXCompare getComp1() const { return GXCompare(j3dAlphaCmpTable[mAlphaCmpID * 3 + 2]); }
u8 getRef0() const { return mRef0; }
@@ -710,10 +742,17 @@ struct J3DAlphaComp {
mRef1 = info.mRef1;
}
- void load() {
- J3DGDSetAlphaCompare(getComp0(), getRef0(), getOp(), getComp1(), getRef1());
+ void load() const {
+ J3DGDSetAlphaCompare(getComp0(), mRef0, getOp(), getComp1(), mRef1);
}
+ // void operator!=(unsigned short) {}
+ // void operator=(J3DAlphaComp&) {}
+ // void operator=(const J3DAlphaComp&) {}
+ // void operator=(unsigned short) {}
+ // void operator==(J3DAlphaComp&) {}
+
+private:
/* 0x00 */ u16 mAlphaCmpID;
/* 0x02 */ u8 mRef0;
/* 0x03 */ u8 mRef1;
@@ -866,8 +905,12 @@ public:
};
struct J3DIndTexCoordScale : public J3DIndTexCoordScaleInfo {
- J3DIndTexCoordScale() { *(J3DIndTexCoordScaleInfo*)this = j3dDefaultIndTexCoordScaleInfo; }
- explicit J3DIndTexCoordScale(const J3DIndTexCoordScaleInfo& info) {*(J3DIndTexCoordScaleInfo*)this = info; }
+ J3DIndTexCoordScale() {
+ J3DIndTexCoordScaleInfo::operator=(j3dDefaultIndTexCoordScaleInfo);
+ }
+ explicit J3DIndTexCoordScale(const J3DIndTexCoordScaleInfo& info) {
+ J3DIndTexCoordScaleInfo::operator=(info);
+ }
~J3DIndTexCoordScale() {}
u8 getScaleS() { return mScaleS; }
@@ -875,8 +918,12 @@ struct J3DIndTexCoordScale : public J3DIndTexCoordScaleInfo {
};
struct J3DIndTexMtx : public J3DIndTexMtxInfo {
- J3DIndTexMtx() {*(J3DIndTexMtxInfo*)this = j3dDefaultIndTexMtxInfo; }
- explicit J3DIndTexMtx(const J3DIndTexMtxInfo& info) { *(J3DIndTexMtxInfo*)this = info; }
+ J3DIndTexMtx() {
+ J3DIndTexMtxInfo::operator=(j3dDefaultIndTexMtxInfo);
+ }
+ explicit J3DIndTexMtx(const J3DIndTexMtxInfo& info) {
+ J3DIndTexMtxInfo::operator=(info);
+ }
~J3DIndTexMtx() {}
void load(u32 id) const {
@@ -897,8 +944,16 @@ struct J3DIndTexMtx : public J3DIndTexMtxInfo {
}; // Size: 0x1C
struct J3DIndTexOrder : public J3DIndTexOrderInfo {
- J3DIndTexOrder() { *(J3DIndTexOrderInfo*)this = j3dDefaultIndTexOrderNull; }
- explicit J3DIndTexOrder(const J3DIndTexOrderInfo& info) { *(J3DIndTexOrderInfo*)this = info; }
+ J3DIndTexOrder() {
+ J3DIndTexOrderInfo::operator=(j3dDefaultIndTexOrderNull);
+ }
+ explicit J3DIndTexOrder(const J3DIndTexOrderInfo& info) {
+ J3DIndTexOrderInfo::operator=(info);
+ }
+ J3DIndTexOrder& operator=(const J3DIndTexOrder& other) {
+ J3DIndTexOrderInfo::operator=(other);
+ return *this;
+ }
u8 getCoord() { return mCoord; }
u8 getMap() { return mMap; }
diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h
index 46fc620c..c219877d 100644
--- a/include/JSystem/J3DGraphBase/J3DStruct.h
+++ b/include/JSystem/J3DGraphBase/J3DStruct.h
@@ -106,6 +106,7 @@ struct J3DIndTexMtxInfo {
}
mScaleExp = other.mScaleExp;
}
+
/* 0x00 */ Mtx23 mOffsetMtx;
/* 0x18 */ s8 mScaleExp;
}; // Size: 0x1C
@@ -203,6 +204,12 @@ struct J3DIndTevStageInfo {
};
struct J3DTexCoordInfo {
+ void operator=(const J3DTexCoordInfo& other) {
+ mTexGenType = other.mTexGenType;
+ mTexGenSrc = other.mTexGenSrc;
+ mTexGenMtx = other.mTexGenMtx;
+ }
+
/* 0x0 */ u8 mTexGenType ALIGN_DECL(4);
/* 0x1 */ u8 mTexGenSrc;
/* 0x2 */ u8 mTexGenMtx;
diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h
index 8ed44979..4271419a 100644
--- a/include/JSystem/J3DGraphBase/J3DTevs.h
+++ b/include/JSystem/J3DGraphBase/J3DTevs.h
@@ -51,26 +51,26 @@ struct J3DTevStage {
}
void setTevColorOp(u8 param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5) {
- mTevColorOp = mTevColorOp & ~(0x01 << 2) | param_1 << 2;
+ mTevColorOp = (mTevColorOp & ~(0x01 << 2)) | param_1 << 2;
if (param_1 <= 1) {
- mTevColorOp = mTevColorOp & ~(0x03 << 4) | param_3 << 4;
- mTevColorOp = mTevColorOp & ~0x03 | param_2;
+ mTevColorOp = (mTevColorOp & ~(0x03 << 4)) | param_3 << 4;
+ mTevColorOp = (mTevColorOp & ~0x03) | param_2;
} else {
- mTevColorOp = mTevColorOp & ~(0x03 << 4) | (param_1 >> 1 & 3) << 4;
- mTevColorOp = mTevColorOp & ~0x03 | 3;
+ mTevColorOp = (mTevColorOp & ~(0x03 << 4)) | (param_1 >> 1 & 3) << 4;
+ mTevColorOp = (mTevColorOp & ~0x03) | 3;
}
- mTevColorOp = mTevColorOp & ~(0x01 << 3) | param_4 << 3;
- mTevColorOp = mTevColorOp & ~(0x03 << 6) | param_5 << 6;
+ mTevColorOp = (mTevColorOp & ~(0x01 << 3)) | param_4 << 3;
+ mTevColorOp = (mTevColorOp & ~(0x03 << 6)) | param_5 << 6;
}
void setTevColorAB(u8 a, u8 b) { mTevColorAB = a << 4 | b; }
void setTevColorCD(u8 c, u8 d) { mTevColorCD = c << 4 | d; }
- void setAlphaA(u8 a) { mTevAlphaAB = mTevAlphaAB & ~(0x07 << 5) | a << 5; }
- void setAlphaB(u8 b) { mTevAlphaAB = mTevAlphaAB & ~(0x07 << 2) | b << 2; }
+ void setAlphaA(u8 a) { mTevAlphaAB = (mTevAlphaAB & ~(0x07 << 5)) | a << 5; }
+ void setAlphaB(u8 b) { mTevAlphaAB = (mTevAlphaAB & ~(0x07 << 2)) | b << 2; }
void setAlphaC(u8 c) {
- mTevAlphaAB = mTevAlphaAB & ~0x03 | c >> 1;
- mTevSwapModeInfo = mTevSwapModeInfo & ~(0x01 << 7) | c << 7;
+ mTevAlphaAB = (mTevAlphaAB & ~0x03) | c >> 1;
+ mTevSwapModeInfo = (mTevSwapModeInfo & ~(0x01 << 7)) | c << 7;
}
- void setAlphaD(u8 d) { mTevSwapModeInfo = mTevSwapModeInfo & ~(0x07 << 4) | d << 4; }
+ void setAlphaD(u8 d) { mTevSwapModeInfo = (mTevSwapModeInfo & ~(0x07 << 4)) | d << 4; }
void setAlphaABCD(u8 a, u8 b, u8 c, u8 d) {
setAlphaA(a);
setAlphaB(b);
@@ -78,16 +78,16 @@ struct J3DTevStage {
setAlphaD(d);
}
void setTevAlphaOp(u8 param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5) {
- mTevAlphaOp = mTevAlphaOp & ~(0x01 << 2) | param_1 << 2;
+ mTevAlphaOp = (mTevAlphaOp & ~(0x01 << 2)) | param_1 << 2;
if (param_1 <= 1) {
- mTevAlphaOp = mTevAlphaOp & ~0x03 | param_2;
- mTevAlphaOp = mTevAlphaOp & ~(0x03 << 4) | param_3 << 4;
+ mTevAlphaOp = (mTevAlphaOp & ~0x03) | param_2;
+ mTevAlphaOp = (mTevAlphaOp & ~(0x03 << 4)) | param_3 << 4;
} else {
- mTevAlphaOp = mTevAlphaOp & ~(0x03 << 4) | (param_1 >> 1 & 3) << 4;
- mTevAlphaOp = mTevAlphaOp & ~0x03 | 3;
+ mTevAlphaOp = (mTevAlphaOp & ~(0x03 << 4)) | (param_1 >> 1 & 3) << 4;
+ mTevAlphaOp = (mTevAlphaOp & ~0x03) | 3;
}
- mTevAlphaOp = mTevAlphaOp & ~(0x01 << 3) | param_4 << 3;
- mTevAlphaOp = mTevAlphaOp & ~(0x03 << 6) | param_5 << 6;
+ mTevAlphaOp = (mTevAlphaOp & ~(0x01 << 3)) | param_4 << 3;
+ mTevAlphaOp = (mTevAlphaOp & ~(0x03 << 6)) | param_5 << 6;
}
void setTevStageInfo(const J3DTevStageInfo& info) {
setTevColorOp(info.field_0x5, info.field_0x6, info.field_0x7, info.field_0x8, info.field_0x9);
@@ -97,18 +97,48 @@ struct J3DTevStage {
setTevAlphaOp(info.field_0xe, info.field_0xf, info.field_0x10, info.field_0x11, info.field_0x12);
}
- void setTexSel(u8 param_0) { mTevSwapModeInfo = mTevSwapModeInfo & ~0x0C | param_0 << 2; }
- void setRasSel(u8 param_0) { mTevSwapModeInfo = mTevSwapModeInfo & ~0x03 | param_0; }
+ void setTexSel(u8 param_0) { mTevSwapModeInfo = (mTevSwapModeInfo & ~0x0C) | param_0 << 2; }
+ void setRasSel(u8 param_0) { mTevSwapModeInfo = (mTevSwapModeInfo & ~0x03) | param_0; }
void setTevSwapModeInfo(const J3DTevSwapModeInfo& info) {
setTexSel(info.mTexSel);
setRasSel(info.mRasSel);
}
+ void setStageNo(u32 i) {
+ mTevColorReg = GX_BP_REG_TEVCOLORCOMBINER0 + i * 2;
+ mTevAlphaReg = GX_BP_REG_TEVALPHACOMBINER0 + i * 2;
+ }
+
void load(u32) const {
J3DGDWriteBPCmd(*(u32*)&mTevColorReg);
J3DGDWriteBPCmd(*(u32*)&mTevAlphaReg);
}
+ void getABias() const {}
+ void getAClamp() const {}
+ void getAOp() const {}
+ void getAReg() const {}
+ void getAScale() const {}
+ void getAlphaA() const {}
+ void getAlphaB() const {}
+ void getAlphaC() const {}
+ void getAlphaD() const {}
+ void getCBias() const {}
+ void getCClamp() const {}
+ void getCOp() const {}
+ void getCReg() const {}
+ void getCScale() const {}
+ void getColorA() const {}
+ void getColorB() const {}
+ void getColorC() const {}
+ void getColorD() const {}
+ void getRasSel() const {}
+ void getTexSel() const {}
+
+ // void operator=(J3DTevStage&) {}
+ // void operator==(J3DTevStage&) {}
+
+private:
/* 0x0 */ u8 mTevColorReg;
/* 0x1 */ u8 mTevColorOp;
/* 0x2 */ u8 mTevColorAB;
@@ -130,15 +160,15 @@ struct J3DIndTevStage {
setIndTevStageInfo(info);
}
- void setIndStage(u8 stage) { mInfo = mInfo & ~0x03 | stage; }
- void setIndFormat(u8 format) { mInfo = mInfo & ~0x0C | format << 2; }
- void setBiasSel(u8 sel) { mInfo = mInfo & ~0x70 | sel << 4; }
- void setAlphaSel(u8 sel) { mInfo = mInfo & ~0x0180 | sel << 7; }
- void setMtxSel(u8 sel) { mInfo = mInfo & ~0x1E00 | sel << 9; }
- void setWrapS(u8 wrap) { mInfo = mInfo & ~0xE000 | wrap << 13; }
- void setWrapT(u8 wrap) { mInfo = mInfo & ~0x070000 | wrap << 16; }
- void setLod(u8 lod) { mInfo = mInfo & ~0x080000 | lod << 19; }
- void setPrev(u8 prev) { mInfo = mInfo & ~0x100000 | prev << 20; }
+ void setIndStage(u8 stage) { mInfo = (mInfo & ~0x03) | stage; }
+ void setIndFormat(u8 format) { mInfo = (mInfo & ~0x0C) | format << 2; }
+ void setBiasSel(u8 sel) { mInfo = (mInfo & ~0x70) | sel << 4; }
+ void setAlphaSel(u8 sel) { mInfo = (mInfo & ~0x0180) | sel << 7; }
+ void setMtxSel(u8 sel) { mInfo = (mInfo & ~0x1E00) | sel << 9; }
+ void setWrapS(u8 wrap) { mInfo = (mInfo & ~0xE000) | wrap << 13; }
+ void setWrapT(u8 wrap) { mInfo = (mInfo & ~0x070000) | wrap << 16; }
+ void setLod(u8 lod) { mInfo = (mInfo & ~0x080000) | lod << 19; }
+ void setPrev(u8 prev) { mInfo = (mInfo & ~0x100000) | prev << 20; }
void setIndTevStageInfo(const J3DIndTevStageInfo& info) {
setIndStage(info.mIndStage);
@@ -152,16 +182,40 @@ struct J3DIndTevStage {
setAlphaSel(info.mAlphaSel);
}
- void load(u32 param_1) {
+ void load(u32 param_1) const {
J3DGDWriteBPCmd(mInfo | (param_1 + 16) << 24);
}
+ void getAlphaSel() const {}
+ void getBiasSel() const {}
+ void getIndFormat() const {}
+ void getIndStage() const {}
+ void getLod() const {}
+ void getMtxSel() const {}
+ void getPrev() const {}
+ void getWrapS() const {}
+ void getWrapT() const {}
+
+ J3DIndTevStage& operator=(J3DIndTevStage& other) {
+ mInfo = other.mInfo;
+ return *this;
+ }
+ J3DIndTevStage& operator=(const J3DIndTevStage& other) {
+ mInfo = other.mInfo;
+ return *this;
+ }
+
+private:
/* 0x0 */ u32 mInfo;
};
struct J3DTevOrder : public J3DTevOrderInfo {
- J3DTevOrder() { *(J3DTevOrderInfo*)this = j3dDefaultTevOrderInfoNull; }
- explicit J3DTevOrder(const J3DTevOrderInfo& info) { *(J3DTevOrderInfo*)this = info; }
+ J3DTevOrder() {
+ J3DTevOrderInfo::operator=(j3dDefaultTevOrderInfoNull);
+ }
+ explicit J3DTevOrder(const J3DTevOrderInfo& info) {
+ J3DTevOrderInfo::operator=(info);
+ }
J3DTevOrderInfo& getTevOrderInfo() { return *this; }
u8 getTexMap() { return mTexMap; }
@@ -175,11 +229,12 @@ struct J3DTevSwapModeTable {
J3DTevSwapModeTable() { mIdx = j3dDefaultTevSwapTableID; }
explicit J3DTevSwapModeTable(const J3DTevSwapModeTableInfo& info) { mIdx = calcTevSwapTableID(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); }
- u8 getR() { return j3dTevSwapTableTable[mIdx * 4]; }
- u8 getG() { return j3dTevSwapTableTable[mIdx * 4 + 1]; }
- u8 getB() { return j3dTevSwapTableTable[mIdx * 4 + 2]; }
- u8 getA() { return j3dTevSwapTableTable[mIdx * 4 + 3]; }
+ u8 getR() const { return j3dTevSwapTableTable[mIdx * 4]; }
+ u8 getG() const { return j3dTevSwapTableTable[mIdx * 4 + 1]; }
+ u8 getB() const { return j3dTevSwapTableTable[mIdx * 4 + 2]; }
+ u8 getA() const { return j3dTevSwapTableTable[mIdx * 4 + 3]; }
+private:
/* 0x0 */ u8 mIdx;
}; // Size: 0x1
@@ -199,8 +254,12 @@ public:
}; // Size = 0x74
struct J3DNBTScale : public J3DNBTScaleInfo {
- J3DNBTScale() { *(J3DNBTScaleInfo*)this = j3dDefaultNBTScaleInfo; }
- explicit J3DNBTScale(const J3DNBTScaleInfo& info) { *(J3DNBTScaleInfo*)this = info; }
+ J3DNBTScale() {
+ J3DNBTScaleInfo::operator=(j3dDefaultNBTScaleInfo);
+ }
+ explicit J3DNBTScale(const J3DNBTScaleInfo& info) {
+ J3DNBTScaleInfo::operator=(info);
+ }
Vec* getScale() { return &mScale; }
};
diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h
index 7a8eaba9..7147982c 100644
--- a/include/JSystem/J3DGraphBase/J3DTexture.h
+++ b/include/JSystem/J3DGraphBase/J3DTexture.h
@@ -51,40 +51,46 @@ public:
}
};
-class J3DTexMtx {
+class J3DTexMtx : public J3DTexMtxInfo {
public:
- J3DTexMtx() { mTexMtxInfo = j3dDefaultTexMtxInfo; }
+ J3DTexMtx() { J3DTexMtxInfo::operator=(j3dDefaultTexMtxInfo); }
J3DTexMtx(const J3DTexMtxInfo& info) {
- mTexMtxInfo = info;
+ J3DTexMtxInfo::operator=(info);
}
~J3DTexMtx() {}
void load(u32 texMtxID) const {
GDOverflowCheck(53);
- J3DGDLoadTexMtxImm((Mtx&)mMtx, GX_TEXMTX0 + texMtxID * 3, (GXTexMtxType)mTexMtxInfo.mProjection);
+ J3DGDLoadTexMtxImm((Mtx&)mMtx, GX_TEXMTX0 + texMtxID * 3, (GXTexMtxType)mProjection);
};
void calc();
- J3DTexMtxInfo& getTexMtxInfo() { return mTexMtxInfo; }
- J3DTextureSRTInfo& getTextureSRT() { return mTexMtxInfo.mSRT;}
+ J3DTexMtxInfo& getTexMtxInfo() { return *this; }
+ J3DTextureSRTInfo& getTextureSRT() { return mSRT;}
Mtx& getMtx() { return mMtx; }
- void setEffectMtx(Mtx effectMtx) { mTexMtxInfo.setEffectMtx(effectMtx); }
+ void setEffectMtx(Mtx effectMtx) { J3DTexMtxInfo::setEffectMtx(effectMtx); }
Mtx& getViewMtx() { return mViewMtx; }
- void setViewMtx(const Mtx viewMtx) { MTXCopy(viewMtx, mViewMtx); }
+ void setViewMtx(Mtx viewMtx) { MTXCopy(viewMtx, mViewMtx); }
-public:
- /* 0x00 */ J3DTexMtxInfo mTexMtxInfo;
+private:
/* 0x64 */ Mtx mMtx;
/* 0x94 */ Mtx mViewMtx;
}; // Size: 0xC4
struct J3DTexCoord : public J3DTexCoordInfo {
- J3DTexCoord() { *(J3DTexCoordInfo*)this = j3dDefaultTexCoordInfo[0]; }
- J3DTexCoord(const J3DTexCoordInfo& info) { *(J3DTexCoordInfo*)this = info; }
+ J3DTexCoord() {
+ J3DTexCoordInfo::operator=(j3dDefaultTexCoordInfo[0]);
+ }
+ J3DTexCoord(const J3DTexCoordInfo& info) {
+ J3DTexCoordInfo::operator=(info);
+ }
u8 getTexGenType() const { return mTexGenType; }
u8 getTexGenSrc() const { return mTexGenSrc; }
u8 getTexGenMtx() const { return mTexGenMtx; }
void setTexGenMtx(u8 v) { mTexGenMtx = v; }
+
+ // void operator=(const J3DTexCoord&) {}
+ // void operator==(J3DTexCoord&) {}
}; // Size: 0x4
#endif /* J3DTEXTURE_H */