Clean up location table (#4258)

* Remove categories

* Remove SpoilerCollectionCheckGroup

* Remove unused Location constructors

* Remove LocationType

* Remove unused SpoilerCollectionCheckTypes

* Remove hints' isVanillaCompletion, it's always false

* Remove SpoilerCollectionCheck::None

Same effect as default constructor

* Fix mistake

* Update location.h

* Deduce RC Area by scene when possible

* Remove useless constructors

* Remove flag in most situations

* Format improvements

* Replace overworldLocations with a function

* Replace shopLocationLists with a function

* Replace gossipStoneLocations with a function

Also add a new RCType for static hints

* Replace scrubLocations with a function

* Replace staticHintLocations with a function

* Replace overworldFishLocations with a function

* Replace pondFishLocations with a function

* Remove RC_TRIFORCE_COMPLETED from GetOverworldLocations

* Update fill.cpp

Re-add filter for dungeonLocations for song shuffle dungeon rewards (and fix erroneous check for song locations there).
Modify songLocations filter for dungeon rewards to check for RCTYPE_BOSS_HEART_OR_OTHER_REWARD and then the two song locations added for it.

* Update fill.cpp

Fix bracketing.

* Apply Pepper0ni's patch

---------

Co-authored-by: Malkierian <malkierian@live.com>
This commit is contained in:
Pepe20129 2024-10-01 18:50:47 +02:00 committed by GitHub
parent 668f0fe4c6
commit 0cfd535fe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 1404 additions and 2199 deletions

View File

@ -1,26 +1,5 @@
#pragma once
enum class Category {
cNull,
cChestMinigame,
cDekuScrub,
cDekuScrubUpgrades,
cSkulltula,
cSong,
cSongDungeonReward,
cCow,
cFish,
cShop,
cMerchant,
cVanillaSmallKey,
cVanillaGFSmallKey,
cVanillaBossKey,
cVanillaMap,
cVanillaCompass,
cAdultTrade,
cBeehive,
};
enum class OptionCategory {
Setting,
Toggle,

View File

@ -977,12 +977,14 @@ static void RandomizeOwnDungeon(const Rando::DungeonInfo* dungeon) {
});
//filter out locations that may be required to have songs placed at them
dungeonLocations = FilterFromPool(dungeonLocations, [ctx](const auto loc){
dungeonLocations = FilterFromPool(dungeonLocations, [ctx](const auto loc) {
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
return !(Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSong));
return !(Rando::StaticData::GetLocation(loc)->GetRCType() == RCTYPE_SONG_LOCATION);
}
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
return !(Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSongDungeonReward));
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_DUNGEON_REWARDS)) {
return !(Rando::StaticData::GetLocation(loc)->GetRCType() == RCTYPE_BOSS_HEART_OR_OTHER_REWARD ||
loc == RC_SHEIK_IN_ICE_CAVERN ||
loc == RC_SONG_FROM_IMPA);
}
return true;
});
@ -1022,7 +1024,7 @@ static void RandomizeDungeonItems() {
//Get Any Dungeon and Overworld group locations
std::vector<RandomizerCheck> anyDungeonLocations = FilterFromPool(ctx->allLocations, [](const auto loc){return Rando::StaticData::GetLocation(loc)->IsDungeon();});
//overworldLocations defined in item_location.cpp
//Rando::StaticData::GetOverworldLocations() defined in item_location.cpp
//Create Any Dungeon and Overworld item pools
std::vector<RandomizerGet> anyDungeonItems;
@ -1074,7 +1076,7 @@ static void RandomizeDungeonItems() {
//Randomize Any Dungeon and Overworld pools
AssumedFill(anyDungeonItems, anyDungeonLocations, true);
AssumedFill(overworldItems, Rando::StaticData::overworldLocations, true);
AssumedFill(overworldItems, Rando::StaticData::GetOverworldLocations(), true);
//Randomize maps and compasses after since they're not advancement items
for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
@ -1083,7 +1085,7 @@ static void RandomizeDungeonItems() {
AssumedFill(mapAndCompassItems, anyDungeonLocations, true);
} else if (ctx->GetOption(RSK_SHUFFLE_MAPANDCOMPASS).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD)) {
auto mapAndCompassItems = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetMap() || i == dungeon->GetCompass();});
AssumedFill(mapAndCompassItems, Rando::StaticData::overworldLocations, true);
AssumedFill(mapAndCompassItems, Rando::StaticData::GetOverworldLocations(), true);
}
}
}
@ -1192,17 +1194,19 @@ int Fill() {
//Indices from OoTR. So shopsanity one will overwrite 7, three will overwrite 7, 5, 8, etc.
const std::array<int, 4> indices = {7, 5, 8, 6};
//Overwrite appropriate number of shop items
for (size_t i = 0; i < Rando::StaticData::shopLocationLists.size(); i++) {
#define LOCATIONS_PER_SHOP 8
for (size_t i = 0; i < Rando::StaticData::GetShopLocations().size() / LOCATIONS_PER_SHOP; i++) {
int num_to_replace = GetShopsanityReplaceAmount(); //1-4 shop items will be overwritten, depending on settings
total_replaced += num_to_replace;
for (int j = 0; j < num_to_replace; j++) {
int itemindex = indices[j];
int shopsanityPrice = GetRandomShopPrice();
NonShopItems[TransformShopIndex(i * 8 + itemindex - 1)].Price =
NonShopItems[TransformShopIndex(i * LOCATIONS_PER_SHOP + itemindex - 1)].Price =
shopsanityPrice; // Set price to be retrieved by the patch and textboxes
ctx->GetItemLocation(Rando::StaticData::shopLocationLists[i][itemindex - 1])->SetCustomPrice(shopsanityPrice);
ctx->GetItemLocation(Rando::StaticData::GetShopLocations()[i * LOCATIONS_PER_SHOP + itemindex - 1])->SetCustomPrice(shopsanityPrice);
}
}
#undef LOCATIONS_PER_SHOP
}
//Get all locations and items that don't have a shopsanity price attached
std::vector<RandomizerCheck> shopLocations = {};
@ -1210,12 +1214,9 @@ int Fill() {
//So shopsanity 0 will get all 64 vanilla items, shopsanity 4 will get 32, etc.
std::vector<RandomizerGet> shopItems = GetMinVanillaShopItems(total_replaced);
for (size_t i = 0; i < Rando::StaticData::shopLocationLists.size(); i++) {
for (size_t j = 0; j < Rando::StaticData::shopLocationLists[i].size(); j++) {
RandomizerCheck loc = Rando::StaticData::shopLocationLists[i][j];
if (!(ctx->GetItemLocation(loc)->HasCustomPrice())) {
shopLocations.push_back(loc);
}
for (RandomizerCheck& randomizerCheck : Rando::StaticData::GetShopLocations()) {
if (!(ctx->GetItemLocation(randomizerCheck)->HasCustomPrice())) {
shopLocations.push_back(randomizerCheck);
}
}
//Place the shop items which will still be at shop locations
@ -1246,11 +1247,13 @@ int Fill() {
std::vector<RandomizerCheck> songLocations;
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
songLocations = FilterFromPool(
ctx->allLocations, [](const auto loc) { return Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSong); });
ctx->allLocations, [](const auto loc) { return Rando::StaticData::GetLocation(loc)->GetRCType() == RCTYPE_SONG_LOCATION; });
} else if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_DUNGEON_REWARDS)) {
songLocations = FilterFromPool(ctx->allLocations, [](const auto loc) {
return Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSongDungeonReward);
return Rando::StaticData::GetLocation(loc)->GetRCType() == RCTYPE_BOSS_HEART_OR_OTHER_REWARD ||
loc == RC_SHEIK_IN_ICE_CAVERN ||
loc == RC_SONG_FROM_IMPA;
});
}
@ -1282,26 +1285,25 @@ int Fill() {
StopPerformanceTimer(PT_REMAINING_ITEMS);
//Add default prices to scrubs
for (size_t i = 0; i < Rando::StaticData::scrubLocations.size(); i++) {
if (Rando::StaticData::scrubLocations[i] == RC_LW_DEKU_SCRUB_NEAR_BRIDGE || Rando::StaticData::scrubLocations[i] == RC_LW_DEKU_SCRUB_GROTTO_FRONT) {
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(40);
} else if (Rando::StaticData::scrubLocations[i] == RC_HF_DEKU_SCRUB_GROTTO) {
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(10);
for (RandomizerCheck& randomizerCheck : Rando::StaticData::GetScrubLocations()) {
if (randomizerCheck == RC_LW_DEKU_SCRUB_NEAR_BRIDGE || randomizerCheck == RC_LW_DEKU_SCRUB_GROTTO_FRONT) {
ctx->GetItemLocation(randomizerCheck)->SetCustomPrice(40);
} else if (randomizerCheck == RC_HF_DEKU_SCRUB_GROTTO) {
ctx->GetItemLocation(randomizerCheck)->SetCustomPrice(10);
} else {
auto loc = Rando::StaticData::GetLocation(Rando::StaticData::scrubLocations[i]);
auto loc = Rando::StaticData::GetLocation(randomizerCheck);
auto item = Rando::StaticData::RetrieveItem(loc->GetVanillaItem());
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(item.GetPrice());
ctx->GetItemLocation(randomizerCheck)->SetCustomPrice(item.GetPrice());
}
}
if (ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_AFFORDABLE)) {
for (size_t i = 0; i < Rando::StaticData::scrubLocations.size(); i++) {
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(10);
for (RandomizerCheck& randomizerCheck : Rando::StaticData::GetScrubLocations()) {
ctx->GetItemLocation(randomizerCheck)->SetCustomPrice(10);
}
} else if (ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_RANDOM)) {
for (size_t i = 0; i < Rando::StaticData::scrubLocations.size(); i++) {
int randomPrice = GetRandomScrubPrice();
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(randomPrice);
for (RandomizerCheck& randomizerCheck : Rando::StaticData::GetScrubLocations()) {
ctx->GetItemLocation(randomizerCheck)->SetCustomPrice(GetRandomScrubPrice());
}
}

View File

@ -136,7 +136,7 @@ bool FilterFoolishLocations(RandomizerCheck loc){
bool FilterSongLocations(RandomizerCheck loc){
auto ctx = Rando::Context::GetInstance();
return Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSong);
return Rando::StaticData::GetLocation(loc)->GetRCType() == RCTYPE_SONG_LOCATION;
}
bool FilterOverworldLocations(RandomizerCheck loc){
@ -316,7 +316,7 @@ std::vector<std::pair<RandomizerCheck, std::function<bool()>>> conditionalAlways
};
static std::vector<RandomizerCheck> GetEmptyGossipStones() {
auto emptyGossipStones = GetEmptyLocations(Rando::StaticData::gossipStoneLocations);
auto emptyGossipStones = GetEmptyLocations(Rando::StaticData::GetGossipStoneLocations());
return emptyGossipStones;
}
@ -328,7 +328,7 @@ static std::vector<RandomizerCheck> GetAccessibleGossipStones(const RandomizerCh
ctx->GetItemLocation(hintedLocation)->SetPlacedItem(RG_NONE);
ctx->GetLogic()->Reset();
auto accessibleGossipStones = ReachabilitySearch(Rando::StaticData::gossipStoneLocations);
auto accessibleGossipStones = ReachabilitySearch(Rando::StaticData::GetGossipStoneLocations());
//Give the item back to the location
ctx->GetItemLocation(hintedLocation)->SetPlacedItem(originalItem);

View File

@ -613,7 +613,7 @@ static void PlaceVanillaCowMilk() {
static void PlaceVanillaOverworldFish() {
auto ctx = Rando::Context::GetInstance();
for (auto rc : Rando::StaticData::overworldFishLocations) {
for (auto rc : Rando::StaticData::GetOverworldFishLocations()) {
ctx->PlaceItemInLocation(rc, RG_FISH, false, true);
}
}
@ -830,7 +830,7 @@ void GenerateItemPool() {
}
// 9 grotto fish, 5 zora's domain fish
if (fsMode.Is(RO_FISHSANITY_OVERWORLD) || fsMode.Is(RO_FISHSANITY_BOTH)) {
for (uint8_t i = 0; i < Rando::StaticData::overworldFishLocations.size(); i++)
for (uint8_t i = 0; i < Rando::StaticData::GetOverworldFishLocations().size(); i++)
AddItemToMainPool(GetJunkItem());
} else {
PlaceVanillaOverworldFish();
@ -936,11 +936,11 @@ void GenerateItemPool() {
};
if (ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OFF)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, Category::cSkulltula)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, RCTYPE_SKULL_TOKEN)) {
ctx->PlaceItemInLocation(loc, RG_GOLD_SKULLTULA_TOKEN, false, true);
}
} else if (ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_DUNGEONS)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, Category::cSkulltula)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, RCTYPE_SKULL_TOKEN)) {
if (Rando::StaticData::GetLocation(loc)->IsOverworld()) {
ctx->PlaceItemInLocation((RandomizerCheck)loc, RG_GOLD_SKULLTULA_TOKEN, false, true);
} else {
@ -948,7 +948,7 @@ void GenerateItemPool() {
}
}
} else if (ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OVERWORLD)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, Category::cSkulltula)) {
for (RandomizerCheck loc : ctx->GetLocations(ctx->allLocations, RCTYPE_SKULL_TOKEN)) {
if (Rando::StaticData::GetLocation(loc)->IsDungeon()) {
ctx->PlaceItemInLocation((RandomizerCheck)loc, RG_GOLD_SKULLTULA_TOKEN, false, true);
} else {

View File

@ -47,7 +47,7 @@ bool LocationAccess::ConditionsMet() const {
bool LocationAccess::CanBuy() const {
auto ctx = Rando::Context::GetInstance();
//Not a shop or scrub location, don't need to check if buyable
if (!(Rando::StaticData::GetLocation(location)->IsCategory(Category::cShop)) && !(Rando::StaticData::GetLocation(location)->IsCategory(Category::cDekuScrub))) {
if (Rando::StaticData::GetLocation(location)->GetRCType() != RCTYPE_SHOP && Rando::StaticData::GetLocation(location)->GetRCType() != RCTYPE_SCRUB) {
return true;
}

View File

@ -15,13 +15,11 @@ bool initTrickNames = false; //Indicates if trick ice trap names have been initi
//Set vanilla shop item locations before potentially shuffling
void PlaceVanillaShopItems() {
auto ctx = Rando::Context::GetInstance();
//Loop to place vanilla items in each location
for (size_t i = 0; i < Rando::StaticData::shopLocationLists.size(); i++) {
for (size_t j = 0; j < Rando::StaticData::shopLocationLists[i].size(); j++) {
ctx->GetItemLocation(Rando::StaticData::shopLocationLists[i][j])->PlaceVanillaItem();
auto ctx = Rando::Context::GetInstance();
//Loop to place vanilla items in each location
for (RandomizerCheck& randomizerCheck : Rando::StaticData::GetShopLocations()) {
ctx->GetItemLocation(randomizerCheck)->PlaceVanillaItem();
}
}
}
//These are the vanilla shop items, but in a priority order of importance

View File

@ -85,9 +85,9 @@ void WriteIngameSpoilerLog() {
uint16_t spoilerItemIndex = 0;
uint32_t spoilerStringOffset = 0;
uint16_t spoilerSphereItemoffset = 0;
uint16_t spoilerGroupOffset = 0;
// Intentionally junk value so we trigger the 'new group, record some stuff' code
uint8_t currentGroup = SpoilerCollectionCheckGroup::SPOILER_COLLECTION_GROUP_COUNT;
uint16_t spoilerAreaOffset = 0;
// Intentionally junk value so we trigger the 'new area, record some stuff' code
RandomizerCheckArea currentArea = RandomizerCheckArea::RCAREA_INVALID;
bool spoilerOutOfSpace = false;
// Create map of string data offsets for all _unique_ item locations and names in the playthrough
@ -99,12 +99,12 @@ void WriteIngameSpoilerLog() {
stringOffsetMap; // Map of strings to their offset into spoiler string data array
stringOffsetMap.reserve(ctx->allLocations.size() * 2);
// Sort all locations by their group, so the in-game log can show a group of items by simply starting/ending at
// Sort all locations by their area, so the in-game log can show a area of items by simply starting/ending at
// certain indices
std::stable_sort(ctx->allLocations.begin(), ctx->allLocations.end(), [](const RandomizerCheck& a, const RandomizerCheck& b) {
auto groupA = Rando::StaticData::GetLocation(a)->GetCollectionCheckGroup();
auto groupB = Rando::StaticData::GetLocation(b)->GetCollectionCheckGroup();
return groupA < groupB;
RandomizerCheckArea areaA = Rando::StaticData::GetLocation(a)->GetArea();
RandomizerCheckArea areaB = Rando::StaticData::GetLocation(b)->GetArea();
return areaA < areaB;
});
for (const RandomizerCheck key : ctx->allLocations) {
@ -116,30 +116,29 @@ void WriteIngameSpoilerLog() {
// continue;
// }
// Beehives
if (!ctx->GetOption(RSK_SHUFFLE_BEEHIVES) && loc->IsCategory(Category::cBeehive)) {
if (!ctx->GetOption(RSK_SHUFFLE_BEEHIVES) && loc->GetRCType() == RCTYPE_BEEHIVE) {
continue;
}
// Cows
else if (!ctx->GetOption(RSK_SHUFFLE_COWS) && loc->IsCategory(Category::cCow)) {
else if (!ctx->GetOption(RSK_SHUFFLE_COWS) && loc->GetRCType() == RCTYPE_COW) {
continue;
}
// Merchants
else if (ctx->GetOption(RSK_SHUFFLE_MERCHANTS).Is(RO_SHUFFLE_MERCHANTS_OFF) && loc->IsCategory(Category::cMerchant)) {
else if (ctx->GetOption(RSK_SHUFFLE_MERCHANTS).Is(RO_SHUFFLE_MERCHANTS_OFF) && loc->GetRCType() == RCTYPE_MERCHANT) {
continue;
}
// Adult Trade
else if (!ctx->GetOption(RSK_SHUFFLE_ADULT_TRADE) && loc->IsCategory(Category::cAdultTrade)) {
else if (!ctx->GetOption(RSK_SHUFFLE_ADULT_TRADE) && loc->GetRCType() == RCTYPE_ADULT_TRADE) {
continue;
}
// Chest Minigame
else if (ctx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_GENERIC_OFF) &&
loc->IsCategory(Category::cChestMinigame)) {
else if (ctx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_GENERIC_OFF) && loc->GetRCType() == RCTYPE_CHEST_GAME) {
continue;
}
// Gerudo Fortress
else if ((ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_NORMAL) &&
(loc->IsCategory(Category::cVanillaGFSmallKey) || loc->GetHintKey() == RHT_GF_GERUDO_MEMBERSHIP_CARD)) ||
(ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FAST) && loc->IsCategory(Category::cVanillaGFSmallKey) &&
(loc->GetRCType() == RCTYPE_GF_KEY || loc->GetHintKey() == RHT_GF_GERUDO_MEMBERSHIP_CARD)) ||
(ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FAST) && loc->GetRCType() == RCTYPE_GF_KEY &&
loc->GetHintKey() != RHT_GF_NORTH_F1_CARPENTER)) {
continue;
}
@ -160,7 +159,7 @@ void WriteIngameSpoilerLog() {
}
// PURPLE TODO: LOCALIZATION
auto locItem = itemLocation->GetPlacedItemName().GetEnglish();
if (itemLocation->GetPlacedRandomizerGet() == RG_ICE_TRAP && loc->IsCategory(Category::cShop)) {
if (itemLocation->GetPlacedRandomizerGet() == RG_ICE_TRAP && loc->GetRCType() == RCTYPE_SHOP) {
locItem = NonShopItems[TransformShopIndex(GetShopIndex(key))].Name.GetEnglish();
}
if (stringOffsetMap.find(locItem) == stringOffsetMap.end()) {
@ -201,29 +200,37 @@ void WriteIngameSpoilerLog() {
}
}
// Gold Skulltulas
else if (loc->IsCategory(Category::cSkulltula) &&
else if (loc->GetRCType() == RCTYPE_SKULL_TOKEN &&
((ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OFF)) ||
(ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_DUNGEONS) && !loc->IsDungeon()) ||
(ctx->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OVERWORLD) && loc->IsDungeon()))) {
spoilerData.ItemLocations[spoilerItemIndex].RevealType = REVEALTYPE_ALWAYS;
}
// Deku Scrubs
else if (loc->IsCategory(Category::cDekuScrub) && !loc->IsCategory(Category::cDekuScrubUpgrades) &&
ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_OFF)) {
else if (
loc->GetRCType() == RCTYPE_SCRUB &&
// these 3 scrubs are always randomized
!(
loc->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_NEAR_BRIDGE ||
loc->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_GROTTO_FRONT ||
loc->GetRandomizerCheck() == RC_HF_DEKU_SCRUB_GROTTO
) &&
ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_OFF)
) {
spoilerData.ItemLocations[spoilerItemIndex].CollectType = COLLECTTYPE_REPEATABLE;
spoilerData.ItemLocations[spoilerItemIndex].RevealType = REVEALTYPE_ALWAYS;
}
auto checkGroup = loc->GetCollectionCheckGroup();
spoilerData.ItemLocations[spoilerItemIndex].Group = checkGroup;
RandomizerCheckArea checkArea = loc->GetArea();
spoilerData.ItemLocations[spoilerItemIndex].Area = checkArea;
// Group setup
if (checkGroup != currentGroup) {
currentGroup = checkGroup;
spoilerData.GroupOffsets[currentGroup] = spoilerGroupOffset;
// Area setup
if (checkArea != currentArea) {
currentArea = checkArea;
spoilerData.AreaOffsets[currentArea] = spoilerAreaOffset;
}
++spoilerData.GroupItemCounts[currentGroup];
++spoilerGroupOffset;
++spoilerData.AreaItemCounts[currentArea];
++spoilerAreaOffset;
itemLocationsMap[key] = spoilerItemIndex++;
}
@ -287,7 +294,7 @@ static void WriteLocation(
// // Insert a padding so we get a kind of table in the XML document.
// int16_t requiredPadding = LONGEST_NAME - location->GetName().length();
// if (location->IsCategory(Category::cShop)) {
// if (location->GetRCType() == RCTYPE_SHOP) {
// // Shop items have short location names, but come with an additional price attribute.
// requiredPadding -= PRICE_ATTRIBUTE;
// }
@ -297,7 +304,7 @@ static void WriteLocation(
// }
// }
// if (location->IsCategory(Category::cShop)) {
// if (location->GetRCType() == RCTYPE_SHOP) {
// char price[6];
// sprintf(price, "%03d", location->GetPrice());
// node->SetAttribute("price", price);

View File

@ -11,53 +11,16 @@ using RandomizerHash = std::array<std::string, 5>;
typedef enum {
SPOILER_CHK_NONE,
SPOILER_CHK_ALWAYS_COLLECTED,
SPOILER_CHK_CHEST,
SPOILER_CHK_COLLECTABLE,
SPOILER_CHK_GOLD_SKULLTULA,
SPOILER_CHK_ITEM_GET_INF,
SPOILER_CHK_EVENT_CHK_INF,
SPOILER_CHK_INF_TABLE,
SPOILER_CHK_FISH,
SPOILER_CHK_MINIGAME,
SPOILER_CHK_POE_POINTS,
SPOILER_CHK_SHOP_ITEM,
SPOILER_CHK_MASTER_SWORD,
SPOILER_CHK_GRAVEDIGGER,
SPOILER_CHK_RANDOMIZER_INF,
} SpoilerCollectionCheckType;
// GetLocation groups for checks, used to group the checks by logical location
typedef enum {
GROUP_NO_GROUP,
GROUP_KOKIRI_FOREST, // 0x55, 0x28
GROUP_LOST_WOODS, // 0x5B, 0x56
GROUP_DUNGEON_DEKU_TREE, // 0x00, 0x11
GROUP_DUNGEON_FOREST_TEMPLE, // 0x03
GROUP_KAKARIKO, // 0x37, 0x42, 0x3F, 0x40, 0x41, 0x48, 0x52, 0x53
GROUP_DUNGEON_BOTTOM_OF_THE_WELL, // 0x08
GROUP_DUNGEON_SHADOW_TEMPLE, // 0x07
GROUP_DEATH_MOUNTAIN, // 0x60, 0x61
GROUP_GORON_CITY, // 0x62
GROUP_DUNGEON_DODONGOS_CAVERN, // 0x01, 0x12
GROUP_DUNGEON_FIRE_TEMPLE, // 0x04
GROUP_ZORAS_RIVER, // 0x54
GROUP_ZORAS_DOMAIN, // 0x58, 0x59
GROUP_DUNGEON_JABUJABUS_BELLY, // 0x02, 0x13
GROUP_DUNGEON_ICE_CAVERN, // 0x09
GROUP_HYRULE_FIELD, // 0x51
GROUP_LON_LON_RANCH, // 0x4C
GROUP_LAKE_HYLIA, // 0x57
GROUP_DUNGEON_WATER_TEMPLE, // 0x05
GROUP_GERUDO_VALLEY, // 0x5A, 0x5D, 0x0C, 0x5E, 0x5C
GROUP_GERUDO_TRAINING_GROUND, // 0x0B
GROUP_DUNGEON_SPIRIT_TEMPLE, // 0x06
GROUP_HYRULE_CASTLE, // 0x10, 0x4B, 0x35, 0x42, 0x4D, 0x5F, 0x4A
GROUP_DUNGEON_GANONS_CASTLE, // 0x0A, 0x0D, 0x0E, 0x0F
SPOILER_COLLECTION_GROUP_COUNT,
// Grottos are all 0x3E
} SpoilerCollectionCheckGroup;
typedef enum {
COLLECTTYPE_NORMAL,
COLLECTTYPE_REPEATABLE,
@ -82,7 +45,7 @@ typedef struct {
SpoilerCollectionCheckType CollectionCheckType;
uint8_t LocationScene;
uint8_t LocationFlag;
SpoilerCollectionCheckGroup Group;
RandomizerCheckArea Area;
SpoilerItemCollectType CollectType;
SpoilerItemRevealType RevealType;
} SpoilerItemLocation;
@ -99,8 +62,8 @@ typedef struct {
SpoilerItemLocation ItemLocations[SPOILER_ITEMS_MAX];
uint16_t SphereItemLocations[SPOILER_ITEMS_MAX];
char StringData[SPOILER_STRING_DATA_SIZE];
uint16_t GroupItemCounts[SPOILER_COLLECTION_GROUP_COUNT];
uint16_t GroupOffsets[SPOILER_COLLECTION_GROUP_COUNT];
uint16_t AreaItemCounts[RCAREA_INVALID];
uint16_t AreaOffsets[RCAREA_INVALID];
} SpoilerData;
void GenerateHash();

View File

@ -105,7 +105,7 @@ void Context::PlaceItemInLocation(const RandomizerCheck locKey, const Randomizer
// If we're placing a non-shop item in a shop location, we want to record it for custom messages
if (StaticData::RetrieveItem(item).GetItemType() != ITEMTYPE_SHOP &&
StaticData::GetLocation(locKey)->IsCategory(Category::cShop)) {
StaticData::GetLocation(locKey)->GetRCType() == RCTYPE_SHOP) {
const int index = TransformShopIndex(GetShopIndex(locKey));
NonShopItems[index].Name = StaticData::RetrieveItem(item).GetName();
NonShopItems[index].Repurchaseable =
@ -136,11 +136,11 @@ void Context::AddLocations(const Container& locations, std::vector<RandomizerChe
void Context::GenerateLocationPool() {
allLocations.clear();
AddLocation(RC_LINKS_POCKET);
//AddLocation(RC_LINKS_POCKET); this is being added twice now
if (mSettings->GetOption(RSK_TRIFORCE_HUNT)) {
AddLocation(RC_TRIFORCE_COMPLETED);
}
AddLocations(StaticData::overworldLocations);
AddLocations(StaticData::GetOverworldLocations());
if (mSettings->GetOption(RSK_FISHSANITY).IsNot(RO_FISHSANITY_OFF)) {
AddLocations(mFishsanity->GetFishsanityLocations().first);
@ -152,7 +152,7 @@ void Context::GenerateLocationPool() {
}
void Context::AddExcludedOptions() {
AddLocations(StaticData::overworldLocations, &everyPossibleLocation);
AddLocations(StaticData::GetOverworldLocations(), &everyPossibleLocation);
for (const auto dungeon : mDungeons->GetDungeonList()) {
AddLocations(dungeon->GetEveryLocation(), &everyPossibleLocation);
}
@ -161,16 +161,14 @@ void Context::AddExcludedOptions() {
}
}
std::vector<RandomizerCheck> Context::GetLocations(const std::vector<RandomizerCheck>& locationPool,
const Category categoryInclude, const Category categoryExclude) {
std::vector<RandomizerCheck> locationsInCategory;
std::vector<RandomizerCheck> Context::GetLocations(const std::vector<RandomizerCheck>& locationPool, const RandomizerCheckType checkType) {
std::vector<RandomizerCheck> locationsOfType;
for (RandomizerCheck locKey : locationPool) {
if (StaticData::GetLocation(locKey)->IsCategory(categoryInclude) &&
!StaticData::GetLocation(locKey)->IsCategory(categoryExclude)) {
locationsInCategory.push_back(locKey);
if (StaticData::GetLocation(locKey)->GetRCType() == checkType) {
locationsOfType.push_back(locKey);
}
}
return locationsInCategory;
return locationsOfType;
}
void Context::ClearItemLocations() {
@ -198,17 +196,17 @@ void Context::LocationReset() {
GetItemLocation(il)->RemoveFromPool();
}
for (const RandomizerCheck il : StaticData::gossipStoneLocations) {
for (const RandomizerCheck il : StaticData::GetGossipStoneLocations()) {
GetItemLocation(il)->RemoveFromPool();
}
for (const RandomizerCheck il : StaticData::staticHintLocations) {
for (const RandomizerCheck il : StaticData::GetStaticHintLocations()) {
GetItemLocation(il)->RemoveFromPool();
}
}
void Context::HintReset() {
for (const RandomizerCheck il : StaticData::gossipStoneLocations) {
for (const RandomizerCheck il : StaticData::GetGossipStoneLocations()) {
GetItemLocation(il)->ResetVariables();
}
for (Hint& hint : hintTable){
@ -227,7 +225,7 @@ void Context::CreateItemOverrides() {
iceTrapModels[locKey] = val.LooksLike();
val.SetTrickName(GetIceTrapName(val.LooksLike()));
// If this is ice trap is in a shop, change the name based on what the model will look like
if (loc->IsCategory(Category::cShop)) {
if (loc->GetRCType() == RCTYPE_SHOP) {
NonShopItems[TransformShopIndex(GetShopIndex(locKey))].Name = val.GetTrickName();
}
overrides[locKey] = val;

View File

@ -50,8 +50,7 @@ class Context {
template <typename Container>
void AddLocations(const Container& locations, std::vector<RandomizerCheck>* destination = nullptr);
void GenerateLocationPool();
static std::vector<RandomizerCheck> GetLocations(const std::vector<RandomizerCheck>& locationPool,
Category categoryInclude, Category categoryExclude = Category::cNull);
static std::vector<RandomizerCheck> GetLocations(const std::vector<RandomizerCheck>& locationPool, const RandomizerCheckType checkType);
void AddExcludedOptions();
void LocationReset();
void ClearItemLocations();

View File

@ -100,7 +100,7 @@ void DungeonInfo::PlaceVanillaMap() const {
auto dungeonLocations = GetDungeonLocations();
const auto mapLocation = FilterFromPool(dungeonLocations, [](const RandomizerCheck loc) {
return StaticData::GetLocation(loc)->IsCategory(Category::cVanillaMap);
return StaticData::GetLocation(loc)->GetRCType() == RCTYPE_MAP;
})[0];
Context::GetInstance()->PlaceItemInLocation(mapLocation, map);
}
@ -112,7 +112,7 @@ void DungeonInfo::PlaceVanillaCompass() const {
auto dungeonLocations = GetDungeonLocations();
const auto compassLocation = FilterFromPool(dungeonLocations, [](const RandomizerCheck loc) {
return StaticData::GetLocation(loc)->IsCategory(Category::cVanillaCompass);
return StaticData::GetLocation(loc)->GetRCType() == RCTYPE_COMPASS;
})[0];
Context::GetInstance()->PlaceItemInLocation(compassLocation, compass);
}
@ -124,7 +124,7 @@ void DungeonInfo::PlaceVanillaBossKey() const {
auto dungeonLocations = GetDungeonLocations();
const auto bossKeyLocation = FilterFromPool(dungeonLocations, [](const RandomizerCheck loc) {
return StaticData::GetLocation(loc)->IsCategory(Category::cVanillaBossKey);
return StaticData::GetLocation(loc)->GetRCType() == RCTYPE_BOSS_KEY;
})[0];
Context::GetInstance()->PlaceItemInLocation(bossKeyLocation, bossKey);
}
@ -136,7 +136,7 @@ void DungeonInfo::PlaceVanillaSmallKeys() const {
auto dungeonLocations = GetDungeonLocations();
const auto smallKeyLocations = FilterFromPool(dungeonLocations, [](const RandomizerCheck loc) {
return StaticData::GetLocation(loc)->IsCategory(Category::cVanillaSmallKey);
return StaticData::GetLocation(loc)->GetRCType() == RCTYPE_SMALL_KEY;
});
for (const auto location : smallKeyLocations) {
Context::GetInstance()->PlaceItemInLocation(location, smallKey);

View File

@ -87,10 +87,10 @@ namespace Rando {
auto [mode, numFish, ageSplit] = GetOptions(optionsSource);
std::vector<RandomizerCheck> activeFish;
std::vector<RandomizerCheck> remainingFish;
std::vector<RandomizerCheck> pondFish = Rando::StaticData::GetPondFishLocations();
// Fishsanity_InitializeHelpers();
remainingFish.insert(remainingFish.end(), Rando::StaticData::pondFishLocations.begin(),
Rando::StaticData::pondFishLocations.end());
remainingFish.insert(remainingFish.end(), pondFish.begin(), pondFish.end());
// No pond fish shuffled
if (numFish == 0) {
@ -138,8 +138,8 @@ namespace Rando {
// Add overworld fish
if (mode == RO_FISHSANITY_OVERWORLD || mode == RO_FISHSANITY_BOTH) {
activeFish.insert(activeFish.end(), Rando::StaticData::overworldFishLocations.begin(),
Rando::StaticData::overworldFishLocations.end());
std::vector<RandomizerCheck> overworldFish = Rando::StaticData::GetOverworldFishLocations();
activeFish.insert(activeFish.end(), overworldFish.begin(), overworldFish.end());
}
return std::make_pair(activeFish, remainingFish);
@ -299,11 +299,11 @@ namespace Rando {
FishsanityCheckType Fishsanity::GetCheckType(RandomizerCheck rc) {
// Is this a pond fish?
if (std::binary_search(Rando::StaticData::pondFishLocations.begin(), Rando::StaticData::pondFishLocations.end(), rc))
if (std::binary_search(Rando::StaticData::GetPondFishLocations().begin(), Rando::StaticData::GetPondFishLocations().end(), rc))
return FSC_POND;
// Is this an overworld fish?
if (std::binary_search(Rando::StaticData::overworldFishLocations.begin(), Rando::StaticData::overworldFishLocations.end(), rc)) {
if (std::binary_search(Rando::StaticData::GetOverworldFishLocations().begin(), Rando::StaticData::GetOverworldFishLocations().end(), rc)) {
if (rc < RC_ZD_FISH_1)
return FSC_GROTTO;
else

View File

@ -174,13 +174,13 @@ void ItemLocation::AddExcludeOption() {
// RANDOTODO: this without string compares and loops
bool alreadyAdded = false;
const Location* loc = StaticData::GetLocation(rc);
for (const Option* location : Context::GetInstance()->GetSettings()->GetExcludeOptionsForGroup(loc->GetCollectionCheckGroup())) {
for (const Option* location : Context::GetInstance()->GetSettings()->GetExcludeOptionsForArea(loc->GetArea())) {
if (location->GetName() == excludedOption.GetName()) {
alreadyAdded = true;
}
}
if (!alreadyAdded) {
Context::GetInstance()->GetSettings()->GetExcludeOptionsForGroup(loc->GetCollectionCheckGroup()).push_back(&excludedOption);
Context::GetInstance()->GetSettings()->GetExcludeOptionsForArea(loc->GetArea()).push_back(&excludedOption);
}
}

View File

@ -1,6 +1,7 @@
#include "location.h"
#include "static_data.h"
#include <algorithm>
#include <assert.h>
RandomizerCheck Rando::Location::GetRandomizerCheck() const {
return rc;
@ -10,10 +11,6 @@ Rando::SpoilerCollectionCheck Rando::Location::GetCollectionCheck() const {
return collectionCheck;
}
SpoilerCollectionCheckGroup Rando::Location::GetCollectionCheckGroup() const {
return collectionCheckGroup;
}
RandomizerCheckQuest Rando::Location::GetQuest() const {
return quest;
}
@ -35,11 +32,7 @@ int32_t Rando::Location::GetActorParams() const {
}
SceneID Rando::Location::GetScene() const {
return static_cast<SceneID>(scene);
}
uint8_t Rando::Location::GetFlag() const {
return flag;
return scene;
}
RandomizerHintTextKey Rando::Location::GetHintKey() const {
@ -58,19 +51,11 @@ const std::string& Rando::Location::GetShortName() const {
return shortName;
}
Rando::LocationType Rando::Location::GetLocationType() const {
return locationType;
}
bool Rando::Location::IsCategory(Category category) const {
return std::any_of(categories.begin(), categories.end(), [category](auto entry) { return entry == category; });
}
bool Rando::Location::IsDungeon() const {
return (locationType != LocationType::GSToken &&
return (checkType != RCTYPE_SKULL_TOKEN &&
(scene < SCENE_GANONS_TOWER_COLLAPSE_INTERIOR ||
(scene > SCENE_TREASURE_BOX_SHOP && scene < SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR))) ||
(locationType == LocationType::GSToken && scene < SCENE_GANONS_TOWER);
(checkType == RCTYPE_SKULL_TOKEN && scene < SCENE_GANONS_TOWER);
}
bool Rando::Location::IsOverworld() const {
@ -97,312 +82,277 @@ RandomizerGet Rando::Location::GetVanillaItem() const {
return vanillaItem;
}
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_, std::string&& spoilerName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Base, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
RandomizerCheckArea GetAreaFromScene(uint8_t scene) {
switch (scene) {
case SCENE_LINKS_HOUSE:
case SCENE_KOKIRI_FOREST:
case SCENE_KOKIRI_SHOP:
case SCENE_MIDOS_HOUSE:
case SCENE_KNOW_IT_ALL_BROS_HOUSE:
case SCENE_TWINS_HOUSE:
case SCENE_SARIAS_HOUSE:
return RCAREA_KOKIRI_FOREST;
case SCENE_LOST_WOODS:
return RCAREA_LOST_WOODS;
case SCENE_SACRED_FOREST_MEADOW:
return RCAREA_SACRED_FOREST_MEADOW;
case SCENE_HYRULE_FIELD:
return RCAREA_HYRULE_FIELD;
case SCENE_LAKE_HYLIA:
case SCENE_FISHING_POND:
case SCENE_LAKESIDE_LABORATORY:
return RCAREA_LAKE_HYLIA;
case SCENE_GERUDO_VALLEY:
case SCENE_CARPENTERS_TENT:
return RCAREA_GERUDO_VALLEY;
case SCENE_GERUDOS_FORTRESS:
case SCENE_THIEVES_HIDEOUT:
return RCAREA_GERUDO_FORTRESS;
case SCENE_HAUNTED_WASTELAND:
return RCAREA_WASTELAND;
case SCENE_DESERT_COLOSSUS:
return RCAREA_DESERT_COLOSSUS;
case SCENE_MARKET_ENTRANCE_DAY:
case SCENE_MARKET_ENTRANCE_NIGHT:
case SCENE_MARKET_ENTRANCE_RUINS:
case SCENE_BACK_ALLEY_DAY:
case SCENE_BACK_ALLEY_NIGHT:
case SCENE_BACK_ALLEY_HOUSE:
case SCENE_MARKET_DAY:
case SCENE_MARKET_NIGHT:
case SCENE_MARKET_RUINS:
case SCENE_TEMPLE_OF_TIME_EXTERIOR_DAY:
case SCENE_TEMPLE_OF_TIME_EXTERIOR_NIGHT:
case SCENE_TEMPLE_OF_TIME_EXTERIOR_RUINS:
case SCENE_TREASURE_BOX_SHOP:
case SCENE_BOMBCHU_BOWLING_ALLEY:
case SCENE_DOG_LADY_HOUSE:
case SCENE_MARKET_GUARD_HOUSE:
case SCENE_POTION_SHOP_MARKET:
case SCENE_BOMBCHU_SHOP:
case SCENE_HAPPY_MASK_SHOP:
case SCENE_TEMPLE_OF_TIME:
return RCAREA_MARKET;
case SCENE_HYRULE_CASTLE:
case SCENE_CASTLE_COURTYARD_GUARDS_DAY:
case SCENE_CASTLE_COURTYARD_GUARDS_NIGHT:
case SCENE_CASTLE_COURTYARD_ZELDA:
case SCENE_OUTSIDE_GANONS_CASTLE:
return RCAREA_HYRULE_CASTLE;
case SCENE_KAKARIKO_VILLAGE:
case SCENE_KAKARIKO_CENTER_GUEST_HOUSE:
case SCENE_HOUSE_OF_SKULLTULA:
case SCENE_POTION_SHOP_GRANNY:
case SCENE_IMPAS_HOUSE:
case SCENE_POTION_SHOP_KAKARIKO:
case SCENE_TEST01:
return RCAREA_KAKARIKO_VILLAGE;
case SCENE_GRAVEYARD:
case SCENE_ROYAL_FAMILYS_TOMB:
case SCENE_GRAVEKEEPERS_HUT:
return RCAREA_GRAVEYARD;
case SCENE_DEATH_MOUNTAIN_TRAIL:
return RCAREA_DEATH_MOUNTAIN_TRAIL;
case SCENE_GORON_CITY:
case SCENE_GORON_SHOP:
return RCAREA_GORON_CITY;
case SCENE_DEATH_MOUNTAIN_CRATER:
return RCAREA_DEATH_MOUNTAIN_CRATER;
case SCENE_ZORAS_RIVER:
return RCAREA_ZORAS_RIVER;
case SCENE_ZORAS_DOMAIN:
case SCENE_ZORA_SHOP:
return RCAREA_ZORAS_DOMAIN;
case SCENE_ZORAS_FOUNTAIN:
return RCAREA_ZORAS_FOUNTAIN;
case SCENE_LON_LON_RANCH:
case SCENE_LON_LON_BUILDINGS:
case SCENE_STABLE:
return RCAREA_LON_LON_RANCH;
case SCENE_DEKU_TREE:
case SCENE_DEKU_TREE_BOSS:
return RCAREA_DEKU_TREE;
case SCENE_DODONGOS_CAVERN:
case SCENE_DODONGOS_CAVERN_BOSS:
return RCAREA_DODONGOS_CAVERN;
case SCENE_JABU_JABU:
case SCENE_JABU_JABU_BOSS:
return RCAREA_JABU_JABUS_BELLY;
case SCENE_FOREST_TEMPLE:
case SCENE_FOREST_TEMPLE_BOSS:
return RCAREA_FOREST_TEMPLE;
case SCENE_FIRE_TEMPLE:
case SCENE_FIRE_TEMPLE_BOSS:
return RCAREA_FIRE_TEMPLE;
case SCENE_WATER_TEMPLE:
case SCENE_WATER_TEMPLE_BOSS:
return RCAREA_WATER_TEMPLE;
case SCENE_SPIRIT_TEMPLE:
case SCENE_SPIRIT_TEMPLE_BOSS:
return RCAREA_SPIRIT_TEMPLE;
case SCENE_SHADOW_TEMPLE:
case SCENE_SHADOW_TEMPLE_BOSS:
return RCAREA_SHADOW_TEMPLE;
case SCENE_BOTTOM_OF_THE_WELL:
return RCAREA_BOTTOM_OF_THE_WELL;
case SCENE_ICE_CAVERN:
return RCAREA_ICE_CAVERN;
case SCENE_GERUDO_TRAINING_GROUND:
return RCAREA_GERUDO_TRAINING_GROUND;
case SCENE_INSIDE_GANONS_CASTLE:
case SCENE_GANONS_TOWER_COLLAPSE_INTERIOR:
case SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR:
case SCENE_INSIDE_GANONS_CASTLE_COLLAPSE:
case SCENE_GANONS_TOWER:
case SCENE_GANON_BOSS:
return RCAREA_GANONS_CASTLE;
default:
assert(false);
return RCAREA_INVALID;
}
}
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Base, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, std::string&& spoilerName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem,
isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Chest, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_CHEST, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, std::string&& spoilerName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Chest, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_CHEST, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck,
bool isVanillaCompletion_) {
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Chest, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Chest, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_CHEST, scene_, flag_) };
}
Rando::Location Rando::Location::Collectable(
RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
bool isVanillaCompletion_) {
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_CHEST, scene_, flag_) };
}
Rando::Location Rando::Location::Collectable(
RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck,
bool isVanillaCompletion_) {
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, const uint8_t collectFlag_,
SpoilerCollectionCheckGroup collectionCheckGroup,
Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, flag_) };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, collectFlag_),
collectionCheckGroup};
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, flag_) };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, const uint8_t collectFlag_,
SpoilerCollectionCheckGroup collectionCheckGroup,
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_COLLECTABLE, scene_, collectFlag_),
collectionCheckGroup};
return { rc, quest_, checkType_, GetAreaFromScene(scene_), actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck, bool isVanillaCompletion_) {
return { rc, quest_, checkType_, area_, actorId_, scene_, actorParams_, std::move(shortName_), hintKey, vanillaItem, isVanillaCompletion_, collectionCheck };
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Collectable, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey) {
return { rc, quest_, RCTYPE_SKULL_TOKEN, GetAreaFromScene(scene_), ACTOR_EN_SI, scene_, actorParams_, std::move(shortName_), hintKey, RG_GOLD_SKULLTULA_TOKEN, true,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, scene_, flag_) };
}
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_SKULL_TOKEN, area_, LocationType::GSToken, ACTOR_EN_SI, scene_, actorParams_,
flag_, std::move(shortName_), std::move(spoilerName_), hintKey, RG_GOLD_SKULLTULA_TOKEN,
std::move(categories), isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey, const uint8_t skullScene_) {
return { rc, quest_, RCTYPE_SKULL_TOKEN, GetAreaFromScene(scene_), ACTOR_EN_SI, scene_, actorParams_, std::move(shortName_), hintKey, RG_GOLD_SKULLTULA_TOKEN, true,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, skullScene_, flag_) };
}
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_SKULL_TOKEN, area_, LocationType::GSToken, ACTOR_EN_SI, scene_, actorParams_,
flag_, std::move(shortName_), hintKey, RG_GOLD_SKULLTULA_TOKEN,
std::move(categories), isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, scene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, SceneID scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, const RandomizerHintTextKey hintKey, const uint8_t skullScene_) {
return { rc, quest_, RCTYPE_SKULL_TOKEN, area_, ACTOR_EN_SI, scene_, actorParams_, std::move(shortName_), hintKey, RG_GOLD_SKULLTULA_TOKEN, true,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, skullScene_, flag_) };
}
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
std::vector<Category>&& categories, const uint8_t skullScene_,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_SKULL_TOKEN, area_, LocationType::GSToken, ACTOR_EN_SI, scene_, actorParams_,
flag_, std::move(shortName_), std::move(spoilerName_), hintKey, RG_GOLD_SKULLTULA_TOKEN,
std::move(categories), isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, skullScene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_, std::string&& shortName_,
std::string&& spoilerName_) {
return { rc, quest_, RCTYPE_STATIC_HINT, area_, actorId_, scene_, 0x00, std::move(shortName_), std::move(spoilerName_), RHT_NONE, RG_NONE, false };
}
Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
std::vector<Category>&& categories, const uint8_t skullScene_,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_SKULL_TOKEN, area_, LocationType::GSToken, ACTOR_EN_SI, scene_, actorParams_,
flag_, std::move(shortName_), hintKey, RG_GOLD_SKULLTULA_TOKEN,
std::move(categories), isVanillaCompletion_,
SpoilerCollectionCheck(SPOILER_CHK_GOLD_SKULLTULA, skullScene_, flag_),
collectionCheckGroup};
Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, ActorID actorId_, SceneID scene_, std::string&& shortName_) {
return { rc, quest_, RCTYPE_STATIC_HINT, GetAreaFromScene(scene_), actorId_, scene_, 0x00, std::move(shortName_), RHT_NONE, RG_NONE, false };
}
Rando::Location Rando::Location::GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::GrottoScrub, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_, std::string&& shortName_) {
return { rc, quest_, RCTYPE_STATIC_HINT, area_, actorId_, scene_, 0x00, std::move(shortName_), RHT_NONE, RG_NONE, false };
}
Rando::Location Rando::Location::GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_,
const RandomizerHintTextKey hintKey, const RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::GrottoScrub, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
Rando::Location Rando::Location::HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, std::string&& shortName_) {
return { rc, quest_, RCTYPE_GOSSIP_STONE, GetAreaFromScene(scene_), ACTOR_EN_GS, scene_, actorParams_, std::move(shortName_), RHT_NONE, RG_NONE, false };
}
Rando::Location Rando::Location::Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Delayed, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
Rando::Location Rando::Location::Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::Delayed, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
Rando::Location Rando::Location::Reward(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::TempleReward, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
Rando::Location Rando::Location::Reward(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
const RandomizerHintTextKey hintKey,
const RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck,
SpoilerCollectionCheckGroup collectionCheckGroup, bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::TempleReward, actorId_, scene_, actorParams_, flag_,
std::move(shortName_), hintKey, vanillaItem, std::move(categories),
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
uint8_t scene_,
std::string&& shortName_, std::string&& spoilerName_,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::OtherHint, actorId_, scene_, 0x00, 0x00,
std::move(shortName_), std::move(spoilerName_), RHT_NONE, RG_NONE, {}, isVanillaCompletion_};
}
Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
uint8_t scene_,
std::string&& shortName_,
bool isVanillaCompletion_) {
return {rc, quest_, checkType_, area_, LocationType::OtherHint, actorId_, scene_, 0x00, 0x00,
std::move(shortName_), RHT_NONE, RG_NONE, {}, isVanillaCompletion_};
}
Rando::Location Rando::Location::HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_,
std::vector<Category>&& categories, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_GOSSIP_STONE, area_, LocationType::Base, ACTOR_EN_GS, scene_, actorParams_, flag_,
std::move(shortName_), std::move(spoilerName_), RHT_NONE, RG_NONE, std::move(categories),
isVanillaCompletion_};
}
Rando::Location Rando::Location::HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_,
std::vector<Category>&& categories, bool isVanillaCompletion_) {
return {rc, quest_, RCTYPE_GOSSIP_STONE, area_, LocationType::Base, ACTOR_EN_GS, scene_, actorParams_, flag_,
std::move(shortName_), RHT_NONE, RG_NONE, std::move(categories),
isVanillaCompletion_};
Rando::Location Rando::Location::HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, SceneID scene_, int32_t actorParams_, std::string&& shortName_) {
return { rc, quest_, RCTYPE_GOSSIP_STONE, area_, ACTOR_EN_GS, scene_, actorParams_, std::move(shortName_), RHT_NONE, RG_NONE, false };
}

View File

@ -4,7 +4,6 @@
#include <vector>
#include "3drando/spoiler_log.hpp"
#include "3drando/category.hpp"
#include "3drando/hints.hpp"
#include "randomizerTypes.h"
@ -20,17 +19,7 @@ class SpoilerCollectionCheck {
uint16_t flag = 0;
SpoilerCollectionCheck() = default;
SpoilerCollectionCheck(const SpoilerCollectionCheckType type_, const uint8_t scene_, const uint16_t flag_)
: type(type_), scene(scene_), flag(flag_) {
}
static auto None() {
return SpoilerCollectionCheck(SPOILER_CHK_NONE, 0x00, 0x00);
}
static auto AlwaysCollected() {
return SpoilerCollectionCheck(SPOILER_CHK_ALWAYS_COLLECTED, 0x00, 0x00);
}
SpoilerCollectionCheck(const SpoilerCollectionCheckType type_, const uint8_t scene_, const uint16_t flag_) : type(type_), scene(scene_), flag(flag_) {}
static auto ItemGetInf(const uint8_t slot) {
return SpoilerCollectionCheck(SPOILER_CHK_ITEM_GET_INF, 0x00, slot);
@ -52,76 +41,30 @@ class SpoilerCollectionCheck {
return SpoilerCollectionCheck(SPOILER_CHK_CHEST, scene, flag);
}
static auto Fish(const uint8_t flag, const uint8_t scene = SCENE_FISHING_POND) {
return SpoilerCollectionCheck(SPOILER_CHK_FISH, scene, flag);
}
static auto Fishing(const uint8_t bit) {
return SpoilerCollectionCheck(SPOILER_CHK_MINIGAME, 0x00, bit);
}
static auto BigPoePoints() {
return SpoilerCollectionCheck(SPOILER_CHK_POE_POINTS, 0x00, 0x00);
}
static auto Gravedigger(const uint8_t scene, const uint8_t flag) {
return SpoilerCollectionCheck(SPOILER_CHK_GRAVEDIGGER, scene, flag);
}
static auto ShopItem(const uint8_t scene, const uint8_t itemSlot) {
return SpoilerCollectionCheck(SPOILER_CHK_SHOP_ITEM, scene, itemSlot);
}
static auto MasterSword() {
return SpoilerCollectionCheck(SPOILER_CHK_MASTER_SWORD, 0x00, 0x00);
}
static auto RandomizerInf(const uint16_t flag) {
return SpoilerCollectionCheck(SPOILER_CHK_RANDOMIZER_INF, 0x00, flag);
}
};
enum class LocationType {
Base,
Chest,
Collectable,
GSToken,
GrottoScrub,
Delayed,
TempleReward,
HintStone,
OtherHint,
};
class Location {
public:
Location() : rc(RC_UNKNOWN_CHECK), quest(RCQUEST_BOTH), checkType(RCTYPE_STANDARD), area(RCAREA_INVALID),
locationType(LocationType::Base), actorId(ACTOR_ID_MAX), scene(SCENE_ID_MAX), actorParams(0),
flag(0), hintKey(RHT_NONE), vanillaItem(RG_NONE), isVanillaCompletion(false),
collectionCheck(SpoilerCollectionCheck()), collectionCheckGroup(GROUP_NO_GROUP) {}
Location(const RandomizerCheck rc_, const RandomizerCheckQuest quest_, const RandomizerCheckType checkType_,
const RandomizerCheckArea area_, const LocationType locationType_, const ActorID actorId_, const uint8_t scene_,
const int32_t actorParams_, const uint8_t flag_, std::string shortName_, std::string spoilerName_,
const RandomizerHintTextKey hintKey_, const RandomizerGet vanillaItem_, std::vector<Category> categories_,
const bool isVanillaCompletion_ = false, const SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck(),
const SpoilerCollectionCheckGroup collectionCheckGroup_ = GROUP_NO_GROUP)
: rc(rc_), quest(quest_), checkType(checkType_), area(area_), locationType(locationType_), actorId(actorId_),
scene(scene_), actorParams(actorParams_), flag(flag_), shortName(std::move(shortName_)),
spoilerName(std::move(spoilerName_)), hintKey(hintKey_), vanillaItem(vanillaItem_), categories(std::move(categories_)),
isVanillaCompletion(isVanillaCompletion_), collectionCheck(collectionCheck_),
collectionCheckGroup(collectionCheckGroup_) {
}
Location(const RandomizerCheck rc_, const RandomizerCheckQuest quest_, const RandomizerCheckType checkType_,
const RandomizerCheckArea area_, const LocationType locationType_, const ActorID actorId_, const uint8_t scene_,
const int32_t actorParams_, const uint8_t flag_, std::string shortName_,
const RandomizerHintTextKey hintKey_, const RandomizerGet vanillaItem_, std::vector<Category> categories_,
const bool isVanillaCompletion_ = false, const SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck(),
const SpoilerCollectionCheckGroup collectionCheckGroup_ = GROUP_NO_GROUP)
: rc(rc_), quest(quest_), checkType(checkType_), area(area_), locationType(locationType_), actorId(actorId_),
scene(scene_), actorParams(actorParams_), flag(flag_), shortName(shortName_),
spoilerName(SpoilerNameFromShortName(shortName_, area_)), hintKey(hintKey_), vanillaItem(vanillaItem_), categories(std::move(categories_)),
isVanillaCompletion(isVanillaCompletion_), collectionCheck(collectionCheck_),
collectionCheckGroup(collectionCheckGroup_) {}
Location() : rc(RC_UNKNOWN_CHECK), quest(RCQUEST_BOTH), checkType(RCTYPE_STANDARD), area(RCAREA_INVALID), actorId(ACTOR_ID_MAX), scene(SCENE_ID_MAX), actorParams(0),
hintKey(RHT_NONE), vanillaItem(RG_NONE), isVanillaCompletion(false), collectionCheck(SpoilerCollectionCheck()) {}
Location(const RandomizerCheck rc_, const RandomizerCheckQuest quest_, const RandomizerCheckType checkType_, const RandomizerCheckArea area_, const ActorID actorId_,
const SceneID scene_, const int32_t actorParams_, std::string shortName_, std::string spoilerName_, const RandomizerHintTextKey hintKey_,
const RandomizerGet vanillaItem_, const bool isVanillaCompletion_ = false, const SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck())
: rc(rc_), quest(quest_), checkType(checkType_), area(area_), actorId(actorId_),
scene(scene_), actorParams(actorParams_), shortName(std::move(shortName_)),
spoilerName(std::move(spoilerName_)), hintKey(hintKey_), vanillaItem(vanillaItem_),
isVanillaCompletion(isVanillaCompletion_), collectionCheck(collectionCheck_) {}
Location(const RandomizerCheck rc_, const RandomizerCheckQuest quest_, const RandomizerCheckType checkType_, const RandomizerCheckArea area_, const ActorID actorId_,
const SceneID scene_, const int32_t actorParams_, std::string shortName_, const RandomizerHintTextKey hintKey_, const RandomizerGet vanillaItem_,
const bool isVanillaCompletion_ = false, const SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck())
: rc(rc_), quest(quest_), checkType(checkType_), area(area_), actorId(actorId_), scene(scene_), actorParams(actorParams_), shortName(shortName_),
spoilerName(SpoilerNameFromShortName(shortName_, area_)), hintKey(hintKey_), vanillaItem(vanillaItem_), isVanillaCompletion(isVanillaCompletion_),
collectionCheck(collectionCheck_) {}
static std::string SpoilerNameFromShortName(std::string shortName, RandomizerCheckArea area) {
if (area < 0 || area >= RCAREA_INVALID) {
@ -132,20 +75,16 @@ class Location {
RandomizerCheck GetRandomizerCheck() const;
SpoilerCollectionCheck GetCollectionCheck() const;
SpoilerCollectionCheckGroup GetCollectionCheckGroup() const;
RandomizerCheckQuest GetQuest() const;
RandomizerCheckArea GetArea() const;
RandomizerCheckType GetRCType() const;
ActorID GetActorID() const;
int32_t GetActorParams() const;
SceneID GetScene() const;
uint8_t GetFlag() const;
RandomizerHintTextKey GetHintKey() const;
HintText* GetHint();
const std::string& GetName() const;
const std::string& GetShortName() const;
LocationType GetLocationType() const;
bool IsCategory(Category category) const;
bool IsDungeon() const;
bool IsOverworld() const;
bool IsShop() const;
@ -154,119 +93,53 @@ class Location {
const HintText& GetHint() const;
RandomizerGet GetVanillaItem() const;
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_, std::string&& spoilerName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), bool isVanillaCompletion_ = false);
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
bool isVanillaCompletion_ = false);
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_,
uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), bool isVanillaCompletion_ = false);
static Location
Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Base(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), bool isVanillaCompletion_ = false);
static Location
Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, bool isVanillaCompletion_ = false);
static Location
Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck,
bool isVanillaCompletion_ = false);
static Location
Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck,
bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories, uint8_t collectFlag_,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories, uint8_t collectFlag_,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, ActorID actorId_, SceneID scene_, int32_t actorParams_,
std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
SceneID scene_, int32_t actorParams_, std::string&& shortName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), bool isVanillaCompletion_ = false);
static Location
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location
GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = true);
static Location
GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, std::vector<Category>&& categories,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = true);
static Location GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey);
/// @brief For certain scenes, the sceneId and the "Scene" in spoiler collection check later used to check the
/// GS flags don't necessarily match. Use this constructor (or the next one) for those. scene_ should be the actual scene where
@ -274,117 +147,45 @@ class Location {
/// and expected that these don't always match, and the naming is a holdover from 3drando.
/// @param rc
/// @param quest_
/// @param area_
/// @param scene_
/// @param actorParams_
/// @param flag_
/// @param shortName_
/// @param spoilerName_
/// @param hintKey
/// @param categories
/// @param collectionCheckGroup
/// @param skullScene_
/// @param isVanillaCompletion_
/// @return
static Location
GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, std::vector<Category>&& categories,
uint8_t skullScene_,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = true);
static Location GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, uint8_t skullScene_);
static Location
GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, std::vector<Category>&& categories,
uint8_t skullScene_,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = true);
static Location GSToken(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, SceneID scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey, uint8_t skullScene_);
static Location
GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, std::string&& spoilerName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_, std::string&& shortName_,
std::string&& spoilerName_);
static Location
GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
std::string&& shortName_, RandomizerHintTextKey hintKey,
RandomizerGet vanillaItem, std::vector<Category>&& categories,
SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, ActorID actorId_, SceneID scene_, std::string&& shortName_);
static Location
Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, ActorID actorId_, SceneID scene_, std::string&& shortName_);
static Location
Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
static Location HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, SceneID scene_, int32_t actorParams_, std::string&& shortName_);
static Location
Reward(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP, bool isVanillaCompletion_ = false);
static Location
Reward(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
RandomizerHintTextKey hintKey, RandomizerGet vanillaItem,
std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(),
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP, bool isVanillaCompletion_ = false);
static Location OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
std::string&& shortName_, std::string&& spoilerName_, bool isVanillaCompletion_ = false);
static Location OtherHint(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
std::string&& shortName_, bool isVanillaCompletion_ = false);
static Location HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_, std::string&& spoilerName_,
std::vector<Category>&& categories, bool isVanillaCompletion_ = false);
static Location HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::vector<Category>&& categories, bool isVanillaCompletion_ = false);
static Location HintStone(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckArea area_, SceneID scene_, int32_t actorParams_, std::string&& shortName_);
private:
RandomizerCheck rc;
RandomizerCheckQuest quest;
RandomizerCheckType checkType;
RandomizerCheckArea area;
LocationType locationType;
ActorID actorId;
uint8_t scene;
SceneID scene;
int32_t actorParams;
uint8_t flag;
bool checked = false;
std::string shortName;
std::string spoilerName;
RandomizerHintTextKey hintKey;
RandomizerGet vanillaItem;
std::vector<Category> categories;
bool isVanillaCompletion;
SpoilerCollectionCheck collectionCheck;
SpoilerCollectionCheckGroup collectionCheckGroup;
bool isHintable = false;
};
} // namespace Rando

File diff suppressed because it is too large Load Diff

View File

@ -247,23 +247,25 @@ typedef enum {
RCTYPE_COW, // Cows
RCTYPE_ADULT_TRADE, // Adult trade quest checks
RCTYPE_FROG_SONG, // Frog song purple rupee checks
RCTYPE_MAP_COMPASS, // Maps/Compasses
RCTYPE_MAP, // Maps
RCTYPE_COMPASS, // Compasses
RCTYPE_SMALL_KEY, // Small Keys
RCTYPE_GF_KEY, // Gerudo Fortress Keys
RCTYPE_BOSS_KEY, // Boss Keys
RCTYPE_GANON_BOSS_KEY, // Ganon's boss key
RCTYPE_SHOP, // shops
RCTYPE_SCRUB, // scrubs
RCTYPE_MERCHANT, // merchants
RCTYPE_SHOP, // Shops
RCTYPE_SCRUB, // Scrubs
RCTYPE_MERCHANT, // Merchants
RCTYPE_CHEST_GAME, // RANDOTODO replace this once we implement it, just using it to exclude for now
RCTYPE_LINKS_POCKET, // RANDOTODO this feels hacky, replace with better starting items
RCTYPE_GOSSIP_STONE, // RANDOTODO make these into event access
RCTYPE_STATIC_HINT, // RANDOTODO make these into event access
RCTYPE_SONG_LOCATION, // Song locations
RCTYPE_BOSS_HEART_OR_OTHER_REWARD, // Boss heart container or lesser dungeon rewards (lens, ice arrow)
RCTYPE_DUNGEON_REWARD, // Dungeon rewards (blue warps)
RCTYPE_OCARINA, // Ocarina locations
RCTYPE_BEEHIVE, // Beehives
RCTYPE_FISH,
RCTYPE_FISH, // Fishes
} RandomizerCheckType;
typedef enum { RCQUEST_VANILLA, RCQUEST_MQ, RCQUEST_BOTH } RandomizerCheckQuest;
@ -3651,17 +3653,21 @@ typedef enum {
RSG_LOGIC,
RSG_EXCLUDES_KOKIRI_FOREST,
RSG_EXCLUDES_LOST_WOODS,
RSG_EXCLUDES_SACRED_FOREST_MEADOW,
RSG_EXCLUDES_DEKU_TREE,
RSG_EXCLUDES_FOREST_TEMPLE,
RSG_EXCLUDES_KAKARIKO_VILLAGE,
RSG_EXCLUDES_GRAVEYARD,
RSG_EXCLUDES_BOTTOM_OF_THE_WELL,
RSG_EXCLUDES_SHADOW_TEMPLE,
RSG_EXCLUDES_DEATH_MOUNTAIN,
RSG_EXCLUDES_DEATH_MOUNTAIN_TRAIL,
RSG_EXCLUDES_DEATH_MOUNTAIN_CRATER,
RSG_EXCLUDES_GORON_CITY,
RSG_EXCLUDES_DODONGOS_CAVERN,
RSG_EXCLUDES_FIRE_TEMPLE,
RSG_EXCLUDES_ZORAS_RIVER,
RSG_EXCLUDES_ZORAS_DOMAIN,
RSG_EXCLUDES_ZORAS_FOUNTAIN,
RSG_EXCLUDES_JABU_JABU,
RSG_EXCLUDES_ICE_CAVERN,
RSG_EXCLUDES_HYRULE_FIELD,
@ -3669,9 +3675,13 @@ typedef enum {
RSG_EXCLUDES_LAKE_HYLIA,
RSG_EXCLUDES_WATER_TEMPLE,
RSG_EXCLUDES_GERUDO_VALLEY,
RSG_EXCLUDES_GERUDO_FORTRESS,
RSG_EXCLUDES_HAUNTED_WASTELAND,
RSG_EXCLUDES_DESERT_COLOSSUS,
RSG_EXCLUDES_GERUDO_TRAINING_GROUNDS,
RSG_EXCLUDES_SPIRIT_TEMPLE,
RSG_EXCLUDES_HYRULE_CASTLE,
RSG_EXCLUDES_MARKET,
RSG_EXCLUDES_GANONS_CASTLE,
RSG_EXCLUDES,
RSG_TRICKS,

View File

@ -143,8 +143,8 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
(location.GetRCType() != RCTYPE_OCARINA ||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_NO)) && // ocarina locations
(location.GetRandomizerCheck() != RC_HC_ZELDAS_LETTER) && // don't show until we support shuffling letter
(location.GetRCType() !=
RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?)
(location.GetRCType() != RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?)
(location.GetRCType() != RCTYPE_STATIC_HINT) && // don't show static hints
(location.GetRCType() != RCTYPE_LINKS_POCKET) && // links pocket can be set to nothing if needed
(location.GetRCType() !=
RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them
@ -169,7 +169,7 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), RO_GENERIC_NO)) &&
(location.GetRCType() != RCTYPE_FROG_SONG ||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), RO_GENERIC_NO)) &&
(location.GetRCType() != RCTYPE_MAP_COMPASS ||
((location.GetRCType() != RCTYPE_MAP && location.GetRCType() != RCTYPE_COMPASS) ||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) !=
RO_DUNGEON_ITEM_LOC_VANILLA) &&
(location.GetRCType() != RCTYPE_SMALL_KEY ||

View File

@ -734,11 +734,7 @@ void CheckTrackerFlagSet(int16_t flagType, int32_t flag) {
}
Rando::SpoilerCollectionCheck scCheck = loc.GetCollectionCheck();
SpoilerCollectionCheckType scCheckType = scCheck.type;
if (checkMatchType == SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF &&
(scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_SHOP_ITEM ||
scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_FISH ||
scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_MASTER_SWORD ||
scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF)) {
if (checkMatchType == SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF && scCheckType == SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF) {
if (flag == OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(loc.GetRandomizerCheck())) {
SetCheckCollected(loc.GetRandomizerCheck());
return;
@ -1225,6 +1221,7 @@ bool IsCheckShuffled(RandomizerCheck rc) {
return
(loc->GetArea() != RCAREA_INVALID) && // don't show Invalid locations
(loc->GetRCType() != RCTYPE_GOSSIP_STONE) && //TODO: Don't show hints until tracker supports them
(loc->GetRCType() != RCTYPE_STATIC_HINT) && //TODO: Don't show hints until tracker supports them
(loc->GetRCType() != RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them
(rc != RC_HC_ZELDAS_LETTER) && // don't show zeldas letter until we support shuffling it
(rc != RC_LINKS_POCKET || showLinksPocket) &&
@ -1262,7 +1259,7 @@ bool IsCheckShuffled(RandomizerCheck rc) {
(rc != RC_ZR_MAGIC_BEAN_SALESMAN || showBeans) &&
(rc != RC_HC_MALON_EGG || showWeirdEgg) &&
(loc->GetRCType() != RCTYPE_FROG_SONG || showFrogSongRupees) &&
(loc->GetRCType() != RCTYPE_MAP_COMPASS || showStartingMapsCompasses) &&
((loc->GetRCType() != RCTYPE_MAP && loc->GetRCType() != RCTYPE_COMPASS) || showStartingMapsCompasses) &&
(loc->GetRCType() != RCTYPE_SMALL_KEY || showKeysanity) &&
(loc->GetRCType() != RCTYPE_BOSS_KEY || showBossKeysanity) &&
(loc->GetRCType() != RCTYPE_GANON_BOSS_KEY || showGanonBossKey) &&

View File

@ -36,7 +36,7 @@ std::vector<std::string> MultiVecOpts(const std::vector<std::vector<std::string>
return options;
}
Settings::Settings() : mExcludeLocationsOptionsGroups(SPOILER_COLLECTION_GROUP_COUNT) {
Settings::Settings() : mExcludeLocationsOptionsAreas(RCAREA_INVALID) {
}
void Settings::CreateOptions() {
@ -217,7 +217,7 @@ void Settings::CreateOptions() {
mOptions[RSK_DAMAGE_MULTIPLIER] = Option::U8("Damage Multiplier", {"x1/2", "x1", "x2", "x4", "x8", "x16", "OHKO"}, OptionCategory::Setting, "", "", WidgetType::Slider, RO_DAMAGE_MULTIPLIER_DEFAULT);
// clang-format on
mExcludeLocationsOptionsGroups.reserve(SPOILER_COLLECTION_GROUP_COUNT);
mExcludeLocationsOptionsAreas.reserve(RCAREA_INVALID);
mTrickOptions[RT_ACUTE_ANGLE_CLIP] = TrickOption::LogicTrick(RCQUEST_BOTH, RA_NONE, {Tricks::Tag::ADVANCED}, true, "Acute angle clip", "Enables locations requiring jumpslash clips through walls which meet at an acute angle.");
mTrickOptions[RT_ADVANCED_CLIPS] = TrickOption::LogicTrick(RCQUEST_BOTH, RA_NONE, {Tricks::Tag::ADVANCED}, true, "Advanced clips", "Enables locations requiring clips through walls and objects requiring precise jumps or other tricks.");
@ -1007,44 +1007,56 @@ void Settings::CreateOptions() {
&mOptions[RSK_ICE_TRAPS]
}));
// TODO: Progressive Goron Sword, Remove Double Defense
mOptionGroups[RSG_EXCLUDES_KOKIRI_FOREST] = OptionGroup::SubGroup("Kokiri Forest", mExcludeLocationsOptionsGroups[GROUP_KOKIRI_FOREST], false);
mOptionGroups[RSG_EXCLUDES_LOST_WOODS] = OptionGroup::SubGroup("Lost Woods", mExcludeLocationsOptionsGroups[GROUP_LOST_WOODS], false);
mOptionGroups[RSG_EXCLUDES_DEKU_TREE] = OptionGroup::SubGroup("Deku Tree", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_DEKU_TREE], false);
mOptionGroups[RSG_EXCLUDES_FOREST_TEMPLE] = OptionGroup::SubGroup("Forest Temple", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_FOREST_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_KAKARIKO_VILLAGE] = OptionGroup::SubGroup("Kakariko Village", mExcludeLocationsOptionsGroups[GROUP_KAKARIKO], false);
mOptionGroups[RSG_EXCLUDES_BOTTOM_OF_THE_WELL] = OptionGroup::SubGroup("Bottom of the Well", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_BOTTOM_OF_THE_WELL], false);
mOptionGroups[RSG_EXCLUDES_SHADOW_TEMPLE] = OptionGroup::SubGroup("Shadow Temple", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_SHADOW_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN] = OptionGroup::SubGroup("Death Mountain", mExcludeLocationsOptionsGroups[GROUP_DEATH_MOUNTAIN], false);
mOptionGroups[RSG_EXCLUDES_GORON_CITY] = OptionGroup::SubGroup("Goron City", mExcludeLocationsOptionsGroups[GROUP_GORON_CITY], false);
mOptionGroups[RSG_EXCLUDES_DODONGOS_CAVERN] = OptionGroup::SubGroup("Dodongo's Cavern", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_DODONGOS_CAVERN], false);
mOptionGroups[RSG_EXCLUDES_FIRE_TEMPLE] = OptionGroup::SubGroup("Fire Temple", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_FIRE_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_ZORAS_RIVER] = OptionGroup::SubGroup("Zora's River", mExcludeLocationsOptionsGroups[GROUP_ZORAS_RIVER], false);
mOptionGroups[RSG_EXCLUDES_ZORAS_DOMAIN] = OptionGroup::SubGroup("Zora's Domain", mExcludeLocationsOptionsGroups[GROUP_ZORAS_DOMAIN], false);
mOptionGroups[RSG_EXCLUDES_JABU_JABU] = OptionGroup::SubGroup("Jabu Jabu's Belly", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_JABUJABUS_BELLY], false);
mOptionGroups[RSG_EXCLUDES_ICE_CAVERN] = OptionGroup::SubGroup("Ice Cavern", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_ICE_CAVERN], false);
mOptionGroups[RSG_EXCLUDES_HYRULE_FIELD] = OptionGroup::SubGroup("Hyrule Field", mExcludeLocationsOptionsGroups[GROUP_HYRULE_FIELD], false);
mOptionGroups[RSG_EXCLUDES_LON_LON_RANCH] = OptionGroup::SubGroup("Lon Lon Ranch", mExcludeLocationsOptionsGroups[GROUP_LON_LON_RANCH], false);
mOptionGroups[RSG_EXCLUDES_LAKE_HYLIA] = OptionGroup::SubGroup("Lake Hylia", mExcludeLocationsOptionsGroups[GROUP_LAKE_HYLIA], false);
mOptionGroups[RSG_EXCLUDES_WATER_TEMPLE] = OptionGroup::SubGroup("Water Temple", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_WATER_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_GERUDO_VALLEY] = OptionGroup::SubGroup("Gerudo Valley", mExcludeLocationsOptionsGroups[GROUP_GERUDO_VALLEY], false);
mOptionGroups[RSG_EXCLUDES_GERUDO_TRAINING_GROUNDS] = OptionGroup::SubGroup("Gerudo Training Grounds", mExcludeLocationsOptionsGroups[GROUP_GERUDO_TRAINING_GROUND], false);
mOptionGroups[RSG_EXCLUDES_SPIRIT_TEMPLE] = OptionGroup::SubGroup("Spirit Temple", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_SPIRIT_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_HYRULE_CASTLE] = OptionGroup::SubGroup("Hyrule Castle", mExcludeLocationsOptionsGroups[GROUP_HYRULE_CASTLE], false);
mOptionGroups[RSG_EXCLUDES_GANONS_CASTLE] = OptionGroup::SubGroup("Ganon's Castle", mExcludeLocationsOptionsGroups[GROUP_DUNGEON_GANONS_CASTLE], false);
mOptionGroups[RSG_EXCLUDES_KOKIRI_FOREST] = OptionGroup::SubGroup("Kokiri Forest", mExcludeLocationsOptionsAreas[RCAREA_KOKIRI_FOREST], false);
mOptionGroups[RSG_EXCLUDES_LOST_WOODS] = OptionGroup::SubGroup("Lost Woods", mExcludeLocationsOptionsAreas[RCAREA_LOST_WOODS], false);
mOptionGroups[RSG_EXCLUDES_SACRED_FOREST_MEADOW] = OptionGroup::SubGroup("Sacred Forest Meadow", mExcludeLocationsOptionsAreas[RCAREA_SACRED_FOREST_MEADOW], false);
mOptionGroups[RSG_EXCLUDES_DEKU_TREE] = OptionGroup::SubGroup("Deku Tree", mExcludeLocationsOptionsAreas[RCAREA_DEKU_TREE], false);
mOptionGroups[RSG_EXCLUDES_FOREST_TEMPLE] = OptionGroup::SubGroup("Forest Temple", mExcludeLocationsOptionsAreas[RCAREA_FOREST_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_KAKARIKO_VILLAGE] = OptionGroup::SubGroup("Kakariko Village", mExcludeLocationsOptionsAreas[RCAREA_KAKARIKO_VILLAGE], false);
mOptionGroups[RSG_EXCLUDES_GRAVEYARD] = OptionGroup::SubGroup("Graveyard", mExcludeLocationsOptionsAreas[RCAREA_GRAVEYARD], false);
mOptionGroups[RSG_EXCLUDES_BOTTOM_OF_THE_WELL] = OptionGroup::SubGroup("Bottom of the Well", mExcludeLocationsOptionsAreas[RCAREA_BOTTOM_OF_THE_WELL], false);
mOptionGroups[RSG_EXCLUDES_SHADOW_TEMPLE] = OptionGroup::SubGroup("Shadow Temple", mExcludeLocationsOptionsAreas[RCAREA_SHADOW_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN_TRAIL] = OptionGroup::SubGroup("Death Mountain Trail", mExcludeLocationsOptionsAreas[RCAREA_DEATH_MOUNTAIN_TRAIL], false);
mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN_CRATER] = OptionGroup::SubGroup("Death Mountain Crater", mExcludeLocationsOptionsAreas[RCAREA_DEATH_MOUNTAIN_CRATER], false);
mOptionGroups[RSG_EXCLUDES_GORON_CITY] = OptionGroup::SubGroup("Goron City", mExcludeLocationsOptionsAreas[RCAREA_GORON_CITY], false);
mOptionGroups[RSG_EXCLUDES_DODONGOS_CAVERN] = OptionGroup::SubGroup("Dodongo's Cavern", mExcludeLocationsOptionsAreas[RCAREA_DODONGOS_CAVERN], false);
mOptionGroups[RSG_EXCLUDES_FIRE_TEMPLE] = OptionGroup::SubGroup("Fire Temple", mExcludeLocationsOptionsAreas[RCAREA_FIRE_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_ZORAS_RIVER] = OptionGroup::SubGroup("Zora's River", mExcludeLocationsOptionsAreas[RCAREA_ZORAS_RIVER], false);
mOptionGroups[RSG_EXCLUDES_ZORAS_DOMAIN] = OptionGroup::SubGroup("Zora's Domain", mExcludeLocationsOptionsAreas[RCAREA_ZORAS_DOMAIN], false);
mOptionGroups[RSG_EXCLUDES_ZORAS_FOUNTAIN] = OptionGroup::SubGroup("Zora's Fountain", mExcludeLocationsOptionsAreas[RCAREA_ZORAS_FOUNTAIN], false);
mOptionGroups[RSG_EXCLUDES_JABU_JABU] = OptionGroup::SubGroup("Jabu Jabu's Belly", mExcludeLocationsOptionsAreas[RCAREA_JABU_JABUS_BELLY], false);
mOptionGroups[RSG_EXCLUDES_ICE_CAVERN] = OptionGroup::SubGroup("Ice Cavern", mExcludeLocationsOptionsAreas[RCAREA_ICE_CAVERN], false);
mOptionGroups[RSG_EXCLUDES_HYRULE_FIELD] = OptionGroup::SubGroup("Hyrule Field", mExcludeLocationsOptionsAreas[RCAREA_HYRULE_FIELD], false);
mOptionGroups[RSG_EXCLUDES_LON_LON_RANCH] = OptionGroup::SubGroup("Lon Lon Ranch", mExcludeLocationsOptionsAreas[RCAREA_LON_LON_RANCH], false);
mOptionGroups[RSG_EXCLUDES_LAKE_HYLIA] = OptionGroup::SubGroup("Lake Hylia", mExcludeLocationsOptionsAreas[RCAREA_LAKE_HYLIA], false);
mOptionGroups[RSG_EXCLUDES_WATER_TEMPLE] = OptionGroup::SubGroup("Water Temple", mExcludeLocationsOptionsAreas[RCAREA_WATER_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_GERUDO_VALLEY] = OptionGroup::SubGroup("Gerudo Valley", mExcludeLocationsOptionsAreas[RCAREA_GERUDO_VALLEY], false);
mOptionGroups[RSG_EXCLUDES_GERUDO_FORTRESS] = OptionGroup::SubGroup("Gerudo Fortress", mExcludeLocationsOptionsAreas[RCAREA_GERUDO_FORTRESS], false);
mOptionGroups[RSG_EXCLUDES_HAUNTED_WASTELAND] = OptionGroup::SubGroup("Haunted Wasteland", mExcludeLocationsOptionsAreas[RCAREA_WASTELAND], false);
mOptionGroups[RSG_EXCLUDES_DESERT_COLOSSUS] = OptionGroup::SubGroup("Desert Colossus", mExcludeLocationsOptionsAreas[RCAREA_DESERT_COLOSSUS], false);
mOptionGroups[RSG_EXCLUDES_GERUDO_TRAINING_GROUNDS] = OptionGroup::SubGroup("Gerudo Training Grounds", mExcludeLocationsOptionsAreas[RCAREA_GERUDO_TRAINING_GROUND], false);
mOptionGroups[RSG_EXCLUDES_SPIRIT_TEMPLE] = OptionGroup::SubGroup("Spirit Temple", mExcludeLocationsOptionsAreas[RCAREA_SPIRIT_TEMPLE], false);
mOptionGroups[RSG_EXCLUDES_HYRULE_CASTLE] = OptionGroup::SubGroup("Hyrule Castle", mExcludeLocationsOptionsAreas[RCAREA_HYRULE_CASTLE], false);
mOptionGroups[RSG_EXCLUDES_MARKET] = OptionGroup::SubGroup("Market", mExcludeLocationsOptionsAreas[RCAREA_MARKET], false);
mOptionGroups[RSG_EXCLUDES_GANONS_CASTLE] = OptionGroup::SubGroup("Ganon's Castle", mExcludeLocationsOptionsAreas[RCAREA_GANONS_CASTLE], false);
mOptionGroups[RSG_EXCLUDES] = OptionGroup::SubGroup("Exclude Locations", {
&mOptionGroups[RSG_EXCLUDES_KOKIRI_FOREST],
&mOptionGroups[RSG_EXCLUDES_LOST_WOODS],
&mOptionGroups[RSG_EXCLUDES_SACRED_FOREST_MEADOW],
&mOptionGroups[RSG_EXCLUDES_DEKU_TREE],
&mOptionGroups[RSG_EXCLUDES_FOREST_TEMPLE],
&mOptionGroups[RSG_EXCLUDES_KAKARIKO_VILLAGE],
&mOptionGroups[RSG_EXCLUDES_GRAVEYARD],
&mOptionGroups[RSG_EXCLUDES_BOTTOM_OF_THE_WELL],
&mOptionGroups[RSG_EXCLUDES_SHADOW_TEMPLE],
&mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN],
&mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN_TRAIL],
&mOptionGroups[RSG_EXCLUDES_DEATH_MOUNTAIN_CRATER],
&mOptionGroups[RSG_EXCLUDES_GORON_CITY],
&mOptionGroups[RSG_EXCLUDES_DODONGOS_CAVERN],
&mOptionGroups[RSG_EXCLUDES_FIRE_TEMPLE],
&mOptionGroups[RSG_EXCLUDES_ZORAS_RIVER],
&mOptionGroups[RSG_EXCLUDES_ZORAS_DOMAIN],
&mOptionGroups[RSG_EXCLUDES_ZORAS_FOUNTAIN],
&mOptionGroups[RSG_EXCLUDES_JABU_JABU],
&mOptionGroups[RSG_EXCLUDES_ICE_CAVERN],
&mOptionGroups[RSG_EXCLUDES_HYRULE_FIELD],
@ -1052,9 +1064,13 @@ void Settings::CreateOptions() {
&mOptionGroups[RSG_EXCLUDES_LAKE_HYLIA],
&mOptionGroups[RSG_EXCLUDES_WATER_TEMPLE],
&mOptionGroups[RSG_EXCLUDES_GERUDO_VALLEY],
&mOptionGroups[RSG_EXCLUDES_GERUDO_FORTRESS],
&mOptionGroups[RSG_EXCLUDES_HAUNTED_WASTELAND],
&mOptionGroups[RSG_EXCLUDES_DESERT_COLOSSUS],
&mOptionGroups[RSG_EXCLUDES_GERUDO_TRAINING_GROUNDS],
&mOptionGroups[RSG_EXCLUDES_SPIRIT_TEMPLE],
&mOptionGroups[RSG_EXCLUDES_HYRULE_CASTLE],
&mOptionGroups[RSG_EXCLUDES_MARKET],
&mOptionGroups[RSG_EXCLUDES_GANONS_CASTLE],
}, false);
mOptionGroups[RSG_DETAILED_LOGIC] = OptionGroup("Detailed Logic Settings", {
@ -1267,12 +1283,12 @@ const std::array<Option, RSK_MAX>& Settings::GetAllOptions() const {
return mOptions;
}
std::vector<Option *>& Settings::GetExcludeOptionsForGroup(const SpoilerCollectionCheckGroup group) {
return mExcludeLocationsOptionsGroups[group];
std::vector<Option *>& Settings::GetExcludeOptionsForArea(const RandomizerCheckArea area) {
return mExcludeLocationsOptionsAreas[area];
}
const std::vector<std::vector<Option *>>& Settings::GetExcludeLocationsOptions() const {
return mExcludeLocationsOptionsGroups;
return mExcludeLocationsOptionsAreas;
}
RandoOptionStartingAge Settings::ResolvedStartingAge() const {

View File

@ -50,12 +50,12 @@ class Settings {
/**
* @brief Get a list of Location Exclude `Option`s for the given
* SpoilerCollectionCheckGroup
* RandomizerCheckArea
*
* @param group
* @return std::vector<Option*>&
*/
std::vector<Option*>& GetExcludeOptionsForGroup(SpoilerCollectionCheckGroup group);
std::vector<Option*>& GetExcludeOptionsForArea(RandomizerCheckArea area);
/**
* @brief Get a reference to all of the Exclude Location `Option` lists.
@ -185,7 +185,7 @@ class Settings {
std::array<std::string, RSK_MAX> mOptionDescriptions = {};
std::array<OptionGroup, RSG_MAX> mOptionGroups = {};
std::array<TrickOption, RT_MAX> mTrickOptions = {};
std::vector<std::vector<Option*>> mExcludeLocationsOptionsGroups = {};
std::vector<std::vector<Option*>> mExcludeLocationsOptionsAreas = {};
std::unordered_map<std::string, RandomizerSettingKey> mSpoilerfileSettingNameToEnum;
RandoOptionStartingAge mResolvedStartingAge = RO_AGE_CHILD;
RandoOptionLACSCondition mLACSCondition = RO_LACS_VANILLA;

View File

@ -35,14 +35,14 @@ class StaticData {
static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, CustomMessage> input);
static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input);
static std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap;
static std::vector<RandomizerCheck> overworldLocations;
static std::vector<RandomizerCheck> GetOverworldLocations();
static std::vector<RandomizerCheck> dungeonRewardLocations;
static std::vector<std::vector<RandomizerCheck>> shopLocationLists;
static std::vector<RandomizerCheck> scrubLocations;
static std::vector<RandomizerCheck> gossipStoneLocations;
static std::vector<RandomizerCheck> staticHintLocations;
static std::vector<RandomizerCheck> pondFishLocations;
static std::vector<RandomizerCheck> overworldFishLocations;
static std::vector<RandomizerCheck> GetShopLocations();
static std::vector<RandomizerCheck> GetScrubLocations();
static std::vector<RandomizerCheck> GetGossipStoneLocations();
static std::vector<RandomizerCheck> GetStaticHintLocations();
static std::vector<RandomizerCheck> GetPondFishLocations();
static std::vector<RandomizerCheck> GetOverworldFishLocations();
static std::array<std::pair<RandomizerCheck, RandomizerCheck>, 17> randomizerFishingPondFish;
static std::unordered_map<int8_t, RandomizerCheck> randomizerGrottoFishMap;
static std::vector<RandomizerHint> oldVerHintOrder;