substitutions no longer needed
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -108,22 +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 = {
|
||||
{"–", "--"},
|
||||
{"´", "'"},
|
||||
{"©", "(C)"},
|
||||
{"…", "..."},
|
||||
{"™", "TM"}
|
||||
};
|
||||
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user