Public Member Functions | |
const char * | getDirectory () const |
Mask * | getMask () const |
int | getNumberOfSideSurfaces () const |
int | getNumberOfSurfaces () const |
Surface * | getSideSurface (int sideNumber) const |
Surface * | getSurface (int tileNumber) const |
TileSet (const char *directory) | |
~TileSet () | |
Private Attributes | |
char | directory [DEFAULT_STRING_SIZE] |
Mask * | mask |
int | numberOfSideSurfaces |
int | numberOfSurfaces |
Surface ** | sideSurfaces |
Surface ** | surfaces |
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 | ( | ) |
const char* Annchienta::TileSet::getDirectory | ( | ) | const |
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 |
int Annchienta::TileSet::getNumberOfSurfaces | ( | ) | const |
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.
char Annchienta::TileSet::directory[DEFAULT_STRING_SIZE] [private] |
Mask* Annchienta::TileSet::mask [private] |
int Annchienta::TileSet::numberOfSideSurfaces [private] |
int Annchienta::TileSet::numberOfSurfaces [private] |
Surface** Annchienta::TileSet::sideSurfaces [private] |
Surface** Annchienta::TileSet::surfaces [private] |