diff --git a/decompile/General/MAIN/MainFrame_GameLogic.c b/decompile/General/MAIN/MainFrame_GameLogic.c index 9ee35a4e6..bfcf80ac7 100644 --- a/decompile/General/MAIN/MainFrame_GameLogic.c +++ b/decompile/General/MAIN/MainFrame_GameLogic.c @@ -527,7 +527,7 @@ void DECOMP_MainFrame_GameLogic(struct GameTracker* gGT, struct GamepadSystem* g // if SAVE if (sVar2 == 1) { - *(u_short*)&sdata->unk_saveGame_related = 0; + sdata->boolSaveCupProgress = 0; SelectProfile_ToggleMode(0x41); diff --git a/decompile/WorkInProgress/src/TakeCupProgress.c b/decompile/WorkInProgress/src/TakeCupProgress.c index e88882789..ee5b85f67 100644 --- a/decompile/WorkInProgress/src/TakeCupProgress.c +++ b/decompile/WorkInProgress/src/TakeCupProgress.c @@ -29,7 +29,7 @@ void DECOMP_TakeCupProgress_MenuProc(struct RectMenu* menu) // choose "yes" if (row == 0) { - sdata->unk_saveGame_related = 1; + sdata->boolSaveCupProgress = 1; // Set Load/Save to "Slot Selected" mode SelectProfile_ToggleMode(0x41); diff --git a/ghidra/MAIN.c b/ghidra/MAIN.c index 987513eff..479ccb6ba 100644 --- a/ghidra/MAIN.c +++ b/ghidra/MAIN.c @@ -936,7 +936,9 @@ void FUN_80034d54(uint *param_1,int param_2) if (sVar2 == 0) { return; } - if (sVar2 == 1) { + if (sVar2 == 1) + { + // boolSaveCupProgress DAT_8008d918 = 0; // Set Load/Save to "Slot selected" mode diff --git a/ghidra/SelectProfile.c b/ghidra/SelectProfile.c index 2a3421b86..8534bd288 100644 --- a/ghidra/SelectProfile.c +++ b/ghidra/SelectProfile.c @@ -1233,6 +1233,7 @@ void FUN_800490c4(int param_1) // OtherFX_Play FUN_80028468(1,1); + // boolSaveCupProgress if (DAT_8008d918 == 0) { // MainGameEnd_SoloRaceSaveHighScore @@ -1297,6 +1298,7 @@ void FUN_800490c4(int param_1) ) ) { + // boolSaveCupProgress if (DAT_8008d918 == 0) { // MainGameEnd_SoloRaceSaveHighScore @@ -2375,6 +2377,8 @@ void FUN_800490c4(int param_1) // SelectProfile_Destroy FUN_800488e0(); + + // boolSaveCupProgress if (DAT_8008d918 == 0) { *(uint *)(PTR_DAT_8008d2ac + 0x1d44) = *(uint *)(PTR_DAT_8008d2ac + 0x1d44) & 0xf6ffffff ; diff --git a/ghidra/TakeCupProgress.c b/ghidra/TakeCupProgress.c index 3cb308bf9..fd17d9215 100644 --- a/ghidra/TakeCupProgress.c +++ b/ghidra/TakeCupProgress.c @@ -37,9 +37,15 @@ void FUN_8004b258(int param_1) 0xffff8000); } } - else { + else + { + // rowSelected sVar1 = *(short *)(param_1 + 0x1a); - if (sVar1 == 0) { + + // pick YES + if (sVar1 == 0) + { + // boolSaveCupProgress DAT_8008d918 = 1; // Set Load/Save to "Slot Selected" mode @@ -48,7 +54,9 @@ void FUN_8004b258(int param_1) // Change active Menu to Warning DAT_8008d924 = &DAT_80085be0; } - else { + + else + { if (sVar1 < 1) { if (sVar1 != -1) { return; @@ -59,6 +67,8 @@ void FUN_8004b258(int param_1) return; } } + + // pick NO // Make the menu disappear FUN_800469c8(); diff --git a/include/regionsEXE.h b/include/regionsEXE.h index e859d319f..536546501 100644 --- a/include/regionsEXE.h +++ b/include/regionsEXE.h @@ -4128,7 +4128,7 @@ struct sData // 8008c870 -- JpnTrial // 8008dccc -- EurRetail // 80090d44 -- JpnRetail - int unk_saveGame_related; + int boolSaveCupProgress; // 8008d91c int advCharSelectIndex_prev; diff --git a/mods/Tests/PointersCommonH/src/main.c b/mods/Tests/PointersCommonH/src/main.c index ed07edb81..caf3e7e6e 100644 --- a/mods/Tests/PointersCommonH/src/main.c +++ b/mods/Tests/PointersCommonH/src/main.c @@ -57,7 +57,7 @@ struct x y[] = TEST16(&sdata_static.lngStrings), TEST16(&sdata_static.ptrLoadSaveObj), TEST16(&sdata_static.ptrActiveMenu), - TEST16(&sdata_static.unk_saveGame_related), + TEST16(&sdata_static.boolSaveCupProgress), TEST16(&sdata_static.trackSelBackup), TEST16(&sdata_static.AnyPlayerTap), TEST16(&sdata_static.AnyPlayerHold),