Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

CCTileMapAtlas Class Reference

#import <CCTileMapAtlas.h>

Inherits CCAtlasNode.

Collaboration diagram for CCTileMapAtlas:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithTileFile:mapFile:tileWidth:tileHeight:
(ccColor3B- tileAt:
(void) - setTile:at:
(void) - releaseMap

Static Public Member Functions

(id) + tileMapAtlasWithTileFile:mapFile:tileWidth:tileHeight:

Protected Attributes

NSMutableDictionary * posToAtlasIndex
 x,y to altas dicctionary
int itemsToRender
 numbers of tiles to render

Properties

tImageTGAtgaInfo
 info about the map file

Detailed Description

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

Definition at line 45 of file CCTileMapAtlas.h.


Member Function Documentation

- (id) initWithTileFile: (NSString *)  tile
mapFile: (NSString *)  map
tileWidth: (int)  w
tileHeight: (int)  h 

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

- (void) releaseMap  

dealloc the map from memory

- (void) setTile: (ccColor3B tile
at: (ccGridSize position 

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

- (ccColor3B) tileAt: (ccGridSize position  

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

+ (id) tileMapAtlasWithTileFile: (NSString *)  tile
mapFile: (NSString *)  map
tileWidth: (int)  w
tileHeight: (int)  h 

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


Member Data Documentation

- (int) itemsToRender [protected]

numbers of tiles to render

Definition at line 54 of file CCTileMapAtlas.h.

- (NSMutableDictionary*) posToAtlasIndex [protected]

x,y to altas dicctionary

Definition at line 51 of file CCTileMapAtlas.h.


Property Documentation

- (tImageTGA *) tgaInfo [read, assign]

info about the map file

TileMap info

Definition at line 48 of file CCTileMapAtlas.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1