diff options
author | rubidium <rubidium@openttd.org> | 2011-01-23 00:11:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-01-23 00:11:15 +0000 |
commit | 0de833236640a8ffc1bc0edff3b7b4f9a6c8612a (patch) | |
tree | 21453c0e1d81204fab9b2a0569c407edcaa8d84b /src | |
parent | 1339d75f7510961fc664b84c299d165b60d84293 (diff) | |
download | openttd-0de833236640a8ffc1bc0edff3b7b4f9a6c8612a.tar.xz |
(svn r21897) -Fix (21707): Kenobi visited IsValidConsoleColour shortly
Diffstat (limited to 'src')
-rw-r--r-- | src/console_gui.cpp | 2 | ||||
-rw-r--r-- | src/gfx_type.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp index dd3f065ef..87e2869e7 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -509,7 +509,7 @@ bool IsValidConsoleColour(TextColour c) /* A text colour from the palette is used; must be the company * colour gradient, so it must be one of those. */ c &= ~TC_IS_PALETTE_COLOUR; - for (uint i = TC_BEGIN; i < TC_END; i++) { + for (uint i = COLOUR_BEGIN; i < COLOUR_END; i++) { if (_colour_gradient[i][4] == c) return true; } diff --git a/src/gfx_type.h b/src/gfx_type.h index 79b30fb2b..146d033ba 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -181,7 +181,8 @@ struct SubSprite { }; enum Colours { - COLOUR_DARK_BLUE, + COLOUR_BEGIN, + COLOUR_DARK_BLUE = COLOUR_BEGIN, COLOUR_PALE_GREEN, COLOUR_PINK, COLOUR_YELLOW, @@ -200,7 +201,7 @@ enum Colours { COLOUR_END, INVALID_COLOUR = 0xFF, }; -template <> struct EnumPropsT<Colours> : MakeEnumPropsT<Colours, byte, COLOUR_DARK_BLUE, COLOUR_END, INVALID_COLOUR, 4> {}; +template <> struct EnumPropsT<Colours> : MakeEnumPropsT<Colours, byte, COLOUR_BEGIN, COLOUR_END, INVALID_COLOUR, 4> {}; /** Colour of the strings, see _string_colourmap in table/palettes.h or docs/ottd-colourtext-palette.png */ enum TextColour { |