diff --git a/cocos2dx/include/CCTMXXMLParser.h b/cocos2dx/include/CCTMXXMLParser.h index 7e6ff4fd80..2057c6ffba 100644 --- a/cocos2dx/include/CCTMXXMLParser.h +++ b/cocos2dx/include/CCTMXXMLParser.h @@ -100,7 +100,7 @@ namespace cocos2d { // size in pixels of the image CGSize m_tImageSize; public: - CCTMXTilesetInfo(){} + CCTMXTilesetInfo(); virtual ~CCTMXTilesetInfo(); CGRect rectForGID(unsigned int gid); }; @@ -146,7 +146,7 @@ namespace cocos2d { // properties CCX_SYNTHESIZE(StringToStringDictionary*, m_pProperties, Properties); public: - CCTMXMapInfo(){} + CCTMXMapInfo(); virtual ~CCTMXMapInfo(); /** creates a TMX Format with a tmx file */ static CCTMXMapInfo * formatWithTMXFile(const char *tmxFile); diff --git a/cocos2dx/include/CCTileMapAtlas.h b/cocos2dx/include/CCTileMapAtlas.h index 8b9d0d7d2b..ca8146fdaf 100644 --- a/cocos2dx/include/CCTileMapAtlas.h +++ b/cocos2dx/include/CCTileMapAtlas.h @@ -51,7 +51,7 @@ namespace cocos2d { /** TileMap info */ CCX_PROPERTY(tImageTGA*, m_pTGAInfo, TGAInfo); public: - CCTileMapAtlas(){} + CCTileMapAtlas(); virtual ~CCTileMapAtlas(); /** 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. diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp index 045b53199d..4ddddff762 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp @@ -101,6 +101,9 @@ namespace cocos2d { ,m_pProperties(NULL) ,m_pReusedTile(NULL) ,m_pAtlasIndexArray(NULL) + ,m_tLayerSize(CGSizeZero) + ,m_tMapTileSize(CGSizeZero) + ,m_sLayerName("") {} CCTMXLayer::~CCTMXLayer() { @@ -152,7 +155,7 @@ namespace cocos2d { // - difficult to scale / rotate / etc. m_pobTextureAtlas->getTexture()->setAliasTexParameters(); -// CFByteOrder o = CFByteOrderGetCurrent(); + //CFByteOrder o = CFByteOrderGetCurrent(); // Parse cocos2d properties this->parseInternalProperties(); diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.cpp b/cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.cpp index e2f8bbabe2..2a837d41d6 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.cpp @@ -37,10 +37,10 @@ namespace cocos2d { //implementation CCTMXObjectGroup - CCTMXObjectGroup::CCTMXObjectGroup() + CCTMXObjectGroup::CCTMXObjectGroup() + :m_sGroupName("") + ,m_tPositionOffset(CGPointZero) { - m_sGroupName = ""; - m_tPositionOffset = CGPointZero; m_pObjects = new std::vector(); m_pProperties = new StringToStringDictionary(); } diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.cpp b/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.cpp index 01a21a401e..1064b3fe30 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.cpp @@ -86,8 +86,12 @@ namespace cocos2d{ return true; } CCTMXTiledMap::CCTMXTiledMap() + :m_tTileSize(CGSizeZero) + ,m_tMapSize(CGSizeZero) + ,m_pObjectGroups(NULL) + ,m_pProperties(NULL) + ,m_pTileProperties(NULL) { - } CCTMXTiledMap::~CCTMXTiledMap() { diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.cpp b/cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.cpp index cc342d3775..2210c3c56b 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.cpp @@ -40,13 +40,13 @@ namespace cocos2d { // implementation CCTMXLayerInfo CCTMXLayerInfo::CCTMXLayerInfo() + :m_bOwnTiles(true) + ,m_uMinGID(100000) + ,m_uMaxGID(0) + ,m_sName("") + ,m_pTiles(NULL) + ,m_tOffset(CGPointZero) { - m_bOwnTiles = true; - m_uMinGID = 100000; - m_uMaxGID = 0; - m_sName = ""; - m_pTiles = NULL; - m_tOffset = CGPointZero; m_pProperties= new StringToStringDictionary();; } CCTMXLayerInfo::~CCTMXLayerInfo() @@ -65,6 +65,14 @@ namespace cocos2d { } // implementation CCTMXTilesetInfo + CCTMXTilesetInfo::CCTMXTilesetInfo() + :m_uFirstGid(0) + ,m_tTileSize(CGSizeZero) + ,m_uSpacing(0) + ,m_uMargin(0) + ,m_tImageSize(CGSizeZero) + { + } CCTMXTilesetInfo::~CCTMXTilesetInfo() { CCLOGINFO("cocos2d: deallocing."); @@ -111,6 +119,15 @@ namespace cocos2d { return parseXMLFile(m_sFilename.c_str()); } + CCTMXMapInfo::CCTMXMapInfo() + :m_bStoringCharacters(false) + ,m_nLayerAttribs(0) + ,m_tMapSize(CGSizeZero) + ,m_tTileSize(CGSizeZero) + ,m_pLayers(NULL) + ,m_pTilesets(NULL) + { + } CCTMXMapInfo::~CCTMXMapInfo() { CCLOGINFO("cocos2d: deallocing."); diff --git a/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp b/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp index 8cee1f2bbc..dbff405404 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp @@ -55,6 +55,12 @@ namespace cocos2d { } return false; } + CCTileMapAtlas::CCTileMapAtlas() + :m_pPosToAtlasIndex(NULL) + ,m_pTGAInfo(NULL) + ,m_nItemsToRender(0) + { + } CCTileMapAtlas::~CCTileMapAtlas() { if (m_pTGAInfo)