Syndicate::Data::SpriteData Class Reference

#include <Syndicate/Data/SpriteData.h>

Inheritance diagram for Syndicate::Data::SpriteData:

Syndicate::Data::File List of all members.

Public Member Functions

 SpriteData (void)
 ~SpriteData (void)
template<typename TColors>
void get (unsigned offset, unsigned width, unsigned height, bool h_flipped, TColors *pixels, unsigned pitch, const TColors *colors=Colors< TColors >::_default) const
unsigned nb_sprites (void) const
unsigned size (void) const
virtual void info (void)
bool load (char const *filename)
unsigned getLength (void)

Protected Attributes

unsigned _data_length

Private Attributes



struct  Data

Detailed Description

Allow to get size and placement information of sprites for frames

Constructor & Destructor Documentation

Syndicate::Data::SpriteData::SpriteData ( void   )  [inline]

Syndicate::Data::SpriteData::~SpriteData ( void   )  [inline]

Member Function Documentation

template<typename TColors>
void Syndicate::Data::SpriteData::get ( unsigned  offset,
unsigned  width,
unsigned  height,
bool  h_flipped,
TColors *  pixels,
unsigned  pitch,
const TColors *  colors = Colors< TColors >::_default 
) const [inline]

Draw the sprite in the given buffer

[in] offset the *offset* of the data in the SpriteData structure
[in] width width in pixels of the sprite
[in] height height in pixels of the sprite
[in] h_flipped 
[out] pixels a pointer to a buffer where the method will store the pixels (each pixel is one byte).
[in] pitch the width of the sprite buffer
[out] colors a kind of map between a palette index and a color to put in pixels

unsigned Syndicate::Data::SpriteData::nb_sprites ( void   )  const [inline]

Return the number of sprites

unsigned Syndicate::Data::SpriteData::size ( void   )  const [inline]

Return the number of data.

nb_sprites has more sense.

virtual void Syndicate::Data::File::info ( void   )  [virtual, inherited]

In debug mode it display the informations.

bool Syndicate::Data::File::load ( char const *  filename  )  [inherited]

This method load the content (unpacked) of the file at the adress pointed by _data.

[in] filename the name of the file.
Return values:
true if success.
false if fails. If previous file is loaded, the data keep unaffected.

unsigned Syndicate::Data::File::getLength ( void   )  [inline, inherited]

Member Data Documentation

Data* Syndicate::Data::SpriteData::_data [private]

Reimplemented from Syndicate::Data::File.

unsigned Syndicate::Data::File::_data_length [protected, inherited]

The documentation for this class was generated from the following file:
Generated on Sun Sep 30 13:08:36 2007 for libSyndicate by  doxygen 1.5.2