I have a problem with Cococs2dX CCBatchNode. Below you can see part of my source code:
_batchNode = CCSpriteBatchNode::batchNodeWithFile("Sprites.pvr.ccz");
this->addChild(_batchNode);
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Sprites.plist");
And the full error log is like this:
Cocos2d: cocos2d: Error loading CCZ compressed file
Cocos2d: cocos2d: Couldn't load PVR image Sprites.pvr.ccz
Cocos2d: cocos2d: Couldn't add PVRImage:Sprites.pvr.ccz in CCTextureCache
I’m pretty sure that the “Sprites.pvr.ccz” is in the folder of this project, under Resources folder. What can be causing this?
Thanks in advance.
If the filename is actually sprites.pvr.ccz it will not be found on a device. iOS device filesystems are case sensitive. Not sure if the same is true for Android.
Another cause can be that the file isn’t assigned to the current target. In Xcode select the file, open the Utilities view and make sure the checkbox is set for the right target.