Name
planar.GetSpriteType -- get hardware sprite object type (V2.0)
Synopsis
type = planar.GetSpriteType()
Function
This function returns the hardware sprite object type registered by Plananarama. You can then pass this object type to Hollywood's GetAttribute() function to query the following attributes of hardware sprites:

#ATTRWIDTH:
The hardware sprite width.

#ATTRHEIGHT:
The hardware sprite height.

#ATTRDEPTH:
The hardware sprite depth.

#ATTRXPOS:
The hardware sprite x position.

#ATTRYPOS:
The hardware sprite y position.

#ATTRSTATE:
The sprite DMA channel the hardware sprite has been mapped to. For unmapped hardware sprites, this will be -1.

Inputs
none

Results
type
hardware sprite object type registered by Plananarama
Example
DMASPRITE_TYPE = planar.GetSpriteType()
w = GetAttribute(DMASPRITE_TYPE, 1, #ATTRWIDTH)
h = GetAttribute(DMASPRITE_TYPE, 1, #ATTRHEIGHT)
The code above queries the width and height of hardware sprite 1.

Show TOC