Skip to content

Commit

Permalink
correct x_flip math in the ppu
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanballs committed Sep 17, 2024
1 parent b28f41f commit 464fda1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mmu/ppu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ impl PPU {

for x_offset in 0..8 {
let x_position = if x_flip {
(x_position as usize).wrapping_sub(x_offset as usize)
(x_position as usize).wrapping_sub(x_offset as usize + 1)
} else {
(x_position as usize)
.wrapping_add(x_offset as usize)
Expand Down

0 comments on commit 464fda1

Please sign in to comment.