uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 3818720eb2a90b0fdf1aad4db9a93ccdadd1826a
parent 3b128c04d4d4af721995ce43bc6c8da94d828c76
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Tue, 28 Feb 2023 17:00:21 -0800

Removed opacity lut

Diffstat:
Msrc/devices/screen.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/devices/screen.c b/src/devices/screen.c @@ -20,8 +20,7 @@ static Uint8 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 Uint32 palette_mono[] = { 0x0f000000, 0x0fffffff}; @@ -41,7 +40,7 @@ screen_write(UxnScreen *p, Layer *layer, Uint16 x, Uint16 y, Uint8 color) static void screen_blit(UxnScreen *p, Layer *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy, Uint8 twobpp) { - int v, h, opaque = blending[4][color]; + int v, h, opaque = (color % 5) || !color; for(v = 0; v < 8; v++) { Uint16 c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8; for(h = 7; h >= 0; --h, c >>= 1) {