planar.MapSprite(id[, t])
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:
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:
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.