Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Update tga.c
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinAlavik authored Feb 24, 2024
1 parent c4cddbe commit 979ca05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corelib/tga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 979ca05

Please sign in to comment.