diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp index 91083d6ae..dc520209f 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp @@ -443,6 +443,13 @@ static size_t NextLineLength(const std::string* textStr, const size_t lastNewlin nextPosJump = 1; } } + currentPos += nextPosJump; + } + // return the total number of characters we looped through + if (totalPixelWidth > maxLinePixelWidth && textStr->at(currentPos - nextPosJump) != ' ') { + return currentPos - lastNewline - nextPosJump; + } else { + return currentPos - lastNewline; } } diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.h b/soh/soh/Enhancements/custom-message/CustomMessageManager.h index bf1657aec..baaf5ac40 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.h @@ -62,7 +62,6 @@ class CustomMessage { static std::string PLAYER_NAME(); static std::string TWO_WAY_CHOICE(); - CustomMessage LoadVanillaMessageTableEntry(uint16_t textId); const std::string GetEnglish(MessageFormat format = MF_FORMATTED) const; const std::string GetFrench(MessageFormat format = MF_FORMATTED) const; const std::string GetGerman(MessageFormat format = MF_FORMATTED) const; diff --git a/soh/soh/Enhancements/randomizer/static_data.cpp b/soh/soh/Enhancements/randomizer/static_data.cpp index 473f7edcd..68b1b3e7e 100644 --- a/soh/soh/Enhancements/randomizer/static_data.cpp +++ b/soh/soh/Enhancements/randomizer/static_data.cpp @@ -86,12 +86,6 @@ std::unordered_map StaticData::hintNames = { { RH_BIGGORON_HINT, CustomMessage("Biggoron Claim Check Hint") }, { RH_FROGS_HINT, CustomMessage("Final Frogs in River Hint") }, { RH_OOT_HINT, CustomMessage("Sheik in Temple of Time Hint") }, - { RH_KAK_10_SKULLS_HINT, CustomMessage("10 Skulls Hint") }, - { RH_KAK_20_SKULLS_HINT, CustomMessage("20 Skulls Hint") }, - { RH_KAK_30_SKULLS_HINT, CustomMessage("30 Skulls Hint") }, - { RH_KAK_40_SKULLS_HINT, CustomMessage("40 Skulls Hint") }, - { RH_KAK_50_SKULLS_HINT, CustomMessage("50 Skulls Hint") }, - { RH_KAK_100_SKULLS_HINT, CustomMessage("100 Skulls Hint") }, { RH_MASK_SHOP_HINT, CustomMessage("Mask Shop Hint") }, };