Change the transparency of a color in the draw state for subsequent draw calls.
- The number of the color to modify.
true, treat this color as transparent. If
false, treat this color as opaque.
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.
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.
-- draw black pixels palt(0, false) -- don't draw red pixels palt(8, true) -- reset transparency palt() -- pal() also resets transparency when it resets colors pal()