mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
WAAAOOOW when deleting save file
This commit is contained in:
parent
7a9d32551c
commit
a6d56efa33
2 changed files with 9 additions and 9 deletions
|
@ -427,26 +427,24 @@ void save_file_erase(s32 fileIndex) {
|
|||
save_file_do_save(fileIndex, TRUE);
|
||||
}
|
||||
|
||||
void save_file_reload(u8 load_all) {
|
||||
void save_file_reload(u8 loadAll) {
|
||||
gSaveFileModified = TRUE;
|
||||
update_all_mario_stars();
|
||||
|
||||
if (load_all == TRUE) {
|
||||
if (loadAll) {
|
||||
save_file_load_all(TRUE);
|
||||
save_file_do_save(gCurrSaveFileNum-1, TRUE);
|
||||
save_file_do_save(gCurrSaveFileNum - 1, TRUE);
|
||||
update_all_mario_stars();
|
||||
}
|
||||
}
|
||||
|
||||
void save_file_erase_current_backup_save(void) {
|
||||
if (INVALID_FILE_INDEX(gCurrSaveFileNum-1)) { return; }
|
||||
if (network_is_server()) {
|
||||
bzero(&gSaveBuffer.files[gCurrSaveFileNum-1][1], sizeof(gSaveBuffer.files[gCurrSaveFileNum-1][1]));
|
||||
if (gNetworkType != NT_SERVER) { return; }
|
||||
|
||||
save_file_reload(FALSE);
|
||||
|
||||
save_file_do_save(gCurrSaveFileNum-1, TRUE);
|
||||
}
|
||||
bzero(&gSaveBuffer.files[gCurrSaveFileNum - 1][1], sizeof(gSaveBuffer.files[gCurrSaveFileNum - 1][1]));
|
||||
save_file_reload(FALSE);
|
||||
save_file_do_save(gCurrSaveFileNum - 1, TRUE);
|
||||
}
|
||||
|
||||
//! Needs to be s32 to match on -O2, despite no return value.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "djui_panel.h"
|
||||
#include "djui_panel_menu.h"
|
||||
#include "djui_panel_confirm.h"
|
||||
#include "game/level_update.h"
|
||||
#include "game/save_file.h"
|
||||
#include "pc/configfile.h"
|
||||
|
||||
|
@ -76,6 +77,7 @@ static void djui_panel_host_save_button_click(struct DjuiBase* caller) {
|
|||
|
||||
static void djui_panel_host_save_erase_yes(struct DjuiBase* caller) {
|
||||
save_file_erase(sButtonTag);
|
||||
play_character_sound(gMarioState, CHAR_SOUND_WAAAOOOW);
|
||||
djui_panel_host_save_update_button(sSaveButtons[sButtonTag], sButtonTag);
|
||||
djui_panel_menu_back(caller);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue