Skip to content

Commit

Permalink
Less Restrictive Ice Arrow Locations (#62)
Browse files Browse the repository at this point in the history
* Allow ice arrows in more locations.

Update debug save to include quiver.

* Allow ice arrows in more locations.

Update debug save to include quiver.

Clang formats.
  • Loading branch information
PhlexPlexico authored Aug 27, 2023
1 parent 71bbae6 commit 3edbbbc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
16 changes: 10 additions & 6 deletions code/mm.ld
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ SECTIONS{
*(.patch_AttemptKeepChestsClosed)
} */

.patch_DoNotRemoveKeys 0x1c9b94 : {
.patch_DoNotRemoveKeys 0x1C9B94 : {
*(.patch_DoNotRemoveKeys)
}

.patch_RemoveDekuMaskCheckSoT 0x1D8008 : {
*(.patch_RemoveDekuMaskCheckSoT)
}

.patch_RemoveMysteryMilkUsabilityCheck 0x1e04d8 : {
.patch_RemoveMysteryMilkUsabilityCheck 0x1E04D8 : {
*(.patch_RemoveMysteryMilkUsabilityCheck)
}

Expand Down Expand Up @@ -199,19 +199,23 @@ SECTIONS{
*(.patch_RemoveGoronMaskCheckDarmani)
}

.patch_OverrideFairyGiveItem 0x3becac : {
.patch_OverrideFairyGiveItem 0x3BECAC : {
*(.patch_OverrideFairyGiveItem)
}

.patch_OverrideGreatFairySpawn 0x3bec84 : {
.patch_OverrideGreatFairySpawn 0x3BEC84 : {
*(.patch_OverrideGreatFairySpawn)
}

.patch_SaveExtDataOnOwl 0x317004 : {
*(.patch_SaveExtDataOnOwl)
}

.patch_RemoveZoraMaskCheckMikau 0x32bbb8 : {
.patch_IceArrowsAnywhere 0x31874C : {
*(.patch_IceArrowsAnywhere)
}

.patch_RemoveZoraMaskCheckMikau 0x32BBB8 : {
*(.patch_RemoveZoraMaskCheckMikau)
}

Expand Down Expand Up @@ -243,7 +247,7 @@ SECTIONS{
*(.patch_GibdoMaskGiveItem)
}
/*0x46E228*/
.patch_RemoveCouplesMaskMessage 0x1867c4 : {
.patch_RemoveCouplesMaskMessage 0x1867C4 : {
*(.patch_RemoveCouplesMaskMessage)
}

Expand Down
6 changes: 6 additions & 0 deletions code/source/asm/patches.s
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ patch_FasterBlockMovementBack:
patch_SaveExtDataOnOwl:
b hook_OwlExtDataSave

@ nop a bne statement to allow ice arrows to be used on any water surface.
.section .patch_IceArrowsAnywhere
.global patch_IceArrowsAnywhere
patch_IceArrowsAnywhere:
nop

.section .patch_RemoveZoraMaskCheckMikau
.global patch_RemoveZoraMaskCheckMikau
patch_RemoveZoraMaskCheckMikau:
Expand Down
10 changes: 5 additions & 5 deletions code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ namespace rnd {
saveData.inventory.inventory_count_register.stick_upgrades = 2;
saveData.inventory.inventory_count_register.nut_upgrade = 2;
saveData.player.rupee_count = 500;
// saveData.inventory.items[1] = game::ItemId::Arrow;
// saveData.inventory.items[2] = game::ItemId::FireArrow;
// saveData.inventory.items[3] = game::ItemId::IceArrow;
// saveData.inventory.items[4] = game::ItemId::LightArrow;
saveData.inventory.items[1] = game::ItemId::Arrow;
saveData.inventory.items[2] = game::ItemId::FireArrow;
saveData.inventory.items[3] = game::ItemId::IceArrow;
saveData.inventory.items[4] = game::ItemId::LightArrow;
saveData.inventory.items[6] = game::ItemId::Bomb;
saveData.inventory.items[7] = game::ItemId::Bombchu;
saveData.inventory.items[8] = game::ItemId::DekuStick;
Expand Down Expand Up @@ -437,7 +437,7 @@ namespace rnd {
} else {
saveData.inventory.inventory_count_register.quiver_upgrade = game::Quiver::NoQuiver;
#ifdef ENABLE_DEBUG
saveData.inventory.inventory_count_register.quiver_upgrade = game::Quiver::NoQuiver;
saveData.inventory.inventory_count_register.quiver_upgrade = game::Quiver::Quiver50;
// rnd::util::GetPointer<void(game::ItemId, int)>(0x21d440)(game::ItemId::Arrow, 0x1e);
#endif
}
Expand Down

0 comments on commit 3edbbbc

Please sign in to comment.