Skip to content

Commit

Permalink
Merge pull request #111 from Kelebek1/various
Browse files Browse the repository at this point in the history
4BA90 and fixes
  • Loading branch information
RevoSucks authored Aug 22, 2024
2 parents bf73448 + 67787b9 commit e152a51
Show file tree
Hide file tree
Showing 24 changed files with 543 additions and 377 deletions.
81 changes: 44 additions & 37 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,63 @@ typedef unsigned int uintptr_t;
#include "color.h"
#include "math.h"

typedef struct unk_D_86002F58_004_00C_028 {
typedef struct unk_D_86002F58_004_000_00C_028 {
/* 0x00 */ char pad0[4];
/* 0x04 */ u8 unk_04;
/* 0x05 */ u8 unk_05;
/* 0x06 */ char pad6[6];
/* 0x0C */ s32* unk_0C;
/* 0x10 */ s32* unk_10;
} unk_D_86002F58_004_00C_028; // size >= 0x14
} unk_D_86002F58_004_000_00C_028; // size >= 0x14

typedef unk_D_86002F58_004_00C_028* (*unk_D_86002F58_004_00C_028_func)(s32, s32);
typedef unk_D_86002F58_004_000_00C_028* (*unk_D_86002F58_004_000_00C_028_func)(s32, s32);

typedef struct unk_D_86002F58_004_00C {
typedef struct unk_D_86002F58_004_000_00C {
/* 0x00 */ char unk_00[0x28];
/* 0x28 */ unk_D_86002F58_004_00C_028_func unk_28;
} unk_D_86002F58_004_00C; // size >= 0x2C
/* 0x28 */ unk_D_86002F58_004_000_00C_028_func unk_28;
} unk_D_86002F58_004_000_00C; // size >= 0x2C

typedef struct unk_D_86002F58_004_010 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk_01[0x23];
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
} unk_D_86002F58_004_010; // size >= 0x2C

typedef struct unk_func_8001BCF0 {
typedef struct unk_D_86002F58_004_000_010 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
/* 0x04 */ unk_D_86002F58_004_00C* unk_04;
/* 0x08 */ unk_D_86002F58_004_010* unk_08;
} unk_func_8001BCF0; // size >= 0x0C

typedef struct unk_D_86002F58_004 {
/* 0x01 */ char unk_01[0x23];
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
} unk_D_86002F58_004_000_010; // size >= 0x2C

typedef struct unk_D_86002F58_004_000_004 {
/* 0x00 */ struct unk_D_86002F58_004_000_004* unk_00;
/* 0x04 */ unk_D_86002F58_004_000_00C* unk_04;
/* 0x08 */ unk_D_86002F58_004_000_010* unk_08;
} unk_D_86002F58_004_000_004; // size >= 0x0C

typedef struct unk_D_86002F58_004_000 {
/* 0x000 */ u8 unk_000;
/* 0x001 */ u8 unk_001;
/* 0x002 */ u8 unk_002;
/* 0x004 */ unk_func_8001BCF0 unk_004;
/* 0x010 */ char unk010[0x8];
/* 0x003 */ u8 unk_003;
/* 0x004 */ struct unk_D_86002F58_004_000* unk_004;
/* 0x008 */ struct unk_D_86002F58_004_000* unk_008;
/* 0x00C */ unk_D_86002F58_004_000_00C* unk_00C;
/* 0x010 */ s32 unk_010;
/* 0x014 */ s32 unk_014;
/* 0x018 */ s16 unk_018;
/* 0x01A */ s16 unk_01A;
/* 0x01C */ u8 unk_01C;
/* 0x01D */ u8 unk_01D;
/* 0x01E */ char unk01E[0x2];
/* 0x020 */ s16 unk_020;
/* 0x024 */ f32 unk_024;
/* 0x028 */ f32 unk_028;
/* 0x02C */ f32 unk_02C;
/* 0x030 */ f32 unk_030;
/* 0x034 */ f32 unk_034;
/* 0x038 */ f32 unk_038;
/* 0x01E */ Vec3s unk_01E;
/* 0x024 */ Vec3f unk_024;
/* 0x030 */ Vec3f unk_030;
/* 0x03C */ s32 unk_03C;
/* 0x040 */ s16 unk_040;
/* 0x044 */ s32 unk_044;
/* 0x048 */ s32 unk_048;
/* 0x04C */ u32 unk_04C;
/* 0x050 */ char pad50[4];
/* 0x050 */ char pad50[2];
/* 0x052 */ s16 unk_052;
/* 0x054 */ s16 unk_054;
/* 0x058 */ s32 unk_058;
/* 0x05C */ char pad5C[4];
/* 0x05C */ s16 unk_05C;
/* 0x05E */ s16 unk_05E;
/* 0x060 */ s32 unk_060;
/* 0x064 */ char pad64[0x3C];
/* 0x0A0 */ s32 unk_0A0;
Expand All @@ -81,9 +81,9 @@ typedef struct unk_D_86002F58_004 {
/* 0x0AC */ f32 unk_0AC;
/* 0x0B0 */ f32 unk_0B0;
/* 0x0B4 */ char padB4[0xB4];
} unk_D_86002F58_004; // size = 0x168
} unk_D_86002F58_004_000; // size = 0x168

// possibly unk_D_86002F58_004
// possibly unk_D_86002F58_004_000
typedef struct unk_D_86002F34_00C {
/* 0x00 */ char pad0[0x24];
/* 0x24 */ MtxF* unk_024;
Expand All @@ -109,10 +109,17 @@ typedef struct unk_D_86002F34 {
/* 0x0C */ unk_D_86002F34_00C* unk_0C;
} unk_D_86002F34; // size >= 0x10

// Are unk_D_86002F30 and unk_D_800AC840 the same?
typedef struct unk_D_86002F30 {
/* 0x00 */ char unk_00[0x8];
/* 0x08 */ unk_func_8001BCF0** unk_08;
} unk_D_86002F30; // size >= 0xC
/* 0x00 */ char unk00[0x8];
/* 0x08 */ unk_D_86002F58_004_000_004* unk_08[4];
} unk_D_86002F30; // size = 0x18 ??

typedef struct unk_D_800AC840 {
/* 0x00 */ char pad0[0xC];
/* 0x0C */ unk_D_86002F58_004_000* unk_0C;
/* 0x10 */ char pad10[8];
} unk_D_800AC840; // size = 0x18

struct UnkInputStruct8000D738 {
s32 unk0;
Expand Down
17 changes: 14 additions & 3 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ typedef struct unk_D_800A7440 {
} unk_D_800A7440; // size >= 0x8
extern unk_D_800A7440 D_800A7440;

extern struct unk_D_86002F58_004 D_800AC840;
extern struct unk_D_86002F58_004 D_800AC858;
extern struct unk_D_86002F58_004* D_8006F09C;


extern struct unk_D_800AC840 D_800AC840;
extern struct unk_D_800AC840 D_800AC858;
extern struct unk_D_86002F58_004_000* D_8006F09C;

extern s32 D_8006F050[];
extern s16 D_8006F05C[];
Expand Down Expand Up @@ -136,4 +138,13 @@ extern unk_D_800AC870* D_800AC870;

extern Gfx D_8006F498[];

extern f32 D_80077DD4;
extern f32 D_80077DD8;
extern f32 D_80077DDC;
extern f32 D_80077DE0;
extern s8 D_80077DE4;
extern s32 D_80078E60;
extern s32 D_80078E64;
extern s32 D_80078E68;

#endif
79 changes: 75 additions & 4 deletions src/11BA0.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
#include "global.h"
#include "11BA0.h"

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80010FA0.s")
void func_80010FA0(unk_D_86002F58_004_000* arg0, u8 arg1) {
if (arg0 != NULL) {
arg0->unk_000 = arg1;
arg0->unk_001 = 0x11;
arg0->unk_002 = 0;
arg0->unk_003 = 0;
arg0->unk_004 = arg0;
arg0->unk_008 = arg0;
arg0->unk_00C = NULL;
arg0->unk_010 = 0;
arg0->unk_014 = 0;
}
}

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

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_8001103C.s")
unk_D_86002F58_004_000* func_8001103C(MainPoolState* arg0, void* arg1) {
if (arg0 != 0) {
arg1 = func_80002DCC(arg0, 0x18, 4);
}

if (arg1 != NULL) {
func_80010FA0(arg1, 0);
}

return arg1;
}

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

Expand Down Expand Up @@ -45,7 +67,38 @@

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

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80011938.s")
unk_D_86002F58_004_000* func_80011938(s32 arg0, unk_D_86002F58_004_000* arg1, s16 arg2, Vec3f* arg3, Vec3s* arg4,
Vec3f* arg5) {
if (arg0 != 0) {
arg1 = func_80002DCC(arg0, 0x168, 4);
}

if (arg1 != NULL) {
arg1->unk_018 = 0;
arg1->unk_01A = arg2;
arg1->unk_024 = *arg3;
arg1->unk_030 = *arg5;
arg1->unk_01E = *arg4;
arg1->unk_01D = 0xFF;
arg1->unk_01C = 0;
arg1->unk_0A6 = 0;
arg1->unk_0A0 = -0x100;
arg1->unk_03C = -0x100;
arg1->unk_040 = 0;
arg1->unk_044 = 0;
arg1->unk_048 = 0;
arg1->unk_04C = 0x10000;
arg1->unk_052 = 0;
arg1->unk_054 = 0;
arg1->unk_058 = 0;
arg1->unk_05C = 0;
arg1->unk_05E = 0;
func_80010FA0(arg1, 0x16);
arg1->unk_002 |= 0x60;
}

return arg1;
}

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

Expand All @@ -71,7 +124,25 @@

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

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80012094.s")
void func_80012094(unk_D_800AC840* arg0, unk_D_86002F58_004_000* arg1) {
unk_D_86002F58_004_000* temp_v0;
unk_D_86002F58_004_000_004* temp_v1;

if ((arg0 != NULL) && (arg1 != NULL)) {
temp_v0 = arg0->unk_0C;
if (temp_v0 == NULL) {
arg0->unk_0C = arg1;
arg1->unk_004 = arg1;
arg1->unk_008 = arg1;
} else {
temp_v1 = temp_v0->unk_004;
arg1->unk_008 = temp_v0;
arg1->unk_004 = temp_v1;
temp_v0->unk_004 = arg1;
temp_v1->unk_08 = arg1;
}
}
}

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

Expand Down
7 changes: 4 additions & 3 deletions src/11BA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#define _11BA0_H_

#include "global.h"
#include "src/memory.h"

void func_8001103C(s32, unk_D_86002F58_004*);
void func_80011938(s32, unk_D_86002F58_004*, s32, s32*, s16*, f32*);
void func_80012094(unk_D_86002F58_004*, unk_D_86002F58_004*);
unk_D_86002F58_004_000* func_8001103C(MainPoolState*, void*);
unk_D_86002F58_004_000* func_80011938(s32 arg0, unk_D_86002F58_004_000* arg1, s16 arg2, Vec3f* arg3, Vec3s* arg4, Vec3f* arg5);
void func_80012094(unk_D_800AC840*, unk_D_86002F58_004_000*);


#endif // _11BA0_H_
2 changes: 1 addition & 1 deletion src/12D80.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

void func_80015094(unk_D_86002F34*);
void func_80015348(void);
s32 func_80015390(unk_D_86002F58_004*, s16, Vec3f*);
s32 func_80015390(unk_D_86002F58_004_000*, s16, Vec3f*);


#endif // _12D80_H_
6 changes: 3 additions & 3 deletions src/17300.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "global.h"

void func_800173CC(unk_D_86002F58_004*);
void func_800173DC(unk_D_86002F58_004*, s16, s32, s32);
s32 func_80017514(unk_D_86002F58_004*);
void func_800173CC(unk_D_86002F58_004_000*);
void func_800173DC(unk_D_86002F58_004_000*, s16, s32, s32);
s32 func_80017514(unk_D_86002F58_004_000*);

#endif // _17300_H_
4 changes: 2 additions & 2 deletions src/18140.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "global.h"

void func_80017788(unk_D_86002F58_004*);
void func_80017798(unk_D_86002F58_004*, s16, s32, s32);
void func_80017788(unk_D_86002F58_004_000*);
void func_80017798(unk_D_86002F58_004_000*, s16, s32, s32);

#endif // _18140_H_
18 changes: 9 additions & 9 deletions src/19840.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#include "global.h"
#include "src/memory.h"

// seems like unk_D_86002F58_004, but unk_20 and unk_24 need to be s32
// seems like unk_D_86002F58_004_000, but unk_20 and unk_24 need to be s32
typedef struct unk_func_8001C248 {
/* 0x000 */ u8 unk_000;
/* 0x001 */ u8 unk_001;
/* 0x002 */ u8 unk_002;
/* 0x003 */ char pad3[9];
/* 0x00C */ unk_D_86002F58_004_00C* unk_00C;
/* 0x010 */ unk_D_86002F58_004_010* unk_010;
/* 0x00C */ unk_D_86002F58_004_000_00C* unk_00C;
/* 0x010 */ unk_D_86002F58_004_000_010* unk_010;
/* 0x024 */ s32 unk_014;
/* 0x018 */ s16 unk_018;
/* 0x01A */ s16 unk_01A;
Expand All @@ -23,13 +23,13 @@ typedef struct unk_func_8001C248 {
} unk_func_8001C248;

void func_8001987C(void);
void func_80019A7C(unk_D_86002F58_004_010*, s32, s32, unk_func_8001C248*);
s32 func_80019C08(unk_D_86002F58_004_010*, unk_func_8001C248*);
s32 func_80019C58(unk_D_86002F58_004_010*, unk_func_8001C248*);
s32 func_80019CA8(unk_D_86002F58_004_010*);
void func_80019CE0(unk_D_86002F58_004_010*);
void func_80019A7C(unk_D_86002F58_004_000_010*, s32, s32, unk_func_8001C248*);
s32 func_80019C08(unk_D_86002F58_004_000_010*, unk_func_8001C248*);
s32 func_80019C58(unk_D_86002F58_004_000_010*, unk_func_8001C248*);
s32 func_80019CA8(unk_D_86002F58_004_000_010*);
void func_80019CE0(unk_D_86002F58_004_000_010*);
unk_D_86002F30* func_80019D18(s32);
void func_800198E4(unk_D_86002F58_004_010*, u16, s32);
void func_800198E4(unk_D_86002F58_004_000_010*, u16, s32);


#endif // _19840_H_
Loading

0 comments on commit e152a51

Please sign in to comment.