From 3da197f0cdd7ef7f6bcf6c651f73e75a97a25503 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 14:39:12 -0400 Subject: [PATCH] Removes some magic numbers --- soh/soh/Enhancements/custom-message/CustomMessageTypes.h | 2 +- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- soh/soh/OTRGlobals.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h index d82cd84a9..dff85f415 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h @@ -16,7 +16,7 @@ typedef enum { TEXT_RED_RUPEE = 0xF0, TEXT_PURPLE_RUPEE = 0xF1, TEXT_HUGE_RUPEE = 0xF2, - TEXT_BEAN_SALESEMAN = 0x405E + TEXT_BEAN_SALESMAN = 0x405E } TextIDs; #ifdef __cplusplus diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 66ecbc7d9..72533c3c4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3741,7 +3741,7 @@ void CreateScrubMessages() { }); } customMessageManager->CreateMessage( - Randomizer::scrubMessageTableID, 0x405E, + Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f2d3c4844..59d0bbad9 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1727,8 +1727,8 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { // In rando, replace Navi's general overworld hints with rando-related gameplay tips } else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) { messageEntry = Randomizer_GetNaviMessage(); - } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESEMAN) { - messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESEMAN); + } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) { + messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN); } } if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {