diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index 77153b1000..bc1fba7416 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -60,6 +60,7 @@ layers_scenes_transitions_nodes/CCLayer.cpp \ layers_scenes_transitions_nodes/CCScene.cpp \ layers_scenes_transitions_nodes/CCTransitionPageTurn.cpp \ layers_scenes_transitions_nodes/CCTransition.cpp \ +layers_scenes_transitions_nodes/CCTransitionProgress.cpp \ menu_nodes/CCMenu.cpp \ menu_nodes/CCMenuItem.cpp \ misc_nodes/CCMotionStreak.cpp \ diff --git a/cocos2dx/CCConfiguration.cpp b/cocos2dx/CCConfiguration.cpp index 7b887bdc47..3ac798978c 100644 --- a/cocos2dx/CCConfiguration.cpp +++ b/cocos2dx/CCConfiguration.cpp @@ -75,11 +75,11 @@ bool CCConfiguration::init(void) #endif // CC_TEXTURE_NPOT_SUPPORT -#if CC_TEXTURE_ATLAS_USES_VBO - CCLOG("cocos2d: compiled with VBO support in TextureAtlas : %s", "YES"); +#if CC_TEXTURE_ATLAS_USE_VAO + CCLOG("cocos2d: compiled with VAO support in TextureAtlas : %s", "YES"); #else - CCLOG("cocos2d: compiled with VBO support in TextureAtlas : %s", "NO"); -#endif // CC_TEXTURE_ATLAS_USES_VBO + CCLOG("cocos2d: compiled with VAO support in TextureAtlas : %s", "NO"); +#endif // CC_TEXTURE_ATLAS_USE_VAO return true; } diff --git a/cocos2dx/particle_nodes/CCParticleBatchNode.cpp b/cocos2dx/particle_nodes/CCParticleBatchNode.cpp index 5e21b19e15..91c8b9bd08 100644 --- a/cocos2dx/particle_nodes/CCParticleBatchNode.cpp +++ b/cocos2dx/particle_nodes/CCParticleBatchNode.cpp @@ -122,8 +122,8 @@ bool CCParticleBatchNode::initWithTexture(CCTexture2D *tex, unsigned int capacit m_pTextureAtlas->initWithTexture(tex, capacity); // no lazy alloc in this node - m_pChildren = CCArray::arrayWithCapacity(capacity); - m_pChildren->retain(); + m_pChildren = new CCArray(); + m_pChildren->initWithCapacity(capacity); m_tBlendFunc.src = CC_BLEND_SRC; m_tBlendFunc.dst = CC_BLEND_DST; @@ -189,12 +189,12 @@ void CCParticleBatchNode::addChild(CCNode * child, int zOrder) void CCParticleBatchNode::addChild(CCNode * child, int zOrder, int tag) { CCAssert( child != NULL, "Argument must be non-NULL"); - CCParticleSystem* pChild = dynamic_cast(child); - CCAssert( pChild != NULL, "CCParticleBatchNode only supports CCQuadParticleSystems as children"); - CCAssert( pChild->getTexture()->getName() == m_pTextureAtlas->getTexture()->getName(), "CCParticleSystem is not using the same texture id"); - + CCAssert( dynamic_cast(child) != NULL, "CCParticleBatchNode only supports CCQuadParticleSystems as children"); + CCParticleSystem* pChild = (CCParticleSystem*)child; + CCAssert( pChild->getTexture()->getName() == m_pTextureAtlas->getTexture()->getName(), "CCParticleSystem is not using the same texture id"); // If this is the 1st children, then copy blending function - if( m_pChildren->count() == 0 ) { + if( m_pChildren->count() == 0 ) + { setBlendFunc(pChild->getBlendFunc()); } @@ -206,12 +206,14 @@ void CCParticleBatchNode::addChild(CCNode * child, int zOrder, int tag) //get new atlasIndex unsigned int atlasIndex = 0; - if (pos != 0) { + if (pos != 0) + { CCParticleSystem* p = (CCParticleSystem*)m_pChildren->objectAtIndex(pos-1); atlasIndex = p->getAtlasIndex() + p->getTotalParticles(); } - else { + else + { atlasIndex = 0; } diff --git a/cocos2dx/platform/CCGL.h b/cocos2dx/platform/CCGL.h index 268ad14b25..4544fda59b 100644 --- a/cocos2dx/platform/CCGL.h +++ b/cocos2dx/platform/CCGL.h @@ -70,8 +70,8 @@ extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT; #endif #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#include -#include +#include "GLES2/gl2.h" +#include "GLES2/gl2ext.h" #endif #if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) @@ -153,22 +153,4 @@ extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB; #include #endif -NS_CC_BEGIN; - -/* -OpenGL GLU implementation -*/ - -//typedef float GLfloat; - -/** OpenGL gluLookAt implementation */ -void CC_DLL gluLookAt(GLfloat fEyeX, GLfloat fEyeY, GLfloat fEyeZ, - GLfloat fLookAtX, GLfloat fLookAtY, GLfloat fLookAtZ, - GLfloat fUpX, GLfloat fUpY, GLfloat fUpZ); - -/** OpenGL gluPerspective implementation */ -void CC_DLL gluPerspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); - -NS_CC_END; - #endif // __PLATFOMR_CCGL_H__ diff --git a/cocos2dx/platform/CCImage.h b/cocos2dx/platform/CCImage.h index 6a61035fb4..c728e7a23a 100644 --- a/cocos2dx/platform/CCImage.h +++ b/cocos2dx/platform/CCImage.h @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ #ifndef __CC_IMAGE_H__ -#define __CC_IMAGE__ +#define __CC_IMAGE_H__ #include "CCCommon.h" diff --git a/cocos2dx/platform/win32/CCEGLView_win32.cpp b/cocos2dx/platform/win32/CCEGLView_win32.cpp index 3091af596d..1281d089d1 100644 --- a/cocos2dx/platform/win32/CCEGLView_win32.cpp +++ b/cocos2dx/platform/win32/CCEGLView_win32.cpp @@ -23,10 +23,6 @@ THE SOFTWARE. ****************************************************************************/ #include "CCEGLView.h" - -#include "EGL/egl.h" -#include "gles/gl.h" - #include "CCSet.h" #include "ccMacros.h" #include "CCDirector.h" @@ -36,6 +32,8 @@ THE SOFTWARE. #include "CCKeypadDispatcher.h" #include "CCApplication.h" +#include "EGL/egl.h" + NS_CC_BEGIN; //////////////////////////////////////////////////////////////////////////