substitutions no longer needed

This commit is contained in:
2025-08-18 11:48:32 -05:00
parent 591387c3dc
commit 095a5a793f
2 changed files with 0 additions and 17 deletions

View File

@@ -1013,12 +1013,6 @@ void place_talk_str(std::string str_to_place,std::string str_to_place2,short col
// The added spaces ensure that end-of-word boundaries are found
std::string str = str_to_place + " |" + str_to_place2 + " ";
// TODO use a font where we don't need this
extern std::map<std::string,std::string> substitutions;
for(auto it : substitutions){
boost::replace_all(str, it.first, it.second);
}
std::vector<hilite_t> hilites;
std::vector<int> nodes;
int wordStart = 0, wordEnd = 0;

View File

@@ -108,18 +108,10 @@ static void push_snippets(size_t start, size_t end, text_params_t& options, size
} while(start < upper_bound);
}
std::map<std::string, std::string> substitutions = {
{"", "--"}
};
break_info_t calculate_line_wrapping(rectangle dest_rect, std::string str, TextStyle style) {
break_info_t break_info;
if(str.empty()) return break_info; // Nothing to do!
for(auto it : substitutions){
boost::replace_all(str, it.first, it.second);
}
sf::Text str_to_draw;
style.applyTo(str_to_draw);
short str_len = str.length();
@@ -260,9 +252,6 @@ static void win_draw_string(sf::RenderTarget& dest_window,rectangle dest_rect,st
// TODO: Why the heck are we drawing a whole line higher than requested!?
adjust_y -= str_to_draw.getLocalBounds().height;
for(auto it : substitutions){
boost::replace_all(str, it.first, it.second);
}
str_to_draw.setString(sf::String::fromUtf8(str.begin(), str.end()));
short total_width = str_to_draw.getLocalBounds().width;