From 5d127faa9388ecb763846c3bf19190c891d2a583 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 17 Aug 2023 20:55:15 +0100 Subject: Moved index_t back to Province --- extension/src/LoadGameOpenVic.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'extension/src/LoadGameOpenVic.cpp') 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(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()); -- cgit v1.2.3-56-ga3b1