palt( col, t )

Change the transparency of a color in the draw state for subsequent draw calls.

The number of the color to modify.
If true, treat this color as transparent. If false, treat this color as opaque.

When the spr(), sspr(), and map() functions copy sprite pixels onto the screen, some colors are considered transparent and are not drawn. By default, color 0 (black) is transparent, so when a sprite's pixel is this color and the sprite is drawn on top of an existing image, that pixel preserves the color underneath.

The palt() function changes the transparency of a given color.

If called without arguments, palt() resets the transparency for all colors. The pal() function called without arguments also resets transparency.

Examples Edit

-- don't draw red pixels
palt(8, true)
-- reset transparency

See also Edit