CreateSprite

Description

Creates a sprite in a blank sprite ID with an image to use when rendering, it returns the sprite ID used.

By default sprites are created with a depth of 10, are sized using the given image as a guide, and positioned at 0,0 using their top left corner.

You may use an image ID of 0 to create a blank sprite drawn with color only. If the assigned image has alpha pixels the sprite is create with a transparency mode of 1, otherwise it uses a transparency mode of 0 (opaque)

Definition

integer CreateSprite( iImageIndex )

CreateSprite( iSpriteIndex, iImageIndex )

Parameters