View normal worlds

This commit is contained in:
2025-02-17 00:24:18 -05:00
parent cfc08032e6
commit 2a4599756c
3 changed files with 347 additions and 8 deletions
+6
View File
@@ -134,6 +134,12 @@ pub fn read_char_row(
})
}
pub fn read_char_pixel(char: &[u16; 8], hflip: bool, vflip: bool, row: usize, col: usize) -> u8 {
let pixels = if vflip { char[7 - row] } else { char[row] };
let pixel = if hflip { 7 - col } else { col } << 1;
((pixels >> pixel) & 0x3) as u8
}
pub struct CharacterGrid<'a> {
source: ImageSource<'a>,
scale: f32,