Skip to content

Commit e0bbad1

Browse files
authored
Miscellaneous match improvements (#2562)
1 parent 418e393 commit e0bbad1

File tree

9 files changed

+215
-190
lines changed

9 files changed

+215
-190
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ def MatchingFor(*versions) -> bool:
18631863
ActorRel(NonMatching, "d_a_npc_ykm"),
18641864
ActorRel(NonMatching, "d_a_npc_ykw"),
18651865
ActorRel(NonMatching, "d_a_npc_zanb"),
1866-
ActorRel(NonMatching, "d_a_npc_zant"),
1866+
ActorRel(Equivalent, "d_a_npc_zant"), # weak func order
18671867
ActorRel(NonMatching, "d_a_npc_zelR"),
18681868
ActorRel(NonMatching, "d_a_npc_zelRo"),
18691869
ActorRel(Equivalent, "d_a_npc_zelda"), # weak function order
@@ -2029,7 +2029,7 @@ def MatchingFor(*versions) -> bool:
20292029
ActorRel(NonMatching, "d_a_obj_lv6Tenbin"),
20302030
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv6TogeRoll"),
20312031
ActorRel(NonMatching, "d_a_obj_lv6TogeTrap"),
2032-
ActorRel(NonMatching, "d_a_obj_lv6bemos"),
2032+
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv6bemos"),
20332033
ActorRel(NonMatching, "d_a_obj_lv6bemos2"),
20342034
ActorRel(NonMatching, "d_a_obj_lv6egate"),
20352035
ActorRel(NonMatching, "d_a_obj_lv6elevta"),

include/d/actor/d_a_mant.h

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,42 @@
1111
*/
1212

1313
class daMant_packet_c : public J3DPacket {
14-
public:
15-
/* 80861298 */ void draw();
16-
/* 80862BA4 */ ~daMant_packet_c();
14+
public:
15+
/* 80861298 */ void draw();
16+
/* 80862BA4 */ ~daMant_packet_c();
17+
18+
/* 0x0010 */ Mtx mMtx;
19+
/* 0x0040 */ Mtx mMtx2;
20+
/* 0x0070 */ dKy_tevstr_c* mTevStr;
21+
/* 0x0074 */ u8 field_0x74;
22+
/* 0x0078 */ cXyz mPos[2][169];
23+
/* 0x1050 */ cXyz mNrm[2][169];
24+
/* 0x2028 */ u8 field_0x2028;
25+
/* 0x2029 */ u8 mArg0;
26+
27+
daMant_packet_c() {
28+
field_0x74 = 0;
29+
}
30+
31+
cXyz* getPos() {
32+
return &mPos[field_0x74][0];
33+
}
34+
35+
cXyz* getNrm() {
36+
return &mNrm[field_0x74][0];
37+
}
38+
39+
void setTevStr(dKy_tevstr_c* tevStr) {
40+
mTevStr = tevStr;
41+
}
1742

18-
/* 0x0010 */ Mtx mMtx;
19-
/* 0x0040 */ Mtx mMtx2;
20-
/* 0x0070 */ dKy_tevstr_c* field_0x70;
21-
/* 0x0074 */ u8 field_0x74;
22-
/* 0x0075 */ u8 field_0x75[0x78 - 0x75];
23-
/* 0x0078 */ cXyz mPos[338];
24-
/* 0x1050 */ cXyz mNrm[338];
25-
/* 0x2028 */ u8 field_0x2028;
26-
/* 0x2029 */ u8 mArg0;
27-
/* 0x202a */ u8 field_0x202a[0x202b - 0x202a];
43+
MtxP getMtx2() {
44+
return mMtx2;
45+
}
2846

29-
cXyz* getPos() {
30-
return this->mPos + this->field_0x74 * 0xa9;
31-
}
47+
MtxP getMtx() {
48+
return mMtx;
49+
}
3250
};
3351
struct mant_j_s {
3452
public:

include/d/actor/d_a_npc_zant.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class daNpc_Zant_c : public daNpcT_c {
6060
static cutFunc mCutList[1];
6161

6262
private:
63-
/* 0xE40 */ u8 field_0xe40[0xe44- 0xe40];
63+
/* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40];
6464
/* 0xE44 */ dCcD_Cyl mCyl;
6565
/* 0xF80 */ u8 mType;
6666
/* 0xF81 */ u8 field_0xf81[0xf84 - 0xf81];
@@ -73,7 +73,7 @@ STATIC_ASSERT(sizeof(daNpc_Zant_c) == 0xfa0);
7373

7474
class daNpc_Zant_Param_c {
7575
public:
76-
/* 80B6E93C */ ~daNpc_Zant_Param_c() {};
76+
/* 80B6E93C */ virtual ~daNpc_Zant_Param_c() {}
7777
struct Data {
7878
/* 0x00 */ f32 field_0x0;
7979
/* 0x04 */ f32 field_0x4;
@@ -112,11 +112,19 @@ class daNpc_Zant_Param_c {
112112
/* 0x7C */ f32 field_0x7c;
113113
/* 0x80 */ f32 field_0x80;
114114
/* 0x84 */ f32 field_0x84;
115-
/* 0x88 */ f32 field_0x88;
115+
/* 0x88 */ f32 field_0x88;
116116
};
117117

118118
static const Data m;
119119
};
120120

121+
class daNpc_Zant_HIO_c {
122+
public:
123+
virtual ~daNpc_Zant_HIO_c() {}
124+
125+
#if DEBUG
126+
daNpc_Zant_Param_c::Data param;
127+
#endif
128+
};
121129

122130
#endif /* D_A_NPC_ZANT_H */

include/d/actor/d_a_tag_kmsg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct daTag_KMsg_c : public fopAc_ac_c {
7070
}
7171

7272
u32 getTalkAngle() {
73-
u32 talkAngle = (fopAcM_GetParam(this) & 0xe0) >> 5;
73+
u32 talkAngle = (fopAcM_GetParam(this) >> 5) & 0x7;
7474
if (talkAngle == 7) {
7575
return 0;
7676
} else {

include/m_Do/m_Do_mtx.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ inline void cMtx_multVecArray(Mtx mtx, const Vec* src, Vec* dst, u32 count) {
100100
mDoMtx_multVecArray(mtx, src, dst, count);
101101
}
102102

103+
inline void cMtx_inverseTranspose(const Mtx a, Mtx b) {
104+
mDoMtx_inverseTranspose(a, b);
105+
}
106+
103107
inline void mDoMtx_multVecZero(CMtxP param_0, Vec* param_1) {
104108
param_1->x = param_0[0][3];
105109
param_1->y = param_0[1][3];

0 commit comments

Comments
 (0)