issue #1056: Updated Android.mk, fixed a bug in CCImage.h.

This commit is contained in:
James Chen 2012-03-27 13:48:14 +08:00
parent cef41dfbc5
commit 3475108953
6 changed files with 21 additions and 38 deletions

View File

@ -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 \

View File

@ -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;
}

View File

@ -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<CCParticleSystem*>(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<CCParticleSystem*>(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;
}

View File

@ -70,8 +70,8 @@ extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include "GLES2/gl2.h"
#include "GLES2/gl2ext.h"
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
@ -153,22 +153,4 @@ extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
#include <GLES/glext.h>
#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__

View File

@ -23,7 +23,7 @@ THE SOFTWARE.
****************************************************************************/
#ifndef __CC_IMAGE_H__
#define __CC_IMAGE__
#define __CC_IMAGE_H__
#include "CCCommon.h"

View File

@ -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;
//////////////////////////////////////////////////////////////////////////