bitmap_mask_color
Returns the mask color of the specified bitmap.
Description
Returns the mask color for the specified bitmap (the value which is
skipped when drawing sprites). For 256-color bitmaps this is zero, and
for truecolor bitmaps it is bright pink (maximum red and blue, zero
green). A frequent use of this function is to clear a bitmap with the mask
color so you can later use this bitmap with masked_blit() or
draw_sprite() after drawing other stuff on it. Example:
/* Replace mask color with another color. */
for (y = 0; y < bmp->h; y++)
for (x = 0; x < bmp->w; x++)
if (getpixel(bmp, x, y) == bitmap_mask_color(bmp))
putpixel(bmp, x, y, another_color);
Related Discussions
The following threads each have code containing this keyword:
Note: You can click on the numbers to jump directly to the posts that reference this page.
Related Projects
The following projects include source code containing this keyword: