aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/map/Map.hpp')
-rw-r--r--src/openvic-simulation/map/Map.hpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp
index cef0962..f286276 100644
--- a/src/openvic-simulation/map/Map.hpp
+++ b/src/openvic-simulation/map/Map.hpp
@@ -57,7 +57,7 @@ namespace OpenVic {
IdentifierRegistry<Region> regions;
IdentifierRegistry<Mapmode> mapmodes;
ProvinceSet water_provinces;
- TerrainTypeManager terrain_type_manager;
+ TerrainTypeManager PROPERTY_REF(terrain_type_manager);
size_t width = 0, height = 0;
std::vector<shape_pixel_t> province_shape_image;
@@ -70,21 +70,19 @@ namespace OpenVic {
Province::index_t get_index_from_colour(colour_t colour) const;
bool _generate_province_adjacencies();
- StateManager state_manager;
+ StateManager PROPERTY_REF(state_manager);
public:
Map();
bool add_province(std::string_view identifier, colour_t colour);
- IDENTIFIER_REGISTRY_ACCESSORS(province)
- IDENTIFIER_REGISTRY_NON_CONST_ACCESSORS(province)
+ IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_INDEX_OFFSET(province, 1)
+ IDENTIFIER_REGISTRY_NON_CONST_ACCESSORS_CUSTOM_INDEX_OFFSET(province, 1);
bool set_water_province(std::string_view identifier);
bool set_water_province_list(std::vector<std::string_view> const& list);
void lock_water_provinces();
- Province* get_province_by_index(Province::index_t index);
- Province const* get_province_by_index(Province::index_t index) const;
Province::index_t get_province_index_at(size_t x, size_t y) const;
bool set_max_provinces(Province::index_t new_max_provinces);
Province::index_t get_max_provinces() const;
@@ -95,7 +93,6 @@ namespace OpenVic {
size_t get_width() const;
size_t get_height() const;
std::vector<shape_pixel_t> const& get_province_shape_image() const;
- REF_GETTERS(terrain_type_manager)
bool add_region(std::string_view identifier, std::vector<std::string_view> const& province_identifiers);
IDENTIFIER_REGISTRY_ACCESSORS(region)
@@ -103,9 +100,6 @@ namespace OpenVic {
bool add_mapmode(std::string_view identifier, Mapmode::colour_func_t colour_func);
IDENTIFIER_REGISTRY_ACCESSORS(mapmode)
- Mapmode const* get_mapmode_by_index(size_t index) const;
-
- REF_GETTERS(state_manager);
/* The mapmode colour image contains of a list of base colours and stripe colours. Each colour is four bytes
* in RGBA format, with the alpha value being used to interpolate with the terrain colour, so A = 0 is fully terrain