5 uint32_t province_size = state.world.province_size() + 1;
6 uint32_t texture_size = province_size + 256 - province_size % 256;
8 std::vector<uint32_t> prov_color(texture_size * 2);
10 state.world.for_each_province([&](dcon::province_id prov_id) {
14 auto owner = fat_id.get_nation_from_province_ownership();
20 color = owner.get_color();
22 auto master = owner.get_in_sphere_of();
24 color = master.get_color();
28 prov_color[i] = color;
29 prov_color[i + texture_size] = color;
59 uint32_t province_size = state.world.province_size() + 1;
60 uint32_t texture_size = province_size + 256 - province_size % 256;
61 std::vector<uint32_t> prov_color(texture_size * 2);
63 auto fat_selected_id =
dcon::fatten(state.world, state.map_state.get_selected_province());
64 auto selected_nation = fat_selected_id.get_nation_from_province_ownership();
67 auto master = selected_nation.get_in_sphere_of();
69 master = selected_nation;
74 state.world.for_each_province([&](dcon::province_id prov_id) {
81 auto owner = fat_id.get_nation_from_province_ownership();
84 if(owner.id == master.id) {
87 auto master_rel_id = state.world.get_gp_relationship_by_gp_influence_pair(owner, master);
88 if(
bool(master_rel_id)) {
89 auto master_rel_status = state.world.gp_relationship_get_status(master_rel_id);
90 auto master_rel_inf = state.world.gp_relationship_get_influence(master_rel_id);
93 owner.for_each_gp_relationship_as_influence_target([&](dcon::gp_relationship_id rel_id) {
95 if(rel_id != master_rel_id && state.world.gp_relationship_get_influence(rel_id) != 0 &&
96 state.world.gp_relationship_get_influence(rel_id) != 0) {
97 stripe_color = other_inf_color;
102 color = sphere_color;
103 }
else if(master_rel_inf != 0) {
112 if(stripe_color == 0x222222) {
113 stripe_color = color;
116 prov_color[i] = color;
117 prov_color[i + texture_size] = stripe_color;
120 state.world.for_each_province([&](dcon::province_id prov_id) {
127 auto owner = fat_id.get_nation_from_province_ownership();
132 selected_nation.for_each_gp_relationship_as_influence_target([&](dcon::gp_relationship_fat_id relation_id) {
133 if(!is_gp && relation_id.get_influence() > 0) {
134 if(owner.id == selected_nation.id) {
137 if(relation_id.get_great_power() == owner.id) {
145 }
else if(rel_count >= 1) {
148 stripe_color = other_inf_color;
154 if(stripe_color == 0x222222) {
155 stripe_color = color;
158 prov_color[i] = color;
159 prov_color[i + texture_size] = stripe_color;
167 std::vector<uint32_t> prov_color;
169 if(state.map_state.get_selected_province()) {
pop_satisfaction_wrapper_fat fatten(data_container const &c, pop_satisfaction_wrapper_id id) noexcept
constexpr uint8_t level_in_sphere
bool is_great_power(sys::state const &state, dcon::nation_id id)
constexpr uint16_t to_map_id(dcon::province_id id)
std::vector< uint32_t > get_global_sphere_color(sys::state &state)
std::vector< uint32_t > sphere_map_from(sys::state &state)
std::vector< uint32_t > get_selected_sphere_color(sys::state &state)