mirror of https://github.com/axmolengine/axmol.git
commit
58f043a3fb
|
@ -393,7 +393,7 @@ namespace cocos2d {
|
||||||
layerAttribs = pTMXMapInfo->getLayerAttribs();
|
layerAttribs = pTMXMapInfo->getLayerAttribs();
|
||||||
pTMXMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribGzip);
|
pTMXMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribGzip);
|
||||||
} else
|
} else
|
||||||
if (compression == "zip")
|
if (compression == "zlib")
|
||||||
{
|
{
|
||||||
layerAttribs = pTMXMapInfo->getLayerAttribs();
|
layerAttribs = pTMXMapInfo->getLayerAttribs();
|
||||||
pTMXMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribZlib);
|
pTMXMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribZlib);
|
||||||
|
|
|
@ -1219,7 +1219,7 @@ CCLayer* createTileMapLayer(int nIndex)
|
||||||
case 21: return new TileMapEditTest();
|
case 21: return new TileMapEditTest();
|
||||||
case 22: return new TMXBug987();
|
case 22: return new TMXBug987();
|
||||||
case 23: return new TMXBug787();
|
case 23: return new TMXBug787();
|
||||||
case 24: return new TMXGIDObjectTest();
|
case 24: return new TMXGIDObjectsTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1389,7 +1389,7 @@ void TileMapTestScene::runThisTest()
|
||||||
CCDirector::sharedDirector()->replaceScene(this);
|
CCDirector::sharedDirector()->replaceScene(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
TMXGIDObjectTest::TMXGIDObjectTest()
|
TMXGIDObjectsTest::TMXGIDObjectsTest()
|
||||||
{
|
{
|
||||||
CCTMXTiledMap *map = CCTMXTiledMap::tiledMapWithTMXFile("TileMaps/test-object-layer.tmx");
|
CCTMXTiledMap *map = CCTMXTiledMap::tiledMapWithTMXFile("TileMaps/test-object-layer.tmx");
|
||||||
addChild(map, -1, kTagTileMap);
|
addChild(map, -1, kTagTileMap);
|
||||||
|
@ -1398,14 +1398,14 @@ TMXGIDObjectTest::TMXGIDObjectTest()
|
||||||
CCLOG("Contentsize: %f, %f", s.width, s.height);
|
CCLOG("Contentsize: %f, %f", s.width, s.height);
|
||||||
|
|
||||||
CCLOG("----> Iterating over all the group objets");
|
CCLOG("----> Iterating over all the group objets");
|
||||||
CCTMXObjectGroup *group = map->objectGroupNamed("Object Group 1");
|
CCTMXObjectGroup *group = map->objectGroupNamed("Object Layer 1");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMXGIDObjectTest::draw()
|
void TMXGIDObjectsTest::draw()
|
||||||
{
|
{
|
||||||
CCTMXTiledMap *map = (CCTMXTiledMap*)getChildByTag(kTagTileMap);
|
CCTMXTiledMap *map = (CCTMXTiledMap*)getChildByTag(kTagTileMap);
|
||||||
CCTMXObjectGroup *group = map->objectGroupNamed("Object Group 1");
|
CCTMXObjectGroup *group = map->objectGroupNamed("Object Layer 1");
|
||||||
|
|
||||||
CCMutableArray<CCStringToStringDictionary*> *array = group->getObjects();
|
CCMutableArray<CCStringToStringDictionary*> *array = group->getObjects();
|
||||||
CCMutableArray<CCStringToStringDictionary*>::CCMutableArrayIterator iter;
|
CCMutableArray<CCStringToStringDictionary*>::CCMutableArrayIterator iter;
|
||||||
|
@ -1439,12 +1439,12 @@ void TMXGIDObjectTest::draw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string TMXGIDObjectTest::title()
|
string TMXGIDObjectsTest::title()
|
||||||
{
|
{
|
||||||
return "TMX GID objects";
|
return "TMX GID objects";
|
||||||
}
|
}
|
||||||
|
|
||||||
string TMXGIDObjectTest::subtitle()
|
string TMXGIDObjectsTest::subtitle()
|
||||||
{
|
{
|
||||||
return "Tiles are created from an object group";
|
return "Tiles are created from an object group";
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,10 +248,10 @@ public:
|
||||||
virtual std::string subtitle();
|
virtual std::string subtitle();
|
||||||
};
|
};
|
||||||
|
|
||||||
class TMXGIDObjectTest : public TileDemo
|
class TMXGIDObjectsTest : public TileDemo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TMXGIDObjectTest();
|
TMXGIDObjectsTest();
|
||||||
virtual std::string title();
|
virtual std::string title();
|
||||||
virtual std::string subtitle();
|
virtual std::string subtitle();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
Loading…
Reference in New Issue