you CAN fix stupid!!!!!
This commit is contained in:
parent
a81d082e16
commit
d3c67622eb
2 changed files with 11 additions and 7 deletions
|
@ -534,8 +534,11 @@ where
|
|||
};
|
||||
let tiledata_offset = tile_px_y * 2;
|
||||
|
||||
let tile_addr = (self.lcdc.tile_area.get_addr(self.vram.get(tilemap_addr))
|
||||
+ tiledata_offset as u16)
|
||||
let tile_addr = (self.lcdc.tile_area.get_addr(
|
||||
self.vram
|
||||
.get_with_bank(tilemap_addr, VramBank::Bank0)
|
||||
.unwrap(),
|
||||
) + tiledata_offset as u16)
|
||||
.unwrap();
|
||||
|
||||
let lsbs = self
|
||||
|
|
|
@ -267,7 +267,7 @@ impl Default for Stat {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Copy)]
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, Debug)]
|
||||
pub enum VramBank {
|
||||
Bank0 = 0,
|
||||
Bank1 = 1,
|
||||
|
@ -386,6 +386,7 @@ pub struct GpuInterrupts {
|
|||
pub vblank: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(super) struct BgAttributes {
|
||||
pub(super) bg_priority: bool,
|
||||
pub(super) flip_v: bool,
|
||||
|
@ -397,11 +398,11 @@ pub(super) struct BgAttributes {
|
|||
impl Default for BgAttributes {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
bg_priority: Default::default(),
|
||||
flip_v: Default::default(),
|
||||
flip_h: Default::default(),
|
||||
bg_priority: false,
|
||||
flip_v: false,
|
||||
flip_h: false,
|
||||
tile_bank: VramBank::Bank0,
|
||||
palette: Default::default(),
|
||||
palette: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue