Reputation: 437
I am trying to update this project to new cocos2d version. "https://github.com/joshvera/iPhone-Tetris"
I changed some functions like these:
Sprite → CCSprite
AtlasSprite → CCSprite
AtlasSpriteFrame → CCSpriteFrame
SpriteFrame → CCSpriteFrame
Animation → CCAnimation
AtlasAnimation → CCAnimation
AtlasSpriteManager → CCSpriteSheet ← NEW NAME
And then ı build project . I am getting this output:
2012-01-23 11:19:13.733 denemetotemnewversion[2131:10a03] cocos2d: cocos2d v2.0.0-beta
2012-01-23 11:19:13.734 denemetotemnewversion[2131:10a03] cocos2d: Using Director
Type:CCDirectorDisplayLink
2012-01-23 11:19:13.754 denemetotemnewversion[2131:10a03] cocos2d: OS version: 5.0 (0x05000000)
2012-01-23 11:19:13.755 denemetotemnewversion[2131:10a03] cocos2d: GL_VENDOR: Apple Computer, Inc.
2012-01-23 11:19:13.756 denemetotemnewversion[2131:10a03] cocos2d: GL_RENDERER: Apple Software Renderer
2012-01-23 11:19:13.756 denemetotemnewversion[2131:10a03] cocos2d: GL_VERSION: OpenGL ES 2.0 APPLE
2012-01-23 11:19:13.757 denemetotemnewversion[2131:10a03] cocos2d: GL_MAX_TEXTURE_SIZE: 4096
2012-01-23 11:19:13.757 denemetotemnewversion[2131:10a03] cocos2d: GL_MAX_TEXTURE_UNITS: 8
2012-01-23 11:19:13.758 denemetotemnewversion[2131:10a03] cocos2d: GL_MAX_SAMPLES: 4
2012-01-23 11:19:13.758 denemetotemnewversion[2131:10a03] cocos2d: GL supports PVRTC: YES
2012-01-23 11:19:13.759 denemetotemnewversion[2131:10a03] cocos2d: GL supports BGRA8888 textures: YES
2012-01-23 11:19:13.759 denemetotemnewversion[2131:10a03] cocos2d: GL supports NPOT textures: YES
2012-01-23 11:19:13.760 denemetotemnewversion[2131:10a03] cocos2d: GL supports discard_framebuffer: YES
2012-01-23 11:19:13.760 denemetotemnewversion[2131:10a03] cocos2d: compiled with Profiling Support: NO
2012-01-23 11:19:13.761 denemetotemnewversion[2131:10a03] cocos2d: **** WARNING **** CC_ENABLE_GL_STATE_CACHE is disabled. To improve performance, enable it by editing ccConfig.h
[Switching to process 2131 thread 0x1410b]
2012-01-23 11:19:13.809 denemetotemnewversion[2131:10a03] cocos2d: Frame interval: 1
2012-01-23 11:19:13.810 denemetotemnewversion[2131:10a03] cocos2d: surface size: 320x480
And only appear background image. Sprites doesnt working. Any ideas? Thanks.
Upvotes: 1
Views: 3130
Reputation: 1408
Just go to ccConfig.h -> Search (CC_ENABLE_GL_STATE_CACHE) -> and set it to 1
Upvotes: 4
Reputation: 64478
In general it is insufficient to simply copy & replace cocos2d-iphone with the newer version. You have to keep in mind files that have been removed or renamed, so the old folder needs to be removed entirely, and added again. Personally I find it a lot easier to simply install the new cocos2d Xcode templates, create a new project, then add all your source code and assets back in.
As for upgrading to Cocos2D 2.0 there are additional things to consider, like adding the shader files and correctly adding them to the copy resources build phase (by default they will be treated as source code).
Upvotes: 0