mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
J3D debug work (#2949)
* J3D debug work * Clean up JSystem GXColor ctors, remove a couple fakematches * Update symbols.txt * Fix res include syntax * Remove fakematch that isn't necessary anymore * Fix some Shield regressions
This commit is contained in:
@@ -82,10 +82,7 @@ struct J3DTexCoordInfo {
|
||||
/* 0x3 */ u8 pad;
|
||||
|
||||
J3DTexCoordInfo& operator=(const J3DTexCoordInfo& other) {
|
||||
mTexGenType = other.mTexGenType;
|
||||
mTexGenSrc = other.mTexGenSrc;
|
||||
mTexGenMtx = other.mTexGenMtx;
|
||||
pad = other.pad;
|
||||
__memcpy(this, &other, sizeof(J3DTexCoordInfo));
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
@@ -98,14 +95,14 @@ extern J3DTexCoordInfo const j3dDefaultTexCoordInfo[8];
|
||||
*/
|
||||
struct J3DTexCoord : public J3DTexCoordInfo {
|
||||
J3DTexCoord() {
|
||||
setTexCoordInfo(j3dDefaultTexCoordInfo[0]);
|
||||
resetTexMtxReg();
|
||||
J3DTexCoordInfo::operator=(j3dDefaultTexCoordInfo[0]);
|
||||
mTexMtxReg = mTexGenMtx;
|
||||
}
|
||||
J3DTexCoord(J3DTexCoordInfo const& info) {
|
||||
setTexCoordInfo(info);
|
||||
resetTexMtxReg();
|
||||
J3DTexCoord(const J3DTexCoordInfo& info) {
|
||||
J3DTexCoordInfo::operator=(info);
|
||||
mTexMtxReg = mTexGenMtx;
|
||||
}
|
||||
void setTexCoordInfo(J3DTexCoordInfo const& info) {
|
||||
void setTexCoordInfo(const J3DTexCoordInfo& info) {
|
||||
__memcpy(this, &info, sizeof(J3DTexCoordInfo));
|
||||
}
|
||||
|
||||
@@ -116,8 +113,12 @@ struct J3DTexCoord : public J3DTexCoordInfo {
|
||||
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)
|
||||
#if DEBUG
|
||||
J3DTexCoordInfo::operator=(other);
|
||||
#else
|
||||
// Fakematch: Instruction order is wrong with __memcpy or J3DTexCoordInfo::operator=
|
||||
*(u32*)this = *(u32*)&other;
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user