diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index 97dabc5447..77153b1000 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -28,6 +28,7 @@ cocoa/CCAffineTransform.cpp \ cocoa/CCGeometry.cpp \ cocoa/CCAutoreleasePool.cpp \ cocoa/CCData.cpp \ +cocoa/CCDictionary.cpp \ cocoa/CCNS.cpp \ cocoa/CCObject.cpp \ cocoa/CCSet.cpp \ @@ -37,9 +38,6 @@ CCDirector.cpp \ effects/CCGrabber.cpp \ effects/CCGrid.cpp \ extensions/CCNotificationCenter.cpp \ -gles2/CCGLProgram.cpp \ -gles2/ccGLStateCache.cpp \ -gles2/CCShaderCache.cpp \ kazmath/src/aabb.c \ kazmath/src/mat3.c \ kazmath/src/mat4.c \ @@ -90,6 +88,9 @@ platform/android/jni/SystemInfoJni.cpp \ platform/android/jni/TouchesJni.cpp \ script_support/CCScriptSupport.cpp \ shaders/ccShaders.cpp \ +shaders/CCGLProgram.cpp \ +shaders/ccGLStateCache.cpp \ +shaders/CCShaderCache.cpp \ sprite_nodes/CCAnimation.cpp \ sprite_nodes/CCAnimationCache.cpp \ sprite_nodes/CCSprite.cpp \ diff --git a/cocos2dx/include/CCDictionary.h b/cocos2dx/include/CCDictionary.h index eeb20d76c1..168f10e8ee 100644 --- a/cocos2dx/include/CCDictionary.h +++ b/cocos2dx/include/CCDictionary.h @@ -89,8 +89,8 @@ public: // pElement = (CCDictElement*)pElement->hh.next) #define CCDICT_FOREACH(__dict__, __el__) \ - CCDictElement* ##__dict__##__el__##tmp = NULL; \ - HASH_ITER(hh, (__dict__)->m_pElements, __el__, ##__dict__##__el__##tmp) + CCDictElement* tmp##__dict____el__ = NULL; \ + HASH_ITER(hh, (__dict__)->m_pElements, __el__, tmp##__dict____el__) class CC_DLL CCDictionary : public CCObject diff --git a/cocos2dx/include/CCTMXXMLParser.h b/cocos2dx/include/CCTMXXMLParser.h index 2b1561d44c..a1d14f3184 100755 --- a/cocos2dx/include/CCTMXXMLParser.h +++ b/cocos2dx/include/CCTMXXMLParser.h @@ -33,6 +33,8 @@ THE SOFTWARE. #include "../platform/CCSAXParser.h" +#include + NS_CC_BEGIN class CCTMXObjectGroup; diff --git a/cocos2dx/platform/android/CCFileUtils_android.cpp b/cocos2dx/platform/android/CCFileUtils_android.cpp index 905d2e7b50..66f6417dbf 100644 --- a/cocos2dx/platform/android/CCFileUtils_android.cpp +++ b/cocos2dx/platform/android/CCFileUtils_android.cpp @@ -27,6 +27,8 @@ NS_CC_BEGIN; #include "CCCommon.h" #include "jni/SystemInfoJni.h" +using namespace std; + // record the resource path static string s_strResourcePath = ""; diff --git a/cocos2dx/support/data_support/uthash.h b/cocos2dx/support/data_support/uthash.h index 04f672371b..d335c8bd95 100644 --- a/cocos2dx/support/data_support/uthash.h +++ b/cocos2dx/support/data_support/uthash.h @@ -45,6 +45,12 @@ namespace cocos2d { #define DECLTYPE(x) (__typeof(x)) #endif +#ifdef ANDROID +#define NO_DECLTYPE +#undef DECLTYPE +#define DECLTYPE(x) +#endif + #ifdef NO_DECLTYPE #define DECLTYPE_ASSIGN(dst,src) \ do { \ diff --git a/cocos2dx/textures/CCTextureAtlas.cpp b/cocos2dx/textures/CCTextureAtlas.cpp index a196e0630e..4d5e2e4030 100644 --- a/cocos2dx/textures/CCTextureAtlas.cpp +++ b/cocos2dx/textures/CCTextureAtlas.cpp @@ -268,7 +268,7 @@ void CCTextureAtlas::updateQuad(ccV3F_C4B_T2F_Quad *quad, unsigned int index) { CCAssert( index >= 0 && index < m_uCapacity, "updateQuadWithTexture: Invalid index"); - m_uTotalQuads = max( index+1, m_uTotalQuads); + m_uTotalQuads = MAX( index+1, m_uTotalQuads); m_pQuads[index] = *quad; @@ -404,7 +404,7 @@ bool CCTextureAtlas::resizeCapacity(unsigned int newCapacity) return true; // update capacity and totolQuads - m_uTotalQuads = min(m_uTotalQuads, newCapacity); + m_uTotalQuads = MIN(m_uTotalQuads, newCapacity); m_uCapacity = newCapacity; void * tmpQuads = NULL;