Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Jul 26, 2024
1 parent d818152 commit 21755d3
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion decompile/General/MAIN/MainFrame_GameLogic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion decompile/WorkInProgress/src/TakeCupProgress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion ghidra/MAIN.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ghidra/SelectProfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,7 @@ void FUN_800490c4(int param_1)
// OtherFX_Play
FUN_80028468(1,1);

// boolSaveCupProgress
if (DAT_8008d918 == 0)
{
// MainGameEnd_SoloRaceSaveHighScore
Expand Down Expand Up @@ -1297,6 +1298,7 @@ void FUN_800490c4(int param_1)
)
)
{
// boolSaveCupProgress
if (DAT_8008d918 == 0)
{
// MainGameEnd_SoloRaceSaveHighScore
Expand Down Expand Up @@ -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
;
Expand Down
16 changes: 13 additions & 3 deletions ghidra/TakeCupProgress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -59,6 +67,8 @@ void FUN_8004b258(int param_1)
return;
}
}

// pick NO

// Make the menu disappear
FUN_800469c8();
Expand Down
2 changes: 1 addition & 1 deletion include/regionsEXE.h
Original file line number Diff line number Diff line change
Expand Up @@ -4128,7 +4128,7 @@ struct sData
// 8008c870 -- JpnTrial
// 8008dccc -- EurRetail
// 80090d44 -- JpnRetail
int unk_saveGame_related;
int boolSaveCupProgress;

// 8008d91c
int advCharSelectIndex_prev;
Expand Down
2 changes: 1 addition & 1 deletion mods/Tests/PointersCommonH/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 21755d3

Please sign in to comment.