Skip to content

Commit

Permalink
daObjLadder OK (#2211)
Browse files Browse the repository at this point in the history
* daObjLadder OK

* daObjFPillar_c OK

* Remove commented out code
  • Loading branch information
hatal175 authored Oct 15, 2024
1 parent ae77e60 commit 030d653
Show file tree
Hide file tree
Showing 8 changed files with 527 additions and 654 deletions.
18 changes: 9 additions & 9 deletions config/GZ2E01/rels/d_a_obj_firepillar/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ actionOn__14daObjFPillar_cFv = .text:0x00000800; // type:function size:0xE0 scop
drawCylinder__FP4cXyzP4cXyzP5csXyz = .text:0x000008E0; // type:function size:0x4 scope:global
draw__14daObjFPillar_cFv = .text:0x000008E4; // type:function size:0x34 scope:global
_delete__14daObjFPillar_cFv = .text:0x00000918; // type:function size:0x8 scope:global
daObjFPillar_Draw__FP14daObjFPillar_c = .text:0x00000920; // type:function size:0x20 scope:global
daObjFPillar_Execute__FP14daObjFPillar_c = .text:0x00000940; // type:function size:0x20 scope:global
daObjFPillar_Delete__FP14daObjFPillar_c = .text:0x00000960; // type:function size:0x20 scope:global
daObjFPillar_Create__FP10fopAc_ac_c = .text:0x00000980; // type:function size:0x20 scope:global
daObjFPillar_Draw__FP14daObjFPillar_c = .text:0x00000920; // type:function size:0x20 scope:local
daObjFPillar_Execute__FP14daObjFPillar_c = .text:0x00000940; // type:function size:0x20 scope:local
daObjFPillar_Delete__FP14daObjFPillar_c = .text:0x00000960; // type:function size:0x20 scope:local
daObjFPillar_Create__FP10fopAc_ac_c = .text:0x00000980; // type:function size:0x20 scope:local
__dt__10cCcD_GSttsFv = .text:0x000009A0; // type:function size:0x48 scope:global
@36@__dt__12dBgS_ObjAcchFv = .text:0x000009E8; // type:function size:0x8 scope:local
@20@__dt__12dBgS_ObjAcchFv = .text:0x000009F0; // type:function size:0x8 scope:local
Expand All @@ -38,19 +38,19 @@ _dtors = .dtors:0x00000000; // type:label scope:global
@3853 = .rodata:0x00000014; // type:object size:0x4 scope:local data:float
@3895 = .rodata:0x00000018; // type:object size:0x4 scope:local
...data.0 = .data:0x00000000; // type:label scope:local
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
l_cull_box = .data:0x00000020; // type:object size:0x18 scope:global data:float
l_cps_src = .data:0x00000038; // type:object size:0x4C scope:global
l_cull_box = .data:0x00000020; // type:object size:0x18 scope:local data:float
l_cps_src = .data:0x00000038; // type:object size:0x4C scope:local
@3789 = .data:0x00000084; // type:object size:0xC scope:local
@3790 = .data:0x00000090; // type:object size:0xC scope:local
@3791 = .data:0x0000009C; // type:object size:0xC scope:local
l_func$3788 = .data:0x000000A8; // type:object size:0x24 scope:local
l_daObjFPillar_Method = .data:0x000000CC; // type:object size:0x20 scope:global
l_daObjFPillar_Method = .data:0x000000CC; // type:object size:0x20 scope:local
g_profile_Obj_FirePillar = .data:0x000000EC; // type:object size:0x30 scope:global
__vt__12dBgS_AcchCir = .data:0x0000011C; // type:object size:0xC scope:global
__vt__10cCcD_GStts = .data:0x00000128; // type:object size:0xC scope:global
__vt__10dCcD_GStts = .data:0x00000134; // type:object size:0xC scope:global
__vt__8cM3dGAab = .data:0x00000140; // type:object size:0xC scope:global
__vt__12dBgS_ObjAcch = .data:0x0000014C; // type:object size:0x24 scope:global
lbl_447_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
lbl_447_bss_0 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte
20 changes: 10 additions & 10 deletions config/GZ2E01/rels/d_a_obj_ladder/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ set_mtx__Q211daObjLadder5Act_cFv = .text:0x000008F0; // type:function size:0x94
init_mtx__Q211daObjLadder5Act_cFv = .text:0x00000984; // type:function size:0x3C scope:global
Execute__Q211daObjLadder5Act_cFPPA3_A4_f = .text:0x000009C0; // type:function size:0x118 scope:global
Draw__Q211daObjLadder5Act_cFv = .text:0x00000AD8; // type:function size:0xA4 scope:global
Mthd_Create__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000B7C; // type:function size:0x20 scope:global
Mthd_Delete__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000B9C; // type:function size:0x20 scope:global
Mthd_Execute__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000BBC; // type:function size:0x20 scope:global
Mthd_Draw__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000BDC; // type:function size:0x2C scope:global
Mthd_IsDelete__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000C08; // type:function size:0x2C scope:global
Mthd_Create__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000B7C; // type:function size:0x20 scope:local
Mthd_Delete__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000B9C; // type:function size:0x20 scope:local
Mthd_Execute__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000BBC; // type:function size:0x20 scope:local
Mthd_Draw__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000BDC; // type:function size:0x2C scope:local
Mthd_IsDelete__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@FPv = .text:0x00000C08; // type:function size:0x2C scope:local
PrmAbstract<Q311daObjLadder5Act_c5Prm_e>__5daObjFPC10fopAc_ac_cQ311daObjLadder5Act_c5Prm_eQ311daObjLadder5Act_c5Prm_e = .text:0x00000C34; // type:function size:0x1C scope:global
@20@__dt__14dBgS_ObjGndChkFv = .text:0x00000C50; // type:function size:0x8 scope:local
@76@__dt__14dBgS_ObjGndChkFv = .text:0x00000C58; // type:function size:0x8 scope:local
@60@__dt__14dBgS_ObjGndChkFv = .text:0x00000C60; // type:function size:0x8 scope:local
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
...rodata.0 = .rodata:0x00000000; // type:label scope:local
L_attr__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .rodata:0x00000000; // type:object size:0x24 scope:global
L_attr__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .rodata:0x00000000; // type:object size:0x24 scope:local
M_arcname__Q211daObjLadder5Act_c = .rodata:0x00000024; // type:object size:0x5 scope:global data:string
@3667 = .rodata:0x0000002C; // type:object size:0x4 scope:local
@3668 = .rodata:0x00000030; // type:object size:0x4 scope:local
Expand All @@ -49,18 +49,18 @@ M_arcname__Q211daObjLadder5Act_c = .rodata:0x00000024; // type:object size:0x5 s
@3839 = .rodata:0x00000054; // type:object size:0x4 scope:local
@3840 = .rodata:0x00000058; // type:object size:0x4 scope:local
...data.0 = .data:0x00000000; // type:label scope:local
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
L_attr_type__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .data:0x00000020; // type:object size:0x30 scope:global
L_attr_type__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .data:0x00000020; // type:object size:0x30 scope:local
@3878 = .data:0x00000050; // type:object size:0xC scope:local
@3879 = .data:0x0000005C; // type:object size:0xC scope:local
@3880 = .data:0x00000068; // type:object size:0xC scope:local
@3881 = .data:0x00000074; // type:object size:0xC scope:local
@3882 = .data:0x00000080; // type:object size:0xC scope:local
mode_proc$3877 = .data:0x0000008C; // type:object size:0x3C scope:local
Mthd_Table__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .data:0x000000C8; // type:object size:0x20 scope:global
Mthd_Table__Q211daObjLadder28@unnamed@d_a_obj_ladder_cpp@ = .data:0x000000C8; // type:object size:0x20 scope:local
g_profile_Obj_Ladder = .data:0x000000E8; // type:object size:0x30 scope:global
__vt__14dBgS_ObjGndChk = .data:0x00000118; // type:object size:0x30 scope:global
__vt__Q211daObjLadder5Act_c = .data:0x00000148; // type:object size:0x28 scope:global
M_tmp_mtx__Q211daObjLadder5Act_c = .bss:0x00000000; // type:object size:0x30 scope:global
lbl_103_bss_30 = .bss:0x00000030; // type:object size:0x1 data:byte
lbl_103_bss_30 = .bss:0x00000030; // type:object size:0x1 scope:local data:byte
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ def JSystemLib(lib_name, objects, progress_category="third_party"):
ActorRel(Matching, "d_a_obj_kgate"),
ActorRel(NonMatching, "d_a_obj_klift00"),
ActorRel(NonMatching, "d_a_obj_ktOnFire"),
ActorRel(NonMatching, "d_a_obj_ladder"),
ActorRel(Matching, "d_a_obj_ladder"),
ActorRel(Matching, "d_a_obj_lv2Candle"),
ActorRel(NonMatching, "d_a_obj_magne_arm"),
ActorRel(NonMatching, "d_a_obj_metalbox"),
Expand Down Expand Up @@ -1795,7 +1795,7 @@ def JSystemLib(lib_name, objects, progress_category="third_party"):
ActorRel(NonMatching, "d_a_obj_fchain"),
ActorRel(Matching, "d_a_obj_fireWood"),
ActorRel(Matching, "d_a_obj_fireWood2"),
ActorRel(NonMatching, "d_a_obj_firepillar"),
ActorRel(Matching, "d_a_obj_firepillar"),
ActorRel(NonMatching, "d_a_obj_firepillar2"),
ActorRel(NonMatching, "d_a_obj_flag"),
ActorRel(NonMatching, "d_a_obj_flag2"),
Expand Down
42 changes: 36 additions & 6 deletions include/d/actor/d_a_obj_firepillar.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -13,23 +16,50 @@
*/
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();
/* 80BE9784 */ void actionOnWaitInit();
/* 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);
Expand Down
91 changes: 64 additions & 27 deletions include/d/actor/d_a_obj_ladder.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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();
Expand All @@ -35,28 +59,41 @@ class daObjLadder : public fopAc_ac_c {
/* 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 */
1 change: 1 addition & 0 deletions include/d/d_bg_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class dBgS : public cBgS {

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&);
Expand Down
Loading

0 comments on commit 030d653

Please sign in to comment.