From 2a845a79749df0057783dfe1ca67de513b2e4886 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 3 Aug 2025 20:24:49 -0500 Subject: [PATCH] fix word highlighting where substitutions are used --- src/game/boe.newgraph.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/boe.newgraph.cpp b/src/game/boe.newgraph.cpp index b978b3a0..cd920e4f 100644 --- a/src/game/boe.newgraph.cpp +++ b/src/game/boe.newgraph.cpp @@ -34,6 +34,7 @@ #include "tools/enum_map.hpp" #include "replay.hpp" #include +#include short monsters_faces[190] = { 0,1,2,3,4,5,6,7,8,9, @@ -994,6 +995,13 @@ void place_talk_str(std::string str_to_place,std::string str_to_place2,short col // First determine the offsets of clickable words. // 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 substitutions; + for(auto it : substitutions){ + boost::replace_all(str, it.first, it.second); + } + std::vector hilites; std::vector nodes; int wordStart = 0, wordEnd = 0;