1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +01:00

Codechange: Add distinct type to hold pixel drawing colour. (#14457)

This is used for individual pixels as well as line drawing.
This commit is contained in:
Peter Nelson
2025-07-20 22:57:55 +01:00
committed by GitHub
parent 821784004d
commit 8e2df7809b
49 changed files with 246 additions and 234 deletions

View File

@@ -544,7 +544,7 @@ bool IsValidConsoleColour(TextColour c)
* colour gradient, so it must be one of those. */
c &= ~TC_IS_PALETTE_COLOUR;
for (Colours i = COLOUR_BEGIN; i < COLOUR_END; i++) {
if (GetColourGradient(i, SHADE_NORMAL) == c) return true;
if (GetColourGradient(i, SHADE_NORMAL).p == c) return true;
}
return false;