Ensure that the affine background example looks consistent (#523)

Fixes #522

- [x] Changelog updated / no changelog update needed
This commit is contained in:
Gwilym Inzani 2023-12-05 20:48:12 +00:00 committed by GitHub
commit 904c702e49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,18 +11,18 @@ use agb::{
include_background_gfx, include_background_gfx,
}; };
include_background_gfx!(affine_tiles, water_tiles => 256 "examples/water_tiles.png"); include_background_gfx!(affine_tiles, "3f3f74", water_tiles => 256 "examples/water_tiles.png");
#[agb::entry] #[agb::entry]
fn main(mut gba: agb::Gba) -> ! { fn main(mut gba: agb::Gba) -> ! {
let (gfx, mut vram) = gba.display.video.tiled2(); let (gfx, mut vram) = gba.display.video.tiled1();
let vblank = agb::interrupt::VBlank::get(); let vblank = agb::interrupt::VBlank::get();
let tileset = affine_tiles::water_tiles.tiles; let tileset = affine_tiles::water_tiles.tiles;
vram.set_background_palettes(affine_tiles::PALETTES); vram.set_background_palettes(affine_tiles::PALETTES);
let mut bg = gfx.background(Priority::P0, AffineBackgroundSize::Background32x32); let mut bg = gfx.affine(Priority::P0, AffineBackgroundSize::Background32x32);
for y in 0..32u16 { for y in 0..32u16 {
for x in 0..32u16 { for x in 0..32u16 {