Skip to content

Commit

Permalink
(screen.c) Blending 00 only clears in accordance to sprite at addr
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jul 26, 2023
1 parent 7a7db92 commit d30fc20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arm9/source/nds_ppu.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static Uint8 blending[5][16] = {
{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3},
{1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1},
{2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2},
{1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0}};
{0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0}};

#define PPU_TILES_WIDTH 32
#define PPU_TILES_HEIGHT 24
Expand Down
2 changes: 1 addition & 1 deletion source/3ds/ctr_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ __attribute__((optimize("-O3")))
static void
screen_blit(UxnCtrScreen *s, Uint8 *pixels, Uint16 x1, Uint16 y1, Uint8 *ram, Uint16 addr, Uint8 color, Uint8 flipx, Uint8 flipy, Uint8 twobpp)
{
int v, h, width = s->width, height = s->height, opaque = (color % 5) || !color;
int v, h, width = s->width, height = s->height, opaque = (color % 5);
if ((color == 1 || color == 5) && !flipy && !flipx && x1 <= width-8 && y1 <= height-8) {
// fast path
for(v = 0; v < 8; v++) {
Expand Down

0 comments on commit d30fc20

Please sign in to comment.