Rename world_display as splash_screen

This commit is contained in:
Gwilym Kuiper 2022-02-14 22:26:37 +00:00
parent d896adfad5
commit b61f774061

View file

@ -774,7 +774,7 @@ impl<'a, 'b, 'c> PlayingLevel<'a, 'b> {
fn main(mut agb: agb::Gba) -> ! { 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::background.palettes); vram.set_background_palettes(tile_sheet::background.palettes);
let mut world_display = tiled.background(Priority::P0); let mut splash_screen = tiled.background(Priority::P0);
let tile_set_ref = vram.add_tileset(TileSet::new( let tile_set_ref = vram.add_tileset(TileSet::new(
tile_sheet::background.tiles, tile_sheet::background.tiles,
@ -785,7 +785,7 @@ fn main(mut agb: agb::Gba) -> ! {
splash_screen::SplashScreen::Start, splash_screen::SplashScreen::Start,
None, None,
None, None,
&mut world_display, &mut splash_screen,
&mut vram, &mut vram,
); );
@ -799,7 +799,7 @@ fn main(mut agb: agb::Gba) -> ! {
for y in 0..32u16 { for y in 0..32u16 {
for x in 0..32u16 { for x in 0..32u16 {
world_display.set_tile( splash_screen.set_tile(
&mut vram, &mut vram,
(x, y).into(), (x, y).into(),
tile_set_ref, tile_set_ref,
@ -808,8 +808,8 @@ fn main(mut agb: agb::Gba) -> ! {
} }
} }
world_display.commit(); splash_screen.commit();
world_display.show(); splash_screen.show();
object.enable(); object.enable();
@ -830,15 +830,15 @@ fn main(mut agb: agb::Gba) -> ! {
mixer.after_vblank(); mixer.after_vblank();
level_display::write_level( level_display::write_level(
&mut world_display, &mut splash_screen,
current_level / 8 + 1, current_level / 8 + 1,
current_level % 8 + 1, current_level % 8 + 1,
tile_set_ref, tile_set_ref,
&mut vram, &mut vram,
); );
world_display.commit(); splash_screen.commit();
world_display.show(); splash_screen.show();
music_box.before_frame(&mut mixer); music_box.before_frame(&mut mixer);
mixer.frame(); mixer.frame();
@ -909,7 +909,7 @@ fn main(mut agb: agb::Gba) -> ! {
level.show_backgrounds(); level.show_backgrounds();
world_display.hide(); splash_screen.hide();
loop { loop {
match level match level
@ -946,7 +946,7 @@ fn main(mut agb: agb::Gba) -> ! {
splash_screen::SplashScreen::End, splash_screen::SplashScreen::End,
Some(&mut mixer), Some(&mut mixer),
Some(&mut music_box), Some(&mut music_box),
&mut world_display, &mut splash_screen,
&mut vram, &mut vram,
); );
} }