Skip to content

Commit

Permalink
Blair Config Migrator V3 (HarbourMasters#4148)
Browse files Browse the repository at this point in the history
* Config migrator to handle CVar macros/sections, as well as a few other changes since MacReady.

* One more round of cleanup.

* Move config migrators above SetupGuiElements to allow for migrated window variables to register before windows use them to determine visibility.

* One more.

* Adapt DpadEquips, NavOnL, and PauseAnyCursor CVars to accommodate Pablo moving them to enhancements.
  • Loading branch information
Malkierian authored Oct 17, 2024
1 parent b7bbb1b commit 3c5d9fa
Show file tree
Hide file tree
Showing 4 changed files with 1,506 additions and 6 deletions.
12 changes: 7 additions & 5 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,13 @@ extern "C" void InitOTR() {
ItemTableManager::Instance = new ItemTableManager();
GameInteractor::Instance = new GameInteractor();
SaveManager::Instance = new SaveManager();

std::shared_ptr<Ship::Config> conf = OTRGlobals::Instance->context->GetConfig();
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion1Updater>());
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion2Updater>());
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion3Updater>());
conf->RunVersionUpdates();

SohGui::SetupGuiElements();
AudioCollection::Instance = new AudioCollection();
ActorDB::Instance = new ActorDB();
Expand Down Expand Up @@ -1207,11 +1214,6 @@ extern "C" void InitOTR() {
}
}
#endif

std::shared_ptr<Ship::Config> conf = OTRGlobals::Instance->context->GetConfig();
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion1Updater>());
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion2Updater>());
conf->RunVersionUpdates();
}

extern "C" void SaveManager_ThreadPoolWait() {
Expand Down
Loading

0 comments on commit 3c5d9fa

Please sign in to comment.