ref: update formatting
This commit is contained in:
parent
7d0155d8ce
commit
024407225c
16 changed files with 433 additions and 377 deletions
|
|
@ -2,22 +2,22 @@
|
|||
#include <stdint.h>
|
||||
|
||||
enum class Color : uint8_t {
|
||||
Black = 0,
|
||||
Blue = 1,
|
||||
Green = 2,
|
||||
Cyan = 3,
|
||||
Red = 4,
|
||||
Magenta = 5,
|
||||
Brown = 6,
|
||||
LightGray = 7,
|
||||
DarkGray = 8,
|
||||
LightBlue = 9,
|
||||
LightGreen = 10,
|
||||
LightCyan = 11,
|
||||
LightRed = 12,
|
||||
Black = 0,
|
||||
Blue = 1,
|
||||
Green = 2,
|
||||
Cyan = 3,
|
||||
Red = 4,
|
||||
Magenta = 5,
|
||||
Brown = 6,
|
||||
LightGray = 7,
|
||||
DarkGray = 8,
|
||||
LightBlue = 9,
|
||||
LightGreen = 10,
|
||||
LightCyan = 11,
|
||||
LightRed = 12,
|
||||
LightMagenta = 13,
|
||||
Yellow = 14,
|
||||
White = 15,
|
||||
Yellow = 14,
|
||||
White = 15,
|
||||
};
|
||||
|
||||
struct TextAttr {
|
||||
|
|
@ -26,7 +26,6 @@ struct TextAttr {
|
|||
|
||||
constexpr TextAttr(Color fg = Color::White, Color bg = Color::Black) : fg(fg), bg(bg) {}
|
||||
|
||||
// Returns the attribute in the high byte, ready to OR with a character value.
|
||||
constexpr uint16_t word() const {
|
||||
return (uint16_t)(((uint8_t)bg << 4) | (uint8_t)fg) << 8;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue