Skip to content

Commit 0bc12ff

Browse files
Kelebek1RevoSucks
authored andcommitted
fragment17
1 parent 184653b commit 0bc12ff

Some content is hidden

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

49 files changed

+5654
-497
lines changed

include/global.h

+30-29
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ typedef struct unk_D_86002F34_000_014 {
167167
/* 0x04 */ u8* unk_04;
168168
} unk_D_86002F34_000_014; // size >= 0x8
169169

170+
struct GraphNode;
170171
typedef s32 (*func_D_86002F34_000_010)(s32, struct GraphNode*);
171172

172173
typedef struct GraphNode {
@@ -237,7 +238,7 @@ typedef struct unk_D_86002F34_00C_0CC {
237238
} unk_D_86002F34_00C_0CC; // size >= 0x20
238239

239240
typedef struct unk_D_86002F34_00C {
240-
/* 0x00 */ struct GraphNode unk_00;
241+
/* 0x00 */ GraphNode unk_00;
241242
/* 0x18 */ unk_D_86002F34_00C_018 unk_18;
242243
/* 0x24 */ unk_D_86002F34_00C_024 unk_24;
243244
/* 0x40 */ unk_D_86002F34_00C_040 unk_40;
@@ -247,7 +248,7 @@ typedef struct unk_D_86002F34_00C {
247248
} unk_D_86002F34_00C; // size = 0xF0
248249

249250
typedef struct unk_D_86002F34_alt1 {
250-
/* 0x00 */ struct GraphNode unk_00;
251+
/* 0x00 */ GraphNode unk_00;
251252
/* 0x18 */ s16 unk_18;
252253
/* 0x1A */ u16 unk_1A;
253254
/* 0x1C */ s8 unk_1C;
@@ -257,32 +258,32 @@ typedef struct unk_D_86002F34_alt1 {
257258
} unk_D_86002F34_alt1; // size >= 0x28
258259

259260
typedef struct unk_D_86002F34_alt2 {
260-
/* 0x00 */ struct GraphNode unk_00;
261-
/* 0x18 */ struct GraphNode* unk_18;
261+
/* 0x00 */ GraphNode unk_00;
262+
/* 0x18 */ GraphNode* unk_18;
262263
} unk_D_86002F34_alt2; // size >= 0x1C
263264

264265
typedef struct unk_D_86002F34_alt3 {
265-
/* 0x00 */ struct GraphNode unk_00;
266+
/* 0x00 */ GraphNode unk_00;
266267
/* 0x18 */ s16 unk_18;
267268
/* 0x1A */ s16 unk_1A;
268269
/* 0x1C */ s32 unk_1C;
269270
} unk_D_86002F34_alt3; // size >= 0x20
270271

271272
typedef struct unk_D_86002F34_alt4 {
272-
/* 0x00 */ struct GraphNode unk_00;
273+
/* 0x00 */ GraphNode unk_00;
273274
/* 0x18 */ Color_RGBA8_u32 unk_18;
274275
/* 0x1C */ u16 unk_1C;
275276
/* 0x1E */ u16 unk_1E;
276277
} unk_D_86002F34_alt4; // size >= 0x20
277278

278279
typedef struct unk_D_86002F34_alt5 {
279-
/* 0x00 */ struct GraphNode unk_00;
280+
/* 0x00 */ GraphNode unk_00;
280281
/* 0x18 */ Vec3f unk_18;
281282
/* 0x24 */ Vec3s unk_24;
282283
} unk_D_86002F34_alt5; // size = 0x2C
283284

284285
typedef struct unk_D_86002F34_alt6 {
285-
/* 0x00 */ struct GraphNode unk_00;
286+
/* 0x00 */ GraphNode unk_00;
286287
/* 0x18 */ Vec3s unk_18;
287288
/* 0x1E */ Vec3s unk_1E;
288289
/* 0x24 */ Vec3f unk_24;
@@ -292,27 +293,27 @@ typedef struct unk_D_86002F34_alt6 {
292293
} unk_D_86002F34_alt6; // size = 0x34
293294

294295
typedef struct unk_D_86002F34_alt7 {
295-
/* 0x00 */ struct GraphNode unk_00;
296+
/* 0x00 */ GraphNode unk_00;
296297
/* 0x18 */ Gfx* unk_18;
297298
/* 0x1C */ s16 unk_1C;
298299
} unk_D_86002F34_alt7; // size = 0x20
299300

300301
typedef struct unk_D_86002F34_alt8 {
301-
/* 0x00 */ struct GraphNode unk_00;
302+
/* 0x00 */ GraphNode unk_00;
302303
/* 0x18 */ Gfx* unk_18;
303304
/* 0x1C */ MtxF unk_1C;
304305
} unk_D_86002F34_alt8; // size = 0x5C
305306

306307
typedef struct unk_D_86002F34_alt9 {
307-
/* 0x00 */ struct GraphNode unk_00;
308+
/* 0x00 */ GraphNode unk_00;
308309
/* 0x18 */ Gfx* unk_18;
309310
/* 0x1C */ Vec3f unk_1C;
310311
/* 0x28 */ f32 unk_28;
311312
} unk_D_86002F34_alt9; // size = 0x2C
312313

313314
typedef struct unk_D_86002F34_alt10 {
314-
/* 0x00 */ struct GraphNode unk_00;
315-
/* 0x18 */ s32 unk_18;
315+
/* 0x00 */ GraphNode unk_00;
316+
/* 0x18 */ Gfx* unk_18;
316317
/* 0x1C */ s16 unk_1C;
317318
/* 0x1E */ s16 unk_1E;
318319
/* 0x20 */ s16 unk_20;
@@ -329,43 +330,43 @@ typedef struct unk_D_86002F34_alt11_018 {
329330
} unk_D_86002F34_alt11_018; // size >= 0xC
330331

331332
typedef struct unk_D_86002F34_alt11 {
332-
/* 0x00 */ struct GraphNode unk_00;
333+
/* 0x00 */ GraphNode unk_00;
333334
/* 0x18 */ unk_D_86002F34_alt11_018* unk_18;
334335
/* 0x1C */ unk_D_86002F34_alt11_018* unk_1C;
335336
} unk_D_86002F34_alt11; // size >= 0x20
336337

337338
typedef struct unk_D_86002F34_alt12 {
338-
/* 0x00 */ struct GraphNode unk_00;
339+
/* 0x00 */ GraphNode unk_00;
339340
/* 0x18 */ s16 unk_18;
340341
/* 0x1A */ s16 unk_1A;
341342
/* 0x1C */ s16 unk_1C;
342343
/* 0x1E */ s16 unk_1E;
343344
} unk_D_86002F34_alt12; // size = 0x20
344345

345346
typedef struct unk_D_86002F34_alt13 {
346-
/* 0x00 */ struct GraphNode unk_00;
347+
/* 0x00 */ GraphNode unk_00;
347348
/* 0x18 */ s16 unk_18;
348349
} unk_D_86002F34_alt13; // size = 0x1C
349350

350351
typedef struct unk_D_86002F34_alt14 {
351-
/* 0x00 */ struct GraphNode unk_00;
352+
/* 0x00 */ GraphNode unk_00;
352353
} unk_D_86002F34_alt14; // size = 0x18
353354

354355
typedef struct unk_D_86002F34_alt15 {
355-
/* 0x00 */ struct GraphNode unk_00;
356+
/* 0x00 */ GraphNode unk_00;
356357
} unk_D_86002F34_alt15; // size = 0x18
357358

358359
typedef struct unk_D_86002F34_alt16 {
359-
/* 0x00 */ struct GraphNode unk_00;
360+
/* 0x00 */ GraphNode unk_00;
360361
/* 0x18 */ u32 unk_18;
361362
} unk_D_86002F34_alt16; // size = 0x1C
362363

363364
typedef struct unk_D_86002F34_alt17 {
364-
/* 0x00 */ struct GraphNode unk_00;
365+
/* 0x00 */ GraphNode unk_00;
365366
} unk_D_86002F34_alt17; // size = 0x18
366367

367368
typedef struct unk_D_86002F34_alt18 {
368-
/* 0x00 */ struct GraphNode unk_00;
369+
/* 0x00 */ GraphNode unk_00;
369370
/* 0x18 */ u8 r;
370371
/* 0x19 */ u8 g;
371372
/* 0x1A */ u8 b;
@@ -375,36 +376,36 @@ typedef struct unk_D_86002F34_alt18 {
375376
} unk_D_86002F34_alt18; // size = 0x20
376377

377378
typedef struct unk_D_86002F34_alt19 {
378-
/* 0x00 */ struct GraphNode unk_00;
379+
/* 0x00 */ GraphNode unk_00;
379380
/* 0x18 */ u8 r;
380381
/* 0x19 */ u8 g;
381382
/* 0x1A */ u8 b;
382383
} unk_D_86002F34_alt19; // size = 0x1C
383384

384385
typedef struct unk_D_86002F34_alt20 {
385-
/* 0x00 */ struct GraphNode unk_00;
386+
/* 0x00 */ GraphNode unk_00;
386387
/* 0x18 */ s16 unk_18;
387388
/* 0x1A */ s16 unk_1A;
388389
} unk_D_86002F34_alt20; // size = 0x1C
389390

390391
typedef struct unk_D_86002F34_alt21 {
391-
/* 0x00 */ struct GraphNode unk_00;
392+
/* 0x00 */ GraphNode unk_00;
392393
/* 0x18 */ s16 unk_18;
393394
/* 0x1A */ s16 unk_1A;
394395
} unk_D_86002F34_alt21; // size = 0x1C
395396

396397
typedef struct unk_D_86002F34_alt22 {
397-
/* 0x00 */ struct GraphNode unk_00;
398+
/* 0x00 */ GraphNode unk_00;
398399
/* 0x18 */ Vec3f unk_18;
399400
} unk_D_86002F34_alt22; // size = 0x24
400401

401402
typedef struct unk_D_86002F34_alt23 {
402-
/* 0x00 */ struct GraphNode unk_00;
403+
/* 0x00 */ GraphNode unk_00;
403404
/* 0x18 */ s16 unk_18;
404405
} unk_D_86002F34_alt23; // size = 0x1C
405406

406407
typedef struct unk_D_86002F34_alt24 {
407-
/* 0x00 */ struct GraphNode unk_00;
408+
/* 0x00 */ GraphNode unk_00;
408409
/* 0x18 */ s16 unk_18;
409410
/* 0x1A */ s16 unk_1A;
410411
/* 0x1C */ s16 unk_1C;
@@ -422,7 +423,7 @@ typedef struct unk_D_86002F34_018 {
422423
/* 0x01 */ u8 unk_01;
423424
/* 0x02 */ u8 unk_02;
424425
/* 0x03 */ u8 unk_03;
425-
/* 0x04 */ char pad04[0x2];
426+
/* 0x04 */ s16 unk_04;
426427
/* 0x06 */ s16 unk_06;
427428
/* 0x08 */ s32* unk_08;
428429
} unk_D_86002F34_018; // size = 0xC
@@ -434,7 +435,7 @@ typedef struct unk_D_86002F34_01C {
434435
} unk_D_86002F34_01C; // size = 0xC
435436

436437
typedef struct unk_D_86002F34 {
437-
/* 0x00 */ struct GraphNode unk_00;
438+
/* 0x00 */ GraphNode unk_00;
438439
/* 0x18 */ unk_D_86002F34_018* unk_18;
439440
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
440441
/* 0x20 */ Vtx* unk_20;

include/sections.h

+1
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ extern u8 _70D3A0_ROM_START[];
524524
extern u8 _70D3A0_ROM_END[];
525525
extern u8 D_70110[];
526526
extern u8 D_70290[];
527+
extern u8 D_70B10[];
527528

528529
extern u8 D_124570[];
529530

include/variables.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,14 @@ extern u8* D_800FF9C0;
202202
extern s32 D_80075BCC[];
203203

204204
typedef struct unk_70D3A0 {
205-
/* 0x00 */ char unk00[0x10];
205+
/* 0x00 */ f32 unk_00;
206+
/* 0x04 */ f32 unk_04;
207+
/* 0x08 */ f32 unk_08;
208+
/* 0x0C */ f32 unk_0C;
206209
} unk_70D3A0; // size = 0x10
207210

211+
typedef struct unk_D_70B10 {
212+
/* 0x00 */ char unk00[0x20];
213+
} unk_D_70B10; // size = 0x20
214+
208215
#endif

linker_scripts/us/symbol_addrs.txt

+7
Original file line numberDiff line numberDiff line change
@@ -353,3 +353,10 @@ D_8690B5D0 = 0x8690B5D0; // size:0x24
353353
D_86A06228 = 0x86A06228; // size:0xC
354354
D_86A06238 = 0x86A06238; // size:0xC
355355
D_86A06248 = 0x86A06248; // size:0xC
356+
D_30074E0 = 0x30074E0;
357+
D_30092E0 = 0x30092E0;
358+
D_300B6E0 = 0x300B6E0;
359+
D_300B980 = 0x300B980;
360+
D_300BAD0 = 0x300BAD0;
361+
D_300BED0 = 0x300BED0;
362+
D_300C2D0 = 0x300C2D0;

linker_scripts/us/undefined_syms.ld

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
D_30074E0 = 0x30074E0;
2+
D_30092E0 = 0x30092E0;
3+
D_300B6E0 = 0x300B6E0;
4+
D_300B980 = 0x300B980;
5+
D_300BAD0 = 0x300BAD0;
6+
D_300BED0 = 0x300BED0;
7+
D_300C2D0 = 0x300C2D0;

src/11BA0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s
417417
return arg1;
418418
}
419419

420-
unk_D_86002F34_alt10* func_80011BF4(MainPoolState* arg0, unk_D_86002F34_alt10* arg1, s16 arg2, s16 arg3, s32 arg4,
420+
unk_D_86002F34_alt10* func_80011BF4(MainPoolState* arg0, unk_D_86002F34_alt10* arg1, s16 arg2, s16 arg3, Gfx* arg4,
421421
s16 arg5, s16 arg6, u8 r, u8 g, u8 b, u8 a) {
422422
if (arg0 != NULL) {
423423
arg1 = func_80002DCC(arg0, sizeof(unk_D_86002F34_alt10), 4);

src/11BA0.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ unk_D_86002F34_alt8* func_80011A3C(MainPoolState* arg0, unk_D_86002F34_alt8* arg
5050
unk_D_86002F34_alt8* func_80011ABC(MainPoolState* arg0, unk_D_86002F34_alt8* arg1, s32 arg2, Gfx* arg3, Vec3f* arg4, Vec3s* arg5);
5151
unk_D_86002F34_alt9* func_80011B10(MainPoolState* arg0, unk_D_86002F34_alt9* arg1, s32 arg2, Gfx* arg3, Vec3f* arg4, f32 arg5);
5252
unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s32 arg2, Gfx* arg3);
53-
unk_D_86002F34_alt10* func_80011BF4(MainPoolState* arg0, unk_D_86002F34_alt10* arg1, s16 arg2, s16 arg3, s32 arg4, s16 arg5, s16 arg6, u8 r, u8 g, u8 b, u8 a);
53+
unk_D_86002F34_alt10* func_80011BF4(MainPoolState* arg0, unk_D_86002F34_alt10* arg1, s16 arg2, s16 arg3, Gfx* arg4, s16 arg5, s16 arg6, u8 r, u8 g, u8 b, u8 a);
5454
unk_D_86002F34_alt23* func_80011C98(MainPoolState* arg0, unk_D_86002F34_alt23* arg1, s16 arg2);
5555
unk_D_86002F34_alt24* func_80011CF0(MainPoolState* arg0, unk_D_86002F34_alt24* arg1, s32 arg2, s16 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s32 arg9,
5656
u8 r, u8 g, u8 b, u8 a);

src/19840.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ unk_D_86002F30* func_80019D18(s32 arg0) {
501501
return sp24;
502502
}
503503

504-
s32 func_80019D90(unk_func_8001BEE8* arg0) {
504+
unk_D_86002F30* func_80019D90(unk_func_80026268_arg0* arg0) {
505505
Fragment* sp2C;
506506
arg1_func_80010CA8 sp28;
507-
s32 sp24 = 0;
507+
unk_D_86002F30* sp24 = NULL;
508508
MemoryBlock* sp20;
509509

510510
sp2C = func_8000484C(D_800ABE10.unk_A04.unk_00, arg0->unk_00 - 1);

src/19840.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ s32 func_80019C58(unk_D_86002F58_004_000_010* arg0);
8181
s32 func_80019CA8(unk_D_86002F58_004_000_010* arg0);
8282
s32 func_80019CE0(unk_D_86002F58_004_000_010* arg0);
8383
unk_D_86002F30* func_80019D18(s32 arg0);
84-
s32 func_80019D90(unk_func_8001BEE8* arg0);
84+
unk_D_86002F30* func_80019D90(unk_func_80026268_arg0* arg0);
8585
s32 func_80019E18(s32 arg0, s32 arg1);
8686
arg1_func_80019420* func_80019EA0(s32 arg0);
8787
Fragment* func_80019F0C(MainPoolState* arg0, u32 arg1, s32 arg2, s32 arg3, PERSSZP* arg4, s32 arg5);

src/1C720.c

+11-11
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,12 @@ unk_D_86002F58_004_000_00C_028* func_8001BE90(unk_D_86002F58_004_000* arg0, s32
119119
return var_v1;
120120
}
121121

122-
#ifdef NON_MATCHING
123-
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_8001BEE8* arg1) {
122+
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_80026268_arg0* arg1) {
123+
UNUSED s32 pad;
124124
char sp38[0xB];
125125
unk_D_86002F58_004_000_010_02C sp34;
126126
unk_D_8006FF00* sp30;
127-
UNUSED unk_func_8001BEE8* sp20;
128-
UNUSED s32 i;
127+
UNUSED s32 pad2;
129128
u8 var_a0;
130129
s8* var_v1;
131130

@@ -135,16 +134,20 @@ unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* ar
135134
func_80021CA4(sp38, arg1->unk_00);
136135

137136
if (HAL_Strcmp(arg1->unk_30, sp38) != 0) {
138-
var_a0 = (arg1->unk_0E >> 8) + arg1->unk_0E;
137+
var_a0 = ((arg1->unk_0E >> 8) & 0xFF) + (arg1->unk_0E & 0xFF);
138+
139+
if (1) {}
139140

140141
var_v1 = arg1->unk_30;
141142
while (*var_v1) {
142-
var_a0 += *var_v1++;
143+
var_a0 += *var_v1++ & 0xFF;
144+
var_a0 += 0;
143145
}
144146

145147
var_v1 = arg1->unk_3B;
146148
while (*var_v1) {
147-
var_a0 += *var_v1++;
149+
var_a0 += *var_v1++ & 0xFF;
150+
var_a0 += 0;
148151
}
149152

150153
sp34.unk_00 = ((((sp30->unk_12 - sp30->unk_10) << 6) * var_a0) / 255) + (sp30->unk_10 << 6);
@@ -153,12 +156,9 @@ unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* ar
153156
*arg0 = sp34;
154157
return arg0;
155158
}
156-
#else
157-
#pragma GLOBAL_ASM("asm/us/nonmatchings/1C720/func_8001BEE8.s")
158-
#endif
159159

160160
void func_8001C014(s32* arg0, unk_func_8001C014* arg1, u16 arg2) {
161-
unk_func_8001BEE8 stack;
161+
unk_func_80026268_arg0 stack;
162162

163163
stack.unk_00 = arg2;
164164
stack.unk_0E = arg1->unk_02;

src/1C720.h

+3-13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define _1C720_H_
33

44
#include "global.h"
5+
#include "src/29BA0.h"
56

67
typedef struct unk_func_8001C014 {
78
/* 0x00 */ char unk_00[0x2];
@@ -10,21 +11,10 @@ typedef struct unk_func_8001C014 {
1011
/* 0x14 */ s8 unk_14[0x10];
1112
} unk_func_8001C014; // size >= 0x24
1213

13-
typedef struct unk_func_8001BEE8 {
14-
/* 0x00 */ u8 unk_00;
15-
/* 0x01 */ char unk01[0xD];
16-
/* 0x0E */ u16 unk_0E;
17-
/* 0x10 */ char unk10[0x20];
18-
/* 0x30 */ char unk_30[0xB];
19-
/* 0x3B */ char unk_3B[0xB];
20-
/* 0x48 */ char unk46[0xC];
21-
/* 0x52 */ u8 unk_52;
22-
} unk_func_8001BEE8; // size >= 0x54
23-
2414
typedef struct unk_func_8001C07C_arg0 {
2515
/* 0x00 */ u8 unk_00;
2616
/* 0x02 */ s16 unk_02;
27-
/* 0x04 */ unk_func_8001BEE8* unk_04;
17+
/* 0x04 */ unk_func_80026268_arg0* unk_04;
2818
/* 0x08 */ char unk_08[0x8];
2919
/* 0x10 */ unk_D_86002F58_004_000_010* unk_10;
3020
/* 0x14 */ s32 unk_14;
@@ -52,7 +42,7 @@ void func_8001BE34(unk_D_86002F58_004_000* arg0, u8 arg1, u8 arg2, u8 arg3, u8 a
5242
void func_8001BE78(unk_D_86002F58_004_000* arg0, u8 arg1);
5343
void func_8001BE84(unk_D_86002F58_004_000* arg0, u8 arg1);
5444
unk_D_86002F58_004_000_00C_028* func_8001BE90(unk_D_86002F58_004_000* arg0, s32 arg1);
55-
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_8001BEE8* arg1);
45+
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_80026268_arg0* arg1);
5646
void func_8001C014(s32* arg0, unk_func_8001C014* arg1, u16 arg2);
5747
void func_8001C07C(unk_func_8001C07C_arg0* arg0);
5848
void func_8001C198(unk_func_8001C248* arg0);

src/20470.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ void func_80021270(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
508508
}
509509

510510
void func_80021920(void) {
511-
s32 temp_s2 = func_8002D5AC(0x24);
511+
char** temp_s2 = func_8002D5AC(0x24);
512512
s32 i;
513513

514514
for (i = 0; i < 151; i++) {

0 commit comments

Comments
 (0)