mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Fix docs for real this time
This commit is contained in:
parent
dc04785669
commit
2c556f9ce8
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue