mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-10 00:51:34 +11:00
Fix the text_render example
This commit is contained in:
parent
707c2bf7e7
commit
9660b6df12
|
@ -40,7 +40,8 @@ fn main(mut gba: agb::Gba) -> ! {
|
||||||
|
|
||||||
vram.remove_dynamic_tile(background_tile);
|
vram.remove_dynamic_tile(background_tile);
|
||||||
|
|
||||||
let mut writer = FONT.render_text((0u16, 3u16).into(), 1, 2, &mut bg, &mut vram);
|
let mut renderer = FONT.render_text((0u16, 3u16).into());
|
||||||
|
let mut writer = renderer.writer(1, 2, &mut bg, &mut vram);
|
||||||
|
|
||||||
writeln!(&mut writer, "Hello, World!").unwrap();
|
writeln!(&mut writer, "Hello, World!").unwrap();
|
||||||
writeln!(&mut writer, "This is a font rendering example").unwrap();
|
writeln!(&mut writer, "This is a font rendering example").unwrap();
|
||||||
|
@ -53,7 +54,8 @@ fn main(mut gba: agb::Gba) -> ! {
|
||||||
let mut frame = 0;
|
let mut frame = 0;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let mut writer = FONT.render_text((4u16, 0u16).into(), 1, 2, &mut bg, &mut vram);
|
let mut renderer = FONT.render_text((4u16, 0u16).into());
|
||||||
|
let mut writer = renderer.writer(1, 2, &mut bg, &mut vram);
|
||||||
|
|
||||||
writeln!(&mut writer, "Frame {}", frame).unwrap();
|
writeln!(&mut writer, "Frame {}", frame).unwrap();
|
||||||
writer.commit();
|
writer.commit();
|
||||||
|
|
Loading…
Reference in a new issue