mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Remove argument
This commit is contained in:
parent
f3c467c2f1
commit
a0013096cc
|
@ -36,8 +36,7 @@ fn main(mut gba: agb::Gba) -> ! {
|
||||||
vram.remove_dynamic_tile(background_tile);
|
vram.remove_dynamic_tile(background_tile);
|
||||||
|
|
||||||
FONT.render_text(
|
FONT.render_text(
|
||||||
0,
|
(0u16, 3u16).into(),
|
||||||
3,
|
|
||||||
"Hello, World!\nThis is a font rendering example",
|
"Hello, World!\nThis is a font rendering example",
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
|
|
Binary file not shown.
|
@ -1,3 +1,4 @@
|
||||||
|
use crate::fixnum::Vector2D;
|
||||||
use crate::hash_map::HashMap;
|
use crate::hash_map::HashMap;
|
||||||
|
|
||||||
use super::tiled::{RegularMap, TileSetting, VRamManager};
|
use super::tiled::{RegularMap, TileSetting, VRamManager};
|
||||||
|
@ -54,8 +55,7 @@ impl Font {
|
||||||
impl Font {
|
impl Font {
|
||||||
pub fn render_text(
|
pub fn render_text(
|
||||||
&self,
|
&self,
|
||||||
tile_x: u16,
|
tile_pos: Vector2D<u16>,
|
||||||
tile_y: u16,
|
|
||||||
text: &str,
|
text: &str,
|
||||||
foreground_colour: u8,
|
foreground_colour: u8,
|
||||||
background_colour: u8,
|
background_colour: u8,
|
||||||
|
@ -115,7 +115,7 @@ impl Font {
|
||||||
for ((x, y), tile) in tiles.into_iter() {
|
for ((x, y), tile) in tiles.into_iter() {
|
||||||
bg.set_tile(
|
bg.set_tile(
|
||||||
vram_manager,
|
vram_manager,
|
||||||
(tile_x + x as u16, tile_y + y as u16).into(),
|
(tile_pos.x + x as u16, tile_pos.y + y as u16).into(),
|
||||||
&tile.tile_set(),
|
&tile.tile_set(),
|
||||||
TileSetting::from_raw(tile.tile_index()),
|
TileSetting::from_raw(tile.tile_index()),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue