We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ca9eba commit 96c2981Copy full SHA for 96c2981
src/ppu/ppu.zig
@@ -447,9 +447,8 @@ pub const PPU = struct {
447
// Sprite zero hit: https://www.nesdev.org/wiki/PPU_OAM#Sprite_zero_hits
448
// This happens regardless of sprite priority.
449
if (i == 0 and // sprite 0 is always in the first latch.
450
- i < self.num_sprites_on_scanline and
451
- self.scanline_has_sprite0 and
452
- !is_bg_transparent)
+ i < self.num_sprites_on_scanline and self.scanline_has_sprite0 and
+ is_sprite_px_opaque and !is_bg_transparent)
453
{
454
self.ppu_status.sprite_zero_hit = true;
455
}
0 commit comments