Skip to content

Commit cd99fa7

Browse files
authored
d_a_obj_wooden_statue OK (#2532)
1 parent 9c48ec0 commit cd99fa7

File tree

11 files changed

+466
-731
lines changed

11 files changed

+466
-731
lines changed

config/GZ2E01/rels/d_a_obj_wood_statue/symbols.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ _epilog = .text:0x0000002C; // type:function size:0x2C scope:global
33
_unresolved = .text:0x00000058; // type:function size:0x20 scope:global
44
Reflect__FP4cXyzRC13cBgS_PolyInfof = .text:0x00000078; // type:function size:0x2FC scope:global
55
__dt__8cM3dGPlaFv = .text:0x00000374; // type:function size:0x48 scope:global
6-
lifeGetTgCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x000003BC; // type:function size:0x5C scope:global
7-
lifeGetCoCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x00000418; // type:function size:0x44 scope:global
8-
s_sh_sub__FPvPv = .text:0x0000045C; // type:function size:0x4C scope:global
6+
lifeGetTgCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x000003BC; // type:function size:0x5C scope:local
7+
lifeGetCoCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x00000418; // type:function size:0x44 scope:local
8+
s_sh_sub__FPvPv = .text:0x0000045C; // type:function size:0x4C scope:local
99
initBaseMtx__14daObjWStatue_cFv = .text:0x000004A8; // type:function size:0x3C scope:global
1010
setBaseMtx__14daObjWStatue_cFv = .text:0x000004E4; // type:function size:0x4C scope:global
1111
Create__14daObjWStatue_cFv = .text:0x00000530; // type:function size:0x184 scope:global
@@ -36,10 +36,10 @@ execute__14daObjWStatue_cFv = .text:0x000014E0; // type:function size:0x188 scop
3636
draw__14daObjWStatue_cFv = .text:0x00001668; // type:function size:0x54 scope:global
3737
setListStart__14daObjWStatue_cFv = .text:0x000016BC; // type:function size:0x4 scope:global
3838
_delete__14daObjWStatue_cFv = .text:0x000016C0; // type:function size:0x38 scope:global
39-
daObjWStatue_Draw__FP14daObjWStatue_c = .text:0x000016F8; // type:function size:0x20 scope:global
40-
daObjWStatue_Execute__FP14daObjWStatue_c = .text:0x00001718; // type:function size:0x20 scope:global
41-
daObjWStatue_Delete__FP14daObjWStatue_c = .text:0x00001738; // type:function size:0x20 scope:global
42-
daObjWStatue_Create__FP10fopAc_ac_c = .text:0x00001758; // type:function size:0x20 scope:global
39+
daObjWStatue_Draw__FP14daObjWStatue_c = .text:0x000016F8; // type:function size:0x20 scope:local
40+
daObjWStatue_Execute__FP14daObjWStatue_c = .text:0x00001718; // type:function size:0x20 scope:local
41+
daObjWStatue_Delete__FP14daObjWStatue_c = .text:0x00001738; // type:function size:0x20 scope:local
42+
daObjWStatue_Create__FP10fopAc_ac_c = .text:0x00001758; // type:function size:0x20 scope:local
4343
__dt__10cCcD_GSttsFv = .text:0x00001778; // type:function size:0x48 scope:global
4444
__dt__18dPa_levelEcallBackFv = .text:0x000017C0; // type:function size:0x74 scope:global
4545
execute__18JPAEmitterCallBackFP14JPABaseEmitter = .text:0x00001834; // type:function size:0x4 scope:global
@@ -52,7 +52,7 @@ cLib_calcTimer<Uc>__FPUc = .text:0x00001844; // type:function size:0x1C scope:gl
5252
_ctors = .ctors:0x00000000; // type:label scope:global
5353
_dtors = .dtors:0x00000000; // type:label scope:global
5454
...rodata.0 = .rodata:0x00000000; // type:label scope:local
55-
l_cyl_src = .rodata:0x00000000; // type:object size:0x44 scope:global
55+
l_cyl_src = .rodata:0x00000000; // type:object size:0x44 scope:local
5656
@3857 = .rodata:0x00000044; // type:object size:0x4 scope:local
5757
@3858 = .rodata:0x00000048; // type:object size:0x8 scope:local
5858
@3859 = .rodata:0x00000050; // type:object size:0x8 scope:local
@@ -73,19 +73,19 @@ l_cyl_src = .rodata:0x00000000; // type:object size:0x44 scope:global
7373
@4324 = .rodata:0x00000098; // type:object size:0x4 scope:local
7474
@stringBase0 = .rodata:0x0000009C; // type:object size:0x45 scope:local data:string_table
7575
...data.0 = .data:0x00000000; // type:label scope:local
76-
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
76+
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
7777
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
7878
lbl_691_data_10 = .data:0x00000010; // type:object size:0x10
79-
l_arcName = .data:0x00000020; // type:object size:0x4 scope:global data:4byte
80-
l_eventName = .data:0x00000024; // type:object size:0x4 scope:global data:4byte
79+
l_arcName = .data:0x00000020; // type:object size:0x4 scope:local data:4byte
80+
l_eventName = .data:0x00000024; // type:object size:0x4 scope:local data:4byte
8181
action_table$4273 = .data:0x00000028; // type:object size:0x10 scope:local
8282
@4356 = .data:0x00000038; // type:object size:0xC scope:local
8383
@4357 = .data:0x00000044; // type:object size:0xC scope:local
8484
@4358 = .data:0x00000050; // type:object size:0xC scope:local
8585
@4359 = .data:0x0000005C; // type:object size:0xC scope:local
8686
@4360 = .data:0x00000068; // type:object size:0xC scope:local
8787
l_demoFunc$4355 = .data:0x00000074; // type:object size:0x3C scope:local
88-
l_daObjWStatue_Method = .data:0x000000B0; // type:object size:0x20 scope:global
88+
l_daObjWStatue_Method = .data:0x000000B0; // type:object size:0x20 scope:local
8989
g_profile_Obj_WoodStatue = .data:0x000000D0; // type:object size:0x30 scope:global
9090
__vt__12dBgS_AcchCir = .data:0x00000100; // type:object size:0xC scope:global
9191
__vt__10cCcD_GStts = .data:0x0000010C; // type:object size:0xC scope:global
@@ -96,4 +96,4 @@ __vt__8cM3dGAab = .data:0x00000154; // type:object size:0xC scope:global
9696
__vt__12dBgS_ObjAcch = .data:0x00000160; // type:object size:0x24 scope:global
9797
__vt__14daObjWStatue_c = .data:0x00000184; // type:object size:0x44 scope:global
9898
__vt__8cM3dGPla = .data:0x000001C8; // type:object size:0xC scope:global
99-
lbl_691_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
99+
init$2078 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte

config/GZ2J01/rels/d_a_obj_wood_statue/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ __vt__8cM3dGAab = .data:0x00000154; // type:object size:0xC scope:global
9595
__vt__12dBgS_ObjAcch = .data:0x00000160; // type:object size:0x24 scope:global
9696
__vt__14daObjWStatue_c = .data:0x00000184; // type:object size:0x44 scope:global
9797
__vt__8cM3dGPla = .data:0x000001C8; // type:object size:0xC scope:global
98-
lbl_691_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
98+
init$2078 = .bss:0x00000000; // type:object size:0x1 data:byte

config/GZ2P01/rels/d_a_obj_wood_statue/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ __vt__8cM3dGAab = .data:0x00000154; // type:object size:0xC scope:global
9595
__vt__12dBgS_ObjAcch = .data:0x00000160; // type:object size:0x24 scope:global
9696
__vt__14daObjWStatue_c = .data:0x00000184; // type:object size:0x44 scope:global
9797
__vt__8cM3dGPla = .data:0x000001C8; // type:object size:0xC scope:global
98-
lbl_691_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
98+
init$2078 = .bss:0x00000000; // type:object size:0x1 data:byte

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@ def MatchingFor(*versions) -> bool:
21632163
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_wind_stone"),
21642164
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_window"),
21652165
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_wood_pendulum"),
2166-
ActorRel(NonMatching, "d_a_obj_wood_statue"),
2166+
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_wood_statue"),
21672167
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_wsword"),
21682168
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_yel_bag"),
21692169
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_ystone"),

include/d/actor/d_a_itembase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class daItemBase_c : public fopAc_ac_c {
3333
void hide();
3434
void show();
3535
void changeDraw();
36-
u8 chkDraw();
36+
bool chkDraw();
3737
void dead();
3838
bool chkDead();
3939
int CreateItemHeap(char const*, s16, s16, s16, s16, s16, s16, s16);

include/d/actor/d_a_obj_wood_statue.h

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef D_A_OBJ_WOOD_STATUE_H
22
#define D_A_OBJ_WOOD_STATUE_H
33

4+
#include "d/actor/d_a_itembase.h"
5+
#include "d/d_particle.h"
46
#include "f_op/f_op_actor_mng.h"
57

68
/**
@@ -11,33 +13,57 @@
1113
* @details
1214
*
1315
*/
14-
class daObjWStatue_c : public fopAc_ac_c {
16+
class daObjWStatue_c : public daItemBase_c {
1517
public:
18+
typedef int (daObjWStatue_c::*demoFunc)();
19+
20+
enum Status {
21+
STATUS_WAIT,
22+
STATUS_ORDER_GET_DEMO,
23+
STATUS_GET_DEMO,
24+
STATUS_SW_ON_WAIT,
25+
STATUS_BOOMERANG_CARRY,
26+
};
27+
1628
/* 80D3A268 */ void initBaseMtx();
1729
/* 80D3A2A4 */ void setBaseMtx();
18-
/* 80D3A2F0 */ void Create();
19-
/* 80D3A474 */ bool __CreateHeap();
20-
/* 80D3A47C */ void create();
30+
/* 80D3A2F0 */ int Create();
31+
/* 80D3A474 */ int __CreateHeap();
32+
/* 80D3A47C */ int create();
2133
/* 80D3A8E8 */ void bg_check();
22-
/* 80D3AA3C */ void actionWaitInit();
23-
/* 80D3AA80 */ void actionWait();
24-
/* 80D3AB9C */ void initActionOrderGetDemo();
25-
/* 80D3AC64 */ void actionOrderGetDemo();
26-
/* 80D3ACAC */ void actionGetDemo();
27-
/* 80D3AD30 */ void actionInitSwOnWait();
28-
/* 80D3AD88 */ void actionSwOnWait();
29-
/* 80D3AE7C */ void actionInitBoomerangCarry();
30-
/* 80D3AF5C */ void actionBoomerangCarry();
34+
/* 80D3AA3C */ int actionWaitInit();
35+
/* 80D3AA80 */ int actionWait();
36+
/* 80D3AB9C */ int initActionOrderGetDemo();
37+
/* 80D3AC64 */ int actionOrderGetDemo();
38+
/* 80D3ACAC */ int actionGetDemo();
39+
/* 80D3AD30 */ int actionInitSwOnWait();
40+
/* 80D3AD88 */ int actionSwOnWait();
41+
/* 80D3AE7C */ int actionInitBoomerangCarry();
42+
/* 80D3AF5C */ int actionBoomerangCarry();
3143
/* 80D3AFC0 */ void demoProc();
3244
/* 80D3B164 */ void effectSet();
3345
/* 80D3B250 */ void effectStop();
34-
/* 80D3B2A0 */ void execute();
35-
/* 80D3B428 */ void draw();
46+
/* 80D3B2A0 */ int execute();
47+
/* 80D3B428 */ int draw();
3648
/* 80D3B47C */ void setListStart();
37-
/* 80D3B480 */ void _delete();
49+
/* 80D3B480 */ int _delete();
50+
51+
bool chkStatus(u8 status) { return mStatus == status; }
52+
void setStatus(u8 status) { mStatus = status; }
53+
u8 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }
3854

3955
private:
40-
/* 0x568 */ u8 field_0x568[0x974 - 0x568];
56+
/* 0x92C */ fpc_ProcID mItemId;
57+
/* 0x930 */ int field_0x930;
58+
/* 0x934 */ int mStaffIdx;
59+
/* 0x938 */ u8 mStatus;
60+
/* 0x939 */ u8 mShouldBoundSEPlay;
61+
/* 0x93A */ u8 field_0x93a;
62+
/* 0x93B */ u8 mRespawnTimer;
63+
/* 0x93C */ cXyz field_0x93c;
64+
/* 0x948 */ s16 mEventIdx;
65+
/* 0x94A */ s16 mBoundSETimer;
66+
/* 0x94C */ dPa_followEcallBack mCallbacks[2];
4167
};
4268

4369
STATIC_ASSERT(sizeof(daObjWStatue_c) == 0x974);

include/f_op/f_op_actor_mng.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,9 @@ struct fopAcM_search_prm {
8686
/* 0x0A */ s8 subtype;
8787
};
8888

89-
// define to avoid vtable mess in WIP TUs
90-
#ifndef HIO_entry_c_NO_VIRTUAL
9189
struct fOpAcm_HIO_entry_c : public mDoHIO_entry_c {
9290
virtual ~fOpAcm_HIO_entry_c() {}
9391
};
94-
#else
95-
struct fOpAcm_HIO_entry_c {
96-
~fOpAcm_HIO_entry_c();
97-
};
98-
#endif
9992

10093
class l_HIO {
10194
public:
@@ -389,7 +382,7 @@ inline const Vec* fopAcM_getCullSizeBoxMax(const fopAc_ac_c* i_actor) {
389382
return &i_actor->cull.box.max;
390383
}
391384

392-
inline void fopAcM_SetCullSize(fopAc_ac_c* i_actor, s8 i_cullsize) {
385+
inline void fopAcM_SetCullSize(fopAc_ac_c* i_actor, int i_cullsize) {
393386
i_actor->cullType = i_cullsize;
394387
}
395388

src/d/actor/d_a_obj_kantera.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int daItemKantera_c::Create() {
7070
mCcCyl.SetStts(&mCcStts);
7171
mCcCyl.SetR(dItem_data::getR(m_itemNo));
7272
mCcCyl.SetH(dItem_data::getH(m_itemNo));
73-
fopAcM_SetCullSize(this, 0xF);
73+
fopAcM_SetCullSize(this, fopAc_CULLSPHERE_0_e);
7474
actionWaitInit();
7575
fopAcM_SetGravity(this, -6.0f);
7676
fopAcM_OnCarryType(this, fopAcM_CARRY_ITEM);

src/d/actor/d_a_obj_shield.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int daItemShield_c::Create() {
9090
mCcCyl.SetStts(&mCcStts);
9191
mCcCyl.SetR(dItem_data::getR(m_itemNo));
9292
mCcCyl.SetH(dItem_data::getH(m_itemNo));
93-
fopAcM_SetCullSize(this, 15);
93+
fopAcM_SetCullSize(this, fopAc_CULLSPHERE_0_e);
9494
actionWaitInit();
9595
if (fopAcM_isSwitch(this, getSwBit())) {
9696
field_0x94a = 3;

0 commit comments

Comments
 (0)