This commit is contained in:
parent
311755c812
commit
5c3d4ac7a9
30 changed files with 177 additions and 108 deletions
|
|
@ -16,15 +16,16 @@ impl Framebuffer {
|
|||
})
|
||||
}
|
||||
|
||||
fn draw_pixel(&self, row: u32, col: u32, pixel: u32) {
|
||||
fn draw_pixel(&mut self, row: u32, col: u32, pixel: u32) {
|
||||
let index = row * (self.fb_info.pitch as u32 / 4) + col;
|
||||
self.memory_region.mut_slice()[index as usize] = pixel;
|
||||
}
|
||||
|
||||
pub fn draw_glyph(&self, glyph: &[u8], row: u32, col: u32) {
|
||||
pub fn draw_glyph(&mut self, glyph: &[u8], row: u32, col: u32) {
|
||||
let gl_width = 8;
|
||||
let gl_height = 16;
|
||||
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
for r in 0..gl_height {
|
||||
for c in 0..gl_width {
|
||||
if ((glyph[r] >> c) % 2) == 1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue