Commit Graph

8 Commits

Author SHA1 Message Date
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Peter Nelson 86be6d7e0b Codechange: Off-by-one in colour gradient initialisation.
Remap sprites start with a count byte followed by 256 entries, but
SetupColoursAndInitialWindow did not take account of this extra byte and
therefore started at palette index 0xC5 instead of 0xC6. This caused the
first colour of each gradient to be incorrect and all shades were actually
1 step lower in the gradient than indicated.
2024-02-25 12:38:07 +00:00
Peter Nelson 912d7bd80e Codechange: Give ColourShade values names instead of numbers. 2024-02-25 12:38:07 +00:00
Peter Nelson ae3390fe48 Codechange: Add ColourShade enum. 2024-02-25 12:38:07 +00:00
Peter Nelson 0463d4c198 Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
2024-02-25 12:38:07 +00:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Peter Nelson 0bc22dd310 Add: 32bpp-to-8bpp palette index lookup.
Lookups are calculated on demand and caches in a 256KB in-memory table.
2023-12-25 11:22:52 +00:00
Peter Nelson daec0e2ca4 Codechange: Split palette handling to separate file. 2023-12-25 11:22:52 +00:00