d_a_tag_firewall done (#2137)

* mostly fix TVec3 ctors

* d_a_tag_firewall done

* remove asm
This commit is contained in:
TakaRikka
2024-04-21 05:27:47 -07:00
committed by GitHub
parent 151c5099ab
commit b24b477fc4
27 changed files with 369 additions and 1222 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ public:
void clip(const JGeometry::TBox2<f32>& bounds);
void setBasePosition(J2DBasePosition position);
void setInfluencedAlpha(bool arg1, bool arg2);
JGeometry::TVec3<f32> getGlbVtx(u8 arg1) const;
Vec getGlbVtx(u8 arg1) const;
J2DPane* getFirstChildPane();
J2DPane* getNextChildPane();
J2DPane* getParentPane();
+10 -3
View File
@@ -10,10 +10,17 @@ struct J3DTextureSRTInfo;
* @ingroup jsystem-j3d
*
*/
struct J3DTransformInfo {
/* 0x00 */ JGeometry::TVec3<f32> mScale;
/* 0x0C */ JGeometry::TVec3<s16> mRotation;
/* 0x14 */ JGeometry::TVec3<f32> mTranslate;
/* 0x00 */ Vec mScale;
/* 0x0C */ SVec mRotation;
/* 0x14 */ Vec mTranslate;
inline J3DTransformInfo& operator=(const J3DTransformInfo& b) {
mScale = b.mScale;
mRotation = b.mRotation;
mTranslate = b.mTranslate;
return *this;
}
}; // Size: 0x20
extern J3DTransformInfo const j3dDefaultTransformInfo;
+12 -30
View File
@@ -85,20 +85,16 @@ inline float fsqrt_step(float mag) {
}
template <>
struct TVec3<f32> {
f32 x;
f32 y;
f32 z;
struct TVec3<f32> : public Vec {
inline TVec3(const Vec& i_vec) {
setTVec3f(&i_vec.x, &x);
}
// inline TVec3(const Vec& i_vec) {
// setTVec3f(&i_vec.x, &x);
// }
inline TVec3(const TVec3<f32>& i_vec) {
setTVec3f(&i_vec.x, &x);
}
// inline TVec3(const TVec3<f32>& i_vec) {
// setTVec3f(&i_vec.x, &x);
// }
// TVec3() {}
TVec3() {}
operator Vec*() { return (Vec*)&x; }
operator const Vec*() const { return (Vec*)&x; }
@@ -148,10 +144,10 @@ struct TVec3<f32> {
return *this;
}
// inline TVec3<f32>& operator=(const TVec3<f32>& b) {
// setTVec3f(&b.x, &this->x);
// return *this;
// }
inline TVec3<f32>& operator=(const TVec3<f32>& b) {
set(b.x, b.y, b.z);
return *this;
}
inline TVec3<f32>& operator+=(const TVec3<f32>& b) {
add(b);
@@ -164,20 +160,6 @@ struct TVec3<f32> {
// return res;
// }
inline TVec3<f32>& operator=(const TVec3<f32>& b) {
register f32* dst = &x;
const register f32* src = &b.x;
register f32 x_y;
register f32 z;
asm {
psq_l x_y, 0(src), 0, 0
psq_st x_y, 0(dst), 0, 0
lfs z, 8(src)
stfs z, 8(dst)
};
return *this;
}
f32 squared() const {
return C_VECSquareMag((Vec*)&x);
}
+1 -3
View File
@@ -216,9 +216,7 @@ struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> {
Z2SpotMic* getLinkMic() { return mLinkMic; }
JGeometry::TVec3<f32> getAudioCamPos() {
JGeometry::TVec3<f32> pos;
JGeometry::setTVec3f(*(Vec*)mAudioCamera[0].getPos(), *(Vec*)pos);
return pos;
return *mAudioCamera[0].getPos();
}
Z2Audience3DSetting* getSetting() { return &mSetting; }
+2 -1
View File
@@ -293,7 +293,7 @@ public:
FLG2_UNK_200000 = 0x200000,
FLG2_UNK_100000 = 0x100000,
FLG2_UNK_80000 = 0x80000,
FLG2_UNK_40000 = 0x40000,
FLG2_FORCE_GAMEOVER = 0x40000,
FLG2_UNK_20000 = 0x20000,
FLG2_UNK_10000 = 0x10000,
FLG2_SCN_CHG_START = 0x8000,
@@ -818,6 +818,7 @@ public:
void onPlayerShadowNoDraw() { onNoResetFlg2(FLG2_PLAYER_SHADOW); }
void offPlayerShadowNoDraw() { offNoResetFlg2(FLG2_PLAYER_SHADOW); }
void onLightSwordGetEffect() { onEndResetFlg2(ERFLG2_UNK_10); }
void onForceGameOver() { onNoResetFlg2(FLG2_FORCE_GAMEOVER); }
u32 checkBoarSingleBattle() const { return checkNoResetFlg2(FLG2_BOAR_SINGLE_BATTLE); }
@@ -1,6 +1,28 @@
#ifndef D_A_TAG_FIREWALL_H
#define D_A_TAG_FIREWALL_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
#include "d/cc/d_cc_d.h"
class daTag_FWall_c : public fopAc_ac_c {
public:
/* 80D58940 */ int execute();
/* 80D59078 */ int _delete();
/* 80D590A8 */ int create();
/* 0x568 */ u8 field_0x568;
/* 0x569 */ u8 mSetGameoverEff;
/* 0x56C */ int mWallTimer[20];
/* 0x5BC */ int mExplodeTime[20];
/* 0x60C */ int mWallMode[20];
/* 0x65C */ u8 field_0x65c[20];
/* 0x670 */ cXyz mWallPos[20];
/* 0x760 */ u8 field_0x760[20];
/* 0x774 */ u32 mUnkEmtrID0[20];
/* 0x7C4 */ u32 mUnkEmtrID1;
/* 0x7C8 */ u32 mUnkEmtrID2;
/* 0x7CC */ dCcD_Stts mCcStts;
/* 0x808 */ dCcD_Sph mCcSphs[20];
};
#endif /* D_A_TAG_FIREWALL_H */