diff options
author | tron <tron@openttd.org> | 2006-08-29 19:26:13 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-29 19:26:13 +0000 |
commit | b83a3f8726e3980820fa2c4b508f70a56826228b (patch) | |
tree | bfebe9391624be5031618ddb87d904e064fe4034 /graph_gui.c | |
parent | 21db9de388330156680de6fd745d770563de0270 (diff) | |
download | openttd-b83a3f8726e3980820fa2c4b508f70a56826228b.tar.xz |
(svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear
Also add the names of colour the gradients as enum
Diffstat (limited to 'graph_gui.c')
-rw-r--r-- | graph_gui.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/graph_gui.c b/graph_gui.c index 011bbc1cd..58f4ac638 100644 --- a/graph_gui.c +++ b/graph_gui.c @@ -65,7 +65,7 @@ static void DrawGraph(const GraphDrawer *gw) * both values for cargo and players. So if any are higher, quit */ assert(GRAPH_NUM >= NUM_CARGO && GRAPH_NUM >= MAX_PLAYERS); - color = _color_list[gw->bg_line_color].window_color_1b; + color = _colour_gradient[gw->bg_line_color][4]; /* draw the vertical lines */ i = gw->num_vert_lines; assert(i > 0); @@ -344,7 +344,7 @@ static void OperatingProfitWndProc(Window *w, WindowEvent *e) numd = 0; FOR_ALL_PLAYERS(p) { if (p->is_active) { - gd.colors[numd] = _color_list[p->player_color].window_color_bgb; + gd.colors[numd] = _colour_gradient[p->player_color][6]; for (j = gd.num_on_x_axis, i = 0; --j >= 0;) { gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_VALUE : (uint64)(p->old_economy[j].income + p->old_economy[j].expenses); i++; @@ -417,7 +417,7 @@ static void IncomeGraphWndProc(Window *w, WindowEvent *e) numd = 0; FOR_ALL_PLAYERS(p) { if (p->is_active) { - gd.colors[numd] = _color_list[p->player_color].window_color_bgb; + gd.colors[numd] = _colour_gradient[p->player_color][6]; for (j = gd.num_on_x_axis, i = 0; --j >= 0;) { gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_VALUE : (uint64)p->old_economy[j].income; i++; @@ -490,7 +490,7 @@ static void DeliveredCargoGraphWndProc(Window *w, WindowEvent *e) numd = 0; FOR_ALL_PLAYERS(p) { if (p->is_active) { - gd.colors[numd] = _color_list[p->player_color].window_color_bgb; + gd.colors[numd] = _colour_gradient[p->player_color][6]; for (j = gd.num_on_x_axis, i = 0; --j >= 0;) { gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_VALUE : (uint64)p->old_economy[j].delivered_cargo; i++; @@ -563,7 +563,7 @@ static void PerformanceHistoryWndProc(Window *w, WindowEvent *e) numd = 0; FOR_ALL_PLAYERS(p) { if (p->is_active) { - gd.colors[numd] = _color_list[p->player_color].window_color_bgb; + gd.colors[numd] = _colour_gradient[p->player_color][6]; for (j = gd.num_on_x_axis, i = 0; --j >= 0;) { gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_VALUE : (uint64)p->old_economy[j].performance_history; i++; @@ -639,7 +639,7 @@ static void CompanyValueGraphWndProc(Window *w, WindowEvent *e) numd = 0; FOR_ALL_PLAYERS(p) { if (p->is_active) { - gd.colors[numd] = _color_list[p->player_color].window_color_bgb; + gd.colors[numd] = _colour_gradient[p->player_color][6]; for (j = gd.num_on_x_axis, i = 0; --j >= 0;) { gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_VALUE : (uint64)p->old_economy[j].company_value; i++; @@ -923,8 +923,8 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e) } // The colors used to show how the progress is going - color_done = _color_list[6].window_color_1b; - color_notdone = _color_list[4].window_color_1b; + color_done = _colour_gradient[COLOUR_GREEN][4]; + color_notdone = _colour_gradient[COLOUR_RED][4]; // Draw all the score parts for (i = 0; i < NUM_SCORE; i++) { |