diff options
author | Hop311 <Hop3114@gmail.com> | 2023-04-29 00:48:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 00:48:13 +0200 |
commit | 5195a460330af234391dfdc892847d74d0d29393 (patch) | |
tree | 588f505bd94991b3a6c7a95b18b02e712df36cc7 /extension/src/GameSingleton.hpp | |
parent | 1b35c3a4434873b98f8e3aa7770f0edd37ec053c (diff) | |
parent | 05937359e8c53ee76dc3ce537dd70083a016f766 (diff) |
Merge branch 'main' into goods
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; |