Rename many filemgr symbols and improve menu data structure

This commit is contained in:
Ryan Dwyer
2021-09-16 23:26:54 +10:00
parent cf418683a2
commit 6ef216fa18
15 changed files with 481 additions and 453 deletions
+6 -6
View File
@@ -8,9 +8,9 @@ char *filemgrGetDeviceName(s32 index);
char *filemgrMenuTextDeviceName(struct menuitem *item);
void filemgrGetSelectName(char *buffer, struct filelistfile *file, u32 filetype);
char *filemgrMenuTextDeleteFileName(struct menuitem *item);
void func0f108324(s32 deviceserial);
void func0f1083b0(struct filelistfile *file);
void func0f1083d0(struct filelistfile *file, s32 filetype);
void filemgrSetDevice1BySerial(s32 deviceserial);
void filemgrSetDevice1ByFile(struct filelistfile *file);
void filemgrSetFileToDelete(struct filelistfile *file, s32 filetype);
char *filemgrMenuTextFailReason(struct menuitem *item);
char *filemgrMenuTextDeviceNameForError(struct menuitem *item);
void filemgrPushErrorDialog(u16 errno);
@@ -23,15 +23,15 @@ void filemgrEraseCorruptFile(void);
char *filemgrMenuTextInsertOriginalPak(struct menuitem *item);
void filemgrRetrySave(s32 arg0);
bool filemgrAttemptOperation(s32 device, bool closeonsuccess);
bool func0f1094e4(struct fileguid *guid, s32 fileop, void *arg2);
bool filemgrSaveOrLoad(struct fileguid *guid, s32 fileop, u32 playernum);
void filemgrDeleteCurrentFile(void);
void func0f1097d0(s32 device);
void func0f109954(s32 arg0);
void filemgrSaveGameToDevice(s32 device);
void filemgrGetFileName(char *dst, struct filelistfile *file);
void filemgrGetRenameName(char *buffer);
void filemgrSetRenameName(char *name);
bool filemgrIsNameAvailable(s32 arg0);
void func0f109ec4(void);
void filemgrSaveToDevice(void);
char *filemgrMenuTextDeviceNameContainingDuplicateFile(struct menuitem *item);
char *filemgrMenuTextDuplicateFileName(struct menuitem *item);
char *filemgrMenuTextLocationName2(struct menuitem *item);
+2 -2
View File
@@ -11,8 +11,8 @@ void bossfileSave(void);
void bossfileSetDefaults(void);
void func0f110bf0(void);
void func0f110bf8(void);
void func0f110c5c(s32 listnum, u8 filetype);
s32 func0f110cf8(u8 filetype);
void filelistCreate(s32 listnum, u8 filetype);
s32 filelistFindOrCreate(u8 filetype);
void func0f110d90(s32 index);
void filelistsTick(void);
void filelistUpdate(struct filelist *list);
+35 -47
View File
@@ -3839,27 +3839,44 @@ struct menudata_mpend {
u32 unke1c;
};
// Not sure if filemgr and pak are the same struct
struct menudata_filemgr {
u32 filetypeplusone;
u32 device;
u32 unke24;
u32 isdeletingforsave;
u32 unke2c;
};
struct menudata_pak {
u32 unke1c;
u32 device;
u32 unke24;
u32 noteindex;
/*0xe1c*/ u32 filetypeplusone;
/*0xe20*/ u32 device;
/*0xe24*/ u32 unke24;
union {
u32 isdeletingforsave;
u32 noteindex;
};
/*0xe2c*/ u32 unke2c;
/*0xe30*/ u32 unke30;
/*0xe34*/ u16 errno;
/*0xe38*/ struct filelistfile *filetodelete;
/*0xe3c*/ u8 device1;
/*0xe3d*/ u8 filetypetodelete;
/*0xe3e*/ u8 unke3e;
/*0xe3f*/ u8 listnum;
/*0xe40*/ u16 unke40_00 : 1;
/*0xe40*/ u16 unke40_01 : 1;
/*0xe40*/ u16 unke40_02 : 14;
/*0xe42*/ u8 fileop;
union {
void *unke44;
s32 mpplayernum;
};
/*0xe48*/ u32 filenum;
/*0xe4c*/ u32 deviceserial;
/*0xe50*/ u16 isretryingsave;
/*0xe52*/ u8 device2;
/*0xe53*/ char filename[20];
/*0xe68*/ struct perfectheadtexturelist *headtextures;
/*0xe6c*/ s8 device3;
};
struct menudata_main4mb {
u32 slotindex;
};
struct menudata_train {
struct menudata_training {
u32 unke1c;
struct mpconfigfull *mpconfig;
u32 unke24;
@@ -4491,36 +4508,10 @@ struct menu {
struct menudata_mpsetup mpsetup;
struct menudata_mppause mppause;
struct menudata_mpend mpend;
struct menudata_filemgr filemgr;
struct menudata_pak pak;
struct menudata_filemgr fm;
struct menudata_main4mb main4mb;
struct menudata_train train;
} data;
/*0xe30*/ u32 unke30;
/*0xe34*/ u16 errno;
/*0xe38*/ struct filelistfile *unke38;
/*0xe3c*/ u8 unke3c;
/*0xe3d*/ u8 unke3d;
/*0xe3e*/ u8 unke3e;
/*0xe3f*/ u8 listnum;
/*0xe40*/ u16 unke40_00 : 1;
/*0xe40*/ u16 unke40_01 : 1;
/*0xe40*/ u16 unke40_02 : 14;
/*0xe42*/ u8 fileop;
/*0xe44*/ void *unke44;
/*0xe48*/ u32 filenum;
/*0xe4c*/ u32 deviceserial;
/*0xe50*/ u16 isretryingsave;
/*0xe52*/ u8 device;
/*0xe53*/ char unke53[1];
/*0xe54*/ u32 unke54;
/*0xe58*/ u32 unke58;
/*0xe5c*/ u32 unke5c;
/*0xe60*/ u32 unke60;
/*0xe64*/ u32 unke64;
/*0xe68*/ struct perfectheadtexturelist *headtextures;
/*0xe6c*/ s8 savedevice; // 0-3 = controller pak 1-4, 4 = game pak
struct menudata_training training;
};
};
struct gamefile {
@@ -4689,10 +4680,7 @@ struct mparena {
struct filelistfile {
s32 filenum;
u16 deviceserial;
char unk06[6]; // length unknown
u32 unk0c;
u32 unk10;
u32 unk14;
char name[16];
};
// This stores information about all files of a particular filetype across all