From 979ca05a8be055dc2b53063ef93cc0f8c65548dd Mon Sep 17 00:00:00 2001 From: puffer Date: Sat, 24 Feb 2024 19:18:33 +0100 Subject: [PATCH] Update tga.c --- src/corelib/tga.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/tga.c b/src/corelib/tga.c index 6091367..614defb 100644 --- a/src/corelib/tga.c +++ b/src/corelib/tga.c @@ -105,6 +105,8 @@ void draw_targa_image(char *image, int size, int x, int y) { unsigned char blue = pixel & 0xFF; unsigned char alpha = (pixel >> 24) & 0xFF; + alpha = (alpha == 0) ? 255 : alpha; + put_pixel_rgba(x + i, y + j, red, green, blue, alpha); } }