diff options
author | belugas <belugas@openttd.org> | 2008-08-04 17:27:06 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-08-04 17:27:06 +0000 |
commit | 5c3a18fa900df479166f281e245142a922557f80 (patch) | |
tree | 91f87960b623fb90f06cd958a9799541b65280f9 /src | |
parent | d21f73658ca53e91e54ca1115c69850778fbf3d5 (diff) | |
download | openttd-5c3a18fa900df479166f281e245142a922557f80.tar.xz |
(svn r13994) -Codechange: replace a few rogue magic numbers with Colours enum values
Diffstat (limited to 'src')
-rw-r--r-- | src/gfx.cpp | 2 | ||||
-rw-r--r-- | src/gfx_func.h | 2 | ||||
-rw-r--r-- | src/graph_gui.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp index 73363bb6a..ad215d1bf 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -47,7 +47,7 @@ int _pal_count_dirty; Colour _cur_palette[256]; byte _stringwidth_table[FS_END][224]; ///< Cache containing width of often used characters. @see GetCharacterWidth() DrawPixelInfo *_cur_dpi; -byte _colour_gradient[16][8]; +byte _colour_gradient[COLOUR_END][8]; bool _use_dos_palette; static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub = NULL); diff --git a/src/gfx_func.h b/src/gfx_func.h index 12f042c25..3d8204ee8 100644 --- a/src/gfx_func.h +++ b/src/gfx_func.h @@ -172,7 +172,7 @@ extern DrawPixelInfo *_cur_dpi; * All 16 colour gradients * 8 colours per gradient from darkest (0) to lightest (7) */ -extern byte _colour_gradient[16][8]; +extern byte _colour_gradient[COLOUR_END][8]; extern bool _use_dos_palette; diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 247a5f1f8..fd7185f80 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -159,7 +159,7 @@ protected: assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_PLAYERS); assert(this->num_vert_lines > 0); - byte grid_colour = _colour_gradient[14][4]; + byte grid_colour = _colour_gradient[COLOUR_GREY][4]; /* The coordinates of the opposite edges of the graph. */ int bottom = this->gd_top + this->gd_height - 1; |