diff options
author | Hop311 <Hop3114@gmail.com> | 2023-04-29 00:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 00:40:18 +0200 |
commit | 05937359e8c53ee76dc3ce537dd70083a016f766 (patch) | |
tree | 899b97479f6a1aabbfe352747bea162ce5720193 /extension/src/GameSingleton.hpp | |
parent | 10053cf259c55ee45803268a844edf1011d8a16b (diff) | |
parent | 5022ec800b096e9a85d6ef07ca4b652abb8625ee (diff) |
Merge pull request #101 from OpenVic2Project/more-image-processing
Dynamic minimap + vertical map subdivision
Diffstat (limited to 'extension/src/GameSingleton.hpp')
-rw-r--r-- | extension/src/GameSingleton.hpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/extension/src/GameSingleton.hpp b/extension/src/GameSingleton.hpp index d9879ef..d17b950 100644 --- a/extension/src/GameSingleton.hpp +++ b/extension/src/GameSingleton.hpp @@ -2,7 +2,8 @@ #include <functional> -#include <godot_cpp/classes/image.hpp> +#include <godot_cpp/classes/image_texture.hpp> +#include <godot_cpp/classes/texture2d_array.hpp> #include "openvic2/GameManager.hpp" @@ -14,8 +15,10 @@ namespace OpenVic2 { GameManager game_manager; - static constexpr int image_width_divide = 2; - godot::Ref<godot::Image> province_index_image[image_width_divide], province_colour_image; + godot::Vector2i image_subdivisions; + godot::Ref<godot::Texture2DArray> province_shape_texture; + godot::Ref<godot::Image> province_colour_image; + godot::Ref<godot::ImageTexture> province_colour_texture; Mapmode::index_t mapmode_index = 0; godot::Error _parse_province_identifier_entry(godot::String const& identifier, godot::Variant const& entry); @@ -40,8 +43,10 @@ namespace OpenVic2 { godot::Dictionary get_province_info_from_index(int32_t index) const; int32_t get_width() const; int32_t get_height() const; - godot::Array get_province_index_images() const; - godot::Ref<godot::Image> get_province_colour_image() const; + float get_aspect_ratio() const; + godot::Vector2i get_province_shape_image_subdivisions() const; + godot::Ref<godot::Texture> get_province_shape_texture() const; + godot::Ref<godot::Texture> get_province_colour_texture() const; godot::Error update_colour_image(); int32_t get_mapmode_count() const; |