21#include "pedigree/kernel/core/BootIO.h"
26 : m_nWidth(80), m_nHeight(25), m_CursorX(0), m_CursorY(0), m_pBackbuffer(0) {}
28HostedVga::~HostedVga() {
43 if (nBufLen > thisLen)
53 for (
size_t x = 0; x <
m_nWidth; ++x) {
72 if (nBufLen > thisLen)
83 printf(
"\033[%zu;%zuH", nY, nX);
86bool HostedVga::initialise() {
100 case BootIO::DarkGrey:
103 case BootIO::LightBlue:
106 case BootIO::LightGreen:
109 case BootIO::LightCyan:
112 case BootIO::LightRed:
114 case BootIO::Magenta:
115 case BootIO::LightMagenta:
120 case BootIO::LightGrey:
133 uint32_t fore_param = fore > 7 ? 90 + fore : 30 + fore;
134 uint32_t back_param = back > 7 ? 100 + back : 40 + back;
135 printf(
"\033[%d;%dm", fore_param, back_param);
static void printAttrAsAnsi(uint8_t attr)
static uint8_t ansiColourFixup(uint8_t colour)
virtual void moveCursor(size_t nX, size_t nY)
virtual void pokeBuffer(uint8_t *pBuffer, size_t nBufLen)
virtual bool setLargestTextMode()
virtual void peekBuffer(uint8_t *pBuffer, size_t nBufLen)