mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 06:04:58 -04:00
dMsgScrnTree_c OK, Some JGeometry work (#370)
* Minor work on c_damagereaction and JGeomtry * dMsgScrnTree_c OK * dMsgScrnExplain_c OK
This commit is contained in:
@@ -59,11 +59,15 @@ struct TVec3<f32> {
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
/* TVec3(const Vec& i_vec) {
|
||||
setTVec3f(&i_vec.x, &x);
|
||||
} */
|
||||
// inline TVec3(const Vec& i_vec) {
|
||||
// setTVec3f(&i_vec.x, &x);
|
||||
// }
|
||||
|
||||
/* TVec3() {} */
|
||||
// inline TVec3(const TVec3<f32>& i_vec) {
|
||||
// setTVec3f(&i_vec.x, &x);
|
||||
// }
|
||||
|
||||
// TVec3() {}
|
||||
|
||||
operator Vec*() { return (Vec*)&x; }
|
||||
operator const Vec*() const { return (Vec*)&x; }
|
||||
@@ -80,6 +84,10 @@ struct TVec3<f32> {
|
||||
z = z_;
|
||||
}
|
||||
|
||||
inline void add(const TVec3<f32>& b) {
|
||||
C_VECAdd((Vec*)&x, (Vec*)&b.x, (Vec*)&x);
|
||||
}
|
||||
|
||||
void zero() { x = y = z = 0.0f; }
|
||||
|
||||
void mul(const TVec3<f32>& a, const TVec3<f32>& b) {
|
||||
@@ -104,6 +112,17 @@ struct TVec3<f32> {
|
||||
};
|
||||
}
|
||||
|
||||
inline TVec3<f32>& operator+=(const TVec3<f32>& b) {
|
||||
add(b);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// inline TVec3<f32> operator+(const TVec3<f32>& b) {
|
||||
// TVec3<f32> res(*(Vec*)this);
|
||||
// res += b;
|
||||
// return res;
|
||||
// }
|
||||
|
||||
inline TVec3<f32>& operator=(const TVec3<f32>& b) {
|
||||
register f32* dst = &x;
|
||||
const register f32* src = &b.x;
|
||||
@@ -140,13 +159,14 @@ struct TVec3<f32> {
|
||||
register f32 z;
|
||||
register f32 x_y;
|
||||
register f32* dst = &x;
|
||||
register f32 zres;
|
||||
asm {
|
||||
psq_l x_y, 0(dst), 0, 0
|
||||
psq_l z, 8(dst), 1, 0
|
||||
ps_muls0 x_y, x_y, sc
|
||||
psq_st x_y, 0(dst), 0, 0
|
||||
ps_muls0 x_y, z, sc
|
||||
psq_st x_y, 8(dst), 1, 0
|
||||
ps_muls0 zres, z, sc
|
||||
psq_st zres, 8(dst), 1, 0
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -357,11 +357,13 @@ public:
|
||||
/* 80280548 */ f32 getWidth(JPABaseEmitter const*) const;
|
||||
/* 80280568 */ f32 getHeight(JPABaseEmitter const*) const;
|
||||
int getAge() { return mAge; }
|
||||
void setOffsetPosition(const JGeometry::TVec3<f32>& pos) { mOffsetPosition.set(pos); }
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>& pos) { pos.set(mOffsetPosition); }
|
||||
|
||||
public:
|
||||
/* 0x00 */ Vec mPosition;
|
||||
/* 0x0C */ Vec mLocalPosition;
|
||||
/* 0x18 */ Vec mOffsetPosition;
|
||||
/* 0x18 */ JGeometry::TVec3<f32> mOffsetPosition;
|
||||
/* 0x24 */ Vec mVelocity;
|
||||
/* 0x30 */ Vec mVelType1;
|
||||
/* 0x3C */ Vec mVelType0;
|
||||
|
||||
@@ -46,4 +46,8 @@ struct Z2SpeechMgr2 : public JASGlobalInstance<Z2SpeechMgr2> {
|
||||
|
||||
STATIC_ASSERT(sizeof(Z2SpeechMgr2) == 0x444);
|
||||
|
||||
inline Z2SpeechMgr2* Z2GetSpeechMgr2() {
|
||||
return Z2SpeechMgr2::getInstance();
|
||||
}
|
||||
|
||||
#endif /* Z2SPEECHMGR2_H */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
|
||||
class JPTraceParticleCallBack4 {
|
||||
class JPTraceParticleCallBack4 /* : JPAParticleCallBack */ {
|
||||
public:
|
||||
/* 8001817C */ void execute(JPABaseEmitter*, JPABaseParticle*);
|
||||
/* 800182A4 */ void draw(JPABaseEmitter*, JPABaseParticle*);
|
||||
|
||||
@@ -413,6 +413,7 @@ public:
|
||||
|
||||
JKRArchive* getMsgDtArchive(int idx) { return mMsgDtArchive[idx]; }
|
||||
JKRArchive* getMsgArchive(int idx) { return mMsgArchive[idx]; }
|
||||
JKRArchive* getMsgCommonArchive() { return mMsgCommonArchive; }
|
||||
JKRArchive* getMain2DArchive() { return mMain2DArchive; }
|
||||
JKRArchive* getAnmArchive() { return mAnmArchive; }
|
||||
JKRArchive* getCollectResArchive() { return mCollectResArchive; }
|
||||
@@ -1843,6 +1844,10 @@ inline JKRArchive* dComIfGp_getMsgArchive(int idx) {
|
||||
return g_dComIfG_gameInfo.play.getMsgArchive(idx);
|
||||
}
|
||||
|
||||
inline JKRArchive* dComIfGp_getMsgCommonArchive() {
|
||||
return g_dComIfG_gameInfo.play.getMsgCommonArchive();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setFieldMapArchive2(JKRArchive* arc) {
|
||||
g_dComIfG_gameInfo.play.setFieldMapArchive2(arc);
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ public:
|
||||
void offUseButton(int pButton) { mUseButton &= ~(u16)pButton; }
|
||||
u16 getOilGaugeBackUp() { return mOilGaugeBackUp; }
|
||||
u8 getWarpStatus() { return mWarpStatus; }
|
||||
void setWarpStatus(u8 status) { mWarpStatus = status; }
|
||||
u8 getWarpRoomNo() { return mWarpInfo.mRoomNo; }
|
||||
u8 getWarpPlayerNo() { return mWarpInfo.mWarpPlayerNo; }
|
||||
cXyz& getWarpPos() { return mWarpInfo.mPosition; }
|
||||
@@ -274,6 +275,10 @@ inline void dMeter2Info_getStringKanji(u32 param_0, char* param_1, JMSMesgEntry_
|
||||
g_meter2_info.getStringKanji(param_0, param_1, param_2);
|
||||
}
|
||||
|
||||
inline f32 dMeter2Info_getStringLength(JUTFont* param_0, f32 param_1, f32 param_2, char* param_3) {
|
||||
return g_meter2_info.getStringLength(param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
inline void dMeter2Info_setHotSpringTimer(u8 time) {
|
||||
g_meter2_info.setHotSpringTimer(time);
|
||||
}
|
||||
@@ -290,6 +295,10 @@ inline u8 dMeter2Info_getWarpStatus() {
|
||||
return g_meter2_info.getWarpStatus();
|
||||
}
|
||||
|
||||
inline void dMeter2Info_setWarpStatus(u8 status) {
|
||||
return g_meter2_info.setWarpStatus(status);
|
||||
}
|
||||
|
||||
inline u8 dMeter2Info_getWarpRoomNo() {
|
||||
return g_meter2_info.getWarpRoomNo();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
/* 802380C4 */ static void changeGroup(s16);
|
||||
/* 8023806C */ static void demoMessageGroup();
|
||||
/* 80238098 */ void endFlowGroup();
|
||||
/* 802380F4 */ void getString(u32, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*, char*,
|
||||
/* 802380F4 */ static bool getString(u32, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*, char*,
|
||||
char*, char*, s16*);
|
||||
/* 80238174 */ static u8* getMsgDtPtr();
|
||||
/* 80238188 */ static void setProcessID(unsigned int);
|
||||
@@ -322,6 +322,16 @@ inline void dMsgObject_setTalkActor(fopAc_ac_c* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
inline bool dMsgObject_getString(u32 param_0, J2DTextBox* param_1, J2DTextBox* param_2,
|
||||
JUTFont* param_3, COutFont_c* param_4, char* param_5,
|
||||
char* param_6, char* param_7, s16* param_8) {
|
||||
return dMsgObject_c::getString(
|
||||
param_0, param_1, param_2, param_3,
|
||||
param_4, param_5, param_6, param_7,
|
||||
param_8
|
||||
);
|
||||
}
|
||||
|
||||
inline void dMsgObject_onKillMessageFlag() {
|
||||
dMsgObject_c::onKillMessageFlag();
|
||||
}
|
||||
@@ -508,7 +518,7 @@ public:
|
||||
/* 0x2F2 */ u8 mStageTitleDisplayType;
|
||||
/* 0x2F4 */ s16 mMsgIndex;
|
||||
/* 0x2F6 */ s16 mFlowIndex;
|
||||
/* 0x2F8 */ u16 mSaveSeqMsgIndex;
|
||||
/* 0x2F8 */ s16 mSaveSeqMsgIndex;
|
||||
/* 0x2FA */ u16 mSelWeightFrame;
|
||||
/* 0x2FC */ u16 mBoxAppearBound;
|
||||
/* 0x2FE */ u16 mBoxAppearFrame;
|
||||
|
||||
@@ -19,6 +19,10 @@ public:
|
||||
/* 80249DE4 */ virtual void drawOutFontLocal(J2DTextBox*, f32);
|
||||
/* 80249ED0 */ virtual void drawFontLocal(J2DTextBox*, u8, f32, f32, f32, f32, u32, u8);
|
||||
|
||||
void drawOutFont(J2DTextBox* param_0, f32 param_1) {
|
||||
drawOutFontLocal(param_0, param_1);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x24 */ COutFont_c* mpOutFont;
|
||||
/* 0x28 */ u8 field_0x28;
|
||||
|
||||
@@ -33,6 +33,24 @@ f32 PSVECDistance(const Vec* a, const Vec* b);
|
||||
void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half);
|
||||
void C_VECReflect(const Vec* src, const Vec* normal, Vec* dst);
|
||||
|
||||
inline void C_VECAdd(register const Vec* a, register const Vec* b, register Vec* ab) {
|
||||
register f32 axy;
|
||||
register f32 bxy;
|
||||
register f32 az;
|
||||
register f32 sumz;
|
||||
register f32 bz;
|
||||
asm {
|
||||
psq_l axy, 0(a), 0, 0
|
||||
psq_l bxy, 0(b), 0, 0
|
||||
ps_add axy, axy, bxy
|
||||
psq_st axy, 0(ab), 0, 0
|
||||
psq_l az, 8(a), 1, 0
|
||||
psq_l bz, 8(b), 1, 0
|
||||
ps_add sumz, az, bz
|
||||
psq_st sumz, 8(ab), 1, 0
|
||||
}
|
||||
}
|
||||
|
||||
inline f32 C_VECSquareMag(const Vec* v) {
|
||||
register f32 x_y;
|
||||
register f32 z;
|
||||
|
||||
@@ -3,4 +3,35 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct dMsgScrn3Select_c {
|
||||
/* 802390B4 */ dMsgScrn3Select_c();
|
||||
/* 802398CC */ virtual ~dMsgScrn3Select_c();
|
||||
/* 80239C64 */ bool isSelect();
|
||||
/* 80239C78 */ void setString(char*, char*, char*);
|
||||
/* 80239D08 */ void setRubyString(char*, char*, char*);
|
||||
/* 80239D98 */ void translate(f32, f32);
|
||||
/* 80239DD4 */ void draw(f32, f32);
|
||||
/* 8023A094 */ void selAnimeInit(u8, u8, u8, f32, u8);
|
||||
/* 8023A398 */ void selAnimeMove(u8, u8, bool);
|
||||
/* 8023A680 */ bool selAnimeEnd();
|
||||
/* 8023A934 */ f32 getTextBoxWidth();
|
||||
/* 8023A94C */ f32 getFontSize();
|
||||
/* 8023A95C */ void getRubyFontSize();
|
||||
/* 8023A97C */ f32 getCharSpace();
|
||||
/* 8023A98C */ void getRubyCharSpace();
|
||||
/* 8023A9AC */ void getTextBoxGlobalPosX(int);
|
||||
/* 8023A9D8 */ void getTextBoxGlobalPosY(int);
|
||||
/* 8023AA04 */ void open1Proc();
|
||||
/* 8023AAF4 */ void open2Proc();
|
||||
/* 8023AC14 */ void waitProc();
|
||||
/* 8023AC44 */ void selectProc();
|
||||
/* 8023AE68 */ void changeProc();
|
||||
/* 8023B148 */ void closeProc();
|
||||
/* 8023B228 */ void selectScale();
|
||||
/* 8023B4AC */ void selectTrans();
|
||||
/* 8023B870 */ void selectAnimeTransform(int);
|
||||
|
||||
u8 field_0x0[0x114];
|
||||
};
|
||||
|
||||
#endif /* MSG_SCRN_D_MSG_SCRN_3SELECT_H */
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
/* 0x48 */ dDlst_base_c* field_0x48;
|
||||
/* 0x4C */ u32 field_0x4c;
|
||||
/* 0x50 */ CharInfo_c* mCharInfoPtr;
|
||||
/* 0x54 */ u32 field_0x54;
|
||||
/* 0x54 */ JUTFont* field_0x54;
|
||||
/* 0x58 */ J2DTextBox::TFontSize mFontSize;
|
||||
/* 0x60 */ f32 mRubySize;
|
||||
/* 0x64 */ f32 mTextBoxPosX;
|
||||
|
||||
@@ -27,9 +27,11 @@ public:
|
||||
/* 8023E43C */ void close_init();
|
||||
/* 8023E448 */ void close_proc();
|
||||
/* 8023E558 */ bool openExplain(u32, u8, u8, u8, bool);
|
||||
/* 8023E5CC */ void getAlphaRatio();
|
||||
/* 8023E640 */ void checkTriggerA();
|
||||
/* 8023E654 */ void checkTriggerB();
|
||||
/* 8023E5CC */ f32 getAlphaRatio();
|
||||
/* 8023E640 */ bool checkTriggerA();
|
||||
/* 8023E654 */ bool checkTriggerB();
|
||||
|
||||
typedef void (dMsgScrnExplain_c::*ProcFunc)();
|
||||
|
||||
/* 8023D538 */ virtual ~dMsgScrnExplain_c();
|
||||
|
||||
|
||||
@@ -2,5 +2,29 @@
|
||||
#define MSG_SCRN_D_MSG_SCRN_TREE_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "msg/scrn/d_msg_scrn_base.h"
|
||||
|
||||
struct JUTFont;
|
||||
struct JKRExpHeap;
|
||||
|
||||
struct dMsgScrnTree_c : public dMsgScrnBase_c {
|
||||
/* 80248954 */ dMsgScrnTree_c(JUTFont*, JKRExpHeap*);
|
||||
/* 80248F14 */ virtual ~dMsgScrnTree_c();
|
||||
/* 80249118 */ void exec();
|
||||
/* 80249270 */ void draw();
|
||||
/* 802492F8 */ void fukiAlpha(f32);
|
||||
/* 802493AC */ void fukiScale(f32);
|
||||
/* 802493B0 */ void fukiTrans(f32, f32);
|
||||
|
||||
/* 0xC4 */ CPaneMgr* field_0xc4;
|
||||
/* 0xC8 */ CPaneMgr* field_0xc8;
|
||||
/* 0xCC */ J2DAnmTransform* field_0xcc;
|
||||
/* 0xD0 */ J2DAnmTextureSRTKey* field_0xd0;
|
||||
/* 0xD4 */ J2DAnmTextureSRTKey* field_0xd4;
|
||||
/* 0xD8 */ JKRExpHeap* field_0xd8;
|
||||
/* 0xDC */ f32 field_0xdc;
|
||||
/* 0xDC */ f32 field_0xe0;
|
||||
|
||||
};
|
||||
|
||||
#endif /* MSG_SCRN_D_MSG_SCRN_TREE_H */
|
||||
|
||||
Reference in New Issue
Block a user