Third line down in the function
-(id) initWithTilesetInfo:(CCTMXTilesetInfo*)tilesetInfo layerInfo:(CCTMXLayerInfo*)layerInfo mapInfo:(CCTMXMapInfo*)mapInfo
{
// XXX: is 35% a good estimate ?
CGSize size = layerInfo.layerSize;
float totalNumberOfTiles = size.width * size.height;
float capacity = totalNumberOfTiles;//totalNumberOfTiles * 0.35f + 1; // 35 percent is occupied ?
...
}
Seems odd that that the capacity of the atlas is initialized with 35% of the number of tiles we just calculated.
Plus I keep seeing this in my output:
CCSpriteBatchNode: resizing TextureAtlas capacity from [85] to [114].
CCSpriteBatchNode: resizing TextureAtlas capacity from [114] to [153].
CCSpriteBatchNode: resizing TextureAtlas capacity from [153] to [205].
CCSpriteBatchNode: resizing TextureAtlas capacity from [205] to [274].
Anyone know what the point of this is? Is it bad? Or am I doing something wrong?
Obviously the latter can't be true . . . {o_~}