summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2024-10-16 00:09:38 +0300
committerGitHub <noreply@github.com>2024-10-15 14:09:38 -0700
commit030d6533f0ac320e2dc61a02783134490ff57f43 (patch)
treeaae331406b0200c7e1a20936b8aa950165928238 /include
parentae77e60de80f778bab53350697f64c8a2bf80dec (diff)
daObjLadder OK (#2211)
* daObjLadder OK * daObjFPillar_c OK * Remove commented out code
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_obj_firepillar.h42
-rw-r--r--include/d/actor/d_a_obj_ladder.h91
-rw-r--r--include/d/d_bg_s.h1
3 files changed, 101 insertions, 33 deletions
diff --git a/include/d/actor/d_a_obj_firepillar.h b/include/d/actor/d_a_obj_firepillar.h
index 7f6720c59b..2440ab0551 100644
--- a/include/d/actor/d_a_obj_firepillar.h
+++ b/include/d/actor/d_a_obj_firepillar.h
@@ -1,7 +1,10 @@
#ifndef D_A_OBJ_FIREPILLAR_H
#define D_A_OBJ_FIREPILLAR_H
+#include "d/d_bg_s_acch.h"
+#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
+#include "d/d_cc_d.h"
/**
* @ingroup actors-objects
@@ -13,11 +16,27 @@
*/
class daObjFPillar_c : public fopAc_ac_c {
public:
+ typedef void (daObjFPillar_c::*actionFunc)();
+
+ enum Action {
+ ACTION_OFF,
+ ACTION_ON_WAIT,
+ ACTION_ON,
+ };
+
+ class daObjFPillar_prm {
+ public:
+ static u8 getArg0(daObjFPillar_c* i_this) { return fopAcM_GetParam(i_this) >> 8; }
+ static u8 getArg1(daObjFPillar_c* i_this) { return fopAcM_GetParam(i_this) >> 24; }
+ static u8 getArg2(daObjFPillar_c* i_this) { return fopAcM_GetParam(i_this) >> 16; }
+ static u8 getSwNo(daObjFPillar_c* i_this) { return fopAcM_GetParam(i_this); }
+ };
+
/* 80BE9118 */ void initBaseMtx();
/* 80BE9138 */ void setBaseMtx();
- /* 80BE9190 */ void Create();
- /* 80BE9230 */ void create();
- /* 80BE94E4 */ void execute();
+ /* 80BE9190 */ int Create();
+ /* 80BE9230 */ int create();
+ /* 80BE94E4 */ int execute();
/* 80BE9610 */ void action();
/* 80BE96B4 */ void actionOffInit();
/* 80BE96E0 */ void actionOff();
@@ -25,11 +44,22 @@ public:
/* 80BE97B8 */ void actionOnWait();
/* 80BE986C */ void actionOnInit();
/* 80BE98A0 */ void actionOn();
- /* 80BE9984 */ void draw();
- /* 80BE99B8 */ bool _delete();
+ /* 80BE9984 */ int draw();
+ /* 80BE99B8 */ int _delete();
private:
- /* 0x568 */ u8 field_0x568[0x974 - 0x568];
+ /* 0x568 */ request_of_phase_process_class mPhase;
+ /* 0x570 */ int field_0x570;
+ /* 0x574 */ dBgS_ObjAcch mAcch;
+ /* 0x74C */ dBgS_AcchCir mAcchCir;
+ /* 0x78C */ dCcD_Stts mStts;
+ /* 0x7C8 */ dCcD_Cps mCps;
+ /* 0x90C */ u8 field_0x90c[0x93c - 0x90c];
+ /* 0x93C */ cXyz mCylScale;
+ /* 0x948 */ Vec field_0x948;
+ /* 0x954 */ cM3dGCpsS field_0x954;
+ /* 0x970 */ u8 mAction;
+ /* 0x972 */ u16 mActionTimer;
};
STATIC_ASSERT(sizeof(daObjFPillar_c) == 0x974);
diff --git a/include/d/actor/d_a_obj_ladder.h b/include/d/actor/d_a_obj_ladder.h
index 444a83f671..e1a6432844 100644
--- a/include/d/actor/d_a_obj_ladder.h
+++ b/include/d/actor/d_a_obj_ladder.h
@@ -1,7 +1,8 @@
#ifndef D_A_OBJ_LADDER_H
#define D_A_OBJ_LADDER_H
-#include "f_op/f_op_actor_mng.h"
+#include "d/d_bg_s_movebg_actor.h"
+#include "d/d_a_obj.h"
/**
* @ingroup actors-objects
@@ -11,17 +12,40 @@
* @details
*
*/
-class daObjLadder : public fopAc_ac_c {
-public:
- class Act_c {
+namespace daObjLadder {
+ class Act_c : public dBgS_MoveBgActor {
public:
- struct Prm_e {};
+ enum Prm_e {
+ PRM_0 = 0,
+ PRM_3 = 3,
+ PRM_8 = 8,
+ PRM_16 = 16,
+ };
- /* 8058D158 */ void CreateHeap();
- /* 8058D1D8 */ void Create();
- /* 8058D378 */ void Mthd_Create();
- /* 8058D4F0 */ bool Delete();
- /* 8058D4F8 */ void Mthd_Delete();
+ enum Type_e {
+ TYPE_0,
+ TYPE_1,
+ TYPE_2,
+ TYPE_3,
+ TYPE_4,
+ TYPE_5,
+ };
+
+ enum Mode {
+ MODE_WAIT,
+ MODE_DEMOREQ,
+ MODE_VIB,
+ MODE_DROP,
+ MODE_FELL,
+ };
+
+ typedef void (Act_c::*modeProc)();
+
+ /* 8058D158 */ int CreateHeap();
+ /* 8058D1D8 */ int Create();
+ /* 8058D378 */ int Mthd_Create();
+ /* 8058D4F0 */ int Delete();
+ /* 8058D4F8 */ int Mthd_Delete();
/* 8058D544 */ void demo_end_reset();
/* 8058D5AC */ void mode_wait_init();
/* 8058D5B8 */ void mode_wait();
@@ -35,28 +59,41 @@ public:
/* 8058D9CC */ void mode_fell();
/* 8058D9D0 */ void set_mtx();
/* 8058DA64 */ void init_mtx();
- /* 8058DAA0 */ void Execute(f32 (**)[3][4]);
- /* 8058DBB8 */ void Draw();
+ /* 8058DAA0 */ int Execute(f32 (**)[3][4]);
+ /* 8058DBB8 */ int Draw();
- static u8 const M_arcname[5 + 3 /* padding */];
- static u8 M_tmp_mtx[48];
- };
+ u8 prm_get_evId() {
+ return daObj::PrmAbstract(this, PRM_8, PRM_16);
+ }
-private:
- /* 0x568 */ u8 field_0x568[0x620 - 0x568];
-};
+ int prm_get_swSave() {
+ return daObj::PrmAbstract(this,PRM_8, PRM_8);
+ }
-STATIC_ASSERT(sizeof(daObjLadder) == 0x620);
+ Type_e prm_get_type() {
+ return(Type_e)daObj::PrmAbstract(this,PRM_3, PRM_0);
+ }
-struct daObj {
-public:
- /* 800373C0 */ void posMoveF_stream(fopAc_ac_c*, cXyz const*, cXyz const*, f32, f32);
- template <typename A1>
- void PrmAbstract(/* ... */);
- /* 8058DD14 */ /* daObj::PrmAbstract<daObjLadder::Act_c::Prm_e> */
- void func_8058DD14(void* _this, fopAc_ac_c const*, daObjLadder::Act_c::Prm_e,
- daObjLadder::Act_c::Prm_e);
+ static char const M_arcname[5];
+ static Mtx M_tmp_mtx;
+private:
+ /* 0x5A0 */ request_of_phase_process_class mPhase;
+ /* 0x5A8 */ J3DModel* mModel;
+ /* 0x5AC */ Type_e mType;
+ /* 0x5B0 */ Mode mMode;
+ /* 0x5B4 */ s16 mVibrationTimer;
+ /* 0x5B6 */ s16 field_0x5b6;
+ /* 0x5B8 */ f32 mHeight;
+ /* 0x5BC */ dBgS_ObjGndChk mGndChk;
+ /* 0x610 */ s16 field_0x610;
+ /* 0x612 */ s16 field_0x612;
+ /* 0x614 */ f32 field_0x614;
+ /* 0x618 */ f32 field_0x618;
+ /* 0x61C */ s16 mEventIdx;
+ /* 0x61E */ bool mInDemo;
+ };
};
+STATIC_ASSERT(sizeof(daObjLadder::Act_c) == 0x620);
#endif /* D_A_OBJ_LADDER_H */
diff --git a/include/d/d_bg_s.h b/include/d/d_bg_s.h
index b8207d72d5..56a03a579b 100644
--- a/include/d/d_bg_s.h
+++ b/include/d/d_bg_s.h
@@ -109,6 +109,7 @@ public:
bool WaterChk(dBgS_SplGrpChk* chk) { return SplGrpChk(chk); }
u32 GetMtrlSndId(const cBgS_PolyInfo& param_0) { return dKy_pol_sound_get(&param_0); }
+ void DebugDrawPoly(dBgW_Base *param_1) {}
}; // Size: 0x1404
bool dBgS_CheckBGroundPoly(cBgS_PolyInfo const&);