diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp index 52721ad4d..c244dcb89 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp @@ -31,7 +31,7 @@ void AreaTable_Init_GanonsCastle() { Entrance(RR_GANONS_CASTLE_MAIN, {[]{return true;}}), }); - areaTable[RR_GANONS_CASTLE_MAIN] = Area("Ganon's Castle Main", "Ganon's Castle", GANONS_CASTLE, NO_DAY_NIGHT_CYCLE, {}, {}, { + areaTable[RR_GANONS_CASTLE_MAIN] = Area("Ganon's Castle Main", "Ganon's Castle", RA_GANONS_CASTLE, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_GANONS_CASTLE_LOBBY, {[]{return true;}}), Entrance(RR_GANONS_CASTLE_FOREST_TRIAL, {[]{return true;}}), @@ -136,10 +136,10 @@ void AreaTable_Init_GanonsCastle() { }, { //Exits Entrance(RR_GANONS_CASTLE_ENTRYWAY, {[]{return true;}}), - Entrance(RR_GANONS_CASTLE_MQ_MAIN, {[]{return (CanUse(RG_MASTER_SWORD) || CanUse(BIGGORON_SWORD) || CanUse(MEGATON_HAMMER)) || ((HasExplosives || Nuts || CanUse(BOOMERANG)) && CanJumpslash);}}), + Entrance(RR_GANONS_CASTLE_MQ_MAIN, {[]{return (CanUse(RG_MASTER_SWORD) || CanUse(RG_BIGGORON_SWORD) || CanUse(RG_MEGATON_HAMMER)) || ((HasExplosives || Nuts || CanUse(RG_BOOMERANG)) && CanJumpslash);}}), }); - areaTable[RR_GANONS_CASTLE_MQ_MAIN] = Area("Ganon's Castle MQ Main", "Ganons Castle", GANONS_CASTLE, NO_DAY_NIGHT_CYCLE, {}, {}, { + areaTable[RR_GANONS_CASTLE_MQ_MAIN] = Area("Ganon's Castle MQ Main", "Ganons Castle", RA_GANONS_CASTLE, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_GANONS_CASTLE_MQ_LOBBY, {[]{return true;}}), Entrance(RR_GANONS_CASTLE_MQ_FOREST_TRIAL, {[]{return true;}}), diff --git a/soh/soh/Enhancements/randomizer/item.cpp b/soh/soh/Enhancements/randomizer/item.cpp index 4fdc2ad72..d34929f76 100644 --- a/soh/soh/Enhancements/randomizer/item.cpp +++ b/soh/soh/Enhancements/randomizer/item.cpp @@ -19,9 +19,9 @@ Item::Item(const RandomizerGet randomizerGet_, Text name_, const ItemType type_, : randomizerGet(randomizerGet_), name(std::move(name_)), type(type_), getItemId(getItemId_), advancement(advancement_), logicVar(logicVar_), hintKey(hintKey_), progressive(progressive_), price(price_) { if (modIndex_ == MOD_RANDOMIZER || getItemId > 0x7D) { - giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, static_cast(randomizerGet_), gid_, true, ITEM_FROM_NPC, category_, NULL}); + giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_RANDOMIZER, static_cast(randomizerGet_), gid_, true, ITEM_FROM_NPC, category_, NULL}); } else { - giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, getItemId_, gid_, true, ITEM_FROM_NPC, category_, NULL}); + giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_VANILLA, getItemId_, gid_, true, ITEM_FROM_NPC, category_, NULL}); } } @@ -33,9 +33,9 @@ Item::Item(const RandomizerGet randomizerGet_, Text name_, const ItemType type_, : randomizerGet(randomizerGet_), name(std::move(name_)), type(type_), getItemId(getItemId_), advancement(advancement_), logicVar(logicVar_), hintKey(hintKey_), progressive(progressive_), price(price_) { if (modIndex_ == MOD_RANDOMIZER || getItemId > 0x7D) { - giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, static_cast(randomizerGet_), gid_, true, ITEM_FROM_NPC, category_, NULL}); + giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_RANDOMIZER, static_cast(randomizerGet_), gid_, true, ITEM_FROM_NPC, category_, NULL}); } else { - giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, getItemId_, gid_, true, ITEM_FROM_NPC, category_, NULL}); + giEntry = std::make_shared(GetItemEntry{itemId_, field_, static_cast((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_VANILLA, getItemId_, gid_, true, ITEM_FROM_NPC, category_, NULL}); } } diff --git a/soh/soh/Enhancements/randomizer/option_descriptions.cpp b/soh/soh/Enhancements/randomizer/option_descriptions.cpp index 83f8b12a0..22fc33f69 100644 --- a/soh/soh/Enhancements/randomizer/option_descriptions.cpp +++ b/soh/soh/Enhancements/randomizer/option_descriptions.cpp @@ -508,7 +508,9 @@ void Settings::CreateOptionDescriptions() { "\n" //"Glitched - Glitches may be required to beat the game. You can disable and enable glitches below.\n" //"\n" - "No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT."; + "No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT.\n" + "\n" + "Vanilla - Places all items and dungeon rewards in their vanilla locations."; mOptionDescriptions[RSK_ALL_LOCATIONS_REACHABLE] = "When this options is enabled, the randomizer will " "guarantee that every item is obtainable and every " "location is reachable. When disabled, only " diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 951f7eef8..3465e499b 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1960,8 +1960,7 @@ void RandomizerSettingsWindow::DrawElement() { mNeedsUpdate = true; } // RANDOTODO: Implement Disalbling of Options for Vanilla Logic - // RANDOTODO: UIWidgets::EnhancementCombobox("gRandomizeLogicRules", randoLogicRules, RO_LOGIC_GLITCHLESS); - if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) { + if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) { ImGui::SameLine(); if (mSettings->GetOption(RSK_ALL_LOCATIONS_REACHABLE).RenderImGui()) { mNeedsUpdate = true; @@ -2513,7 +2512,7 @@ CustomMessage Randomizer::GetSheikMessage(s16 scene, u16 originalTextId) { } CustomMessage Randomizer::GetSariaMessage(u16 originalTextId) { - if (originalTextId == TEXT_SARIA_SFM || (originalTextId >= TEXT_SARIAS_SONG_TEXT_START && originalTextId <= TEXT_SARIAS_SONG_TEXT_END)) { + if (originalTextId == TEXT_SARIA_SFM || (originalTextId == TEXT_SARIAS_SONG_FOREST_SOUNDS && originalTextId == TEXT_SARIAS_SONG_FOREST_TEMPLE)) { CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_SARIAS_SONG_FACE_TO_FACE); CustomMessage messageEntry2 = messageEntry; std::string code = originalTextId == TEXT_SARIA_SFM ? "" : "\x0B"; diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index 83e9df012..b73430369 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -607,6 +607,7 @@ typedef enum { RR_GERUDO_TRAINING_GROUNDS_MQ_CENTRAL_MAZE_RIGHT, RR_GANONS_CASTLE_LOBBY, + RR_GANONS_CASTLE_MAIN, RR_GANONS_CASTLE_DEKU_SCRUBS, RR_GANONS_CASTLE_FOREST_TRIAL, RR_GANONS_CASTLE_FIRE_TRIAL, @@ -617,6 +618,7 @@ typedef enum { RR_GANONS_CASTLE_TOWER, RR_GANONS_CASTLE_MQ_LOBBY, + RR_GANONS_CASTLE_MQ_MAIN, RR_GANONS_CASTLE_MQ_DEKU_SCRUBS, RR_GANONS_CASTLE_MQ_FOREST_TRIAL, RR_GANONS_CASTLE_MQ_FIRE_TRIAL, diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index b66abc420..a510a420b 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -614,7 +614,7 @@ void CheckTrackerSceneFlagSet(int16_t sceneNum, int16_t flagType, int32_t flag) SetCheckCollected(RC_GRAVEYARD_DAMPE_GRAVEDIGGING_TOUR); return; } - for (auto& loc : Rando::StaticData::GetLocationTable) { + for (auto& loc : Rando::StaticData::GetLocationTable()) { if (!IsVisibleInCheckTracker(loc.GetRandomizerCheck())) { continue; } @@ -709,7 +709,7 @@ void CheckTrackerFlagSet(int16_t flagType, int32_t flag) { scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_SCRUB || scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_MASTER_SWORD || scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF)) { - if (flag == OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(rc)) { + if (flag == OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(loc.GetRandomizerCheck())) { SetCheckCollected(loc.GetRandomizerCheck()); return; } diff --git a/soh/soh/Enhancements/randomizer/settings.cpp b/soh/soh/Enhancements/randomizer/settings.cpp index 114f2201a..ea6ad2d23 100644 --- a/soh/soh/Enhancements/randomizer/settings.cpp +++ b/soh/soh/Enhancements/randomizer/settings.cpp @@ -1878,6 +1878,8 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) { mOptions[index].SetSelectedIndex(RO_LOGIC_GLITCHLESS); } else if (it.value() == "No Logic") { mOptions[index].SetSelectedIndex(RO_LOGIC_NO_LOGIC); + } else if (it.value() == "Vanilla") { + mOptions[index].SetSelectedIndex(RO_LOGIC_VANILLA); } break; case RSK_FOREST: diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index 84d2d747a..9a132fa7e 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -239,6 +239,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag; + u8 currentQuest = fileChooseCtx->questType[fileChooseCtx->buttonIndex]; + if (Randomizer_IsSeedGenerated()) { gSaveContext.questId = QUEST_RANDOMIZER;