Skip to content

Commit

Permalink
properfix (#70)
Browse files Browse the repository at this point in the history
correctly implements startingNotebook and spoiler data fixes for Tingle's Ranch Map in Snowhead
  • Loading branch information
Tacoman369 authored May 28, 2024
1 parent ab8bd0b commit 7e54a9d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions code/include/rnd/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ namespace rnd {

u8 startingConsumables;
u8 startingMaxRupees;
u8 startingNotebook;
u8 startingOcarina;
u8 startingHerosBow;
u8 startingFireArrows;
Expand Down
5 changes: 5 additions & 0 deletions code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,11 @@ namespace rnd {
if (gSettingsContext.startingSpinSettting == (u8)StartingSpinSetting::STARTINGSPIN_GREAT) {
saveData.has_great_spin_0x02 = 2;
}

//Starting Notebook
if(gSettingsContext.startingNotebook > 0) {
saveData.inventory.collect_register.bombers_notebook = 1;
}
}

void SaveFile_ResetItemSlotsIfMatchesID(u8 itemSlot) {
Expand Down
14 changes: 11 additions & 3 deletions code/source/rnd/spoiler_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,22 @@ namespace rnd {
if ((scene == 0x5E) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x22, flag);
}
// Ranch Tingle Ranch Map > Snowhead Tingle Snowhead Map (Winter)
if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
// Snowhead Tingle Ranch Map (Winter) > Snowhead Tingle Ranch Map (Spring)
if ((scene == 0x5D) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x5E, flag);
}
// Ranch Tingle Ranch Map > Snowhead Tingle Snowhead Map (Spring)
// Snowhead Tingle Ranch Map (Spring) > Snowhead Tingle Ranch Map (Winter)
if ((scene == 0x5E) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x5D, flag);
}
// Ranch Tingle Ranch Map > Snowhead Tingle Ranch Map (Winter)
if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x5D, flag);
}
// Ranch Tingle Ranch Map > Snowhead Tingle Ranch Map (Spring)
if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x5E, flag);
}
// Ranch Tingle Great Bay Map > Great Bay Tingle Great Bay Map
if ((scene == 0x22) && (flag == 0xB8) && (type == ItemOverride_Type::OVR_BASE_ITEM)) {
SpoilerData_UpdateMultiLocations(type, 0x37, flag);
Expand Down

0 comments on commit 7e54a9d

Please sign in to comment.