cleaned up ugly vga. should work much better but still has some formatting issues at the bottom

This commit is contained in:
spikey 2024-02-18 00:33:00 -05:00
parent 60059ca578
commit d1cab17836
1 changed files with 5 additions and 6 deletions

View File

@ -15,13 +15,12 @@ vga_write(s8 *sequence, s16 size, s8 flags)
return;
}
s16 needed_space = size * 2 + unused - VGA_SIZE;
if (needed_space >= 0) {
for (s16 i = 0; i <= VGA_SIZE - needed_space; i++) {
vga_vidmem[i] = vga_vidmem[((needed_space / 2) - (needed_space / 2) % 2) + i];
}
if (size * 2 + unused >= VGA_SIZE) {
s16 needed_space = size * 2;
unused = VGA_SIZE - needed_space;
for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) {
vga_vidmem[i] = vga_vidmem[needed_space + i];
}
}
for (s16 i = 0; i < size; i++) {