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

@@ -2229,17 +2229,11 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
return false;
}
#if TTD_ENDIAN == TTD_BIG_ENDIAN
for (uint i = 0; i < TEXT_TAB_END; i++) {
lang_pack->offsets[i] = ReadLE16Aligned(&lang_pack->offsets[i]);
}
#endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */
std::array<uint, TEXT_TAB_END> tab_start, tab_num;
uint count = 0;
for (uint i = 0; i < TEXT_TAB_END; i++) {
uint16_t num = lang_pack->offsets[i];
uint16_t num = FROM_LE16(lang_pack->offsets[i]);
if (num > TAB_SIZE) return false;
tab_start[i] = count;