Load sprite bitmaps into video memory which can be used to draw in-game menus and such items. Using this function to load bitmap files that are used by game entities will preload its textures, preventing the in-game lag that happens when the entity has to draw an entity whose bitmaps haven't been loaded yet.
void onSceneLoaded()
{
// load a 256x256 sprite
LoadSprite("animations/animated_sprite_256x256.png");
// divides the sprite into a 4x2 rect (4 columns and 2 rows)
SetupSpriteRects("animations/animated_sprite_256x256.png", 4, 2);
// preloads entity bitmaps so the engine doesn't have to load it during gameplay
LoadSprite("entities/level1boss.png");
LoadSprite("entities/normalmaps/level1boss_normal.png");
}