Skip to content

Commit

Permalink
Fix opaque black background pixels in explosion sprites.
Browse files Browse the repository at this point in the history
In the explosion sprites, make black pixels fully transparent, which otherwise block parts of the scene, e.g. stars and ship. Also make all other pixels semi-transparent, which appeared nicer.
  • Loading branch information
tstoeter authored and SiegeLord committed Jun 23, 2024
1 parent 3aba4b8 commit fd7de9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demos/shooter/expl.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ void generate_explosions(void)
lp[0] = pal->rgb[c2].r * 255;
lp[1] = pal->rgb[c2].g * 255;
lp[2] = pal->rgb[c2].b * 255;
lp[3] = pal->rgb[c2].a * 255;
if (c2 > 0)
lp[3] = pal->rgb[c2].a * 127;
else
lp[3] = 0;
}
}

Expand Down

0 comments on commit fd7de9f

Please sign in to comment.