Class CCTileMapAtlas

#include <Geode/cocos/tilemap_parallax_nodes/CCTileMapAtlas.h>
classCCTileMapAtlas:publiccocos2d::CCAtlasNode{ ... }

CCTileMapAtlas is a subclass of CCAtlasNode. It knows how to render a map based of tiles. The tiles must be in a .PNG format while the map must be a .TGA file. For more information regarding the format, please see this post: http://www.cocos2d-iphone.org/archives/27 All features from CCAtlasNode are valid in CCTileMapAtlas IMPORTANT: This class is deprecated. It is maintained for compatibility reasons only. You SHOULD not use this class. Instead, use the newer TMX file format: CCTMXTiledMap

Examples0
Public static methods1
staticcocos2d::CCTileMapAtlas*create(,
charconst*mapFile
,
inttileWidth
,
inttileHeight
)

creates a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. The tile file will be loaded using the TextureMgr.

Public member functions6
virtualcocos2d::sImageTGA*getTGAInfo()

TileMap info

virtualvoidsetTGAInfo()

TileMap info

boolinitWithTileFile(,
charconst*mapFile
,
inttileWidth
,
inttileHeight
)

initializes a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. The file will be loaded using the TextureMgr.

cocos2d::ccColor3BtileAt()

returns a tile from position x,y. For the moment only channel R is used

voidsetTile(,)

sets a tile at position x,y. For the moment only channel R is used

voidreleaseMap()

dealloc the map from memory

Fields0
Protected member functions0
Protected fields3
;

TileMap info

cocos2d::CCDictionary*m_pPosToAtlasIndex
;

//! x,y to atlas dictionary

intm_nItemsToRender
;

//! numbers of tiles to render