Codechange: Remove direct access to _colour_gradient.

Access is now through GetColourGradient, which ensures parameters are in range.
This commit is contained in:
Peter Nelson
2023-12-24 22:51:55 +00:00
committed by Peter Nelson
parent 56cf89d189
commit 0463d4c198
23 changed files with 98 additions and 65 deletions

View File

@@ -11,6 +11,7 @@
#define GFX_TYPE_H
#include "core/endian_type.hpp"
#include "core/enum_type.hpp"
#include "core/geometry_type.hpp"
#include "zoom_type.h"
@@ -247,6 +248,7 @@ enum Colours : byte {
COLOUR_END,
INVALID_COLOUR = 0xFF,
};
DECLARE_POSTFIX_INCREMENT(Colours)
DECLARE_ENUM_AS_ADDABLE(Colours)
/** Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palette.png */