diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-25 20:19:02 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-27 15:14:54 +0200 |
commit | b21bd9230a0cd169497438aaaa4a7c9052472816 (patch) | |
tree | cd2696336d1f34926979e7e6ea062c5b4bfdfb86 /extension/src/openvic-extension/GameSingleton.hpp | |
parent | de2017128313b9a322eb59c40a4180099d9c18b7 (diff) |
Terrain types calculation, label and mapmode
Diffstat (limited to 'extension/src/openvic-extension/GameSingleton.hpp')
-rw-r--r-- | extension/src/openvic-extension/GameSingleton.hpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/extension/src/openvic-extension/GameSingleton.hpp b/extension/src/openvic-extension/GameSingleton.hpp index 2a72e2f..56c9e88 100644 --- a/extension/src/openvic-extension/GameSingleton.hpp +++ b/extension/src/openvic-extension/GameSingleton.hpp @@ -8,22 +8,6 @@ namespace OpenVic { - struct TerrainVariant : HasIdentifier { - friend class GameSingleton; - - private: - const godot::Ref<godot::Image> image; - - TerrainVariant(const std::string_view new_identfier, godot::Ref<godot::Image> const& new_image); - - public: - static constexpr size_t MAX_TERRIN_VARIANT_COUNT = 1 << (8 * sizeof(TerrainTypeMapping::index_t)); - - TerrainVariant(TerrainVariant&&) = default; - - godot::Ref<godot::Image> get_image() const; - }; - class GameSingleton : public godot::Object { GDCLASS(GameSingleton, godot::Object) @@ -37,13 +21,12 @@ namespace OpenVic { godot::Ref<godot::Image> province_colour_image; godot::Ref<godot::ImageTexture> province_colour_texture; Mapmode::index_t mapmode_index = 0; - IdentifierRegistry<TerrainVariant> terrain_variants; godot::Ref<godot::Texture2DArray> terrain_texture; godot::Error _generate_terrain_texture_array(); - godot::Error _load_map_images(godot::String const& province_image_path, godot::String const& terrain_image_path, bool flip_vertical = false); + godot::Error _load_map_images(bool flip_vertical = false); - godot::Error _load_terrain_variants_compatibility_mode(godot::String const& terrain_image_path, godot::String const& terrain_texturesheet_path); + godot::Error _load_terrain_variants_compatibility_mode(godot::String const& terrain_texturesheet_path); /* Generate the province_colour_texture from the current mapmode. */ @@ -87,6 +70,7 @@ namespace OpenVic { static godot::StringName const& get_province_info_province_key(); static godot::StringName const& get_province_info_region_key(); static godot::StringName const& get_province_info_life_rating_key(); + static godot::StringName const& get_province_info_terrain_type_key(); static godot::StringName const& get_province_info_total_population_key(); static godot::StringName const& get_province_info_pop_types_key(); static godot::StringName const& get_province_info_pop_ideologies_key(); |