Syndicate::Data::SpriteElement Class Reference

#include <Syndicate/Data/SpriteElement.h>

Inheritance diagram for Syndicate::Data::SpriteElement:

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

Public Member Functions

 SpriteElement (void)
 ~SpriteElement (void)
void get (unsigned id, unsigned &sprite, int &x_offset, int &y_offset, bool &flipped, unsigned &next) const
unsigned size (void) const
virtual void info (void)
bool load (char const *filename)
unsigned getLength (void)

Protected Attributes

unsigned _data_length

Private Attributes

Element_elements

Classes

struct  Element

Detailed Description

Allow to get placement information and composition of sprites for a frame


Constructor & Destructor Documentation

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

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


Member Function Documentation

void Syndicate::Data::SpriteElement::get ( unsigned  id,
unsigned &  sprite,
int &  x_offset,
int &  y_offset,
bool &  flipped,
unsigned &  next 
) const

Given the index of the element, returns the index of the first sprite of the element and other informations.

Parameters:
[in] id the *index* of the element
[out] sprite the *index* of the first sprite that make this element
[out] x_offset the horizontal offset of this sprite
[out] y_offset the vertical offset of this sprite
[out] flipped say if the sprite is flipped horizontaly
[out] next the *index* of the next element

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

Return the number of elements

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.

Parameters:
[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

Element* Syndicate::Data::SpriteElement::_elements [private]

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