From 965f87b6eb707fb3f37539d70591e35f7c96fe67 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 27 Feb 2025 18:44:41 -0500 Subject: [PATCH] Reintroduce missing Mysterious warp song hint --- .../custom-message/CustomMessageManager.cpp | 4 ++ .../custom-message/CustomMessageManager.h | 1 + .../randomizer/Messages/StaticHints.cpp | 39 +++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp index b5e4163cd..be152cf4b 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp @@ -744,6 +744,10 @@ std::string CustomMessage::PLAYER_NAME() { return "\x0F"s; } +std::string CustomMessage::TWO_WAY_CHOICE() { + return "\x1B"s; +} + bool CustomMessageManager::InsertCustomMessage(std::string tableID, uint16_t textID, CustomMessage messages) { auto foundMessageTable = messageTables.find(tableID); if (foundMessageTable == messageTables.end()) { diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.h b/soh/soh/Enhancements/custom-message/CustomMessageManager.h index 943b18970..d9b3ed29b 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.h @@ -56,6 +56,7 @@ class CustomMessage { static std::string POINTS(std::string x) ;//HIGH_SCORE is also a macro static std::string WAIT_FOR_INPUT() ; static std::string PLAYER_NAME() ; + static std::string TWO_WAY_CHOICE(); const std::string GetEnglish(MessageFormat format = MF_FORMATTED) const; const std::string GetFrench(MessageFormat format = MF_FORMATTED) const; diff --git a/soh/soh/Enhancements/randomizer/Messages/StaticHints.cpp b/soh/soh/Enhancements/randomizer/Messages/StaticHints.cpp index b0a47f0ea..6aa9dbb08 100644 --- a/soh/soh/Enhancements/randomizer/Messages/StaticHints.cpp +++ b/soh/soh/Enhancements/randomizer/Messages/StaticHints.cpp @@ -145,37 +145,76 @@ void BuildGregHintMessage(uint16_t* textId, bool* loadFromMessageTable) { } } +void BuildMysteriousWarpMessage() { + CustomMessage msg = CustomMessage( + "Warp to&%ra mysterious place?%w&" + CustomMessage::TWO_WAY_CHOICE() + "%gOK&No%w", + "Zu&%reinem mysteriösen Ort%w?&" + CustomMessage::TWO_WAY_CHOICE() + "%gOK&No%w", + "Se téléporter vers&%run endroit mystérieux%w?&" + CustomMessage::TWO_WAY_CHOICE() + "%rOK!&Non%w" + ); + msg.LoadIntoFont(); +} + void BuildMinuetWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_MINUET_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false; } void BuildBoleroWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_BOLERO_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false; } void BuildSerenadeWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_SERENADE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false; } void BuildRequiemWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_REQUIEM_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false; } void BuildNocturneWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_NOCTURNE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false; } void BuildPreludeWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { + if (RAND_GET_OPTION(RSK_WARP_SONG_HINTS).Is(RO_GENERIC_OFF)) { + BuildMysteriousWarpMessage(); + *loadFromMessageTable = false; + return; + } CustomMessage msg = RAND_GET_HINT(RH_PRELUDE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT); msg.LoadIntoFont(); *loadFromMessageTable = false;