LoadSpriteset.c File Reference

Spriteset loader (.png / .txt pair) created with Spritesheet packer http://spritesheetpacker.codeplex.com/. More...

Functions

TLN_Spriteset TLN_LoadSpriteset (const char *name)
 Loads a spriteset from a png/txt file pair. More...
 

Detailed Description

Spriteset loader (.png / .txt pair) created with Spritesheet packer http://spritesheetpacker.codeplex.com/.

Function Documentation

TLN_Spriteset TLN_LoadSpriteset ( const char *  name)

Loads a spriteset from a png/txt file pair.

Parameters
nameBase name of the files containing the spriteset
Returns
Reference to the newly loaded spriteset or NULL if error
Remarks
The spriteset comes in a pair of files called name.png and name.txt. The png file contains the spriteset, whereas the txt contains the coordinates of the rectangles that define individual sprites. These files can be created wit the spritesheet packer tool (http://spritesheetpacker.codeplex.com/)
An associated palette is also created, it can be obtained calling TLN_GetSpritesetPalette()