* Completes the array for the owned property legend. */
| 339 | * Completes the array for the owned property legend. |
| 340 | */ |
| 341 | void BuildOwnerLegend() |
| 342 | { |
| 343 | _legend_land_owners[1].colour = PixelColour{static_cast<uint8_t>(_heightmap_schemes[_settings_client.gui.smallmap_land_colour].default_colour)}; |
| 344 | |
| 345 | int i = NUM_NO_COMPANY_ENTRIES; |
| 346 | for (const Company *c : Company::Iterate()) { |
| 347 | _legend_land_owners[i].colour = GetColourGradient(c->colour, SHADE_LIGHT); |
| 348 | _legend_land_owners[i].company = c->index; |
| 349 | _legend_land_owners[i].show_on_map = true; |
| 350 | _legend_land_owners[i].col_break = false; |
| 351 | _legend_land_owners[i].end = false; |
| 352 | _company_to_list_pos[c->index] = i; |
| 353 | i++; |
| 354 | } |
| 355 | |
| 356 | /* Terminate the list */ |
| 357 | _legend_land_owners[i].end = true; |
| 358 | |
| 359 | /* Store maximum amount of owner legend entries. */ |
| 360 | _smallmap_company_count = i; |
| 361 | } |
| 362 | |
| 363 | struct AndOr { |
| 364 | uint32_t mor; |
no test coverage detected