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

/// map orientation

virtualvoidsetOrientation(
intvar
)

/// map orientation

virtualcocos2d::CCSizeconst&getMapSize()const

/// map width & height

virtualvoidsetMapSize()

/// map width & height

virtualcocos2d::CCSizeconst&getTileSize()const

/// tiles width & height

virtualvoidsetTileSize()

/// tiles width & height

virtualcocos2d::CCArray*getLayers()

/// Layers

virtualvoidsetLayers()

/// Layers

virtualcocos2d::CCArray*getTilesets()

/// tilesets

virtualvoidsetTilesets()

/// tilesets

virtualcocos2d::CCArray*getObjectGroups()

/// ObjectGroups

virtualvoidsetObjectGroups()

/// ObjectGroups

virtualintgetParentElement()const

/// parent element

virtualvoidsetParentElement(
intvar
)

/// parent element

virtualuintgetParentGID()const

/// parent GID

virtualvoidsetParentGID(
uintvar
)

/// parent GID

virtualintgetLayerAttribs()const

/// layer attribs

virtualvoidsetLayerAttribs(
intvar
)

/// layer attribs

virtualboolgetStoringCharacters()const

/// is storing characters?

virtualvoidsetStoringCharacters(
boolvar
)

/// is storing characters?

virtualcocos2d::CCDictionary*getProperties()

/// properties

virtualvoidsetProperties()

/// properties

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
;

/// map orientation

cocos2d::CCSizem_tMapSize
;

/// map width & height

cocos2d::CCSizem_tTileSize
;

/// tiles width & height

;

/// Layers

;

/// tilesets

cocos2d::CCArray*m_pObjectGroups
;

/// ObjectGroups

intm_nParentElement
;

/// parent element

uintm_uParentGID
;

/// parent GID

intm_nLayerAttribs
;

/// layer attribs

boolm_bStoringCharacters
;

/// is storing characters?

;

/// properties

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