mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
setup dolphin VEC/MTX function defines (#1903)
* setup VEC function defines * setup MTX function defines
This commit is contained in:
@@ -129,7 +129,7 @@ public:
|
||||
|
||||
MtxP getGlbMtx() { return mGlobalMtx; }
|
||||
|
||||
void setMtx(Mtx m) { PSMTXCopy(m, mPositionMtx); }
|
||||
void setMtx(Mtx m) { MTXCopy(m, mPositionMtx); }
|
||||
|
||||
void translate(f32 transX, f32 transY) {
|
||||
mTranslateX = transX;
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
bool isCpuSkinningOn() const { return (mFlags & J3DMdlFlag_SkinPosCpu) && (mFlags & J3DMdlFlag_SkinNrmCpu); }
|
||||
|
||||
Mtx& getBaseTRMtx() { return mBaseTransformMtx; }
|
||||
void i_setBaseTRMtx(Mtx m) { PSMTXCopy(m, mBaseTransformMtx); }
|
||||
void i_setBaseTRMtx(Mtx m) { MTXCopy(m, mBaseTransformMtx); }
|
||||
u32 getMtxCalcMode() const { return mFlags & 0x03; }
|
||||
J3DVertexBuffer* getVertexBuffer() const { return (J3DVertexBuffer*)&mVertexBuffer; }
|
||||
J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; }
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
/* 80326EF0 */ void calcBBoardMtx();
|
||||
|
||||
MtxP getAnmMtx(int idx) const { return mpAnmMtx[idx]; }
|
||||
void setAnmMtx(int i, Mtx m) { PSMTXCopy(m, (MtxP)mpAnmMtx[i]); }
|
||||
void setAnmMtx(int i, Mtx m) { MTXCopy(m, (MtxP)mpAnmMtx[i]); }
|
||||
MtxP getWeightAnmMtx(int idx) const { return mpWeightEvlpMtx[idx]; }
|
||||
|
||||
void setScaleFlag(int idx, u8 flag) { mpScaleFlagArr[idx] = flag; }
|
||||
|
||||
@@ -124,7 +124,7 @@ struct J3DSys {
|
||||
Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; }
|
||||
J3DShapePacket* getShapePacket() const { return mShapePacket; }
|
||||
|
||||
void setViewMtx(Mtx m) { PSMTXCopy(m, mViewMtx); }
|
||||
void setViewMtx(Mtx m) { MTXCopy(m, mViewMtx); }
|
||||
|
||||
J3DModel* getModel() { return mModel; }
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ struct TVec3<f32> {
|
||||
}
|
||||
|
||||
f32 length() const {
|
||||
return PSVECMag((Vec*)this);
|
||||
return VECMag((Vec*)this);
|
||||
}
|
||||
|
||||
void scale(register f32 sc) {
|
||||
@@ -247,7 +247,7 @@ struct TVec3<f32> {
|
||||
}
|
||||
|
||||
void cross(const TVec3<f32>& a, const TVec3<f32>& b) {
|
||||
PSVECCrossProduct(a, b, *this);
|
||||
VECCrossProduct(a, b, *this);
|
||||
}
|
||||
|
||||
void setLength(f32 len) {
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
class JPADrawInfo {
|
||||
public:
|
||||
JPADrawInfo(Mtx param_0, f32 fovY, f32 aspect) {
|
||||
PSMTXCopy(param_0, mCamMtx);
|
||||
MTXCopy(param_0, mCamMtx);
|
||||
C_MTXLightPerspective(mPrjMtx, fovY, aspect, 0.5f, -0.5f, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
JPADrawInfo(Mtx param_0, f32 top, f32 bottom, f32 left, f32 right) {
|
||||
PSMTXCopy(param_0, mCamMtx);
|
||||
MTXCopy(param_0, mCamMtx);
|
||||
C_MTXLightOrtho(mPrjMtx, top, bottom, left, right, 0.5f, 0.5f, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
Mtx mCamMtx;
|
||||
Mtx mPrjMtx;
|
||||
|
||||
void getCamMtx(Mtx* dst) const { PSMTXCopy(mCamMtx, *dst); }
|
||||
void getPrjMtx(Mtx* dst) const { PSMTXCopy(mPrjMtx, *dst); }
|
||||
void getCamMtx(Mtx* dst) const { MTXCopy(mCamMtx, *dst); }
|
||||
void getPrjMtx(Mtx* dst) const { MTXCopy(mPrjMtx, *dst); }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@ template <>
|
||||
struct SMatrix34C<f32> {
|
||||
f32 data[3][4];
|
||||
|
||||
void identity() { PSMTXIdentity(data); }
|
||||
void identity() { MTXIdentity(data); }
|
||||
|
||||
typedef f32 ArrType[4];
|
||||
void set(const ArrType* src) { JMath::gekko_ps_copy12((f32*)data, (f32*)src); }
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
void SetStartEnd(const cXyz&, const cXyz&);
|
||||
void SetStartEnd(const Vec&, const Vec&);
|
||||
void CalcPos(Vec*, f32) const;
|
||||
void CalcVec(Vec* pOut) const { PSVECSubtract(&this->mEnd, &this->mStart, pOut); }
|
||||
void CalcVec(Vec* pOut) const { VECSubtract(&this->mEnd, &this->mStart, pOut); }
|
||||
void SetEnd(const cXyz&);
|
||||
const cXyz& GetStartP(void) const { return mStart; }
|
||||
cXyz& GetStartP(void) { return mStart; }
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
|
||||
virtual ~cM3dGPla() {}
|
||||
|
||||
f32 getPlaneFunc(const Vec* pPoint) const { return mD + PSVECDotProduct(&mNormal, pPoint); }
|
||||
f32 getPlaneFunc(const Vec* pPoint) const { return mD + VECDotProduct(&mNormal, pPoint); }
|
||||
const cXyz& GetNP() const { return mNormal; }
|
||||
const cXyz* i_GetNP() const { return &mNormal; }
|
||||
f32 GetD() const { return mD; }
|
||||
|
||||
@@ -52,9 +52,9 @@ struct cXyz : Vec {
|
||||
y -= f;
|
||||
z -= f;
|
||||
}
|
||||
void operator-=(const Vec& other) { PSVECSubtract(this, &other, this); }
|
||||
void operator+=(const Vec& other) { PSVECAdd(this, &other, this); }
|
||||
void operator*=(f32 scale) { PSVECScale(this, this, scale); }
|
||||
void operator-=(const Vec& other) { VECSubtract(this, &other, this); }
|
||||
void operator+=(const Vec& other) { VECAdd(this, &other, this); }
|
||||
void operator*=(f32 scale) { VECScale(this, this, scale); }
|
||||
/* 80266C6C */ cXyz getCrossProduct(Vec const&) const;
|
||||
/* 80266CBC */ cXyz outprod(Vec const&) const;
|
||||
/* 80266CE4 */ cXyz norm() const;
|
||||
@@ -111,8 +111,8 @@ struct cXyz : Vec {
|
||||
}
|
||||
}
|
||||
|
||||
float getSquareMag() const { return PSVECSquareMag(this); }
|
||||
f32 getSquareDistance(const Vec& other) const { return PSVECSquareDistance(this, &other); }
|
||||
float getSquareMag() const { return VECSquareMag(this); }
|
||||
f32 getSquareDistance(const Vec& other) const { return VECSquareDistance(this, &other); }
|
||||
|
||||
static float getNearZeroValue() { return 8e-11f; }
|
||||
|
||||
@@ -134,7 +134,7 @@ struct cXyz : Vec {
|
||||
f32 absXZ(const Vec& other) const { return sqrtf(this->abs2XZ(other)); }
|
||||
f32 getMagXZ() const { return cXyz(this->x, 0, this->z).getSquareMag(); }
|
||||
|
||||
f32 getDotProduct(const Vec& other) const { return PSVECDotProduct(this, &other); }
|
||||
f32 getDotProduct(const Vec& other) const { return VECDotProduct(this, &other); }
|
||||
f32 inprod(const Vec& other) const { return getDotProduct(other); }
|
||||
};
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
/* 8007B0B0 */ virtual bool ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
|
||||
/* 8007B0DC */ virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
|
||||
|
||||
u32 GetOldInvMtx(Mtx m) { return PSMTXInverse(m_inv_mtx, m); }
|
||||
u32 GetOldInvMtx(Mtx m) { return MTXInverse(m_inv_mtx, m); }
|
||||
MtxP GetBaseMtxP() { return pm_base; }
|
||||
bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
|
||||
bool ChkFlush() { return field_0x91 & 8; }
|
||||
|
||||
@@ -40,6 +40,35 @@ inline void C_MTXRotAxisRad(Mtx m, const Vec* axis, f32 rad) {
|
||||
PSMTXRotAxisRad(m, axis, rad);
|
||||
}
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
#define MTXIdentity C_MTXIdentity
|
||||
#define MTXCopy C_MTXCopy
|
||||
#define MTXConcat C_MTXConcat
|
||||
#define MTXInverse C_MTXInverse
|
||||
#define MTXRotRad C_MTXRotRad
|
||||
#define MTXRotTrig C_MTXRotTrig
|
||||
#define MTXRotAxisRad C_MTXRotAxisRad
|
||||
#define MTXTrans C_MTXTrans
|
||||
#define MTXTransApply C_MTXTransApply
|
||||
#define MTXScale C_MTXScale
|
||||
#define MTXScaleApply C_MTXScaleApply
|
||||
#define MTXQuat C_MTXQuat
|
||||
#else
|
||||
#define MTXIdentity PSMTXIdentity
|
||||
#define MTXCopy PSMTXCopy
|
||||
#define MTXConcat PSMTXConcat
|
||||
#define MTXInverse PSMTXInverse
|
||||
#define MTXRotRad PSMTXRotRad
|
||||
#define MTXRotTrig PSMTXRotTrig
|
||||
#define MTXRotAxisRad PSMTXRotAxisRad
|
||||
#define MTXTrans PSMTXTrans
|
||||
#define MTXTransApply PSMTXTransApply
|
||||
#define MTXScale PSMTXScale
|
||||
#define MTXScaleApply PSMTXScaleApply
|
||||
#define MTXQuat PSMTXQuat
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -12,6 +12,19 @@ void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
|
||||
void PSMTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
void PSMTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
#define MTXMultVec C_MTXMultVec
|
||||
#define MTXMultVecSR C_MTXMultVecSR
|
||||
#define MTXMultVecArray C_MTXMultVecArray
|
||||
#define MTXMultVecArraySR C_MTXMultVecArraySR
|
||||
#else
|
||||
#define MTXMultVec PSMTXMultVec
|
||||
#define MTXMultVecSR PSMTXMultVecSR
|
||||
#define MTXMultVecArray PSMTXMultVecArray
|
||||
#define MTXMultVecArraySR PSMTXMultVecArraySR
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,13 @@ void PSQUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab);
|
||||
void C_QUATRotAxisRad(Quaternion* q, const Vec* axis, f32 rad);
|
||||
void C_QUATSlerp(const Quaternion* p, const Quaternion* q, Quaternion* r, f32 t);
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
#define QUATMultiply C_QUATMultiply
|
||||
#else
|
||||
#define QUATMultiply PSQUATMultiply
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -80,10 +80,36 @@ inline f32 C_VECSquareMag(const Vec* v) {
|
||||
lfs z, 8(src)
|
||||
ps_madd res, z, z, x_y
|
||||
ps_sum0 res, res, x_y, x_y
|
||||
};
|
||||
}
|
||||
;
|
||||
return res;
|
||||
}
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
#define VECAdd C_VECAdd
|
||||
#define VECSubtract C_VECSubtract
|
||||
#define VECScale C_VECScale
|
||||
#define VECNormalize C_VECNormalize
|
||||
#define VECSquareMag C_VECSquareMag
|
||||
#define VECMag C_VECMag
|
||||
#define VECDotProduct C_VECDotProduct
|
||||
#define VECCrossProduct C_VECCrossProduct
|
||||
#define VECSquareDistance C_VECSquareDistance
|
||||
#define VECDistance C_VECDistance
|
||||
#else
|
||||
#define VECAdd PSVECAdd
|
||||
#define VECSubtract PSVECSubtract
|
||||
#define VECScale PSVECScale
|
||||
#define VECNormalize PSVECNormalize
|
||||
#define VECSquareMag PSVECSquareMag
|
||||
#define VECMag PSVECMag
|
||||
#define VECDotProduct PSVECDotProduct
|
||||
#define VECCrossProduct PSVECCrossProduct
|
||||
#define VECSquareDistance PSVECSquareDistance
|
||||
#define VECDistance PSVECDistance
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
+20
-20
@@ -26,31 +26,31 @@ void mDoMtx_inverseTranspose(f32 const (*param_0)[4], f32 (*param_1)[4]);
|
||||
void mDoMtx_QuatConcat(Quaternion const* param_0, Quaternion const* param_1, Quaternion* param_2);
|
||||
|
||||
inline void mDoMtx_multVecSR(Mtx m, const Vec* src, Vec* dst) {
|
||||
PSMTXMultVecSR(m, src, dst);
|
||||
MTXMultVecSR(m, src, dst);
|
||||
}
|
||||
|
||||
inline void cMtx_concat(const Mtx a, const Mtx b, Mtx ab) {
|
||||
PSMTXConcat(a, b, ab);
|
||||
MTXConcat(a, b, ab);
|
||||
}
|
||||
|
||||
inline void cMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
|
||||
PSMTXScale(m, x, y, z);
|
||||
MTXScale(m, x, y, z);
|
||||
}
|
||||
|
||||
inline void mDoMtx_multVec(Mtx m, const Vec* src, Vec* dst) {
|
||||
PSMTXMultVec(m, src, dst);
|
||||
MTXMultVec(m, src, dst);
|
||||
}
|
||||
|
||||
inline void mDoMtx_multVecArray(Mtx m, const Vec* src, Vec* dst, u32 count) {
|
||||
PSMTXMultVecArray(m, src, dst, count);
|
||||
MTXMultVecArray(m, src, dst, count);
|
||||
}
|
||||
|
||||
inline void mDoMtx_copy(const Mtx src, Mtx dst) {
|
||||
PSMTXCopy(src, dst);
|
||||
MTXCopy(src, dst);
|
||||
}
|
||||
|
||||
inline void mDoMtx_trans(Mtx m, f32 x, f32 y, f32 z) {
|
||||
PSMTXTrans(m, x, y, z);
|
||||
MTXTrans(m, x, y, z);
|
||||
}
|
||||
|
||||
inline void cMtx_XrotM(Mtx mtx, s16 x) {
|
||||
@@ -92,7 +92,7 @@ inline void mDoMtx_multVecZero(MtxP param_0, Vec* param_1) {
|
||||
}
|
||||
|
||||
inline void mDoMtx_quatMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab) {
|
||||
PSQUATMultiply(a,b,ab);
|
||||
QUATMultiply(a,b,ab);
|
||||
}
|
||||
|
||||
inline void mDoMtx_quatSlerp(const Quaternion* a, const Quaternion* b, Quaternion* ab, f32 param_4) {
|
||||
@@ -100,15 +100,15 @@ inline void mDoMtx_quatSlerp(const Quaternion* a, const Quaternion* b, Quaternio
|
||||
}
|
||||
|
||||
inline void mDoMtx_identity(Mtx m) {
|
||||
PSMTXIdentity(m);
|
||||
MTXIdentity(m);
|
||||
}
|
||||
|
||||
inline void mDoMtx_concat(const Mtx a, const Mtx b, Mtx c) {
|
||||
PSMTXConcat(a, b, c);
|
||||
MTXConcat(a, b, c);
|
||||
}
|
||||
|
||||
inline void mDoMtx_inverse(const Mtx a, Mtx b) {
|
||||
PSMTXInverse(a, b);
|
||||
MTXInverse(a, b);
|
||||
}
|
||||
|
||||
inline void cMtx_inverse(const Mtx a, Mtx b) {
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
* @param y The y-axis translation value
|
||||
* @param z The z-axis translation value
|
||||
*/
|
||||
static void transS(f32 x, f32 y, f32 z) { PSMTXTrans(now, x, y, z); }
|
||||
static void transS(f32 x, f32 y, f32 z) { MTXTrans(now, x, y, z); }
|
||||
|
||||
/**
|
||||
* Scales the `now` Matrix by the given X, Y, and Z values
|
||||
@@ -199,21 +199,21 @@ public:
|
||||
* @param y The y-axis scale value
|
||||
* @param z The z-axis scale value
|
||||
*/
|
||||
static void scaleS(f32 x, f32 y, f32 z) { PSMTXScale(now, x, y, z); }
|
||||
static void scaleS(f32 x, f32 y, f32 z) { MTXScale(now, x, y, z); }
|
||||
|
||||
/**
|
||||
* Multiplies a given Vec `a` by the `now` Matrix and places the result into Vec `b`
|
||||
* @param a The source Vec
|
||||
* @param b The output Vec
|
||||
*/
|
||||
static void multVec(const Vec* a, Vec* b) { PSMTXMultVec(now, a, b); }
|
||||
static void multVec(const Vec* a, Vec* b) { MTXMultVec(now, a, b); }
|
||||
|
||||
/**
|
||||
* Multiplies a given Vec `a` by the `now` Matrix's "Scale-and-Rotate" component and places the result into Vec `b`
|
||||
* @param a The source Vec
|
||||
* @param b The output Vec
|
||||
*/
|
||||
static void multVecSR(const Vec* a, Vec* b) { PSMTXMultVecSR(now, a, b); }
|
||||
static void multVecSR(const Vec* a, Vec* b) { MTXMultVecSR(now, a, b); }
|
||||
|
||||
static void multVecZero(Vec* v) { mDoMtx_multVecZero(now, v); }
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
* @param count The size of the array
|
||||
*/
|
||||
static void multVecArray(const Vec* src, Vec* dst, u32 count) {
|
||||
PSMTXMultVecArray(now, src, dst, count);
|
||||
MTXMultVecArray(now, src, dst, count);
|
||||
}
|
||||
|
||||
static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); }
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
*/
|
||||
static void ZrotM(s16 z) { mDoMtx_ZrotM(now, z); }
|
||||
|
||||
static void inverse() { PSMTXInverse(now, now); }
|
||||
static void inverse() { MTXInverse(now, now); }
|
||||
|
||||
static void inverseTranspose() { mDoMtx_inverseTranspose(now, now); }
|
||||
|
||||
@@ -285,15 +285,15 @@ public:
|
||||
* Concatenates the `now` matrix with the given Matrix `m`
|
||||
* @param m The matrix to concatenate with `now`
|
||||
*/
|
||||
static void concat(const Mtx m) { PSMTXConcat(now, m, now); }
|
||||
static void concat(const Mtx m) { MTXConcat(now, m, now); }
|
||||
|
||||
static void revConcat(const Mtx m) { PSMTXConcat(m, now, now); }
|
||||
static void revConcat(const Mtx m) { MTXConcat(m, now, now); }
|
||||
|
||||
/**
|
||||
* Copies a given matrix `m` to the `now` matrix
|
||||
* @param m The source matrix to copy
|
||||
*/
|
||||
static void copy(const Mtx m) { PSMTXCopy(m, now); }
|
||||
static void copy(const Mtx m) { MTXCopy(m, now); }
|
||||
|
||||
static Mtx now;
|
||||
static Mtx buffer[16];
|
||||
|
||||
@@ -56,7 +56,7 @@ void J2DGrafContext::setup2D() {
|
||||
GXSetCullMode(GX_CULL_NONE);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
Mtx mtx;
|
||||
PSMTXIdentity(mtx);
|
||||
MTXIdentity(mtx);
|
||||
GXLoadTexMtxImm(mtx, GX_IDENTITY, GX_MTX3x4);
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE,
|
||||
GX_AF_NONE);
|
||||
|
||||
@@ -50,7 +50,7 @@ void J2DOrthoGraph::setOrtho(JGeometry::TBox2<f32> const& bounds, f32 far, f32 n
|
||||
|
||||
/* 802E9840-802E987C 2E4180 003C+00 1/0 0/0 0/0 .text setLookat__13J2DOrthoGraphFv */
|
||||
void J2DOrthoGraph::setLookat() {
|
||||
PSMTXIdentity(mPosMtx);
|
||||
MTXIdentity(mPosMtx);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ void J2DPane::draw(f32 x, f32 y, J2DGrafContext const* p_grafCtx, bool isOrthoGr
|
||||
f32 width = parent->mGlobalBounds.i.x - parent->mBounds.i.x;
|
||||
f32 height = parent->mGlobalBounds.i.y - parent->mBounds.i.y;
|
||||
mGlobalBounds.addPos(width, height);
|
||||
PSMTXConcat(parent->mGlobalMtx, mPositionMtx, mGlobalMtx);
|
||||
MTXConcat(parent->mGlobalMtx, mPositionMtx, mGlobalMtx);
|
||||
|
||||
if (unkBool) {
|
||||
if (isOrthoGraf) {
|
||||
@@ -308,7 +308,7 @@ void J2DPane::draw(f32 x, f32 y, J2DGrafContext const* p_grafCtx, bool isOrthoGr
|
||||
} else {
|
||||
mGlobalBounds.addPos(x, y);
|
||||
makeMatrix(mTranslateX + x, mTranslateY + y);
|
||||
PSMTXCopy(mPositionMtx, mGlobalMtx);
|
||||
MTXCopy(mPositionMtx, mGlobalMtx);
|
||||
mClipRect = mGlobalBounds;
|
||||
mColorAlpha = mAlpha;
|
||||
}
|
||||
@@ -528,15 +528,15 @@ void J2DPane::makeMatrix(f32 param_0, f32 param_1, f32 param_2, f32 param_3) {
|
||||
f32 tmpX = mRotateOffsetX - param_2;
|
||||
f32 tmpY = mRotateOffsetY - param_3;
|
||||
Mtx rotX, rotY, rotZ, rotMtx, mtx, tmp;
|
||||
PSMTXTrans(mtx, -tmpX, -tmpY, 0);
|
||||
PSMTXRotRad(rotX, 'x', DEG_TO_RAD(mRotateX));
|
||||
PSMTXRotRad(rotY, 'y', DEG_TO_RAD(mRotateY));
|
||||
PSMTXRotRad(rotZ, 'z', DEG_TO_RAD(-mRotateZ));
|
||||
PSMTXConcat(rotZ, rotX, tmp);
|
||||
PSMTXConcat(rotY, tmp, rotMtx);
|
||||
PSMTXScaleApply(mtx, mPositionMtx, mScaleX, mScaleY, 1);
|
||||
PSMTXConcat(rotMtx, mPositionMtx, tmp);
|
||||
PSMTXTransApply(tmp, mPositionMtx, param_0 + tmpX, param_1 + tmpY, 0);
|
||||
MTXTrans(mtx, -tmpX, -tmpY, 0);
|
||||
MTXRotRad(rotX, 'x', DEG_TO_RAD(mRotateX));
|
||||
MTXRotRad(rotY, 'y', DEG_TO_RAD(mRotateY));
|
||||
MTXRotRad(rotZ, 'z', DEG_TO_RAD(-mRotateZ));
|
||||
MTXConcat(rotZ, rotX, tmp);
|
||||
MTXConcat(rotY, tmp, rotMtx);
|
||||
MTXScaleApply(mtx, mPositionMtx, mScaleX, mScaleY, 1);
|
||||
MTXConcat(rotMtx, mPositionMtx, tmp);
|
||||
MTXTransApply(tmp, mPositionMtx, param_0 + tmpX, param_1 + tmpY, 0);
|
||||
}
|
||||
|
||||
/* 802F7680-802F76F8 2F1FC0 0078+00 1/0 7/3 0/0 .text setCullBack__7J2DPaneF11_GXCullMode
|
||||
|
||||
@@ -662,7 +662,7 @@ void J2DPicture::changeTexture(char const* param_0, u8 param_1, JUTPalette* para
|
||||
/* 802FDB28-802FDB90 2F8468 0068+00 1/0 1/0 0/0 .text drawSelf__10J2DPictureFff */
|
||||
void J2DPicture::drawSelf(f32 param_0, f32 param_1) {
|
||||
Mtx tmp;
|
||||
PSMTXIdentity(tmp);
|
||||
MTXIdentity(tmp);
|
||||
|
||||
drawSelf(param_0, param_1, &tmp);
|
||||
}
|
||||
@@ -732,7 +732,7 @@ void J2DPicture::drawTexCoord(f32 param_0, f32 param_1, f32 param_2, f32 param_3
|
||||
|
||||
getNewColor(black);
|
||||
setTevMode();
|
||||
PSMTXConcat((MtxP)param_12,mGlobalMtx,outputMtx);
|
||||
MTXConcat((MtxP)param_12,mGlobalMtx,outputMtx);
|
||||
|
||||
GXLoadPosMtxImm(outputMtx,0);
|
||||
GXClearVtxDesc();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user