Just wanted to let you know that I downloaded the new version and copied my existing source code over. I get the following assertion from CCSprite. I cannot remember if it was from setTexture or or Draw()
But I reverted back to the older version as I did not have time to debug.
assert(! m_bUsesBatchNode)
The Hello World application works, however.
martan
October 21, 2011, 3:27am
2
Hi, I had the same error - I fixed it by adding of init() to the CCSprite contructor - it was removed in new version
(I used sprites from sharedSpriteFrameCache…)
…
CCSprite::CCSprite()
: m_pobTexture(NULL)
{
init(); // <- this was missing
}
Yes, it is removed in new version.
Because the static method all invoke init().
And it is not safe to invoke init() in construction.
martan
October 24, 2011, 1:05am
4
I used CCSprite like this:
CCSprite *normalSprite = new CCSprite();
normalSprite->setDisplayFrame(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(normalImage));
it was working in 0.9.1 version and it is not working in version 0.9.2 because of this assert.
Yes, you should invoke init() after
CCSprite *normalSprite = new CCSprite();