aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2017-11-14 17:50:47 -0500
committerDeterminant <ted.sybil@gmail.com>2017-11-14 17:50:47 -0500
commitc3050f4863f5999dbb338b9ba296834527699f8c (patch)
treedea691f09cd92ccbefec8e253985f2fbc234a5d6
parent076dd5317af6061d916b3b119ded30dac8b5ac7e (diff)
...
-rw-r--r--src/ppu.rs6
1 files changed, 2 insertions, 4 deletions
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,