issue #114, CCTMXTiledMap debug

This commit is contained in:
Walzer 2010-09-01 08:23:30 +00:00
parent 8da7979dc6
commit 8cb49d0a8f
2 changed files with 11 additions and 10 deletions

View File

@ -107,11 +107,11 @@ namespace cocos2d{
{
m_tDisabledColor = var;
}
CCNode *CCMenuItemLabel::getLable()
CCNode *CCMenuItemLabel::getLabel()
{
return m_pLabel;
}
void CCMenuItemLabel::setLable(CCNode* var)
void CCMenuItemLabel::setLabel(CCNode* var)
{
CCX_SAFE_RELEASE(m_pLabel);
var->retain();
@ -131,7 +131,7 @@ namespace cocos2d{
m_fOriginalScale = 1.0f;
m_tColorBackup = ccWHITE;
m_tDisabledColor = ccc3(126,126,126);
this->setLable(label);
this->setLabel(label);
return this;
}
CCMenuItemLabel::~CCMenuItemLabel()

View File

@ -63,11 +63,12 @@ namespace cocos2d{
if (mapInfo->getLayers() && mapInfo->getLayers()->count()>0)
{
CCTMXLayerInfo *layerInfo = NULL;
NSMutableArray<CCTMXLayerInfo*>::NSMutableArrayIterator rit;
for (rit = mapInfo->getLayers()->begin(); rit != mapInfo->getLayers()->end(); ++rit)
NSMutableArray<CCTMXLayerInfo*>::NSMutableArrayIterator it;
NSMutableArray<CCTMXLayerInfo*>* layers = mapInfo->getLayers();
for (it = layers->begin(); it != layers->end(); ++it)
{
layerInfo = *rit;
if (!layerInfo && layerInfo->m_bVisible)
layerInfo = *it;
if (layerInfo && layerInfo->m_bVisible)
{
CCTMXLayer *child = parseLayer(layerInfo, mapInfo);
addChild((CCNode*)child, idx, idx);
@ -131,10 +132,10 @@ namespace cocos2d{
if (mapInfo->getTilesets() && mapInfo->getTilesets()->count()>0)
{
CCTMXTilesetInfo *tileset = NULL;
NSMutableArray<CCTMXTilesetInfo*>::NSMutableArrayRevIterator it;
for (it = mapInfo->getTilesets()->rbegin(); it != mapInfo->getTilesets()->rend(); ++it)
NSMutableArray<CCTMXTilesetInfo*>::NSMutableArrayRevIterator rit;
for (rit = mapInfo->getTilesets()->rbegin(); rit != mapInfo->getTilesets()->rend(); ++rit)
{
tileset = *it;
tileset = *rit;
if (tileset)
{
for( unsigned int y=0; y < size.height; y++ )