mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Use deduplicated tiles for hatwiz splash screens
This commit is contained in:
parent
b39f99990c
commit
201a127673
|
@ -1,9 +1,9 @@
|
||||||
use super::sfx::SfxPlayer;
|
use super::sfx::SfxPlayer;
|
||||||
use agb::display::tiled::{RegularMap, TileFormat, TileSet, TileSetting, TiledMap, VRamManager};
|
use agb::display::tiled::{RegularMap, TileFormat, TileSet, TiledMap, VRamManager};
|
||||||
|
|
||||||
agb::include_background_gfx!(splash_screens,
|
agb::include_background_gfx!(splash_screens,
|
||||||
splash => "gfx/splash.png",
|
splash => deduplicate "gfx/splash.png",
|
||||||
thanks_for_playing => "gfx/thanks_for_playing.png",
|
thanks_for_playing => deduplicate "gfx/thanks_for_playing.png",
|
||||||
);
|
);
|
||||||
|
|
||||||
pub enum SplashScreen {
|
pub enum SplashScreen {
|
||||||
|
@ -18,12 +18,18 @@ pub fn show_splash_screen(
|
||||||
vram: &mut VRamManager,
|
vram: &mut VRamManager,
|
||||||
) {
|
) {
|
||||||
map.set_scroll_pos((0i16, 0i16).into());
|
map.set_scroll_pos((0i16, 0i16).into());
|
||||||
let tileset = match which {
|
let (tileset, settings) = match which {
|
||||||
SplashScreen::Start => TileSet::new(splash_screens::splash.tiles, TileFormat::FourBpp),
|
SplashScreen::Start => (
|
||||||
|
TileSet::new(splash_screens::splash.tiles, TileFormat::FourBpp),
|
||||||
|
splash_screens::splash.tile_settings,
|
||||||
|
),
|
||||||
|
|
||||||
SplashScreen::End => TileSet::new(
|
SplashScreen::End => (
|
||||||
splash_screens::thanks_for_playing.tiles,
|
TileSet::new(
|
||||||
TileFormat::FourBpp,
|
splash_screens::thanks_for_playing.tiles,
|
||||||
|
TileFormat::FourBpp,
|
||||||
|
),
|
||||||
|
splash_screens::thanks_for_playing.tile_settings,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,7 +46,7 @@ pub fn show_splash_screen(
|
||||||
vram,
|
vram,
|
||||||
(x, y).into(),
|
(x, y).into(),
|
||||||
&tileset,
|
&tileset,
|
||||||
TileSetting::from_raw(y * 30 + x),
|
settings[(y * 30 + x) as usize],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue