Codechange: Remove direct access to _colour_gradient.

Access is now through GetColourGradient, which ensures parameters are in range.
This commit is contained in:
Peter Nelson
2023-12-24 22:51:55 +00:00
committed by Peter Nelson
parent 56cf89d189
commit 0463d4c198
23 changed files with 98 additions and 65 deletions

View File

@@ -346,7 +346,7 @@ void BuildOwnerLegend()
int i = NUM_NO_COMPANY_ENTRIES;
for (const Company *c : Company::Iterate()) {
_legend_land_owners[i].colour = _colour_gradient[c->colour][5];
_legend_land_owners[i].colour = GetColourGradient(c->colour, 5);
_legend_land_owners[i].company = c->index;
_legend_land_owners[i].show_on_map = true;
_legend_land_owners[i].col_break = false;