Name
planar.MapSprite -- map hardware sprite to DMA channel (V2.0)
Synopsis
planar.MapSprite(id[, t])
Function
This function maps the hardware sprite specified by id to a free sprite DMA channel. The hardware sprite specified by id must have been created using planar.CreateSprite() first.

Further parameters can be specified in the optional table argument. The following tags are currently recognized:

Channel:
By default, planar.MapSprite() will choose a sprite DMA channel automatically. If you want to use a specific sprite DMA channel, you can set it using this tag. This must be a number between 1 and 7 (channel 0 is reserved for use by Intuition for the mouse pointer sprite). Note that if the sprite uses 16 colors you can only use channels 2, 4 or 6 because 16 color sprites occupy two adjacent sprite DMA channels.

Display:
This can be set to the identifier of a Hollywood display the sprite should appear on. This is normally not necessary and the sprite will just use the current Hollywood display.

Note that if the sprite DMA channel is automatically chosen by planar.MapSprite(), you can query the #ATTRSTATE attribute to find out the DMA channel your sprite has been mapped to after calling planar.MapSprite().

To unmap a hardware sprite from a DMA channel, use planar.UnmapSprite() See planar.UnmapSprite for details.

Inputs
id
identifier of hardware sprite to map to DMA channel
t
optional: table containing further arguments (see above)
Example
See planar.CreateSprite


Show TOC