4 uint32_t province_size = state.world.province_size();
5 uint32_t texture_size = province_size + 256 - province_size % 256;
7 std::vector<uint32_t> prov_color(texture_size * 2);
10 state.world.for_each_province([&](dcon::province_id prov_id) {
11 auto nation = state.world.province_get_nation_from_province_ownership(prov_id);
15 bool party_allows_building_railroads =
16 (nation == state.local_player_nation &&
18 (nation != state.local_player_nation &&
22 if(party_allows_building_railroads) {
31 }
else if(current_rails_lvl == max_local_rails_lvl) {
42 prov_color[i] = color;
47 prov_color[i + texture_size] = color;
std::vector< uint32_t > infrastructure_map_from(sys::state &state)
constexpr uint32_t build_railway
constexpr uint32_t allow_foreign_investment
uint32_t color_gradient(float percent, uint32_t top_color, uint32_t bot_color)
bool can_build_railroads(sys::state &state, dcon::province_id id, dcon::nation_id n)
bool has_railroads_being_built(sys::state &state, dcon::province_id id)
constexpr uint16_t to_map_id(dcon::province_id id)
uint32_t pack_color(float r, float g, float b)