This commit is contained in:
Pepe20129 2024-04-12 19:31:15 +00:00 committed by GitHub
commit df86c14e4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1152 additions and 838 deletions

View File

@ -108,6 +108,17 @@ Rando::Location Rando::Location::Base(RandomizerCheck rc, RandomizerCheckQuest q
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
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::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -121,6 +132,19 @@ Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest
collectionCheckGroup};
}
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::Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_,
int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -133,6 +157,18 @@ Rando::Location Rando::Location::Chest(RandomizerCheck rc, RandomizerCheckQuest
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
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::Collectable(
RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -145,6 +181,18 @@ Rando::Location Rando::Location::Collectable(
collectionCheckGroup};
}
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::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -160,6 +208,21 @@ Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheck
collectionCheckGroup};
}
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,
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};
}
Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -173,6 +236,19 @@ Rando::Location Rando::Location::Collectable(RandomizerCheck rc, RandomizerCheck
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
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_, RandomizerCheckArea area_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
@ -185,6 +261,18 @@ Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQues
collectionCheckGroup};
}
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_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
std::string&& spoilerName_, const RandomizerHintTextKey hintKey,
@ -197,6 +285,18 @@ Rando::Location Rando::Location::GSToken(RandomizerCheck rc, RandomizerCheckQues
collectionCheckGroup};
}
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::GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -210,6 +310,19 @@ Rando::Location Rando::Location::GrottoScrub(RandomizerCheck rc, RandomizerCheck
isVanillaCompletion_, collectionCheck, collectionCheckGroup};
}
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::Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_,
RandomizerCheckType checkType_, RandomizerCheckArea area_, ActorID actorId_,
uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -222,6 +335,18 @@ Rando::Location Rando::Location::Delayed(RandomizerCheck rc, RandomizerCheckQues
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_,
@ -234,6 +359,18 @@ Rando::Location Rando::Location::Reward(RandomizerCheck rc, RandomizerCheckQuest
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_,
@ -243,6 +380,15 @@ Rando::Location Rando::Location::OtherHint(RandomizerCheck rc, RandomizerCheckQu
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_,
@ -251,3 +397,12 @@ Rando::Location Rando::Location::HintStone(RandomizerCheck rc, RandomizerCheckQu
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_};
}

View File

@ -10,6 +10,7 @@
#include "randomizerTypes.h"
#include "z64actor_enum.h"
#include "z64scene.h"
#include "../../util.h"
namespace Rando {
class SpoilerCollectionCheck {
@ -130,6 +131,24 @@ class Location {
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_) {}
static std::string SpoilerNameFromShortName(std::string shortName, RandomizerCheckArea area) {
if (area < 0 || area >= RCAREA_INVALID) {
return shortName;
}
return SohUtils::GetRandomizerCheckAreaPrefix(area) + " " + shortName;
}
RandomizerCheck GetRandomizerCheck() const;
SpoilerCollectionCheck GetCollectionCheck() const;
@ -164,6 +183,15 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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
Chest(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -172,6 +200,14 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -180,6 +216,14 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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
Collectable(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -188,6 +232,14 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -196,6 +248,14 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -205,6 +265,15 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
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_,
@ -212,8 +281,15 @@ class Location {
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);
/// @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 for those. scene_ should be the actual scene where
/// GS flags don't necessarily match. Use this constructor (or the next one) for those. scene_ should be the actual scene where
/// the GS is located, skullScene_ is the value passed to GET_GS_FLAGS to get the correct skulltula. It is normal
/// and expected that these don't always match, and the naming is a holdover from 3drando.
/// @param rc
@ -238,6 +314,14 @@ class Location {
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,
uint8_t skullScene_,
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = true);
static Location
GrottoScrub(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_,
RandomizerCheckArea area_, ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_,
@ -247,6 +331,15 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
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
Delayed(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -255,6 +348,14 @@ class Location {
SpoilerCollectionCheckGroup collectionCheckGroup = GROUP_NO_GROUP,
bool isVanillaCompletion_ = false);
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
Reward(RandomizerCheck rc, RandomizerCheckQuest quest_, RandomizerCheckType checkType_, RandomizerCheckArea area_,
ActorID actorId_, uint8_t scene_, int32_t actorParams_, uint8_t flag_, std::string&& shortName_,
@ -262,14 +363,29 @@ class Location {
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);
private:
RandomizerCheck rc;
RandomizerCheckQuest quest;

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,8 @@
#include <string.h>
#include <vector>
#include <algorithm>
#include <array>
#include "Enhancements/randomizer/randomizerTypes.h"
std::vector<std::string> sceneNames = {
"Inside the Deku Tree",
@ -303,6 +305,41 @@ std::vector<std::string> questItemNames = {
"Gold Skulltula Token",
};
std::array<std::string, RA_MAX> rcareaPrefixes = {
"KF",
"LW",
"SFM",
"HF",
"LH",
"GV",
"GF",
"Wasteland",
"Colossus",
"Market",
"HC",
"Kak",
"Graveyard",
"DMT",
"GC",
"DMC",
"ZR",
"ZD",
"ZF",
"LLR",
"Deku Tree",
"Dodongos Cavern",
"Jabu Jabus Belly",
"Forest Temple",
"Fire Temple",
"Water Temple",
"Spirit Temple",
"Shadow Temple",
"Bottom of the Well",
"Ice Cavern",
"Gerudo Training Grounds",
"Ganon's Castle",
};
const std::string& SohUtils::GetSceneName(int32_t scene) {
return sceneNames[scene];
}
@ -315,6 +352,10 @@ const std::string& SohUtils::GetQuestItemName(int32_t item) {
return questItemNames[item];
}
const std::string& SohUtils::GetRandomizerCheckAreaPrefix(int32_t rcarea) {
return rcareaPrefixes[rcarea];
}
void SohUtils::CopyStringToCharArray(char* destination, std::string source, size_t size) {
strncpy(destination, source.c_str(), size - 1);
destination[size - 1] = '\0';

View File

@ -9,6 +9,8 @@ namespace SohUtils {
const std::string& GetQuestItemName(int32_t item);
const std::string& GetRandomizerCheckAreaPrefix(int32_t rcarea);
// Copies a string and ensures the destination is null terminated if the source string is larger than size
// Only up to size-1 characters are copied from the source string
void CopyStringToCharArray(char* destination, std::string source, size_t size);