Merge branch 'master' into jgrpp

# Conflicts:
#	src/core/bitmath_func.cpp
#	src/core/bitmath_func.hpp
#	src/core/geometry_type.hpp
#	src/game/game_text.hpp
#	src/graph_gui.cpp
#	src/pathfinder/npf/npf.cpp
#	src/script/api/script_text.cpp
#	src/spritecache.cpp
#	src/track_func.h
This commit is contained in:
Jonathan G Rennison
2024-01-25 18:45:22 +00:00
46 changed files with 311 additions and 448 deletions

View File

@@ -263,8 +263,7 @@ Point Layouter::GetCharPosition(std::string_view::const_iterator ch) const
for (int i = 0; i < run.GetGlyphCount(); i++) {
/* Matching glyph? Return position. */
if ((size_t)charmap[i] == index) {
Point p = { (int)positions[i * 2], (int)positions[i * 2 + 1] };
return p;
return positions[i];
}
}
}
@@ -295,8 +294,8 @@ ptrdiff_t Layouter::GetCharAtPosition(int x, size_t line_index) const
/* Not a valid glyph (empty). */
if (glyphs[i] == 0xFFFF) continue;
int begin_x = (int)positions[i * 2];
int end_x = (int)positions[i * 2 + 2];
int begin_x = positions[i].x;
int end_x = positions[i + 1].x;
if (IsInsideMM(x, begin_x, end_x)) {
/* Found our glyph, now convert to UTF-8 string index. */