aboutsummaryrefslogtreecommitdiff
path: root/src/openvic2/map/Map.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-05-09 21:10:02 +0200
committer GitHub <noreply@github.com>2023-05-09 21:10:02 +0200
commit339e0278a2064f7eeb152fe8c5778840b609e9f3 (patch)
tree05bb2635d921de9ad138736d49e4b5ea7a419c23 /src/openvic2/map/Map.hpp
parent1838e79d6af83dbed2f1b387acf02aacca0eb4bc (diff)
parent3550c455526eb6f8935f488810e73fe01a1177a9 (diff)
Merge pull request #2 from OpenVic2Project/goods
Added GoodManager
Diffstat (limited to 'src/openvic2/map/Map.hpp')
-rw-r--r--src/openvic2/map/Map.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openvic2/map/Map.hpp b/src/openvic2/map/Map.hpp
index cb8dcb1..dd42076 100644
--- a/src/openvic2/map/Map.hpp
+++ b/src/openvic2/map/Map.hpp
@@ -21,6 +21,8 @@ namespace OpenVic2 {
colour_t get_colour(Map const& map, Province const& province) const;
};
+ struct GoodManager;
+
/* REQUIREMENTS:
* MAP-4
*/
@@ -46,6 +48,7 @@ namespace OpenVic2 {
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;
index_t get_index_from_colour(colour_t colour) const;
public:
@@ -64,6 +67,9 @@ namespace OpenVic2 {
Province* get_province_by_identifier(std::string const& identifier);
Province const* get_province_by_identifier(std::string const& 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 const* get_selected_province() const;
Region* get_region_by_identifier(std::string const& identifier);
Region const* get_region_by_identifier(std::string const& identifier) const;
@@ -82,7 +88,7 @@ namespace OpenVic2 {
static constexpr size_t MAPMODE_COLOUR_SIZE = 4;
return_t generate_mapmode_colours(Mapmode::index_t index, uint8_t* target) const;
- return_t generate_province_buildings(BuildingManager const& manager);
+ return_t setup(GoodManager const& good_manager, BuildingManager const& building_manager);
void update_state(Date const& today);
void tick(Date const& today);