mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 20:24:47 -04:00
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:
@@ -272,7 +272,7 @@ public:
|
||||
/* 8007DC70 */ bool SphChkRp(dBgS_SphChk*, void*, int);
|
||||
/* 8007DDE0 */ bool SphChkGrpRp(dBgS_SphChk*, void*, int, int);
|
||||
|
||||
/* 8007E548 */ virtual ~dBgW();
|
||||
/* 8007E548 */ virtual ~dBgW() {}
|
||||
/* 8007E4B4 */ virtual u32 ChkMoveFlag() const;
|
||||
/* 8007E4A4 */ virtual void OffMoveFlag();
|
||||
/* 8007DAF8 */ virtual void CaptPoly(dBgS_CaptPoly&);
|
||||
|
||||
@@ -1720,6 +1720,10 @@ inline u8 dComIfGs_getFishSize(u8 param_0) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().getMaxSize(param_0);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isStageMiddleBoss() {
|
||||
return g_dComIfG_gameInfo.info.getMemory().getBit().isStageBossEnemy2();
|
||||
}
|
||||
|
||||
void dComIfGp_setSelectItem(int index);
|
||||
s32 dComIfGp_offHeapLockFlag(int flag);
|
||||
void dComIfGp_createSubExpHeap2D();
|
||||
|
||||
@@ -21,7 +21,8 @@ struct action_class {
|
||||
fptr& getExecute() { return execute; }
|
||||
};
|
||||
|
||||
struct dEvLib_callback_c {
|
||||
class dEvLib_callback_c {
|
||||
public:
|
||||
dEvLib_callback_c(fopAc_ac_c* param_0) {
|
||||
mActor = param_0;
|
||||
mAction = NULL;
|
||||
|
||||
@@ -835,6 +835,7 @@ public:
|
||||
onDungeonItem(OOCCOO_NOTE);
|
||||
}
|
||||
s32 isStageBossEnemy() const { return isDungeonItem(STAGE_BOSS_ENEMY); }
|
||||
s32 isStageBossEnemy2() const { return isDungeonItem(STAGE_BOSS_ENEMY_2); }
|
||||
s32 isDungeonItemWarp() const { return isDungeonItem(OOCCOO_NOTE); }
|
||||
void onStageLife() { onDungeonItem(STAGE_LIFE); }
|
||||
|
||||
|
||||
@@ -149,7 +149,11 @@ public:
|
||||
/* 8000D9E8 */ void entryJoint(J3DModelData* i_modelData, u16 i_jntNo, f32 i_frame);
|
||||
|
||||
void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
|
||||
|
||||
void remove(J3DModelData* i_modelData) { i_modelData->getJointNodePointer(0)->setMtxCalc(NULL); }
|
||||
|
||||
J3DAnmTransform* getBckAnm() { return mAnm; }
|
||||
|
||||
void removeJoint(J3DModelData* i_modelData, u16 i_idx) {
|
||||
J3DJoint* mpJnt = i_modelData->getJointNodePointer(i_idx);
|
||||
mpJnt->setMtxCalc(0);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user