rename struct menudata.unk008 -> prevmenuroot

This commit is contained in:
Catherine Reprobate authored and Catherine Reprobate committed 2025-04-27 15:52:58 -07:00
1 parent 4b8e1d52b5
commit 872aa3a4a4
3 files changed
+17 -17

No files matched your search

+3 -3
View File
@@ -3608,7 +3608,7 @@ void func0f0f820c(struct menudialogdef *dialogdef, s32 root)
g_MpPlayerNum = prevplayernum; g_MpPlayerNum = prevplayernum;
g_MenuData.unk008 = root; g_MenuData.prevmenuroot = root;
g_MenuData.unk00c = dialogdef; g_MenuData.unk00c = dialogdef;
} }
@@ -3683,7 +3683,7 @@ void menuPushRootDialog(struct menudialogdef *dialogdef, s32 root)
g_Menus[g_MpPlayerNum].unk820 = 1; g_Menus[g_MpPlayerNum].unk820 = 1;
g_MenuData.root = root; g_MenuData.root = root;
g_MenuData.unk008 = -1; g_MenuData.prevmenuroot = -1;
g_MenuData.unk5d5_02 = false; g_MenuData.unk5d5_02 = false;
if (root == MENUROOT_MAINMENU if (root == MENUROOT_MAINMENU
@@ -4006,7 +4006,7 @@ void menuReset(void)
g_MenuData.unk668 = -1; g_MenuData.unk668 = -1;
g_MenuData.unk00c = 0; g_MenuData.unk00c = 0;
g_MenuData.unk008 = -1; g_MenuData.prevmenuroot = -1;
g_MenuData.count = 0; g_MenuData.count = 0;
g_MenuData.root = 0; g_MenuData.root = 0;
g_MenuData.unk010 = 0; g_MenuData.unk010 = 0;
+13 -13
View File
@@ -285,7 +285,7 @@ void menuTick(void)
var8006294c = 1; var8006294c = 1;
if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) { if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) {
if (g_MenuData.unk008 == -1) { if (g_MenuData.prevmenuroot == -1) {
g_MpSetup.chrslots &= 0xfff0; g_MpSetup.chrslots &= 0xfff0;
} }
@@ -295,7 +295,7 @@ void menuTick(void)
if (g_Menus[i].curdialog) { if (g_Menus[i].curdialog) {
g_Menus[i].playernum = g_MpNumJoined++; g_Menus[i].playernum = g_MpNumJoined++;
if (g_MenuData.unk008 == -1) { if (g_MenuData.prevmenuroot == -1) {
g_MpSetup.chrslots |= (1 << i); g_MpSetup.chrslots |= (1 << i);
} }
} }
@@ -493,23 +493,23 @@ void menuTick(void)
} }
} }
if ((g_MenuData.unk5d5_06 || g_MenuData.unk008 != -1) && sp344 == false) { if ((g_MenuData.unk5d5_06 || g_MenuData.prevmenuroot != -1) && sp344 == false) {
if ((g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) if ((g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU)
&& g_MenuData.unk008 == -1) { && g_MenuData.prevmenuroot == -1) {
if (g_Vars.mpsetupmenu == MPSETUPMENU_GENERAL) { if (g_Vars.mpsetupmenu == MPSETUPMENU_GENERAL) {
g_MenuData.unk008 = MENUROOT_MAINMENU; g_MenuData.prevmenuroot = MENUROOT_MAINMENU;
g_MenuData.unk00c = IS4MB() ? &g_CiMenuViaPauseMenuDialog : &g_CiMenuViaPcMenuDialog; g_MenuData.unk00c = IS4MB() ? &g_CiMenuViaPauseMenuDialog : &g_CiMenuViaPcMenuDialog;
} else if (IS4MB()) { } else if (IS4MB()) {
g_MenuData.unk008 = MENUROOT_4MBMAINMENU; g_MenuData.prevmenuroot = MENUROOT_4MBMAINMENU;
g_MenuData.unk00c = &g_MainMenu4MbMenuDialog; g_MenuData.unk00c = &g_MainMenu4MbMenuDialog;
} else { } else {
g_MenuData.unk008 = MENUROOT_MPSETUP; g_MenuData.prevmenuroot = MENUROOT_MPSETUP;
g_MenuData.unk00c = &g_CombatSimulatorMenuDialog; g_MenuData.unk00c = &g_CombatSimulatorMenuDialog;
} }
} }
if (g_MenuData.unk008 != -1) { if (g_MenuData.prevmenuroot != -1) {
if (g_MenuData.unk008 == -5) { if (g_MenuData.prevmenuroot == -5) {
// Match is beginning // Match is beginning
mpStartMatch(); mpStartMatch();
menuStop(); menuStop();
@@ -518,7 +518,7 @@ void menuTick(void)
bossfileSave(); bossfileSave();
g_Vars.modifiedfiles &= ~MODFILE_MPSETUP; g_Vars.modifiedfiles &= ~MODFILE_MPSETUP;
} }
} else if (g_MenuData.unk008 == -6) { } else if (g_MenuData.prevmenuroot == -6) {
// Match is ending // Match is ending
s32 playernum = 0; s32 playernum = 0;
@@ -561,7 +561,7 @@ void menuTick(void)
playernum++; playernum++;
} }
} }
} else if (g_MenuData.unk008 == -7) { } else if (g_MenuData.prevmenuroot == -7) {
menuStop(); menuStop();
g_FileState = FILESTATE_CHANGINGAGENT; g_FileState = FILESTATE_CHANGINGAGENT;
gamefileLoadDefaults(&g_GameFile); gamefileLoadDefaults(&g_GameFile);
@@ -570,7 +570,7 @@ void menuTick(void)
musicQueueStopAllEvent(); musicQueueStopAllEvent();
} else { } else {
bool startmusic = false; bool startmusic = false;
menuPushRootDialog(g_MenuData.unk00c, g_MenuData.unk008); menuPushRootDialog(g_MenuData.unk00c, g_MenuData.prevmenuroot);
sp344 = true; sp344 = true;
if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) { if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) {
@@ -598,7 +598,7 @@ void menuTick(void)
} }
g_MenuData.unk00c = NULL; g_MenuData.unk00c = NULL;
g_MenuData.unk008 = -1; g_MenuData.prevmenuroot = -1;
} else { } else {
switch (g_MenuData.root) { switch (g_MenuData.root) {
case MENUROOT_ENDSCREEN: case MENUROOT_ENDSCREEN:
+1 -1
View File
@@ -4785,7 +4785,7 @@ struct menudata_5d8 {
struct menudata { struct menudata {
/*0x000*/ s32 count; /*0x000*/ s32 count;
/*0x004*/ s32 root; /*0x004*/ s32 root;
/*0x008*/ s32 unk008; // also a menuroot constant /*0x008*/ s32 prevmenuroot; // also a menuroot constant
/*0x00c*/ struct menudialogdef *unk00c; /*0x00c*/ struct menudialogdef *unk00c;
/*0x010*/ f32 unk010; /*0x010*/ f32 unk010;
/*0x014*/ u8 bg; /*0x014*/ u8 bg;