obj_mirror_6pole / obj_mirror_sand / obj_myogan OK, obj_hbombkoya wip (#1901)

* obj_mirror_6pole / obj_mirror_sand OK. d_bg_w vtables fixed

* obj_myogan OK, obj_hbombkoya mostly done
This commit is contained in:
TakaRikka
2023-08-30 06:33:56 -07:00
committed by GitHub
parent 7606a377e2
commit dd4b291daf
14 changed files with 1052 additions and 1702 deletions
@@ -1,6 +1,45 @@
#ifndef D_A_OBJ_HBOMBKOYA_H
#define D_A_OBJ_HBOMBKOYA_H
#include "dolphin/types.h"
#include "d/bg/d_bg_s_movebg_actor.h"
#include "d/cc/d_cc_d.h"
#include "d/event/d_event_lib.h"
#include "f_op/f_op_actor_mng.h"
class daObjHBombkoya_c : public dBgS_MoveBgActor,
public request_of_phase_process_class,
public dEvLib_callback_c {
public:
struct PSetTbl {
/* 0x00 */ Vec m_position;
/* 0x0C */ int m_startTime; // The time at which this table is able to be used
/* 0x10 */ f32 m_scale;
};
daObjHBombkoya_c() : dEvLib_callback_c(this) {}
/* 80C1B878 */ int create1st();
/* 80C1BB7C */ bool setParticle(u16*, int, PSetTbl*, int, int);
/* 80C1C474 */ virtual ~daObjHBombkoya_c();
/* 80C1B938 */ virtual int CreateHeap();
/* 80C1B9CC */ virtual int Create();
/* 80C1BCA0 */ virtual int Execute(Mtx**);
/* 80C1C098 */ virtual int Draw();
/* 80C1C16C */ virtual int Delete();
int getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
int getSw2No() { return fopAcM_GetParamBit(this, 8, 8); }
/* 0x5A8 */ // dEvLib_callback_c
/* 0x5B8 */ Mtx mBgMtx;
/* 0x5E8 */ Mtx mMtx;
/* 0x618 */ J3DModel* mpModel;
/* 0x61C */ int mTimer;
/* 0x620 */ bool mActive;
/* 0x624 */ u32 mEmitterKeys[9];
/* 0x648 */ dCcD_Stts mStts;
/* 0x684 */ dCcD_Cyl mCyl;
};
#endif /* D_A_OBJ_HBOMBKOYA_H */
@@ -1,6 +1,34 @@
#ifndef D_A_OBJ_MYOGAN_H
#define D_A_OBJ_MYOGAN_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
class dBgW;
class obj_myogan_class : public fopAc_ac_c {
public:
/* 0x568 */ request_of_phase_process_class mPhase;
/* 0x570 */ J3DModel* mpModel;
/* 0x574 */ mDoExt_btkAnm* mpBtk;
/* 0x578 */ mDoExt_brkAnm* mpBrk;
/* 0x57C */ s16 field_0x57c;
/* 0x57E */ s16 mAction;
/* 0x580 */ u8 field_0x580[0x582 - 0x580];
/* 0x582 */ s16 field_0x582[2];
/* 0x586 */ u8 field_0x586[0x58C - 0x586];
/* 0x58C */ Mtx mBgMtx;
/* 0x5BC */ dBgW* mpBgW;
/* 0x5C0 */ u8 mInitialized;
};
class daObj_Myogan_HIO_c {
public:
/* 80C9EBAC */ daObj_Myogan_HIO_c();
/* 80C9F1F0 */ virtual ~daObj_Myogan_HIO_c() {}
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 mSize;
/* 0x0C */ f32 mNormalHeight;
};
#endif /* D_A_OBJ_MYOGAN_H */
@@ -1,6 +1,77 @@
#ifndef D_A_OBJ_MIRROR_6POLE_H
#define D_A_OBJ_MIRROR_6POLE_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
#include "d/com/d_com_inf_game.h"
class daObjMirror6Pole_c;
typedef void (daObjMirror6Pole_c::*actionFunc)();
class daObjMirror6Pole_c : public fopAc_ac_c {
public:
enum Mode_e {
MODE_WAIT_e,
MODE_DEMO_e,
MODE_MAX_e,
};
/* 80C95E18 */ void initWait();
/* 80C95E2C */ void executeWait();
/* 80C95E88 */ void initDemo();
/* 80C95E8C */ void executeDemo();
/* 80C95EFC */ void setBaseMtx();
/* 80C95F50 */ static int createHeapCallBack(fopAc_ac_c* i_this);
/* 80C95F70 */ int CreateHeap();
inline ~daObjMirror6Pole_c();
inline int execute();
inline int create();
inline int draw();
void initBaseMtx() {
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
// setBaseMtx();
// this is supposed to be setBaseMtx, but it gets inlined here for some reason?
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::YrotM(shape_angle.y);
mpModel->i_setBaseTRMtx(mDoMtx_stack_c::get());
}
void create_init() {
initBaseMtx();
mAttentionInfo.mFlags = 0;
setAction(MODE_WAIT_e);
}
u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
bool isSwitch() {
return i_fopAcM_isSwitch(this, getSwitchNo()) ||
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) ||
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]);
}
void setAction(Mode_e i_action) {
mMode = i_action;
mAction = ActionTable[mMode];
callInit();
}
void callInit() { (this->*mAction[0])(); }
void callExecute() { (this->*mAction[1])(); }
static actionFunc ActionTable[][2];
/* 0x568 */ J3DModel* mpModel;
/* 0x56C */ mDoExt_bckAnm* mpBck;
/* 0x570 */ request_of_phase_process_class mPhase;
/* 0x578 */ actionFunc* mAction;
/* 0x57C */ Mode_e mMode;
};
#endif /* D_A_OBJ_MIRROR_6POLE_H */
@@ -1,6 +1,38 @@
#ifndef D_A_OBJ_MIRROR_SAND_H
#define D_A_OBJ_MIRROR_SAND_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
#include "d/com/d_com_inf_game.h"
#include "d/bg/d_bg_w.h"
class daObjMirrorSand_c : public fopAc_ac_c {
public:
/* 80C98508 */ void initBaseMtx();
/* 80C98534 */ void setBaseMtx();
inline ~daObjMirrorSand_c();
inline int createHeap();
inline int create();
inline int execute();
inline int draw();
inline void create_init();
u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
bool isSwitch() {
return i_fopAcM_isSwitch(this, getSwitchNo()) ||
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) ||
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]);
}
/* 0x568 */ J3DModel* mpModel;
/* 0x56C */ mDoExt_bckAnm* mpBck;
/* 0x570 */ request_of_phase_process_class mPhase;
/* 0x578 */ dBgW* mpCurrentBgw;
/* 0x57C */ dBgW mBgw[2];
/* 0x6FC */ Mtx mBgMtx;
};
#endif /* D_A_OBJ_MIRROR_SAND_H */