pull out common part of loop

This commit is contained in:
Corwin 2023-04-18 00:12:20 +01:00
parent 3f9fdd7c37
commit e601374207
No known key found for this signature in database

View file

@ -2193,15 +2193,12 @@ fn game_with_level(gba: &mut agb::Gba) {
let mut start_at_boss = false;
let (background, mut vram) = gba.display.video.tiled0();
vram.set_background_palettes(background::PALETTES);
let tileset = TileSet::new(background::background.tiles, TileFormat::FourBpp);
let object = gba.display.object.get();
loop {
let (background, mut vram) = gba.display.video.tiled0();
vram.set_background_palettes(background::PALETTES);
let tileset = TileSet::new(background::background.tiles, TileFormat::FourBpp);
let object = gba.display.object.get();
let backdrop = InfiniteScrolledMap::new(
background.background(
Priority::P2,