diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-05-02 11:25:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 11:25:32 +0200 |
commit | 9f772a314dc130df95fe5e3b018a9ba60e5be5b1 (patch) | |
tree | ab138ae3c615adeb51972b4bfff992dea86cd69c /extension/src/openvic2/map/Map.hpp | |
parent | be43b260128664756054a289cf9d22319def1f8a (diff) | |
parent | 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (diff) |
Merge pull request #97 from Spartan322/update/clang-format
Diffstat (limited to 'extension/src/openvic2/map/Map.hpp')
-rw-r--r-- | extension/src/openvic2/map/Map.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extension/src/openvic2/map/Map.hpp b/extension/src/openvic2/map/Map.hpp index cb8dcb1..4fc97c9 100644 --- a/extension/src/openvic2/map/Map.hpp +++ b/extension/src/openvic2/map/Map.hpp @@ -9,13 +9,15 @@ namespace OpenVic2 { struct Mapmode : HasIdentifier { friend struct Map; - using colour_func_t = std::function<colour_t (Map const&, Province const&)>; + using colour_func_t = std::function<colour_t(Map const&, Province const&)>; using index_t = size_t; + private: const index_t index; const colour_func_t colour_func; Mapmode(index_t new_index, std::string const& new_identifier, colour_func_t new_colour_func); + public: index_t get_index() const; colour_t get_colour(Map const& map, Province const& province) const; @@ -28,12 +30,12 @@ namespace OpenVic2 { using terrain_t = uint8_t; using terrain_variant_map_t = std::map<colour_t, terrain_t>; - #pragma pack(push, 1) +#pragma pack(push, 1) struct shape_pixel_t { index_t index; terrain_t terrain; }; - #pragma pack(pop) +#pragma pack(pop) private: using colour_index_map_t = std::map<colour_t, index_t>; @@ -48,6 +50,7 @@ namespace OpenVic2 { colour_index_map_t colour_index_map; index_t get_index_from_colour(colour_t colour) const; + public: Map(); |