d_a_obj_Turara equivalent (#2289)

* Initial d_a_obj_Turara work

* More d_a_obj_Turara work

* d_a_obj_Turara equivalent except for weak func order of dEvLib_callback_c dtor

* Updates to d_a_obj_Turara after feedback from Taka

* b_dre equivalent (#2290)

* Update d_a_obj_Turara to remove unnecessary comment based on hatal\'s request

---------

Co-authored-by: TakaRikka <38417346+TakaRikka@users.noreply.github.com>
This commit is contained in:
YunataSavior 2025-01-23 12:42:27 -08:00 committed by GitHub
parent c11cd855d5
commit 5644936254
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 507 additions and 721 deletions

View File

@ -17,6 +17,6 @@ REL/global_destructor_chain.c:
d/actor/d_a_obj_Turara.cpp:
.text start:0x000000EC end:0x00001E40
.ctors start:0x00000000 end:0x00000004
.rodata start:0x00000000 end:0x00000088
.rodata start:0x00000000 end:0x00000085
.data start:0x00000000 end:0x00000210
.bss start:0x00000008 end:0x00000038
.bss start:0x00000008 end:0x00000035

View File

@ -31,10 +31,10 @@ init_modeDropEnd2__10daTurara_cFv = .text:0x000015D8; // type:function size:0x2C
modeDropEnd2__10daTurara_cFv = .text:0x00001898; // type:function size:0x50 scope:global
Draw__10daTurara_cFv = .text:0x000018E8; // type:function size:0xF0 scope:global
Delete__10daTurara_cFv = .text:0x000019D8; // type:function size:0x68 scope:global
daTurara_Draw__FP10daTurara_c = .text:0x00001A40; // type:function size:0x2C scope:global
daTurara_Execute__FP10daTurara_c = .text:0x00001A6C; // type:function size:0x20 scope:global
daTurara_Delete__FP10daTurara_c = .text:0x00001A8C; // type:function size:0x20 scope:global
daTurara_Create__FP10fopAc_ac_c = .text:0x00001AAC; // type:function size:0x20 scope:global
daTurara_Draw__FP10daTurara_c = .text:0x00001A40; // type:function size:0x2C scope:local
daTurara_Execute__FP10daTurara_c = .text:0x00001A6C; // type:function size:0x20 scope:local
daTurara_Delete__FP10daTurara_c = .text:0x00001A8C; // type:function size:0x20 scope:local
daTurara_Create__FP10fopAc_ac_c = .text:0x00001AAC; // type:function size:0x20 scope:local
__dt__10cCcD_GSttsFv = .text:0x00001ACC; // type:function size:0x48 scope:global
__dt__14daTurara_HIO_cFv = .text:0x00001B14; // type:function size:0x6C scope:global
__sinit_d_a_obj_Turara_cpp = .text:0x00001B80; // type:function size:0x70 scope:local
@ -57,7 +57,7 @@ _dtors = .dtors:0x00000000; // type:label scope:global
@3664 = .rodata:0x0000000C; // type:object size:0x4 scope:local
@3665 = .rodata:0x00000010; // type:object size:0x4 scope:local
mCcDObjInfo__10daTurara_c = .rodata:0x00000014; // type:object size:0x30 scope:global
l_bmdIdx = .rodata:0x00000044; // type:object size:0x8 scope:global
l_bmdIdx = .rodata:0x00000044; // type:object size:0x8 scope:local
@3823 = .rodata:0x0000004C; // type:object size:0x4 scope:local
@3824 = .rodata:0x00000050; // type:object size:0x4 scope:local
@3825 = .rodata:0x00000054; // type:object size:0x4 scope:local data:float
@ -72,7 +72,7 @@ l_bmdIdx = .rodata:0x00000044; // type:object size:0x8 scope:global
@4264 = .rodata:0x00000078; // type:object size:0x4 scope:local data:string
@stringBase0 = .rodata:0x0000007C; // type:object size:0x9 scope:local data:string_table
...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
mCcDCyl__10daTurara_c = .data:0x00000020; // type:object size:0x44 scope:global
@3924 = .data:0x00000064; // type:object size:0xC scope:local
@ -81,7 +81,7 @@ mCcDCyl__10daTurara_c = .data:0x00000020; // type:object size:0x44 scope:global
@3927 = .data:0x00000088; // type:object size:0xC scope:local
@3928 = .data:0x00000094; // type:object size:0xC scope:local
mode_proc$3923 = .data:0x000000A0; // type:object size:0x3C scope:local
l_daTurara_Method = .data:0x000000DC; // type:object size:0x20 scope:global
l_daTurara_Method = .data:0x000000DC; // type:object size:0x20 scope:local
g_profile_Obj_Turara = .data:0x000000FC; // type:object size:0x30 scope:global
__vt__10cCcD_GStts = .data:0x0000012C; // type:object size:0xC scope:global
__vt__10dCcD_GStts = .data:0x00000138; // type:object size:0xC scope:global
@ -96,5 +96,5 @@ __vt__18fOpAcm_HIO_entry_c = .data:0x000001F8; // type:object size:0xC scope:glo
__vt__14mDoHIO_entry_c = .data:0x00000204; // type:object size:0xC scope:global
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
@3653 = .bss:0x00000008; // type:object size:0xC scope:local
l_HIO = .bss:0x00000014; // type:object size:0x20 scope:global data:byte
lbl_394_bss_34 = .bss:0x00000034; // type:object size:0x1 data:byte
l_HIO = .bss:0x00000014; // type:object size:0x20 scope:local data:byte
lbl_394_bss_34 = .bss:0x00000034; // type:object size:0x1 scope:local data:byte

View File

@ -1799,7 +1799,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_npc_zrc"),
ActorRel(NonMatching, "d_a_npc_zrz"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_Lv5Key"),
ActorRel(NonMatching, "d_a_obj_Turara"),
ActorRel(Equivalent, "d_a_obj_Turara"),
ActorRel(NonMatching, "d_a_obj_TvCdlst"),
ActorRel(NonMatching, "d_a_obj_Y_taihou"),
ActorRel(NonMatching, "d_a_obj_amiShutter"),

View File

@ -57,6 +57,7 @@ enum cCcD_ObjAtType {
/* 0x04000000 */ AT_TYPE_MASTER_SWORD = (1 << 26),
/* 0x08000000 */ AT_TYPE_MIDNA_LOCK = (1 << 27),
/* 0x10000000 */ AT_TYPE_10000000 = (1 << 28),
/* 0x10000000 */ AT_TYPE_20000000 = (1 << 29),
/* 0x40000000 */ AT_TYPE_WOLF_CUT_TURN = (1 << 30),
/* 0x80000000 */ AT_TYPE_WOLF_ATTACK = (1 << 31),
/* 0xD8000000 */ AT_TYPE_UNK = 0xD8000000

View File

@ -1,7 +1,10 @@
#ifndef D_A_OBJ_TURARA_H
#define D_A_OBJ_TURARA_H
#include "f_op/f_op_actor_mng.h"
#include "d/d_bg_s_movebg_actor.h"
#include "d/d_com_inf_game.h"
#include "d/d_event_lib.h"
#include "d/d_bg_w.h"
/**
* @ingroup actors-objects
@ -11,17 +14,24 @@
* @details
*
*/
class daTurara_c : public fopAc_ac_c {
struct fakeTuraraPadding {
u8 a[8];
};
class daTurara_c : public dBgS_MoveBgActor, public fakeTuraraPadding, public dEvLib_callback_c {
public:
daTurara_c() : dEvLib_callback_c(this) {}
/* 80B9E710 */ ~daTurara_c() {}
/* 80B9CC9C */ void setBaseMtx();
/* 80B9CD74 */ void CreateHeap();
/* 80B9CED8 */ void create();
/* 80B9CD74 */ int CreateHeap();
/* 80B9CED8 */ int create();
/* 80B9D468 */ void setFallStat();
/* 80B9D4CC */ void Execute(f32 (**)[3][4]);
/* 80B9D4CC */ int Execute(Mtx**);
/* 80B9D548 */ void move();
/* 80B9D72C */ void init_modeWait();
/* 80B9D738 */ void modeWait();
/* 80B9D998 */ void eventStart();
/* 80B9D998 */ BOOL eventStart();
/* 80B9D9BC */ void init_modeDropInit();
/* 80B9DA00 */ void modeDropInit();
/* 80B9DA44 */ void init_modeDrop();
@ -31,23 +41,67 @@ public:
/* 80B9DE48 */ void modeDropEnd();
/* 80B9E078 */ void init_modeDropEnd2();
/* 80B9E338 */ void modeDropEnd2();
/* 80B9E388 */ void Draw();
/* 80B9E478 */ void Delete();
/* 80B9E710 */ ~daTurara_c();
/* 80B9E388 */ int Draw();
/* 80B9E478 */ int Delete();
static u8 const mCcDObjInfo[48];
static u8 mCcDCyl[68];
u8 getSwBit1() { return fopAcM_GetParamBit(this, 0, 8); }
u8 getSwBit2() { return fopAcM_GetParamBit(this, 8, 8); }
u8 getSwBit3() { return fopAcM_GetParamBit(this, 16, 8); }
s32 getEvetID() {
return fopAcM_GetParamBit(this, 0x18, 8);
}
u8 getWaitTime() { return shape_angle.z; }
int getItemTbleNum() { return shape_angle.x >> 8 & 0xff; }
static const dCcD_SrcGObjInf mCcDObjInfo;
static dCcD_SrcCyl mCcDCyl;
private:
/* 0x568 */ u8 field_0x568[0x998 - 0x568];
/* 0x5b8 */ request_of_phase_process_class mPhaseReq;
/* 0x5c0 */ J3DModel* mpModel[2];
/* 0x5c8 */ u8 mMode;
/* 0x5c9 */ u8 field_0x5c9;
/* 0x5cc */ dCcD_Stts mColliderStts;
/* 0x608 */ dCcD_Cyl mCylCollider;
/* 0x744 */ u8 mWaitTime;
/* 0x748 */ u32 field_0x748;
/* 0x74c */ f32 field_0x74c;
/* 0x750 */ s16 field_0x750;
/* 0x752 */ s16 field_0x752;
/* 0x754 */ s16 field_0x754;
/* 0x758 */ f32 field_0x758;
/* 0x75c */ f32 field_0x75c;
/* 0x760 */ f32 field_0x760;
/* 0x764 */ u8 mInWater;
/* 0x768 */ dBgS_AcchCir mAcchCir;
/* 0x7a8 */ dBgS_ObjAcch mAcch;
/* 0x980 */ dBgW* field_0x980;
/* 0x984 */ u8 field_0x984;
/* 0x988 */ u32 field_0x988;
/* 0x98c */ u8 field_0x98c;
/* 0x98d */ u8 field_0x98d[0x994 - 0x98d];
/* 0x994 */ u8 field_0x994;
};
STATIC_ASSERT(sizeof(daTurara_c) == 0x998);
class daTurara_HIO_c {
class daTurara_HIO_c : public fOpAcm_HIO_entry_c {
public:
/* 80B9CB8C */ daTurara_HIO_c();
/* 80B9E5B4 */ ~daTurara_HIO_c();
/* 80B9E5B4 */ virtual ~daTurara_HIO_c() {}
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 mGravity;
/* 0x0c */ f32 mMaxGravity;
/* 0x10 */ u8 mWaitTime;
/* 0x11 */ u8 mShockStrength;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1c */ f32 field_0x1c;
};
STATIC_ASSERT(sizeof(daTurara_HIO_c) == 0x20);
#endif /* D_A_OBJ_TURARA_H */

View File

@ -220,6 +220,7 @@ public:
bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
bool ChkFlush() { return field_0x91 & 8; }
void SetLock() { mFlags |= LOCK_e; }
void OffRoofRegist() { field_0x91 |= 0x4; }
bool ChkRoofRegist() { return field_0x91 & 4;}
cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; }
int GetVtxNum() const { return pm_bgd->m_v_num; }

File diff suppressed because it is too large Load Diff