mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04: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); }
|
||||
|
||||
Reference in New Issue
Block a user