From bb8152b3763f1d92319a31c184af865bcb343517 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Mon, 1 Aug 2022 23:16:16 -0400 Subject: [PATCH] Replaces string literal for BaseGameOverrides with const variable. --- soh/soh/OTRGlobals.cpp | 2 +- soh/soh/OTRGlobals.h | 2 ++ soh/soh/z_message_OTR.cpp | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 088e589fa..5662d4895 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1518,7 +1518,7 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { } else { textId = TEXT_GS_FREEZE; } - messageEntry = CustomMessageManager::Instance->RetrieveMessage("BaseGameOverrides", textId); + messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId); } } if (messageEntry.textBoxType != -1) { diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 76212c676..4f3b2a7b6 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -10,6 +10,8 @@ #include "Enhancements/savestates.h" #include "Enhancements/randomizer/randomizer.h" +const std::string customMessageTableID = "BaseGameOverrides"; + class OTRGlobals { public: diff --git a/soh/soh/z_message_OTR.cpp b/soh/soh/z_message_OTR.cpp index cdc1c79e8..4fd74e497 100644 --- a/soh/soh/z_message_OTR.cpp +++ b/soh/soh/z_message_OTR.cpp @@ -15,8 +15,6 @@ extern "C" MessageTableEntry* sFraMessageEntryTablePtr; extern "C" MessageTableEntry* sStaffMessageEntryTablePtr; //extern "C" MessageTableEntry* _message_0xFFFC_nes; -const std::string customMessageTableID = "BaseGameOverrides"; - MessageTableEntry* OTRMessage_LoadTable(const char* filePath, bool isNES) { auto file = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(filePath));