mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
759b4a9fa8
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
29 lines
444 B
C++
29 lines
444 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <cassert>
|
|
|
|
namespace EightBit {
|
|
namespace GameBoy {
|
|
class AbstractColourPalette {
|
|
public:
|
|
enum {
|
|
Off,
|
|
Light,
|
|
Medium,
|
|
Dark
|
|
};
|
|
|
|
AbstractColourPalette() = default;
|
|
|
|
[[nodiscard]] auto colour(size_t index) const noexcept {
|
|
assert(index < m_colours.size());
|
|
return m_colours[index];
|
|
}
|
|
|
|
protected:
|
|
std::array<uint32_t, 4> m_colours;
|
|
};
|
|
}
|
|
} |