Skip to content

Commit 98f755e

Browse files
authored
d_a_npc_worm matching (#2365)
* d_a_npc_worm matching * Rename a_this
1 parent d7a8fb9 commit 98f755e

File tree

11 files changed

+412
-432
lines changed

11 files changed

+412
-432
lines changed

config/GZ2E01/rels/d_a_npc_worm/symbols.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
_prolog = .text:0x00000000; // type:function size:0x2C scope:global
22
_epilog = .text:0x0000002C; // type:function size:0x2C scope:global
33
_unresolved = .text:0x00000058; // type:function size:0x20 scope:global
4-
nodeCallBack__FP8J3DJointi = .text:0x00000078; // type:function size:0xD4 scope:global
5-
daNPC_WORM_Draw__FP14npc_worm_class = .text:0x0000014C; // type:function size:0xF8 scope:global
4+
nodeCallBack__FP8J3DJointi = .text:0x00000078; // type:function size:0xD4 scope:local
5+
daNPC_WORM_Draw__FP14npc_worm_class = .text:0x0000014C; // type:function size:0xF8 scope:local
66
npc_worm_ground__FP14npc_worm_class = .text:0x00000244; // type:function size:0x280 scope:global
77
npc_worm_normal__FP14npc_worm_class = .text:0x000004C4; // type:function size:0x280 scope:global
88
npc_worm_dive__FP14npc_worm_class = .text:0x00000744; // type:function size:0x134 scope:global
99
npc_worm_binwait__FP14npc_worm_class = .text:0x00000878; // type:function size:0x4C scope:global
1010
action__FP14npc_worm_class = .text:0x000008C4; // type:function size:0x530 scope:global
11-
daNPC_WORM_Execute__FP14npc_worm_class = .text:0x00000DF4; // type:function size:0x1DC scope:global
12-
daNPC_WORM_IsDelete__FP14npc_worm_class = .text:0x00000FD0; // type:function size:0x8 scope:global
13-
daNPC_WORM_Delete__FP14npc_worm_class = .text:0x00000FD8; // type:function size:0x30 scope:global
14-
useHeapInit__FP10fopAc_ac_c = .text:0x00001008; // type:function size:0xB8 scope:global
15-
daNPC_WORM_Create__FP10fopAc_ac_c = .text:0x000010C0; // type:function size:0x190 scope:global
11+
daNPC_WORM_Execute__FP14npc_worm_class = .text:0x00000DF4; // type:function size:0x1DC scope:local
12+
daNPC_WORM_IsDelete__FP14npc_worm_class = .text:0x00000FD0; // type:function size:0x8 scope:local
13+
daNPC_WORM_Delete__FP14npc_worm_class = .text:0x00000FD8; // type:function size:0x30 scope:local
14+
useHeapInit__FP10fopAc_ac_c = .text:0x00001008; // type:function size:0xB8 scope:local
15+
daNPC_WORM_Create__FP10fopAc_ac_c = .text:0x000010C0; // type:function size:0x190 scope:local
1616
getLeftHandPos__9daPy_py_cCFv = .text:0x00001250; // type:function size:0x1C scope:global
1717
Insect_Release__9dInsect_cFv = .text:0x0000126C; // type:function size:0xC scope:global
1818
_ctors = .ctors:0x00000000; // type:label scope:global
@@ -57,6 +57,6 @@ _dtors = .dtors:0x00000000; // type:label scope:global
5757
@4056 = .rodata:0x0000009C; // type:object size:0x4 scope:local
5858
@4126 = .rodata:0x000000A0; // type:object size:0x4 scope:local
5959
@stringBase0 = .rodata:0x000000A4; // type:object size:0x6 scope:local data:string_table
60-
l_daNPC_WORM_Method = .data:0x00000000; // type:object size:0x20 scope:global
60+
l_daNPC_WORM_Method = .data:0x00000000; // type:object size:0x20 scope:local
6161
g_profile_NPC_WORM = .data:0x00000020; // type:object size:0x30 scope:global
6262
__vt__14npc_worm_class = .data:0x00000050; // type:object size:0xC scope:global

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ def MatchingFor(*versions):
18151815
ActorRel(NonMatching, "d_a_npc_toby"),
18161816
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_tr"),
18171817
ActorRel(NonMatching, "d_a_npc_uri"),
1818-
ActorRel(NonMatching, "d_a_npc_worm"),
1818+
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_worm", extra_cflags=['-pragma "nosyminline off"']),
18191819
ActorRel(NonMatching, "d_a_npc_wrestler"),
18201820
ActorRel(NonMatching, "d_a_npc_yamid"),
18211821
ActorRel(NonMatching, "d_a_npc_yamis"),

include/d/actor/d_a_npc_worm.h

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define D_A_NPC_WORM_H
33

44
#include "d/actor/d_a_npc.h"
5+
#include "d/d_insect.h"
56

67
/**
78
* @ingroup actors-npcs
@@ -11,9 +12,32 @@
1112
* @details
1213
*
1314
*/
14-
class npc_worm_class : public fopAc_ac_c {
15-
private:
16-
/* 0x568 */ u8 field_0x568[0x5ec - 0x568];
15+
class npc_worm_class : public dInsect_c {
16+
public:
17+
bool check_release() { return field_0x56C == 1; }
18+
19+
/* 0x590 */ request_of_phase_process_class mPhase;
20+
/* 0x598 */ u8 field_0x598;
21+
/* 0x59C */ J3DModel* mModel1;
22+
/* 0x5A0 */ J3DModel* mModel2;
23+
/* 0x5A4 */ s16 field_0x5a4;
24+
/* 0x5A6 */ s16 field_0x5a6;
25+
/* 0x5A8 */ s16 field_0x5a8;
26+
/* 0x5AA */ s16 field_0x5aa;
27+
/* 0x5AC */ s16 field_0x5ac;
28+
/* 0x5AE */ s16 field_0x5ae;
29+
/* 0x5B0 */ f32 field_0x5b0;
30+
/* 0x5B2 */ s16 field_0x5b4[9];
31+
/* 0x5C6 */ s16 field_0x5c6;
32+
/* 0x5C8 */ s16 field_0x5c8;
33+
/* 0x5CA */ s16 field_0x5ca;
34+
/* 0x5CC */ f32 field_0x5cc;
35+
/* 0x5D0 */ f32 field_0x5d0;
36+
/* 0x5D4 */ f32 field_0x5d4;
37+
/* 0x5D8 */ cXyz field_0x5d8;
38+
/* 0x5E4 */ s16 field_0x5e4;
39+
/* 0x5E6 */ u8 field_0x5e6;
40+
/* 0x5E8 */ s16 field_0x5e8[2];
1741
};
1842

1943
STATIC_ASSERT(sizeof(npc_worm_class) == 0x5ec);

include/f_op/f_op_actor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ enum dEvt_Condition_e {
119119
dEvtCnd_CANDOOR_e = 0x0004,
120120
dEvtCnd_CANGETITEM_e = 0x0008,
121121
dEvtCnd_CANTALKITEM_e = 0x0020,
122+
dEvtCnd_40_e = 0x0040,
122123
dEvtCnd_DUMMY = 0x8000,
123124
};
124125

src/d/actor/d_a_e_nest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static void e_nest_hahen(e_nest_class* i_this) {
610610
i_this->mTimers[0] = 60;
611611
} else {
612612
dComIfGp_att_CatchRequest(a_this, 0x76, 100.0f, 50.0f, -150.0f, 0x5000, 1);
613-
a_this->eventInfo.onCondition(0x40);
613+
a_this->eventInfo.onCondition(dEvtCnd_40_e);
614614
}
615615
break;
616616
}

0 commit comments

Comments
 (0)