@@ 15,8 15,7 @@ static uint8_t blending[5][16] = {
{0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 0, 2, 3, 3, 3, 0},
{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}};
+ {2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2}};
static inline void
render(Ppu *p, int offset, int count)
@@ 58,7 57,7 @@ ppu_pixel(Ppu *p, uint8_t fg, uint16_t x, uint16_t y, uint8_t color)
void
screen_blit(Ppu *p, uint8_t fg, uint16_t x, uint16_t y, uint8_t *sprite, uint8_t color, uint8_t flipx, uint8_t flipy, uint8_t twobpp)
{
- int v, h, opaque = blending[4][color];
+ int v, h, opaque = (color % 5) || !color;
for(v = 0; v < 8; v++) {
uint16_t c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8;
for(h = 7; h >= 0; --h, c >>= 1) {