From 959b7dd4336037b7b45a55191cea50b9f06345b3 Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 19 May 2025 11:16:13 +0200 Subject: [PATCH] Function renames --- soh/soh/Enhancements/mods.cpp | 2 +- soh/soh/Enhancements/randomizer/context.cpp | 8 +- .../Enhancements/randomizer/hook_handlers.cpp | 6 +- .../Enhancements/randomizer/randomizer.cpp | 2 +- .../Enhancements/timesplits/TimeSplits.cpp | 2 +- soh/soh/Network/Archipelago/Archipelago.cpp | 120 +++++++++--------- soh/soh/Network/Archipelago/Archipelago.h | 53 ++++---- .../Archipelago/ArchipelagoConsoleWindow.cpp | 20 +-- .../Archipelago/ArchipelagoSettingsWindow.cpp | 24 ++-- soh/soh/OTRGlobals.cpp | 2 +- soh/soh/OTRGlobals.h | 2 +- .../ovl_file_choose/z_file_choose.c | 13 +- 12 files changed, 127 insertions(+), 127 deletions(-) diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 0358e597d..ad74df311 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -783,7 +783,7 @@ void RegisterBossDefeatTimestamps() { case ACTOR_BOSS_GANON2: gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME; gSaveContext.ship.stats.gameComplete = true; - ArchipelagoClient::getInstance().send_game_won(); + ArchipelagoClient::GetInstance().SendGameWon(); break; case ACTOR_BOSS_GANONDROF: gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_PHANTOM_GANON] = GAMEPLAYSTAT_TOTAL_TIME; diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index 7271d084b..3a2408a49 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -441,9 +441,9 @@ void Context::ParseArchipelago() { mSeedGenerated = false; mSpoilerLoaded = false; - ArchipelagoClient& ap_client = ArchipelagoClient::getInstance(); - Rando::Settings::GetInstance()->ParseArchipelago(ap_client.get_slot_data()); - ParseArchipelagoItemsLocations(ap_client.get_scouted_items()); + ArchipelagoClient& ap_client = ArchipelagoClient::GetInstance(); + Rando::Settings::GetInstance()->ParseArchipelago(ap_client.GetSlotData()); + ParseArchipelagoItemsLocations(ap_client.GetScoutedItems()); // lets see if counting AP_loaded as spoiler loaded does the trick mSpoilerLoaded = true; @@ -484,7 +484,7 @@ void Context::ParseItemLocationsJson(nlohmann::json spoilerFileJson) { } void Context::ParseArchipelagoItemsLocations(const std::vector& scouted_items) { - const std::string SlotName = ArchipelagoClient::getInstance().get_slot_name(); + const std::string SlotName = ArchipelagoClient::GetInstance().GetSlotName(); // init the item table with regular items first for(int rc = 1; rc <= RC_MAX; rc++) { diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 1915857c2..604bf99b4 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -383,7 +383,7 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) { // todo maybe move to seperate function // let arhipelago know we got this check if(randomizerQueuedCheck != RC_ARCHIPELAGO_RECIEVED_ITEM) { - ArchipelagoClient& ap_client = ArchipelagoClient::getInstance(); + ArchipelagoClient& ap_client = ArchipelagoClient::GetInstance(); ap_client.check_location(randomizerQueuedCheck); } @@ -2445,7 +2445,7 @@ void RandomizerRegisterHooks() { GameInteractor::Instance->UnregisterGameHook( shuffleFreestandingOnVanillaBehaviorHook); - ArchipelagoClient::getInstance().removeItemRecievedCallback(ArchipelagoOnRecieveItem); + ArchipelagoClient::GetInstance().RemoveItemRecievedCallback(ArchipelagoOnRecieveItem); onFlagSetHook = 0; onSceneFlagSetHook = 0; @@ -2562,6 +2562,6 @@ void RandomizerRegisterHooks() { ShuffleFairies_RegisterHooks(); } - ArchipelagoClient::getInstance().addItemRecievedCallback(ArchipelagoOnRecieveItem); + ArchipelagoClient::GetInstance().AddItemRecievedCallback(ArchipelagoOnRecieveItem); }); } diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index d870fe789..5352940b8 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -5885,7 +5885,7 @@ extern "C" u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) { (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) + 1)) { gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME; gSaveContext.ship.stats.gameComplete = 1; - ArchipelagoClient::getInstance().send_game_won(); + ArchipelagoClient::GetInstance().SendGameWon(); Flags_SetRandomizerInf(RAND_INF_GRANT_GANONS_BOSSKEY); Play_PerformSave(play); Notification::Emit({ diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.cpp b/soh/soh/Enhancements/timesplits/TimeSplits.cpp index 19574e833..482319d5e 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.cpp +++ b/soh/soh/Enhancements/timesplits/TimeSplits.cpp @@ -352,7 +352,7 @@ void HandleDragAndDrop(std::vector& objectList, int targetIndex, co void TimeSplitCompleteSplits() { gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME; gSaveContext.ship.stats.gameComplete = true; - ArchipelagoClient::getInstance().send_game_won(); + ArchipelagoClient::GetInstance().SendGameWon(); } void TimeSplitsSkipSplit(uint32_t index) { diff --git a/soh/soh/Network/Archipelago/Archipelago.cpp b/soh/soh/Network/Archipelago/Archipelago.cpp index 85da9b46b..fd70afd22 100644 --- a/soh/soh/Network/Archipelago/Archipelago.cpp +++ b/soh/soh/Network/Archipelago/Archipelago.cpp @@ -19,50 +19,50 @@ ArchipelagoClient::ArchipelagoClient() { game_won = false; namespace apc = AP_Client_consts; - CVarSetInteger("archipelago_connected", 0); - strncpy(server_address, CVarGetString(apc::SETTING_ADDRESS, apc::DEFAULT_SERVER_NAME), apc::MAX_ADDRESS_LENGTH); - strncpy(slot_name, CVarGetString(apc::SETTING_NAME, ""), apc::MAX_PLAYER_NAME_LENGHT); + CVarSetInteger("ArchipelagoConnected", 0); + strncpy(serverAddress, CVarGetString(apc::SETTING_ADDRESS, apc::DEFAULT_SERVER_NAME), apc::MAX_ADDRESS_LENGTH); + strncpy(slotName, CVarGetString(apc::SETTING_NAME, ""), apc::MAX_PLAYER_NAME_LENGHT); // call poll every frame - GameInteractor::Instance->RegisterGameHook([](){ArchipelagoClient::getInstance().poll();}); + GameInteractor::Instance->RegisterGameHook([](){ArchipelagoClient::GetInstance().Poll();}); } -ArchipelagoClient& ArchipelagoClient::getInstance() { +ArchipelagoClient& ArchipelagoClient::GetInstance() { static ArchipelagoClient Client; return Client; } -bool ArchipelagoClient::start_client() { - if(apclient != NULL) { - apclient.reset(); +bool ArchipelagoClient::StartClient() { + if(apClient != NULL) { + apClient.reset(); } - apclient = std::unique_ptr(new APClient(uuid, AP_Client_consts::AP_GAME_NAME, server_address)); + apClient = std::unique_ptr(new APClient(uuid, AP_Client_consts::AP_GAME_NAME, serverAddress)); - apclient->set_room_info_handler([&]() { + apClient->set_room_info_handler([&]() { std::list tags; // tags.push_back("DeathLink"); // todo, implement deathlink - apclient->ConnectSlot(slot_name, password, 0b001, tags); + apClient->ConnectSlot(slotName, password, 0b001, tags); }); - apclient->set_items_received_handler([&](const std::list& items) { + apClient->set_items_received_handler([&](const std::list& items) { for(const APClient::NetworkItem& item : items) { - on_item_recieved(item.item, false); // todo get rid of notify, since it doesn't work for us right now anyway + OnItemReceived(item.item, false); // todo get rid of notify, since it doesn't work for us right now anyway } }); - apclient->set_location_info_handler([&](const std::list& items) { - scouted_items.clear(); + apClient->set_location_info_handler([&](const std::list& items) { + scoutedItems.clear(); for(const APClient::NetworkItem& item: items) { ApItem apItem; - const std::string game = apclient->get_player_game(item.player); - apItem.itemName = apclient->get_item_name(item.item, game); - apItem.locationName = apclient->get_location_name(item.location, game); - apItem.playerName = apclient->get_player_alias(item.player); + const std::string game = apClient->get_player_game(item.player); + apItem.itemName = apClient->get_item_name(item.item, game); + apItem.locationName = apClient->get_location_name(item.location, game); + apItem.playerName = apClient->get_player_alias(item.player); apItem.flags = item.flags; apItem.index = item.index; - scouted_items.push_back(apItem); + scoutedItems.push_back(apItem); const std::string itemName = apItem.itemName; const std::string playerName = apItem.playerName; @@ -72,17 +72,17 @@ bool ArchipelagoClient::start_client() { } }); // todo maybe move these functions to a lambda, since they don't have to be static anymore - apclient->set_location_checked_handler([&](const std::list locations) { + apClient->set_location_checked_handler([&](const std::list locations) { // todo implement me }); - save_data(); + SaveData(); return true; } -void ArchipelagoClient::start_location_scouts() { - std::set missing_loc_set = apclient->get_missing_locations(); - std::set found_loc_set = apclient->get_checked_locations(); +void ArchipelagoClient::StartLocationScouts() { + std::set missing_loc_set = apClient->get_missing_locations(); + std::set found_loc_set = apClient->get_checked_locations(); std::list location_list; for(const int64_t loc_id : missing_loc_set) { location_list.emplace_back(loc_id); @@ -90,16 +90,16 @@ void ArchipelagoClient::start_location_scouts() { for(const int64_t loc_id : found_loc_set) { location_list.emplace_back(loc_id); } - apclient->LocationScouts(location_list); + apClient->LocationScouts(location_list); } -void ArchipelagoClient::save_data() { - CVarSetString(AP_Client_consts::SETTING_ADDRESS, server_address); - CVarSetString(AP_Client_consts::SETTING_NAME, slot_name); +void ArchipelagoClient::SaveData() { + CVarSetString(AP_Client_consts::SETTING_ADDRESS, serverAddress); + CVarSetString(AP_Client_consts::SETTING_NAME, slotName); } -bool ArchipelagoClient::isConnected() { - return apclient->get_state() == APClient::State::SLOT_CONNECTED; +bool ArchipelagoClient::IsConnected() { + return apClient->get_state() == APClient::State::SLOT_CONNECTED; } void ArchipelagoClient::check_location(RandomizerCheck SoH_check_id) { @@ -108,26 +108,26 @@ void ArchipelagoClient::check_location(RandomizerCheck SoH_check_id) { if(ap_name.empty()) { return; } - int64_t ap_item_id = apclient->get_location_id(std::string(ap_name)); + int64_t ap_item_id = apClient->get_location_id(std::string(ap_name)); std::string logMessage = "[LOG] Checked: " + ap_name + "(" + std::to_string(ap_item_id) + "), sending to AP server"; ArchipelagoConsole_SendMessage(logMessage.c_str()); // currently not sending, because i only get so many real chances - if(!isConnected()) { + if(!IsConnected()) { return; } - apclient->LocationChecks({ap_item_id}); + apClient->LocationChecks({ap_item_id}); } -void ArchipelagoClient::addItemRecievedCallback(std::function callback) { +void ArchipelagoClient::AddItemRecievedCallback(std::function callback) { ItemRecievedCallback = callback; } -void ArchipelagoClient::removeItemRecievedCallback(std::function old_callback) { +void ArchipelagoClient::RemoveItemRecievedCallback(std::function old_callback) { ItemRecievedCallback = nullptr; } -void ArchipelagoClient::on_connected() { +void ArchipelagoClient::OnConnected() { // todo implement me ArchipelagoConsole_SendMessage("[LOG] AP Connected!"); } @@ -135,10 +135,10 @@ void ArchipelagoClient::on_connected() { // // todo implement me //} -void ArchipelagoClient::on_item_recieved(int64_t recieved_item_id, bool notify_player) { +void ArchipelagoClient::OnItemReceived(int64_t recieved_item_id, bool notify_player) { // call each callback - const std::string item_name = apclient->get_item_name(recieved_item_id, AP_Client_consts::AP_GAME_NAME); - ArchipelagoClient& ap_client = ArchipelagoClient::getInstance(); + const std::string item_name = apClient->get_item_name(recieved_item_id, AP_Client_consts::AP_GAME_NAME); + ArchipelagoClient& ap_client = ArchipelagoClient::GetInstance(); if(ap_client.ItemRecievedCallback) { std::string logMessage = "[LOG] Item recieved: " + item_name + ". Notify: " + std::to_string(notify_player); ArchipelagoConsole_SendMessage(logMessage.c_str()); @@ -146,53 +146,53 @@ void ArchipelagoClient::on_item_recieved(int64_t recieved_item_id, bool notify_p } } -void ArchipelagoClient::send_game_won() { +void ArchipelagoClient::SendGameWon() { if(!game_won) { - apclient->StatusUpdate(APClient::ClientStatus::GOAL); + apClient->StatusUpdate(APClient::ClientStatus::GOAL); game_won = true; } } -void ArchipelagoClient::poll() { - if(apclient == nullptr) { +void ArchipelagoClient::Poll() { + if(apClient == nullptr) { return; } - apclient->poll(); + apClient->poll(); } -const std::string& ArchipelagoClient::get_slot_name() const { - if(apclient == NULL) { +const std::string& ArchipelagoClient::GetSlotName() const { + if(apClient == NULL) { return ""; } - return apclient->get_slot(); + return apClient->get_slot(); } -char* ArchipelagoClient::get_server_address_buff() { - return server_address; +char* ArchipelagoClient::GetServerAddressBuffer() { + return serverAddress; } -char* ArchipelagoClient::get_slot_name_buff() { - return slot_name; +char* ArchipelagoClient::GetSlotNameBuffer() { + return slotName; } -char* ArchipelagoClient::get_password_buff() { +char* ArchipelagoClient::GetPasswordBuffer() { return password; } -const std::map& ArchipelagoClient::get_slot_data() { - return slot_data; +const std::map& ArchipelagoClient::GetSlotData() { + return slotData; } -const std::vector& ArchipelagoClient::get_scouted_items() { - return scouted_items; +const std::vector& ArchipelagoClient::GetScoutedItems() { + return scoutedItems; } -const char* ArchipelagoClient::get_connection_status() { - if (!apclient) { +const char* ArchipelagoClient::GetConnectionStatus() { + if (!apClient) { return ""; } - APClient::State clientStatus = apclient->get_state(); + APClient::State clientStatus = apClient->get_state(); switch (clientStatus) { case APClient::State::DISCONNECTED: { diff --git a/soh/soh/Network/Archipelago/Archipelago.h b/soh/soh/Network/Archipelago/Archipelago.h index 948b9488e..a36778a46 100644 --- a/soh/soh/Network/Archipelago/Archipelago.h +++ b/soh/soh/Network/Archipelago/Archipelago.h @@ -28,39 +28,38 @@ class ArchipelagoClient{ int index; }; - static ArchipelagoClient& getInstance(); + static ArchipelagoClient& GetInstance(); - bool start_client(); - bool stop_client(); + bool StartClient(); + bool StopClient(); - void start_location_scouts(); + void StartLocationScouts(); // getters - const std::string& get_slot_name() const; + const std::string& GetSlotName() const; - char* get_server_address_buff(); - char* get_slot_name_buff(); - char* get_password_buff(); - const char* get_connection_status(); - const std::map& get_slot_data(); - const std::vector& get_scouted_items(); + char* GetServerAddressBuffer(); + char* GetSlotNameBuffer(); + char* GetPasswordBuffer(); + const char* GetConnectionStatus(); + const std::map& GetSlotData(); + const std::vector& GetScoutedItems(); - bool isConnected(); + bool IsConnected(); void check_location(RandomizerCheck SoH_check_id); // callback slots - void addItemRecievedCallback(std::function callback); - void removeItemRecievedCallback(std::function old_callback); - + void AddItemRecievedCallback(std::function callback); + void RemoveItemRecievedCallback(std::function old_callback); // todo move me back down when done testing - void on_item_recieved(int64_t recieved_item_id, bool notify_player); + void OnItemReceived(int64_t recieved_item_id, bool notify_player); - void send_game_won(); + void SendGameWon(); - void poll(); + void Poll(); - std::unique_ptr apclient; + std::unique_ptr apClient; protected: ArchipelagoClient(); @@ -73,23 +72,23 @@ class ArchipelagoClient{ static std::shared_ptr instance; // is this even used? static bool initialized; - char server_address[AP_Client_consts::MAX_ADDRESS_LENGTH]; - char slot_name[AP_Client_consts::MAX_PLAYER_NAME_LENGHT]; + char serverAddress[AP_Client_consts::MAX_ADDRESS_LENGTH]; + char slotName[AP_Client_consts::MAX_PLAYER_NAME_LENGHT]; char password[AP_Client_consts::MAX_PLAYER_NAME_LENGHT]; bool game_won; - std::map slot_data; + std::map slotData; std::set locations; - std::vector scouted_items; + std::vector scoutedItems; - void save_data(); + void SaveData(); // callback functions - void on_connected(); + void OnConnected(); - void on_location_checked(int64_t location_id); - void on_deathlink_recieved() { }; // TODO: implement me + void OnLocationChecked(int64_t location_id); + void OnDeathLinkReceived() { }; // TODO: implement me // callbacks std::function ItemRecievedCallback; diff --git a/soh/soh/Network/Archipelago/ArchipelagoConsoleWindow.cpp b/soh/soh/Network/Archipelago/ArchipelagoConsoleWindow.cpp index 6861cd780..7fb8b8d07 100644 --- a/soh/soh/Network/Archipelago/ArchipelagoConsoleWindow.cpp +++ b/soh/soh/Network/Archipelago/ArchipelagoConsoleWindow.cpp @@ -18,10 +18,9 @@ void ArchipelagoConsole_SendMessage(const char* fmt, ...) IM_FMTARGS(2) { } void ArchipelagoConsoleWindow::DrawElement() { - // Reserve enough left-over height for 1 separator + 1 input text - const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); - if (ImGui::Button("Add line to log")) { + ArchipelagoConsole_SendMessage("[LOG] Hello World"); + ArchipelagoConsole_SendMessage("[ERROR] Hello World"); ArchipelagoConsole_SendMessage("Hello World"); } @@ -36,18 +35,21 @@ void ArchipelagoConsoleWindow::DrawElement() { // Normally you would store more information in your item than just a string. // (e.g. make Items[] an array of structure, store color/type etc.) ImVec4 color; - bool has_color = false; - if (strstr(item, "[error]")) { + bool hasColor = false; + if (strstr(item, "[ERROR]")) { color = ImVec4(1.0f, 0.4f, 0.4f, 1.0f); - has_color = true; + hasColor = true; + } else if (strstr(item, "[LOG]")) { + color = ImVec4(0.7f, 0.7f, 1.0f, 1.0f); + hasColor = true; } else if (strncmp(item, "# ", 2) == 0) { color = ImVec4(1.0f, 0.8f, 0.6f, 1.0f); - has_color = true; + hasColor = true; } - if (has_color) + if (hasColor) ImGui::PushStyleColor(ImGuiCol_Text, color); ImGui::TextUnformatted(item); - if (has_color) + if (hasColor) ImGui::PopStyleColor(); } diff --git a/soh/soh/Network/Archipelago/ArchipelagoSettingsWindow.cpp b/soh/soh/Network/Archipelago/ArchipelagoSettingsWindow.cpp index df9c7cd5d..15eaa6072 100644 --- a/soh/soh/Network/Archipelago/ArchipelagoSettingsWindow.cpp +++ b/soh/soh/Network/Archipelago/ArchipelagoSettingsWindow.cpp @@ -6,32 +6,32 @@ #include "soh/Network/Archipelago/ArchipelagoConsoleWindow.h" void ArchipelagoSettingsWindow::DrawElement() { - ArchipelagoClient& AP_client = ArchipelagoClient::getInstance(); + ArchipelagoClient& AP_client = ArchipelagoClient::GetInstance(); ImGui::SeparatorText("Connection info"); - ImGui::InputText("Server Address", AP_client.get_server_address_buff(), AP_Client_consts::MAX_ADDRESS_LENGTH); - ImGui::InputText("Slot Name", AP_client.get_slot_name_buff(), AP_Client_consts::MAX_PLAYER_NAME_LENGHT); - ImGui::InputText("Password (leave blank for no password)", AP_client.get_password_buff(), + ImGui::InputText("Server Address", AP_client.GetServerAddressBuffer(), AP_Client_consts::MAX_ADDRESS_LENGTH); + ImGui::InputText("Slot Name", AP_client.GetSlotNameBuffer(), AP_Client_consts::MAX_PLAYER_NAME_LENGHT); + ImGui::InputText("Password (leave blank for no password)", AP_client.GetPasswordBuffer(), AP_Client_consts::MAX_PASSWORD_LENGTH, ImGuiInputTextFlags_Password); if (ImGui::Button("Connect")) { - bool success = AP_client.start_client(); + bool success = AP_client.StartClient(); ArchipelagoConsole_SendMessage("[LOG] Trying to connect..."); } ImGui::SameLine(); - ImGui::Text(ArchipelagoClient::getInstance().get_connection_status()); + ImGui::Text(ArchipelagoClient::GetInstance().GetConnectionStatus()); - if (ImGui::Button("scout")) { - AP_client.start_location_scouts(); + if (ImGui::Button("Scout")) { + AP_client.StartLocationScouts(); } ImGui::SameLine(); - if (ImGui::Button("link up")) { - CVarSetInteger("archipelago_connected", 1); + if (ImGui::Button("Link up")) { + CVarSetInteger("ArchipelagoConnected", 1); } UIWidgets::PaddedSeparator(); - if(ImGui::Button("give blue ruppie")) { - ArchipelagoClient::getInstance().on_item_recieved(66077, true); + if(ImGui::Button("Give Blue Rupee")) { + ArchipelagoClient::GetInstance().OnItemReceived(66077, true); } }; \ No newline at end of file diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 7b8f6f826..cb63f2b84 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -2594,7 +2594,7 @@ void SoH_ProcessDroppedFiles(std::string filePath) { } } -extern "C" void parse_archipelago() { +extern "C" void ParseArchipelago() { OTRGlobals::Instance->gRandoContext->ParseArchipelago(); } // #endregion diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index e8235670f..f4b75ec7f 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -166,7 +166,7 @@ void CheckTracker_OnMessageClose(); GetItemID RetrieveGetItemIDFromItemID(ItemID itemID); RandomizerGet RetrieveRandomizerGetFromItemID(ItemID itemID); -void parse_archipelago(); +void ParseArchipelago(); #endif #ifdef __cplusplus diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 742aa1af1..c3fef9a8e 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1030,7 +1030,7 @@ void DrawSeedHashSprites(FileChooseContext* this) { u8 generating; int retries = 0; bool fileSelectSpoilerFileLoaded = false; -bool fileSelectarchipelagoloaded = false; +bool fileSelectArchipelagoLoaded = false; void FileChoose_UpdateRandomizer() { if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) != 0 && generating == 0) { @@ -1075,11 +1075,10 @@ void FileChoose_UpdateRandomizer() { } } - if (CVarGetInteger("archipelago_connected", 0) != 0 - && !fileSelectarchipelagoloaded) { - parse_archipelago(); - fileSelectarchipelagoloaded = true; - Audio_PlayFanfare(NA_BGM_HORSE_GOAL); + if (CVarGetInteger("ArchipelagoConnected", 0) && !fileSelectArchipelagoLoaded) { + ParseArchipelago(); + fileSelectArchipelagoLoaded = true; + Audio_PlayFanfare(NA_BGM_HORSE_GOAL); } } @@ -3939,7 +3938,7 @@ void FileChoose_Init(GameState* thisx) { this->questType[1] = MIN_QUEST; this->questType[2] = MIN_QUEST; fileSelectSpoilerFileLoaded = false; - fileSelectarchipelagoloaded = false; + fileSelectArchipelagoLoaded = false; CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0); SREG(30) = 1;