diff options
author | Hop311 <hop3114@gmail.com> | 2023-08-17 21:55:15 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-09 21:52:00 +0200 |
commit | 5d127faa9388ecb763846c3bf19190c891d2a583 (patch) | |
tree | 414e7e5703a5ff37fbfa79d4df7e94ca0cddd7de /extension/src/GameSingleton.cpp | |
parent | 1013b3c21226f703caba954664628694aedde469 (diff) |
Moved index_t back to Province
Diffstat (limited to 'extension/src/GameSingleton.cpp')
-rw-r--r-- | extension/src/GameSingleton.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extension/src/GameSingleton.cpp b/extension/src/GameSingleton.cpp index 18fd67a..25f7195 100644 --- a/extension/src/GameSingleton.cpp +++ b/extension/src/GameSingleton.cpp @@ -381,14 +381,14 @@ Ref<Texture> GameSingleton::get_province_colour_texture() const { Error GameSingleton::_update_colour_image() { static PackedByteArray colour_data_array; - static constexpr int64_t colour_data_array_size = (MAX_INDEX + 1) * Map::MAPMODE_COLOUR_SIZE; + static constexpr int64_t colour_data_array_size = (static_cast<int64_t>(Province::MAX_INDEX) + 1) * Map::MAPMODE_COLOUR_SIZE; colour_data_array.resize(colour_data_array_size); Error err = OK; if (game_manager.map.generate_mapmode_colours(mapmode_index, colour_data_array.ptrw()) != SUCCESS) err = FAILED; - static constexpr int32_t PROVINCE_INDEX_SQRT = 1 << (sizeof(index_t) * 4); + static constexpr int32_t PROVINCE_INDEX_SQRT = 1 << (sizeof(Province::index_t) * 4); if (province_colour_image.is_null()) { province_colour_image.instantiate(); ERR_FAIL_NULL_V_EDMSG(province_colour_image, FAILED, |