aboutsummaryrefslogtreecommitdiff
path: root/extension/src/LoadGameOpenVic.cpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-17 21:55:15 +0200
committer Hop311 <hop3114@gmail.com>2023-09-09 21:52:00 +0200
commit5d127faa9388ecb763846c3bf19190c891d2a583 (patch)
tree414e7e5703a5ff37fbfa79d4df7e94ca0cddd7de /extension/src/LoadGameOpenVic.cpp
parent1013b3c21226f703caba954664628694aedde469 (diff)
Moved index_t back to Province
Diffstat (limited to 'extension/src/LoadGameOpenVic.cpp')
-rw-r--r--extension/src/LoadGameOpenVic.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/extension/src/LoadGameOpenVic.cpp b/extension/src/LoadGameOpenVic.cpp
index 627578f..8e29f60 100644
--- a/extension/src/LoadGameOpenVic.cpp
+++ b/extension/src/LoadGameOpenVic.cpp
@@ -205,13 +205,14 @@ Error GameSingleton::_generate_terrain_texture_array() {
return FAILED;
}
// TerrainVariant count is limited by the data type representing it in the map image
- if (terrain_variants.get_item_count() > TerrainVariant::MAX_INDEX) {
- UtilityFunctions::push_error("Too many terrain textures - all after the first ", MAX_INDEX, " will be ignored");
+ if (terrain_variants.get_item_count() > TerrainVariant::MAX_TERRIN_VARIANT_COUNT) {
+ UtilityFunctions::push_error("Too many terrain textures - all after the first ",
+ static_cast<uint64_t>(TerrainVariant::MAX_TERRIN_VARIANT_COUNT), " will be ignored");
err = FAILED;
}
Array terrain_images;
- for (size_t i = 0; i < terrain_variants.get_item_count() && i < TerrainVariant::MAX_INDEX; ++i) {
+ for (size_t i = 0; i < terrain_variants.get_item_count() && i < TerrainVariant::MAX_TERRIN_VARIANT_COUNT; ++i) {
TerrainVariant const& var = *terrain_variants.get_item_by_index(i);
terrain_variant_map[var.get_colour()] = i;
terrain_images.append(var.get_image());