mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
pull out common part of loop
This commit is contained in:
parent
3f9fdd7c37
commit
e601374207
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue