decomp another full file w/ data and ram

This commit is contained in:
Seth Barberee 2024-08-15 19:59:42 -07:00
parent 989df3b591
commit 8385305027
6 changed files with 1925 additions and 2008 deletions

File diff suppressed because it is too large Load Diff

1821
asm/code_8015080.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,6 @@
.section .rodata
.align 2, 0
@ START code_80130A8 #3
.string "pksdir0\0"
.global gUnknown_80DAF70
gUnknown_80DAF70: @ 80DAF70
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.global gUnknown_80DAF88
gUnknown_80DAF88: @ 80DAF88
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x02, 0x00, 0x02, 0x00
.byte 0x1a, 0x00, 0x0c, 0x00
.byte 0x0c, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.global gUnknown_80DAFA0
gUnknown_80DAFA0: @ 80DAFA0
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x16, 0x00, 0x0f, 0x00
.byte 0x06, 0x00, 0x03, 0x00
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
@ END code_80130A8 #3
@ START code_80130A8 #4
.string "pksdir0\0"
@ -365,4 +335,4 @@ gUnknown_80DB664: @ 80DB664
.string "%s\0"
.align 2,0
@ END code_80130A8 #4
@ END code_80130A8 #4

View File

@ -103,6 +103,8 @@ SECTIONS {
asm/code_80130A8.o(.text);
src/code_80140DC.o(.text);
asm/code_80140DC.o(.text);
src/code_8015080.o(.text);
asm/code_8015080.o(.text);
src/code_8012A18_1.o(.text);
src/code_801602C.o(.text);
src/felicity_bank.o(.text);
@ -450,6 +452,7 @@ SECTIONS {
src/code_80140DC.o(.rodata);
data/data_80D47B8.o(.rodata);
src/common_strings.o(.rodata);
src/code_8015080.o(.rodata);
data/data_80DAF70.o(.rodata);
src/code_801602C.o(.rodata);
src/felicity_bank.o(.rodata);

99
src/code_8015080.c Normal file
View File

@ -0,0 +1,99 @@
#include "global.h"
#include "globaldata.h"
#include "code_80130A8.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "text1.h"
#include "text2.h"
struct unkStruct_203B1F8
{
// size: 0x4B4
u32 menuAction;
MenuStruct unk4;
UnkTextStruct2 unk54[4];
u8 buffer[0x400];
};
EWRAM_DATA_2 struct unkStruct_203B1F8 *gUnknown_203B1F8 = {0};
const UnkTextStruct2 gUnknown_80DAF70 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DAF88 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x02,
0x1A, 0x0c,
0x0c, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DAFA0 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x16, 0x0F,
0x06, 0x03,
0x03, 0x00,
NULL
};
bool8 sub_8015080(u8 *buffer, const MenuItem *menuItems)
{
s32 index;
gUnknown_203B1F8 = MemoryAlloc(sizeof(struct unkStruct_203B1F8), 8);
gUnknown_203B1F8->menuAction = 0;
for(index = 0; index < 4; index++)
{
gUnknown_203B1F8->unk54[index] = gUnknown_80DAF70;
}
gUnknown_203B1F8->unk54[0] = gUnknown_80DAF88;
gUnknown_203B1F8->unk54[2] = gUnknown_80DAFA0;
sub_8012CAC(&gUnknown_203B1F8->unk54[2], menuItems);
ResetUnusedInputStruct();
sub_800641C(gUnknown_203B1F8->unk54, 1, 1);
sub_80073B8(0);
xxx_format_string(buffer, gUnknown_203B1F8->buffer, gUnknown_203B1F8->buffer + 0x400, 0);
PrintStringOnWindow(4, 4, gUnknown_203B1F8->buffer, 0, 0);
sub_80073E0(0);
sub_8012D60(&gUnknown_203B1F8->unk4, menuItems, 0, 0, -1, 2);
return TRUE;
}
u32 sub_801516C(void)
{
if(!sub_8012FD8(&gUnknown_203B1F8->unk4))
{
sub_8013114(&gUnknown_203B1F8->unk4, &gUnknown_203B1F8->menuAction);
return 3;
}
else
{
return 0;
}
}
u32 sub_8015198(void)
{
return gUnknown_203B1F8->menuAction;
}
void sub_80151A4(void)
{
if(gUnknown_203B1F8)
{
MemoryFree(gUnknown_203B1F8);
gUnknown_203B1F8 = NULL;
}
}

View File

@ -113,8 +113,7 @@ gUnknown_203B0EC: /* 203B0EC (sub_8010C58) */
gUnknown_203B198: /* 203B198 (sub_8014248 - sub_8014A88) */
.space 0x60
gUnknown_203B1F8: /* 203B1F8 (sub_8015080 - sub_80151A4) */
.space 0x4
.include "src/code_8015080.o"
gUnknown_203B1FC: /* 203B1FC (sub_80151C0 - sub_8015F84) */
.space 0x4