Skip to content

Commit

Permalink
Merge pull request #165 from Kelebek1/fragment24
Browse files Browse the repository at this point in the history
fragment24
  • Loading branch information
RevoSucks authored Nov 24, 2024
2 parents 0f28ab4 + 8978211 commit 56376c4
Show file tree
Hide file tree
Showing 27 changed files with 9,852 additions and 383 deletions.
11 changes: 10 additions & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ extern u8 D_4001638[];
extern u8 D_4001680[];
extern u8 D_40016C8[];
extern u8 D_4001710[];
extern u8 D_4004A00[];
extern u8 D_4005570[];
extern u8 D_4001010[];
extern u8 D_4001C90[];
extern u8 D_4001FB8[];
extern u8 D_4006AB8[];

extern u8 D_800818E0[0x20];

Expand Down Expand Up @@ -148,7 +154,9 @@ extern struct unk_D_86002F58_004_000* D_8006F09C;
typedef struct unk_D_8006FF00 {
/* 0x00 */ char unk_00[0x4];
/* 0x04 */ char* name;
/* 0x08 */ char unk_08[0x8];
/* 0x08 */ char unk_08[0x4];
/* 0x0C */ u8 unk_0C;
/* 0x0D */ char unk_0D[0x3];
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ char unk_14[0x8];
Expand Down Expand Up @@ -227,5 +235,6 @@ typedef struct unk_D_70B10 {
} unk_D_70B10; // size = 0x20

extern unk_func_88500020 D_800758E0;
extern unk_func_88500020 D_800758F0;

#endif
4 changes: 4 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ D_4002D88 = 0x4002D88;
D_4003010 = 0x4003010;
D_4003298 = 0x4003298;
D_4003520 = 0x4003520;
D_4001010 = 0x4001010;
D_4001C90 = 0x4001C90;
D_4001FB8 = 0x4001FB8;
D_4006AB8 = 0x4006AB8;
D_88217C20 = 0x88217C20; // size:0x4
D_88217C24 = 0x88217C24; // size:0x4
D_88217C28 = 0x88217C28; // size:0x4
Expand Down
2 changes: 1 addition & 1 deletion src/1AB70.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

typedef struct unk_func_88201DA0_034_008 {
/* 0x00 */ char unk00[0x4];
} unk_func_88201DA0_034_008; // size >= 1
} unk_func_88201DA0_034_008; // size >= 0x4

void func_8001B058(void);
void func_8001B0DC(unk_func_88201DA0_034_008*, s32, s32);
Expand Down
2 changes: 1 addition & 1 deletion src/225A0.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "global.h"
#include "225A0.h"

#pragma GLOBAL_ASM("asm/us/nonmatchings/225A0/func_800219A0.s")

Expand Down
8 changes: 8 additions & 0 deletions src/225A0.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef _225A0_H_
#define _225A0_H_

#include "global.h"

u32 func_800219FC(s32);

#endif // _225A0_H_
12 changes: 8 additions & 4 deletions src/22630.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ typedef enum {
} PokemonRomType;

typedef struct unk_D_80070F84 {
/* 0x00 */ char unk00[0x5];
/* 0x00 */ u8 unk_00;
/* 0x04 */ char unk01[0x4];
/* 0x05 */ u8 unk_05;
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ u8 unk_08;
/* 0x09 */ u8 unk_09;
/* 0x0A */ u8 unk_0A;
/* 0x0B */ char unk0B[0x8];
/* 0x0B */ char unk0B[0x4];
/* 0x0F */ u8 unk_0F[1];
/* 0x10 */ char unk10[0x3];
/* 0x13 */ u8 unk_13;
/* 0x14 */ char unk14[0x3];
} unk_D_80070F84; // size = 0x17
Expand Down Expand Up @@ -116,12 +119,13 @@ u32 func_800224B8(s32 arg0, u16 arg1);
u16 func_800226C0(s32 arg0, u32 arg1);
void func_80022734(unk_func_8820BE14_sp*);
void func_800228B0(unk_func_8820BE14_sp*);
s8 func_80022A28(s32);
u8 func_80022A38(s32 arg0);
u8 func_80022A60(s32 arg0);
unk_func_80022C28_ret* func_80022C28(s32, s32, s32, s32);
unk_func_80022C28_ret* func_80022CC0(s32, s32, s32, s32, char*, s32);
void func_80022D24(unk_func_80022C28_ret*);
void func_80022D8C(unk_func_80022C28_ret*);
s32 func_80022D24(unk_func_80022C28_ret*);
s32 func_80022D8C(unk_func_80022C28_ret*);
s32 func_80022E18(unk_func_80026268_arg0*, s32, unk_func_80022C28_ret*);
s32 func_80022F24(unk_func_88205880_00D0*, s32, unk_func_80022C28_ret*);
void func_80023068(void);
Expand Down
90 changes: 89 additions & 1 deletion src/2D340.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,108 @@ typedef struct unk_func_8820BE14_06C_000 {
/* 0x04 */ unk_func_88200FA0_030_038 unk_04;
} unk_func_8820BE14_06C_000; // size = 0x10

typedef struct unk_func_8820BE14_06C_000_alt {
/* 0x00 */ s32 unk_00;
/* 0x04 */ unk_func_88200FA0_030_038 unk_04;
/* 0x10 */ unk_func_88205880_A030 unk_10;
} unk_func_8820BE14_06C_000_alt; // size = 0x1C

typedef struct unk_func_8820BE14_06C {
/* 0x00 */ unk_func_8820BE14_06C_000* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
} unk_func_8820BE14_06C; // size = 0x10

void func_8002C740(s8*, unk_func_88201DA0_034*, s32, s32, s32);
typedef struct unk_func_8830867C_02C_0CC_000_000_000 {
/* 0x00 */ char unk00[0x8];
/* 0x08 */ s32 unk_08;
} unk_func_8830867C_02C_0CC_000_000_000; // size >= 0xC

typedef struct unk_func_8830867C_02C_0CC_000_000_010_000_000 {
/* 0x00 */ struct unk_func_8830867C_02C_0CC_000_000* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ unk_func_80026268_arg0 unk_08;
} unk_func_8830867C_02C_0CC_000_000_010_000_000; // size >= 0x5C

typedef struct unk_func_8830867C_02C_0CC_000_000_010_000 {
/* 0x00 */ unk_func_8830867C_02C_0CC_000_000_010_000_000* unk_00;
} unk_func_8830867C_02C_0CC_000_000_010_000; // size >= 0x4

typedef struct unk_func_8830867C_02C_0CC_000_000_010 {
/* 0x00 */ unk_func_8830867C_02C_0CC_000_000_010_000* unk_00;
/* 0x04 */ char unk04[0x4];
/* 0x08 */ s32 unk_08;
} unk_func_8830867C_02C_0CC_000_000_010; // size = 0xC

typedef struct unk_func_8830867C_02C_0CC_000_000 {
/* 0x00 */ unk_func_8830867C_02C_0CC_000_000_000* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ unk_func_8830867C_02C_0CC_000_000_010 unk_10;
} unk_func_8830867C_02C_0CC_000_000; // size = 0x1C

typedef struct unk_func_8830867C_02C_0CC_000_008 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk01[0x1];
/* 0x02 */ u16 unk_02;
/* 0x04 */ char unk04[0x5];
/* 0x09 */ u8 unk_09[4];
/* 0x0D */ char unk0D[0x3];
/* 0x10 */ u8 unk_10;
/* 0x11 */ u8 unk_11;
/* 0x12 */ char unk12[0x2];
/* 0x14 */ u16 unk_14;
/* 0x16 */ u16 unk_16;
/* 0x18 */ u16 unk_18;
/* 0x1A */ u16 unk_1A;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u16 unk_1E;
/* 0x20 */ u8 unk_20[4];
/* 0x24 */ u8 unk_24;
/* 0x26 */ u16 unk_26;
/* 0x28 */ u16 unk_28;
/* 0x2A */ u16 unk_2A;
/* 0x2C */ u16 unk_2C;
/* 0x2E */ u16 unk_2E;
} unk_func_8830867C_02C_0CC_000_008; // size = 0x30

typedef struct unk_func_8830867C_02C_0CC_000 {
/* 0x00 */ unk_func_8830867C_02C_0CC_000_000* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ unk_func_8830867C_02C_0CC_000_008 unk_08;
/* 0x38 */ char unk_38[4];
/* 0x3C */ char unk3C[0x20];
} unk_func_8830867C_02C_0CC_000; // size = 0x5C

typedef struct unk_func_8830867C_02C_0CC {
/* 0x00 */ unk_func_8830867C_02C_0CC_000** unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
} unk_func_8830867C_02C_0CC; // size = 0xC

typedef struct unk_func_8830867C_04C_030_02C_000_000_00C {
/* 0x00 */ s32 unk_00;
/* 0x04 */ char unk04[0x4];
/* 0x08 */ s32 unk_08;
} unk_func_8830867C_04C_030_02C_000_000_00C; // size >= 0xC

typedef void (*func_func_8002D1AC)();
typedef s32 (*unk_D_8831A1F8)(s32, s32);

void func_8002C740(unk_func_88201DA0_038*, unk_func_88201DA0_034*, s32, s32, s32);
void func_8002C758(unk_func_8820BE14_06C*, s32, s32, MemoryPool*);
void func_8002C88C(unk_func_8820BE14_06C*, u8*, s32);
void func_8002C990(unk_func_8820BE14_06C*, s32);
s32 func_8002CB58(unk_func_8830867C_04C_030_02C_000_000_00C*, s32);
void func_8002CBC0(unk_func_88200FA0_030_038*, s32, MemoryPool*);
void func_8002CBB0(unk_func_88205880_A030*, void*, s32, s32);
void func_8002CC2C(unk_func_88200FA0_030_038*, char*, s32);
void func_8002CC80(unk_func_8830867C_02C_0CC*, s32);
void func_8002D180(unk_func_8830867C_02C_0CC*, unk_D_8831A1F8);
void func_8002D1AC(unk_func_8830867C_02C_0CC*, unk_func_8830867C_02C_0CC*, func_func_8002D1AC, s32*);
s32 func_8002D348(u8*, u8*);
void func_8002D3F0(f32*);
Color_RGBA8 func_8002D444(Color_RGBA8, f32);

Expand Down
2 changes: 1 addition & 1 deletion src/2E110.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void func_8002D5D4(u32 arg0, char* arg1) {
}
}

void func_8002D600(u32 arg0, s32 arg1) {
void func_8002D600(u32 arg0, char* arg1) {
if ((arg0 != 0) && (arg0 < 0xA)) {
D_800AF744[arg0] = arg1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/2E110.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
void func_8002D510(void);
char** func_8002D5AC(s32 file_number);
void func_8002D5D4(u32 arg0, char* arg1);
void func_8002D600(u32 arg0, s32 arg1);
void func_8002D600(u32 arg0, char* arg1);
void func_8002D628(char* arg0, u32 arg1, s8* arg2);
char* func_8002D7C0(char* arg0, s32 arg1, char** arg2, u32 file_number);
s32 func_8002D80C(s8* arg0);
Expand Down
26 changes: 25 additions & 1 deletion src/2E460.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

#include "global.h"

typedef struct unk_func_8002D860 {
/* 0x00 */ char unk00[0x8];
/* 0x08 */ s32 unk_08;
} unk_func_8002D860; // size >= 0xC

typedef struct ret_func_8002ED08 {
/* 0x00 */ u8 unk_00[12];
} ret_func_8002ED08; // size = 0xC
Expand All @@ -15,15 +20,34 @@ typedef struct unk_func_8820E99C_030_030 {
/* 0x10 */ s32 unk_10;
} unk_func_8820E99C_030_030; // size = 0x14

typedef struct unk_D_80072B00 {
/* 0x00 */ char unk00[5];
/* 0x05 */ u8 unk_05;
} unk_D_80072B00; // size = 0x6

typedef struct unk_func_8830867C_044_038_030 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
} unk_func_8830867C_044_038_030; // size = 0x14

void func_8002D860(unk_func_8002D860*, s32);
void func_8002D8C8(unk_func_88500020*, s32, s32);
s32 func_8002DF68(unk_func_8830867C_044_038_030*, s32);
s32 func_8002EC08(s32);
s32 func_8002ECDC(s32);
s32 func_8002E0F4(unk_func_8820E99C_030_030*);
void func_8002E5A0(s32, s32, s32, s32);
void func_8002E8E4(s32, s32, s32, s32);
unk_D_80072B00* func_8002ED40(s32);
s32 func_8002EE1C(s32, s32, s32);
void func_8002EE78(void);
void func_8002EEA8(OSMesg);
ret_func_8002ED08* func_8002ED08(u8);
ret_func_8002ED08* func_8002ED08(s32);
s32 func_8002ED78(u8*, s32);
s32 func_8002EDEC(s32);
void func_8002EF18(s32*);
void func_8002EF44(void);
s32 func_8002F1C0(u8);
Expand Down
6 changes: 3 additions & 3 deletions src/fragments/22/fragment22.c
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@ void func_88001300(unk_func_88001300* arg0, s32 arg1, s32 arg2, s32 arg3, u8* ar
arg0->unk_38 = mem_pool_alloc(arg6, sizeof(unk_func_88001300_038));
((func88502274)Memmap_GetFragmentVaddr(func_88502274))(arg0->unk_38, 0, 0, temp_s0->unk_14.unk_00,
temp_s0->unk_14.unk_02);
arg0->unk_38->unk_28 |= 0x200;
arg0->unk_38->unk_00.unk_28 |= 0x200;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(temp_s0, arg0->unk_38);

sp5C = mem_pool_alloc(arg6, sizeof(unk_func_88001300_000));
Expand Down Expand Up @@ -3017,7 +3017,7 @@ void func_8800233C(unk_func_88001300* arg0) {
func_8002EEA8(NULL);
}

arg0->unk_38->unk_28 |= 0x201;
arg0->unk_38->unk_00.unk_28 |= 0x201;

for (i = 0; i < 8; i++) {
func_8002EEA8(NULL);
Expand All @@ -3027,7 +3027,7 @@ void func_8800233C(unk_func_88001300* arg0) {
temp_s0 = Memmap_GetFragmentVaddr(func_88506074); temp_s0(arg0->unk_34, func_8002D7C0(NULL, 0, D_88016CF4, 6));
// clang-format on
} else {
arg0->unk_38->unk_28 |= 0x201;
arg0->unk_38->unk_00.unk_28 |= 0x201;
func_88001258(arg0);
}
} else {
Expand Down
1 change: 1 addition & 0 deletions src/fragments/23/fragment23.h
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ void func_88216000(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2);
s32 func_882169D4(unk_func_8820BE14_02C_038* arg0, Controller* arg1);
void func_88216F18(unk_func_8820BE14_02C_038* arg0, s32 arg1);
void func_88217018(unk_func_8820BE14_02C_038* arg0, unk_func_8820BE14_06C_000* arg1, u32 arg2);
void func_88217060(unk_func_8820BE14_02C_038*, s32*, s32);
void func_882170A8(unk_func_882170A8* arg0, s32 arg1, s32 arg2, unk_func_8820BE14_02C_038* arg3, s32 arg4);
void func_8821711C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
s32 func_8821738C(unk_func_882170A8* arg0, s32 arg1, s32 arg2);
Expand Down
20 changes: 10 additions & 10 deletions src/fragments/23/fragment23_1A8800.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ void func_88200290(unk_func_88503298* arg0, s32 arg1, s32 arg2, MemoryPool* arg3

arg0->unk_2C = mem_pool_alloc(arg3, sizeof(unk_func_88001300_038));
((func88502274)Memmap_GetFragmentVaddr(func_88502274))(arg0->unk_2C, 0, 0, var_s1, 0x68);
arg0->unk_2C->unk_28 |= 0x200;
arg0->unk_2C->unk_28 |= 0x400;
arg0->unk_2C->unk_28 &= ~1;
arg0->unk_2C->unk_00.unk_28 |= 0x200;
arg0->unk_2C->unk_00.unk_28 |= 0x400;
arg0->unk_2C->unk_00.unk_28 &= ~1;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_2C);

temp_s0 = mem_pool_alloc(arg3, sizeof(unk_func_885012A4));
Expand Down Expand Up @@ -95,9 +95,9 @@ void func_882004C8(unk_func_88200FA0_030* arg0, s32 arg1, s32 arg2, unk_func_880

arg0->unk_2C = mem_pool_alloc(arg4, sizeof(unk_func_88001300_038));
((func88502274)Memmap_GetFragmentVaddr(func_88502274))(arg0->unk_2C, 0, 0, var_s2, 0xA4);
arg0->unk_2C->unk_28 |= 0x200;
arg0->unk_2C->unk_28 |= 0x400;
arg0->unk_2C->unk_28 &= ~1;
arg0->unk_2C->unk_00.unk_28 |= 0x200;
arg0->unk_2C->unk_00.unk_28 |= 0x400;
arg0->unk_2C->unk_00.unk_28 &= ~1;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_2C);

sp6C = mem_pool_alloc(arg4, sizeof(unk_func_8850B254));
Expand Down Expand Up @@ -159,7 +159,7 @@ s32 func_88200A30(unk_func_88200FA0_030* arg0, Controller* arg1) {
if ((sp1C & 1) && (sp1C & 8)) {
func_88200968(arg0, arg0->unk_30->unk_38);
}
} else if (!(arg0->unk_2C->unk_28 & 1)) {
} else if (!(arg0->unk_2C->unk_00.unk_28 & 1)) {
sp1C = 2;
} else {
sp1C = 1;
Expand All @@ -168,14 +168,14 @@ s32 func_88200A30(unk_func_88200FA0_030* arg0, Controller* arg1) {
}

void func_88200ACC(unk_func_88200FA0_030* arg0) {
arg0->unk_2C->unk_28 |= 1;
arg0->unk_34->unk_2C->unk_28 |= 1;
arg0->unk_2C->unk_00.unk_28 |= 1;
arg0->unk_34->unk_2C->unk_00.unk_28 |= 1;
}

void func_88200AF4(unk_func_88200FA0_030* arg0) {
arg0->unk_2C->unk_2C = 0xB;
arg0->unk_34->unk_2C->unk_2C = 0xB;
while (arg0->unk_2C->unk_28 & 1) {
while (arg0->unk_2C->unk_00.unk_28 & 1) {
func_8002EEA8(NULL);
}
}
Expand Down
Loading

0 comments on commit 56376c4

Please sign in to comment.