Skip to content

LoadSpriteSheet (RSDKv5)

Description

Loads a spritesheet and returns the ID of it.

Parameters

path

The file path of the spritesheet to load, relative to Data/Sprites/. Spritesheets may ONLY be in GIF format.

scope

The asset's scope. May be SCOPE_GLOBAL or SCOPE_STAGE.

Return Value

Returns the ID of the loaded spritesheet as a uint16. The return value will be -1 if the spritesheet failed to load.

Syntax

RSDK.LoadSpriteSheet(const char* path, Scopes scope);
SpriteSheet.Load(const char* path, Scopes scope);

Example

MyObject->mySheet = RSDK.LoadSpriteSheet("Test/Objects.gif", SCOPE_STAGE);
sVars->mySheet.Load("Test/Objects.gif", SCOPE_STAGE);