This class is the root class of the parser. More...
#include <TmxMap.h>
Public Member Functions | |
void | ParseFile (const std::string &fileName) |
Read a file and parse it. More... | |
void | ParseText (const std::string &text) |
Parse text containing TMX formatted XML. | |
const std::string & | GetFilename () const |
Get the filename used to read the map. | |
const std::string & | GetFilepath () const |
Get a path to the directory of the map file if any. | |
Tmx::Color | GetBackgroundColor () const |
Get the background color of the map file. If unset, return a fully transparent color. | |
double | GetVersion () const |
Get the version of the map. | |
Tmx::MapOrientation | GetOrientation () const |
Get the orientation of the map. | |
Tmx::MapRenderOrder | GetRenderOrder () const |
Get the render order of the map. | |
Tmx::MapStaggerAxis | GetStaggerAxis () const |
Get the stagger axis of the map. | |
Tmx::MapStaggerIndex | GetStaggerIndex () const |
Get the stagger index of the map. | |
int | GetWidth () const |
Get the width of the map, in tiles. | |
int | GetHeight () const |
Get the height of the map, in tiles. | |
int | GetTileWidth () const |
Get the width of a tile, in pixels. | |
int | GetTileHeight () const |
Get the height of a tile, in pixels. | |
int | GetNextObjectId () const |
Get the next object id. | |
int | GetHexsideLength () const |
Get the hexside length. | |
const Tmx::Layer * | GetLayer (int index) const |
Get the layer at a certain index. | |
int | GetNumLayers () const |
Get the amount of layers. | |
const std::vector< Tmx::Layer * > & | GetLayers () const |
Get the whole layers collection. | |
const Tmx::TileLayer * | GetTileLayer (int index) const |
Get the tile layer at a certain index. | |
int | GetNumTileLayers () const |
Get the amount of tile layers. | |
const std::vector < Tmx::TileLayer * > & | GetTileLayers () const |
Get the whole collection of tile layers. | |
const Tmx::ObjectGroup * | GetObjectGroup (int index) const |
Get the object group at a certain index. | |
int | GetNumObjectGroups () const |
Get the amount of object groups. | |
const std::vector < Tmx::ObjectGroup * > & | GetObjectGroups () const |
Get the whole collection of object groups. | |
const Tmx::ImageLayer * | GetImageLayer (int index) const |
Get the image layer at a certain index. | |
int | GetNumImageLayers () const |
Get the amount of image layers. | |
const std::vector < Tmx::ImageLayer * > & | GetImageLayers () const |
Get the whole collection of image layers. | |
const Tmx::GroupLayer * | GetGroupLayer (int index) const |
int | GetNumGroupLayers () const |
const std::vector < Tmx::GroupLayer * > & | GetGroupLayers () const |
int | FindTilesetIndex (int gid) const |
Find the tileset index for a tileset using a tile gid. | |
const Tmx::Tileset * | FindTileset (int gid) const |
Find a tileset for a specific gid. | |
const Tmx::Tileset * | GetTileset (int index) const |
Get a tileset by an index. | |
int | GetNumTilesets () const |
Get the amount of tilesets. | |
const std::vector < Tmx::Tileset * > & | GetTilesets () const |
Get the collection of tilesets. | |
bool | HasError () const |
Get whether there was an error or not. | |
const std::string & | GetErrorText () const |
Get an error string containing the error in text format. | |
unsigned char | GetErrorCode () const |
Get a number that identifies the error. (TMX_ preceded constants) | |
const Tmx::PropertySet & | GetProperties () const |
Get the property set. | |
This class is the root class of the parser.
It has all of the information in regard to the TMX file. This class has a property set.
void Tmx::Map::ParseFile | ( | const std::string & | fileName | ) |
Read a file and parse it.
Note: use '/' instead of '\' as it is using '/' to find the path.