Fix build errors

This commit is contained in:
Gwilym Inzani 2023-02-24 08:55:02 +00:00
parent 689bfc642f
commit 54311727ec
6 changed files with 38 additions and 10 deletions

View file

@ -54,7 +54,7 @@ use crate::{
/// let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
///
/// let mut backdrop = InfiniteScrolledMap::new(
/// gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
/// gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
/// Box::new(|pos| {
/// (
/// &tileset,
@ -146,7 +146,7 @@ impl<'a> InfiniteScrolledMap<'a> {
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
/// #
/// # let mut backdrop = InfiniteScrolledMap::new(
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
/// # Box::new(|pos| {
/// # (
/// # &tileset,
@ -221,7 +221,7 @@ impl<'a> InfiniteScrolledMap<'a> {
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
/// #
/// # let mut backdrop = InfiniteScrolledMap::new(
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
/// # Box::new(|pos| {
/// # (
/// # &tileset,

View file

@ -96,7 +96,7 @@
///
/// vram.set_background_palettes(water_tiles::PALETTES);
///
/// let mut bg = gfx.background(Priority::P0, RegularBackgroundSize::Background32x32);
/// let mut bg = gfx.background(Priority::P0, RegularBackgroundSize::Background32x32, TileFormat::FourBpp);
///
/// for y in 0..20u16 {
/// for x in 0..30u16 {

View file

@ -65,7 +65,11 @@ fn get_game(gba: &mut agb::Gba) -> Game {
vram.set_background_palettes(games::PALETTES);
let mut bg = InfiniteScrolledMap::new(
tile.background(Priority::P0, RegularBackgroundSize::Background32x32),
tile.background(
Priority::P0,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
),
Box::new(|pos| {
let y = pos.y.rem_euclid(20);
let x = pos.x.rem_euclid(30);

View file

@ -111,19 +111,23 @@ pub fn main(mut gba: agb::Gba) -> ! {
let mut background0 = tiled.background(
Priority::P0,
display::tiled::RegularBackgroundSize::Background64x32,
TileFormat::FourBpp,
);
let mut background1 = tiled.background(
Priority::P0,
display::tiled::RegularBackgroundSize::Background64x32,
TileFormat::FourBpp,
);
let mut card_descriptions = tiled.background(
Priority::P1,
display::tiled::RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
);
let mut help_background = tiled.background(
Priority::P1,
display::tiled::RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
);
let basic_die = Die {

View file

@ -783,8 +783,16 @@ impl<'a, 'b> PlayingLevel<'a, 'b> {
pub fn main(mut agb: agb::Gba) -> ! {
let (tiled, mut vram) = agb.display.video.tiled0();
vram.set_background_palettes(tile_sheet::PALETTES);
let mut splash_screen = tiled.background(Priority::P0, RegularBackgroundSize::Background32x32);
let mut world_display = tiled.background(Priority::P0, RegularBackgroundSize::Background32x32);
let mut splash_screen = tiled.background(
Priority::P0,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
);
let mut world_display = tiled.background(
Priority::P0,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
);
let tileset = TileSet::new(tile_sheet::background.tiles, TileFormat::FourBpp);

View file

@ -2225,7 +2225,11 @@ fn game_with_level(gba: &mut agb::Gba) {
let object = gba.display.object.get();
let backdrop = InfiniteScrolledMap::new(
background.background(Priority::P2, RegularBackgroundSize::Background32x32),
background.background(
Priority::P2,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
),
Box::new(|pos| {
(
&tileset,
@ -2239,7 +2243,11 @@ fn game_with_level(gba: &mut agb::Gba) {
);
let foreground = InfiniteScrolledMap::new(
background.background(Priority::P0, RegularBackgroundSize::Background32x32),
background.background(
Priority::P0,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
),
Box::new(|pos| {
(
&tileset,
@ -2253,7 +2261,11 @@ fn game_with_level(gba: &mut agb::Gba) {
);
let clouds = InfiniteScrolledMap::new(
background.background(Priority::P3, RegularBackgroundSize::Background32x32),
background.background(
Priority::P3,
RegularBackgroundSize::Background32x32,
TileFormat::FourBpp,
),
Box::new(|pos| {
(
&tileset,