Fix remaining issues with the new API usage

This commit is contained in:
Gwilym Inzani 2023-02-25 18:10:54 +00:00
parent eb56a4a9d2
commit 4c6fbac41f
2 changed files with 11 additions and 3 deletions

View file

@ -13,7 +13,7 @@
#![cfg_attr(test, test_runner(agb::test_runner::test_runner))] #![cfg_attr(test, test_runner(agb::test_runner::test_runner))]
use agb::display::object::ObjectController; use agb::display::object::ObjectController;
use agb::display::tiled::{TiledMap, VRamManager}; use agb::display::tiled::{TileFormat, TiledMap, VRamManager};
use agb::display::Priority; use agb::display::Priority;
use agb::interrupt::VBlank; use agb::interrupt::VBlank;
use agb::{display, sound::mixer::Frequency}; use agb::{display, sound::mixer::Frequency};

View file

@ -857,7 +857,11 @@ pub fn main(mut agb: agb::Gba) -> ! {
let map_current_level = current_level; let map_current_level = current_level;
let mut background = InfiniteScrolledMap::new( let mut background = InfiniteScrolledMap::new(
tiled.background(Priority::P2, RegularBackgroundSize::Background32x64), tiled.background(
Priority::P2,
RegularBackgroundSize::Background32x64,
TileFormat::FourBpp,
),
Box::new(|pos: Vector2D<i32>| { Box::new(|pos: Vector2D<i32>| {
let level = &map_tiles::LEVELS[map_current_level as usize]; let level = &map_tiles::LEVELS[map_current_level as usize];
( (
@ -872,7 +876,11 @@ pub fn main(mut agb: agb::Gba) -> ! {
}), }),
); );
let mut foreground = InfiniteScrolledMap::new( let mut foreground = InfiniteScrolledMap::new(
tiled.background(Priority::P0, RegularBackgroundSize::Background64x32), tiled.background(
Priority::P0,
RegularBackgroundSize::Background64x32,
TileFormat::FourBpp,
),
Box::new(|pos: Vector2D<i32>| { Box::new(|pos: Vector2D<i32>| {
let level = &map_tiles::LEVELS[map_current_level as usize]; let level = &map_tiles::LEVELS[map_current_level as usize];
( (