Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StartingNotebook #68

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions code/include/rnd/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ namespace rnd {
LOGIC_GLITCHED,
};

enum class KnowSetting : u8 {
KNOW_BASIC,
KNOW_ADVANCED,
// KNOW_COMPLETE,
};

enum class AmmoDropsSetting : u8 {
AMMODROPS_VANILLA,
AMMODROPS_BOMBCHU,
Expand Down Expand Up @@ -251,20 +245,13 @@ namespace rnd {
PLAY_ON_CITRA,
} PlayOption;

typedef enum {
REGION_NA,
REGION_EUR,
} Region;

typedef struct {
u8 hashIndexes[5];

u8 playOption;
u8 region;

u8 logic;
u8 locationsReachable;
u8 knowTheGame;

u8 shuffleDungeonEntrances;
u8 bombchusInLogic;
Expand Down Expand Up @@ -326,6 +313,7 @@ namespace rnd {

u8 startingConsumables;
u8 startingMaxRupees;
u8 startingNotebook;
u8 startingOcarina;
u8 startingHerosBow;
u8 startingFireArrows;
Expand Down Expand Up @@ -416,7 +404,6 @@ namespace rnd {
u8 enableFastOcarina;
u8 enableFastArrowSwap;
u8 twinmoldRestoration;
u8 enableNoAnimationTransform;
PhlexPlexico marked this conversation as resolved.
Show resolved Hide resolved

// Cutscene Skips
u8 skipHMSCutscenes;
Expand Down
17 changes: 11 additions & 6 deletions code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace rnd {
gSettingsContext.skipBombersMinigame = 1;
gSettingsContext.freeScarecrow = 1;
saveData.activate_dungeon_skip_portal_0xF0_for_all = 0xF0;
// SaveFile_FillOverWorldMapData();
SaveFile_FillOverWorldMapData();
saveData.inventory.collect_register.oath_to_order = 1;

// Boss Remains
Expand Down Expand Up @@ -366,7 +366,7 @@ namespace rnd {
// game::SaveData& saveBackupData = game::GetCommonData().save_backup;
game::SaveData& saveData = game::GetCommonData().save;
// give maps and compasses
if (gSettingsContext.mapsAndCompasses == (u8)MapsAndCompassesSetting::MAPSANDCOMPASSES_START_WITH) {
if (gSettingsContext.mapsAndCompasses == (u8)MapsAndCompassesSetting::MAPSANDCOMPASSES_ANY_DUNGEON) {
saveData.inventory.woodfall_dungeon_items.map = 1;
saveData.inventory.woodfall_dungeon_items.compass = 1;
saveData.inventory.snowhead_dungeon_items.map = 1;
Expand All @@ -376,6 +376,9 @@ namespace rnd {
saveData.inventory.stone_tower_dungeon_items.map = 1;
saveData.inventory.stone_tower_dungeon_items.compass = 1;
}
if (gSettingsContext.mapsAndCompasses == (u8)MapsAndCompassesSetting::MAPSANDCOMPASSES_OVERWORLD) {
SaveFile_FillOverWorldMapData();
}

// give small keys
if (gSettingsContext.keysanity == (u8)KeysanitySetting::KEYSANITY_START_WITH) {
Expand Down Expand Up @@ -465,7 +468,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::Quiver50;
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 Expand Up @@ -533,15 +536,12 @@ namespace rnd {
equipmentData.sword_shield.sword = game::SwordType::NoSword;
saveData.equipment.data[0].item_btn_b = game::ItemId::None;
} else if (gSettingsContext.startingKokiriSword == (u8)StartingSwordSetting::STARTINGSWORD_KOKIRI) {
gExtSaveData.givenItemChecks.progressiveSwordUpgrade = 1;
PhlexPlexico marked this conversation as resolved.
Show resolved Hide resolved
equipmentData.sword_shield.sword = game::SwordType::KokiriSword;
saveData.equipment.data[0].item_btn_b = game::ItemId::KokiriSword;
} else if (gSettingsContext.startingKokiriSword == (u8)StartingSwordSetting::STARTINGSWORD_RAZOR) {
gExtSaveData.givenItemChecks.progressiveSwordUpgrade = 2;
PhlexPlexico marked this conversation as resolved.
Show resolved Hide resolved
equipmentData.sword_shield.sword = game::SwordType::RazorSword;
saveData.equipment.data[0].item_btn_b = game::ItemId::RazorSword;
} else if (gSettingsContext.startingKokiriSword == (u8)StartingSwordSetting::STARTINGSWORD_GILDED) {
gExtSaveData.givenItemChecks.progressiveSwordUpgrade = 3;
PhlexPlexico marked this conversation as resolved.
Show resolved Hide resolved
equipmentData.sword_shield.sword = game::SwordType::GildedSword;
saveData.equipment.data[0].item_btn_b = game::ItemId::GildedSword;
}
Expand Down Expand Up @@ -776,6 +776,11 @@ namespace rnd {
if (gSettingsContext.startingSpinSettting == (u8)StartingSpinSetting::STARTINGSPIN_GREAT) {
saveData.has_great_spin_0x02 = 2;
}

//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
Loading