Fighting the Actions build, round one.

This commit is contained in:
Curle 2021-06-18 22:18:37 +01:00
parent e867998352
commit 47c447c5a7
Signed by: TheCurle
GPG Key ID: 5942F13718443F79

View File

@ -108,11 +108,16 @@ inline void DrawPixel(size_t x, size_t y) {
void FillScreen(uint32_t color) { void FillScreen(uint32_t color) {
uint32_t currentColor = GetForegroundColor(); uint32_t currentColor = GetForegroundColor();
for(uint32_t pixel = 0; pixel < bootldr.fb_width * bootldr.fb_height; pixel++) { for(uint32_t pixel = 0; pixel < bootldr.fb_width * bootldr.fb_height; pixel++) {
((uint32_t*)fb)[pixel] = color; ((uint32_t*)&fb)[pixel] = color;
} }
SetForegroundColor(currentColor); SetForegroundColor(currentColor);
} }
static void Newline() {
// One row down, unless it goes off the screen, in which case start from the top.
PrintInfo.charPosY = PrintInfo.charPosY + 1 > PrintInfo.rowsPerScrn ? 0 : PrintInfo.charPosY + 1;
}
static void ProgressCursorS(size_t Steps) { static void ProgressCursorS(size_t Steps) {
if(PrintInfo.charPosX + Steps > PrintInfo.charsPerRow) { if(PrintInfo.charPosX + Steps > PrintInfo.charsPerRow) {
PrintInfo.charPosX = 0; PrintInfo.charPosX = 0;
@ -120,7 +125,7 @@ static void ProgressCursorS(size_t Steps) {
if(PrintInfo.charPosY + Rows > PrintInfo.rowsPerScrn) { if(PrintInfo.charPosY + Rows > PrintInfo.rowsPerScrn) {
size_t RowsLeft = PrintInfo.rowsPerScrn - PrintInfo.charPosY; size_t RowsLeft = PrintInfo.rowsPerScrn - PrintInfo.charPosY;
ProgressCursorS(RowsLeft + 1); ProgressCursorS(RowsLeft + 1);
NewLine(); Newline();
} else { } else {
PrintInfo.charPosY += Rows; PrintInfo.charPosY += Rows;
} }
@ -129,10 +134,6 @@ static void ProgressCursorS(size_t Steps) {
} }
} }
static void Newline() {
// One row down, unless it goes off the screen, in which case start from the top.
PrintInfo.charPosY = PrintInfo.charPosY + 1 > PrintInfo.rowsPerScrn ? 0 : PrintInfo.charPosY + 1;
}
static void ProgressCursor() { static void ProgressCursor() {
ProgressCursorS(1); ProgressCursorS(1);