mirror of https://github.com/axmolengine/axmol.git
issue 67, modify constructor
This commit is contained in:
parent
300e89d8fc
commit
ff3d907846
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -38,9 +38,9 @@ namespace cocos2d {
|
|||
//implementation CCTMXObjectGroup
|
||||
|
||||
CCTMXObjectGroup::CCTMXObjectGroup()
|
||||
:m_sGroupName("")
|
||||
,m_tPositionOffset(CGPointZero)
|
||||
{
|
||||
m_sGroupName = "";
|
||||
m_tPositionOffset = CGPointZero;
|
||||
m_pObjects = new std::vector<StringToStringDictionary*>();
|
||||
m_pProperties = new StringToStringDictionary();
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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.");
|
||||
|
|
|
@ -55,6 +55,12 @@ namespace cocos2d {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
CCTileMapAtlas::CCTileMapAtlas()
|
||||
:m_pPosToAtlasIndex(NULL)
|
||||
,m_pTGAInfo(NULL)
|
||||
,m_nItemsToRender(0)
|
||||
{
|
||||
}
|
||||
CCTileMapAtlas::~CCTileMapAtlas()
|
||||
{
|
||||
if (m_pTGAInfo)
|
||||
|
|
Loading…
Reference in New Issue