aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/MapItemSingleton.hpp
diff options
context:
space:
mode:
author Nemrav <>2024-11-17 21:28:59 +0100
committer Nemrav <>2024-11-17 21:28:59 +0100
commit005bc5885a5ff436982246f12e9cfa13231bcf82 (patch)
tree799701d81b0b57e16581dcd692da9080254ee814 /extension/src/openvic-extension/singletons/MapItemSingleton.hpp
parent401f3ffbc5e727e46c42c5643b4e9515e23a3c03 (diff)
billboards in game session
Diffstat (limited to 'extension/src/openvic-extension/singletons/MapItemSingleton.hpp')
-rw-r--r--extension/src/openvic-extension/singletons/MapItemSingleton.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/singletons/MapItemSingleton.hpp b/extension/src/openvic-extension/singletons/MapItemSingleton.hpp
new file mode 100644
index 0000000..5b10446
--- /dev/null
+++ b/extension/src/openvic-extension/singletons/MapItemSingleton.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <godot_cpp/classes/object.hpp>
+
+#include <openvic-simulation/interface/GFXObject.hpp>
+//#include <openvic-simulation/military/UnitInstanceGroup.hpp>
+#include <openvic-simulation/types/OrderedContainers.hpp>
+
+//billboards, projections, and progress bar
+
+
+namespace OpenVic {
+ class MapItemSingleton : public godot::Object {
+ GDCLASS(MapItemSingleton, godot::Object)
+
+ static inline MapItemSingleton* singleton = nullptr;
+
+ protected:
+ static void _bind_methods();
+
+ public:
+ static MapItemSingleton* get_singleton();
+
+ MapItemSingleton();
+ ~MapItemSingleton();
+
+ private:
+ GFX::Billboard const* get_billboard(std::string_view name, bool error_on_fail = true) const;
+ bool add_billboard_dict(std::string_view name, godot::TypedArray<godot::Dictionary>& billboard_dict_array);
+ godot::TypedArray<godot::Dictionary> get_billboards();
+ godot::PackedVector2Array get_province_positions();
+ };
+
+} \ No newline at end of file