aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/map/Map.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-17 21:18:28 +0200
committer Hop311 <hop3114@gmail.com>2023-08-20 19:30:03 +0200
commit6f4a6c77c6f2613e65a403c3a2964d5041a538c7 (patch)
tree59829a5914ddcbe0bec150da536b06176c9e0055 /src/openvic/map/Map.hpp
parentbec619fc8f554cb075fcef2428f3b6bdb5e88e82 (diff)
Moved index_t back to Province
Diffstat (limited to 'src/openvic/map/Map.hpp')
-rw-r--r--src/openvic/map/Map.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/openvic/map/Map.hpp b/src/openvic/map/Map.hpp
index 64678c8..1b21f5d 100644
--- a/src/openvic/map/Map.hpp
+++ b/src/openvic/map/Map.hpp
@@ -36,12 +36,12 @@ namespace OpenVic {
#pragma pack(push, 1)
struct shape_pixel_t {
- index_t index;
+ Province::index_t index;
terrain_t terrain;
};
#pragma pack(pop)
private:
- using colour_index_map_t = std::map<colour_t, index_t>;
+ using colour_index_map_t = std::map<colour_t, Province::index_t>;
IdentifierRegistry<Province> provinces;
IdentifierRegistry<Region> regions;
@@ -51,11 +51,11 @@ namespace OpenVic {
size_t width = 0, height = 0;
std::vector<shape_pixel_t> province_shape_image;
colour_index_map_t colour_index_map;
- index_t selected_province = NULL_INDEX;
+ Province::index_t selected_province = Province::NULL_INDEX;
Pop::pop_size_t highest_province_population, total_map_population;
- index_t get_index_from_colour(colour_t colour) const;
+ Province::index_t get_index_from_colour(colour_t colour) const;
public:
Map();
@@ -68,13 +68,13 @@ namespace OpenVic {
void lock_regions();
size_t get_province_count() const;
- Province* get_province_by_index(index_t index);
- Province const* get_province_by_index(index_t index) const;
+ Province* get_province_by_index(Province::index_t index);
+ Province const* get_province_by_index(Province::index_t index) const;
Province* get_province_by_identifier(const std::string_view identifier);
Province const* get_province_by_identifier(const std::string_view identifier) const;
- index_t get_province_index_at(size_t x, size_t y) const;
- void set_selected_province(index_t index);
- index_t get_selected_province_index() const;
+ Province::index_t get_province_index_at(size_t x, size_t y) const;
+ void set_selected_province(Province::index_t index);
+ Province::index_t get_selected_province_index() const;
Province const* get_selected_province() const;
Region* get_region_by_identifier(const std::string_view identifier);