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 /gfx.h | |
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 'gfx.h')
-rw-r--r-- | gfx.h | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -5,13 +5,6 @@ typedef byte Pixel; -typedef struct ColorList { - byte unk0, unk1, unk2; - byte window_color_1a, window_color_1b; - byte window_color_bga, window_color_bgb; - byte window_color_2; -} ColorList; - struct DrawPixelInfo { Pixel *dst_ptr; int left, top, width, height; @@ -122,9 +115,33 @@ static inline byte GetCharacterHeight(FontSize size) VARDEF DrawPixelInfo _screen; VARDEF DrawPixelInfo *_cur_dpi; -VARDEF ColorList _color_list[16]; VARDEF CursorVars _cursor; +enum { + COLOUR_DARK_BLUE, + COLOUR_PALE_GREEN, + COLOUR_PINK, + COLOUR_YELLOW, + COLOUR_RED, + COLOUR_LIGHT_BLUE, + COLOUR_GREEN, + COLOUR_DARK_GREEN, + COLOUR_BLUE, + COLOUR_CREAM, + COLOUR_MAUVE, + COLOUR_PURPLE, + COLOUR_ORANGE, + COLOUR_BROWN, + COLOUR_GREY, + COLOUR_WHITE +}; + +/** + * All 16 colour gradients + * 8 colours per gradient from darkest (0) to lightest (7) + */ +VARDEF byte _colour_gradient[16][8]; + VARDEF int _pal_first_dirty; VARDEF int _pal_last_dirty; |