diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp index 6b04d5ade..823d60cb8 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp @@ -725,6 +725,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 cd778579e..6849ae306 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.h @@ -50,15 +50,14 @@ class CustomMessage { TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM); CustomMessage(Text text, TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM); - static CustomMessage LoadVanillaMessageTableEntry(uint16_t textId); - - static std::string MESSAGE_END(); - static std::string ITEM_OBTAINED(uint8_t x); - static std::string NEWLINE(); - static std::string COLOR(std::string x); - 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 MESSAGE_END() ; + static std::string ITEM_OBTAINED(uint8_t x) ; + static std::string NEWLINE() ; + static std::string COLOR(std::string x) ; + 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;