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, though the opposite is not true and palt() will not reset colors.

Examples Edit

-- draw black pixels
palt(0, false)
-- don't draw red pixels
palt(8, true)
-- reset transparency
-- pal() also resets transparency when it resets colors

See also Edit

Community content is available under CC-BY-SA unless otherwise noted.