From c3050f4863f5999dbb338b9ba296834527699f8c Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 14 Nov 2017 17:50:47 -0500 Subject: ... --- src/ppu.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ppu.rs b/src/ppu.rs index b13feb7..7f8a39d 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -47,7 +47,6 @@ pub struct PPU<'a> { sp_bitmap: [[u8; 2]; 8], sp_idx: [usize; 8], sp_cnt: [u8; 8], - sp_zero_insight: bool, rendering: bool, buffered_read: u8, early_read: bool, @@ -422,8 +421,8 @@ impl<'a> PPU<'a> { match self.get_sp_pidx(i) { 0x0 => (), pidx => { - if bg_pidx != 0 && self.sp_idx[i] == 0 && x != 0xff { - assert!(i == 0); + if bg_pidx != 0 && self.sp_idx[i] == 0 && + x != 0xff && s.y != 0xff { self.ppustatus |= PPU::FLAG_SPRITE_ZERO; /* set sprite zero hit */ } sp_pidx = pidx; @@ -477,7 +476,6 @@ impl<'a> PPU<'a> { sp_idx: [0x100; 8], sp_bitmap: [[0; 2]; 8], sp_cnt: [0; 8], - sp_zero_insight: false, rendering: false, buffered_read, early_read: false, -- cgit v1.2.3-70-g09d2