ref: 04e4112988041baa6774d320126164d060a51f47
parent: a5bb9ebe6e34dfd4a6b69d999bb43eb4c74f275f
author: Snesrev <snesrev@protonmail.com>
date: Fri Sep 23 12:03:36 EDT 2022
Add 'MoreActiveBombs' to extend bomb count from 2 to 4
--- a/config.c
+++ b/config.c
@@ -297,6 +297,9 @@
} else if (StringEqualsNoCase(key, "ShowMaxItemsInYellow")) {
g_config.show_max_items_in_yellow = (bool)strtol(value, (char **)NULL, 10);
return true;
+ } else if (StringEqualsNoCase(key, "MoreActiveBombs")) {
+ g_config.more_active_bombs = (bool)strtol(value, (char **)NULL, 10);
+ return true;
}
--- a/config.h
+++ b/config.h
@@ -55,6 +55,7 @@
bool disable_low_health_beep;
bool skip_intro_on_keypress;
bool show_max_items_in_yellow;
+ bool more_active_bombs;
} Config;
extern Config g_config;
--- a/main.c
+++ b/main.c
@@ -195,6 +195,7 @@
f |= g_config.disable_low_health_beep * kFeatures0_DisableLowHealthBeep;
f |= g_config.skip_intro_on_keypress * kFeatures0_SkipIntroOnKeypress;
f |= g_config.show_max_items_in_yellow * kFeatures0_ShowMaxItemsInYellow;
+ f |= g_config.more_active_bombs * kFeatures0_MoreActiveBombs;
g_wanted_zelda_features = f;
}
--- a/player.c
+++ b/player.c
@@ -2392,7 +2392,7 @@
if (is_standing_in_doorway || savegame_tagalong == 13 || !CheckYButtonPress())
return;
button_mask_b_y &= ~0x40;
- AncillaAdd_Bomb(7, 1);
+ AncillaAdd_Bomb(7, enhanced_features0 & kFeatures0_MoreActiveBombs ? 3 : 1);
link_item_in_hand = 0;
}
--- a/zelda3.ini
+++ b/zelda3.ini
@@ -63,6 +63,9 @@
# Display max rupees/bombs/arrows with orange/yellow color
ShowMaxItemsInYellow = 0
+# Allows up to four bombs active at a time instead of two.
+MoreActiveBombs = 0
+
[KeyMap]
# Change what keyboard keys map to the joypad
--- a/zelda_rtl.h
+++ b/zelda_rtl.h
@@ -123,6 +123,7 @@
kFeatures0_DisableLowHealthBeep = 64,
kFeatures0_SkipIntroOnKeypress = 128,
kFeatures0_ShowMaxItemsInYellow = 256,
+ kFeatures0_MoreActiveBombs = 512,
};
#define enhanced_features0 (*(uint32*)(g_ram+0x64c))