Class CCTMXMapInfo

#include <Geode/cocos/tilemap_parallax_nodes/CCTMXXMLParser.h>
classCCTMXMapInfo:publiccocos2d::CCObject,publiccocos2d::CCSAXDelegator{ ... }

CCTMXMapInfo contains the information about the map like:

  • Map orientation (hexagonal, isometric or orthogonal)
  • Tile size
  • Map size And it also contains:
  • Layers (an array of TMXLayerInfo objects)
  • Tilesets (an array of TMXTilesetInfo objects)
  • ObjectGroups (an array of TMXObjectGroupInfo objects) This information is obtained from the TMX file.
Examples0
Public static methods2
staticcocos2d::CCTMXMapInfo*formatWithTMXFile(
charconst*tmxFile
)

creates a TMX Format with a tmx file

staticcocos2d::CCTMXMapInfo*formatWithXML(
charconst*tmxString
,
charconst*resourcePath
)

creates a TMX Format with an XML string and a TMX resource path

Public member functions35
virtualintgetOrientation()const
No description provided
virtualvoidsetOrientation(
intvar
)
No description provided
virtualcocos2d::CCSizeconst&getMapSize()const
No description provided
virtualvoidsetMapSize()
No description provided
virtualcocos2d::CCSizeconst&getTileSize()const
No description provided
virtualvoidsetTileSize()
No description provided
virtualcocos2d::CCArray*getLayers()
No description provided
virtualvoidsetLayers()
No description provided
virtualcocos2d::CCArray*getTilesets()
No description provided
virtualvoidsetTilesets()
No description provided
virtualcocos2d::CCArray*getObjectGroups()
No description provided
virtualvoidsetObjectGroups()
No description provided
virtualintgetParentElement()const
No description provided
virtualvoidsetParentElement(
intvar
)
No description provided
virtualuintgetParentGID()const
No description provided
virtualvoidsetParentGID(
uintvar
)
No description provided
virtualintgetLayerAttribs()const
No description provided
virtualvoidsetLayerAttribs(
intvar
)
No description provided
virtualboolgetStoringCharacters()const
No description provided
virtualvoidsetStoringCharacters(
boolvar
)
No description provided
virtualcocos2d::CCDictionary*getProperties()
No description provided
virtualvoidsetProperties()
No description provided
boolinitWithTMXFile(
charconst*tmxFile
)

initializes a TMX format with a tmx file

boolinitWithXML(
charconst*tmxString
,
charconst*resourcePath
)

initializes a TMX format with an XML string and a TMX resource path

boolparseXMLFile(
charconst*xmlFilename
)

initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file

boolparseXMLString(
charconst*xmlString
)
No description provided
cocos2d::CCDictionary*getTileProperties()
No description provided
voidsetTileProperties()
No description provided
virtualvoidstartElement(,,)

implement pure virtual methods of CCSAXDelegator

virtualvoidendElement(,)
No description provided
virtualvoidtextHandler(,,
intlen
)
No description provided
charconst*getCurrentString()
No description provided
voidsetCurrentString(
charconst*currentString
)
No description provided
charconst*getTMXFileName()
No description provided
voidsetTMXFileName(
charconst*fileName
)
No description provided
Fields0
Protected member functions0
Protected fields16
intm_nOrientation
;
No description provided
cocos2d::CCSizem_tMapSize
;
No description provided
cocos2d::CCSizem_tTileSize
;
No description provided
;
No description provided
;
No description provided
cocos2d::CCArray*m_pObjectGroups
;
No description provided
intm_nParentElement
;
No description provided
uintm_uParentGID
;
No description provided
intm_nLayerAttribs
;
No description provided
boolm_bStoringCharacters
;
No description provided
;
No description provided
gd::stringm_sTMXFileName
;

//! tmx filename

gd::stringm_sResources
;
No description provided
gd::stringm_sCurrentString
;

//! current string

cocos2d::CCDictionary*m_pTileProperties
;

//! tile properties

uintm_uCurrentFirstGID
;
No description provided