From 7ae8d73328aae999a30c6916bd2085b7a03afcac Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 23 Jan 2021 11:03:52 +1000 Subject: [PATCH] Decompile func0f13c510 --- src/game/game_13c510.c | 28 +++++++++------------------- src/include/boot/boot.h | 1 + src/include/types.h | 10 +++++++++- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/game/game_13c510.c b/src/game/game_13c510.c index 20df31667..fe116b337 100644 --- a/src/game/game_13c510.c +++ b/src/game/game_13c510.c @@ -57,25 +57,15 @@ const u32 var7f1b5a04[] = {0x3b888889}; const u32 var7f1b5a08[] = {0x3b888889}; const u32 var7f1b5a0c[] = {0x3ecccccd}; -GLOBAL_ASM( -glabel func0f13c510 -/* f13c510: 27bdffe8 */ addiu $sp,$sp,-24 -/* f13c514: afbf0014 */ sw $ra,0x14($sp) -/* f13c518: 0c000913 */ jal func0000244c -/* f13c51c: 00000000 */ nop -/* f13c520: 00001825 */ or $v1,$zero,$zero -/* f13c524: 00402025 */ or $a0,$v0,$zero -/* f13c528: 24050078 */ addiu $a1,$zero,0x78 -.L0f13c52c: -/* f13c52c: 24630001 */ addiu $v1,$v1,0x1 -/* f13c530: 24840014 */ addiu $a0,$a0,0x14 -/* f13c534: 1465fffd */ bne $v1,$a1,.L0f13c52c -/* f13c538: a480ffec */ sh $zero,-0x14($a0) -/* f13c53c: 8fbf0014 */ lw $ra,0x14($sp) -/* f13c540: 27bd0018 */ addiu $sp,$sp,0x18 -/* f13c544: 03e00008 */ jr $ra -/* f13c548: 00000000 */ nop -); +void func0f13c510(void) +{ + struct bootbufferthing *thing = func0000244c(); + s32 i; + + for (i = 0; i < ARRAYCOUNT(thing->unk00); i++) { + thing->unk00[i].unk00 = 0; + } +} void func0f13c54c(void) { diff --git a/src/include/boot/boot.h b/src/include/boot/boot.h index 5ecf6b4ea..d677aa363 100644 --- a/src/include/boot/boot.h +++ b/src/include/boot/boot.h @@ -14,6 +14,7 @@ s32 func00002078(void); s32 func00002148(void); s32 func00002148(void); s32 func000022e0(void); +struct bootbufferthing *func0000244c(void); void func000024e8(void); void func00002510(void); diff --git a/src/include/types.h b/src/include/types.h index a5cc1c915..37452dbc2 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3447,8 +3447,16 @@ struct audioconfig { u32 flags; // 0x10 = contains swearing }; +struct bootbufferthingdeep { + u16 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; + u32 unk10; +}; + struct bootbufferthing { - u8 unk00[2400]; + struct bootbufferthingdeep unk00[120]; }; struct playerstats {