Added named colors
This commit is contained in:
parent
3317867f1d
commit
db3196b290
|
@ -15,6 +15,26 @@ namespace GPU {
|
|||
constexpr uint32_t raw() const {
|
||||
return ((this->blue << 16) | (this->green << 8) | this->red);
|
||||
}
|
||||
|
||||
static constexpr Color Black() {
|
||||
return Color(0, 0, 0);
|
||||
}
|
||||
|
||||
static constexpr Color White() {
|
||||
return Color(0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
static constexpr Color Red() {
|
||||
return Color(0xFF, 0x0, 0x0);
|
||||
}
|
||||
|
||||
static constexpr Color Green() {
|
||||
return Color(0x0, 0x0, 0xFF);
|
||||
}
|
||||
|
||||
static constexpr Color Blue() {
|
||||
return Color(0x0, 0x0, 0xFF);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#include <PSX/GPU/GPU.h>
|
||||
|
||||
namespace GPU {
|
||||
|
||||
|
||||
void display_logo() {
|
||||
Display::disable();
|
||||
quick_fill_fast(Color(0x0, 0x80, 0x80), PositionU16(0, 0), SizeU16(640, 480));
|
||||
|
@ -11,6 +13,6 @@ namespace GPU {
|
|||
void setup() {
|
||||
Port::GP1.write(Port::Command::GP1::Reset());
|
||||
|
||||
quick_fill_fast(Color(0x0, 0x0, 0x0), PositionU16(0, 0), SizeU16(640, 480));
|
||||
quick_fill_fast(Color::Black(), PositionU16(0, 0), SizeU16(640, 480));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue