Annchienta::TileSet Class Reference

List of all members.

Public Member Functions

const char * getDirectory () const
MaskgetMask () const
int getNumberOfSideSurfaces () const
int getNumberOfSurfaces () const
SurfacegetSideSurface (int sideNumber) const
SurfacegetSurface (int tileNumber) const
 TileSet (const char *directory)
 ~TileSet ()

Private Attributes

char directory [DEFAULT_STRING_SIZE]
Maskmask
int numberOfSideSurfaces
int numberOfSurfaces
Surface ** sideSurfaces
Surface ** surfaces


Detailed Description

A TileSet is simply a collection of tiles. A Map always has a TileSet attached to it.

Constructor & Destructor Documentation

Annchienta::TileSet::TileSet ( const char *  directory  ) 

Load a TileSet from a directory. The directory should be formed like this:

There should be tile images, png files with dimensions as set in MapManager::setTileWidth(). These images should be named: 1.png, 2.png, 3.png...

There can also be side tiles. These should be named: side1.png, side2.png, side3.png...

Automatically, a transparent tile and side tile will be generated. These both have the number '0'.

Annchienta::TileSet::~TileSet (  ) 


Member Function Documentation

const char* Annchienta::TileSet::getDirectory (  )  const

Returns:
The path to the directory where the tiles were found.

Mask* Annchienta::TileSet::getMask (  )  const

Gets a reference to a Mask that has the form of a simple isometric tile, in the correct size. This can be handy for collision detection.

int Annchienta::TileSet::getNumberOfSideSurfaces (  )  const

Returns:
the number of side surfaces

int Annchienta::TileSet::getNumberOfSurfaces (  )  const

Returns:
the number of tile surfaces.

Surface* Annchienta::TileSet::getSideSurface ( int  sideNumber  )  const

Returns the tile image corresponding with the given tileNumber.

Surface* Annchienta::TileSet::getSurface ( int  tileNumber  )  const

Returns the tile image corresponding with the given tileNumber.


Member Data Documentation

char Annchienta::TileSet::directory[DEFAULT_STRING_SIZE] [private]


Generated on Wed Feb 4 16:31:47 2009 for Annchienta by  doxygen 1.5.7.1