Reintroduce missing Mysterious warp song hint

This commit is contained in:
Christopher Leggett 2025-02-27 18:44:41 -05:00
commit 97d7c60427
No known key found for this signature in database
GPG key ID: F2121C0AF9938ABF
3 changed files with 51 additions and 9 deletions

View file

@ -725,6 +725,10 @@ std::string CustomMessage::PLAYER_NAME() {
return "\x0F"s; return "\x0F"s;
} }
std::string CustomMessage::TWO_WAY_CHOICE() {
return "\x1B"s;
}
bool CustomMessageManager::InsertCustomMessage(std::string tableID, uint16_t textID, CustomMessage messages) { bool CustomMessageManager::InsertCustomMessage(std::string tableID, uint16_t textID, CustomMessage messages) {
auto foundMessageTable = messageTables.find(tableID); auto foundMessageTable = messageTables.find(tableID);
if (foundMessageTable == messageTables.end()) { if (foundMessageTable == messageTables.end()) {

View file

@ -50,15 +50,14 @@ class CustomMessage {
TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM); TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM);
CustomMessage(Text text, 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 MESSAGE_END(); static std::string NEWLINE() ;
static std::string ITEM_OBTAINED(uint8_t x); static std::string COLOR(std::string x) ;
static std::string NEWLINE(); static std::string POINTS(std::string x) ;//HIGH_SCORE is also a macro
static std::string COLOR(std::string x); static std::string WAIT_FOR_INPUT() ;
static std::string POINTS(std::string x); // HIGH_SCORE is also a macro static std::string PLAYER_NAME() ;
static std::string WAIT_FOR_INPUT(); static std::string TWO_WAY_CHOICE();
static std::string PLAYER_NAME();
const std::string GetEnglish(MessageFormat format = MF_FORMATTED) const; const std::string GetEnglish(MessageFormat format = MF_FORMATTED) const;
const std::string GetFrench(MessageFormat format = MF_FORMATTED) const; const std::string GetFrench(MessageFormat format = MF_FORMATTED) const;

View file

@ -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) { 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); CustomMessage msg = RAND_GET_HINT(RH_MINUET_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;
} }
void BuildBoleroWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { 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); CustomMessage msg = RAND_GET_HINT(RH_BOLERO_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;
} }
void BuildSerenadeWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { 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); CustomMessage msg = RAND_GET_HINT(RH_SERENADE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;
} }
void BuildRequiemWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { 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); CustomMessage msg = RAND_GET_HINT(RH_REQUIEM_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;
} }
void BuildNocturneWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { 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); CustomMessage msg = RAND_GET_HINT(RH_NOCTURNE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;
} }
void BuildPreludeWarpMessage(uint16_t* textId, bool* loadFromMessageTable) { 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); CustomMessage msg = RAND_GET_HINT(RH_PRELUDE_WARP_LOC)->GetHintMessage(MF_AUTO_FORMAT);
msg.LoadIntoFont(); msg.LoadIntoFont();
*loadFromMessageTable = false; *loadFromMessageTable = false;