mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +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 mut start_at_boss = false;
|
||||||
|
|
||||||
loop {
|
|
||||||
let (background, mut vram) = gba.display.video.tiled0();
|
let (background, mut vram) = gba.display.video.tiled0();
|
||||||
|
|
||||||
vram.set_background_palettes(background::PALETTES);
|
vram.set_background_palettes(background::PALETTES);
|
||||||
|
|
||||||
let tileset = TileSet::new(background::background.tiles, TileFormat::FourBpp);
|
let tileset = TileSet::new(background::background.tiles, TileFormat::FourBpp);
|
||||||
|
|
||||||
let object = gba.display.object.get();
|
let object = gba.display.object.get();
|
||||||
|
|
||||||
|
loop {
|
||||||
let backdrop = InfiniteScrolledMap::new(
|
let backdrop = InfiniteScrolledMap::new(
|
||||||
background.background(
|
background.background(
|
||||||
Priority::P2,
|
Priority::P2,
|
||||||
|
|
Loading…
Reference in a new issue