Merge pull request #186 from Kelebek1/fragment53

fragment53
This commit is contained in:
Maide
2025-04-17 09:33:27 +01:00
committed by GitHub
6 changed files with 101 additions and 9 deletions

View File

@@ -459,7 +459,9 @@ typedef struct unk_D_86002F30 {
typedef struct UnkInputStruct8000D738 {
/* 0x00 */ s16 unk_00;
/* 0x00 */ s32 unk_04;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ u16 (*unk_04)[6][0x640];
} UnkInputStruct8000D738; // size = 0x8
typedef struct UnkStruct800AA660 {

View File

@@ -59,6 +59,7 @@ typedef struct unk_func_8001A024 {
unk_func_8001A024* func_8001A024(unk_D_86002F58_004_000_010*, s16, s16, s16);
void func_8001A324(unk_func_8001A024*, s32, s32, u16);
void func_8001A46C(unk_func_8001A024*, s32, unk_func_80026268_arg0*, s32);
s32 func_8001ABAC(unk_func_8001A024*, s32);
void* func_8001AFD8(unk_func_8001A024*, s32);
void func_8001B058(void);

View File

@@ -532,7 +532,7 @@ void func_8002A728(void) {
func_80001BD4(2);
func_8000D358();
sp2C.unk_04 = main_pool_alloc(0x4B00, 0);
sp2C.unk_04 = main_pool_alloc(sizeof(*sp2C.unk_04), 0);
FRAGMENT_LOAD_AND_CALL(fragment53, D_80075674, &sp2C);
func_8000D738(&sp2C);

View File

@@ -1,9 +1,87 @@
#include "global.h"
#include "fragment53.h"
#include "src/19840.h"
#include "src/1AB70.h"
#include "src/232C0.h"
#include "src/26820.h"
#include "src/3FB0.h"
#include "src/6A40.h"
#include "src/6BC0.h"
#include "src/controller.h"
#include "src/memory.h"
#include "src/stage_loader.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/53/fragment53/func_82A00020.s")
static unk_D_86002F58_004_000_010* D_82A00370;
static unk_func_8001A024* D_82A00374;
static unk_func_80026268_arg0 D_82A00378[6];
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/53/fragment53/func_82A000F0.s")
static s32 D_82A00360 = 0;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/53/fragment53/func_82A00144.s")
void func_82A00020(s32 arg0) {
s32 i;
unk_func_80022C28_ret* temp_v0;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/53/fragment53/func_82A00224.s")
if (func_80023AF8(arg0) != 0) {
temp_v0 = func_80022C28(0x20, arg0, 0, 0);
D_82A00360 = func_80022E18(D_82A00378, 6, temp_v0);
func_80022D8C(temp_v0);
}
for (i = 0; i < D_82A00360; i++) {
func_8001A46C(D_82A00374, i, &D_82A00378[i], 1);
}
}
s32 func_82A000F0(u8 arg0) {
Cont_StartReadInputs();
Cont_ReadInputs();
func_8001ABAC(D_82A00374, 0);
func_800079C4();
func_8000699C(&gDisplayListHead, 1);
return 0;
}
void func_82A00144(UnkInputStruct8000D738* arg0) {
s32 i;
unk_func_8002A728 sp34;
u16(*var_s1)[0x640] = arg0->unk_04[0];
func_80027F24(&sp34);
arg0->unk_02 = sp34.unk_00;
arg0->unk_00 = sp34.unk_04;
arg0->unk_03 = D_82A00360;
for (i = 0; i < D_82A00360; i++, var_s1++) {
_bcopy(func_8001AFD8(D_82A00374, i), var_s1, sizeof(var_s1[0]));
}
if (D_82A00360 < 6) {
bzero(var_s1, 0x4B00 + (-D_82A00360 * 0xC80));
}
}
s32 func_82A00224(s32 arg0, UnkInputStruct8000D738* arg1) {
unk_func_80007444* sp24;
main_pool_push_state('PREP');
func_80005E40(0x10000, 0);
sp24 = func_80007444(0, 1, 2, 0, 1, 1);
ASSET_LOAD(D_1000000, common_menu1_ui, 0);
FRAGMENT_LOAD(fragment31);
D_82A00370 = func_80019760(1);
D_82A00374 = func_8001A024(D_82A00370, 6, 0x28, 0x28);
func_8001987C();
func_82A00020(arg0);
func_80028AFC(2);
func_80007678(sp24);
func_80007820(8, func_82A000F0);
func_800076C0();
func_82A00144(arg1);
func_80005EAC();
main_pool_pop_state('PREP');
return D_82A00360;
}

View File

@@ -0,0 +1,11 @@
#ifndef _FRAGMENT53_H_
#define _FRAGMENT53_H_
#include "global.h"
void func_82A00020(s32 arg0);
s32 func_82A000F0(u8 arg0);
void func_82A00144(UnkInputStruct8000D738* arg0);
s32 func_82A00224(s32 arg0, UnkInputStruct8000D738* arg1);
#endif // _FRAGMENT53_H_

View File

@@ -1918,9 +1918,9 @@
subsegments:
- [0x2BD6E0, textbin, fragments/53/fragment53_header]
- [0x2BD700, c, fragments/53/fragment53]
- [0x2BDA40, data, fragments/53/fragment53_data]
- [0x2BDA40, .data, fragments/53/fragment53]
- {vram: 0x82A00370, type: bss, name: fragments/53/fragment53_bss}
- {vram: 0x82A00370, type: .bss, name: fragments/53/fragment53}
- name: fragment53_relocs
type: code