forked from mirror/OpenTTD
Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
This commit is contained in:
@@ -1716,7 +1716,7 @@ static void ViewportDrawStrings(ZoomLevel zoom, const StringSpriteToDrawVector *
|
||||
/* Don't draw the rectangle.
|
||||
* Real colours need the TC_IS_PALETTE_COLOUR flag.
|
||||
* Otherwise colours from _string_colourmap are assumed. */
|
||||
colour = (TextColour)_colour_gradient[ss.colour][6] | TC_IS_PALETTE_COLOUR;
|
||||
colour = (TextColour)GetColourGradient(ss.colour, 6) | TC_IS_PALETTE_COLOUR;
|
||||
} else {
|
||||
/* Draw the rectangle if 'transparent station signs' is off,
|
||||
* or if we are drawing a general text sign (STR_WHITE_SIGN). */
|
||||
|
Reference in New Issue
Block a user