我的版本:cocos2dx-0.13.0-wp8-0.8 我的代码是:
CCTexture2D::PVRImagesHavePremultipliedAlpha(true);
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Towers/TArrow-hd.plist", "Towers/TArrow-hd.pvr.ccz");
CCSpriteFrame* frame = CCSpriteFrameCache::sharedSpriteFrameCache()- >spriteFrameByName("Arrow-13.png");
CCSprite *sp = CCSprite::spriteWithSpriteFrame(frame);
sp->setPosition(ccp(100,100));
this->addChild(sp, 1);
运行到“CCSprite * sp = CCSprite :: spriteWithSpriteFrame(frame)”,有异常, spriteWithSpriteFrameName(“”)也
异常:
D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
线程0xba4已退出代码3(0x3)。 D3D11警告:Live Producer位于0x00B987E0,Refcount:6。[STATE_CREATION WARNING#0:UNKNOWN] 线程0x668已退出代码3(0x3)。 线程0x20已退出代码3(0x3)。 D3D11警告:活动对象位于0x00B9A530,Refcount:1。[STATE_CREATION WARNING#0:UNKNOWN] D3D11警告:活动对象位于0x02CC17F8,Refcount:0。[STATE_CREATION WARNING#0:UNKNOWN]
答案 0 :(得分:0)
将pvr.ccz更改为png,确定