fragment23

This commit is contained in:
Kelebek1 2024-10-21 13:45:00 +01:00
parent c0ff34449f
commit 65205b71ee
35 changed files with 11312 additions and 357 deletions

View File

@ -79,6 +79,7 @@ typedef union{
} Color_RGBA14;
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
#define RGBA5551(r, g, b, a) ((((r) << 8) & 0xF800) | (((g) << 3) & 0x7C0) | (((b) >> 2) & 0x3E) | ((a) & 0x1))
#define RGBA16_GET_R(pixel) ((((pixel) & 0xF800) >> 11) & 0xFF)
#define RGBA16_GET_G(pixel) ((((pixel) & 0x7C0) >> 6) & 0xFF)

View File

@ -7,14 +7,13 @@
typedef unsigned int uintptr_t;
#include "macros.h"
#include "attributes.h"
#include "functions.h"
#include "variables.h"
#include "sections.h"
#include "gfx.h"
#include "color.h"
#include "sound.h"
#include "string.h"
#include "math.h"
typedef struct unk_D_86002F58_004_000_00C_028 {
@ -502,4 +501,18 @@ typedef struct arg1_func_81407874_014_000_010 {
/* 0x0F */ u8 unk_0F;
} arg1_func_81407874_014_000_010; // size >= 0x10
typedef struct func_88002628_sp38 {
/* 0x000 */ OSThread thread;
/* 0x1B0 */ char unk1B0[0x10];
} func_88002628_sp38; // size = 0x1C0
typedef struct unk_func_88500020 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ u8* unk_0C;
} unk_func_88500020; // size = 0x10
#include "variables.h"
#endif

View File

@ -101,6 +101,20 @@ extern u8 D_04008000[];
extern u8 D_04009000[];
extern u8 D_0400A000[];
extern u8 D_0400B000[];
extern u8 D_4006A60[];
extern u8 D_40022E0[];
extern u8 D_4002368[];
extern u8 D_40025F0[];
extern u8 D_4002878[];
extern u8 D_4002B00[];
extern u8 D_4002D88[];
extern u8 D_4003010[];
extern u8 D_4003298[];
extern u8 D_4003520[];
extern u8 D_4001638[];
extern u8 D_4001680[];
extern u8 D_40016C8[];
extern u8 D_4001710[];
extern u8 D_800818E0[0x20];
@ -212,4 +226,6 @@ typedef struct unk_D_70B10 {
/* 0x00 */ char unk00[0x20];
} unk_D_70B10; // size = 0x20
extern unk_func_88500020 D_800758E0;
#endif

View File

@ -359,3 +359,22 @@ D_86C11530 = 0x86C11530; // size:0xAD0
D_879060BC = 0x879060BC; // size:0x2
D_86E04D60 = 0x86E04D60; // size:0xAD0
D_86E05830 = 0x86E05830; // size:0x3610
D_4006A60 = 0x4006A60;
D_40022E0 = 0x40022E0;
D_4002368 = 0x4002368;
D_40025F0 = 0x40025F0;
D_4002878 = 0x4002878;
D_4002B00 = 0x4002B00;
D_4002D88 = 0x4002D88;
D_4003010 = 0x4003010;
D_4003298 = 0x4003298;
D_4003520 = 0x4003520;
D_88217C20 = 0x88217C20; // size:0x4
D_88217C24 = 0x88217C24; // size:0x4
D_88217C28 = 0x88217C28; // size:0x4
D_88217C2C = 0x88217C2C; // size:0x4
D_88217C48 = 0x88217C48; // size:0x4
D_88217C4C = 0x88217C4C; // size:0x4
D_88217C50 = 0x88217C50; // size:0x4
D_88217C54 = 0x88217C54; // size:0x4
D_88217C58 = 0x88217C58; // size:0x4

View File

@ -17,7 +17,7 @@ typedef struct unk_func_80019600 {
/* 0x04 */ OSMesgQueue* queue;
/* 0x08 */ void* unk_08;
/* 0x0C */ void* unk_0C;
/* 0x10 */ struct MainPoolState* pool;
/* 0x10 */ MainPoolState* pool;
/* 0x14 */ s32 size;
/* 0x18 */ arg1_func_80010CA8 unk_18;
} unk_func_80019600; // size >= 0x1C

View File

@ -1,4 +1,4 @@
#include "global.h"
#include "1AB70.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/1AB70/func_80019F70.s")

14
src/1AB70.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef _1AB70_H_
#define _1AB70_H_
#include "global.h"
typedef struct unk_func_88201DA0_034_008 {
/* 0x00 */ char unk00[0x4];
} unk_func_88201DA0_034_008; // size >= 1
void func_8001B058(void);
void func_8001B0DC(unk_func_88201DA0_034_008*, s32, s32);
#endif // _1AB70_H_

View File

@ -122,14 +122,14 @@ char* func_80021B7C(char* arg0, char* arg1) {
#pragma GLOBAL_ASM("asm/us/nonmatchings/22630/func_80021C20.s")
void func_80021C40(char* arg0, char* arg1) {
char* func_80021C40(char* arg0, char* arg1) {
char sp1C[11];
_bcopy(arg1, sp1C, 0xA);
sp1C[10] = 'P';
func_80021A90(arg0, sp1C);
return func_80021A90(arg0, sp1C);
}
extern char D_8006FEE8[][0x1C];

View File

@ -4,6 +4,7 @@
#include "global.h"
#include "memory.h"
#include "29BA0.h"
#include "2D340.h"
typedef enum {
POKEMON_ROM_NONE = 0,
@ -51,6 +52,48 @@ typedef struct unk_D_800AE4E8_004_1_000_010 {
/* 0x2C */ u8 unk_2C[11];
} unk_D_800AE4E8_004_1_000_010; // size = 0x37
typedef struct unk_func_80022C28_ret {
/* 0x00 */ s8 unk_00;
/* 0x01 */ s8 unk_01;
/* 0x02 */ s8 unk_02;
/* 0x03 */ s8 unk_03;
/* 0x04 */ s8 unk_04;
/* 0x05 */ char unk05[0x3];
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
} unk_func_80022C28_ret; // size = 0xC
typedef struct unk_func_8820BE14_sp {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk01[0x3];
/* 0x04 */ u8 unk_04;
/* 0x05 */ char unk05[0x1];
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ u8 unk_08;
/* 0x09 */ u8 unk_09;
/* 0x0A */ u8 unk_0A;
/* 0x0B */ u8 unk_0B;
/* 0x0C */ u8 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x0E */ s32 unk_10;
/* 0x0E */ s16 unk_14;
/* 0x0E */ s16 unk_16;
/* 0x0E */ s16 unk_18;
/* 0x0E */ s16 unk_1A;
/* 0x0E */ s16 unk_1C;
/* 0x0E */ s16 unk_1E;
/* 0x20 */ char unk20[0x4];
/* 0x24 */ u8 unk_24;
/* 0x25 */ u8 unk_25;
/* 0x26 */ char unk26[0xA];
/* 0x30 */ char unk_30[11];
/* 0x3B */ char unk_3B[11];
/* 0x46 */ char unk46[0xC];
/* 0x52 */ u8 unk_52;
/* 0x53 */ u8 unk_53;
} unk_func_8820BE14_sp; // size = 0x54
u16 func_80021A30(u8* arg0);
u32 func_80021A48(u8* arg0);
void func_80021A68(u8* arg0, s32 arg1);
@ -59,7 +102,7 @@ char* func_80021A90(char* arg0, char* arg1);
void func_80021B5C(char*, char*);
char* func_80021B7C(char* arg0, char* arg1);
void func_80021C20(char*, char*);
void func_80021C40(char* arg0, char* arg1);
char* func_80021C40(char* arg0, char* arg1);
char* func_80021C80(char* arg0, char* arg1);
char* func_80021CA4(char* arg0, s32 arg1);
char* func_80021CE0(s32 arg0, s8* arg1);
@ -71,11 +114,16 @@ u32 func_80022170(s32 arg0, s32 arg1, u16 arg2, u16 arg3, s32 arg4);
void func_80022338(unk_func_80026268_arg0* arg0);
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*);
u8 func_80022A38(s32 arg0);
u8 func_80022A60(s32 arg0);
s32 func_80022C28(s32, s32, s32, s32);
void func_80022D8C(void*);
s32 func_80022E18(unk_func_80026268_arg0*, s32, void*);
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_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);
char* func_8002311C(s32 arg0);
s32 func_80023130(u8* arg0);
@ -90,12 +138,19 @@ void func_80023D60(s32);
void func_80023F78(s32 arg0);
void func_80024040(s32 arg0);
s32 func_800240A0(void);
void func_80024208(s32);
s32 func_80024A48(s32, s32, s32);
s32 func_80024EF4(void);
s32 func_80024F00(s32);
u8 func_80024F68(s32);
s32 func_80024FB0(s32 arg0);
void func_800251B0(s32, s8*);
s32 func_80025084(s32);
s32 func_8002513C(s32);
char* func_800251B0(s32, s8*);
s32 func_80025370(s32);
s32 func_8002539C(s32);
void func_80025540(s32);
void func_800256F4(s32, s32, s32);
void func_80026E4C(s32);
#endif // _6BC0_H_

View File

@ -721,11 +721,13 @@ s32 func_8002797C(s32 arg0, s32 arg1, s32 arg2, void* arg3) {
break;
case 22:
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_1EC8.unk_0002[arg2], arg3, 0x8C);
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_1EC8.unk_0002[arg2], arg3,
sizeof(unk_D_800AE4E8_004_2_1EC8_0002));
break;
case 23:
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_3280.unk_0002[arg2], arg3, 0x8C);
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_3280.unk_0002[arg2], arg3,
sizeof(unk_D_800AE4E8_004_2_1EC8_0002));
break;
}
sp2C = 1;

View File

@ -52,6 +52,9 @@ void func_80026C0C(s32 arg0, s32 arg1);
void func_8002707C(s32 arg0, s32 arg1);
s32 func_800270AC(s32 arg0);
s32 func_80027108(s32 arg0);
s32 func_80027164(s32, s32);
s32 func_80027184(s32, s32);
void func_800272BC(s32, s32, char*);
s16 func_800275E0(s32 arg0, s32 arg1);
s32 func_8002797C(s32 arg0, s32 arg1, s32 arg2, void* arg3);
s32 func_80027C24(s32 arg0, s32 arg1, s32 arg2, void* arg3);

View File

@ -224,7 +224,7 @@ void func_8002BA34(s16 arg0, s16 arg1, s16 arg2, s16 arg3) {
void func_8002BB7C(s32 arg0, s32 arg1, s32 arg2) {
s32 i;
unk_func_80026268_arg0 sp48;
void* temp_v0;
unk_func_80022C28_ret* temp_v0;
unk_D_800AE540_0004* temp_s4;
char sp34[11];

View File

@ -1,4 +1,4 @@
#include "global.h"
#include "2D340.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/2D340/func_8002C740.s")

64
src/2D340.h Normal file
View File

@ -0,0 +1,64 @@
#ifndef _3D340_H_
#define _3D340_H_
#include "global.h"
#include "src/1C720.h"
#include "src/1AB70.h"
typedef struct unk_func_88205880_00D0 {
/* 0x000 */ unk_func_80026268_arg0 unk_000[20];
/* 0x690 */ s32 unk_690;
/* 0x694 */ s32 unk_694;
/* 0x698 */ s32 unk_698;
/* 0x69C */ u32 unk_69C;
} unk_func_88205880_00D0; // size = 0x6A0
typedef struct unk_func_88200FA0_030_038 {
/* 0x00 */ unk_func_88205880_00D0** unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
} unk_func_88200FA0_030_038; // size = 0xC
typedef struct unk_func_88201DA0_034 {
/* 0x0000 */ s32 unk_000;
/* 0x0004 */ char unk004[0x4];
/* 0x0008 */ unk_func_88201DA0_034_008 unk_008;
/* 0x000C */ char unk00C[0xC7C];
} unk_func_88201DA0_034; // size = 0xC88
typedef struct unk_func_88201DA0_038 {
/* 0x00 */ unk_func_88201DA0_034* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
} unk_func_88201DA0_038; // size = 0x10
typedef struct unk_func_88205880_A030 {
/* 0x00 */ unk_func_88205880_00D0** unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
} unk_func_88205880_A030; // size = 0xC
typedef struct unk_func_8820BE14_06C_000 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ unk_func_88200FA0_030_038 unk_04;
} unk_func_8820BE14_06C_000; // size = 0x10
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);
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);
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_8002D3F0(f32*);
Color_RGBA8 func_8002D444(Color_RGBA8, f32);
#endif // _3D340_H_

View File

@ -2,11 +2,31 @@
#define _2E460_H_
#include "global.h"
#include "src/fragments/26/fragment26.h"
typedef struct ret_func_8002ED08 {
/* 0x00 */ u8 unk_00[12];
} ret_func_8002ED08; // size = 0xC
typedef struct unk_func_8820E99C_030_030 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
} unk_func_8820E99C_030_030; // size = 0x14
void func_8002D8C8(unk_func_88500020*, s32, s32);
s32 func_8002EC08(s32);
s32 func_8002ECDC(s32);
s32 func_8002E0F4(unk_func_8820E99C_030_030*);
void func_8002E8E4(s32, s32, s32, s32);
s32 func_8002EE1C(s32, s32, s32);
void func_8002EE78(void);
void func_8002EEA8(unk_func_88001300_034*);
void func_8002EEA8(OSMesg);
ret_func_8002ED08* func_8002ED08(u8);
void func_8002EF18(s32*);
void func_8002EF44(void);
s32 func_8002F1C0(u8);
s32 func_8002F264(s32);
#endif // _2E460_H_

View File

@ -67,7 +67,8 @@ void func_8002F2A0(void) {
FRAGMENT_LOAD(fragment3);
var_s0 = FRAGMENT_LOAD_AND_CALL(fragment14, 0, 0);
break;
case 10: // seems to be the "snap mode" code. However, the asset UI isnt loaded, so this call will crash.
case 10: // seems to be the "snap mode" code. However, the asset UI isnt loaded, so this call will
// crash.
FRAGMENT_LOAD(fragment3);
var_s0 = FRAGMENT_LOAD_AND_CALL(fragment15, 0, 0);
break;
@ -75,7 +76,8 @@ void func_8002F2A0(void) {
FRAGMENT_LOAD(fragment5);
var_s0 = FRAGMENT_LOAD_AND_CALL(fragment16, 0, 0);
break;
case 12: // crashes. This fragment is the "Demo" cutscene bin, but this code passes an invalid demo ID, which doesnt exist.
case 12: // crashes. This fragment is the "Demo" cutscene bin, but this code passes an invalid demo ID,
// which doesnt exist.
FRAGMENT_LOAD(fragment3);
var_s0 = FRAGMENT_LOAD_AND_CALL(fragment17, 0, 0);
break;

View File

@ -2450,10 +2450,10 @@ void func_88000020(unk_func_88001300_000* arg0, s32 arg1, s32 arg2) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_88001300_000));
arg0->unk_18 = func_8800008C;
arg0->unk_10 = arg1;
arg0->unk_12 = arg2;
arg0->unk_16 = 0x4C;
arg0->unk_14 = 0x4C;
arg0->unk_10.unk_00 = arg1;
arg0->unk_10.unk_02 = arg2;
arg0->unk_14.unk_02 = 0x4C;
arg0->unk_14.unk_00 = 0x4C;
}
s32 func_8800008C(unk_func_88001300_000* arg0, s32 arg1, s32 arg2) {
@ -2503,10 +2503,10 @@ void func_8800071C(unk_func_8800071C* arg0, s32 arg1, s32 arg2, s32 arg3, s32 ar
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_8800071C));
arg0->unk_00.unk_18 = func_880007C0;
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_12 = arg2;
arg0->unk_00.unk_14 = arg3;
arg0->unk_00.unk_16 = arg4;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_00.unk_14.unk_00 = arg3;
arg0->unk_00.unk_14.unk_02 = arg4;
arg0->unk_2C = arg5;
arg0->unk_30 = arg6;
arg0->unk_34 = arg7;
@ -2516,8 +2516,8 @@ void func_8800071C(unk_func_8800071C* arg0, s32 arg1, s32 arg2, s32 arg3, s32 ar
s32 func_880007C0(unk_func_88001300_000* arg0, s32 arg1, s32 arg2) {
unk_func_8800071C* ptr = (unk_func_8800071C*)arg0;
func_880001A8(ptr->unk_00.unk_10, ptr->unk_00.unk_12, ptr->unk_00.unk_14, ptr->unk_00.unk_16, ptr->unk_2C,
ptr->unk_30, ptr->unk_34, ptr->unk_38);
func_880001A8(ptr->unk_00.unk_10.unk_00, ptr->unk_00.unk_10.unk_02, ptr->unk_00.unk_14.unk_00,
ptr->unk_00.unk_14.unk_02, ptr->unk_2C, ptr->unk_30, ptr->unk_34, ptr->unk_38);
return 0;
}
@ -2526,10 +2526,10 @@ void func_88000830(unk_func_88000830* arg0, s32 arg1, s32 arg2, s32 arg3, s32 ar
arg0->unk_00.unk_1C = func_880008C4;
arg0->unk_00.unk_18 = func_880008E0;
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_12 = arg2;
arg0->unk_00.unk_14 = arg3;
arg0->unk_00.unk_16 = arg4;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_00.unk_14.unk_00 = arg3;
arg0->unk_00.unk_14.unk_02 = arg4;
arg0->unk_34 = arg5;
arg0->unk_30 = arg6;
arg0->unk_2C = NULL;
@ -2553,11 +2553,11 @@ s32 func_880008E0(unk_func_88000830* arg0, s32 arg1, s32 arg2) {
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
gDPLoadTextureBlock(gDisplayListHead++, arg0->unk_30[arg0->unk_2C], G_IM_FMT_RGBA, G_IM_SIZ_16b, arg0->unk_34,
arg0->unk_00.unk_16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
arg0->unk_00.unk_14.unk_02, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, arg1 << 3, arg2 << 3, (arg0->unk_00.unk_14 + arg1) << 3,
(arg2 + arg0->unk_00.unk_16) << 3, G_TX_RENDERTILE, 0, 0, 0x0200, 0x0200);
gSPTextureRectangle(gDisplayListHead++, arg1 << 3, arg2 << 3, (arg0->unk_00.unk_14.unk_00 + arg1) << 3,
(arg2 + arg0->unk_00.unk_14.unk_02) << 3, G_TX_RENDERTILE, 0, 0, 0x0200, 0x0200);
return 0;
}
@ -2566,10 +2566,10 @@ void func_88000C18(unk_func_88000C18* arg0, s32 arg1, s32 arg2, s32 arg3, s32 ar
arg0->unk_00.unk_1C = func_88000CB0;
arg0->unk_00.unk_24 = func_88000CC0;
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_12 = arg2;
arg0->unk_00.unk_14 = arg3;
arg0->unk_00.unk_16 = arg4;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_00.unk_14.unk_00 = arg3;
arg0->unk_00.unk_14.unk_02 = arg4;
arg0->unk_2C = arg5;
arg0->unk_30 = -1;
@ -2591,8 +2591,8 @@ void func_88000CC8(unk_func_88000CC8* arg0, s32 arg1, s32 arg2, unk_func_8850002
arg0->unk_00.unk_18 = func_88000E30;
arg0->unk_00.unk_1C = func_88000D80;
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_12 = arg2;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_2C = arg3;
arg0->unk_30[0] = arg4;
arg0->unk_30[1] = arg5;
@ -2725,8 +2725,8 @@ void func_88001300(unk_func_88001300* arg0, s32 arg1, s32 arg2, s32 arg3, u8* ar
arg0->unk_00.unk_20 = func_88001D0C;
arg0->unk_00.unk_24 = func_88001CBC;
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_12 = arg2;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_3C = mem_pool_alloc(arg6, sizeof(unk_func_88001300_03C));
((func8850C284)Memmap_GetFragmentVaddr(func_8850C284))(arg0->unk_3C, 2, 4, arg6);
@ -2789,14 +2789,15 @@ void func_88001300(unk_func_88001300* arg0, s32 arg1, s32 arg2, s32 arg3, u8* ar
temp_s0 = mem_pool_alloc(arg6, sizeof(unk_func_88001300_000));
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(temp_s0, sizeof(unk_func_88001300_000));
// clang-format off
temp_s0->unk_10 = 0x1E4; temp_s0->unk_12 = 0x34;
temp_s0->unk_10.unk_00 = 0x1E4; temp_s0->unk_10.unk_02 = 0x34;
// clang-format on
temp_s0->unk_14 = 0x4C;
temp_s0->unk_16 = 0x4C;
temp_s0->unk_14.unk_00 = 0x4C;
temp_s0->unk_14.unk_02 = 0x4C;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, temp_s0);
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, temp_s0->unk_16);
((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;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(temp_s0, arg0->unk_38);
@ -3079,11 +3080,6 @@ s32 func_880025D8(unk_func_88001300* arg0) {
return sp24 - 1;
}
typedef struct func_88002628_sp38 {
/* 0x000 */ OSThread thread;
/* 0x1B0 */ char unk1B0[0x10];
} func_88002628_sp38; // size = 0x1C0
s32 func_88002628(s32 arg0, UNUSED s32 arg1) {
MemoryPool* sp44;
u8* sp40;

View File

@ -0,0 +1,720 @@
#ifndef _FRAGMENT23_H_
#define _FRAGMENT23_H_
#include "global.h"
#include "src/fragments/26/fragment26.h"
#include "src/fragments/29/fragment29.h"
#include "src/2D340.h"
#include "src/22630.h"
#include "src/2E460.h"
struct unk_func_8821421C_038_04C_000;
struct unk_func_8820B12C_02C;
struct unk_func_8821421C_034;
struct unk_func_8821421C_038;
struct unk_func_8821421C_03C;
struct unk_func_8821421C_07C;
struct unk_func_8820E99C;
struct unk_func_8821421C_02C;
typedef struct unk_func_8820EFD8 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ s32 unk_04;
/* 0x08 */ char* unk_08;
} unk_func_8820EFD8; // size >= 0xC
typedef struct unk_func_88200FA0_030 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88200FA0_030_030* unk_30;
/* 0x34 */ unk_func_88503298* unk_34;
/* 0x38 */ unk_func_88200FA0_030_038 unk_38;
} unk_func_88200FA0_030; // size = 0x44
typedef struct unk_func_88200FA0 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_885088F4* unk_2C;
/* 0x30 */ unk_func_88200FA0_030* unk_30;
} unk_func_88200FA0; // size = 0x34
typedef struct unk_func_88205880 {
/* 0x0000 */ unk_func_88001300_000 unk_0000;
/* 0x002C */ unk_func_88203ED8* unk_002C;
/* 0x0030 */ char unk0030[0x64];
/* 0x0094 */ unk_func_88201DA0* unk_0094;
/* 0x0098 */ unk_func_88205880_0098 unk_0098;
/* 0x00D0 */ unk_func_88205880_00D0 unk_00D0[12];
/* 0x5050 */ unk_func_88205880_00D0 unk_5050[12];
/* 0x9FD0 */ unk_func_88205880_00D0* unk_9FD0[12];
/* 0xA000 */ unk_func_88205880_00D0* unk_A000[12];
/* 0xA030 */ unk_func_88205880_A030 unk_A030[2];
} unk_func_88205880; // size = 0xA048
typedef struct unk_func_882062E4 {
/* 0x0000 */ char unk_00[0x54];
} unk_func_882062E4; // size = 0x54
typedef struct unk_func_88208C5C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8850143C* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
} unk_func_88208C5C; // size = 0x3C
typedef struct unk_func_882079D8 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88205880_00D0* unk_2C;
} unk_func_882079D8; // size = 0x30
typedef struct unk_func_8820BE14_030 {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ MemoryPool* unk_04;
/* 0x08 */ unk_func_88001300_000_000* unk_08;
/* 0x0C */ unk_func_88205880_00D0* unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ unk_func_88001300_000* unk_14;
/* 0x18 */ s32 unk_18;
} unk_func_8820BE14_030; // size >= 0x1C
typedef struct unk_func_8820B12C_02C_020 {
/* 0x00 */ unk_func_88200FA0_030_030_1AE680 unk_00; // unk_func_882025E0_024
/* 0x54 */ u16 unk_54;
/* 0x56 */ u16 unk_56;
/* 0x58 */ s32 unk_58;
/* 0x5C */ s32 unk_5C;
/* 0x60 */ s32 unk_60;
/* 0x64 */ s32 unk_64;
/* 0x68 */ s32 unk_68;
/* 0x6C */ s32 unk_6C;
/* 0x70 */ s32 unk_70;
/* 0x74 */ unk_func_88001300_01C unk_74;
/* 0x78 */ unk_func_88001300_018 unk_78;
/* 0x7C */ unk_func_88001300_020 unk_7C;
/* 0x80 */ unk_func_88001300_018 unk_80;
/* 0x84 */ unk_func_8820BE14_02C_038_084* unk_84;
/* 0x88 */ s32* unk_88;
/* 0x8C */ u32 unk_8C;
} unk_func_8820B12C_02C_020; // size = 0x90
typedef s32 (*unk_func_8820B12C_02C_010)(struct unk_func_8820B12C_02C* arg0, Controller* arg1);
typedef void (*unk_func_8820B12C_02C_014)(struct unk_func_8820B12C_02C* arg0, s32 arg1);
typedef struct unk_func_8820B12C_02C {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_8820B12C_02C* unk_04;
/* 0x08 */ struct unk_func_8820B12C_02C* unk_08;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ unk_func_8820B12C_02C_010 unk_10;
/* 0x14 */ unk_func_8820B12C_02C_014 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ unk_func_8820B12C_02C_020* unk_20[2];
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ unk_func_88217740* unk_38;
/* 0x3C */ unk_func_88509F48* unk_3C;
/* 0x40 */ unk_func_8850CD44* unk_40;
/* 0x44 */ FragmentEntry unk_44;
/* 0x48 */ unk_func_8820BE14_030* unk_48;
/* 0x4C */ unk_func_882173EC* unk_4C[2];
/* 0x54 */ unk_func_882079D8* unk_54[2];
/* 0x5C */ unk_func_8850878C* unk_5C[6];
/* 0x74 */ s32 unk_74;
} unk_func_8820B12C_02C; // size = 0x78
typedef struct unk_func_8820B12C_000 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_8820B12C_000* unk_04;
/* 0x08 */ struct unk_func_8820B12C_000* unk_08;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ unk_func_88203ED8_064_010 unk_10;
/* 0x14 */ unk_func_88203ED8_064_014 unk_14;
/* 0x18 */ char unk18[0x4];
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ struct unk_func_8820BE14_02C* unk_24;
} unk_func_8820B12C_000; // size = 0x28
typedef struct unk_func_8820B12C {
/* 0x00 */ unk_func_8820B12C_000 unk_00;
/* 0x28 */ unk_func_88001300_03C* unk_28;
/* 0x28 */ unk_func_8820B12C_02C* unk_2C;
} unk_func_8820B12C; // size = 0x30
typedef struct unk_func_8820BE14_02C_070 {
/* 0x0000 */ unk_func_88001300_000 unk_0000;
/* 0x002C */ unk_func_88205880_00D0* unk_002C;
/* 0x0030 */ s16 unk_0030;
/* 0x0032 */ char unk0032[0x7];
/* 0x0039 */ u8 unk_0039[2][0xC80];
} unk_func_8820BE14_02C_070; // size = 0x193C
typedef struct unk_func_8820BE14_02C_078_034 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88200FA0_030_030* unk_30;
} unk_func_8820BE14_02C_078_034; // size = 0x34
typedef struct unk_func_8820BE14_02C_078 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88200FA0_030_030* unk_30;
/* 0x34 */ unk_func_8820BE14_02C_078_034* unk_34;
/* 0x38 */ unk_func_8820BE14_06C unk_38;
/* 0x48 */ s32 unk_48;
/* 0x4C */ s32 unk_4C;
/* 0x50 */ s32 unk_50;
/* 0x54 */ s32 unk_54;
/* 0x58 */ s32 unk_58;
/* 0x5C */ s32 unk_5C;
} unk_func_8820BE14_02C_078; // size = 0x60
typedef struct unk_func_8820BE14_02C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88208C5C* unk_30[2];
/* 0x38 */ unk_func_8820BE14_02C_038* unk_38[2];
/* 0x40 */ unk_func_88217740* unk_40;
/* 0x44 */ unk_func_882149A0* unk_44[8];
/* 0x64 */ unk_func_88500994* unk_64;
/* 0x68 */ unk_func_88500994* unk_68;
/* 0x6C */ unk_func_88500994* unk_6C;
/* 0x70 */ unk_func_8820BE14_02C_070* unk_70;
/* 0x74 */ unk_func_8820B12C* unk_74;
/* 0x78 */ unk_func_8820BE14_02C_078* unk_78[2];
/* 0x80 */ unk_func_88509F48* unk_80;
/* 0x84 */ unk_func_889000C4* unk_84;
/* 0x88 */ unk_func_8850878C* unk_88;
/* 0x8C */ unk_func_8820BE14_06C* unk_8C;
/* 0x90 */ char unk90[0x10];
} unk_func_8820BE14_02C; // size = 0xA0
typedef struct unk_func_8820BE14 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8820BE14_02C* unk_2C;
/* 0x30 */ unk_func_8820BE14_030 unk_30;
/* 0x4C */ char** unk_4C;
/* 0x50 */ char** unk_50;
/* 0x54 */ char** unk_54;
/* 0x58 */ char** unk_58;
/* 0x5C */ char** unk_5C;
/* 0x60 */ char** unk_60;
/* 0x64 */ char** unk_64;
/* 0x68 */ unk_func_88509F48* unk_68;
/* 0x6C */ unk_func_8820BE14_06C unk_6C;
/* 0x7C */ unk_func_8820BE14_06C unk_7C;
/* 0x8C */ unk_func_8820BE14_06C unk_8C;
} unk_func_8820BE14; // size = 0x9C
typedef struct unk_func_882170A8 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8820BE14_02C_038* unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_882170A8; // size = 0x34
typedef struct unk_D_88217C6C {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ u8* unk_08;
/* 0x0C */ s16 unk_0C;
/* 0x10 */ Color_RGBA8* unk_10;
/* 0x14 */ s32 unk_14;
} unk_D_88217C6C; // size = 0x18
typedef struct unk_func_8821421C_02C_06C_02C_068 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
} unk_func_8821421C_02C_06C_02C_068; // size = 0x30
typedef struct unk_func_8820E99C_030 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_8820E99C_030_030 unk_30;
/* 0x44 */ unk_func_8820E99C_030_044* unk_44;
} unk_func_8820E99C_030; // size = 0x48
typedef struct unk_func_8820E99C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_8820E99C_030* unk_30;
/* 0x34 */ s32 unk_34;
} unk_func_8820E99C; // size = 0x38
typedef struct unk_func_8821421C_034 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88001300_03C* unk_30;
/* 0x34 */ unk_func_8850878C* unk_34;
} unk_func_8821421C_034; // size = 0x38
typedef struct unk_func_8821421C_038_02C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8850143C* unk_2C;
/* 0x30 */ unk_func_8821421C_038_050* unk_30;
} unk_func_8821421C_038_02C; // size = 0x34
typedef struct spE8_func_882121E0 {
/* 0x00 */ char* unk_00[3];
} spE8_func_882121E0; // size >= 0xC
typedef struct unk_func_8821421C_02C_030 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8850143C* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ spE8_func_882121E0* unk_38;
} unk_func_8821421C_02C_030; // size = 0x3C
typedef struct unk_func_8821421C_02C_06C_02C_060_02C_000 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
} unk_func_8821421C_02C_06C_02C_060_02C_000; // size = 0x2
typedef struct unk_func_8821421C_02C_06C_02C_060_02C {
/* 0x00 */ unk_func_8821421C_02C_06C_02C_060_02C_000 unk_00;
/* 0x02 */ unk_func_8821421C_02C_06C_02C_060_02C_000 unk_02;
} unk_func_8821421C_02C_06C_02C_060_02C; // size >= 0x4
typedef struct unk_func_8821421C_02C_06C_02C_060 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8821421C_02C_06C_02C_060_02C unk_2C;
} unk_func_8821421C_02C_06C_02C_060; // size = 0x30
typedef struct unk_func_8821421C_02C_06C_02C {
/* 0x00 */ char unk00[0x10];
/* 0x10 */ unk_func_882025E0_010 unk_10;
/* 0x14 */ unk_func_882025E0_014 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ unk_func_8820BE14_02C_038* unk_20[2];
/* 0x28 */ struct unk_func_8820E99C* unk_28;
/* 0x2C */ unk_func_8820BE14_02C_038* unk_2C[2];
/* 0x34 */ struct unk_func_8820E99C* unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s32 unk_3C;
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
/* 0x48 */ unk_func_88217740* unk_48;
/* 0x4C */ unk_func_88509F48* unk_4C;
/* 0x50 */ unk_func_8850CD44* unk_50;
/* 0x54 */ char unk54[0x4];
/* 0x58 */ unk_func_882173EC* unk_58[2];
/* 0x60 */ unk_func_8821421C_02C_06C_02C_060* unk_60[2];
/* 0x68 */ unk_func_8821421C_02C_06C_02C_068* unk_68[2];
/* 0x70 */ unk_func_8821421C_02C_06C_02C_060* unk_70[2];
/* 0x78 */ unk_func_882025E0_03C unk_78[5];
} unk_func_8821421C_02C_06C_02C; // size = 0xB4
typedef struct unk_func_8821421C_02C_06C_000 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_88203ED8_064* unk_04;
/* 0x08 */ struct unk_func_88203ED8_064* unk_08;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ unk_func_88203ED8_064_010 unk_10;
/* 0x14 */ unk_func_88203ED8_064_014 unk_14;
/* 0x18 */ char unk18[0x4];
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ struct unk_func_8821421C_02C* unk_24;
} unk_func_8821421C_02C_06C_000; // size = 0x28
typedef struct unk_func_8821421C_02C_06C {
/* 0x00 */ unk_func_8821421C_02C_06C_000 unk_00;
/* 0x28 */ unk_func_88001300_03C* unk_28;
/* 0x2C */ unk_func_8821421C_02C_06C_02C* unk_2C;
} unk_func_8821421C_02C_06C; // size = 0x30
typedef struct unk_func_8821421C_02C_070 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88200FA0_030_030* unk_30;
/* 0x34 */ unk_func_88205880_A030 unk_34;
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
/* 0x48 */ s32 unk_48;
} unk_func_8821421C_02C_070; // size = 0x4C
typedef struct unk_func_8821421C_02C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_8821421C_02C_030* unk_30[2];
/* 0x38 */ unk_func_8820BE14_02C_038* unk_38[2];
/* 0x40 */ unk_func_88217740* unk_40;
/* 0x44 */ unk_func_882149A0* unk_44[6];
/* 0x5C */ unk_func_88500994* unk_5C;
/* 0x60 */ unk_func_88500994* unk_60;
/* 0x64 */ unk_func_88500994* unk_64;
/* 0x68 */ unk_func_8850878C* unk_68;
/* 0x6C */ unk_func_8821421C_02C_06C* unk_6C;
/* 0x70 */ unk_func_8821421C_02C_070* unk_70[2];
/* 0x78 */ struct unk_func_8821421C_03C* unk_78;
/* 0x78 */ struct unk_func_8821421C_03C* unk_7C;
/* 0x80 */ s32 unk_80;
/* 0x84 */ struct unk_func_8821421C_038* unk_84;
/* 0x88 */ struct unk_func_8821421C_034* unk_88;
/* 0x8C */ unk_func_88509F48* unk_8C;
/* 0x90 */ struct unk_func_8821421C_07C* unk_90;
/* 0x94 */ unk_func_882025E0_03C unk_94[1];
/* 0xA0 */ unk_func_889000C4* unk_A0;
} unk_func_8821421C_02C; // size = 0xA4
typedef void (*unk_func_8821421C_038_04C_000_014)(struct unk_func_8821421C_038_04C_000*, Controller*);
typedef struct unk_func_8821421C_038_04C_000 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_88203ED8_064* unk_04;
/* 0x08 */ struct unk_func_88203ED8_064* unk_08;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ unk_func_88203ED8_064_010 unk_10;
/* 0x14 */ unk_func_8821421C_038_04C_000_014 unk_14;
/* 0x18 */ char unk18[0x4];
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ struct unk_func_8821421C_038* unk_24;
} unk_func_8821421C_038_04C_000; // size = 0x28
typedef struct unk_func_8821421C_038_04C {
/* 0x00 */ unk_func_8821421C_038_04C_000 unk_00;
/* 0x28 */ unk_func_88001300_03C* unk_28;
} unk_func_8821421C_038_04C; // size = 0x2C
typedef struct unk_func_8821421C_03C {
/* 0x00 */ s32 unk_00;
/* 0x04 */ unk_func_8820BE14_06C unk_04;
} unk_func_8821421C_03C; // size = 0x14
typedef struct unk_func_8821421C_07C {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ char unk_08[4]; // unk size
/* 0x0C */ char unk0C[0x8];
} unk_func_8821421C_07C; // size = 0x14
typedef struct unk_func_8821421C_038 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8821421C_038_02C* unk_2C;
/* 0x30 */ unk_func_8820BE14_02C_038* unk_30;
/* 0x34 */ unk_func_8821421C_038_034* unk_34;
/* 0x38 */ unk_func_88500994* unk_38;
/* 0x3C */ unk_func_88500994* unk_3C;
/* 0x40 */ unk_func_8850878C* unk_40;
/* 0x44 */ unk_func_88001300_038* unk_44;
/* 0x48 */ unk_func_8821421C_034* unk_48;
/* 0x4C */ unk_func_8821421C_038_04C* unk_4C;
/* 0x50 */ unk_func_8821421C_038_050* unk_50[1];
/* 0x54 */ char unk54[0xC];
/* 0x60 */ s32 unk_60;
/* 0x64 */ unk_func_8820BE14_06C unk_64;
/* 0x74 */ char unk74[0x4];
} unk_func_8821421C_038; // size = 0x78
typedef struct unk_func_8821421C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8821421C_02C* unk_2C;
/* 0x34 */ unk_func_88509F48* unk_30;
/* 0x34 */ unk_func_8821421C_034* unk_34;
/* 0x38 */ unk_func_8821421C_038* unk_38;
/* 0x3C */ unk_func_8821421C_03C unk_3C[3];
/* 0x78 */ s32 unk_78;
/* 0x7C */ unk_func_8821421C_07C unk_7C[4];
} unk_func_8821421C; // size = 0xCC
extern Color_RGBA8 D_882181B0[2];
extern Color_RGBA8 D_882181B8[2];
extern Color_RGBA8 D_882181C0[2];
extern Color_RGBA8 D_882181C8[2];
extern Color_RGBA8 D_882181D0[2];
extern Color_RGBA8 D_882181D8[2];
extern Color_RGBA8 D_882181E0[2];
extern Color_RGBA8 D_882181E8[2];
extern Color_RGBA8 D_882181F0[2];
extern Color_RGBA8 D_882181F8[2];
extern Color_RGBA8 D_88218200[2];
extern Color_RGBA8 D_88218208[2];
extern Color_RGBA8 D_88218210[2];
extern Color_RGBA8 D_88218218[2];
extern Color_RGBA8 D_88218220[2];
extern Color_RGBA8 D_88218228[2];
extern Color_RGBA8 D_88218230[2];
extern Color_RGBA8 D_88218238[2];
extern u32 D_8821E100[];
extern u32 D_88218FD0[];
extern u32 D_8821B868[];
extern u32 D_8821AAE0[];
extern u32 D_88219D58[];
extern u32 D_88218248[];
extern u32 D_8821C5F0[];
extern u32 D_8821D378[];
extern u32 D_8821EE88[];
extern u32 D_882220D8[];
extern u32 D_882225C0[];
extern u32 D_88222AA8[];
extern u32 D_88222F90[];
extern u32* D_88223470[];
extern u32 D_88223488[];
extern u32 D_88223E48[];
s32 func_88200020(void);
void func_882000E4(void);
s32 func_88200110(UNUSED s32 arg0, UNUSED s32 arg1);
s32 func_88200190(s32 arg0, s32 arg1);
void func_88200290(unk_func_88503298* arg0, s32 arg1, s32 arg2, MemoryPool* arg3);
void func_882004BC(unk_func_88503298* arg0, s8* arg1);
void func_882004C8(unk_func_88200FA0_030* arg0, s32 arg1, s32 arg2, unk_func_88001300_000* arg3, MemoryPool* arg4);
void func_88200968(unk_func_88200FA0_030* arg0, s32 arg1);
void func_882009B4(s32 arg0, s32 arg1, char* arg2, s32 arg3);
s32 func_88200A30(unk_func_88200FA0_030* arg0, Controller* arg1);
void func_88200ACC(unk_func_88200FA0_030* arg0);
void func_88200AF4(unk_func_88200FA0_030* arg0);
s32 func_88200B60(unk_func_88200FA0_030* arg0, Controller* arg1);
void func_88200C44(unk_func_88200FA0* arg0, s32 arg1, s32 arg2, s32 arg3, MemoryPool* arg4);
s32 func_88200F00(unk_func_88200FA0* arg0);
void func_88200FA0(unk_func_88200FA0* arg0);
s32 func_8820104C(s32 arg0, UNUSED s32 arg1);
void func_88201210(unk_func_88205880_00D0* arg0);
void func_88201294(s32 arg0, s32 arg1, s32 arg2, unk_func_88205880_00D0* arg3);
s32 func_8820130C(s32 arg0, s32 arg1, s32 arg2, unk_func_88205880_00D0* arg3, s32 arg4);
void func_88201360(unk_func_88205880_00D0* arg0, s32 arg1, s32 arg2, s32 arg3);
s32 func_882013F8(unk_func_88205880_A030* arg0);
s32 func_88201440(unk_func_88205880_A030* arg0);
void func_88202054(unk_func_88201DA0* arg0, u32 arg1, u32 arg2);
void func_8820213C(unk_func_88201DA0* arg0, unk_func_88205880_00D0* arg1, u32 arg2);
void func_88202228(unk_func_88203ED8* arg0, s32 arg1);
s32 func_88202254(unk_func_88201DA0* arg0, Controller* arg1);
void func_88202394(unk_func_88201DA0* arg0, Controller* arg1);
void func_88202450(unk_func_88205880_00D0* arg0, s32 arg1, s32 arg2);
void func_8820253C(unk_func_8820253C* arg0, s32 arg1, s32 arg2, unk_func_88205880_00D0* arg3);
void func_882025AC(unk_func_8820253C* arg0, unk_func_88205880_00D0* arg1);
s32 func_882025B4(unk_func_8820253C* arg0, s32 arg1, s32 arg2);
void func_882025E0(unk_func_882025E0_1A9780* arg0, unk_func_88200FA0_030_030* arg1, unk_func_88200FA0_030_030* arg2, unk_func_88203ED8* arg3, MemoryPool* arg4);
void func_88202738(unk_func_882025E0_1A9780* arg0, s32 arg1);
void func_88202758(unk_func_882025E0_1A9780* arg0);
void func_882027F0(unk_func_882025E0_1A9780* arg0, s32 arg1);
void func_88202810(unk_func_882025E0_1A9780* arg0, unk_func_88205880_00D0** arg1, unk_func_88205880_00D0** arg2);
void func_882028EC(unk_func_882025E0_1A9780* arg0, unk_func_88001300_000_010* arg1, unk_func_88001300_000_010* arg2);
void func_88202A2C(unk_func_88200FA0_030_030* arg0);
void func_88202B74(unk_func_88200FA0_030_030* arg0);
void func_88202CBC(unk_func_882025E0_1A9780* arg0);
void func_88202D60(unk_func_882025E0_1A9780* arg0, s32 arg1);
void func_88202E74(unk_func_882025E0_1A9780* arg0, s32 arg1);
void func_88202E98(unk_func_882025E0_1A9780* arg0);
void func_88202EB8(unk_func_882025E0_1A9780* arg0);
s32 func_88202ED8(unk_func_882025E0_1A9780* arg0);
void func_88202EF4(unk_func_882025E0_1A9780* arg0);
void func_88202F2C(unk_func_882025E0_1A9780* arg0);
s32 func_88202F70(unk_func_882025E0_1A9780* arg0, Controller* arg1);
void func_8820399C(unk_func_8820399C* arg0, s32 arg1, unk_func_8850143C* arg2);
s32 func_88203A20(unk_func_8820399C* arg0, s32 arg1, s32 arg2);
s32 func_88204BA8(unk_func_88203ED8* arg0);
void func_88204BFC(unk_func_88203ED8* arg0, s32 arg1);
s32 func_88204C28(unk_func_88203ED8* arg0, Controller* arg1);
void func_88204C74(unk_func_88203ED8* arg0);
void func_88204CBC(unk_func_88203ED8* arg0);
void func_88204DC0(unk_func_88203ED8_064* arg0, unk_func_88203ED8* arg1);
u32 func_88204E0C(unk_func_88205880_00D0* arg0, s32 arg1, s32 arg2, s32 arg3);
s32 func_88204EE8(unk_func_88203ED8* arg0);
void func_8820508C(unk_func_88203ED8* arg0, s32 arg1);
s32 func_882051EC(unk_func_88203ED8* arg0, Controller* arg1);
s32 func_882052F4(unk_func_88203ED8_064* arg0, Controller* arg1);
void func_882057B4(unk_func_88203ED8* arg0, Controller* arg1);
s32 func_88205DD0(unk_func_88205880* arg0, Controller* arg1);
void func_88205DF8(unk_func_88205880* arg0);
void func_88205E94(unk_func_88205880* arg0);
void func_88206110(unk_func_8820BE14_sp* arg0);
s32 func_882062E4(unk_func_882062E4* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
s32 func_88206868(unk_func_8820BE14_02C_078_034* arg0, Controller* arg1);
s32 func_882068B4(unk_func_88001300_034* arg0, Controller* arg1);
s32 func_882069C0(void);
void func_88206A20(unk_func_8820BE14_02C_078_034* arg0, s32 arg1, s32 arg2, MemoryPool* arg3);
s32 func_88206BA0(void);
u32 func_88206E50(unk_func_8820BE14_02C_078* arg0);
void func_88206E80(unk_func_8820BE14_02C_078* arg0, u32 arg1);
void func_88206F0C(unk_func_8820BE14_02C_078* arg0, u32 arg1);
s32 func_88206F44(unk_func_8820BE14_02C_078* arg0, Controller* arg1);
s32 func_88207154(unk_func_8820BE14_02C_078* arg0, Controller* arg1);
void func_8820723C(unk_func_88205880_00D0* arg0, s32 arg1, s32 arg2, s32 arg3);
void func_882079D8(unk_func_882079D8* arg0, s32 arg1, s32 arg2, s32 arg3, unk_func_88205880_00D0* arg4);
void func_88207A54(unk_func_882079D8* arg0, unk_func_88205880_00D0* arg1);
s32 func_88207A5C(unk_func_882079D8* arg0, s32 arg1, s32 arg2);
void func_88207BFC(unk_func_8820B12C_02C* arg0, s32 arg1);
void func_88207C34(unk_func_8820B12C_02C* arg0, s32 arg1);
void func_88207C54(unk_func_8820B12C_02C* arg0);
void func_88207CEC(unk_func_8820B12C_02C* arg0, s32 arg1);
void func_88207D0C(unk_func_8820B12C_02C* arg0, s32 arg1);
void func_88207D18(unk_func_8820B12C_02C* arg0);
void func_88207D38(unk_func_8820B12C_02C* arg0, unk_func_88205880_00D0** arg1, unk_func_88205880_00D0** arg2);
void func_88207E14(unk_func_8820B12C_02C* arg0, unk_func_88001300_000_010* arg1, unk_func_88001300_000_010* arg2);
void func_88207F84(unk_func_8820B12C_02C* arg0, s32 arg1);
void func_88208124(unk_func_8820B12C_02C* arg0);
s32 func_88208160(unk_func_8820B12C_02C* arg0);
void func_8820817C(unk_func_8820B12C_02C_020* arg0, unk_func_8820B12C_02C_020* arg1);
void func_8820820C(unk_func_8820B12C_02C_020* arg0, s32 arg1, s32 arg2);
void func_88208250(unk_func_8820B12C_02C_020* arg0, unk_func_8820B12C_02C_020* arg1);
void func_882082BC(unk_func_8820B12C_02C_020* arg0);
void func_882082FC(unk_func_8820B12C_02C* arg0, Controller* arg1);
void func_882083D0(unk_func_8820B12C_02C* arg0, Controller* arg1, s32 arg2);
void func_88208508(unk_func_8820B12C_02C* arg0);
s32 func_88208600(unk_func_8820B12C_02C* arg0, Controller* arg1);
unk_func_88205880_00D0* func_88208BFC(unk_func_8820B12C_02C* arg0);
void func_88208C5C(unk_func_88208C5C* arg0, unk_func_8850143C* arg1);
s32 func_88208CE4(unk_func_88208C5C* arg0, s32 arg1, s32 arg2);
u32 func_882091E4(unk_func_88208C5C* arg0);
void func_882091F8(unk_func_88208C5C* arg0, u32 arg1);
void func_8820920C(unk_func_8820BE14_02C_070* arg0, s32 arg1, s32 arg2);
void func_8820927C(s32 arg0, s32 arg1, ret_func_8002ED08* arg2, s32 arg3);
s32 func_8820938C(unk_func_8820BE14_02C_070* arg0, s32 arg1, s32 arg2);
void func_88209A88(unk_func_8820BE14_02C_070* arg0, unk_func_88205880_00D0* arg1);
s32 func_88209AF0(unk_func_8820BE14_06C* arg0);
s32 func_8820ADEC(unk_func_8820BE14_02C* arg0);
s32 func_8820AF78(unk_func_8820BE14_02C* arg0, Controller* arg1);
s32 func_8820AFC4(unk_func_8820BE14_02C* arg0, Controller* arg1);
void func_8820B0A0(unk_func_8820BE14_02C* arg0, s32 arg1);
void func_8820B0E0(unk_func_8820B12C_02C* arg0);
void func_8820B12C(unk_func_8820B12C* arg0, unk_func_8820BE14_02C* arg1);
s32 func_8820B178(unk_func_8820BE14_06C_000* arg0, s32 arg1, s32 arg2, s32 arg3);
s32 func_8820B2A4(unk_func_8820BE14_02C* arg0);
s32 func_8820B3AC(unk_func_8820BE14_02C* arg0);
void func_8820B3C0(s32 arg0, s32 arg1, s32 arg2, unk_func_88200FA0_030_038* arg3);
void func_8820B480(unk_func_88200FA0_030_038* arg0, s32 arg1);
void func_8820B504(unk_func_8820BE14_02C* arg0, s32 arg1);
s32 func_8820B714(unk_func_8820BE14_02C* arg0, Controller* arg1);
s32 func_8820B838(unk_func_8820B12C* arg0, Controller* arg1);
void func_8820C510(unk_func_8820BE14* arg0);
void func_8820C5BC(unk_func_8820BE14* arg0);
void func_8820C63C(unk_func_8820BE14* arg0);
void func_8820C700(s32 arg0, s32 arg1);
void func_8820C930(s32 arg0, s32 arg1, s32 arg2, unk_func_8820BE14_06C* arg3);
void func_8820C97C(s32 arg0, s32 arg1, s32 arg2, unk_func_8820BE14_06C* arg3, s32 arg4, char* arg5, s32 arg6);
void func_8820CA2C(unk_func_8821421C_07C* arg0);
s32 func_8820CAB4(unk_func_8821421C_07C* arg0, s32 arg1, char* arg2);
void func_8820CBA0(unk_func_8821421C_02C_030* arg0, unk_func_8850143C* arg1, spE8_func_882121E0* arg2);
s32 func_8820CC30(unk_func_8821421C_02C_030* arg0, s32 arg1, s32 arg2);
s32 func_8820D0E4(unk_func_8821421C_02C_030* arg0);
void func_8820D0EC(unk_func_8821421C_02C_030* arg0, s32 arg1);
void func_8820D0F4(unk_func_8821421C_034* arg0, s32 arg1, s32 arg2, MemoryPool* arg3);
s32 func_8820D564(unk_func_8821421C_034* arg0, Controller* arg1);
void func_8820D5E8(unk_func_8821421C_034* arg0, s32 arg1);
void func_8820D614(unk_func_8821421C_034* arg0, char* arg1);
s32 func_8820D620(unk_func_8821421C_034* arg0, Controller* arg1);
s32 func_8820D754(spE8_func_882121E0* arg0, s32 arg1);
void func_8820D7C8(s32 arg0, s32 arg1, s8* arg2, s32 arg3, s32 arg4, unk_func_88200FA0_030_030* arg5);
s32 func_8820DB98(unk_func_8821421C_02C_070* arg0, Controller* arg1);
void func_8820DBE4(unk_func_8821421C_02C_070* arg0, s32 arg1);
s32 func_8820DC10(unk_func_8821421C_02C_070* arg0);
void func_8820DC1C(unk_func_8821421C_02C_070* arg0, s32 arg1);
void func_8820DC90(unk_func_8821421C_02C_070* arg0);
void func_8820DCC4(unk_func_8821421C_02C_070* arg0);
s32 func_8820DCD4(unk_func_8821421C_02C_070* arg0, Controller* arg1);
void func_8820DDC0(unk_func_8821421C_02C_070* arg0, s32 arg1);
s32 func_8820DDE4(u8* arg0, s32 arg1, s32 arg2, s32 arg3);
void func_8820DF38(s32 arg0, s32 arg1, u8* arg2, s32 arg3, s32 arg4, unk_func_8820BE14_02C_038* arg5);
void func_8820E5BC(unk_func_8821421C_02C_06C_02C_060* arg0, s32 arg1, s32 arg2, s32 arg3);
void func_8820E638(unk_func_8821421C_02C_06C_02C_060* arg0, unk_func_8821421C_02C_06C_02C_060_02C_000 arg1);
s32 func_8820E654(unk_func_8821421C_02C_06C_02C_060* arg0, s32 arg1, s32 arg2);
void func_8820E680(unk_func_8820E99C_030* arg0, s32 arg1);
void func_8820E6A0(unk_func_8820E99C_030* arg0, s32 arg1, s32 arg2, MemoryPool* arg3);
void func_8820E7B0(unk_func_8820E99C_030* arg0, s32 arg1);
s32 func_8820E818(unk_func_8820E99C_030* arg0);
s32 func_8820E850(unk_func_8820E99C_030* arg0, s32 arg1, s32 arg2);
s32 func_8820E90C(unk_func_8820E99C_030* arg0, Controller* arg1);
void func_8820E978(unk_func_8820E99C* arg0, s32 arg1, s32 arg2);
void func_8820E99C(unk_func_8820E99C* arg0, s32 arg1, s32 arg2, MemoryPool* arg3);
void func_8820EBF0(unk_func_8820E99C* arg0, s32 arg1);
s32 func_8820EC1C(unk_func_8820E99C* arg0, Controller* arg1);
void func_8820EC68(unk_func_8820E99C* arg0);
void func_8820EC9C(unk_func_8820E99C* arg0);
void func_8820ECAC(unk_func_8821421C_038_02C* arg0, unk_func_8850143C* arg1);
s32 func_8820ED14(unk_func_8821421C_038_02C* arg0, s32 arg1, s32 arg2);
void func_8820EFD0(unk_func_8821421C_038_02C* arg0, unk_func_8821421C_038_050* arg1);
void func_8820EFD8(s32 arg0, s32 arg1, unk_func_8820EFD8* arg2, s32 arg3, s32 arg4, unk_func_8821421C_038_034* arg5);
void func_8820FFF8(unk_func_8821421C_038* arg0, unk_func_8821421C_07C* arg1);
s32 func_8821004C(unk_func_8821421C_038* arg0);
s32 func_88210168(unk_func_8821421C_038* arg0, Controller* arg1);
void func_882101B4(unk_func_8821421C_038* arg0, s32 arg1);
void func_882101E0(unk_func_8821421C_038* arg0, s32 arg1);
s32 func_88210234(unk_func_8821421C_038* arg0, Controller* arg1);
void func_88210334(unk_func_8821421C_038_04C* arg0, unk_func_8821421C_038* arg1);
s32 func_88210380(unk_func_8821421C_038_04C* arg0, Controller* arg1);
void func_882107D0(unk_func_8821421C_02C_06C_02C* arg0, s32 arg1);
void func_882107F0(unk_func_8821421C_02C_06C_02C* arg0);
void func_88210888(unk_func_8821421C_02C_06C_02C* arg0, s32 arg1);
void func_882108A8(unk_func_8821421C_02C_06C_02C* arg0);
void func_88210B38(unk_func_8821421C_02C_06C_02C* arg0, s32 arg1);
void func_88210BFC(unk_func_8821421C_02C_06C_02C* arg0, s32 arg1);
void func_88210D2C(unk_func_8821421C_02C_06C_02C* arg0, s32 arg1);
void func_88210D50(unk_func_8821421C_02C_06C_02C* arg0);
s32 func_88210D8C(unk_func_8821421C_02C_06C_02C* arg0);
void func_88210DA8(void);
s32 func_88210DB0(s32 arg0, unk_func_8820BE14_06C* arg1);
s32 func_88210DF4(s32 arg0, unk_func_8820BE14_06C* arg1);
void func_88210E70(unk_func_8820BE14_02C_038* arg0, u8* arg1);
void func_88210E98(unk_func_8820BE14_02C_038* arg0, s32 arg1);
void func_88210F00(unk_func_8820BE14_02C_038* arg0);
void func_88210F74(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2);
void func_88211088(unk_func_8820BE14_02C_038* arg0, s32 arg1);
void func_882110E0(unk_func_8820BE14_02C_038* arg0, unk_func_8820BE14_02C_038* arg1, unk_func_8820E99C* arg2);
s32 func_882111C0(unk_func_8821421C_02C_06C_02C_060_02C_000* arg0, unk_func_8821421C_02C_06C_02C_060_02C_000* arg1);
void func_882111F8(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2);
void func_882112E4(unk_func_8820BE14_02C_038* arg0, unk_func_8820BE14_02C_038* arg1);
void func_88211380(unk_func_8821421C_02C_06C_02C* arg0, Controller* arg1);
void func_88211508(unk_func_8821421C_02C_06C_02C* arg0, Controller* arg1);
void func_88211794(unk_func_8821421C_02C_06C_02C* arg0, Controller* arg1);
s32 func_882118CC(unk_func_8821421C_02C_06C_02C* arg0, Controller* arg1);
u8* func_88212150(unk_func_8821421C_02C_06C_02C* arg0);
s32 func_8821347C(unk_func_8821421C_02C* arg0);
s32 func_882135D4(unk_func_8821421C_02C* arg0, Controller* arg1);
s32 func_88213618(unk_func_8821421C_02C* arg0, Controller* arg1);
void func_882136F8(unk_func_8821421C_02C* arg0, s32 arg1);
void func_88213738(unk_func_8821421C_02C* arg0);
void func_88213774(unk_func_8821421C_02C_06C* arg0, unk_func_8821421C_02C* arg1);
s32 func_882137B4(unk_func_8821421C_03C* arg0, s32 arg1, s32 arg2, s32 arg3);
s32 func_882138D4(unk_func_8821421C_02C* arg0);
void func_882139C0(unk_func_8821421C_02C* arg0, s32 arg1);
s32 func_88213B90(unk_func_8821421C_02C* arg0, Controller* arg1);
s32 func_88213CA0(unk_func_8821421C_02C_06C* arg0, Controller* arg1);
void func_8821421C(unk_func_8821421C* arg0, s32 arg1, s32 arg2, MemoryPool* arg3, s32 arg4, char** arg5);
void func_88214720(unk_func_8821421C* arg0);
void func_882147BC(unk_func_8821421C* arg0);
void func_8821483C(s32 arg0);
void func_882149A0(unk_func_882149A0* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, Color_RGBA8 arg7, Color_RGBA8 arg8, Color_RGBA8 arg9);
s32 func_88214A58(unk_func_882149A0* arg0, s32 arg1, s32 arg2);
void func_882158BC(unk_func_882149A0* arg0);
void func_882158CC(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2, s32 arg3, void (*arg4)(), s32 arg5, s32 arg6, MemoryPool* arg7);
void func_88215974(unk_func_88200FA0_030_030* arg0, s32 arg1);
void func_882159AC(unk_func_8820BE14_02C_038* arg0, unk_func_88507D4C* arg1);
s32 func_882159BC(unk_func_8820BE14_02C_038* arg0);
s32 func_88215D18(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2, s32 arg3);
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_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);
void func_882173EC(unk_func_882173EC* arg0, s32 arg1, s32 arg2);
s32 func_88217460(unk_func_882173EC* arg0);
void func_882175F4(unk_func_882173EC* arg0, unk_func_88001300_000_010 arg1, unk_func_88001300_000_010 arg2);
void func_88217650(unk_func_8821421C_02C_06C_02C_068* arg0, s32 arg1, s32 arg2);
s32 func_882176C4(unk_func_8821421C_02C_06C_02C_068* arg0);
void func_88217718(unk_func_8821421C_02C_06C_02C_068* arg0, unk_func_88001300_000_010 arg1);
void func_88217740(unk_func_88217740* arg0, s32 arg1, s32 arg2);
s32 func_882177A8(unk_func_88217740* arg0, s32 arg1, s32 arg2);
void func_88217BA0(unk_func_88217740* arg0, s32 arg1);
void func_88217BAC(unk_func_88217740* arg0);
void func_88217BB8(unk_func_88217740* arg0);
void func_88217BC0(unk_func_88217740* arg0);
#endif // _FRAGMENT23_H_

View File

@ -1,9 +1,69 @@
#include "global.h"
#include "fragment23.h"
#include "src/1CF30.h"
#include "src/29BA0.h"
#include "src/3FB0.h"
#include "src/memory.h"
#include "src/stage_loader.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8590/func_88200020.s")
s32 func_88200020(void) {
unk_D_800AC870* sp1C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8590/func_882000E4.s")
main_pool_push_state('TERM');
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8590/func_88200110.s")
sp1C = func_8001E94C(0x1C, 0);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8590/func_88200190.s")
ASSET_LOAD(D_04000000, fragment29_misc_1, 0);
FRAGMENT_LOAD(fragment26);
FRAGMENT_LOAD(fragment29);
func_80007754();
return sp1C;
}
void func_882000E4(void) {
func_8000771C();
main_pool_pop_state('TERM');
}
s32 func_88200110(UNUSED s32 arg0, UNUSED s32 arg1) {
func_8820C700(func_88200020(), 1);
func_80007990(1);
func_80006CB4(0xA);
func_882000E4();
FRAGMENT_LOAD_AND_CALL2(fragment22, 1, 0);
return 0x25;
}
s32 func_88200190(s32 arg0, s32 arg1) {
s32 temp_s0;
s32 var_s1;
if (arg0 == 5) {
return func_88200110(arg0, arg1);
}
temp_s0 = func_88200020();
var_s1 = func_8820104C(arg0, arg1);
while (var_s1 != 0) {
switch (var_s1) {
case 1:
func_8820C700(temp_s0, 0);
break;
case 2:
func_8821483C(temp_s0);
break;
case 3:
func_88205F1C(temp_s0);
break;
}
var_s1 = func_8820104C(var_s1, arg1);
}
func_882000E4();
return 0x25;
}

View File

@ -1,27 +1,337 @@
#include "global.h"
#include "fragment23.h"
#include "src/1CF30.h"
#include "src/20330.h"
#include "src/29BA0.h"
#include "src/2D340.h"
#include "src/2E110.h"
#include "src/2E460.h"
#include "src/49790.h"
#include "src/memmap.h"
#include "src/memory.h"
#include "src/stage_loader.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200290.s")
static char** D_88224F90;
static char** D_88224F94;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_882004BC.s")
static u16 D_88217BF0[4] = { 6, 7, 8, 9 };
static Color_RGBA8 D_88217BF8 = { 0xA0, 0x96, 0x64, 0xFF };
static u16 D_88217BFC[4] = { 2, 3, 4, 5 };
static Color_RGBA8 D_88217C04 = { 0x64, 0x96, 0xB4, 0xFF };
static Color_RGBA8 D_88217C08 = { 0x3C, 0x64, 0x78, 0xFF };
static Color_RGBA8 D_88217C0C = { 0xA0, 0x96, 0x64, 0xFF };
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_882004C8.s")
void func_88200290(unk_func_88503298* arg0, s32 arg1, s32 arg2, MemoryPool* arg3) {
s32 i;
s32 temp_v0;
s32 var_s1;
unk_func_885012A4* temp_s0;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200968.s")
var_s1 = 0;
for (i = 0; i < 4; i++) {
temp_v0 = func_8001F5B0(0x10, 0, func_8002D7C0(NULL, 0, D_88224F94, D_88217BF0[i]));
if (var_s1 < temp_v0) {
var_s1 = temp_v0;
}
}
var_s1 += 0x10;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_882009B4.s")
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_88503298));
arg0->unk_00.unk_10.unk_00 = ((0x280 - var_s1) / 2) - arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200A30.s")
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;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_2C);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200ACC.s")
temp_s0 = mem_pool_alloc(arg3, sizeof(unk_func_885012A4));
((func885012A4)Memmap_GetFragmentVaddr(func_885012A4))(temp_s0, 0, 0, var_s1, 0x68, D_88217BF8);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, temp_s0);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200AF4.s")
arg0->unk_30 = mem_pool_alloc(arg3, sizeof(unk_func_8850878C));
((func8850878C)Memmap_GetFragmentVaddr(func_8850878C))(arg0->unk_30, 8, 8, 0, 0x10);
arg0->unk_30->unk_3C = 0x20;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(temp_s0, arg0->unk_30);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200B60.s")
void func_882004BC(unk_func_88503298* arg0, s8* arg1) {
arg0->unk_30->unk_40 = arg1;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200C44.s")
void func_882004C8(unk_func_88200FA0_030* arg0, s32 arg1, s32 arg2, unk_func_88001300_000* arg3, MemoryPool* arg4) {
s32 i;
s32 j;
char* temp_s0;
s32 temp_v0;
s32 var_s2;
unk_func_885012A4* temp_s0_2;
unk_func_8850B254* sp6C;
UNUSED s32 pad1[3];
unk_func_88503298* temp_s0_3;
unk_func_8850878C* temp_s1;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200F00.s")
if ((arg2 <= 0) || (arg2 >= 5)) {
arg2 = 0;
} else {
arg2--;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_88200FA0.s")
var_s2 = func_8001F5B0(0x10, 0, func_8002D7C0(NULL, 0, D_88224F94, 1));
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1A8800/func_8820104C.s")
for (j = 0; j < 4; j++) {
temp_v0 = func_8001F5B0(0x10, 0, func_8002D7C0(NULL, 0, D_88224F94, D_88217BFC[j]));
if (var_s2 < temp_v0) {
var_s2 = temp_v0;
}
}
var_s2 += 0x10;
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_88200FA0_030));
arg0->unk_00.unk_20 = func_88200A30;
arg0->unk_00.unk_10.unk_00 = (0x280 - var_s2) / 2;
arg0->unk_00.unk_10.unk_02 = arg1;
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;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_2C);
sp6C = mem_pool_alloc(arg4, sizeof(unk_func_8850B254));
((func8850B254)Memmap_GetFragmentVaddr(func_8850B254))(sp6C, 0, 0, var_s2, 0x18, D_88217C04, D_88217C08);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, sp6C);
temp_s1 = mem_pool_alloc(arg4, sizeof(unk_func_8850878C));
temp_s0 = func_8002D7C0(NULL, 0, D_88224F94, 1);
((func8850878C)Memmap_GetFragmentVaddr(func_8850878C))(temp_s1, (var_s2 - func_8001F5B0(0x10, 0, temp_s0)) / 2, 0,
temp_s0, 0x10);
temp_s1->unk_3C = 0x1C;
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(sp6C, temp_s1);
func_8002CBC0(&arg0->unk_38, 4, arg4);
for (i = 0; i < 4; i++) {
func_8002CC2C(&arg0->unk_38, func_8002D7C0(NULL, 0, D_88224F94, D_88217BFC[i]), i);
}
temp_s0_2 = mem_pool_alloc(arg4, sizeof(unk_func_885012A4));
((func885012A4)Memmap_GetFragmentVaddr(func_885012A4))(temp_s0_2, 0, 0x1C, var_s2, 0x88, D_88217C0C);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, temp_s0_2);
arg0->unk_30 = mem_pool_alloc(arg4, sizeof(unk_func_88200FA0_030_030));
((func885060BC)Memmap_GetFragmentVaddr(func_885060BC))(arg0->unk_30, 0, 4, func_882009B4, var_s2, 0x20, 4, 1, arg4);
((func88506384)Memmap_GetFragmentVaddr(func_88506384))(arg0->unk_30, &arg0->unk_38, arg4);
((func88506BFC)Memmap_GetFragmentVaddr(func_88506BFC))(arg0->unk_30, arg2);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(temp_s0_2, arg0->unk_30);
arg0->unk_34 = mem_pool_alloc(arg4, sizeof(unk_func_88503298));
func_88200290(arg0->unk_34, arg0->unk_00.unk_10.unk_00, 0xB4, arg4);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_34);
func_88200968(arg0, arg2);
temp_s0_3 = mem_pool_alloc(arg4, sizeof(unk_func_88503298));
((func88503298)Memmap_GetFragmentVaddr(func_88503298))(temp_s0_3, arg0->unk_2C, arg3);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, temp_s0_3);
}
void func_88200968(unk_func_88200FA0_030* arg0, s32 arg1) {
func_882004BC(arg0->unk_34, func_8002D7C0(NULL, 0, D_88224F94, arg1 + 6));
}
void func_882009B4(s32 arg0, s32 arg1, char* arg2, s32 arg3) {
static Color_RGBA8 D_88217C10 = { 0xF0, 0xF0, 0xF0, 0xFF };
func_8001F3F4();
func_8001F324(D_88217C10.r, D_88217C10.g, D_88217C10.b, D_88217C10.a);
func_8001EBE0(0x10, 0);
func_8001F1E8(arg0 + 8, arg1 + 4, arg2);
func_8001F444();
}
s32 func_88200A30(unk_func_88200FA0_030* arg0, Controller* arg1) {
s32 sp1C;
if (arg0->unk_2C->unk_30 & 2) {
sp1C = arg0->unk_30->unk_00.unk_20(arg0->unk_30, arg1);
if ((sp1C & 1) && (sp1C & 8)) {
func_88200968(arg0, arg0->unk_30->unk_38);
}
} else if (!(arg0->unk_2C->unk_28 & 1)) {
sp1C = 2;
} else {
sp1C = 1;
}
return sp1C;
}
void func_88200ACC(unk_func_88200FA0_030* arg0) {
arg0->unk_2C->unk_28 |= 1;
arg0->unk_34->unk_2C->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) {
func_8002EEA8(NULL);
}
}
s32 func_88200B60(unk_func_88200FA0_030* arg0, Controller* arg1) {
s32 var_s0;
s32 var_s1 = 0;
func_88200ACC(arg0);
while (var_s1 == 0) {
func_8002EEA8(NULL);
var_s0 = func_88200A30(arg0, arg1);
if (!(var_s0 & 1)) {
if (arg1->buttonPressed & 0x4000) {
var_s0 = 0x80000003;
var_s1 = 1;
} else if (arg1->buttonPressed & 0x8000) {
func_80048B90(0x1C);
var_s0 = 1;
var_s1 = arg0->unk_30->unk_38 + 2;
}
}
((func8850BC94)Memmap_GetFragmentVaddr(func_8850BC94))(var_s0);
}
func_88200AF4(arg0);
return var_s1;
}
void func_88200C44(unk_func_88200FA0* arg0, s32 arg1, s32 arg2, s32 arg3, MemoryPool* arg4) {
static Color_RGBA8 D_88217C14 = { 0x1E, 0x50, 0x50, 0xFF };
static Color_RGBA8 D_88217C18 = { 0x00, 0x0A, 0x0A, 0xFF };
unk_func_88001300_000* sp4C;
unk_func_88500EE4* sp48;
unk_func_88509A2C* sp44;
unk_func_88509E34* sp40;
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, 0x34);
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
sp4C = mem_pool_alloc(arg4, sizeof(unk_func_88001300_000));
((func885031E8)Memmap_GetFragmentVaddr(func_885031E8))(sp4C, 0, 0, 0x280, 0x1E0);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, sp4C);
sp48 = mem_pool_alloc(arg4, sizeof(unk_func_88500EE4));
((func88500EE4)Memmap_GetFragmentVaddr(func_88500EE4))(sp48, 0, 0, 0x280, 0x1E0, D_88223E48, D_88217C14,
D_88217C18);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(sp4C, sp48);
arg0->unk_2C = mem_pool_alloc(arg4, sizeof(unk_func_885088F4));
((func885088F4)Memmap_GetFragmentVaddr(func_885088F4))(arg0->unk_2C, 0x41, 0x15C, 0xDC);
if (func_80007604() == 0) {
arg0->unk_2C->unk_2C = 5;
}
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(sp4C, arg0->unk_2C);
sp44 = mem_pool_alloc(arg4, sizeof(unk_func_88509A2C));
((func88509A2C)Memmap_GetFragmentVaddr(func_88509A2C))(sp44, 0x38, 0x22, func_80029080(),
func_8002D7C0(NULL, 0, D_88224F90, 0));
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, sp44);
sp40 = mem_pool_alloc(arg4, sizeof(unk_func_88509E34));
((func88509E34)Memmap_GetFragmentVaddr(func_88509E34))(sp40, 0, 0, func_8002D7C0(NULL, 0, D_88224F94, 0));
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0->unk_2C, sp40);
arg0->unk_30 = mem_pool_alloc(arg4, sizeof(unk_func_88200FA0_030));
func_882004C8(arg0->unk_30, 0x78, arg3, sp4C, arg4);
((func8850068C)Memmap_GetFragmentVaddr(func_8850068C))(arg0, arg0->unk_30);
arg0->unk_00.unk_24(&arg0->unk_00, 1);
}
s32 func_88200F00(unk_func_88200FA0* arg0) {
s32 sp34 = 0;
while (sp34 == 0) {
func_800079C4();
((func885008C4)Memmap_GetFragmentVaddr(func_885008C4))(arg0);
((func88500828)Memmap_GetFragmentVaddr(func_88500828))(arg0, 0, 0);
func_80007778();
func_8002EF18(&sp34);
}
return sp34;
}
void func_88200FA0(unk_func_88200FA0* arg0) {
s32 sp24;
s32 i;
while (func_80007604() != 0) {
func_8002EEA8(NULL);
}
func_8001F738(gPlayer1Controller);
sp24 = func_88200B60(arg0->unk_30, gPlayer1Controller);
if (sp24 == 1) {
arg0->unk_2C->unk_2C = 9;
func_80006CB4(8);
i = 10;
while (i-- > 0) {
func_8002EEA8(NULL);
}
}
func_8002EEA8(sp24);
osStopThread(NULL);
}
s32 func_8820104C(s32 arg0, UNUSED s32 arg1) {
MemoryPool* sp34;
void* sp30;
u8* sp2C;
func_88002628_sp38* sp28;
UNUSED s32 pad;
s32 sp20;
main_pool_push_state('SLTM');
sp2C = main_pool_alloc(0x1000, 0);
sp34 = mem_pool_try_init(0x8000, 0);
func_8002D510();
D_88224F90 = func_8002D5AC(0x2A);
D_88224F94 = func_8002D5AC(1);
sp30 = mem_pool_alloc(sp34, sizeof(unk_func_88200FA0));
func_88200C44(sp30, 0, 0, arg0, sp34);
sp28 = ALIGN16((u32)mem_pool_alloc(sp34, sizeof(func_88002628_sp38)));
osCreateThread(&sp28->thread, 0x32, func_88200FA0, sp30, sp2C + 0x1000, osGetThreadPri(NULL) - 1);
func_8002EE78();
func_8001F738(gPlayer1Controller);
osStartThread(&sp28->thread);
func_80006C6C(8);
sp20 = func_88200F00(sp30);
osDestroyThread(&sp28->thread);
main_pool_pop_state('SLTM');
if (sp20 == 1) {
FRAGMENT_LOAD_AND_CALL2(fragment22, 1, 0);
return 0;
}
if (sp20 == 5) {
FRAGMENT_LOAD_AND_CALL2(fragment24, 1, 0);
return 0;
}
return sp20 - 1;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,57 +1,833 @@
#include "global.h"
#include "fragment23.h"
#include "src/2D340.h"
#include "src/memmap.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882149A0.s")
typedef struct unk_func_8820BE14_02C_038_02C_02C {
/* 0x00 */ char unk00[0x8];
/* 0x08 */ s32 unk_08;
} unk_func_8820BE14_02C_038_02C_02C; // size >= 0xC
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88214A58.s")
typedef struct unk_func_8820BE14_02C_038_02C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x00 */ unk_func_8820BE14_02C_038_02C_02C* unk_2C;
/* 0x00 */ char unk30[0xE];
/* 0x00 */ s16 unk_3E;
/* 0x00 */ char unk40[0xA];
/* 0x00 */ s16 unk_4A;
/* 0x00 */ char unk4C[0x14];
/* 0x00 */ s32 unk_58;
} unk_func_8820BE14_02C_038_02C; // size >= 0x58
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882158BC.s")
void func_882149A0(unk_func_882149A0* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6,
Color_RGBA8 arg7, Color_RGBA8 arg8, Color_RGBA8 arg9) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_882149A0));
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882158CC.s")
arg0->unk_00.unk_18 = func_88214A58;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88215974.s")
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_00.unk_14.unk_00 = arg3;
arg0->unk_00.unk_14.unk_02 = arg4;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882159AC.s")
arg0->unk_2C = arg5;
arg0->unk_30 = arg6;
arg0->unk_32 = arg7;
arg0->unk_36 = arg8;
arg0->unk_3A = arg9;
arg0->unk_40 = 0;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882159BC.s")
s32 func_88214A58(unk_func_882149A0* arg0, s32 arg1, s32 arg2) {
Color_RGBA8 sp16C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88215D18.s")
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
gDPLoadTextureBlock(gDisplayListHead++, D_4001638, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, arg1 << 2, arg2 << 2, ((arg0->unk_00.unk_14.unk_00 + arg1) - 8) << 2,
(arg2 + 8) << 2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
gDPLoadTextureBlock(gDisplayListHead++, D_4001710, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, ((arg0->unk_00.unk_14.unk_00 + arg1) - 8) << 2, arg2 << 2,
(arg0->unk_00.unk_14.unk_00 + arg1) << 2, ((arg2 + arg0->unk_00.unk_14.unk_02) - 8) << 2,
G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
gDPLoadTextureBlock(gDisplayListHead++, D_40016C8, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, (arg1 + 8) << 2, ((arg2 + arg0->unk_00.unk_14.unk_02) - 8) << 2,
(arg0->unk_00.unk_14.unk_00 + arg1) << 2, (arg2 + arg0->unk_00.unk_14.unk_02) << 2,
G_TX_RENDERTILE, (arg0->unk_00.unk_14.unk_00 * -0x20) + 0x200, 0, 0x0400, 0x0400);
gDPLoadTextureBlock(gDisplayListHead++, D_4001680, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, arg1 << 2, (arg2 + 8) << 2, (arg1 + 8) << 2,
(arg2 + arg0->unk_00.unk_14.unk_02) << 2, G_TX_RENDERTILE, 0,
(arg0->unk_00.unk_14.unk_02 * -0x20) + 0x200, 0x0400, 0x0400);
if (arg0->unk_00.unk_2A & 0x100) {
s32 temp_a0;
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
gDPSetRenderMode(gDisplayListHead++, G_RM_NOOP, G_RM_NOOP2);
// clang-format off
temp_a0 = RGBA5551(func_8002D444(arg0->unk_3A, 1.4f).r, func_8002D444(arg0->unk_3A, 1.4f).g, func_8002D444(arg0->unk_3A, 1.4f).b, 1); gDPPipeSync(gDisplayListHead++);
// clang-format on
gDPSetFillColor(gDisplayListHead++, (temp_a0 << 0x10) | temp_a0);
gDPFillRectangle(gDisplayListHead++, arg1 + 1, arg2 + 1, (arg1 + (u32)arg0->unk_00.unk_14.unk_00) - 2,
(arg2 + arg0->unk_00.unk_14.unk_02) - 2);
}
sp16C = (arg0->unk_00.unk_2A & 0x101) ? arg0->unk_32 : arg0->unk_36;
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM);
gDPSetPrimColor(gDisplayListHead++, 0, 0, sp16C.r, sp16C.g, sp16C.b, sp16C.a);
if (arg0->unk_40 != 0) {
gDPLoadTextureBlock(gDisplayListHead++, arg0->unk_2C, G_IM_FMT_IA, G_IM_SIZ_16b, arg0->unk_30,
arg0->unk_00.unk_14.unk_02 - 6, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, (arg1 + 3) << 2, (arg2 + 3) << 2,
((arg1 + (u32)arg0->unk_00.unk_14.unk_00) - 3) << 2,
((arg2 + arg0->unk_00.unk_14.unk_02) - 3) << 2, G_TX_RENDERTILE,
(arg0->unk_00.unk_14.unk_00 - 7) << 5, 0, 0xFC00, 0x0400);
} else {
gDPLoadTextureBlock(gDisplayListHead++, arg0->unk_2C, G_IM_FMT_IA, G_IM_SIZ_16b, arg0->unk_30,
arg0->unk_00.unk_14.unk_02 - 6, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, (arg1 + 3) << 2, (arg2 + 3) << 2,
((arg1 + (u32)arg0->unk_00.unk_14.unk_00) - 3) << 2,
((arg2 + arg0->unk_00.unk_14.unk_02) - 3) << 2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
}
return 0;
}
void func_882158BC(unk_func_882149A0* arg0) {
arg0->unk_40 = !arg0->unk_40;
}
void func_882158CC(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2, s32 arg3, void (*arg4)(), s32 arg5, s32 arg6,
MemoryPool* arg7) {
((func88506DCC)Memmap_GetFragmentVaddr(func_88506DCC))(arg0, arg1, arg2, arg4, arg5, arg6, arg3, arg7);
arg0->unk_70 = 0;
arg0->unk_74 = arg0->unk_00.unk_00.unk_1C;
arg0->unk_78 = arg0->unk_00.unk_00.unk_18;
arg0->unk_7C = arg0->unk_00.unk_00.unk_20;
func_88215974(&arg0->unk_00, 1);
arg0->unk_00.unk_44->unk_00.unk_28 |= 0x100;
}
void func_88215974(unk_func_88200FA0_030_030* arg0, s32 arg1) {
s32 var_v0;
if (arg1 != 0) {
var_v0 = 0;
} else {
var_v0 = 1;
}
arg0->unk_44->unk_2C = D_88218230[var_v0];
}
void func_882159AC(unk_func_8820BE14_02C_038* arg0, unk_func_88507D4C* arg1) {
arg0->unk_84 = arg1;
arg0->unk_80 = arg1->unk_00.unk_18;
}
s32 func_882159BC(unk_func_8820BE14_02C_038* arg0) {
s32 sp24;
s32 var_a2;
s32 sp1C;
s32 var_a3;
s32 var_v1;
if (arg0->unk_56 & 0x800) {
if (!(arg0->unk_54 & 0x800)) {
sp24 = arg0->unk_00.unk_38 * arg0->unk_00.unk_3E;
if ((arg0->unk_5C - sp24) < arg0->unk_64) {
var_a2 = (arg0->unk_5C - sp24);
} else {
var_a2 = arg0->unk_64;
}
arg0->unk_5C = arg0->unk_5C - var_a2;
((func88506FC0)Memmap_GetFragmentVaddr(func_88506FC0))(arg0);
if (sp24 == arg0->unk_5C) {
arg0->unk_56 &= ~0x800;
}
}
} else if (arg0->unk_56 & 0x400) {
if (!(arg0->unk_54 & 0x400)) {
sp1C = ((arg0->unk_00.unk_38 + 1) * arg0->unk_00.unk_3E) - 1;
if ((sp1C - arg0->unk_5C) < arg0->unk_64) {
var_a2 = (sp1C - arg0->unk_5C);
} else {
var_a2 = arg0->unk_64;
}
arg0->unk_5C = arg0->unk_5C + var_a2;
((func88506FE0)Memmap_GetFragmentVaddr(func_88506FE0))(arg0);
if (sp1C == arg0->unk_5C) {
arg0->unk_56 &= ~0x400;
arg0->unk_5C = (arg0->unk_5C - arg0->unk_00.unk_3E) + 1;
}
}
} else if (arg0->unk_56 & 0x200) {
if (!(arg0->unk_54 & 0x200)) {
if ((arg0->unk_5C - arg0->unk_60) < arg0->unk_68) {
var_v1 = (arg0->unk_5C - arg0->unk_60);
} else {
var_v1 = arg0->unk_68;
}
arg0->unk_5C -= var_v1;
if (arg0->unk_58 < var_v1) {
var_a2 = arg0->unk_58;
} else {
var_a2 = var_v1;
}
arg0->unk_58 -= var_a2;
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
if (arg0->unk_60 == arg0->unk_5C) {
arg0->unk_56 &= ~0x200;
}
}
} else if ((arg0->unk_56 & 0x100) && !(arg0->unk_54 & 0x100)) {
s32 tmp1 = arg0->unk_00.unk_3E * (arg0->unk_00.unk_2C->unk_08 + 1);
s32 tmp2 = arg0->unk_00.unk_3E * arg0->unk_00.unk_4A;
if ((arg0->unk_60 - arg0->unk_5C) < arg0->unk_68) {
var_a3 = (arg0->unk_60 - arg0->unk_5C);
} else {
var_a3 = arg0->unk_68;
}
arg0->unk_5C += var_a3;
var_v1 = (tmp1 - arg0->unk_58) - tmp2;
if (var_v1 <= 0) {
var_v1 = 0;
}
if (var_v1 < var_a3) {
var_a2 = var_v1;
} else {
var_a2 = var_a3;
}
arg0->unk_58 += var_a2;
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
if (arg0->unk_60 == arg0->unk_5C) {
arg0->unk_56 &= ~0x100;
}
}
arg0->unk_54 = 0;
var_v1 = arg0->unk_5C - arg0->unk_58;
if (arg0->unk_56 & 0x400) {
var_v1 = (var_v1 - arg0->unk_00.unk_3E) + 1;
}
arg0->unk_00.unk_44->unk_00.unk_10.unk_00 = arg0->unk_00.unk_50;
arg0->unk_00.unk_44->unk_00.unk_10.unk_02 = arg0->unk_00.unk_52 + var_v1;
return 0;
}
s32 func_88215D18(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2, s32 arg3) {
s32 i;
s32 temp_lo;
s32 temp_s5;
s32 var_s2;
s32 var_s4;
s32 var_s6;
s32 var_v0;
s32 var_v1_2;
u16 var_v1;
unk_func_88205880_00D0** var_s3;
unk_func_88205880_00D0* var_a2;
temp_lo = arg0->unk_00.unk_3E * arg0->unk_00.unk_4A;
var_s3 = NULL;
var_s6 = 0;
var_s4 = 0;
if (arg0->unk_00.unk_2C != NULL) {
var_s3 = arg0->unk_00.unk_2C->unk_00;
if (arg0->unk_00.unk_30 != 0) {
var_s6 = arg0->unk_00.unk_2C->unk_0C;
}
var_s4 = arg0->unk_00.unk_2C->unk_08 + 1;
}
gDPPipeSync(gDisplayListHead++);
gDPSetScissorFrac(gDisplayListHead++, G_SC_NON_INTERLACE, arg1 * 4.0f, arg2 * 4.0f,
(arg0->unk_00.unk_3C + arg1) * 4.0f, (arg2 + temp_lo) * 4.0f);
var_s2 = arg2 - (arg0->unk_58 % arg0->unk_00.unk_3E);
i = arg0->unk_58 / arg0->unk_00.unk_3E;
temp_s5 = (((arg0->unk_58 + temp_lo) - 1) / arg0->unk_00.unk_3E) + 1;
for (; i < temp_s5; i++) {
var_a2 = NULL;
var_v1 = 0;
if ((i < var_s4) && (i != arg0->unk_00.unk_38)) {
if (i < arg0->unk_00.unk_38) {
var_v1_2 = 0;
} else {
var_v1_2 = -1;
}
var_v0 = var_v1_2 + i;
if (arg0->unk_00.unk_30 != 0) {
var_a2 = (u8*)var_s3 + var_s6 * var_v0;
} else {
var_a2 = var_s3[var_v0];
}
var_v1 = arg0->unk_00.unk_34[var_v0];
} else if (i == arg0->unk_00.unk_38) {
var_v1 = 1;
}
arg0->unk_00.unk_40(arg1, var_s2, var_a2, i, var_v1, arg0);
var_s2 += arg0->unk_00.unk_3E;
}
gDPPipeSync(gDisplayListHead++);
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 640, 480);
return 0;
}
#ifdef NON_MATCHING
void func_88216000(unk_func_8820BE14_02C_038* arg0, s32 arg1, s32 arg2) {
s32 sp12C;
Gfx* sp104;
Gfx* sp100;
s32 spC;
s32 temp_s0;
s32 temp_t3;
s32 temp_t4;
s32 temp_t4_2;
s32 var_t5;
unk_func_8820BE14_06C* temp_v0;
unk_func_8820BE14_06C* temp_v0_2;
void* temp_v1_42;
unk_func_8820BE14_02C_038_02C* ptr = arg0->unk_00.unk_2C;
sp12C = ptr->unk_3E * ptr->unk_4A;
temp_s0 = ((arg0->unk_00.unk_00.unk_14.unk_00 / 2) + arg1) - 9;
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
gDPLoadTextureBlock(gDisplayListHead++, D_40022E0, G_IM_FMT_I, G_IM_SIZ_8b, 8, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, arg1 << 2, arg2 << 2, (arg0->unk_00.unk_00.unk_14.unk_00 + arg1) << 2,
(arg2 + 0x10) << 2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_COPY);
gDPSetRenderMode(gDisplayListHead++, G_RM_NOOP, G_RM_NOOP2);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
spC = (arg2 * 4) & 0xFFF;
if (arg0->unk_00.unk_30 == 0) {
gDPLoadTextureBlock(gDisplayListHead++, (ptr->unk_58 > 0) ? D_4002368 : D_4002D88, G_IM_FMT_RGBA, G_IM_SIZ_16b,
20, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, temp_s0 << 2, arg2 << 2, (temp_s0 + 0x11) << 2, (arg2 + 0xF) << 2,
G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
gDPLoadTextureBlock(gDisplayListHead++, (ptr->unk_58 > 0) ? D_4002878 : D_4003298, G_IM_FMT_RGBA, G_IM_SIZ_16b,
20, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, (temp_s0 - 0x1C) << 2, arg2 << 2, (temp_s0 - 9) << 2, (arg2 + 0xF) << 2,
G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
} else {
var_t5 = 0;
if ((ptr->unk_2C != NULL) && ((ptr->unk_58 + sp12C) < (ptr->unk_3E * (ptr->unk_2C->unk_08 + 1)))) {
var_t5 = 1;
}
gDPLoadTextureBlock(gDisplayListHead++, var_t5 != 0 ? D_40025F0 : D_4003010, G_IM_FMT_RGBA, G_IM_SIZ_16b, 20,
16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, temp_s0 << 2, arg2 << 2, (temp_s0 + 0x11) << 2, (arg2 + 0xF) << 2,
G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
gDPLoadTextureBlock(gDisplayListHead++, var_t5 != 0 ? D_4002B00 : D_4003520, G_IM_FMT_RGBA, G_IM_SIZ_16b, 20,
16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, (temp_s0 + 0x1A) << 2, arg2 << 2, (temp_s0 + 0x2D) << 2,
(arg2 + 0xF) << 2, G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
}
gDPPipeSync(gDisplayListHead++);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
}
#else
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88216000.s")
#endif
#ifdef NON_MATCHING
s32 func_882169D4(unk_func_8820BE14_02C_038* arg0, Controller* arg1) {
s32 sp24 = arg0->unk_00.unk_38;
s32 temp_t3 = arg0->unk_60;
s32 var_t2 = 0;
s32 sp18 = 0;
if ((arg0->unk_00.unk_2C == NULL) || (arg0->unk_00.unk_2C->unk_08 == 0)) {
return 0;
}
// clang-format off
if (arg1->buttonPressed & 0x800) {
arg0->unk_6C = 8; arg0->unk_54 = 0x800;
} else if (arg1->buttonPressed & 0x400) {
arg0->unk_6C = 8; arg0->unk_54 = 0x400;
} else if (arg1->buttonPressed & 0x200) {
arg0->unk_6C = 8; arg0->unk_54 = 0x200;
} else if (arg1->buttonPressed & 0x100) {
arg0->unk_6C = 8; arg0->unk_54 = 0x100;
} else if (arg0->unk_6C > 0) {
arg0->unk_6C--;
} else {
arg0->unk_54 = arg1->buttonDown;
}
// clang-format on
if ((arg0->unk_54 & 0x800) && ((arg0->unk_56 & ~0x800) == 0)) {
s32 var_a1;
if ((arg0->unk_56 == 0) && (arg0->unk_5C == 0)) {
sp18 = 1;
}
arg0->unk_56 |= 0x800;
if (arg0->unk_5C < arg0->unk_64) {
var_a1 = arg0->unk_5C;
} else {
var_a1 = arg0->unk_64;
}
arg0->unk_5C = arg0->unk_5C - var_a1;
((func88506FC0)Memmap_GetFragmentVaddr(func_88506FC0))(arg0);
var_t2 = 0;
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
if (sp24 != arg0->unk_00.unk_38) {
var_t2 = 0x80000000;
}
} else if ((arg0->unk_54 & 0x400) && ((arg0->unk_56 & ~0x400) == 0)) {
s32 var_a1;
s32 temp_lo_2 = arg0->unk_00.unk_3E * (arg0->unk_00.unk_2C->unk_08 + 1);
s32 temp_lo_6;
if (arg0->unk_56 == 0) {
arg0->unk_5C = (arg0->unk_5C + arg0->unk_00.unk_3E) - 1;
if (temp_lo_2 == (arg0->unk_5C + 1)) {
sp18 = 1;
}
}
arg0->unk_56 |= 0x400;
temp_lo_6 = (temp_lo_2 - arg0->unk_5C) - 1;
if (temp_lo_6 < arg0->unk_64) {
var_a1 = temp_lo_6;
} else {
var_a1 = arg0->unk_64;
}
arg0->unk_5C += var_a1;
((func88506FE0)Memmap_GetFragmentVaddr(func_88506FE0))(arg0);
var_t2 = 0;
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
if (sp24 != arg0->unk_00.unk_38) {
var_t2 = 0x80000000;
}
} else if ((arg0->unk_54 & 0x200) && ((arg0->unk_56 & ~0x200) == 0)) {
s32 var_a1;
s32 temp_a3 = arg0->unk_00.unk_3E * arg0->unk_00.unk_4A;
if (arg0->unk_56 == 0) {
arg0->unk_60 = arg0->unk_5C;
if (arg0->unk_60 > 0) {
var_t2 = 0x80000000;
}
}
arg0->unk_56 |= 0x200;
if (arg0->unk_5C < arg0->unk_68) {
var_a1 = arg0->unk_5C;
} else {
var_a1 = arg0->unk_68;
}
arg0->unk_5C -= var_a1;
if (arg0->unk_5C < arg0->unk_60) {
if (temp_a3 < arg0->unk_60) {
var_a1 = temp_a3;
} else {
var_a1 = arg0->unk_60;
}
arg0->unk_60 -= var_a1;
}
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
if (arg0->unk_58 < arg0->unk_68) {
var_a1 = arg0->unk_58;
} else {
var_a1 = arg0->unk_68;
}
arg0->unk_58 -= var_a1;
if (temp_t3 != arg0->unk_60) {
var_t2 |= 0x80000000;
}
} else if (arg0->unk_54 & 0x100) {
if (!(arg0->unk_56 & ~0x100)) {
s32 var_a1;
s32 temp_lo_2 = arg0->unk_00.unk_3E * (arg0->unk_00.unk_2C->unk_08 + 1);
s32 temp_lo_6 = arg0->unk_00.unk_3E * arg0->unk_00.unk_4A;
s32 temp_a3 = (temp_lo_2 - arg0->unk_5C) - arg0->unk_00.unk_3E;
if (arg0->unk_56 == 0) {
arg0->unk_60 = arg0->unk_5C;
if (temp_a3 > 0) {
var_t2 = 0x80000000;
}
}
arg0->unk_56 |= 0x100;
if (temp_a3 < arg0->unk_68) {
var_a1 = temp_a3;
} else {
var_a1 = arg0->unk_68;
}
arg0->unk_5C += var_a1;
if (arg0->unk_60 < arg0->unk_5C) {
temp_a3 = (temp_lo_2 - arg0->unk_60) - arg0->unk_00.unk_3E;
if (temp_lo_6 < temp_a3) {
var_a1 = temp_lo_6;
} else {
var_a1 = temp_a3;
}
arg0->unk_60 += var_a1;
}
arg0->unk_00.unk_38 = arg0->unk_5C / arg0->unk_00.unk_3E;
temp_a3 = (temp_lo_2 - arg0->unk_58) - temp_lo_6;
if (temp_a3 <= 0) {
temp_a3 = 0;
}
if (temp_a3 < arg0->unk_68) {
var_a1 = temp_a3;
} else {
var_a1 = arg0->unk_68;
}
arg0->unk_58 += var_a1;
if (temp_t3 != arg0->unk_60) {
var_t2 |= 0x80000000;
}
}
}
if (arg0->unk_56 == 0) {
var_t2 = 0;
} else {
var_t2 |= 8;
if (sp18 == 0) {
var_t2 |= 1;
}
}
return var_t2;
}
#else
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882169D4.s")
#endif
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88216F18.s")
void func_88216F18(unk_func_8820BE14_02C_038* arg0, s32 arg1) {
if (arg1 == 0) {
arg0->unk_70 = 1;
arg0->unk_00.unk_00.unk_1C = func_882159BC;
arg0->unk_00.unk_00.unk_18 = func_88215D18;
arg0->unk_00.unk_00.unk_20 = func_882169D4;
arg0->unk_84->unk_00.unk_18 = func_88216000;
if (arg0->unk_00.unk_2C->unk_08 > 0) {
((func88507AE4)Memmap_GetFragmentVaddr(func_88507AE4))(arg0, arg0->unk_00.unk_38 + 1);
}
} else {
arg0->unk_70 = 0;
arg0->unk_00.unk_00.unk_1C = arg0->unk_74;
arg0->unk_00.unk_00.unk_18 = arg0->unk_78;
arg0->unk_00.unk_00.unk_20 = arg0->unk_7C;
arg0->unk_84->unk_00.unk_18 = arg0->unk_80;
if ((arg1 == 1) && (arg0->unk_00.unk_38 > 0) && (arg0->unk_00.unk_2C->unk_08 > 0)) {
((func88507B80)Memmap_GetFragmentVaddr(func_88507B80))(arg0, arg0->unk_00.unk_38 - 1);
}
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217018.s")
void func_88217018(unk_func_8820BE14_02C_038* arg0, unk_func_8820BE14_06C_000* arg1, u32 arg2) {
arg0->unk_88 = &arg1->unk_00;
arg0->unk_8C = arg2;
((func88506EE4)Memmap_GetFragmentVaddr(func_88506EE4))(arg0, &arg1->unk_04);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217060.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882170A8.s")
void func_882170A8(unk_func_882170A8* arg0, s32 arg1, s32 arg2, unk_func_8820BE14_02C_038* arg3, s32 arg4) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_882170A8));
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_8821711C.s")
arg0->unk_00.unk_18 = func_8821738C;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_2C = arg3;
arg0->unk_30 = arg4;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_8821738C.s")
void func_8821711C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
func_8002E8E4(arg0, arg1, arg2, arg4);
func_8002E8E4(((arg4 * 9) + arg0) + 9, arg1, arg3, arg4);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882173EC.s")
gDPPipeSync(gDisplayListHead++);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217460.s")
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882175F4.s")
gDPLoadTextureBlock(gDisplayListHead++, D_4006A60, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 10, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, ((arg4 * 9) + arg0) << 2, (arg1 + 2) << 2, (((arg4 * 9) + arg0) + 8) << 2,
(arg1 + 0xC) << 2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217650.s")
s32 func_8821738C(unk_func_882170A8* arg0, s32 arg1, s32 arg2) {
unk_func_8820BE14_06C* temp_v0 = arg0->unk_2C->unk_00.unk_2C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882176C4.s")
if (temp_v0 == NULL) {
return 0;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217718.s")
func_8821711C(arg1, arg2, temp_v0->unk_08, temp_v0->unk_04, arg0->unk_30);
return 0;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217740.s")
void func_882173EC(unk_func_882173EC* arg0, s32 arg1, s32 arg2) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_882173EC));
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_882177A8.s")
arg0->unk_00.unk_1C = func_88217460;
arg0->unk_30.unk_00 = arg1;
arg0->unk_30.unk_02 = arg2;
arg0->unk_2C = 0x10;
arg0->unk_00.unk_28 &= ~1;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217BA0.s")
typedef struct unk_func_88217460 {
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
} unk_func_88217460; // size >= 0x8
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217BAC.s")
s32 func_88217460(unk_func_882173EC* arg0) {
f32 temp_fa1;
f32 temp_ft4;
f32 tmp = 15.0f;
f32 sp38;
f32 sp34;
f32 sp30;
f32 sp28[2];
f32 sp24;
f32 sp1C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217BB8.s")
sp1C = (tmp * 2.0f) / 7.5f;
sp38 = -sp1C / 7.5f;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/23/fragment23_1BCF10/func_88217BC0.s")
if (arg0->unk_2C >= 0x10) {
arg0->unk_00.unk_28 &= ~1;
return 0;
}
if (arg0->unk_2C >= 0xF) {
arg0->unk_00.unk_28 &= ~0x100;
}
sp30 = arg0->unk_34.unk_00 - arg0->unk_30.unk_00;
sp34 = arg0->unk_34.unk_02 - arg0->unk_30.unk_02;
sp28[0] = sp34;
sp28[1] = -sp30;
func_8002D3F0(sp28);
sp24 = (arg0->unk_2C * sp38) + sp1C;
temp_fa1 = (sp1C + sp24) * arg0->unk_2C * 0.5f;
sp28[0] *= temp_fa1;
sp28[1] *= temp_fa1;
temp_ft4 = arg0->unk_2C / tmp;
sp30 *= temp_ft4;
sp34 *= temp_ft4;
sp30 += sp28[0];
sp34 += sp28[1];
arg0->unk_00.unk_10.unk_00 = arg0->unk_30.unk_00 + (s16)sp30;
arg0->unk_00.unk_10.unk_02 = arg0->unk_30.unk_02 + (s16)sp34;
arg0->unk_2C++;
return 0;
}
void func_882175F4(unk_func_882173EC* arg0, unk_func_88001300_000_010 arg1, unk_func_88001300_000_010 arg2) {
unk_func_88001300_000_010 tmp = arg1;
arg0->unk_30 = tmp;
arg0->unk_00.unk_10 = (0, tmp);
arg0->unk_34 = arg2;
arg0->unk_2C = 0;
arg0->unk_00.unk_28 |= 0x101;
}
void func_88217650(unk_func_8821421C_02C_06C_02C_068* arg0, s32 arg1, s32 arg2) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_8821421C_02C_06C_02C_068));
arg0->unk_00.unk_1C = func_882176C4;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
arg0->unk_2C = 0x10;
arg0->unk_00.unk_28 &= ~1;
}
s32 func_882176C4(unk_func_8821421C_02C_06C_02C_068* arg0) {
if (arg0->unk_2C >= 0x10) {
arg0->unk_00.unk_28 &= ~1;
return 0;
}
if (arg0->unk_2C >= 0xF) {
arg0->unk_00.unk_28 &= ~0x100;
}
arg0->unk_2C++;
return 0;
}
void func_88217718(unk_func_8821421C_02C_06C_02C_068* arg0, unk_func_88001300_000_010 arg1) {
arg0->unk_00.unk_10 = arg1;
arg0->unk_00.unk_28 |= 0x101;
arg0->unk_2C = 0;
}
void func_88217740(unk_func_88217740* arg0, s32 arg1, s32 arg2) {
((func885007CC)Memmap_GetFragmentVaddr(func_885007CC))(arg0, sizeof(unk_func_88217740));
arg0->unk_00.unk_18 = func_882177A8;
arg0->unk_00.unk_10.unk_00 = arg1;
arg0->unk_00.unk_10.unk_02 = arg2;
func_88217BA0(arg0, 1);
}
s32 func_882177A8(unk_func_88217740* arg0, s32 arg1, s32 arg2) {
Color_RGBA8 sp6C;
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM);
gDPLoadTextureBlock(gDisplayListHead++, D_8821EE88, G_IM_FMT_IA, G_IM_SIZ_16b, 64, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
sp6C = D_88218238[(arg0->unk_2C != 0) ? 0 : 1];
gDPSetPrimColor(gDisplayListHead++, 0, 0, sp6C.r, sp6C.g, sp6C.b, sp6C.a);
gSPTextureRectangle(gDisplayListHead++, arg1 << 2, arg2 << 2, (arg1 + 0x20) << 2, (arg2 + 0x14) << 2,
G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
sp6C = D_88218238[(arg0->unk_2C == 0) ? 0 : 1];
gDPPipeSync(gDisplayListHead++);
gDPSetPrimColor(gDisplayListHead++, 0, 0, sp6C.r, sp6C.g, sp6C.b, sp6C.a);
gSPTextureRectangle(gDisplayListHead++, (arg1 + 0x20) << 2, arg2 << 2, (arg1 + 0x40) << 2, (arg2 + 0x14) << 2,
G_TX_RENDERTILE, 0x0400, 0, 0x0400, 0x0400);
return 0;
}
void func_88217BA0(unk_func_88217740* arg0, s32 arg1) {
arg0->unk_30 = 0;
arg0->unk_2C = arg1;
}
void func_88217BAC(unk_func_88217740* arg0) {
arg0->unk_30 = 1;
}
void func_88217BB8(unk_func_88217740* arg0) {
arg0->unk_30 = 0;
}
void func_88217BC0(unk_func_88217740* arg0) {
func_88217BA0(arg0, arg0->unk_2C == 0);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
#include "global.h"
#include "fragment25.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/25/fragment25/func_88400020.s")

View File

@ -0,0 +1,16 @@
#ifndef _FRAGMENT25_H_
#define _FRAGMENT25_H_
#include "global.h"
typedef struct unk_D_88400138 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ Color_RGBA8 unk_04;
/* 0x08 */ Color_RGBA8 unk_08;
} unk_D_88400138; // size = 0xC
typedef unk_D_88400138* (*func884000C4)(u8);
unk_D_88400138* func_884000C4(u8);
#endif // _FRAGMENT25_H_

View File

@ -3,30 +3,40 @@
#include "global.h"
#include "src/memory.h"
#include "src/memmap.h"
#include "src/controller.h"
#include "src/29BA0.h"
#include "src/1AB70.h"
#include "src/2D340.h"
struct unk_func_88001300;
struct unk_func_88001300_000;
struct unk_func_88001300_03C;
struct unk_func_88203ED8;
struct unk_func_88203ED8_064;
struct unk_func_882025E0;
typedef s32 (*unk_func_88001300_018)(struct unk_func_88001300_000*, s32, s32);
typedef s32 (*unk_func_88001300_01C)(struct unk_func_88001300_000*);
typedef s32 (*unk_func_88001300_020)(struct unk_func_88001300*, Controller*);
typedef void (*unk_func_88001300_024)(struct unk_func_88001300*, s32);
typedef void (*unk_func_88001300_024)(struct unk_func_88001300_000*, s32);
typedef struct unk_func_88001300_000_000 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_88001300* unk_04;
/* 0x08 */ struct unk_func_88001300* unk_08;
/* 0x04 */ struct unk_func_88001300_000_000* unk_04;
/* 0x08 */ struct unk_func_88001300_000_000* unk_08;
} unk_func_88001300_000_000; // size >= 0xC
typedef struct unk_func_88001300_000_010 {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
} unk_func_88001300_000_010; // size = 0x4
typedef struct unk_func_88001300_000 {
/* 0x00 */ unk_func_88001300_000_000 unk_00;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ s16 unk_14;
/* 0x16 */ s16 unk_16;
/* 0x10 */ unk_func_88001300_000_010 unk_10;
/* 0x14 */ unk_func_88001300_000_010 unk_14;
/* 0x18 */ unk_func_88001300_018 unk_18;
/* 0x1C */ unk_func_88001300_01C unk_1C;
/* 0x20 */ unk_func_88001300_020 unk_20;
@ -36,8 +46,7 @@ typedef struct unk_func_88001300_000 {
} unk_func_88001300_000; // size = 0x2C
typedef struct unk_func_88001300_02C {
/* 0x00 */ unk_func_88001300_000_000 unk_00;
/* 0x0C */ char unk0C[0x20];
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
} unk_func_88001300_02C; // size = 0x30
@ -50,20 +59,27 @@ typedef struct unk_func_88001300_030 {
/* 0x38 */ char unk38[0x4];
} unk_func_88001300_030; // size = 0x3C
typedef struct unk_func_88001300_038 {
/* 0x00 */ u8* unk_00[1];
/* 0x04 */ char unk04[0x8];
/* 0x0C */ s32 unk_0C;
/* 0x10 */ char unk10[0x4];
/* 0x14 */ s16 unk_14;
/* 0x16 */ s16 unk_16;
/* 0x18 */ char unk18[0x10];
/* 0x28 */ u16 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_88001300_038; // size = 0x34
typedef struct unk_func_88001300_034 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ char unk2C[0x4];
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ char unk34[0xC];
/* 0x40 */ s32 unk_40;
} unk_func_88001300_034; // size = 0x44
typedef struct unk_func_88001300_038 {
/* 0x00 */ char unk00[0x28];
/* 0x28 */ u16 unk_28;
/* 0x2A */ char unk2A[0xA];
} unk_func_88001300_038; // size = 0x34
typedef struct unk_func_88001300_03C_00C {
/* 0x00 */ char unk00[0x10];
/* 0x10 */ s16 unk_10;
@ -75,7 +91,7 @@ typedef struct unk_func_88001300_03C_00C {
typedef struct unk_func_88001300_03C_01C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ Color_RGBA8_u32 unk_2C;
/* 0x2C */ Color_RGBA8 unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_88001300_03C_01C; // size = 0x34
@ -89,7 +105,7 @@ typedef struct unk_func_88001300_03C {
/* 0x14 */ unk_func_88001300_03C_014 unk_14;
/* 0x18 */ unk_func_88001300_000** unk_18;
/* 0x1C */ unk_func_88001300_03C_01C* unk_1C;
/* 0x20 */ char unk20[0x4];
/* 0x20 */ s32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ char unk28[0x4];
/* 0x2C */ s32 unk_2C;
@ -124,48 +140,506 @@ typedef struct unk_func_88509A2C {
/* 0x40 */ char unk_40[12];
} unk_func_88509A2C; // size = 0x4C
typedef struct unk_func_88500020 {
/* 0x00 */ s32 unk_00;
typedef struct unk_func_88500EE4 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ u8* unk_2C;
/* 0x30 */ Color_RGBA8 unk_30;
/* 0x34 */ Color_RGBA8 unk_34;
} unk_func_88500EE4; // size = 0x38
typedef struct unk_func_885088F4 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
} unk_func_885088F4; // size = 0x3C
typedef struct unk_func_88509E34 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ char* unk_2C;
/* 0x30 */ char unk30[0x4];
} unk_func_88509E34; // size = 0x34
typedef struct unk_func_8850B254 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ Color_RGBA8 unk_2C;
/* 0x30 */ Color_RGBA8 unk_30;
} unk_func_8850B254; // size = 0x34
typedef struct unk_func_8850878C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ Color_RGBA8 unk_30;
/* 0x34 */ Color_RGBA8 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s32 unk_3C;
/* 0x40 */ char* unk_40;
/* 0x44 */ s32 unk_44;
} unk_func_8850878C; // size = 0x48
typedef struct unk_func_885012A4 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ Color_RGBA8 unk_2C;
} unk_func_885012A4; // size = 0x30
typedef struct unk_func_88503298 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_8850878C* unk_30;
} unk_func_88503298; // size = 0x34
typedef void (*unk_func_88200FA0_030_030_040)();
typedef struct unk_func_88200FA0_030_030 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8820BE14_06C* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ u16* unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s16 unk_3C;
/* 0x3E */ s16 unk_3E;
/* 0x40 */ unk_func_88200FA0_030_030_040 unk_40;
/* 0x44 */ unk_func_88001300_03C_01C* unk_44;
/* 0x48 */ s16 unk_48;
/* 0x4A */ s16 unk_4A;
/* 0x4C */ s16 unk_4C;
/* 0x4E */ s16 unk_4E;
/* 0x50 */ s16 unk_50;
/* 0x52 */ s16 unk_52;
} unk_func_88200FA0_030_030; // size = 0x54
// Copy of above with unk_2C changed just for fragment23_1AE680
typedef struct unk_func_88200FA0_030_030_1AE680 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88205880_A030* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ u16* unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s16 unk_3C;
/* 0x3E */ s16 unk_3E;
/* 0x40 */ unk_func_88200FA0_030_030_040 unk_40;
/* 0x44 */ unk_func_88001300_03C_01C* unk_44;
/* 0x48 */ s16 unk_48;
/* 0x4A */ s16 unk_4A;
/* 0x4C */ s16 unk_4C;
/* 0x4E */ s16 unk_4E;
/* 0x50 */ s16 unk_50;
/* 0x52 */ s16 unk_52;
} unk_func_88200FA0_030_030_1AE680; // size = 0x54
typedef struct unk_func_8850182C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ Color_RGBA8 unk_2C;
} unk_func_8850182C; // size = 0x30
typedef struct unk_func_889000C4 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ void* unk_2C;
/* 0x30 */ void* unk_30;
/* 0x34 */ unk_func_88200FA0_030_038 unk_34;
/* 0x40 */ void* unk_40;
/* 0x44 */ s32 unk_44;
} unk_func_889000C4; // size = 0x48
typedef struct unk_func_88500994 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_88500994; // size = 0x34
typedef struct unk_func_8850143C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ Color_RGBA8 unk_2C;
/* 0x30 */ Color_RGBA8 unk_30;
} unk_func_8850143C; // size = 0x34
typedef struct unk_func_8820399C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ unk_func_8850143C* unk_30;
} unk_func_8820399C; // size = 0x34
typedef struct unk_func_88509F48 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ void* unk_2C;
/* 0x30 */ void* unk_30;
/* 0x34 */ void* unk_34;
/* 0x38 */ s32 unk_38;
} unk_func_88509F48; // size = 0x3C
typedef void (*unk_func_8850CD44_010)();
typedef void (*unk_func_8850CD44_014)();
typedef struct unk_func_882173EC {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ unk_func_88001300_000_010 unk_30;
/* 0x34 */ unk_func_88001300_000_010 unk_34;
} unk_func_882173EC; // size = 0x38
typedef struct unk_func_8850CD44 {
/* 0x00 */ char unk00[0x10];
/* 0x10 */ unk_func_8850CD44_010 unk_10;
/* 0x14 */ unk_func_8850CD44_014 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ unk_func_882173EC** unk_1C;
/* 0x20 */ s32 unk_20;
} unk_func_8850CD44; // size = 0x24
typedef struct unk_func_882025E0_03C {
/* 0x00 */ unk_func_8850878C* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ u8* unk_0C;
} unk_func_88500020; // size = 0x10
} unk_func_882025E0_03C; // size = 0xC
typedef s32 (*unk_func_882025E0_010)(struct unk_func_882025E0* arg0, Controller* arg1);
typedef void (*unk_func_882025E0_014)(struct unk_func_882025E0* arg0, s32 arg1);
typedef struct unk_func_882025E0_024_02C {
/* 0x00 */ unk_func_88205880_00D0* unk_00[2];
/* 0x08 */ s32 unk_08;
} unk_func_882025E0_024_02C; // size >= 0xC
typedef struct unk_func_882025E0_024_02C_wrap {
/* 0x00 */ unk_func_882025E0_024_02C* unk_00;
} unk_func_882025E0_024_02C_wrap; // size >= 0xC
typedef struct unk_func_882025E0_024 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_882025E0_024_02C_wrap* unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ u16* unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s16 unk_3C;
/* 0x3E */ s16 unk_3E;
/* 0x40 */ unk_func_88200FA0_030_030_040 unk_40;
/* 0x44 */ unk_func_88001300_03C_01C* unk_44;
/* 0x48 */ s16 unk_48;
/* 0x4A */ s16 unk_4A;
/* 0x4C */ s16 unk_4C;
/* 0x4E */ s16 unk_4E;
/* 0x50 */ s16 unk_50;
/* 0x52 */ s16 unk_52;
} unk_func_882025E0_024; // size >= 0x54
typedef struct unk_func_882025E0 {
/* 0x00 */ char unk00[0x10];
/* 0x10 */ unk_func_882025E0_010 unk_10;
/* 0x14 */ unk_func_882025E0_014 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ struct unk_func_88203ED8* unk_20;
/* 0x24 */ unk_func_88200FA0_030_030* unk_24[2]; // unk_func_882025E0_024
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ unk_func_882025E0_03C unk_3C[5];
} unk_func_882025E0; // size = 0x78
// copy of the above for _1A9780
typedef struct unk_func_882025E0_1A9780 {
/* 0x00 */ char unk00[0x10];
/* 0x10 */ unk_func_882025E0_010 unk_10;
/* 0x14 */ unk_func_882025E0_014 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ struct unk_func_88203ED8* unk_20;
/* 0x24 */ unk_func_88200FA0_030_030_1AE680* unk_24[2];
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ unk_func_882025E0_03C unk_3C[5];
} unk_func_882025E0_1A9780; // size = 0x78
typedef s32 (*unk_func_88203ED8_064_010)(struct unk_func_88203ED8_064*, Controller*);
typedef void (*unk_func_88203ED8_064_014)(struct unk_func_88203ED8_064*);
typedef struct unk_func_88203ED8_064 {
/* 0x00 */ char unk00[0x4];
/* 0x04 */ struct unk_func_88203ED8_064* unk_04;
/* 0x08 */ struct unk_func_88203ED8_064* unk_08;
/* 0x0C */ char unk0C[0x4];
/* 0x10 */ unk_func_88203ED8_064_010 unk_10;
/* 0x14 */ unk_func_88203ED8_064_014 unk_14;
/* 0x18 */ char unk18[0x4];
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ struct unk_func_88203ED8* unk_24;
} unk_func_88203ED8_064; // size = 0x28
typedef struct unk_func_88205880_0098_008 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ char unk2C[0x64];
} unk_func_88205880_0098_008; // size = 0x90
typedef struct unk_func_88205880_0098 {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ MemoryPool* unk_04;
/* 0x08 */ unk_func_88205880_0098_008* unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ char* unk_14;
/* 0x18 */ char* unk_18;
/* 0x1C */ char* unk_1C;
/* 0x20 */ char* unk_20;
/* 0x24 */ char* unk_24;
/* 0x28 */ char* unk_28;
/* 0x2C */ char* unk_2C;
/* 0x30 */ char* unk_30;
/* 0x34 */ char* unk_34;
} unk_func_88205880_0098; // size = 0x38
typedef struct unk_func_88201DA0 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x30 */ unk_func_88200FA0_030_030* unk_30;
/* 0x34 */ unk_func_88201DA0_034* unk_34;
/* 0x38 */ unk_func_88201DA0_038 unk_38;
/* 0x48 */ FragmentEntry unk_48;
/* 0x4C */ unk_func_88205880_0098* unk_4C;
/* 0x50 */ unk_func_8850878C* unk_50;
/* 0x54 */ char* unk_54;
/* 0x58 */ unk_func_8850182C* unk_58;
/* 0x5C */ unk_func_88205880_00D0* unk_5C;
/* 0x60 */ u32 unk_60;
} unk_func_88201DA0; // size = 0x64
typedef struct unk_func_8820253C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88205880_00D0* unk_2C;
} unk_func_8820253C; // size = 0x30
typedef struct unk_func_88217740 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_88217740; // size = 0x34
typedef struct unk_func_882149A0 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ u8* unk_2C;
/* 0x30 */ s16 unk_30;
/* 0x32 */ Color_RGBA8 unk_32;
/* 0x36 */ Color_RGBA8 unk_36;
/* 0x3A */ Color_RGBA8 unk_3A;
/* 0x40 */ s32 unk_40;
} unk_func_882149A0; // size = 0x44
typedef struct unk_func_88203ED8 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_88001300_038* unk_2C;
/* 0x2C */ unk_func_8820399C* unk_30;
/* 0x2C */ unk_func_8820399C* unk_34;
/* 0x2C */ unk_func_88200FA0_030_030* unk_38;
/* 0x2C */ unk_func_88200FA0_030_030* unk_3C;
/* 0x2C */ unk_func_88217740* unk_40;
/* 0x44 */ unk_func_882149A0* unk_44[5];
/* 0x58 */ unk_func_88500994* unk_58;
/* 0x5C */ unk_func_88201DA0* unk_5C;
/* 0x60 */ unk_func_88509F48* unk_60;
/* 0x64 */ unk_func_88203ED8_064* unk_64;
/* 0x68 */ unk_func_88001300_03C* unk_68;
/* 0x6C */ unk_func_882025E0* unk_6C;
/* 0x70 */ unk_func_8850CD44* unk_70;
/* 0x74 */ unk_func_882173EC* unk_74[2];
/* 0x7C */ unk_func_8820253C* unk_7C[2];
/* 0x84 */ unk_func_889000C4* unk_84;
} unk_func_88203ED8; // size = 0x88
typedef struct unk_func_8820BE14_02C_038_084 {
/* 0x00 */ unk_func_88001300_000 unk_00;
} unk_func_8820BE14_02C_038_084; // size >= 0x18
typedef struct unk_func_8820BE14_02C_038 {
/* 0x00 */ unk_func_88200FA0_030_030 unk_00; // unk_func_882025E0_024
/* 0x54 */ u16 unk_54;
/* 0x56 */ u16 unk_56;
/* 0x58 */ s32 unk_58;
/* 0x5C */ s32 unk_5C;
/* 0x60 */ s32 unk_60;
/* 0x64 */ s32 unk_64;
/* 0x68 */ s32 unk_68;
/* 0x6C */ s32 unk_6C;
/* 0x70 */ s32 unk_70;
/* 0x74 */ unk_func_88001300_01C unk_74;
/* 0x78 */ unk_func_88001300_018 unk_78;
/* 0x7C */ unk_func_88001300_020 unk_7C;
/* 0x80 */ unk_func_88001300_018 unk_80;
/* 0x84 */ unk_func_8820BE14_02C_038_084* unk_84;
/* 0x88 */ s32* unk_88;
/* 0x8C */ u32 unk_8C;
} unk_func_8820BE14_02C_038; // size = 0x90
typedef struct unk_func_88507D4C {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ unk_func_8820BE14_02C_038* unk_2C;
/* 0x30 */ s32 unk_30;
} unk_func_88507D4C; // size = 0x34
typedef struct unk_func_8850BD40 {
/* 0x00 */ unk_func_88001300_000_000 unk_00;
/* 0x0C */ char unk0C[0x14];
} unk_func_8850BD40; // size = 0x20
typedef struct unk_func_8821421C_038_034 {
/* 0x00 */ unk_func_88200FA0_030_030 unk_00;
/* 0x54 */ char unk54[0x1C];
} unk_func_8821421C_038_034; // size = 0x70
typedef struct unk_func_8821421C_038_050 {
/* 0x00 */ char unk00[0x8];
/* 0x08 */ char unk_08[4];
/* 0x0C */ char unk0C[0x8];
} unk_func_8821421C_038_050; // size = 0x14
typedef struct unk_func_8820E99C_030_044 {
/* 0x00 */ unk_func_88001300_000 unk_00;
/* 0x2C */ char unk2C[0x4];
/* 0x30 */ s32 unk_30;
} unk_func_8820E99C_030_044; // size = 0x34
typedef void (*func88500020)(unk_func_88500020*, s32, s32);
typedef void (*func88500668)(unk_func_882025E0*, s32);
typedef void (*func8850068C)(unk_func_88001300_000_000*, unk_func_88001300_000_000*);
typedef void (*func885007CC)(unk_func_88001300_000*, s32);
typedef void (*func88500828)(unk_func_88001300*, s32, s32);
typedef void (*func885008C4)(unk_func_88001300*);
typedef void (*func8850093C)(s32, s32);
typedef void (*func88500994)(unk_func_88500994*, s32, s32);
typedef void (*func88500A3C)(unk_func_88500994*, unk_func_8850878C*);
typedef void (*func88500A6C)(unk_func_88500994*, s32);
typedef void (*func88500E34)(unk_func_88500E34*, s32, s32, s32, s32, u8*);
typedef void (*func88500EE4)(unk_func_88500EE4*, s32, s32, s32, s32, u8*, Color_RGBA8, Color_RGBA8);
typedef void (*func885012A4)(unk_func_885012A4*, s32, s32, s32, s32, Color_RGBA8);
typedef void (*func8850143C)(unk_func_8850143C*, s32, s32, s32, s32, Color_RGBA8, Color_RGBA8);
typedef void (*func8850182C)(unk_func_8850182C*, s32, s32, s32, s32, Color_RGBA8);
typedef void (*func88502274)(unk_func_88001300_038*, s32, s32, s32, s32);
typedef void (*func88502C98)(unk_func_88001300_038*);
typedef void (*func88503118)(unk_func_88001300_02C*, s32, s32, s32, s32);
typedef void (*func885031E8)(unk_func_88001300_000*, s32, s32, s32, s32);
typedef void (*func88503298)(unk_func_88503298*, unk_func_88001300_038*, unk_func_88001300_000*);
typedef void (*func88503340)(unk_func_88001300_03C_01C*, s32, s32, s32, s32, Color_RGBA8);
typedef void (*func88504570)(unk_func_88001300_03C_01C*, s32, s32, s32, s32, Color_RGBA8);
typedef void (*func88504F98)(unk_func_8820E99C_030_044*, s32, s32, s32, s32);
typedef void (*func885054D8)(unk_func_88001300_030*, s32, s32, s32, s32, Color_RGBA8);
typedef void (*func88505E2C)(unk_func_88001300_034*, s32, s32, s32, s32, s32, Color_RGBA8, unk_D_800AC870*);
typedef void (*func88506074)(unk_func_88001300_034*, char*);
typedef void (*func885060BC)(unk_func_88200FA0_030_030*, s32, s32, unk_func_88200FA0_030_030_040, s32, s32, s32, s32, MemoryPool*);
typedef void (*func88506238)(unk_func_88200FA0_030_030*, s32, MemoryPool*);
typedef void (*func8850628C)(unk_func_88200FA0_030_030*);
typedef void (*func88506384)(unk_func_88200FA0_030_030*, unk_func_88200FA0_030_038*, MemoryPool*);
typedef void (*func885063B8)(unk_func_88200FA0_030_030*, unk_func_88201DA0_038*);
typedef void (*func88506404)(unk_func_88200FA0_030_030*, u8*, MemoryPool*);
typedef void (*func88506BFC)(unk_func_88200FA0_030_030*, s32);
typedef void (*func88506CE4)(unk_func_88200FA0_030_030*);
typedef void (*func88506DCC)(unk_func_8821421C_038_034*, s32, s32, void (*)(), s32, s32, s32, MemoryPool*);
typedef void (*func88506EE4)(unk_func_8820BE14_02C_038*, unk_func_88200FA0_030_038*);
typedef void (*func88506F50)(unk_func_8821421C_038_034*, unk_func_8821421C_038_050**);
typedef void (*func88506FC0)(unk_func_8820BE14_02C_038*);
typedef void (*func88506FE0)(unk_func_8820BE14_02C_038*);
typedef void (*func88507AE4)(unk_func_8820BE14_02C_038*, s32);
typedef void (*func88507B80)(unk_func_8820BE14_02C_038*, s32);
typedef void (*func88507CC4)(unk_func_8820BE14_02C_038*, unk_func_88205880_00D0*);
typedef void (*func88507CEC)(unk_func_8820BE14_02C_038*);
typedef void (*func88507D4C)(unk_func_88507D4C*, s32, s32, s32, s32, unk_func_8820BE14_02C_038*);
typedef void (*func8850878C)(unk_func_8850878C*, s32, s32, char*, s32);
typedef void (*func885088F4)(unk_func_885088F4*, s32, s32, s32);
typedef void (*func88509A2C)(unk_func_88509A2C*, s32, s32, s32, char*);
typedef void (*func88509E34)(unk_func_88509E34*, s32, s32, char*);
typedef void (*func88509F48)(unk_func_88509F48*, s32, s32, s32, s32, MemoryPool*, s32);
typedef void (*func8850A10C)(unk_func_88509F48*, unk_func_8850878C*, s32, s32);
typedef void (*func8850A3CC)(unk_func_88509F48*, Controller*);
typedef void (*func8850A3EC)(unk_func_88509F48*, Controller*);
typedef void (*func8850A40C)(unk_func_88001300_000*, s32, s32, s32, s32);
typedef void (*func8850AB48)(unk_func_88001300_000*, s32, s32, s32, s32);
typedef void (*func8850B254)(unk_func_8850B254*, s32, s32, s32, s32, Color_RGBA8, Color_RGBA8);
typedef void (*func8850BC94)(s32);
typedef void (*func8850BD40)(unk_func_8850BD40*, unk_func_8821421C_038_034*);
typedef void (*func8850BDF0)(unk_func_88203ED8_064* arg0);
typedef void (*func8850BF60)(unk_func_88001300_000*, s32);
typedef void (*func8850BF80)(unk_func_88001300_000*, unk_func_88001300_000*);
typedef void (*func8850BFB0)(unk_func_88203ED8_064*);
typedef void (*func8850C064)(unk_func_88203ED8_064*, s32);
typedef void (*func8850C284)(unk_func_88001300_03C*, s32, s32, MemoryPool*);
typedef void (*func8850CAB4)(unk_func_88001300_03C*);
typedef void (*func8850CB48)(unk_func_88001300_03C*, s32);
typedef void (*func8850CC74)(unk_func_88001300_000*, unk_func_88001300_000*);
typedef void (*func8850CD44)(unk_func_8850CD44*, s32, MemoryPool*);
typedef void (*func8850CF00)(unk_func_8850CD44*, s32);
void func_88500020(unk_func_88500020*, s32, s32);
void func_88500668(unk_func_882025E0*, s32);
void func_8850068C(unk_func_88001300_000_000*, unk_func_88001300_000_000*);
void func_885007CC(unk_func_88001300_000*, s32);
void func_88500828(unk_func_88001300*, s32, s32);
void func_885008C4(unk_func_88001300*);
void func_88500828(unk_func_88001300_000*, s32, s32);
void func_885008C4(unk_func_88001300_000*);
void func_8850093C(s32, s32);
void func_88500994(unk_func_88500994*, s32, s32);
void func_88500A3C(unk_func_88500994*, unk_func_8850878C*);
void func_88500A6C(unk_func_88500994*, s32);
void func_88500E34(unk_func_88500E34*, s32, s32, s32, s32, u8*);
void func_88500EE4(unk_func_88500EE4*, s32, s32, s32, s32, u8*, Color_RGBA8, Color_RGBA8);
void func_885012A4(unk_func_885012A4*, s32, s32, s32, s32, Color_RGBA8);
void func_8850143C(unk_func_8850143C*, s32, s32, s32, s32, Color_RGBA8, Color_RGBA8);
void func_8850182C(unk_func_8850182C*, s32, s32, s32, s32, Color_RGBA8);
void func_88502274(unk_func_88001300_038*, s32, s32, s32, s32);
void func_88502C98(unk_func_88001300_038*);
void func_88503118(unk_func_88001300_02C*, s32, s32, s32, s32);
void func_885031E8(unk_func_88001300_000*, s32, s32, s32, s32);
void func_88503298(unk_func_88503298*, unk_func_88001300_038*, unk_func_88001300_000*);
void func_88503340(unk_func_88001300_03C_01C*, s32, s32, s32, s32, Color_RGBA8);
void func_88504570(unk_func_88001300_03C_01C*, s32, s32, s32, s32, Color_RGBA8);
void func_88504F98(unk_func_8820E99C_030_044*, s32, s32, s32, s32);
void func_885054D8(unk_func_88001300_030*, s32, s32, s32, s32, Color_RGBA8);
void func_88505E2C(unk_func_88001300_034*, s32, s32, s32, s32, s32, Color_RGBA8, unk_D_800AC870*);
void func_88506074(unk_func_88001300_034* arg0, char* arg1);
void func_885060BC(unk_func_88200FA0_030_030*, s32, s32, unk_func_88200FA0_030_030_040, s32, s32, s32, s32, MemoryPool*);
void func_88506238(unk_func_88200FA0_030_030*, s32, MemoryPool*);
void func_8850628C(unk_func_88200FA0_030_030*);
void func_88506384(unk_func_88200FA0_030_030*, unk_func_88200FA0_030_038*, MemoryPool*);
void func_885063B8(unk_func_88200FA0_030_030*, unk_func_88201DA0_038*);
void func_88506404(unk_func_88200FA0_030_030*, u8*, MemoryPool*);
void func_88506BFC(unk_func_88200FA0_030_030*, s32);
void func_88506CE4(unk_func_88200FA0_030_030*);
void func_88506DCC(unk_func_8821421C_038_034*, s32, s32, void (*)(), s32, s32, s32, MemoryPool*);
void func_88506EE4(unk_func_8820BE14_02C_038*, unk_func_88200FA0_030_038*);
void func_88506F50(unk_func_8821421C_038_034*, unk_func_8821421C_038_050**);
void func_88506FC0(unk_func_8820BE14_02C_038*);
void func_88506FE0(unk_func_8820BE14_02C_038*);
void func_88507AE4(unk_func_8820BE14_02C_038*, s32);
void func_88507B80(unk_func_8820BE14_02C_038*, s32);
void func_88507CC4(unk_func_8820BE14_02C_038*, unk_func_88205880_00D0*);
void func_88507CEC(unk_func_8820BE14_02C_038*);
void func_88507D4C(unk_func_88507D4C*, s32, s32, s32, s32, unk_func_8820BE14_02C_038*);
void func_8850878C(unk_func_8850878C*, s32, s32, char*, s32);
void func_885088F4(unk_func_885088F4*, s32, s32, s32);
void func_88509A2C(unk_func_88509A2C*, s32, s32, s32, char*);
void func_88509E34(unk_func_88509E34*, s32, s32, char*);
void func_88509F48(unk_func_88509F48*, s32, s32, s32, s32, MemoryPool*, s32);
void func_8850A10C(unk_func_88509F48*, unk_func_8850878C*, s32, s32);
void func_8850A3CC(unk_func_88509F48*, Controller*);
void func_8850A3EC(unk_func_88509F48*, Controller*);
void func_8850A40C(unk_func_88001300_000*, s32, s32, s32, s32);
void func_8850AB48(unk_func_88001300_000*, s32, s32, s32, s32);
void func_8850B254(unk_func_8850B254*, s32, s32, s32, s32, Color_RGBA8, Color_RGBA8);
void func_8850BC94(s32);
void func_8850BD40(unk_func_8850BD40*, unk_func_8821421C_038_034*);
void func_8850BDF0(unk_func_88203ED8_064* arg0);
void func_8850BF60(unk_func_88001300_000*, s32);
void func_8850BF80(unk_func_88001300_000*, unk_func_88001300_000_000*);
void func_8850BFB0(unk_func_88203ED8_064*);
void func_8850C064(unk_func_88203ED8_064*, s32);
void func_8850C284(unk_func_88001300_03C*, s32, s32, MemoryPool*);
void func_8850CAB4(unk_func_88001300_03C*);
void func_8850CB48(unk_func_88001300_03C*, s32, s32);
void func_8850CC74(unk_func_88001300_000*, unk_func_88001300_000*);
void func_8850CD44(unk_func_8850CD44*, s32, MemoryPool*);
void func_8850CF00(unk_func_8850CD44*, s32);
#endif // _FRAGMENT26_H_

View File

@ -1,4 +1,4 @@
#include "global.h"
#include "fragment29.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/29/fragment29/func_88900020.s")

View File

@ -0,0 +1,19 @@
#ifndef _FRAGMENT29_H_
#define _FRAGMENT29_H_
#include "global.h"
#include "src/fragments/26/fragment26.h"
typedef void (*func889000C4)(unk_func_889000C4*, s32, unk_func_88001300_038*, s32, char*, MemoryPool*);
typedef void (*func889006D4)(unk_func_889000C4*, s32);
typedef void (*func889007AC)(unk_func_889000C4*);
typedef s32 (*func88900808)(unk_func_889000C4*, Controller*, s32);
typedef void (*func88900970)(unk_func_889000C4*, s32);
void func_889000C4(unk_func_889000C4*, s32, unk_func_88001300_038*, s32, char*, MemoryPool*);
void func_889006D4(unk_func_889000C4*, s32);
void func_889007AC(unk_func_889000C4*);
s32 func_88900808(unk_func_889000C4*, Controller*, s32);
void func_88900970(unk_func_889000C4*, s32);
#endif // _FRAGMENT29_H_

View File

@ -170,15 +170,16 @@ uintptr_t Memmap_GetFragmentBaseVaddr(u32 id) {
* Y: Fragment number.
* Z: Fragment offset.
*/
uintptr_t Memmap_GetFragmentVaddr(u32 mask) {
if ((mask >= 0x81000000U) && (mask < 0x90000000U)) {
u32 id = ((mask & 0x0FF00000) >> 0x14) - 0x10;
u32 value = ((mask & 0x000FFFFF));
uintptr_t Memmap_GetFragmentVaddr(void* addr) {
if (((u32)addr >= 0x81000000U) && ((u32)addr < 0x90000000U)) {
u32 id = (((u32)addr & 0x0FF00000) >> 0x14) - 0x10;
u32 value = (((u32)addr & 0x000FFFFF));
if (gFragments[id].vaddr != NULL) {
mask = gFragments[id].vaddr + value;
addr = gFragments[id].vaddr + value;
}
}
return mask;
return (uintptr_t)addr;
}
/*

View File

@ -49,7 +49,7 @@ void Memmap_SetSegments(Gfx** gfxDl);
void Memmap_RelocateFragment(u32 id, struct Fragment* fragment);
void Memmap_SetFragmentMap(u32 id, uintptr_t vaddr, size_t size);
uintptr_t Memmap_GetFragmentBaseVaddr(u32 id);
uintptr_t Memmap_GetFragmentVaddr(u32 mask);
uintptr_t Memmap_GetFragmentVaddr(void* addr);
u32 Memmap_GetFragmentVaddrMask(u32 i, uintptr_t addr);
void Memmap_ClearFragmentMemmap(u32 id);
uintptr_t Memmap_GetLoadedFragmentVaddr(uintptr_t addr);

View File

@ -69,8 +69,8 @@ MainPool*main_pool_get_pool(void);
// memory.c
MemoryPool *mem_pool_try_init(u32 size, s32 side);
MainPool* mem_pool_init(MainPool*pool, s32 size);
void *mem_pool_alloc(MainPool*node, s32 size);
MainPool* mem_pool_init(MainPool* pool, s32 size);
void *mem_pool_alloc(MainPool* node, s32 size);
void mem_pool_free(MemoryPool* pool, void* addr);
void *func_80002D10(u32 size, s32 side);

View File

@ -214,7 +214,7 @@ u32 main_pool_get_available(void) {
* in the pool.
*/
u32 main_pool_push_state(u32 arg) {
struct MainPoolState* state;
MainPoolState* state;
MainPoolBlock* listHeadL;
MainPoolBlock* listHeadR;
uintptr_t available;
@ -263,11 +263,11 @@ u32 main_pool_push_state(u32 arg) {
* amount of free space left in the pool.
*/
u32 main_pool_pop_state(u32 arg) {
struct MainPoolState* node;
MainPoolState* node;
MainPoolBlock* argptr;
void* listHeadL;
void* listHeadR;
struct MainPoolState* state;
MainPoolState* state;
osRecvMesg(&sMemPool.queue, NULL, OS_MESG_BLOCK);
@ -387,7 +387,7 @@ void main_pool_set_func(void* block, s32 arg, AllocateFunc func) {
* Get the distance offset from the block's state listHeadL pointer to the current block.
*/
size_t main_pool_get_block_dist(MainPoolBlock* block) {
struct MainPoolState* state = ((u8*)block - sizeof(MainPoolBlock));
MainPoolState* state = ((u8*)block - sizeof(MainPoolBlock));
return (size_t)((uintptr_t)state->listHeadL - (uintptr_t)block);
}

View File

@ -1145,12 +1145,19 @@
- [0x1AE680, c, fragments/23/fragment23_1AE680]
- [0x1B4EA0, c, fragments/23/fragment23_1B4EA0]
- [0x1BCF10, c, fragments/23/fragment23_1BCF10]
- [0x1C0160, data, fragments/23/fragment23_data]
- [0x1CD3C0, rodata, fragments/23/fragment23_rodata_1CD3C0]
- [0x1CD400, rodata, fragments/23/fragment23_rodata_1CD400]
- [0x1CD470, rodata, fragments/23/fragment23_rodata_1CD470]
- [0x1C0160, c, fragments/23/fragment23_882181B0]
- [0x1C0160, .data, fragments/23/fragment23_1A8800] # fragment23_1A8800
- [0x1C0190, .data, fragments/23/fragment23_1A9780] # fragment23_1A9780
- [0x1C0280, .data, fragments/23/fragment23_1AE680] # fragment23_1AE680
- [0x1C0540, .data, fragments/23/fragment23_1B4EA0] # fragment23_1B4EA0
- [0x1C0720, .data, fragments/23/fragment23_882181B0] # fragment23_882181B0
- [0x1CD3C0, .rodata, fragments/23/fragment23_1A9780] # fragment23_1A9780
- [0x1CD400, .rodata, fragments/23/fragment23_1AE680]
- [0x1CD470, .rodata, fragments/23/fragment23_1B4EA0]
- {vram: 0x88224F90, type: bss, name: fragments/23/fragment23_bss}
- {vram: 0x88224F90, type: .bss, name: fragments/23/fragment23_1A8800} # fragment23_1A8800
- {vram: 0x88224FA0, type: .bss, name: fragments/23/fragment23_1A9780} # fragment23_1A9780
- {vram: 0x88224FC0, type: .bss, name: fragments/23/fragment23_1B4EA0} # fragment23_1B4EA0
- name: fragment23_relocs
type: code