Skip to content

Commit

Permalink
Fix corruption with vflip sprites in OAM viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 7, 2023
1 parent cfe19f6 commit 35bcf35
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions platforms/desktop-shared/emu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,10 @@ static void update_debug_oam_buffers(void)
int pixel_x = pixel & 0x7;
int pixel_y = pixel / 8;

u16 line_addr = tile_addr + (2 * pixel_y);
u16 line_addr = tile_addr + (2 * (yflip ? (sprites_16 ? 15 : 7) - pixel_y : pixel_y));

if (xflip)
pixel_x = 7 - pixel_x;
if (yflip)
line_addr = (sprites_16 ? 15 : 7) - line_addr;

u8 byte1 = 0;
u8 byte2 = 0;
Expand Down

0 comments on commit 35bcf35

Please sign in to comment.