From 35b4fa2e5c6c7fd082493ec143cf236da69f7ba1 Mon Sep 17 00:00:00 2001 From: Arturo <69714460+Jarturog@users.noreply.github.com> Date: Sun, 18 Feb 2024 21:27:58 +0100 Subject: Regions are now coloured from colors.txt --- src/openvic-simulation/map/Map.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/openvic-simulation/map/Map.hpp') diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp index a472a6c..e2c4bd6 100644 --- a/src/openvic-simulation/map/Map.hpp +++ b/src/openvic-simulation/map/Map.hpp @@ -116,7 +116,7 @@ namespace OpenVic { Province* get_selected_province(); Province::index_t get_selected_province_index() const; - bool add_region(std::string_view identifier, Region::provinces_t const& provinces); + bool add_region(std::string_view identifier, Region::provinces_t const& provinces, colour_t colour); bool add_mapmode(std::string_view identifier, Mapmode::colour_func_t colour_func); @@ -139,7 +139,8 @@ namespace OpenVic { bool load_province_definitions(std::vector const& lines); /* Must be loaded after adjacencies so we know what provinces are coastal, and so can have a port */ bool load_province_positions(BuildingTypeManager const& building_type_manager, ast::NodeCPtr root); - bool load_region_file(ast::NodeCPtr root); + static bool load_region_colours(ast::NodeCPtr root, std::vector& colours); + bool load_region_file(ast::NodeCPtr root, std::vector const& colours); bool load_map_images(fs::path const& province_path, fs::path const& terrain_path, bool detailed_errors); bool generate_and_load_province_adjacencies(std::vector const& additional_adjacencies); bool load_climate_file(ModifierManager const& modifier_manager, ast::NodeCPtr root); -- cgit v1.2.3-56-ga3b1