citro2d
Functions
Sprite sheet functions

Functions

C2D_SpriteSheet C2D_SpriteSheetLoad (const char *filename)
 Load a sprite sheet from file. More...
 
C2D_SpriteSheet C2D_SpriteSheetLoadFromMem (const void *data, size_t size)
 Load a sprite sheet from memory. More...
 
C2D_SpriteSheet C2D_SpriteSheetFromFD (int fd)
 Load sprite sheet from file descriptor. More...
 
C2D_SpriteSheet C2D_SpriteSheetLoadFromHandle (FILE *f)
 Load sprite sheet from stdio file handle. More...
 
void C2D_SpriteSheetFree (C2D_SpriteSheet sheet)
 Free a sprite sheet. More...
 
size_t C2D_SpriteSheetCount (C2D_SpriteSheet sheet)
 Retrieves the number of sprites in the specified sprite sheet. More...
 
C2D_Image C2D_SpriteSheetGetImage (C2D_SpriteSheet sheet, size_t index)
 Retrieves the specified image from the specified sprite sheet. More...
 

Detailed Description

Function Documentation

size_t C2D_SpriteSheetCount ( C2D_SpriteSheet  sheet)

Retrieves the number of sprites in the specified sprite sheet.

Parameters
[in]sheetSprite sheet handle
Returns
Number of sprites
void C2D_SpriteSheetFree ( C2D_SpriteSheet  sheet)

Free a sprite sheet.

Parameters
[in]sheetSprite sheet handle
C2D_SpriteSheet C2D_SpriteSheetFromFD ( int  fd)

Load sprite sheet from file descriptor.

Parameters
[in]fdFile descriptor used to load data
Returns
Sprite sheet handle
Return values
NULLError
C2D_Image C2D_SpriteSheetGetImage ( C2D_SpriteSheet  sheet,
size_t  index 
)

Retrieves the specified image from the specified sprite sheet.

Parameters
[in]sheetSprite sheet handle
[in]indexIndex of the image to retrieve
Returns
Image object
C2D_SpriteSheet C2D_SpriteSheetLoad ( const char *  filename)

Load a sprite sheet from file.

Parameters
[in]filenameName of the sprite sheet file (.t3x)
Returns
Sprite sheet handle
Return values
NULLError
C2D_SpriteSheet C2D_SpriteSheetLoadFromHandle ( FILE *  f)

Load sprite sheet from stdio file handle.

Parameters
[in]fFile handle used to load data
Returns
Sprite sheet handle
Return values
NULLError
C2D_SpriteSheet C2D_SpriteSheetLoadFromMem ( const void *  data,
size_t  size 
)

Load a sprite sheet from memory.

Parameters
[in]dataData to load
[in]sizeSize of the data to load
Returns
Sprite sheet handle
Return values
NULLError