View Single Post
Old November 12, 2020, 07:00   #2
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 135
backwardsEric is on a distinguished road
The Shockbolt tiles have an alpha channel for transparency information. If you look at the code in Angband's main-win.c, you'll see that the RGB components are multiplied by the alpha channel when the tile set is loaded in init_graphics(). That will convert the fully transparent parts, i.e. the white background, to black. When the premultiplied tiles are rendered to the screen in Term_pict_win_alpha(), the destination is first cleared, the tile used as the background is rendered with BitBlt() using SRCCOPY as the operation, and then, if there is an object or creature to rendered on top of the background, that is done with AlphaBlend().
backwardsEric is offline   Reply With Quote