aboutsummaryrefslogtreecommitdiff
path: root/extension/src/LoadGameOpenVic.cpp
diff options
context:
space:
mode:
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());