daTagCsw_c OK + some twgate funcs (#2174)

This commit is contained in:
hatal175
2024-07-10 04:45:19 +03:00
committed by GitHub
parent 6eca7a83b9
commit 08c14024b9
30 changed files with 808 additions and 2700 deletions
+8
View File
@@ -320,6 +320,14 @@ inline void dMsgObject_setDemoMessage(u32 param_0) {
dMsgObject_getMsgObjectClass()->setDemoMessage(param_0);
}
inline void dMsgObject_offMsgSendControl() {
dMsgObject_getMsgObjectClass()->offMsgSendControl();
}
inline int dMsgObject_isMsgSendControl() {
return dMsgObject_getMsgObjectClass()->isMsgSendControl();
}
inline const char* dMsgObject_getWord() {
return dMsgObject_c::getWord();
}
+16
View File
@@ -32,9 +32,25 @@ public:
/* 80666DE8 */ void execute();
/* 80667438 */ void draw();
bool checkNormalType() const { return mType == 0; }
bool checkNotSmallType() const { return mType == 1; }
bool checkBossType() const { return mType == 4 || mType == 3; }
cXyz& getBallPos() { return mBallPos; }
void onWarpGround(const cXyz& pos) {
field_0xb14 = pos;
field_0xae1 = 3;
}
void warpStart(const cXyz& pos) {
field_0xb14 = pos;
field_0xae1 = 1;
}
void onStateFlg0(int flg) {
mStateFlg0 |= flg;
}
void warpDelete() {
onStateFlg0(1);
field_0xae1 = 1;
}
static u8 const m_bckIdxTable[70 + 2 /* padding */];
@@ -1,5 +1,135 @@
#ifndef D_A_TAG_TWGATE_H
#define D_A_TAG_TWGATE_H
#include "d/msg/d_msg_flow.h"
#include "f_op/f_op_actor_mng.h"
#include "SSystem\SComponent\c_phase.h"
class daTagTWGate_c;
typedef void (daTagTWGate_c::*actionFunc)();
class daTagTWGate_c : public fopAc_ac_c {
public:
enum EType {
/* 0x0 */ TYPE_FILONE,
/* 0x1 */ TYPE_ORDIN,
/* 0x2 */ TYPE_RANAIL,
/* 0x3 */ TYPE_HYRAL,
};
enum EAction {
/* 0x00 */ ACT_WAIT,
/* 0x01 */ ACT_DEMO_FILONE_1,
/* 0x02 */ ACT_DEMO_FILONE_2,
/* 0x03 */ ACT_DEMO_FILONE_3,
/* 0x04 */ ACT_DEMO_ORDIN_1,
/* 0x05 */ ACT_DEMO_ORDIN_2,
/* 0x06 */ ACT_DEMO_ORDIN_3,
/* 0x07 */ ACT_DEMO_RANAIL_1,
/* 0x08 */ ACT_DEMO_RANAIL_2,
/* 0x09 */ ACT_DEMO_RANAIL_3,
/* 0x0A */ ACT_DEMO_HYRAL_1,
/* 0x0B */ ACT_DEMO_HYRAL_2,
/* 0x0C */ ACT_DEMO_HYRAL_3,
};
inline ~daTagTWGate_c();
/* 80D525F8 */ void initWait();
/* 80D52604 */ void executeWait();
/* 80D528F0 */ void initDemoFilone1();
/* 80D5297C */ void executeDemoFilone1();
/* 80D52AF4 */ void initDemoFilone2();
/* 80D52BF0 */ void executeDemoFilone2();
/* 80D52DB4 */ void initDemoFilone3();
/* 80D52E7C */ void executeDemoFilone3();
/* 80D53250 */ void initDemoOrdin1();
/* 80D532DC */ void executeDemoOrdin1();
/* 80D53454 */ void initDemoOrdin2();
/* 80D53550 */ void executeDemoOrdin2();
/* 80D53714 */ void initDemoOrdin3();
/* 80D537DC */ void executeDemoOrdin3();
/* 80D53BD0 */ void initDemoRanail1();
/* 80D53C5C */ void executeDemoRanail1();
/* 80D53DD4 */ void initDemoRanail2();
/* 80D53ED0 */ void executeDemoRanail2();
/* 80D54094 */ void initDemoRanail3();
/* 80D54178 */ void executeDemoRanail3();
/* 80D5456C */ void initDemoHyral1();
/* 80D545F8 */ void executeDemoHyral1();
/* 80D54770 */ void initDemoHyral2();
/* 80D5486C */ void executeDemoHyral2();
/* 80D54A30 */ void initDemoHyral3();
/* 80D54AF8 */ void executeDemoHyral3();
/* 80D54ECC */ void initBaseMtx();
/* 80D54F88 */ int downloadModels();
/* 80D5502C */ void initTalk(int, fopAc_ac_c**);
/* 80D55068 */ bool talkProc(int*, int, fopAc_ac_c**);
/* 80D55160 */ static int createHeapCallBack(fopAc_ac_c*);
/* 80D55180 */ int CreateHeap();
u8 getSwitch() { return fopAcM_GetParam(this) >> 8; }
u8 getType() { return fopAcM_GetParam(this); }
inline int create();
void create_init() {
field_0x5e0 = 0;
mActionID = 0;
mAction = &ActionTable[mActionID][0];
(this->**mAction)();
}
void callExecute() {
(this->*mAction[1])();
mDoAud_seStartLevel(Z2SE_OBJ_DARK_GATE, &current.pos, 0, 0);
}
int execute() {
callExecute();
if (field_0x5e0 != 0) {
mpMorf->play(0, 0);
mpMorf->modelCalc();
}
return 1;
}
int draw() {
if (field_0x5e0 != 0) {
mpMorf->entryDL();
}
return 1;
}
void callInit() {
(this->*(*mAction))();
}
void setAction(EAction action) {
mActionID = action;
mAction = ActionTable[mActionID];
callInit();
}
static u8 const mAttr[1 + 3 /* padding */];
static actionFunc ActionTable[13][2];
private:
/* 0x568 */ mDoExt_McaMorfSO* mpMorf;
/* 0x56C */ request_of_phase_process_class mPhaseZevArc;
/* 0x574 */ request_of_phase_process_class mPhaseMdRes;
/* 0x57C */ request_of_phase_process_class mPhasePyRes;
/* 0x584 */ actionFunc* mAction;
/* 0x588 */ int mActionID;
/* 0x58C */ dMsgFlow_c mMsgFlow;
/* 0x5D8 */ u8 field_0x5d8[4];
/* 0x5DC */ s16 mEventID;
/* 0x5DE */ u8 field_0x5de;
/* 0x5DF */ bool mIsWolf;
/* 0x5E0 */ u8 field_0x5e0;
/* 0x5E1 */ u8 field_0x5e1;
/* 0x5E2 */ u8 mType;
};
#endif /* D_A_TAG_TWGATE_H */
@@ -1,5 +1,56 @@
#ifndef D_A_TAG_CSW_H
#define D_A_TAG_CSW_H
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
#include "d/cc/d_cc_d.h"
class dBgW;
struct daTagCsw_c : public fopAc_ac_c, public request_of_phase_process_class {
/* 80D56BD8 */ ~daTagCsw_c();
/* 80D56D98 */ void setMtx();
/* 80D56EF8 */ int createHeap();
/* 80D57320 */ int chkInsideStatueStart();
/* 80D573C0 */ int create();
/* 80D5789C */ int Delete();
/* 80D57968 */ void onLight();
/* 80D579A8 */ void offLight();
/* 80D579E8 */ int execute();
/* 80D583B8 */ int draw();
int getSw() { return fopAcM_GetParamBit(this, 1, 8); }
int getSw2() { return fopAcM_GetParamBit(this, 9, 8); }
int getType() { return fopAcM_GetParamBit(this, 0, 1); }
int getParam(int param_1, int param_2, int param_3) {
return (1 << param_3) - 1U & param_1 >> (param_2 & 0x3fU);
}
int getArg0() { return getParam(current.angle.x, 0, 8); }
int getItemBit() { return fopAcM_GetParamBit(this, 17, 8); }
/* 0x570 */ int field_0x570;
/* 0x574 */ J3DModel* field_0x574;
/* 0x578 */ J3DModel* field_0x578;
/* 0x57C */ mDoExt_brkAnm* field_0x57c;
/* 0x580 */ mDoExt_brkAnm* field_0x580;
/* 0x584 */ dBgW* field_0x584;
/* 0x588 */ dBgW* field_0x588;
/* 0x58C */ Mtx field_0x58c;
/* 0x5BC */ Mtx field_0x5bc;
/* 0x5EC */ f32 field_0x5ec;
/* 0x5F0 */ dBgW* field_0x5f0;
/* 0x5F4 */ Mtx field_0x5f4;
/* 0x624 */ f32 field_0x624;
/* 0x628 */ f32 field_0x628;
/* 0x62C */ dCcD_Stts field_0x62c;
/* 0x668 */ dCcD_Cyl field_0x668;
/* 0x7A4 */ dCcD_Cyl field_0x7a4;
/* 0x8E0 */ bool mLightOn;
/* 0x8E1 */ bool field_0x8e1;
/* 0x8E2 */ s16 field_0x8e2;
/* 0x8E4 */ int mItemNo;
/* 0x8E8 */ cXyz field_0x8e8;
/* 0x8F4 */ u8 field_0x8f4;
};
#endif /* D_A_TAG_CSW_H */