c_phase match, thanks to Cuyler

also some JPA work
This commit is contained in:
Jasper St. Pierre
2023-12-19 22:05:59 -08:00
parent 83329401b4
commit 4bd0dede83
7 changed files with 304 additions and 147 deletions
+3 -16
View File
@@ -222,23 +222,10 @@ struct TVec3<f32> {
};
}
void negateInternal(TVec3<f32>* dst) {
register f32* rdst = &dst->x;
const register f32* src = &x;
register f32 x_y;
register f32 z;
asm {
psq_l x_y, 0(src), 0, 0
ps_neg x_y, x_y
psq_st x_y, 0(rdst), 0, 0
lfs z, 8(src)
fneg z, z
stfs z, 8(rdst)
};
}
void negate() {
negateInternal(this);
x = -x;
y = -y;
z = -z;
}
void sub(const TVec3<f32>& b) {
+2 -2
View File
@@ -70,7 +70,7 @@ public:
virtual GXColor getPrmColor(s16) = 0;
virtual GXColor getEnvColor(s16) = 0;
virtual u8 getColorRegAnmType() = 0;
virtual u32 getColorRegAnmMaxFrm() = 0;
virtual s32 getColorRegAnmMaxFrm() = 0;
virtual u32 isEnableTexScrollAnm() = 0;
virtual f32 getTilingX() = 0;
virtual f32 getTilingY() = 0;
@@ -178,7 +178,7 @@ public:
virtual GXColor getPrmColor(s16 idx) { return mpPrmColorArr[idx]; }
virtual GXColor getEnvColor(s16 idx) { return mpEnvColorArr[idx]; }
virtual u8 getColorRegAnmType() { return (pBsd->mColorFlags >> 4) & 0x07; }
virtual u32 getColorRegAnmMaxFrm() { return pBsd->mColorRegAnmMaxFrm; }
virtual s32 getColorRegAnmMaxFrm() { return pBsd->mColorRegAnmMaxFrm; }
virtual u32 isEnableTexScrollAnm() { return pBsd->mFlags & 0x1000000; }
virtual f32 getTilingX() { return pBsd->mTilingX; }
virtual f32 getTilingY() { return pBsd->mTilingY; }
+4 -2
View File
@@ -32,7 +32,9 @@ public:
/* 0xA0 */ DirTypeFunc mDirTypeFunc;
/* 0xA4 */ RotTypeFunc mRotTypeFunc;
/* 0xA8 */ BasePlaneTypeFunc mBasePlaneTypeFunc;
/* 0xAC */ u8 field_0xa4[0xb4 - 0xac];
/* 0xAC */ u32 field_0xa4;
/* 0xB0 */ s16 mColorAnmFrame;
/* 0xB2 */ s16 field_0xb2;
};
class JPADraw {
@@ -89,7 +91,7 @@ public:
/* 0xB4 */ f32 mScaleOut;
/* 0xB8 */ GXColor mPrmColor;
/* 0xBC */ GXColor mEnvColor;
/* 0xC0 */ s16 mTexIdx;
/* 0xC0 */ u16 mTexIdx;
/* 0xC2 */ u8 field_0xc2;
/* 0xC3 */ u8 field_0xc3;
};
@@ -2,6 +2,7 @@
#define JPADRAWVISITOR_H
#include "JSystem/JSupport/JSUList.h"
#include "JSystem/JGeometry.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"