Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19840, 17300, 2C1C0 #135

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 65 additions & 14 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,33 @@ typedef struct unk_D_86002F58_004_000_00C {
/* 0x28 */ unk_D_86002F58_004_000_00C_028_func unk_28;
} unk_D_86002F58_004_000_00C; // size >= 0x2C

typedef union unk_D_86002F58_004_000_010_02C {
struct {
u16 unk_00;
u16 unk_02;
};
u32 raw;
} unk_D_86002F58_004_000_010_02C; // size = 0x4

typedef struct unk_D_86002F58_004_000_010 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk_01[0x23];
/* 0x24 */ s32 unk_24;
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x04 */ s32 unk_04[1];
/* 0x08 */ char pad8[0x10];
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ u16* unk_24;
/* 0x28 */ s32 unk_28;
} unk_D_86002F58_004_000_010; // size >= 0x2C
/* 0x2C */ unk_D_86002F58_004_000_010_02C unk_2C;
/* 0x30 */ OSMesgQueue unk_30;
/* 0x48 */ OSMesg unk_48;
/* 0x4C */ char pad4C[0x4];
/* 0x50 */ OSMesgQueue unk_50;
/* 0x68 */ OSMesg unk_68;
/* 0x6C */ char pad6C[0x4];
} unk_D_86002F58_004_000_010; // size = 0x70

typedef struct unk_D_86002F58_004_000_004 {
/* 0x00 */ struct unk_D_86002F58_004_000_004* unk_00[4];
Expand All @@ -54,30 +75,38 @@ typedef struct unk_D_86002F58_004_000_000 {
/* 0x04 */ struct unk_D_86002F58_004_000_000* unk_04;
/* 0x08 */ struct unk_D_86002F58_004_000_000* unk_08;
/* 0x0C */ unk_D_86002F58_004_000_00C* unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x10 */ unk_D_86002F58_004_000_010* unk_10;
/* 0x14 */ s32 unk_14;
} unk_D_86002F58_004_000_000; // size = 0x18

typedef struct unk_D_86002F58_004_000_040_004 {
/* 0x00 */ char unk00[0x4];
/* 0x00 */ s16 unk_00;
/* 0x02 */ char unk02[0x2];
/* 0x04 */ s16 unk_04;
/* 0x06 */ char unk06[0x4];
/* 0x06 */ s16 unk_06;
/* 0x08 */ u16 unk_08;
/* 0x0A */ u16 unk_0A;
} unk_D_86002F58_004_000_040_004; // size >= 0xC
/* 0x0C */ u32 unk_0C;
/* 0x10 */ u32 unk_10;
/* 0x14 */ u32 unk_14;
/* 0x18 */ u32 unk_18;
} unk_D_86002F58_004_000_040_004; // size >= 0x1C

typedef struct unk_D_86002F58_004_000_040 {
/* 0x00 */ s16 unk_00;
/* 0x04 */ unk_D_86002F58_004_000_040_004* unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ u32 unk_0C;
} unk_D_86002F58_004_000_040; // size >= 0x10
/* 0x10 */ char unk10[0x2];
/* 0x12 */ u16 unk_12;
} unk_D_86002F58_004_000_040; // size >= 0x14

typedef struct unk_D_86002F58_004_000_054_004 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s16 unk_04;
/* 0x06 */ char unk_06[0x4];
/* 0x0A */ u16 unk_0A;
} unk_D_86002F58_004_000_054_004; // size >= 0xC
} unk_D_86002F58_004_000_054_004; // size >= 0x0C

typedef struct unk_D_86002F58_004_000_054 {
/* 0x00 */ s16 unk_00;
Expand All @@ -102,8 +131,6 @@ typedef struct unk_D_86002F58_004_000 {
/* 0x030 */ Vec3f unk_030;
/* 0x03C */ Color_RGBA8_u32 unk_03C;
/* 0x040 */ unk_D_86002F58_004_000_040 unk_040;
/* 0x050 */ char pad050[2];
/* 0x052 */ s16 unk_052;
/* 0x054 */ unk_D_86002F58_004_000_054 unk_054;
/* 0x060 */ MtxF unk_060;
/* 0x0A0 */ Color_RGBA8_u32 unk_0A0;
Expand All @@ -123,7 +150,8 @@ typedef struct unk_D_86002F34_000 {
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ char pad04[0x4];
/* 0x04 */ char pad04[0x2];
/* 0x06 */ s16 unk_06;
/* 0x08 */ struct unk_D_86002F34_000* unk_08;
/* 0x0C */ struct unk_D_86002F34_000* unk_0C;
/* 0x10 */ s32 (*unk_10)(s32, struct unk_D_86002F34_000*);
Expand Down Expand Up @@ -290,10 +318,33 @@ typedef struct unk_D_86002F34_alt12 {
/* 0x1E */ s16 unk_1E;
} unk_D_86002F34_alt12; // size >= 0x20

typedef void* (*func_unk_D_800ABE10)(s32, s32);

typedef struct unk_D_86002F34_018 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ char pad04[0x2];
/* 0x06 */ s16 unk_06;
/* 0x08 */ s32* unk_08;
} unk_D_86002F34_018; // size = 0xC

typedef struct unk_D_86002F34_01C {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s16* unk_04;
/* 0x08 */ char unk08[0x4];
} unk_D_86002F34_01C; // size = 0xC

typedef struct unk_D_86002F34 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x18 */ unk_D_86002F34_000* unk_18;
} unk_D_86002F34; // size >= 0x1C
/* 0x18 */ unk_D_86002F34_018* unk_18;
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
/* 0x20 */ char unk20[0x4];
/* 0x24 */ u8 unk_24;
/* 0x25 */ u8 unk_25;
/* 0x28 */ func_unk_D_800ABE10 unk_28;
} unk_D_86002F34; // size >= 0x2C

// Are unk_D_86002F30 and unk_D_800AC840 the same?
typedef struct unk_D_86002F30 {
Expand Down
1 change: 1 addition & 0 deletions include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))

#define SQ(x) ((x) * (x))
#define CB(x) ((x) * (x) * (x))

// cast thru uintptr_t for integer to pointer casts
#define INT2VOID(i) ((void *)(uintptr_t)(i))
Expand Down
13 changes: 0 additions & 13 deletions include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,4 @@ typedef union Vec2s_s32 {
s32 xy;
} Vec2s_s32; // size = 0x6

typedef union AllTypeS32 {
struct {
s16 rg;
s16 ba;
};
struct {
s8 r;
s8 g;
s8 b;
s8 a;
};
} AllTypeS32;

#endif
4 changes: 3 additions & 1 deletion linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ D_87B000F2 = 0x87B000F2;
D_87B000F4 = 0x87B000F4;
D_86402848 = 0x86402848;
gCurrentGameState = 0x80075668; // size:0x4
D_800AE540 = 0x800AE540; // size:0x1200
D_800AE540 = 0x800AE540; // size:0x11F8
D_800AF738 = 0x800AF738;
D_80068080 = 0x80068080;
D_8007ED20 = 0x8007ED20;
D_800A60C0 = 0x800A60C0;
Expand Down Expand Up @@ -294,3 +295,4 @@ D_8006F010 = 0x8006F010; // size:0x40
D_8006F050 = 0x8006F050; // size:0xC
D_8006F05C = 0x8006F05C; // size:0x6
D_8006F064 = 0x8006F064; // size:0xC
D_800ABE10 = 0x800ABE10; // size:0xA18
16 changes: 14 additions & 2 deletions src/11BA0.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_00
arg1->unk_040.unk_04 = NULL;
arg1->unk_040.unk_08 = 0;
arg1->unk_040.unk_0C = 0x10000;
arg1->unk_052 = 0;
arg1->unk_040.unk_12 = 0;
arg1->unk_054.unk_00 = 0;
arg1->unk_054.unk_04 = NULL;
arg1->unk_054.unk_08 = 0;
Expand All @@ -106,7 +106,19 @@ unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_00

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80011B10.s")

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80011B94.s")
unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s32 arg2, Gfx* arg3) {
if (arg0 != NULL) {
arg1 = func_80002DCC(arg0, sizeof(unk_func_80011B94), 4);
}

if (arg1 != NULL) {
arg1->unk_18 = arg3;
func_80010FA0(arg1, 0x19);
arg1->unk_00.unk_03 = arg2;
}

return arg1;
}

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80011BF4.s")

Expand Down
2 changes: 1 addition & 1 deletion src/11BA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef struct unk_D_86404778_190 {

unk_D_86002F58_004_000_000* func_8001103C(MainPoolState*, void*);
unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_000* arg1, s16 arg2, Vec3f* arg3, Vec3s* arg4, Vec3f* arg5);
unk_func_80011B94* func_80011B94(MainPoolState*, void*, s32, Gfx*);
unk_func_80011B94* func_80011B94(MainPoolState*, unk_func_80011B94*, s32, Gfx*);
unk_D_86404778_190* func_80011B10(MainPoolState*, s32, s32, s32, Vec3f*, f32);
void func_80012094(unk_D_86002F58_004_000_000*, unk_D_86002F58_004_000_000*);

Expand Down
Loading
Loading