LoadSprite

Category: Images and Rendering

Back to System Functions


Signature

LoadSprite(imageName As String, frameWidth As Integer, frameHeight As Integer)

Returns

Integer

Description

Loads a sprite sheet and returns a sprite handle for use with DrawSprite.

The frame size must evenly divide the loaded image.

New sprites start with a hotspot of 0, 0 for every frame.

Example

hero = LoadSprite("player.png", 32, 32)