ref: 96fd9d9faee95acbec5f2f00fa7191faf99697ba
parent: 1fab347cb3217d0227095bf26b24b67d9c76fe6d
author: Snesrev <snesrev@protonmail.com>
date: Thu Sep 29 20:59:42 EDT 2022
Save&Quit doesn't count as a death (#126)
--- a/messaging.c
+++ b/messaging.c
@@ -884,10 +884,11 @@
if (!((filtered_joypad_L & 0xc0 | filtered_joypad_H) & 0xd0))
return;
sound_effect_1 = 44;
- Death_Func15();
+ // Only death with save/continue or save/quit counts as a death
+ Death_Func15(subsubmodule_index != 2);
}
-void Death_Func15() { // 89f50f
+void Death_Func15(bool count_as_death) { // 89f50f
music_control = 0xf1;
if (player_is_indoors)
Dungeon_FlagRoomData_Quadrants();
@@ -909,7 +910,7 @@
if (i != 0xff)
link_keys_earned_per_dungeon[(i == 2 ? 0 : i) >> 1] = link_num_keys;
Sprite_ResetAll();
- if (death_var2 == 0xffff)
+ if (death_var2 == 0xffff && (!(enhanced_features0 & kFeatures0_MiscBugFixes) || count_as_death))
death_save_counter++;
death_var5++;
if (subsubmodule_index != 1) {
--- a/messaging.h
+++ b/messaging.h
@@ -36,7 +36,7 @@
void Animate_GAMEOVER_Letters_bounce();
void GameOver_Finalize_GAMEOVR();
void GameOver_SaveAndOrContinue();
-void Death_Func15();
+void Death_Func15(bool count_as_death);
void GameOver_AnimateChoiceFairy();
void GameOver_InitializeRevivalFairy();
void RevivalFairy_Main_bounce();
--- a/misc.c
+++ b/misc.c
@@ -874,7 +874,7 @@
if (!--INIDISP_copy) {
MOSAIC_copy = 15;
subsubmodule_index = 1;
- Death_Func15();
+ Death_Func15(false);
}
break;
}