diff options
author | Elizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz> | 2023-11-28 14:47:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 14:47:29 -0700 |
commit | 4dcdd32bf7578acf3ea9bc1e98d39d82e3e1afdd (patch) | |
tree | 2d9eb3fbc17d453ee33e478bafb9936beff12eb3 /inc/palette.hpp | |
parent | ebc517c800a90f6f0ed157e5c3bd7c3bd18165b5 (diff) | |
parent | 3197f9e40cd7079e19990c64c98de667e2457d75 (diff) | |
download | gbarubik-main.tar.gz gbarubik-main.zip |
Cube
Diffstat (limited to 'inc/palette.hpp')
-rw-r--r-- | inc/palette.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/palette.hpp b/inc/palette.hpp index 1850835..e45e9cf 100644 --- a/inc/palette.hpp +++ b/inc/palette.hpp @@ -10,11 +10,12 @@ constexpr std::uint8_t pal_len = 255; constexpr std::uint16_t cube_colors[6] = {CLR_WHITE, CLR_YELLOW, CLR_RED, CLR_ORANGE, CLR_BLUE, CLR_GREEN}; -constexpr void put_palette(std::uint16_t *palette_address) { +void put_palette(std::uint16_t *palette_address) { toncset16(palette_address, CLR_BLACK, 1); - toncset16(palette_address + 1, CLR_WHITE, 1); + for (std::uint32_t i = 0; i < 6; ++i) + toncset16(palette_address + i + 1, cube_colors[i], 1); + // TODO: PALETTE GRADIENT IN ALPHA DIMENSION (BRIGHTNESS) } - }; // namespace palette #endif // PALETTE_HPP |