mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Fix build errors
This commit is contained in:
parent
689bfc642f
commit
54311727ec
|
@ -54,7 +54,7 @@ use crate::{
|
||||||
/// let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
/// let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
||||||
///
|
///
|
||||||
/// let mut backdrop = InfiniteScrolledMap::new(
|
/// let mut backdrop = InfiniteScrolledMap::new(
|
||||||
/// gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
|
/// gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
|
||||||
/// Box::new(|pos| {
|
/// Box::new(|pos| {
|
||||||
/// (
|
/// (
|
||||||
/// &tileset,
|
/// &tileset,
|
||||||
|
@ -146,7 +146,7 @@ impl<'a> InfiniteScrolledMap<'a> {
|
||||||
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
||||||
/// #
|
/// #
|
||||||
/// # let mut backdrop = InfiniteScrolledMap::new(
|
/// # let mut backdrop = InfiniteScrolledMap::new(
|
||||||
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
|
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
|
||||||
/// # Box::new(|pos| {
|
/// # Box::new(|pos| {
|
||||||
/// # (
|
/// # (
|
||||||
/// # &tileset,
|
/// # &tileset,
|
||||||
|
@ -221,7 +221,7 @@ impl<'a> InfiniteScrolledMap<'a> {
|
||||||
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
/// # let tileset = TileSet::new(&tilemap::MAP_TILES, TileFormat::FourBpp);
|
||||||
/// #
|
/// #
|
||||||
/// # let mut backdrop = InfiniteScrolledMap::new(
|
/// # let mut backdrop = InfiniteScrolledMap::new(
|
||||||
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32),
|
/// # gfx.background(Priority::P2, RegularBackgroundSize::Background32x32, TileFormat::FourBpp),
|
||||||
/// # Box::new(|pos| {
|
/// # Box::new(|pos| {
|
||||||
/// # (
|
/// # (
|
||||||
/// # &tileset,
|
/// # &tileset,
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
///
|
///
|
||||||
/// vram.set_background_palettes(water_tiles::PALETTES);
|
/// 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 y in 0..20u16 {
|
||||||
/// for x in 0..30u16 {
|
/// for x in 0..30u16 {
|
||||||
|
|
|
@ -65,7 +65,11 @@ fn get_game(gba: &mut agb::Gba) -> Game {
|
||||||
vram.set_background_palettes(games::PALETTES);
|
vram.set_background_palettes(games::PALETTES);
|
||||||
|
|
||||||
let mut bg = InfiniteScrolledMap::new(
|
let mut bg = InfiniteScrolledMap::new(
|
||||||
tile.background(Priority::P0, RegularBackgroundSize::Background32x32),
|
tile.background(
|
||||||
|
Priority::P0,
|
||||||
|
RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
|
),
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
let y = pos.y.rem_euclid(20);
|
let y = pos.y.rem_euclid(20);
|
||||||
let x = pos.x.rem_euclid(30);
|
let x = pos.x.rem_euclid(30);
|
||||||
|
|
|
@ -111,19 +111,23 @@ pub fn main(mut gba: agb::Gba) -> ! {
|
||||||
let mut background0 = tiled.background(
|
let mut background0 = tiled.background(
|
||||||
Priority::P0,
|
Priority::P0,
|
||||||
display::tiled::RegularBackgroundSize::Background64x32,
|
display::tiled::RegularBackgroundSize::Background64x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
);
|
);
|
||||||
let mut background1 = tiled.background(
|
let mut background1 = tiled.background(
|
||||||
Priority::P0,
|
Priority::P0,
|
||||||
display::tiled::RegularBackgroundSize::Background64x32,
|
display::tiled::RegularBackgroundSize::Background64x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
);
|
);
|
||||||
let mut card_descriptions = tiled.background(
|
let mut card_descriptions = tiled.background(
|
||||||
Priority::P1,
|
Priority::P1,
|
||||||
display::tiled::RegularBackgroundSize::Background32x32,
|
display::tiled::RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut help_background = tiled.background(
|
let mut help_background = tiled.background(
|
||||||
Priority::P1,
|
Priority::P1,
|
||||||
display::tiled::RegularBackgroundSize::Background32x32,
|
display::tiled::RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
);
|
);
|
||||||
|
|
||||||
let basic_die = Die {
|
let basic_die = Die {
|
||||||
|
|
|
@ -783,8 +783,16 @@ impl<'a, 'b> PlayingLevel<'a, 'b> {
|
||||||
pub fn main(mut agb: agb::Gba) -> ! {
|
pub fn main(mut agb: agb::Gba) -> ! {
|
||||||
let (tiled, mut vram) = agb.display.video.tiled0();
|
let (tiled, mut vram) = agb.display.video.tiled0();
|
||||||
vram.set_background_palettes(tile_sheet::PALETTES);
|
vram.set_background_palettes(tile_sheet::PALETTES);
|
||||||
let mut splash_screen = tiled.background(Priority::P0, RegularBackgroundSize::Background32x32);
|
let mut splash_screen = tiled.background(
|
||||||
let mut world_display = tiled.background(Priority::P0, RegularBackgroundSize::Background32x32);
|
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);
|
let tileset = TileSet::new(tile_sheet::background.tiles, TileFormat::FourBpp);
|
||||||
|
|
||||||
|
|
|
@ -2225,7 +2225,11 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
let object = gba.display.object.get();
|
let object = gba.display.object.get();
|
||||||
|
|
||||||
let backdrop = InfiniteScrolledMap::new(
|
let backdrop = InfiniteScrolledMap::new(
|
||||||
background.background(Priority::P2, RegularBackgroundSize::Background32x32),
|
background.background(
|
||||||
|
Priority::P2,
|
||||||
|
RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
|
),
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
|
@ -2239,7 +2243,11 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
);
|
);
|
||||||
|
|
||||||
let foreground = InfiniteScrolledMap::new(
|
let foreground = InfiniteScrolledMap::new(
|
||||||
background.background(Priority::P0, RegularBackgroundSize::Background32x32),
|
background.background(
|
||||||
|
Priority::P0,
|
||||||
|
RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
|
),
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
|
@ -2253,7 +2261,11 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
);
|
);
|
||||||
|
|
||||||
let clouds = InfiniteScrolledMap::new(
|
let clouds = InfiniteScrolledMap::new(
|
||||||
background.background(Priority::P3, RegularBackgroundSize::Background32x32),
|
background.background(
|
||||||
|
Priority::P3,
|
||||||
|
RegularBackgroundSize::Background32x32,
|
||||||
|
TileFormat::FourBpp,
|
||||||
|
),
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
|
|
Loading…
Reference in a new issue