mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r21897) -Fix (21707): Kenobi visited IsValidConsoleColour shortly
This commit is contained in:
parent
1339d75f75
commit
0de8332366
|
@ -509,7 +509,7 @@ bool IsValidConsoleColour(TextColour c)
|
||||||
/* A text colour from the palette is used; must be the company
|
/* A text colour from the palette is used; must be the company
|
||||||
* colour gradient, so it must be one of those. */
|
* colour gradient, so it must be one of those. */
|
||||||
c &= ~TC_IS_PALETTE_COLOUR;
|
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;
|
if (_colour_gradient[i][4] == c) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,8 @@ struct SubSprite {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Colours {
|
enum Colours {
|
||||||
COLOUR_DARK_BLUE,
|
COLOUR_BEGIN,
|
||||||
|
COLOUR_DARK_BLUE = COLOUR_BEGIN,
|
||||||
COLOUR_PALE_GREEN,
|
COLOUR_PALE_GREEN,
|
||||||
COLOUR_PINK,
|
COLOUR_PINK,
|
||||||
COLOUR_YELLOW,
|
COLOUR_YELLOW,
|
||||||
|
@ -200,7 +201,7 @@ enum Colours {
|
||||||
COLOUR_END,
|
COLOUR_END,
|
||||||
INVALID_COLOUR = 0xFF,
|
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 */
|
/** Colour of the strings, see _string_colourmap in table/palettes.h or docs/ottd-colourtext-palette.png */
|
||||||
enum TextColour {
|
enum TextColour {
|
||||||
|
|
Loading…
Reference in New Issue