mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Avoid overwriting text on the line above
This commit is contained in:
parent
f7ef25f3f0
commit
5701667f53
|
@ -3,7 +3,7 @@ use core::fmt::{Error, Write};
|
|||
use crate::fixnum::Vector2D;
|
||||
use crate::hash_map::HashMap;
|
||||
|
||||
use super::tiled::{RegularMap, TileSetting, VRamManager};
|
||||
use super::tiled::{DynamicTile, RegularMap, TileSetting, VRamManager};
|
||||
|
||||
pub struct FontLetter {
|
||||
width: u8,
|
||||
|
@ -72,6 +72,7 @@ impl Font {
|
|||
bg,
|
||||
background_colour,
|
||||
foreground_colour,
|
||||
tiles: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,13 +86,13 @@ pub struct TextRenderer<'a> {
|
|||
bg: &'a mut RegularMap,
|
||||
background_colour: u8,
|
||||
foreground_colour: u8,
|
||||
tiles: HashMap<(usize, usize), DynamicTile<'a>>,
|
||||
}
|
||||
|
||||
impl<'a> Write for TextRenderer<'a> {
|
||||
fn write_str(&mut self, text: &str) -> Result<(), Error> {
|
||||
let mut tiles = HashMap::new();
|
||||
|
||||
let vram_manager = &mut self.vram_manager;
|
||||
let tiles = &mut self.tiles;
|
||||
let foreground_colour = self.foreground_colour;
|
||||
let background_colour = self.background_colour;
|
||||
|
||||
|
|
Loading…
Reference in a new issue