2017-08-29 21:23:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-07 09:41:12 +00:00
|
|
|
#include <array>
|
2017-08-29 21:23:32 +00:00
|
|
|
#include <cstdint>
|
2020-11-07 09:41:12 +00:00
|
|
|
#include <cassert>
|
2017-08-29 21:23:32 +00:00
|
|
|
|
|
|
|
namespace EightBit {
|
2017-09-07 00:15:28 +00:00
|
|
|
namespace GameBoy {
|
|
|
|
class AbstractColourPalette {
|
|
|
|
public:
|
|
|
|
enum {
|
|
|
|
Off,
|
|
|
|
Light,
|
|
|
|
Medium,
|
|
|
|
Dark
|
|
|
|
};
|
2017-08-29 21:23:32 +00:00
|
|
|
|
2020-11-07 09:41:12 +00:00
|
|
|
AbstractColourPalette() = default;
|
2017-08-29 21:23:32 +00:00
|
|
|
|
2020-11-07 09:41:12 +00:00
|
|
|
[[nodiscard]] auto colour(size_t index) const noexcept {
|
|
|
|
assert(index < m_colours.size());
|
2017-09-07 00:15:28 +00:00
|
|
|
return m_colours[index];
|
|
|
|
}
|
2017-08-29 21:23:32 +00:00
|
|
|
|
2017-09-07 00:15:28 +00:00
|
|
|
protected:
|
2020-11-07 09:41:12 +00:00
|
|
|
std::array<uint32_t, 4> m_colours;
|
2017-09-07 00:15:28 +00:00
|
|
|
};
|
|
|
|
}
|
2017-08-29 21:23:32 +00:00
|
|
|
}
|