I am using cocos2d-x 2.1.4 and would like to use the same image file e.g. spritesheet.png for
- the tiles on a tmx map built using Tiled Map Editor as well as;
- in-game sprites, which I usually make the spritesheet using TexturePacker.
The reason for combining is to reduce the number of draw calls, since there is enough texture space for the sprites and tiles to all be shared on one image. If I used TexturePacker with Tiled, I think I would have to reassign tile positions every time TexturePacker rearranges the tile images, so that is not a good approach.
I know I can get a CCTexture2D* from a CCSpriteframe, which I wanted to try to insert into CCTextureCache, so that the CCTMXLayer can pick up the texture (which is actually from a spritesheet). However, there is no method to do so.
What is the common technique of dealing with a combined spritesheet for both tiles and sprites in cocos2d-x?