Decompile pakMenuTextEditingPakName

This commit is contained in:
Ryan Dwyer 2020-11-03 17:48:35 +10:00
parent 16e3938c97
commit e7a7eeebdb
5 changed files with 16 additions and 29 deletions

View File

@ -3878,12 +3878,12 @@ s32 pakGameNotesMenuDialog(u32 operation, struct menudialog *dialog, union handl
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curframe
&& g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
s32 value = func0f1168c4(g_Menus[g_MpPlayerNum].data.pak.unke20, &g_EditingPak);
s32 value = func0f1168c4(g_Menus[g_MpPlayerNum].data.pak.device, &g_EditingPak);
if (value) {
menuCloseDialog();
g_EditingPak = NULL;
g_Menus[g_MpPlayerNum].unke3c = g_Menus[g_MpPlayerNum].data.pak.unke20;
g_Menus[g_MpPlayerNum].unke3c = g_Menus[g_MpPlayerNum].data.pak.device;
if (value == 1) {
func0f10865c(6);
@ -3951,29 +3951,10 @@ char *pakMenuTextStatusMessage(struct menuitem *item)
return langGet(L_OPTIONS(399)); // "There is enough space for Perfect Dark note."
}
GLOBAL_ASM(
glabel func0f10b924
/* f10b924: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum)
/* f10b928: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6)
/* f10b92c: 27bdffe8 */ addiu $sp,$sp,-24
/* f10b930: afa40018 */ sw $a0,0x18($sp)
/* f10b934: 000e78c0 */ sll $t7,$t6,0x3
/* f10b938: 01ee7823 */ subu $t7,$t7,$t6
/* f10b93c: 000f7880 */ sll $t7,$t7,0x2
/* f10b940: 01ee7821 */ addu $t7,$t7,$t6
/* f10b944: 000f78c0 */ sll $t7,$t7,0x3
/* f10b948: 01ee7823 */ subu $t7,$t7,$t6
/* f10b94c: 000f7900 */ sll $t7,$t7,0x4
/* f10b950: 3c04800a */ lui $a0,%hi(g_Menus+0xe20)
/* f10b954: afbf0014 */ sw $ra,0x14($sp)
/* f10b958: 008f2021 */ addu $a0,$a0,$t7
/* f10b95c: 0fc41fec */ jal getSaveLocationName
/* f10b960: 8c84ee20 */ lw $a0,%lo(g_Menus+0xe20)($a0)
/* f10b964: 8fbf0014 */ lw $ra,0x14($sp)
/* f10b968: 27bd0018 */ addiu $sp,$sp,0x18
/* f10b96c: 03e00008 */ jr $ra
/* f10b970: 00000000 */ nop
);
char *pakMenuTextEditingPakName(struct menuitem *item)
{
return getSaveLocationName(g_Menus[g_MpPlayerNum].data.pak.device);
}
s32 menuhandlerPakSelection(u32 operation, struct menuitem *item, union handlerdata *data)
{
@ -5237,7 +5218,7 @@ struct menudialog menudialog_deletegamenote = {
// 1aad8
struct menuitem menuitems_gamenotes[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00000010, L_OPTIONS(388), (u32)&func0f10b924, NULL }, // "Delete Game Notes:"
{ MENUITEMTYPE_LABEL, 0, 0x00000010, L_OPTIONS(388), (u32)&pakMenuTextEditingPakName, NULL }, // "Delete Game Notes:"
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x0000010e, 0x00000000, NULL },
{ MENUITEMTYPE_LABEL, 0, 0x00000010, L_OPTIONS(389), L_OPTIONS(390), NULL }, // "Note", "Pages"
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000c8, 0x0000006e, menucustomDeleteGameNote },

View File

@ -2489,6 +2489,12 @@
#define ROOMFLAG_PLAYAMBIENTTRACK 0x4000
#define ROOMFLAG_OUTDOORS 0x8000
#define SAVEDEVICE_CONTROLLERPAK1 0
#define SAVEDEVICE_CONTROLLERPAK2 1
#define SAVEDEVICE_CONTROLLERPAK3 2
#define SAVEDEVICE_CONTROLLERPAK4 3
#define SAVEDEVICE_GAMEPAK 4
#define SAVEFILEFLAG_P1_FORWARDPITCH 0x00
#define SAVEFILEFLAG_P1_AUTOAIM 0x01
#define SAVEFILEFLAG_P1_AIMCONTROL 0x02

View File

@ -44,7 +44,7 @@ void func0f10b0c4(s32 arg0);
char *pakMenuTextPagesFree(struct menuitem *item);
char *pakMenuTextPagesUsed(struct menuitem *item);
char *pakMenuTextStatusMessage(struct menuitem *item);
u32 func0f10b924(void);
char *pakMenuTextEditingPakName(struct menuitem *item);
u32 func0f10c900(void);
void func0f10c970(void);
s32 menucustomChooseAgent(u32 operation, struct menuitem *item, union handlerdata *data);

View File

@ -15,7 +15,7 @@ u32 func0f116800(void);
u32 func0f116828(void);
u32 func0f116860(void);
u32 func0f116888(void);
s32 func0f1168c4(s8 arg0, struct pakdata **arg1);
s32 func0f1168c4(s8 device, struct pakdata **arg1);
u32 func0f116914(void);
u32 func0f11693c(void);
void func0f116994(void);

View File

@ -3873,7 +3873,7 @@ struct menudata_filesel {
struct menudata_pak {
u32 unke1c;
u32 unke20;
u32 device;
u32 unke24;
u32 unke28;
};