Skip to content

Commit

Permalink
fragment17
Browse files Browse the repository at this point in the history
  • Loading branch information
Maide authored and RevoSucks committed Oct 16, 2024
1 parent e77b96f commit 5b8c9f9
Show file tree
Hide file tree
Showing 49 changed files with 5,654 additions and 497 deletions.
59 changes: 30 additions & 29 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ typedef struct unk_D_86002F34_000_014 {
/* 0x04 */ u8* unk_04;
} unk_D_86002F34_000_014; // size >= 0x8

struct GraphNode;
typedef s32 (*func_D_86002F34_000_010)(s32, struct GraphNode*);

typedef struct GraphNode {
Expand Down Expand Up @@ -237,7 +238,7 @@ typedef struct unk_D_86002F34_00C_0CC {
} unk_D_86002F34_00C_0CC; // size >= 0x20

typedef struct unk_D_86002F34_00C {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_00C_018 unk_18;
/* 0x24 */ unk_D_86002F34_00C_024 unk_24;
/* 0x40 */ unk_D_86002F34_00C_040 unk_40;
Expand All @@ -247,7 +248,7 @@ typedef struct unk_D_86002F34_00C {
} unk_D_86002F34_00C; // size = 0xF0

typedef struct unk_D_86002F34_alt1 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ u16 unk_1A;
/* 0x1C */ s8 unk_1C;
Expand All @@ -257,32 +258,32 @@ typedef struct unk_D_86002F34_alt1 {
} unk_D_86002F34_alt1; // size >= 0x28

typedef struct unk_D_86002F34_alt2 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ struct GraphNode* unk_18;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ GraphNode* unk_18;
} unk_D_86002F34_alt2; // size >= 0x1C

typedef struct unk_D_86002F34_alt3 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s32 unk_1C;
} unk_D_86002F34_alt3; // size >= 0x20

typedef struct unk_D_86002F34_alt4 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Color_RGBA8_u32 unk_18;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u16 unk_1E;
} unk_D_86002F34_alt4; // size >= 0x20

typedef struct unk_D_86002F34_alt5 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ Vec3s unk_24;
} unk_D_86002F34_alt5; // size = 0x2C

typedef struct unk_D_86002F34_alt6 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Vec3s unk_18;
/* 0x1E */ Vec3s unk_1E;
/* 0x24 */ Vec3f unk_24;
Expand All @@ -292,27 +293,27 @@ typedef struct unk_D_86002F34_alt6 {
} unk_D_86002F34_alt6; // size = 0x34

typedef struct unk_D_86002F34_alt7 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ s16 unk_1C;
} unk_D_86002F34_alt7; // size = 0x20

typedef struct unk_D_86002F34_alt8 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ MtxF unk_1C;
} unk_D_86002F34_alt8; // size = 0x5C

typedef struct unk_D_86002F34_alt9 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ f32 unk_28;
} unk_D_86002F34_alt9; // size = 0x2C

typedef struct unk_D_86002F34_alt10 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s32 unk_18;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ s16 unk_1C;
/* 0x1E */ s16 unk_1E;
/* 0x20 */ s16 unk_20;
Expand All @@ -329,43 +330,43 @@ typedef struct unk_D_86002F34_alt11_018 {
} unk_D_86002F34_alt11_018; // size >= 0xC

typedef struct unk_D_86002F34_alt11 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_alt11_018* unk_18;
/* 0x1C */ unk_D_86002F34_alt11_018* unk_1C;
} unk_D_86002F34_alt11; // size >= 0x20

typedef struct unk_D_86002F34_alt12 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s16 unk_1C;
/* 0x1E */ s16 unk_1E;
} unk_D_86002F34_alt12; // size = 0x20

typedef struct unk_D_86002F34_alt13 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
} unk_D_86002F34_alt13; // size = 0x1C

typedef struct unk_D_86002F34_alt14 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
} unk_D_86002F34_alt14; // size = 0x18

typedef struct unk_D_86002F34_alt15 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
} unk_D_86002F34_alt15; // size = 0x18

typedef struct unk_D_86002F34_alt16 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ u32 unk_18;
} unk_D_86002F34_alt16; // size = 0x1C

typedef struct unk_D_86002F34_alt17 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
} unk_D_86002F34_alt17; // size = 0x18

typedef struct unk_D_86002F34_alt18 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ u8 r;
/* 0x19 */ u8 g;
/* 0x1A */ u8 b;
Expand All @@ -375,36 +376,36 @@ typedef struct unk_D_86002F34_alt18 {
} unk_D_86002F34_alt18; // size = 0x20

typedef struct unk_D_86002F34_alt19 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ u8 r;
/* 0x19 */ u8 g;
/* 0x1A */ u8 b;
} unk_D_86002F34_alt19; // size = 0x1C

typedef struct unk_D_86002F34_alt20 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
} unk_D_86002F34_alt20; // size = 0x1C

typedef struct unk_D_86002F34_alt21 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
} unk_D_86002F34_alt21; // size = 0x1C

typedef struct unk_D_86002F34_alt22 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ Vec3f unk_18;
} unk_D_86002F34_alt22; // size = 0x24

typedef struct unk_D_86002F34_alt23 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
} unk_D_86002F34_alt23; // size = 0x1C

typedef struct unk_D_86002F34_alt24 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s16 unk_1C;
Expand All @@ -422,7 +423,7 @@ typedef struct unk_D_86002F34_018 {
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ char pad04[0x2];
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ s32* unk_08;
} unk_D_86002F34_018; // size = 0xC
Expand All @@ -434,7 +435,7 @@ typedef struct unk_D_86002F34_01C {
} unk_D_86002F34_01C; // size = 0xC

typedef struct unk_D_86002F34 {
/* 0x00 */ struct GraphNode unk_00;
/* 0x00 */ GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_018* unk_18;
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
/* 0x20 */ Vtx* unk_20;
Expand Down
1 change: 1 addition & 0 deletions include/sections.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ extern u8 _70D3A0_ROM_START[];
extern u8 _70D3A0_ROM_END[];
extern u8 D_70110[];
extern u8 D_70290[];
extern u8 D_70B10[];

extern u8 D_124570[];

Expand Down
9 changes: 8 additions & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,14 @@ extern u8* D_800FF9C0;
extern s32 D_80075BCC[];

typedef struct unk_70D3A0 {
/* 0x00 */ char unk00[0x10];
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
} unk_70D3A0; // size = 0x10

typedef struct unk_D_70B10 {
/* 0x00 */ char unk00[0x20];
} unk_D_70B10; // size = 0x20

#endif
7 changes: 7 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,10 @@ D_8690B5D0 = 0x8690B5D0; // size:0x24
D_86A06228 = 0x86A06228; // size:0xC
D_86A06238 = 0x86A06238; // size:0xC
D_86A06248 = 0x86A06248; // size:0xC
D_30074E0 = 0x30074E0;
D_30092E0 = 0x30092E0;
D_300B6E0 = 0x300B6E0;
D_300B980 = 0x300B980;
D_300BAD0 = 0x300BAD0;
D_300BED0 = 0x300BED0;
D_300C2D0 = 0x300C2D0;
7 changes: 7 additions & 0 deletions linker_scripts/us/undefined_syms.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
D_30074E0 = 0x30074E0;
D_30092E0 = 0x30092E0;
D_300B6E0 = 0x300B6E0;
D_300B980 = 0x300B980;
D_300BAD0 = 0x300BAD0;
D_300BED0 = 0x300BED0;
D_300C2D0 = 0x300C2D0;
2 changes: 1 addition & 1 deletion src/11BA0.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s
return arg1;
}

unk_D_86002F34_alt10* func_80011BF4(MainPoolState* arg0, unk_D_86002F34_alt10* arg1, s16 arg2, s16 arg3, s32 arg4,
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) {
if (arg0 != NULL) {
arg1 = func_80002DCC(arg0, sizeof(unk_D_86002F34_alt10), 4);
Expand Down
2 changes: 1 addition & 1 deletion src/11BA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ unk_D_86002F34_alt8* func_80011A3C(MainPoolState* arg0, unk_D_86002F34_alt8* arg
unk_D_86002F34_alt8* func_80011ABC(MainPoolState* arg0, unk_D_86002F34_alt8* arg1, s32 arg2, Gfx* arg3, Vec3f* arg4, Vec3s* arg5);
unk_D_86002F34_alt9* func_80011B10(MainPoolState* arg0, unk_D_86002F34_alt9* arg1, s32 arg2, Gfx* arg3, Vec3f* arg4, f32 arg5);
unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s32 arg2, Gfx* arg3);
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);
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);
unk_D_86002F34_alt23* func_80011C98(MainPoolState* arg0, unk_D_86002F34_alt23* arg1, s16 arg2);
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,
u8 r, u8 g, u8 b, u8 a);
Expand Down
4 changes: 2 additions & 2 deletions src/19840.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@ unk_D_86002F30* func_80019D18(s32 arg0) {
return sp24;
}

s32 func_80019D90(unk_func_8001BEE8* arg0) {
unk_D_86002F30* func_80019D90(unk_func_80026268_arg0* arg0) {
Fragment* sp2C;
arg1_func_80010CA8 sp28;
s32 sp24 = 0;
unk_D_86002F30* sp24 = NULL;
MemoryBlock* sp20;

sp2C = func_8000484C(D_800ABE10.unk_A04.unk_00, arg0->unk_00 - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/19840.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ s32 func_80019C58(unk_D_86002F58_004_000_010* arg0);
s32 func_80019CA8(unk_D_86002F58_004_000_010* arg0);
s32 func_80019CE0(unk_D_86002F58_004_000_010* arg0);
unk_D_86002F30* func_80019D18(s32 arg0);
s32 func_80019D90(unk_func_8001BEE8* arg0);
unk_D_86002F30* func_80019D90(unk_func_80026268_arg0* arg0);
s32 func_80019E18(s32 arg0, s32 arg1);
arg1_func_80019420* func_80019EA0(s32 arg0);
Fragment* func_80019F0C(MainPoolState* arg0, u32 arg1, s32 arg2, s32 arg3, PERSSZP* arg4, s32 arg5);
Expand Down
22 changes: 11 additions & 11 deletions src/1C720.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ unk_D_86002F58_004_000_00C_028* func_8001BE90(unk_D_86002F58_004_000* arg0, s32
return var_v1;
}

#ifdef NON_MATCHING
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_8001BEE8* arg1) {
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_80026268_arg0* arg1) {
UNUSED s32 pad;
char sp38[0xB];
unk_D_86002F58_004_000_010_02C sp34;
unk_D_8006FF00* sp30;
UNUSED unk_func_8001BEE8* sp20;
UNUSED s32 i;
UNUSED s32 pad2;
u8 var_a0;
s8* var_v1;

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

if (HAL_Strcmp(arg1->unk_30, sp38) != 0) {
var_a0 = (arg1->unk_0E >> 8) + arg1->unk_0E;
var_a0 = ((arg1->unk_0E >> 8) & 0xFF) + (arg1->unk_0E & 0xFF);

if (1) {}

var_v1 = arg1->unk_30;
while (*var_v1) {
var_a0 += *var_v1++;
var_a0 += *var_v1++ & 0xFF;
var_a0 += 0;
}

var_v1 = arg1->unk_3B;
while (*var_v1) {
var_a0 += *var_v1++;
var_a0 += *var_v1++ & 0xFF;
var_a0 += 0;
}

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

void func_8001C014(s32* arg0, unk_func_8001C014* arg1, u16 arg2) {
unk_func_8001BEE8 stack;
unk_func_80026268_arg0 stack;

stack.unk_00 = arg2;
stack.unk_0E = arg1->unk_02;
Expand Down
16 changes: 3 additions & 13 deletions src/1C720.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _1C720_H_

#include "global.h"
#include "src/29BA0.h"

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

typedef struct unk_func_8001BEE8 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk01[0xD];
/* 0x0E */ u16 unk_0E;
/* 0x10 */ char unk10[0x20];
/* 0x30 */ char unk_30[0xB];
/* 0x3B */ char unk_3B[0xB];
/* 0x48 */ char unk46[0xC];
/* 0x52 */ u8 unk_52;
} unk_func_8001BEE8; // size >= 0x54

typedef struct unk_func_8001C07C_arg0 {
/* 0x00 */ u8 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ unk_func_8001BEE8* unk_04;
/* 0x04 */ unk_func_80026268_arg0* unk_04;
/* 0x08 */ char unk_08[0x8];
/* 0x10 */ unk_D_86002F58_004_000_010* unk_10;
/* 0x14 */ s32 unk_14;
Expand Down Expand Up @@ -52,7 +42,7 @@ void func_8001BE34(unk_D_86002F58_004_000* arg0, u8 arg1, u8 arg2, u8 arg3, u8 a
void func_8001BE78(unk_D_86002F58_004_000* arg0, u8 arg1);
void func_8001BE84(unk_D_86002F58_004_000* arg0, u8 arg1);
unk_D_86002F58_004_000_00C_028* func_8001BE90(unk_D_86002F58_004_000* arg0, s32 arg1);
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_8001BEE8* arg1);
unk_D_86002F58_004_000_010_02C* func_8001BEE8(unk_D_86002F58_004_000_010_02C* arg0, unk_func_80026268_arg0* arg1);
void func_8001C014(s32* arg0, unk_func_8001C014* arg1, u16 arg2);
void func_8001C07C(unk_func_8001C07C_arg0* arg0);
void func_8001C198(unk_func_8001C248* arg0);
Expand Down
2 changes: 1 addition & 1 deletion src/20470.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void func_80021270(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
}

void func_80021920(void) {
s32 temp_s2 = func_8002D5AC(0x24);
char** temp_s2 = func_8002D5AC(0x24);
s32 i;

for (i = 0; i < 151; i++) {
Expand Down
Loading

0 comments on commit 5b8c9f9

Please sign in to comment.