Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/randomizer/RCToRandInf.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "./RCToRandInf.h"
#include "soh/Enhancements/randomizer/randomizerEnums.h"

std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
{ RC_KF_LINKS_HOUSE_COW, RAND_INF_COWS_MILKED_KF_LINKS_HOUSE_COW },
Expand Down Expand Up @@ -2413,6 +2414,7 @@ std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
{ RC_SPIRIT_TEMPLE_MQ_ENTRANCE_EYE_BOULDER, RAND_INF_SPIRIT_TEMPLE_MQ_ENTRANCE_EYE_BOULDER },
{ RC_SPIRIT_TEMPLE_MQ_ENTRANCE_CEILING_BOULDER, RAND_INF_SPIRIT_TEMPLE_MQ_ENTRANCE_CEILING_BOULDER },
{ RC_SPIRIT_TEMPLE_MQ_EARLY_ADULT_BOULDER, RAND_INF_SPIRIT_TEMPLE_MQ_EARLY_ADULT_BOULDER },
{ RC_SPIRIT_TEMPLE_MQ_CRAWLSPACE_BOULDER, RAND_INF_SPIRIT_TEMPLE_MQ_CRAWLSPACE_BOULDER },
{ RC_BOTW_MQ_BOULDER_1, RAND_INF_BOTW_MQ_BOULDER_1 },
{ RC_BOTW_MQ_BOULDER_2, RAND_INF_BOTW_MQ_BOULDER_2 },
{ RC_BOTW_MQ_BOULDER_3, RAND_INF_BOTW_MQ_BOULDER_3 },
Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleBeehives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ static CheckIdentity IdentifyBeehive(s32 sceneNum, s16 xPosition, s32 respawnDat
OTRGlobals::Instance->gRandomizer->GetCheckObjectFromActor(ACTOR_OBJ_COMB, sceneNum, respawnData);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
beehiveIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
beehiveIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
beehiveIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleBeggar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ static CheckIdentity IdentifyBeggar(s32 sceneNum, s32 textId) {
if (location->GetRandomizerCheck() == RC_UNKNOWN_CHECK) {
LUSLOG_WARN("IdentifyBeggar did not receive a valid RC value (%d).", location->GetRandomizerCheck());
} else {
beggarIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
beggarIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
beggarIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleCows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ static CheckIdentity IdentifyCow(s32 sceneNum, s32 posX, s32 posZ) {
OTRGlobals::Instance->gRandomizer->GetCheckObjectFromActor(ACTOR_EN_COW, sceneNum, actorParams);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
cowIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
cowIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
cowIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
14 changes: 12 additions & 2 deletions soh/soh/Enhancements/randomizer/ShuffleCrates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ static CheckIdentity IdentifyCrate(s32 sceneNum, s32 posX, s32 posZ) {
LUSLOG_WARN("IdentifyCrate did not receive a valid RC value (%d).", location->GetRandomizerCheck());
assert(false);
} else {
crateIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
crateIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
crateIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand All @@ -235,7 +240,12 @@ static CheckIdentity IdentifySmallCrate(s32 sceneNum, s32 posX, s32 posZ) {
LUSLOG_WARN("IdentifyCrate did not receive a valid RC value (%d).", location->GetRandomizerCheck());
assert(false);
} else {
smallCrateIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
smallCrateIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
smallCrateIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleGrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ static CheckIdentity IdentifyGrass(s32 sceneNum, s32 posX, s32 posZ, s32 respawn
OTRGlobals::Instance->gRandomizer->GetCheckObjectFromActor(ACTOR_EN_KUSA, sceneNum, respawnData);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
grassIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
grassIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
grassIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleIcicles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ static CheckIdentity IdentifyIcicle(s32 sceneNum, s32 posX, s32 posZ) {
LUSLOG_WARN("IdentifyIcicle did not receive a valid RC value (%d).", location->GetRandomizerCheck());
assert(false);
} else {
icicleIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
icicleIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
icicleIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShufflePots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ static CheckIdentity IdentifyPot(s32 sceneNum, s32 posX, s32 posZ) {
if (location->GetRandomizerCheck() == RC_UNKNOWN_CHECK) {
LUSLOG_WARN("IdentifyPot did not receive a valid RC value (%d).", location->GetRandomizerCheck());
} else {
potIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
potIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
potIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleRedIce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ static CheckIdentity IdentifyRedIce(s32 sceneNum, s32 posX, s32 posZ) {
LUSLOG_WARN("IdentifyRedIce did not receive a valid RC value (%d).", location->GetRandomizerCheck());
assert(false);
} else {
redIceIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
redIceIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
redIceIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
8 changes: 7 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleRocks.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "ShuffleRocks.h"
#include "libultraship/log/luslog.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "static_data.h"
#include "soh/ObjectExtension/ObjectExtension.h"
Expand Down Expand Up @@ -217,7 +218,12 @@ static CheckIdentity IdentifyRock(s32 sceneNum, s32 posX, s32 posZ) {
ACTOR_EN_ISHI, sceneNum, TWO_ACTOR_PARAMS(posX, posZ));

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
rockIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
rockIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
rockIdentity.randomizerCheck = location->GetRandomizerCheck();
} else {
LUSLOG_WARN("IdentifyRock did not receive a valid RC value %d,%d.", posX, posZ);
Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleSigns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ static CheckIdentity IdentifySign(s32 sceneNum, s32 posX, s32 posZ, s32 id) {
if (location == nullptr || location->GetRandomizerCheck() == RC_UNKNOWN_CHECK) {
LUSLOG_WARN("IdentifySign did not receive a valid RC value (%d).", location->GetRandomizerCheck());
} else {
signIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
signIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
signIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleTrees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ static CheckIdentity IdentifyTree(s32 sceneNum, s32 posX, s32 posZ) {
if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK &&
(location->GetRCType() != RCTYPE_NLTREE ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_LOGIC_RULES) == RO_LOGIC_NO_LOGIC)) {
treeIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
treeIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
treeIdentity.randomizerCheck = location->GetRandomizerCheck();
return treeIdentity;
}
Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleWonderItems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ static CheckIdentity IdentifyWonderItem(s32 sceneNum, s32 par1, s32 par2) {
if (location->GetRandomizerCheck() == RC_UNKNOWN_CHECK) {
LUSLOG_WARN("IdentifyWonderItem did not receive a valid RC value (%d).", location->GetRandomizerCheck());
} else {
wonderIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
wonderIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
wonderIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/fishsanity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,12 @@ static CheckIdentity IdentifyFish(s32 sceneNum, s32 actorParams) {
OTRGlobals::Instance->gRandomizer->GetCheckObjectFromActor(ACTOR_EN_FISH, sceneNum, actorParams);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
fishIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
fishIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
fishIdentity.randomizerCheck = location->GetRandomizerCheck();
}

Expand Down
8 changes: 6 additions & 2 deletions soh/soh/Enhancements/randomizer/hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,12 @@ static ScrubIdentity IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnDat
} else if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_ALL) {
return scrubIdentity;
}

scrubIdentity.identity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
scrubIdentity.identity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
scrubIdentity.identity.randomizerCheck = location->GetRandomizerCheck();
scrubIdentity.getItemId = (GetItemID)Rando::StaticData::RetrieveItem(location->GetVanillaItem()).GetItemID();
scrubIdentity.itemPrice =
Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/randomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,12 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, u8 slotIndex) {
slotIndex - 1);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
shopItemIdentity.identity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
if (rcToRandomizerInf.contains(location->GetRandomizerCheck())) {
shopItemIdentity.identity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
} else {
LUSLOG_ERROR("%d not found in rcToRandomizerInf.", location->GetRandomizerCheck());
assert(false);
}
shopItemIdentity.identity.randomizerCheck = location->GetRandomizerCheck();
shopItemIdentity.ogItemId = (GetItemID)Rando::StaticData::RetrieveItem(location->GetVanillaItem()).GetItemID();

Expand Down
Loading