diff --git a/agb/src/display/tiled/infinite_scrolled_map.rs b/agb/src/display/tiled/infinite_scrolled_map.rs index fa1c9e96..c9b76d4a 100644 --- a/agb/src/display/tiled/infinite_scrolled_map.rs +++ b/agb/src/display/tiled/infinite_scrolled_map.rs @@ -40,7 +40,7 @@ use crate::{ /// use agb::display::Priority; /// /// mod tilemap { -/// pub const BACKGROUND_MAP: &[u16] = &[ // Probably load this from a file +/// pub const BACKGROUND_MAP: &[usize] = &[ // Probably load this from a file /// # 0, 1, 2]; /// pub const WIDTH: i32 = // set it to some width /// # 12; @@ -51,14 +51,14 @@ use crate::{ /// # fn foo(mut gba: agb::Gba) { /// let (gfx, mut vram) = gba.display.video.tiled0(); /// -/// let tileset = water_tiles::tiles.tiles; +/// let tile_data = water_tiles::tiles; /// /// let mut backdrop = InfiniteScrolledMap::new( /// gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp), /// Box::new(|pos| { /// ( -/// &tileset, -/// water_tiles.tile_settings[*tilemap::BACKGROUND_MAP +/// &tile_data.tiles, +/// tile_data.tile_settings[*tilemap::BACKGROUND_MAP /// .get((pos.x + tilemap::WIDTH * pos.y) as usize) /// .unwrap_or(&0)] /// ) @@ -133,7 +133,7 @@ impl<'a> InfiniteScrolledMap<'a> { /// # use agb::display::Priority; /// # /// # mod tilemap { - /// # pub const BACKGROUND_MAP: &[u16] = &[0, 1, 2]; + /// # pub const BACKGROUND_MAP: &[usize] = &[0, 1, 2]; /// # pub const WIDTH: i32 = 12; /// # pub const MAP_TILES: &[u8] = &[0]; /// # } @@ -143,14 +143,14 @@ impl<'a> InfiniteScrolledMap<'a> { /// # fn foo(mut gba: agb::Gba) { /// # let (gfx, mut vram) = gba.display.video.tiled0(); /// # - /// # let tileset = water_tiles.tiles; + /// # let tile_data = water_tiles::tiles; /// # /// # let mut backdrop = InfiniteScrolledMap::new( /// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp), /// # Box::new(|pos| { /// # ( - /// # &tileset, - /// # tileset.tile_settings[ + /// # &tile_data.tiles, + /// # tile_data.tile_settings[ /// # *tilemap::BACKGROUND_MAP /// # .get((pos.x + tilemap::WIDTH * pos.y) as usize) /// # .unwrap_or(&0)] @@ -209,7 +209,7 @@ impl<'a> InfiniteScrolledMap<'a> { /// # use agb::display::Priority; /// # /// # mod tilemap { - /// # pub const BACKGROUND_MAP: &[u16] = &[0, 1, 2]; + /// # pub const BACKGROUND_MAP: &[usize] = &[0, 1, 2]; /// # pub const WIDTH: i32 = 12; /// # pub const MAP_TILES: &[u8] = &[0]; /// # } @@ -219,14 +219,14 @@ impl<'a> InfiniteScrolledMap<'a> { /// # fn foo(mut gba: agb::Gba) { /// # let (gfx, mut vram) = gba.display.video.tiled0(); /// # - /// # let tileset = water_tiles.tiles; + /// # let tile_data = water_tiles::tiles; /// # /// # let mut backdrop = InfiniteScrolledMap::new( /// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp), /// # Box::new(|pos| { /// # ( - /// # &tileset, - /// # tileset.tile_settings[ + /// # &tile_data.tiles, + /// # tile_data.tile_settings[ /// # *tilemap::BACKGROUND_MAP /// # .get((pos.x + tilemap::WIDTH * pos.y) as usize) /// # .unwrap_or(&0)]