summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2023-11-24 19:05:04 -0500
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2023-11-24 19:05:04 -0500
commit0c3b96e10f79928cf2a53ead12a076d30249379d (patch)
tree9ae863f636f8ca9cb24070aa5e75246b1dfb8096 /src
parent97eb1fb31fb57ee96669f8a83848cb0327797180 (diff)
Move more actor class defs to headers
Diffstat (limited to 'src')
-rw-r--r--src/d/actor/d_a_andsw0.cpp40
-rw-r--r--src/d/actor/d_a_boss_item.cpp10
-rw-r--r--src/d/actor/d_a_dr.cpp37
-rw-r--r--src/d/actor/d_a_item.cpp2
-rw-r--r--src/d/actor/d_a_mbdoor.cpp70
-rw-r--r--src/d/actor/d_a_nh.cpp2
-rw-r--r--src/d/actor/d_a_obj_adnno.cpp16
-rw-r--r--src/d/actor/d_a_obj_dmgroom.cpp17
-rw-r--r--src/d/actor/d_a_obj_ganonbed.cpp17
-rw-r--r--src/d/actor/d_a_seatag.cpp7
-rw-r--r--src/d/actor/d_a_swc00.cpp3
-rw-r--r--src/d/actor/d_a_swtdoor.cpp9
12 files changed, 30 insertions, 200 deletions
diff --git a/src/d/actor/d_a_andsw0.cpp b/src/d/actor/d_a_andsw0.cpp
index 8cba1bf8..93798ae5 100644
--- a/src/d/actor/d_a_andsw0.cpp
+++ b/src/d/actor/d_a_andsw0.cpp
@@ -3,10 +3,13 @@
// Translation Unit: d_a_andsw0.cpp
//
+#include "d/actor/d_a_andsw0.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_com_inf_game.h"
#include "d/d_procname.h"
+#include "d/actor/d_a_bk.h"
+#include "d/actor/d_a_bb.h"
enum {
ACT_ON_ALL = 0,
@@ -17,29 +20,6 @@ enum {
ACT_TIMER_SET = 30,
};
-struct andsw0_class : public fopAc_ac_c {
-public:
- /* 0x290 */ u32 _pad[2];
- /* 0x298 */ s8 mAction;
- /* 0x299 */ u8 mNumSwitchesToCheck;
- /* 0x29A */ u8 mBehaviorType;
- /* 0x29B */ u8 mSwitchToSet;
- /* 0x29C */ u8 mFirstSwitchToCheck;
- /* 0x29E */ u16 mTimer;
- /* 0x2A0 */ s16 mEventIdx;
- /* 0x2A2 */ u8 mEventNo;
- /* 0x2A3 */ s8 mEventState;
-};
-
-// Bokoblin. TODO: Include d_a_bk.h once implemented.
-struct bk_class : public fopAc_ac_c {
- u8 temp[0x121C - 0x290];
- u8 field_0x121C;
-};
-
-// Kargaroc. TODO: Include d_a_bb.h once implemented.
-struct bb_class : public fopAc_ac_c {};
-
static s32 daAndsw0_Draw(andsw0_class*) {
return 1;
}
@@ -254,28 +234,28 @@ static void hajimarinomori_check(andsw0_class* i_this) {
fopAcM_delete(kargaroc);
bk_class* bokoblin = (bk_class*)ac[3];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
bokoblin = (bk_class*)ac[4];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
if (dComIfGs_isEventBit(0x301)) {
bokoblin = (bk_class*)ac[0];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
}
if (dComIfGs_isEventBit(0x480)) {
bokoblin = (bk_class*)ac[1];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
}
if (dComIfGs_isEventBit(0x301) && dComIfGs_isEventBit(0x480)) {
bokoblin = (bk_class*)ac[2];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
}
}
else {
bk_class* bokoblin = (bk_class*)ac[0];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
bokoblin = (bk_class*)ac[1];
- bokoblin->field_0x121C = 1;
+ bokoblin->m121C = 1;
}
fopAcM_delete(actor);
diff --git a/src/d/actor/d_a_boss_item.cpp b/src/d/actor/d_a_boss_item.cpp
index 61461aec..774e2d36 100644
--- a/src/d/actor/d_a_boss_item.cpp
+++ b/src/d/actor/d_a_boss_item.cpp
@@ -3,19 +3,13 @@
// Translation Unit: d_a_boss_item.cpp
//
+#include "d/actor/d_a_boss_item.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_procname.h"
#include "dolphin/types.h"
-
-extern BOOL dComIfGs_isStageBossEnemy(int i_stageNo);
-extern BOOL dComIfGs_isStageLife(int i_stageNo);
-
-class bossitem_class : public fopAc_ac_c {
- s32 m0000;
- s32 m0004;
-};
+#include "d/d_com_inf_game.h"
/* 00000078-00000080 .text daBossItem_IsDelete__FP14bossitem_class */
static BOOL daBossItem_IsDelete(bossitem_class* i_this) {
diff --git a/src/d/actor/d_a_dr.cpp b/src/d/actor/d_a_dr.cpp
index a813c2b0..6adfe895 100644
--- a/src/d/actor/d_a_dr.cpp
+++ b/src/d/actor/d_a_dr.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_dr.cpp
//
+#include "d/actor/d_a_dr.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "d/d_procname.h"
@@ -12,44 +13,8 @@
#include "d/d_snap.h"
#include "d/d_com_inf_game.h"
-class dr_class;
-
-class daDr_HIO_c : public JORReflexible {
-public:
- daDr_HIO_c();
- virtual ~daDr_HIO_c() {}
-public:
- /* 0x04 */ s8 mChildID;
- /* 0x05 */ u8 m05[0x08 - 0x05];
- /* 0x08 */ f32 mScale;
- /* 0x0C */ bool m0C;
- /* 0x0D */ u8 m0D[0x0E - 0x0D];
- /* 0x0E */ s16 m0E;
- /* 0x10 */ f32 mWait1Morf;
- /* 0x14 */ f32 mAkubi1Morf;
- /* 0x18 */ f32 mBiku1Morf;
- /* 0x1C */ f32 mAbare1Morf;
- /* 0x20 */ f32 mAbare2Morf;
- /* 0x24 */ f32 mHo1Morf;
-};
-
static daDr_HIO_c l_HIO;
-class dr_class : public fopAc_ac_c {
-public:
- /* 0x290 */ u8 m290[0x2AC - 0x290];
- /* 0x2AC */ request_of_phase_process_class mPhs;
- /* 0x2B4 */ mDoExt_McaMorf* mpMorf;
- /* 0x2B8 */ u8 mState;
- /* 0x2B9 */ u8 m2B9[0x2BA - 0x2B9];
- /* 0x2BA */ s16 mCountDownTimers[3];
- /* 0x2C0 */ int mCurrBckIdx;
- /* 0x2C4 */ JPABaseEmitter* mpBreathEmitter;
- /* 0x2C8 */ s8 m2C8;
- /* 0x2C9 */ s8 m2C9;
- /* 0x2CA */ u8 field_2CA[0x2CC - 0x2CA];
-};
-
enum DR_RES_FILE_ID { // IDs and indexes are synced
/* BAS */
DR_BAS_ABARE1=0x5,
diff --git a/src/d/actor/d_a_item.cpp b/src/d/actor/d_a_item.cpp
index 442ee946..1c7f5c50 100644
--- a/src/d/actor/d_a_item.cpp
+++ b/src/d/actor/d_a_item.cpp
@@ -308,7 +308,7 @@ BOOL daItem_c::_daItem_execute() {
/* 800F5834-800F59CC .text mode_proc_call__8daItem_cFv */
void daItem_c::mode_proc_call() {
- static daItem_c_ModeFunc mode_proc[] = {
+ static ModeFunc mode_proc[] = {
&mode_wait,
&mode_wait,
&mode_water,
diff --git a/src/d/actor/d_a_mbdoor.cpp b/src/d/actor/d_a_mbdoor.cpp
index 1f251eeb..93666789 100644
--- a/src/d/actor/d_a_mbdoor.cpp
+++ b/src/d/actor/d_a_mbdoor.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_mbdoor.cpp
//
+#include "d/actor/d_a_mbdoor.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "d/d_procname.h"
@@ -11,59 +12,6 @@
#include "m_Do/m_Do_mtx.h"
#include "d/actor/d_a_player.h"
-class daMbdoor_c : public fopAc_ac_c {
-public:
- inline BOOL draw();
- inline BOOL execute();
- s32 create();
-
- u8 getSwbit();
- u8 getType();
- u8 getShapeType();
- const char* getArcName();
- u32 getFuBdl();
- u32 getLBdl();
- u32 getRBdl();
- u32 getToBdl();
- u32 getDzb();
- f32 getLOffset();
- f32 getROffset();
- f32 getToOffset();
- BOOL CreateHeap();
- void calcMtx();
- BOOL CreateInit();
- s32 getDemoAction();
- void demoProc();
- BOOL checkArea();
- BOOL checkUnlock();
-
-public:
- /* 0x290 */ request_of_phase_process_class mPhs;
- /* 0x298 */ J3DModel* mpFuModel;
- /* 0x29C */ J3DModel* mpLModel;
- /* 0x2A0 */ J3DModel* mpRModel;
- /* 0x2A4 */ J3DModel* mpToModel;
- /* 0x2A8 */ dBgW* mpBgW;
- /* 0x2AC */ bool field_0x2ac;
- /* 0x2AD */ u8 field_0x2ad;
- /* 0x2AE */ u8 mCurActionIdx;
- /* 0x2AF */ u8 field_0x2AF[0x2B0 - 0x2AF];
- /* 0x2B0 */ s16 field_0x2b0;
- /* 0x2B2 */ s16 field_0x2b2;
- /* 0x2B4 */ s16 field_0x2b4;
- /* 0x2B6 */ u8 field_0x2b6;
- /* 0x2B7 */ u8 field_0x2B7[0x2B8 - 0x2B7];
- /* 0x2B8 */ s16 field_0x2b8;
- /* 0x2BA */ u8 field_0x2BA[0x2BC - 0x2BA];
- /* 0x2BC */ s32 field_0x2bc;
- /* 0x2C0 */ s32 mEvtStaffId;
- /* 0x2C4 */ cXyz field_0x2c4;
- /* 0x2D0 */ cXyz field_0x2d0;
- /* 0x2DC */ cXyz field_0x2dc;
-};
-
-typedef BOOL (daMbdoor_c_ActionFunc)(daMbdoor_c*);
-
/* 00000078-00000084 .text getSwbit__10daMbdoor_cFv */
u8 daMbdoor_c::getSwbit() {
return fopAcM_GetParam(this) & 0xFF;
@@ -266,16 +214,16 @@ BOOL daMbdoor_c::CreateInit() {
mTevStr.mRoomNo = current.roomNo;
if (type == 2) {
- mCurActionIdx = 1;
+ setAction(1);
field_0x2b0 = 0;
field_0x2b2 = 0;
} else if ((type == 0 && (swbit != 0xFF && !dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(this)))) ||
(type == 1 && (swbit == 0xFF || dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(this))))) {
- mCurActionIdx = 1;
+ setAction(1);
field_0x2b0 = 0;
field_0x2b2 = 0;
} else {
- mCurActionIdx = 4;
+ setAction(4);
field_0x2b0 = -0x3F65;
field_0x2b2 = 0;
}
@@ -490,7 +438,7 @@ BOOL daMbdoor_actionWait(daMbdoor_c* i_this) {
/* 000011BC-0000121C .text daMbdoor_actionLockWait__FP10daMbdoor_c */
BOOL daMbdoor_actionLockWait(daMbdoor_c* i_this) {
if (i_this->checkUnlock()) {
- i_this->mCurActionIdx = 2;
+ i_this->setAction(2);
fopAcM_orderOtherEvent2(i_this, "MBDOOR_STOP_OPEN", 1, -1);
}
return TRUE;
@@ -501,7 +449,7 @@ BOOL daMbdoor_actionLockOff(daMbdoor_c* i_this) {
if (i_this->mEvtInfo.checkCommandDemoAccrpt()) {
i_this->mEvtStaffId = dComIfGp_evmng_getMyStaffId("MBDOOR", NULL, 0);
i_this->demoProc();
- i_this->mCurActionIdx = 3;
+ i_this->setAction(3);
} else {
fopAcM_orderOtherEvent2(i_this, "MBDOOR_STOP_OPEN", 1, -1);
}
@@ -512,7 +460,7 @@ BOOL daMbdoor_actionLockOff(daMbdoor_c* i_this) {
BOOL daMbdoor_actionLockDemo(daMbdoor_c* i_this) {
if (dComIfGp_evmng_endCheck("MBDOOR_STOP_OPEN")) {
dComIfGp_event_reset();
- i_this->mCurActionIdx = 4;
+ i_this->setAction(4);
} else {
i_this->demoProc();
}
@@ -524,7 +472,7 @@ BOOL daMbdoor_actionCloseWait(daMbdoor_c* i_this) {
if (i_this->mEvtInfo.checkCommandDoor()) {
i_this->mEvtStaffId = dComIfGp_evmng_getMyStaffId("MBDOOR", NULL, 0);
i_this->demoProc();
- i_this->mCurActionIdx = 5;
+ i_this->setAction(5);
dComIfG_Bgsp()->Release(i_this->mpBgW);
i_this->field_0x2ac = false;
} else {
@@ -566,7 +514,7 @@ BOOL daMbdoor_Draw(daMbdoor_c* i_this) {
}
BOOL daMbdoor_c::execute() {
- static daMbdoor_c_ActionFunc* l_action[] = {
+ static ActionFunc* l_action[] = {
&daMbdoor_actionWait,
&daMbdoor_actionLockWait,
&daMbdoor_actionLockOff,
diff --git a/src/d/actor/d_a_nh.cpp b/src/d/actor/d_a_nh.cpp
index db3df1c0..addeed50 100644
--- a/src/d/actor/d_a_nh.cpp
+++ b/src/d/actor/d_a_nh.cpp
@@ -179,7 +179,7 @@ void daNh_c::action(void* arg) {
}
/* 800F9DF4-800F9EB8 .text setAction__6daNh_cFM6daNh_cFPCvPvPv_iPv */
-BOOL daNh_c::setAction(daNh_c_ActionFunc actionFunc, void* arg) {
+BOOL daNh_c::setAction(ActionFunc actionFunc, void* arg) {
if (mCurrActionFunc != actionFunc) {
if (mCurrActionFunc != NULL) {
mActionStatus = ACTION_ENDING;
diff --git a/src/d/actor/d_a_obj_adnno.cpp b/src/d/actor/d_a_obj_adnno.cpp
index a0c3735e..87c8e974 100644
--- a/src/d/actor/d_a_obj_adnno.cpp
+++ b/src/d/actor/d_a_obj_adnno.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_obj_adnno.cpp
//
+#include "d/actor/d_a_obj_adnno.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
@@ -12,21 +13,6 @@
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_mtx.h"
-class daObjAdnno_c : public fopAc_ac_c {
-public:
- inline s32 _create();
- inline bool _execute();
- inline bool _draw();
- inline bool _delete();
- BOOL CreateHeap();
- void CreateInit();
- void set_mtx();
-
-public:
- /* 0x290 */ request_of_phase_process_class mPhs;
- /* 0x298 */ J3DModel * mpModel[16];
-};
-
static const u32 daObjAdnno_bmt_table[16] = {
0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
};
diff --git a/src/d/actor/d_a_obj_dmgroom.cpp b/src/d/actor/d_a_obj_dmgroom.cpp
index 203ed1bb..1689e796 100644
--- a/src/d/actor/d_a_obj_dmgroom.cpp
+++ b/src/d/actor/d_a_obj_dmgroom.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_obj_dmgroom.cpp
//
+#include "d/actor/d_a_obj_dmgroom.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
@@ -12,22 +13,6 @@
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_mtx.h"
-class daObjDmgroom_c : public fopAc_ac_c {
-public:
- inline s32 _create();
- inline bool _execute();
- inline bool _draw();
- inline bool _delete();
- BOOL CreateHeap();
- void CreateInit();
- void set_mtx();
-
-public:
- /* 0x290 */ request_of_phase_process_class mPhs;
- /* 0x298 */ J3DModel * mpModel;
- /* 0x29C */ mDoExt_brkAnm mBrkAnm;
-};
-
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
return ((daObjDmgroom_c*)i_this)->CreateHeap();
diff --git a/src/d/actor/d_a_obj_ganonbed.cpp b/src/d/actor/d_a_obj_ganonbed.cpp
index ec9f3918..ae40b7e6 100644
--- a/src/d/actor/d_a_obj_ganonbed.cpp
+++ b/src/d/actor/d_a_obj_ganonbed.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_obj_ganonbed.cpp
//
+#include "d/actor/d_a_obj_ganonbed.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
@@ -12,22 +13,6 @@
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_mtx.h"
-class daObjGbed_c : public fopAc_ac_c {
-public:
- void init_mtx();
- s32 _create();
- bool _execute();
- bool _draw();
- bool _delete();
- bool create_heap();
- static BOOL solidHeapCB(fopAc_ac_c *i_this);
-
-public:
- /* 0x290 */ request_of_phase_process_class mPhs;
- /* 0x298 */ J3DModel * mpModel;
- /* 0x29C */ dBgW * mpBgW;
-};
-
namespace {
static const char l_arcname[] = "Gbed";
};
diff --git a/src/d/actor/d_a_seatag.cpp b/src/d/actor/d_a_seatag.cpp
index c1def79c..ef8b85d3 100644
--- a/src/d/actor/d_a_seatag.cpp
+++ b/src/d/actor/d_a_seatag.cpp
@@ -1,16 +1,11 @@
/*
* d_a_seatag.cpp
*/
+#include "d/actor/d_a_seatag.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_procname.h"
-struct daSeatag_c : public fopAc_ac_c {
-public:
- /* 0x00 */ int field_0x00;
- /* 0x04 */ int field_0x04;
-}; // size 0x298
-
static BOOL daSeatag_Draw(daSeatag_c*) {
return true;
}
diff --git a/src/d/actor/d_a_swc00.cpp b/src/d/actor/d_a_swc00.cpp
index 5bc8dd58..f9ebdd8b 100644
--- a/src/d/actor/d_a_swc00.cpp
+++ b/src/d/actor/d_a_swc00.cpp
@@ -3,13 +3,12 @@
// Translation Unit: d_a_swc00.cpp
//
+#include "d/actor/d_a_swc00.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "d/d_procname.h"
#include "d/d_com_inf_game.h"
-struct swc00_class : public fopAc_ac_c {};
-
static inline s32 getSwBit(u32 param) {
return param & 0xFF;
}
diff --git a/src/d/actor/d_a_swtdoor.cpp b/src/d/actor/d_a_swtdoor.cpp
index 73ee30af..3ac202f0 100644
--- a/src/d/actor/d_a_swtdoor.cpp
+++ b/src/d/actor/d_a_swtdoor.cpp
@@ -3,6 +3,7 @@
// Translation Unit: d_a_swtdoor.cpp
//
+#include "d/actor/d_a_swtdoor.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_com_inf_game.h"
#include "d/d_procname.h"
@@ -13,14 +14,6 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
-class swtdoor_class : public fopAc_ac_c {
-public:
- /* 0x290 */ request_of_phase_process_class mPhs;
- /* 0x298 */ J3DModel * model;
- /* 0x29C */ u8 field_0x29c;
- /* 0x29D */ u8 mSwitchNo;
-};
-
/* 00000078-000000C4 .text daSwtdoor_Draw__FP13swtdoor_class */
BOOL daSwtdoor_Draw(swtdoor_class* i_this) {
J3DModel * model = i_this->model;