From d3f3187209cb4085f27f95ce8ad2a77af25704fd Mon Sep 17 00:00:00 2001 From: Hop311 Date: Sun, 23 Apr 2023 19:49:01 +0100 Subject: C++ refactoring + simulation prototype --- extension/src/MapSingleton.hpp | 50 ------------------------------------------ 1 file changed, 50 deletions(-) delete mode 100644 extension/src/MapSingleton.hpp (limited to 'extension/src/MapSingleton.hpp') diff --git a/extension/src/MapSingleton.hpp b/extension/src/MapSingleton.hpp deleted file mode 100644 index 6ec2ea4..0000000 --- a/extension/src/MapSingleton.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include - -#include - -#include "openvic2/Map.hpp" - -namespace OpenVic2 { - class MapSingleton : public godot::Object { - GDCLASS(MapSingleton, godot::Object) - - static MapSingleton* singleton; - - godot::Ref province_index_image, province_colour_image; - Map map; - Mapmode::index_t mapmode_index = 0; - - godot::Error _parse_province_identifier_entry(godot::String const& identifier, godot::Variant const& entry); - godot::Error _parse_region_entry(godot::String const& identifier, godot::Variant const& entry); - 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_water_province_file(godot::String const& file_path); - godot::Error load_region_file(godot::String const& file_path); - godot::Error load_province_shape_file(godot::String const& file_path); - - Province* get_province_from_uv_coords(godot::Vector2 const& coords); - Province const* get_province_from_uv_coords(godot::Vector2 const& coords) const; - int32_t get_province_index_from_uv_coords(godot::Vector2 const& coords) const; - godot::String get_province_identifier_from_uv_coords(godot::Vector2 const& coords) const; - godot::String get_region_identifier_from_province_identifier(godot::String const& identifier) const; - int32_t get_width() const; - int32_t get_height() const; - godot::Ref get_province_index_image() const; - godot::Ref get_province_colour_image() const; - - godot::Error update_colour_image(); - int32_t get_mapmode_count() const; - godot::String get_mapmode_identifier(int32_t index) const; - godot::Error set_mapmode(godot::String const& identifier); - }; -} -- cgit v1.2.3-56-ga3b1