Skip to content

Commit 9e0dd9b

Browse files
authored
Merge pull request #135 from Kelebek1/various
19840, 17300, 2C1C0
2 parents fa72903 + 6585efa commit 9e0dd9b

29 files changed

+2054
-259
lines changed

include/global.h

+65-14
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,33 @@ typedef struct unk_D_86002F58_004_000_00C {
3333
/* 0x28 */ unk_D_86002F58_004_000_00C_028_func unk_28;
3434
} unk_D_86002F58_004_000_00C; // size >= 0x2C
3535

36+
typedef union unk_D_86002F58_004_000_010_02C {
37+
struct {
38+
u16 unk_00;
39+
u16 unk_02;
40+
};
41+
u32 raw;
42+
} unk_D_86002F58_004_000_010_02C; // size = 0x4
43+
3644
typedef struct unk_D_86002F58_004_000_010 {
3745
/* 0x00 */ u8 unk_00;
38-
/* 0x01 */ char unk_01[0x23];
39-
/* 0x24 */ s32 unk_24;
46+
/* 0x01 */ u8 unk_01;
47+
/* 0x02 */ u8 unk_02;
48+
/* 0x04 */ s32 unk_04[1];
49+
/* 0x08 */ char pad8[0x10];
50+
/* 0x18 */ s32 unk_18;
51+
/* 0x1C */ s32 unk_1C;
52+
/* 0x20 */ s32 unk_20;
53+
/* 0x24 */ u16* unk_24;
4054
/* 0x28 */ s32 unk_28;
41-
} unk_D_86002F58_004_000_010; // size >= 0x2C
55+
/* 0x2C */ unk_D_86002F58_004_000_010_02C unk_2C;
56+
/* 0x30 */ OSMesgQueue unk_30;
57+
/* 0x48 */ OSMesg unk_48;
58+
/* 0x4C */ char pad4C[0x4];
59+
/* 0x50 */ OSMesgQueue unk_50;
60+
/* 0x68 */ OSMesg unk_68;
61+
/* 0x6C */ char pad6C[0x4];
62+
} unk_D_86002F58_004_000_010; // size = 0x70
4263

4364
typedef struct unk_D_86002F58_004_000_004 {
4465
/* 0x00 */ struct unk_D_86002F58_004_000_004* unk_00[4];
@@ -54,30 +75,38 @@ typedef struct unk_D_86002F58_004_000_000 {
5475
/* 0x04 */ struct unk_D_86002F58_004_000_000* unk_04;
5576
/* 0x08 */ struct unk_D_86002F58_004_000_000* unk_08;
5677
/* 0x0C */ unk_D_86002F58_004_000_00C* unk_0C;
57-
/* 0x10 */ s32 unk_10;
78+
/* 0x10 */ unk_D_86002F58_004_000_010* unk_10;
5879
/* 0x14 */ s32 unk_14;
5980
} unk_D_86002F58_004_000_000; // size = 0x18
6081

6182
typedef struct unk_D_86002F58_004_000_040_004 {
62-
/* 0x00 */ char unk00[0x4];
83+
/* 0x00 */ s16 unk_00;
84+
/* 0x02 */ char unk02[0x2];
6385
/* 0x04 */ s16 unk_04;
64-
/* 0x06 */ char unk06[0x4];
86+
/* 0x06 */ s16 unk_06;
87+
/* 0x08 */ u16 unk_08;
6588
/* 0x0A */ u16 unk_0A;
66-
} unk_D_86002F58_004_000_040_004; // size >= 0xC
89+
/* 0x0C */ u32 unk_0C;
90+
/* 0x10 */ u32 unk_10;
91+
/* 0x14 */ u32 unk_14;
92+
/* 0x18 */ u32 unk_18;
93+
} unk_D_86002F58_004_000_040_004; // size >= 0x1C
6794

6895
typedef struct unk_D_86002F58_004_000_040 {
6996
/* 0x00 */ s16 unk_00;
7097
/* 0x04 */ unk_D_86002F58_004_000_040_004* unk_04;
7198
/* 0x08 */ s32 unk_08;
7299
/* 0x0C */ u32 unk_0C;
73-
} unk_D_86002F58_004_000_040; // size >= 0x10
100+
/* 0x10 */ char unk10[0x2];
101+
/* 0x12 */ u16 unk_12;
102+
} unk_D_86002F58_004_000_040; // size >= 0x14
74103

75104
typedef struct unk_D_86002F58_004_000_054_004 {
76105
/* 0x00 */ s32 unk_00;
77106
/* 0x04 */ s16 unk_04;
78107
/* 0x06 */ char unk_06[0x4];
79108
/* 0x0A */ u16 unk_0A;
80-
} unk_D_86002F58_004_000_054_004; // size >= 0xC
109+
} unk_D_86002F58_004_000_054_004; // size >= 0x0C
81110

82111
typedef struct unk_D_86002F58_004_000_054 {
83112
/* 0x00 */ s16 unk_00;
@@ -102,8 +131,6 @@ typedef struct unk_D_86002F58_004_000 {
102131
/* 0x030 */ Vec3f unk_030;
103132
/* 0x03C */ Color_RGBA8_u32 unk_03C;
104133
/* 0x040 */ unk_D_86002F58_004_000_040 unk_040;
105-
/* 0x050 */ char pad050[2];
106-
/* 0x052 */ s16 unk_052;
107134
/* 0x054 */ unk_D_86002F58_004_000_054 unk_054;
108135
/* 0x060 */ MtxF unk_060;
109136
/* 0x0A0 */ Color_RGBA8_u32 unk_0A0;
@@ -123,7 +150,8 @@ typedef struct unk_D_86002F34_000 {
123150
/* 0x01 */ u8 unk_01;
124151
/* 0x02 */ u8 unk_02;
125152
/* 0x03 */ u8 unk_03;
126-
/* 0x04 */ char pad04[0x4];
153+
/* 0x04 */ char pad04[0x2];
154+
/* 0x06 */ s16 unk_06;
127155
/* 0x08 */ struct unk_D_86002F34_000* unk_08;
128156
/* 0x0C */ struct unk_D_86002F34_000* unk_0C;
129157
/* 0x10 */ s32 (*unk_10)(s32, struct unk_D_86002F34_000*);
@@ -290,10 +318,33 @@ typedef struct unk_D_86002F34_alt12 {
290318
/* 0x1E */ s16 unk_1E;
291319
} unk_D_86002F34_alt12; // size >= 0x20
292320

321+
typedef void* (*func_unk_D_800ABE10)(s32, s32);
322+
323+
typedef struct unk_D_86002F34_018 {
324+
/* 0x00 */ u8 unk_00;
325+
/* 0x01 */ u8 unk_01;
326+
/* 0x02 */ u8 unk_02;
327+
/* 0x03 */ u8 unk_03;
328+
/* 0x04 */ char pad04[0x2];
329+
/* 0x06 */ s16 unk_06;
330+
/* 0x08 */ s32* unk_08;
331+
} unk_D_86002F34_018; // size = 0xC
332+
333+
typedef struct unk_D_86002F34_01C {
334+
/* 0x00 */ s32 unk_00;
335+
/* 0x04 */ s16* unk_04;
336+
/* 0x08 */ char unk08[0x4];
337+
} unk_D_86002F34_01C; // size = 0xC
338+
293339
typedef struct unk_D_86002F34 {
294340
/* 0x00 */ unk_D_86002F34_000 unk_00;
295-
/* 0x18 */ unk_D_86002F34_000* unk_18;
296-
} unk_D_86002F34; // size >= 0x1C
341+
/* 0x18 */ unk_D_86002F34_018* unk_18;
342+
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
343+
/* 0x20 */ char unk20[0x4];
344+
/* 0x24 */ u8 unk_24;
345+
/* 0x25 */ u8 unk_25;
346+
/* 0x28 */ func_unk_D_800ABE10 unk_28;
347+
} unk_D_86002F34; // size >= 0x2C
297348

298349
// Are unk_D_86002F30 and unk_D_800AC840 the same?
299350
typedef struct unk_D_86002F30 {

include/macros.h

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
2525

2626
#define SQ(x) ((x) * (x))
27+
#define CB(x) ((x) * (x) * (x))
2728

2829
// cast thru uintptr_t for integer to pointer casts
2930
#define INT2VOID(i) ((void *)(uintptr_t)(i))

include/math.h

-13
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,4 @@ typedef union Vec2s_s32 {
5252
s32 xy;
5353
} Vec2s_s32; // size = 0x6
5454

55-
typedef union AllTypeS32 {
56-
struct {
57-
s16 rg;
58-
s16 ba;
59-
};
60-
struct {
61-
s8 r;
62-
s8 g;
63-
s8 b;
64-
s8 a;
65-
};
66-
} AllTypeS32;
67-
6855
#endif

linker_scripts/us/symbol_addrs.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ D_87B000F2 = 0x87B000F2;
252252
D_87B000F4 = 0x87B000F4;
253253
D_86402848 = 0x86402848;
254254
gCurrentGameState = 0x80075668; // size:0x4
255-
D_800AE540 = 0x800AE540; // size:0x1200
255+
D_800AE540 = 0x800AE540; // size:0x11F8
256+
D_800AF738 = 0x800AF738;
256257
D_80068080 = 0x80068080;
257258
D_8007ED20 = 0x8007ED20;
258259
D_800A60C0 = 0x800A60C0;
@@ -294,3 +295,4 @@ D_8006F010 = 0x8006F010; // size:0x40
294295
D_8006F050 = 0x8006F050; // size:0xC
295296
D_8006F05C = 0x8006F05C; // size:0x6
296297
D_8006F064 = 0x8006F064; // size:0xC
298+
D_800ABE10 = 0x800ABE10; // size:0xA18

src/11BA0.c

+14-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_00
8888
arg1->unk_040.unk_04 = NULL;
8989
arg1->unk_040.unk_08 = 0;
9090
arg1->unk_040.unk_0C = 0x10000;
91-
arg1->unk_052 = 0;
91+
arg1->unk_040.unk_12 = 0;
9292
arg1->unk_054.unk_00 = 0;
9393
arg1->unk_054.unk_04 = NULL;
9494
arg1->unk_054.unk_08 = 0;
@@ -106,7 +106,19 @@ unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_00
106106

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

109-
#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80011B94.s")
109+
unk_func_80011B94* func_80011B94(MainPoolState* arg0, unk_func_80011B94* arg1, s32 arg2, Gfx* arg3) {
110+
if (arg0 != NULL) {
111+
arg1 = func_80002DCC(arg0, sizeof(unk_func_80011B94), 4);
112+
}
113+
114+
if (arg1 != NULL) {
115+
arg1->unk_18 = arg3;
116+
func_80010FA0(arg1, 0x19);
117+
arg1->unk_00.unk_03 = arg2;
118+
}
119+
120+
return arg1;
121+
}
110122

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

src/11BA0.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef struct unk_D_86404778_190 {
1818

1919
unk_D_86002F58_004_000_000* func_8001103C(MainPoolState*, void*);
2020
unk_D_86002F58_004_000* func_80011938(MainPoolState* arg0, unk_D_86002F58_004_000* arg1, s16 arg2, Vec3f* arg3, Vec3s* arg4, Vec3f* arg5);
21-
unk_func_80011B94* func_80011B94(MainPoolState*, void*, s32, Gfx*);
21+
unk_func_80011B94* func_80011B94(MainPoolState*, unk_func_80011B94*, s32, Gfx*);
2222
unk_D_86404778_190* func_80011B10(MainPoolState*, s32, s32, s32, Vec3f*, f32);
2323
void func_80012094(unk_D_86002F58_004_000_000*, unk_D_86002F58_004_000_000*);
2424

0 commit comments

Comments
 (0)