mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Add a basic version of the example_logo for certain examples
This commit is contained in:
parent
b208133564
commit
24e15f8786
|
@ -25,7 +25,7 @@ fn main(mut gba: agb::Gba) -> ! {
|
|||
|
||||
let dma = gba.dma.dma().dma0;
|
||||
|
||||
example_logo::display_logo(&mut map, &mut vram);
|
||||
example_logo::display_logo_basic(&mut map, &mut vram);
|
||||
|
||||
let vblank = VBlank::get();
|
||||
|
||||
|
|
BIN
agb/gfx/test_logo.aseprite
Normal file
BIN
agb/gfx/test_logo.aseprite
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
agb/gfx/test_logo_basic.png
Normal file
BIN
agb/gfx/test_logo_basic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,6 +1,7 @@
|
|||
use super::tiled::{RegularMap, TiledMap, VRamManager};
|
||||
|
||||
crate::include_background_gfx!(crate, agb_logo, test_logo => deduplicate "gfx/test_logo.png");
|
||||
crate::include_background_gfx!(crate, agb_logo_basic, test_logo => deduplicate "gfx/test_logo_basic.png");
|
||||
|
||||
pub fn display_logo(map: &mut RegularMap, vram: &mut VRamManager) {
|
||||
vram.set_background_palettes(agb_logo::PALETTES);
|
||||
|
@ -11,6 +12,15 @@ pub fn display_logo(map: &mut RegularMap, vram: &mut VRamManager) {
|
|||
map.set_visible(true);
|
||||
}
|
||||
|
||||
pub fn display_logo_basic(map: &mut RegularMap, vram: &mut VRamManager) {
|
||||
vram.set_background_palettes(agb_logo_basic::PALETTES);
|
||||
|
||||
map.fill_with(vram, &agb_logo_basic::test_logo);
|
||||
|
||||
map.commit(vram);
|
||||
map.set_visible(true);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::display::{tiled::RegularBackgroundSize, Priority};
|
||||
|
|
Loading…
Reference in a new issue