diff options
author | Hop311 <hop3114@gmail.com> | 2023-04-03 19:38:27 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-04-03 19:38:27 +0200 |
commit | c7def7396da00b39eced666ad360397733712bfd (patch) | |
tree | 06fd1047a6193e9062c53375eeea2a8419f3cc1d /extension/src/MapSingleton.hpp | |
parent | 60ddfc88fd6dc259792532fadf9cc4407f90e95f (diff) |
Basic province id and shape loading and rendering.
Diffstat (limited to 'extension/src/MapSingleton.hpp')
-rw-r--r-- | extension/src/MapSingleton.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/extension/src/MapSingleton.hpp b/extension/src/MapSingleton.hpp new file mode 100644 index 0000000..767ae88 --- /dev/null +++ b/extension/src/MapSingleton.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <godot_cpp/core/class_db.hpp> +#include <godot_cpp/classes/image.hpp> +#include "openvic2/Map.hpp" + +namespace OpenVic2 { + class MapSingleton : public godot::Object { + + GDCLASS(MapSingleton, godot::Object) + + static MapSingleton* singleton; + + godot::Ref<godot::Image> province_shape_image; + Map map; + + protected: + static void _bind_methods(); + + public: + static MapSingleton* get_singleton(); + + MapSingleton(); + ~MapSingleton(); + + godot::Error load_province_identifier_file(godot::String const& file_path); + godot::Error load_province_shape_file(godot::String const& file_path); + godot::Ref<godot::Image> get_province_shape_image() const; + }; +} |