DSOL::Sprites Namespace Reference

contains all the classes and functions dealing with Sprites. More...


Classes

class  AffineMatrix
 a class that holds data about rotating and scaling a sprite. More...
class  Palette
 a static class that manages empty sprite palettes. More...
class  Sprite
 a class for working with ds sprites. More...

Enumerations

enum  spriteAngle
 an enum for the most used angles in the format that libnds uses (32768 degrees). More...
enum  SpriteScale
 an enum for some of the most used scaling percentages. More...

Functions

static void copyGfxData (const u32 *sourcePointer, u16 *gfxPointer, const uint dataLength)
 a wrapper for copying gfx data.
const uint gfxToByteSize (const SpriteSize size, const SpriteColorFormat colorFormat)
 returns the size in bytes of a given size and colorFormat.
static const uint gfxToFrameCount (const uint gfxLength, const SpriteSize size, const SpriteColorFormat colorFormat)
 calculates the number of frames that a sprite has.
const uint spriteSizeToHeight (const SpriteSize size)
 returns the height for a given SpriteSize enum value.
static const uint spriteSizeToPixel (const SpriteSize size)
 returns the number of pixels a SpriteSize uses.
const uint spriteSizeToWidth (const SpriteSize size)
 returns the width for a given SpriteSize enum value.


Detailed Description

contains all the classes and functions dealing with Sprites.


Enumeration Type Documentation

an enum for the most used angles in the format that libnds uses (32768 degrees).

the enum contains values for the most used angles in the libnds format. both clockwise as counter clockwise (cc).

an enum for some of the most used scaling percentages.


Function Documentation

static void DSOL::Sprites::copyGfxData ( const u32 *  sourcePointer,
u16 *  gfxPointer,
const uint  dataLength 
) [inline, static]

a wrapper for copying gfx data.

Parameters:
sourcePointer a pointer to the gfx data.
gfxPointer a pointer to the destination in vram.
dataLength the length of the data.

const uint DSOL::Sprites::gfxToByteSize ( const SpriteSize  size,
const SpriteColorFormat  colorFormat 
)

returns the size in bytes of a given size and colorFormat.

Parameters:
size the SpriteSize enum value.
colorFormat the SpriteColorFormat enum value.
Returns:
the size in bytes.

static const uint DSOL::Sprites::gfxToFrameCount ( const uint  gfxLength,
const SpriteSize  size,
const SpriteColorFormat  colorFormat 
) [inline, static]

calculates the number of frames that a sprite has.

Parameters:
gfxLength the length of the graphics data.
size the size of the sprite, 1 of libnds enum values.
colorFormat the number of bits a pixel has, 1 of libnds enum values.
Returns:
the number of frames that an image has.

const uint DSOL::Sprites::spriteSizeToHeight ( const SpriteSize  size  ) 

returns the height for a given SpriteSize enum value.

Parameters:
size the SpriteSize enum value.
Returns:
the height, 0 if the SpriteSize wasn't recognized (shouldn't happen tho).

static const uint DSOL::Sprites::spriteSizeToPixel ( const SpriteSize  size  )  [inline, static]

returns the number of pixels a SpriteSize uses.

Parameters:
size the SpriteSize enum value.
Returns:
the number of pixels (height * width).

const uint DSOL::Sprites::spriteSizeToWidth ( const SpriteSize  size  ) 

returns the width for a given SpriteSize enum value.

Parameters:
size the SpriteSize enum value.
Returns:
the width, 0 if the SpriteSize wasn't recognized (shouldn't happen tho).


Generated on Thu Sep 10 19:09:47 2009 for DSOL by  doxygen 1.5.8