mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Try a different transparent tile then 0
This commit is contained in:
parent
ed2af0d57e
commit
742231fbc5
|
@ -70,6 +70,8 @@ pub struct RegularMap {
|
||||||
tiles_dirty: bool,
|
tiles_dirty: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const TRANSPARENT_TILE_INDEX: u16 = 1 << 10 - 1;
|
||||||
|
|
||||||
impl RegularMap {
|
impl RegularMap {
|
||||||
fn new(background_id: u8, screenblock: u8, priority: Priority) -> Self {
|
fn new(background_id: u8, screenblock: u8, priority: Priority) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -101,7 +103,7 @@ impl RegularMap {
|
||||||
|
|
||||||
let tile_index = tile_setting.index();
|
let tile_index = tile_setting.index();
|
||||||
|
|
||||||
let new_tile = if tile_index != 0 {
|
let new_tile = if tile_index != TRANSPARENT_TILE_INDEX {
|
||||||
let new_tile_idx = vram.add_tile(tileset_ref, tile_index);
|
let new_tile_idx = vram.add_tile(tileset_ref, tile_index);
|
||||||
Tile::new(new_tile_idx, tile_setting)
|
Tile::new(new_tile_idx, tile_setting)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue