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

@@ -385,9 +385,9 @@ bool HandleBootstrap()
* This way the mauve and gray colours work and we can show the user interface. */
GfxInitPalettes();
static const int offsets[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0, 0, 0x04, 0x08 };
for (uint i = 0; i != 16; i++) {
for (Colours i = COLOUR_BEGIN; i != COLOUR_END; i++) {
for (int j = 0; j < 8; j++) {
_colour_gradient[i][j] = offsets[i] + j;
SetColourGradient(i, j, offsets[i] + j);
}
}