Skip to content

Commit 19e1865

Browse files
authored
tag_allmato almost, swhit0 treesh swball done, misc cleanup (#2312)
* d_a_tag_allmato almost done * d_a_swhit0 done * some SSystem cleanup * treesh done * swball done, some other rel cleanup
1 parent 9c3c075 commit 19e1865

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2089
-1694
lines changed

config/GZ2E01/rels/d_a_swhit0/symbols.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ getType__10daSwhit0_cFv = .text:0x000000C8; // type:function size:0x1C scope:glo
99
makeEventId__10daSwhit0_cFv = .text:0x000000E4; // type:function size:0x88 scope:global
1010
CreateHeap__10daSwhit0_cFv = .text:0x0000016C; // type:function size:0x128 scope:global
1111
CreateInit__10daSwhit0_cFv = .text:0x00000294; // type:function size:0x17C scope:global
12-
CheckCreateHeap__FP10fopAc_ac_c = .text:0x00000410; // type:function size:0x20 scope:global
12+
CheckCreateHeap__FP10fopAc_ac_c = .text:0x00000410; // type:function size:0x20 scope:local
1313
create__10daSwhit0_cFv = .text:0x00000430; // type:function size:0x204 scope:global
1414
__dt__8cM3dGSphFv = .text:0x00000634; // type:function size:0x48 scope:global
1515
__dt__8cM3dGAabFv = .text:0x0000067C; // type:function size:0x48 scope:global
@@ -29,10 +29,10 @@ actionToOnDemo2__10daSwhit0_cFv = .text:0x00000E08; // type:function size:0x13C
2929
actionSwWait__10daSwhit0_cFv = .text:0x00000F44; // type:function size:0xFC scope:global
3030
actionOnWait__10daSwhit0_cFv = .text:0x00001040; // type:function size:0x120 scope:global
3131
setDrawMtx__10daSwhit0_cFv = .text:0x00001160; // type:function size:0x58 scope:global
32-
daSwhit0_Draw__FP10daSwhit0_c = .text:0x000011B8; // type:function size:0xF0 scope:global
33-
daSwhit0_Execute__FP10daSwhit0_c = .text:0x000012A8; // type:function size:0xBC scope:global
34-
daSwhit0_Delete__FP10daSwhit0_c = .text:0x00001364; // type:function size:0x48 scope:global
35-
daSwhit0_Create__FP10fopAc_ac_c = .text:0x000013AC; // type:function size:0x20 scope:global
32+
daSwhit0_Draw__FP10daSwhit0_c = .text:0x000011B8; // type:function size:0xF0 scope:local
33+
daSwhit0_Execute__FP10daSwhit0_c = .text:0x000012A8; // type:function size:0xBC scope:local
34+
daSwhit0_Delete__FP10daSwhit0_c = .text:0x00001364; // type:function size:0x48 scope:local
35+
daSwhit0_Create__FP10fopAc_ac_c = .text:0x000013AC; // type:function size:0x20 scope:local
3636
cLib_calcTimer<Uc>__FPUc = .text:0x000013CC; // type:function size:0x1C scope:global
3737
_ctors = .ctors:0x00000000; // type:label scope:global
3838
_dtors = .dtors:0x00000000; // type:label scope:global
@@ -41,12 +41,12 @@ _dtors = .dtors:0x00000000; // type:label scope:global
4141
@3982 = .rodata:0x00000008; // type:object size:0x4 scope:local data:float
4242
@4212 = .rodata:0x00000010; // type:object size:0x8 scope:local data:double
4343
@stringBase0 = .rodata:0x00000018; // type:object size:0x33 scope:local data:string_table
44-
l_arcName = .data:0x00000000; // type:object size:0x4 scope:global
45-
l_sph_src = .data:0x00000004; // type:object size:0x40 scope:global
44+
l_arcName = .data:0x00000000; // type:object size:0x4 scope:local
45+
l_sph_src = .data:0x00000004; // type:object size:0x40 scope:local
4646
action_table$3953 = .data:0x00000044; // type:object size:0x8 scope:local
4747
l_color$localstatic3$draw__10daSwhit0_cFv = .data:0x0000004C; // type:object size:0x8 scope:local
4848
@4230 = .data:0x00000054; // type:object size:0x2C scope:local
49-
l_daSwhit0_Method = .data:0x00000080; // type:object size:0x20 scope:global
49+
l_daSwhit0_Method = .data:0x00000080; // type:object size:0x20 scope:local
5050
g_profile_SWHIT0 = .data:0x000000A0; // type:object size:0x30 scope:global
5151
__vt__8cM3dGSph = .data:0x000000D0; // type:object size:0xC scope:global
5252
__vt__8cM3dGAab = .data:0x000000DC; // type:object size:0xC scope:global

configure.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ def MatchingFor(*versions):
708708
Object(MatchingFor("GZ2E01"), "SSystem/SComponent/c_m3d_g_pla.cpp"),
709709
Object(MatchingFor("GZ2E01"), "SSystem/SComponent/c_m3d_g_sph.cpp"),
710710
Object(MatchingFor("GZ2E01"), "SSystem/SComponent/c_m3d_g_tri.cpp"),
711+
Object(NonMatching, "SSystem/SComponent/c_m3d_g_vtx.cpp"),
711712
Object(MatchingFor("GZ2E01"), "SSystem/SComponent/c_lib.cpp"),
712713
Object(MatchingFor("GZ2E01"), "SSystem/SComponent/c_angle.cpp"),
713714
Object(MatchingFor("GZ2E01"), "SSystem/SStandard/s_basic.cpp"),
@@ -1457,8 +1458,8 @@ def MatchingFor(*versions):
14571458
ActorRel(MatchingFor("GZ2E01"), "d_a_path_line"),
14581459
ActorRel(NonMatching, "d_a_scene_exit"),
14591460
ActorRel(MatchingFor("GZ2E01"), "d_a_set_bgobj"),
1460-
ActorRel(NonMatching, "d_a_swhit0"),
1461-
ActorRel(NonMatching, "d_a_tag_allmato"),
1461+
ActorRel(MatchingFor("GZ2E01"), "d_a_swhit0"),
1462+
ActorRel(NonMatching, "d_a_tag_allmato", extra_cflags=['-pragma "nosyminline off"']),
14621463
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_camera"),
14631464
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_chkpoint"),
14641465
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_event"),
@@ -2101,7 +2102,7 @@ def MatchingFor(*versions):
21012102
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tornado"),
21022103
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tornado2"),
21032104
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tp"),
2104-
ActorRel(NonMatching, "d_a_obj_treesh"),
2105+
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_treesh"),
21052106
ActorRel(NonMatching, "d_a_obj_twGate"),
21062107
ActorRel(NonMatching, "d_a_obj_udoor"),
21072108
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_usaku"),
@@ -2138,7 +2139,7 @@ def MatchingFor(*versions):
21382139
ActorRel(NonMatching, "d_a_ppolamp"),
21392140
ActorRel(MatchingFor("GZ2E01"), "d_a_skip_2D"),
21402141
ActorRel(MatchingFor("GZ2E01"), "d_a_startAndGoal", extra_cflags=['-pragma "nosyminline off"']),
2141-
ActorRel(NonMatching, "d_a_swBall"),
2142+
ActorRel(MatchingFor("GZ2E01"), "d_a_swBall"),
21422143
ActorRel(MatchingFor("GZ2E01"), "d_a_swLBall"),
21432144
ActorRel(MatchingFor("GZ2E01"), "d_a_swTime"),
21442145
ActorRel(NonMatching, "d_a_tag_Lv6Gate"),
@@ -2187,7 +2188,7 @@ def MatchingFor(*versions):
21872188
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_yami", extra_cflags=['-pragma "nosyminline off"']),
21882189
ActorRel(MatchingFor("GZ2E01"), "d_a_talk"),
21892190
ActorRel(MatchingFor("GZ2E01"), "d_a_tboxSw"),
2190-
ActorRel(NonMatching, "d_a_title"),
2191+
ActorRel(Equivalent, "d_a_title"), # weak func order
21912192
ActorRel(MatchingFor("GZ2E01"), "d_a_warp_bug"),
21922193
]
21932194

include/JSystem/JUtility/JUTAssert.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace JUTAssertion {
4040
void showAssert(u32 device, const char * file, int line, const char * assertion);
4141
void setWarningMessage_f(u32 device, char * file, int line, const char * fmt, ...);
4242
void setLogMessage_f(u32 device, char* file, int line, const char* fmt, ...);
43+
void setConfirmMessage(u32 param_1, char* file, int line, bool param_4, const char* msg);
4344
};
4445

4546
extern bool sAssertVisible;

include/SSystem/SComponent/c_bg_s_chk.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class cBgS_Chk {
2424
public:
2525
cBgS_Chk();
2626
void SetExtChk(cBgS_Chk&);
27-
bool ChkSameActorPid(unsigned int) const;
27+
bool ChkSameActorPid(fpc_ProcID) const;
2828

2929
void SetActorPid(fpc_ProcID pid) { mActorPid = pid; }
3030
fpc_ProcID GetActorPid() const { return mActorPid; }
@@ -34,7 +34,7 @@ class cBgS_Chk {
3434
cBgS_GrpPassChk* GetGrpPassChk() const { return mGrpPassChk; }
3535
void OffSameActorChk() { mSameActorChk = false; }
3636

37-
virtual ~cBgS_Chk(void);
37+
virtual ~cBgS_Chk();
3838
}; // Size: 0x14
3939

4040
#endif /* C_BG_S_CHK_H */

include/SSystem/SComponent/c_bg_s_poly_info.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22
#define C_BG_S_POLY_INFO_H
33

44
#include "dolphin/types.h"
5+
#include "f_pc/f_pc_manager.h"
56

67
class cBgS_PolyInfo {
78
private:
89
/* 0x00 */ u16 mPolyIndex;
910
/* 0x02 */ u16 mBgIndex;
1011
/* 0x04 */ void* unk_0x04;
11-
/* 0x08 */ unsigned int mActorId;
12+
/* 0x08 */ fpc_ProcID mActorId;
1213

1314
public:
1415
cBgS_PolyInfo();
1516
bool ChkSetInfo() const;
1617
void ClearPi();
1718
void SetPolyInfo(const cBgS_PolyInfo&);
18-
void SetActorInfo(int, void*, unsigned int);
19-
bool ChkSafe(const void*, unsigned int) const;
19+
void SetActorInfo(int, void*, fpc_ProcID);
20+
bool ChkSafe(const void*, fpc_ProcID) const;
2021
void SetPolyIndex(int);
2122
bool ChkBgIndex() const;
2223

include/SSystem/SComponent/c_cc_d.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ class cCcD_SphAttr : public cCcD_ShapeAttr, public cM3dGSph {
211211
/* 8026476C */ virtual bool GetNVec(cXyz const&, cXyz*) const;
212212
/* 80264808 */ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const;
213213

214+
const cM3dGSph* GetShapeP() const { return this; }
215+
214216
}; // Size = 0x34
215217

216218
STATIC_ASSERT(0x34 == sizeof(cCcD_SphAttr));
@@ -243,6 +245,8 @@ class cCcD_CylAttr : public cCcD_ShapeAttr, public cM3dGCyl {
243245
/* 802643D0 */ virtual bool GetNVec(cXyz const&, cXyz*) const;
244246
/* 802644B8 */ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const;
245247

248+
const cM3dGCyl* GetShapeP() const { return this; }
249+
246250
}; // Size = 0x38
247251

248252
STATIC_ASSERT(0x38 == sizeof(cCcD_CylAttr));

include/SSystem/SComponent/c_m3d.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,14 @@ inline f32 cM3d_LenSq(const Vec* a, const Vec* b) {
101101
return VECSquareDistance(a, b);
102102
}
103103

104+
inline bool cM3d_Cross_LinSph(const cM3dGLin* lin_p, const cM3dGSph* sph_p) {
105+
Vec sp10;
106+
return cM3d_Cross_LinSph(lin_p, sph_p, &sp10);
107+
}
108+
109+
inline bool cM3d_Cross_CylSph(const cM3dGCyl* cyl, const cM3dGSph* sph, Vec* out) {
110+
f32 sp10;
111+
return cM3d_Cross_CylSph(cyl, sph, out, &sp10);
112+
}
113+
104114
#endif

include/SSystem/SComponent/c_m3d_g_aab.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class cM3dGAab {
2626
void CalcCenter(cXyz*) const;
2727
void PlusR(f32);
2828
const cXyz* GetMaxP(void) const { return &mMax; }
29+
const cXyz* GetMaxP(void) { return &mMax; }
2930
const cXyz* GetMinP(void) const { return &mMin; }
31+
const cXyz* GetMinP(void) { return &mMin; }
3032
const f32 GetMaxX(void) const { return mMax.x; }
3133
const f32 GetMaxY(void) const { return mMax.y; }
3234
const f32 GetMaxZ(void) const { return mMax.z; }

include/SSystem/SComponent/c_m3d_g_cir.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ class cM2dGCir {
1313
f32 GetCy() const { return mPosY; }
1414
f32 GetR() const { return mRadius; }
1515

16+
void Set(f32 pos_x, f32 pos_y, f32 radius) {
17+
mPosX = pos_x;
18+
mPosY = pos_y;
19+
mRadius = radius;
20+
}
21+
1622
cM2dGCir() {}
1723
virtual ~cM2dGCir() {}
1824
};

include/SSystem/SComponent/c_m3d_g_tri.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ class cM3dGTri : public cM3dGPla {
3434
bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const {
3535
return cM3d_Cross_LinTri(lin, this, xyz, param_2, param_3);
3636
}
37+
38+
void setUp() {
39+
SetupFrom3Vtx(&mA, &mB, &mC);
40+
}
3741
};
3842

39-
#endif
43+
#endif

0 commit comments

Comments
 (0)