Skip to content

Commit

Permalink
Start splitting Location List into ShipInit functions (HarbourMasters…
Browse files Browse the repository at this point in the history
…#5011)

* Move fairy checks to separate file

* Moves pot locations to ShipInit function

* Move Freestanding locations to a ShipInit function

* Remove some extra newlines that were pasted in

* Move fish locations to ShipInit function

* Remove ON_BOOT, as it's not really necessary

* Fix weird spacing
  • Loading branch information
leggettc18 authored Feb 7, 2025
1 parent ca0617b commit 2400ad1
Show file tree
Hide file tree
Showing 8 changed files with 1,083 additions and 1,066 deletions.
227 changes: 226 additions & 1 deletion soh/soh/Enhancements/randomizer/ShuffleFairies.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/ShuffleFairies.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ typedef struct FairyIdentity {
} FairyIdentity;

void ShuffleFairies_RegisterHooks();
void ShuffleFairies_UnregisterHooks();
void ShuffleFairies_UnregisterHooks();
235 changes: 235 additions & 0 deletions soh/soh/Enhancements/randomizer/ShuffleFreestanding.cpp

Large diffs are not rendered by default.

553 changes: 553 additions & 0 deletions soh/soh/Enhancements/randomizer/ShufflePots.cpp

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions soh/soh/Enhancements/randomizer/fishsanity.cpp

Large diffs are not rendered by default.

1,068 changes: 5 additions & 1,063 deletions soh/soh/Enhancements/randomizer/location_list.cpp

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions soh/soh/Enhancements/randomizer/static_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class StaticData {
static std::vector<RandomizerCheck> GetOverworldFishLocations();
static std::vector<RandomizerCheck> GetOverworldPotLocations();
static std::vector<RandomizerCheck> GetOverworldFairyLocations();
static void RegisterFishLocations();
static void RegisterFairyLocations();
static void RegisterPotLocations();
static void RegisterFreestandingLocations();
static void InitHashMaps();
static std::array<std::pair<RandomizerCheck, RandomizerCheck>, 17> randomizerFishingPondFish;
static std::unordered_map<int8_t, RandomizerCheck> randomizerGrottoFishMap;
static std::vector<RandomizerHint> oldVerHintOrder;
Expand Down
4 changes: 3 additions & 1 deletion soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ OTRGlobals::OTRGlobals() {
gRandoContext = Rando::Context::CreateInstance();
Rando::Settings::GetInstance()->AssignContext(gRandoContext);
Rando::StaticData::InitItemTable();//RANDOTODO make this not rely on context's logic so it can be initialised in InitStaticData
gRandoContext->AddExcludedOptions();
Rando::Settings::GetInstance()->CreateOptions();
gRandomizer = std::make_shared<Randomizer>();

Expand Down Expand Up @@ -1166,6 +1165,9 @@ extern "C" void InitOTR() {

SohGui::SetupGuiElements();
ShipInit::InitAll();

Rando::StaticData::InitHashMaps();
OTRGlobals::Instance->gRandoContext->AddExcludedOptions();
AudioCollection::Instance = new AudioCollection();
ActorDB::Instance = new ActorDB();
#ifdef __APPLE__
Expand Down

0 comments on commit 2400ad1

Please sign in to comment.