Is there a function in Allegro that allows me to "mask" or combine two bitmaps? For example, if I have a bitmap with an image of a black star on a transparent background, is there a way to mix that with a picture of some water to make a "water star"? So that the black area on the star is preserved to look like water and the surrounding transparent part is just left as transparent.

(That's just an example, it doesn't matter to me if the mask uses black, white, transparency, or whatever.)

For more information about what I'm doing specifically: I'm working on a game where you use colored stars to clear colored blocks (see screenshot). And I'm tired of creating stars and blocks of different colors and animated in different ways. So instead, I'd like to create just a couple of "block masks" and "star masks" and then a few dozen "textures" that can be generated in game (at startup) as star and blocks.

Hm, that's a neat trick, SiegeLord. I was looking for a way to implement a "Complex" primitive (basically a filled circle cut out of a rectangle, the circle is transparent), using the separate blenders seems like a good starting point.