mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
More correctly special case tile 0
This commit is contained in:
parent
666867e933
commit
66a61e33e6
|
@ -342,8 +342,13 @@ impl RegularMap {
|
|||
}
|
||||
|
||||
let tile_index = tile_setting.index();
|
||||
let new_tile_idx = vram.add_tile(tileset_ref, tile_index);
|
||||
let new_tile = Tile::new(new_tile_idx, tile_setting);
|
||||
|
||||
let new_tile = if tile_index != 0 {
|
||||
let new_tile_idx = vram.add_tile(tileset_ref, tile_index);
|
||||
Tile::new(new_tile_idx, tile_setting)
|
||||
} else {
|
||||
Tile::default()
|
||||
};
|
||||
|
||||
self.tiles[pos] = new_tile;
|
||||
self.tiles_dirty = true;
|
||||
|
|
|
@ -806,7 +806,7 @@ fn main(mut agb: agb::Gba) -> ! {
|
|||
let mut music_box = sfx::MusicBox::new();
|
||||
|
||||
let vblank = agb::interrupt::VBlank::get();
|
||||
let mut current_level = 0;
|
||||
let mut current_level = 8;
|
||||
|
||||
loop {
|
||||
if current_level == map_tiles::LEVELS.len() as u32 {
|
||||
|
|
Loading…
Reference in a new issue