diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-11-24 18:19:42 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-11-24 18:19:42 -0700 |
commit | ebc517c800a90f6f0ed157e5c3bd7c3bd18165b5 (patch) | |
tree | 781ab3e1aca5444fc0cdec56cb8c5b479d59c492 /inc/palette.hpp | |
parent | 9e35115be8950e2891232027aaf4bef7be44ace2 (diff) | |
download | gbarubik-ebc517c800a90f6f0ed157e5c3bd7c3bd18165b5.tar.gz gbarubik-ebc517c800a90f6f0ed157e5c3bd7c3bd18165b5.zip |
base 3d uml setup
Diffstat (limited to 'inc/palette.hpp')
-rw-r--r-- | inc/palette.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/inc/palette.hpp b/inc/palette.hpp new file mode 100644 index 0000000..1850835 --- /dev/null +++ b/inc/palette.hpp @@ -0,0 +1,20 @@ +#ifndef PALETTE_HPP +#define PALETTE_HPP + +#include <cstdint> +#include <tonc.h> + +namespace palette { + +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) { + toncset16(palette_address, CLR_BLACK, 1); + toncset16(palette_address + 1, CLR_WHITE, 1); +} + +}; // namespace palette + +#endif // PALETTE_HPP |