Simplify Display::Print

This commit is contained in:
Alex 2023-09-04 15:11:01 +03:00
parent 6094c966b2
commit 6db0df6afe
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -360,15 +360,18 @@ namespace Video
{ {
// if (this->CurrentFont->PSF2Font->GlyphBuffer == (uint16_t *)0x01) // HAS UNICODE TABLE // if (this->CurrentFont->PSF2Font->GlyphBuffer == (uint16_t *)0x01) // HAS UNICODE TABLE
// Char = this->CurrentFont->PSF2Font->GlyphBuffer[Char]; // Char = this->CurrentFont->PSF2Font->GlyphBuffer[Char];
int BytesPerLine = (this->CurrentFont->GetInfo().PSF2Font->Header->width + 7) / 8;
char *FontAddress = (char *)this->CurrentFont->GetInfo().StartAddress; FontInfo fInfo = this->CurrentFont->GetInfo();
uint32_t FontHeaderSize = this->CurrentFont->GetInfo().PSF2Font->Header->headersize;
uint32_t FontCharSize = this->CurrentFont->GetInfo().PSF2Font->Header->charsize; int BytesPerLine = (fInfo.PSF2Font->Header->width + 7) / 8;
uint32_t FontLength = this->CurrentFont->GetInfo().PSF2Font->Header->length; char *FontAddress = (char *)fInfo.StartAddress;
uint32_t FontHeaderSize = fInfo.PSF2Font->Header->headersize;
uint32_t FontCharSize = fInfo.PSF2Font->Header->charsize;
uint32_t FontLength = fInfo.PSF2Font->Header->length;
char *FontPtr = FontAddress + FontHeaderSize + (Char > 0 && (uint32_t)Char < FontLength ? Char : 0) * FontCharSize; char *FontPtr = FontAddress + FontHeaderSize + (Char > 0 && (uint32_t)Char < FontLength ? Char : 0) * FontCharSize;
uint32_t FontHdrWidth = this->CurrentFont->GetInfo().PSF2Font->Header->width; uint32_t FontHdrWidth = fInfo.PSF2Font->Header->width;
uint32_t FontHdrHeight = this->CurrentFont->GetInfo().PSF2Font->Header->height; uint32_t FontHdrHeight = fInfo.PSF2Font->Header->height;
for (size_t Y = this->Buffers[Index].CursorY; Y < this->Buffers[Index].CursorY + FontHdrHeight; Y++) for (size_t Y = this->Buffers[Index].CursorY; Y < this->Buffers[Index].CursorY + FontHdrHeight; Y++)
{ {