aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Map.hpp
diff options
context:
space:
mode:
author Arturo <69714460+Jarturog@users.noreply.github.com>2024-02-22 22:22:25 +0100
committer GitHub <noreply@github.com>2024-02-22 22:22:25 +0100
commit164e76e367ff7dc5914f0d7105b5914fd3fba90a (patch)
treece02787f870da7584fb9ea275efa53d98431b7c2 /src/openvic-simulation/map/Map.hpp
parent147e0a772dc768bd90fdccdd2536f14c11238d57 (diff)
parent35b4fa2e5c6c7fd082493ec143cf236da69f7ba1 (diff)
Merge pull request #148 from OpenVicProject/region-colours
Regions are now coloured from colors.txt
Diffstat (limited to 'src/openvic-simulation/map/Map.hpp')
-rw-r--r--src/openvic-simulation/map/Map.hpp5
1 files changed, 3 insertions, 2 deletions
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<ovdl::csv::LineObject> 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<colour_t>& colours);
+ bool load_region_file(ast::NodeCPtr root, std::vector<colour_t> 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<ovdl::csv::LineObject> const& additional_adjacencies);
bool load_climate_file(ModifierManager const& modifier_manager, ast::NodeCPtr root);