Skip to content

Commit

Permalink
Potsanity proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
aMannus committed Dec 14, 2023
1 parent dad4ae0 commit fe7476a
Show file tree
Hide file tree
Showing 29 changed files with 158 additions and 30 deletions.
2 changes: 1 addition & 1 deletion soh/include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ u32 Actor_HasParent(Actor* actor, PlayState* play);
// TODO: Rename the follwing 3 functions using whatever scheme we use when we rename func_8002F434 and func_8002F554.
s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry);
s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEntry, f32 xzRange, f32 yRange);
void GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItemEntry getItemEntry);
s32 GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItemEntry getItemEntry);
s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
void func_8002F554(Actor* actor, PlayState* play, s32 getItemId);
void func_8002F580(Actor* actor, PlayState* play);
Expand Down
3 changes: 3 additions & 0 deletions soh/include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "z64collision_check.h"
#include "z64bgcheck.h"
#include "soh/Enhancements/item-tables/ItemTableTypes.h"
#include "soh/Enhancements/randomizer/randomizerTypes.h"
#include "z64actor_enum.h"

#define ACTOR_NUMBER_MAX 2000
Expand Down Expand Up @@ -285,6 +286,8 @@ typedef struct EnItem00 {
/* 0x160 */ ColliderCylinder collider;
s16 ogParams;
GetItemEntry randoGiEntry;
RandomizerCheck randoCheck;
RandomizerInf randoInf;
} EnItem00; // size = 0x1AC

// Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files.
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/debugger/debugSaveEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ const std::vector<FlagTable> flagTables = {
{ RAND_INF_BONGO_BONGO_SOUL, "RAND_INF_BONGO_BONGO_SOUL" },
{ RAND_INF_TWINROVA_SOUL, "RAND_INF_TWINROVA_SOUL" },
{ RAND_INF_GANON_SOUL, "RAND_INF_GANON_SOUL" },

{ RAND_INF_SHUFFLE_POTS_MARKET_GUARD_HOUSE_CHILD_1, "RAND_INF_SHUFFLE_POTS_MARKET_GUARD_HOUSE_CHILD_1" },
} },
};

Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/3drando/category.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum class Category {
cVanillaMap,
cVanillaCompass,
cAdultTrade,
cPot,
};

enum class OptionCategory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1356,4 +1356,9 @@ void HintTable_Init_Exclude_Overworld() {
//obscure text
Text{"a #cow in a luxurious hole# offers", /*french*/"la #vache dans une grotte luxueuse# donne", /*spanish*/"una #vaca de un lujoso hoyo# brinda"},
});

hintTable[RHT_SHUFFLE_POTS_MARKET_GUARD_HOUSE_1] = HintText::Exclude({
//obscure text
Text{"a #pot in a room# holds", /*french*/"a #pot in a room# holds", /*spanish*/"a #pot in a room# holds"},
});
}
11 changes: 11 additions & 0 deletions soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ static void PlaceVanillaCowMilk() {
}
}

static void PlaceVanillaPotContents() {
auto ctx = Rando::Context::GetInstance();
ctx->PlaceItemInLocation(RC_MARKET_GUARD_HOUSE_CHILD_POT_1, RG_GREEN_RUPEE, false, true);
}

static void SetScarceItemPool() {
ReplaceMaxItem(RG_PROGRESSIVE_BOMBCHUS, 3);
ReplaceMaxItem(RG_BOMBCHU_5, 1);
Expand Down Expand Up @@ -726,6 +731,12 @@ void GenerateItemPool() {
PlaceVanillaCowMilk();
}

if (ctx->GetOption(RSK_SHUFFLE_POTS)) {
AddItemToMainPool(RG_GREEN_RUPEE);
} else {
PlaceVanillaPotContents();
}

if (ctx->GetOption(RSK_SHUFFLE_MAGIC_BEANS)) {
AddItemToMainPool(RG_MAGIC_BEAN_PACK);
if (ctx->GetOption(RSK_ITEM_POOL).Is(RO_ITEM_POOL_PLENTIFUL)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ void AreaTable_Init_CastleTown() {

areaTable[RR_MARKET_GUARD_HOUSE] = Area("Market Guard House", "Market Guard House", RA_NONE, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LocationAccess(RC_MARKET_10_BIG_POES, {[]{return IsAdult && BigPoeKill;}}),
LocationAccess(RC_MARKET_GS_GUARD_HOUSE, {[]{return IsChild;}}),
LocationAccess(RC_MARKET_10_BIG_POES, {[]{return IsAdult && BigPoeKill;}}),
LocationAccess(RC_MARKET_GS_GUARD_HOUSE, {[]{return IsChild;}}),
LocationAccess(RC_MARKET_GUARD_HOUSE_CHILD_POT_1, {[]{return CanBreakPots();}}),
}, {
//Exits
Entrance(RR_MARKET_ENTRANCE, {[]{return true;}}),
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/Enhancements/randomizer/3drando/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ namespace Logic {
}
}

bool CanBreakPots() {
return true;
}

uint8_t GetDifficultyValueFromString(Rando::Option& glitchOption) {
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/3drando/logic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ bool CanPlay(bool song);
bool CanUse(RandomizerGet itemName);
bool HasProjectile(HasProjectileAge age);
bool HasBossSoul(RandomizerGet itemName);
bool CanBreakPots();
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount);
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched);
bool CanDoGlitch(GlitchType glitch);
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ void WriteIngameSpoilerLog() {
if (!ctx->GetOption(RSK_SHUFFLE_COWS) && loc->IsCategory(Category::cCow)) {
continue;
}
// Shuffle Pots
else if (!ctx->GetOption(RSK_SHUFFLE_POTS) && loc->IsCategory(Category::cPot)) {
continue;
}
// Merchants
else if (ctx->GetOption(RSK_SHUFFLE_MERCHANTS).Is(RO_SHUFFLE_MERCHANTS_OFF) && loc->IsCategory(Category::cMerchant)) {
continue;
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/3drando/spoiler_log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ typedef enum {
SPOILER_CHK_MERCHANT,
SPOILER_CHK_GRAVEDIGGER,
SPOILER_CHK_RANDOMIZER_INF,
SPOILER_CHK_POT,
} SpoilerCollectionCheckType;

// GetLocation groups for checks, used to group the checks by logical location
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/Enhancements/randomizer/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ class SpoilerCollectionCheck {
static auto RandomizerInf(const int8_t scene, const uint8_t flag) {
return SpoilerCollectionCheck(SPOILER_CHK_RANDOMIZER_INF, scene, flag);
}

static auto Pot(const uint8_t scene, const uint8_t flag) {
return SpoilerCollectionCheck(SPOILER_CHK_POT, scene, flag);
}
};

enum class LocationType {
Expand Down
5 changes: 5 additions & 0 deletions soh/soh/Enhancements/randomizer/location_list.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "static_data.h"

#define TWO_ACTOR_PARAMS(a, b) (abs(a) << 16) | abs(b)
#define THREE_ACTOR_PARAMS(a, b, c) (abs(a) << 10) | (abs(a) << 20) | abs(c)

std::array<Rando::Location, RC_MAX> Rando::StaticData::locationTable;

Expand Down Expand Up @@ -207,6 +208,7 @@ std::vector<RandomizerCheck> Rando::StaticData::overworldLocations = {
RC_MARKET_TREASURE_CHEST_GAME_ITEM_3,
RC_MARKET_TREASURE_CHEST_GAME_ITEM_4,
RC_MARKET_TREASURE_CHEST_GAME_ITEM_5,
RC_MARKET_GUARD_HOUSE_CHILD_POT_1,

// Market Shops
RC_MARKET_BOMBCHU_SHOP_ITEM_1,
Expand Down Expand Up @@ -1291,6 +1293,9 @@ void Rando::StaticData::InitLocationTable() {
locationTable[RC_GV_COW] = Location::Base(RC_GV_COW, RCQUEST_BOTH, RCTYPE_COW, RCAREA_GERUDO_VALLEY, ACTOR_EN_COW, SCENE_GERUDO_VALLEY, 0x00, 0x15, "Cow", "GV Cow", RHT_GV_COW, RG_MILK, { Category::cCow }, SpoilerCollectionCheck::Cow(0x5A, 0x15), SpoilerCollectionCheckGroup::GROUP_GERUDO_VALLEY);
locationTable[RC_JABU_JABUS_BELLY_MQ_COW] = Location::Base(RC_JABU_JABUS_BELLY_MQ_COW, RCQUEST_MQ, RCTYPE_COW, RCAREA_JABU_JABUS_BELLY, ACTOR_EN_COW, SCENE_JABU_JABU, 0x00, 0x15, "MQ Cow", "Jabu Jabus Belly MQ Cow", RHT_JABU_JABUS_BELLY_MQ_COW, RG_MILK, { Category::cCow }, SpoilerCollectionCheck::Cow(0x02, 0x15), SpoilerCollectionCheckGroup::GROUP_DUNGEON_JABUJABUS_BELLY);

// Pots Randomizer Check Randomizer Check Quest Type Area Actor ID Scene ID Params Flags Short Name Spoiler Name Hint Text Key Vanilla Item Categories Spoiler Collection Check Collection Check Group
locationTable[RC_MARKET_GUARD_HOUSE_CHILD_POT_1] = Location::Base(RC_MARKET_GUARD_HOUSE_CHILD_POT_1, RCQUEST_BOTH, RCTYPE_POT, RCAREA_MARKET, ACTOR_OBJ_TSUBO, SCENE_MARKET_GUARD_HOUSE, THREE_ACTOR_PARAMS(-80, 0, -7), 0x00, "Guard House Child Pot 1", "MK Guard House Child Pot 1", RHT_SHUFFLE_POTS_MARKET_GUARD_HOUSE_1, RG_GREEN_RUPEE, { Category::cPot }, SpoilerCollectionCheck::Pot(0x4D, 0x00), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);

/*-------------------------------
--- SHOPS ---
8 6 2 4
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ bool OptionGroup::RenderImGui() const { // NOLINT(*-no-recursion)
ImGui::Unindent();
}
if (option->HasFlag(IMFLAG_SEPARATOR_BOTTOM)) {
UIWidgets::PaddedSeparator();
UIWidgets::PaddedSeparator(false, true);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/randomizer/option_descriptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ void Settings::CreateOptionDescriptions() {
"\n"
"The Gerudo Card is required to enter the Gerudo Training Grounds, opening "
"the gate to Haunted Wasteland and the Horseback Archery minigame.";
mOptionDescriptions[RSK_SHUFFLE_POTS] =
"Freestanding pots will drop a randomized item the first time they're broken and collected. Pots will have a different appearance when they hold a randomized item.";
mOptionDescriptions[RSK_SHOPSANITY] = "Off - All shop items will be the same as vanilla.\n"
"\n"
"0 Items - Vanilla shop items will be shuffled among different shops.\n"
Expand Down
19 changes: 19 additions & 0 deletions soh/soh/Enhancements/randomizer/randomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
{ RC_LH_ADULT_FISHING, RAND_INF_ADULT_FISHING },
{ RC_MARKET_10_BIG_POES, RAND_INF_10_BIG_POES },
{ RC_KAK_100_GOLD_SKULLTULA_REWARD, RAND_INF_KAK_100_GOLD_SKULLTULA_REWARD },
{ RC_MARKET_GUARD_HOUSE_CHILD_POT_1, RAND_INF_SHUFFLE_POTS_MARKET_GUARD_HOUSE_CHILD_1 },
};

Rando::Location* Randomizer::GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams = 0x00) {
Expand Down Expand Up @@ -1609,6 +1610,24 @@ CowIdentity Randomizer::IdentifyCow(s32 sceneNum, s32 posX, s32 posZ) {
return cowIdentity;
}

PotIdentity Randomizer::IdentifyPot(s32 sceneNum, s32 posX, s32 posY, s32 posZ) {
struct PotIdentity potIdentity;

potIdentity.randomizerInf = RAND_INF_MAX;
potIdentity.randomizerCheck = RC_UNKNOWN_CHECK;

s32 actorParams = THREE_ACTOR_PARAMS(posX, posY, posZ);

Rando::Location* location = GetCheckObjectFromActor(ACTOR_OBJ_TSUBO, sceneNum, actorParams);

if (location->GetRandomizerCheck() != RC_UNKNOWN_CHECK) {
potIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
potIdentity.randomizerCheck = location->GetRandomizerCheck();
}

return potIdentity;
}

u8 Randomizer::GetRandoSettingValue(RandomizerSettingKey randoSettingKey) {
return Rando::Context::GetInstance()->GetOption(randoSettingKey).GetSelectedOptionIndex();
}
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/randomizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Randomizer {
ScrubIdentity IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnData);
ShopItemIdentity IdentifyShopItem(s32 sceneNum, u8 slotIndex);
CowIdentity IdentifyCow(s32 sceneNum, s32 posX, s32 posZ);
PotIdentity IdentifyPot(s32 sceneNum, s32 posX, s32 potY, s32 posZ);
GetItemEntry GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogItemId, bool checkObtainability = true);
GetItemEntry GetItemFromActor(s16 actorId, s16 sceneNum, s16 actorParams, GetItemID ogItemId, bool checkObtainability = true);
GetItemID GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItemID ogItemId);
Expand Down
16 changes: 13 additions & 3 deletions soh/soh/Enhancements/randomizer/randomizerTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ typedef enum {
RCTYPE_CHEST_GAME, // todo replace this once we implement it, just using it to exclude for now
RCTYPE_LINKS_POCKET, // todo this feels hacky
RCTYPE_GOSSIP_STONE,
RCTYPE_SONG_LOCATION, // Song locations
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_DUNGEON_REWARD, // Dungeon rewards (blue warps)
RCTYPE_OCARINA, // Ocarina locations
RCTYPE_POT, // Shuffle Pots
} RandomizerCheckType;

typedef enum { RCQUEST_VANILLA, RCQUEST_MQ, RCQUEST_BOTH } RandomizerCheckQuest;
Expand Down Expand Up @@ -746,6 +747,7 @@ typedef enum {
RC_MARKET_BOMBCHU_SHOP_ITEM_6,
RC_MARKET_BOMBCHU_SHOP_ITEM_7,
RC_MARKET_BOMBCHU_SHOP_ITEM_8,
RC_MARKET_GUARD_HOUSE_CHILD_POT_1,
RC_TOT_LIGHT_ARROWS_CUTSCENE,
RC_TOT_MASTER_SWORD,
RC_HC_MALON_EGG,
Expand Down Expand Up @@ -3277,6 +3279,8 @@ typedef enum {
RHT_CARPET_SALESMAN_DIALOG_THIRD,
RHT_CARPET_SALESMAN_DIALOG_FOURTH,
RHT_GRANNY_DIALOG,
// Shuffle Pots
RHT_SHUFFLE_POTS_MARKET_GUARD_HOUSE_1,
RHT_MAX
} RandomizerHintTextKey;

Expand Down Expand Up @@ -3400,6 +3404,7 @@ typedef enum {
RSK_SHUFFLE_COWS,
RSK_SHUFFLE_WEIRD_EGG,
RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD,
RSK_SHUFFLE_POTS,
RSK_SHUFFLE_FROG_SONG_RUPEES,
RSK_ITEM_POOL,
RSK_ICE_TRAPS,
Expand Down Expand Up @@ -3881,6 +3886,11 @@ typedef struct CowIdentity {
RandomizerCheck randomizerCheck;
} CowIdentity;

typedef struct PotIdentity {
RandomizerInf randomizerInf;
RandomizerCheck randomizerCheck;
} PotIdentity;

typedef enum {
TRACKER_WINDOW_FLOATING,
TRACKER_WINDOW_WINDOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
((CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) &&
RandomizerCheckObjects::AreaIsDungeon(location.GetArea()))) &&
(location.GetRCType() != RCTYPE_COW || CVarGetInteger("gRandomizeShuffleCows", RO_GENERIC_NO)) &&
(location.GetRCType() != RCTYPE_POT || CVarGetInteger("gRandomizeShufflePotContents", RO_GENERIC_NO)) &&
(location.GetRCType() != RCTYPE_ADULT_TRADE ||
CVarGetInteger("gRandomizeShuffleAdultTrade", RO_GENERIC_NO)) &&
(location.GetRandomizerCheck() != RC_KF_KOKIRI_SWORD_CHEST ||
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/randomizer_check_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <map>

#define TWO_ACTOR_PARAMS(a, b) (abs(a) << 16) | abs(b)
#define THREE_ACTOR_PARAMS(a, b, c) (abs(a) << 10) | (abs(a) << 20) | abs(c)

namespace RandomizerCheckObjects {
bool AreaIsDungeon(RandomizerCheckArea area);
Expand Down
6 changes: 6 additions & 0 deletions soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ bool showKokiriSword;
bool showMasterSword;
bool showWeirdEgg;
bool showGerudoCard;
bool showPots;
bool showFrogSongRupees;
bool showStartingMapsCompasses;
bool showKeysanity;
Expand Down Expand Up @@ -426,6 +427,7 @@ bool HasItemBeenCollected(RandomizerCheck rc) {
case SpoilerCollectionCheckType::SPOILER_CHK_SCRUB:
case SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF:
case SpoilerCollectionCheckType::SPOILER_CHK_MASTER_SWORD:
case SpoilerCollectionCheckType::SPOILER_CHK_POT:
return Flags_GetRandomizerInf(OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(rc));
case SpoilerCollectionCheckType::SPOILER_CHK_EVENT_CHK_INF:
return gSaveContext.eventChkInf[flag / 16] & (0x01 << flag % 16);
Expand Down Expand Up @@ -1030,6 +1032,9 @@ void LoadSettings() {
showGerudoCard = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) == RO_GENERIC_YES
: true;
showPots = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_POTS) == RO_GENERIC_YES
: true;
showFrogSongRupees = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_FROG_SONG_RUPEES) == RO_GENERIC_YES
: false;
Expand Down Expand Up @@ -1132,6 +1137,7 @@ bool IsVisibleInCheckTracker(RandomizerCheck rc) {
(showDungeonTokens && RandomizerCheckObjects::AreaIsDungeon(loc->GetArea()))
) &&
(loc->GetRCType() != RCTYPE_COW || showCows) &&
(loc->GetRCType() != RCTYPE_POT || showPots) &&
(loc->GetRCType() != RCTYPE_ADULT_TRADE ||
showAdultTrade ||
rc == RC_KAK_ANJU_AS_ADULT || // adult trade checks that are always shuffled
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/randomizer/randomizer_inf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ typedef enum {
RAND_INF_TWINROVA_SOUL,
RAND_INF_GANON_SOUL,

RAND_INF_SHUFFLE_POTS_MARKET_GUARD_HOUSE_CHILD_1,

// If you add anything to this list, you need to update the size of randomizerInf in z64save.h to be ceil(RAND_INF_MAX / 16)

RAND_INF_MAX,
Expand Down
7 changes: 6 additions & 1 deletion soh/soh/Enhancements/randomizer/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void Settings::CreateOptions() {
mOptions[RSK_SHUFFLE_OCARINA] = Option::Bool("Shuffle Ocarinas", "gRandomizeShuffleOcarinas", mOptionDescriptions[RSK_SHUFFLE_OCARINA]);
mOptions[RSK_SHUFFLE_WEIRD_EGG] = Option::Bool("Shuffle Weird Egg", "gRandomizeShuffleWeirdEgg", mOptionDescriptions[RSK_SHUFFLE_WEIRD_EGG]);
mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = Option::Bool("Shuffle Gerudo Membership Card", "gRandomizeShuffleGerudoToken", mOptionDescriptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD]);
mOptions[RSK_SHUFFLE_POTS] = Option::Bool("Shuffle Pot Contents", "gRandomizeShufflePotContents", mOptionDescriptions[RSK_SHUFFLE_POTS]);
mOptions[RSK_SHUFFLE_MAGIC_BEANS] = Option::Bool("Shuffle Magic Beans", "gRandomizeShuffleBeans", mOptionDescriptions[RSK_SHUFFLE_MAGIC_BEANS]);
mOptions[RSK_SHUFFLE_MERCHANTS] = Option::U8("Shuffle Merchants", {"Off", "On (No Hints)", "On (With Hints)"}, OptionCategory::Setting, "gRandomizeShuffleMerchants", mOptionDescriptions[RSK_SHUFFLE_MERCHANTS], WidgetType::Combobox, RO_SHUFFLE_MERCHANTS_OFF);
mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES] = Option::Bool("Shuffle Frog Song Rupees", "gRandomizeShuffleFrogSongRupees", mOptionDescriptions[RSK_SHUFFLE_FROG_SONG_RUPEES]);
Expand Down Expand Up @@ -614,7 +615,8 @@ void Settings::CreateOptions() {
&mOptions[RSK_SHUFFLE_MASTER_SWORD],
&mOptions[RSK_SHUFFLE_OCARINA],
&mOptions[RSK_SHUFFLE_WEIRD_EGG],
&mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD]
&mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD],
&mOptions[RSK_SHUFFLE_POTS]
}, false, WidgetContainerType::COLUMN);
mOptionGroups[RSG_SHUFFLE_NPCS_IMGUI] = OptionGroup::SubGroup("Shuffle NPCs & Merchants", {
&mOptions[RSK_SHOPSANITY],
Expand Down Expand Up @@ -813,6 +815,7 @@ void Settings::CreateOptions() {
&mOptions[RSK_SHUFFLE_OCARINA],
&mOptions[RSK_SHUFFLE_WEIRD_EGG],
&mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD],
&mOptions[RSK_SHUFFLE_POTS],
&mOptions[RSK_SHUFFLE_MAGIC_BEANS],
&mOptions[RSK_SHUFFLE_MERCHANTS],
&mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES],
Expand Down Expand Up @@ -1009,6 +1012,7 @@ void Settings::CreateOptions() {
{ "Shuffle Settings:Link's Pocket", RSK_LINKS_POCKET },
{ "Shuffle Settings:Shuffle Songs", RSK_SHUFFLE_SONGS },
{ "Shuffle Settings:Shuffle Gerudo Membership Card", RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD },
{ "Shuffle Settings:Shuffle Pot Contents", RSK_SHUFFLE_POTS },
{ "Shuffle Settings:Shopsanity", RSK_SHOPSANITY },
{ "Shuffle Settings:Shopsanity Prices", RSK_SHOPSANITY_PRICES },
{ "Shuffle Settings:Affordable Prices", RSK_SHOPSANITY_PRICES_AFFORDABLE },
Expand Down Expand Up @@ -2060,6 +2064,7 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) {
}
break;
case RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD:
case RSK_SHUFFLE_POTS:
case RSK_SHUFFLE_COWS:
case RSK_SHUFFLE_ADULT_TRADE:
case RSK_SHUFFLE_MAGIC_BEANS:
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,10 @@ extern "C" CowIdentity Randomizer_IdentifyCow(s32 sceneNum, s32 posX, s32 posZ)
return OTRGlobals::Instance->gRandomizer->IdentifyCow(sceneNum, posX, posZ);
}

extern "C" PotIdentity Randomizer_IdentifyPot(s32 sceneNum, s32 posX, s32 posY, s32 posZ) {
return OTRGlobals::Instance->gRandomizer->IdentifyPot(sceneNum, posX, posY, posZ);
}

extern "C" GetItemEntry ItemTable_Retrieve(int16_t getItemID) {
GetItemEntry giEntry = ItemTableManager::Instance->RetrieveItemEntry(MOD_NONE, getItemID);
return giEntry;
Expand Down
Loading

0 comments on commit fe7476a

Please sign in to comment.