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

View File

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