feat: vt additions
This commit is contained in:
@@ -75,7 +75,7 @@ impl ColorNibble {
|
||||
pub const MAGENTA: Self = Self(0b0101);
|
||||
|
||||
pub const GRAY: Self = Self(0b1000);
|
||||
pub const GRAY2: Self = Self(0b0111);
|
||||
pub const LIGHT_GRAY: Self = Self(0b0111);
|
||||
|
||||
pub const LIGHT_RED: Self = Self(0b1100);
|
||||
pub const LIGHT_GREEN: Self = Self(0b1010);
|
||||
|
||||
@@ -39,6 +39,19 @@ where
|
||||
self.pos = (M::WIDTH.min(col), M::HEIGHT.min(row));
|
||||
}
|
||||
|
||||
pub fn set_color(&mut self, color: VgaColor) {
|
||||
self.cur_color = color;
|
||||
}
|
||||
|
||||
pub fn reset_screen(&mut self) {
|
||||
for row in self.vga.as_cell_array() {
|
||||
for cell in row {
|
||||
cell.0 = b' ';
|
||||
cell.1 = *self.cur_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn write(&mut self, data: &[u8]) {
|
||||
const BAD_CHAR_COL: VgaColor = VgaColor::new(ColorNibble::WHITE, ColorNibble::RED);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user