diff --git a/HelloWorld/proj.android/jni/helloworld/Android.mk b/HelloWorld/proj.android/jni/helloworld/Android.mk index dac1463462..bd62b0181c 100644 --- a/HelloWorld/proj.android/jni/helloworld/Android.mk +++ b/HelloWorld/proj.android/jni/helloworld/Android.mk @@ -13,9 +13,9 @@ LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt LOCAL_WHOLE_STATIC_LIBRARIES := game_logic_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static - + LOCAL_SHARED_LIBRARIES := cocosdenshion_shared - + include $(BUILD_SHARED_LIBRARY) $(call import-module,cocos2dx/platform/third_party/android/modules/libpng) diff --git a/HelloWorld/proj.ios/HelloWorld.xcodeproj/project.pbxproj.REMOVED.git-id b/HelloWorld/proj.ios/HelloWorld.xcodeproj/project.pbxproj.REMOVED.git-id index a779c28a54..295331ad8b 100644 --- a/HelloWorld/proj.ios/HelloWorld.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/HelloWorld/proj.ios/HelloWorld.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -97caf44d91d679d65cd39a8dfc4378df7694d735 \ No newline at end of file +7dc2eddab8c675364c06b0818030b2ed1792ca81 \ No newline at end of file diff --git a/HelloWorld/proj.win32/HelloWorld.win32.vcproj b/HelloWorld/proj.win32/HelloWorld.win32.vcproj index 3675689429..d9580a04f8 100644 --- a/HelloWorld/proj.win32/HelloWorld.win32.vcproj +++ b/HelloWorld/proj.win32/HelloWorld.win32.vcproj @@ -41,7 +41,7 @@ getZEye(); diff --git a/cocos2dx/include/CCDirector.h b/cocos2dx/CCDirector.h old mode 100755 new mode 100644 similarity index 98% rename from cocos2dx/include/CCDirector.h rename to cocos2dx/CCDirector.h index b021fafef3..a611b7db97 --- a/cocos2dx/include/CCDirector.h +++ b/cocos2dx/CCDirector.h @@ -111,8 +111,8 @@ public: inline float getSecondsPerFrame() { return m_fSecondsPerFrame; } /** Get the CCEGLView, where everything is rendered */ - inline CC_GLVIEW* getOpenGLView(void) { return m_pobOpenGLView; } - void setOpenGLView(CC_GLVIEW *pobOpenGLView); + inline CCEGLView* getOpenGLView(void) { return m_pobOpenGLView; } + void setOpenGLView(CCEGLView *pobOpenGLView); inline bool isNextDeltaTimeZero(void) { return m_bNextDeltaTimeZero; } void setNextDeltaTimeZero(bool bNextDeltaTimeZero); @@ -319,7 +319,7 @@ protected: void calculateDeltaTime(); protected: /* The CCEGLView, where everything is rendered */ - CC_GLVIEW *m_pobOpenGLView; + CCEGLView *m_pobOpenGLView; double m_dAnimationInterval; double m_dOldAnimationInterval; diff --git a/cocos2dx/include/CCDrawingPrimitives.h b/cocos2dx/CCDrawingPrimitives.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCDrawingPrimitives.h rename to cocos2dx/CCDrawingPrimitives.h diff --git a/cocos2dx/include/CCScheduler.h b/cocos2dx/CCScheduler.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCScheduler.h rename to cocos2dx/CCScheduler.h diff --git a/cocos2dx/include/CCAction.h b/cocos2dx/actions/CCAction.h old mode 100755 new mode 100644 similarity index 99% rename from cocos2dx/include/CCAction.h rename to cocos2dx/actions/CCAction.h index a0409cf753..76c4162d58 --- a/cocos2dx/include/CCAction.h +++ b/cocos2dx/actions/CCAction.h @@ -27,10 +27,7 @@ THE SOFTWARE. #ifndef __ACTIONS_CCACTION_H__ #define __ACTIONS_CCACTION_H__ -#include "ccTypes.h" #include "CCObject.h" -#include "CCZone.h" -#include "CCNode.h" NS_CC_BEGIN diff --git a/cocos2dx/actions/CCActionCamera.cpp b/cocos2dx/actions/CCActionCamera.cpp index 41a1f1b518..aabc9e065d 100644 --- a/cocos2dx/actions/CCActionCamera.cpp +++ b/cocos2dx/actions/CCActionCamera.cpp @@ -27,6 +27,7 @@ THE SOFTWARE. #include "CCNode.h" #include "CCCamera.h" #include "CCStdC.h" +#include "CCZone.h" NS_CC_BEGIN // diff --git a/cocos2dx/include/CCActionCamera.h b/cocos2dx/actions/CCActionCamera.h old mode 100755 new mode 100644 similarity index 99% rename from cocos2dx/include/CCActionCamera.h rename to cocos2dx/actions/CCActionCamera.h index dac2778b9c..b4be84de88 --- a/cocos2dx/include/CCActionCamera.h +++ b/cocos2dx/actions/CCActionCamera.h @@ -25,6 +25,7 @@ THE SOFTWARE. #ifndef __CCCAMERA_ACTION_H__ #define __CCCAMERA_ACTION_H__ + #include "CCActionInterval.h" NS_CC_BEGIN diff --git a/cocos2dx/actions/CCActionEase.cpp b/cocos2dx/actions/CCActionEase.cpp index e5074fe735..07a2639f30 100644 --- a/cocos2dx/actions/CCActionEase.cpp +++ b/cocos2dx/actions/CCActionEase.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. */ #include "CCActionEase.h" -#include "CCObject.h" +#include "CCZone.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionEase.h b/cocos2dx/actions/CCActionEase.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionEase.h rename to cocos2dx/actions/CCActionEase.h diff --git a/cocos2dx/actions/CCActionGrid.cpp b/cocos2dx/actions/CCActionGrid.cpp index b2b4429bd4..7ac4ba43b5 100644 --- a/cocos2dx/actions/CCActionGrid.cpp +++ b/cocos2dx/actions/CCActionGrid.cpp @@ -25,6 +25,7 @@ THE SOFTWARE. #include "CCActionGrid.h" #include "CCDirector.h" #include "effects/CCGrid.h" +#include "CCZone.h" NS_CC_BEGIN // implementation of CCGridAction diff --git a/cocos2dx/include/CCActionGrid.h b/cocos2dx/actions/CCActionGrid.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionGrid.h rename to cocos2dx/actions/CCActionGrid.h diff --git a/cocos2dx/actions/CCActionGrid3D.cpp b/cocos2dx/actions/CCActionGrid3D.cpp index 1f4578f83e..578a712aef 100644 --- a/cocos2dx/actions/CCActionGrid3D.cpp +++ b/cocos2dx/actions/CCActionGrid3D.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCActionGrid3D.h" #include "CCPointExtension.h" #include "CCDirector.h" - +#include "CCZone.h" #include NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionGrid3D.h b/cocos2dx/actions/CCActionGrid3D.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionGrid3D.h rename to cocos2dx/actions/CCActionGrid3D.h diff --git a/cocos2dx/actions/CCActionInstant.cpp b/cocos2dx/actions/CCActionInstant.cpp index a821208cbb..0136d493e2 100644 --- a/cocos2dx/actions/CCActionInstant.cpp +++ b/cocos2dx/actions/CCActionInstant.cpp @@ -27,6 +27,7 @@ #include "CCActionInstant.h" #include "CCNode.h" #include "CCSprite.h" +#include "CCZone.h" NS_CC_BEGIN // diff --git a/cocos2dx/include/CCActionInstant.h b/cocos2dx/actions/CCActionInstant.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionInstant.h rename to cocos2dx/actions/CCActionInstant.h diff --git a/cocos2dx/actions/CCActionInterval.cpp b/cocos2dx/actions/CCActionInterval.cpp index ba93495d98..4d4ab7f721 100644 --- a/cocos2dx/actions/CCActionInterval.cpp +++ b/cocos2dx/actions/CCActionInterval.cpp @@ -30,6 +30,7 @@ THE SOFTWARE. #include "CCPointExtension.h" #include "CCStdC.h" #include "CCActionInstant.h" +#include "CCZone.h" #include NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionInterval.h b/cocos2dx/actions/CCActionInterval.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionInterval.h rename to cocos2dx/actions/CCActionInterval.h diff --git a/cocos2dx/actions/CCActionManager.cpp b/cocos2dx/actions/CCActionManager.cpp index cfa93d8eeb..5c8b1c477d 100644 --- a/cocos2dx/actions/CCActionManager.cpp +++ b/cocos2dx/actions/CCActionManager.cpp @@ -26,6 +26,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCActionManager.h" +#include "CCNode.h" #include "CCScheduler.h" #include "ccMacros.h" #include "support/data_support/ccCArray.h" diff --git a/cocos2dx/include/CCActionManager.h b/cocos2dx/actions/CCActionManager.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionManager.h rename to cocos2dx/actions/CCActionManager.h diff --git a/cocos2dx/actions/CCActionPageTurn3D.cpp b/cocos2dx/actions/CCActionPageTurn3D.cpp index f84cfc3d6b..4581153626 100644 --- a/cocos2dx/actions/CCActionPageTurn3D.cpp +++ b/cocos2dx/actions/CCActionPageTurn3D.cpp @@ -23,6 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCActionPageTurn3D.h" +#include "CCZone.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionPageTurn3D.h b/cocos2dx/actions/CCActionPageTurn3D.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionPageTurn3D.h rename to cocos2dx/actions/CCActionPageTurn3D.h diff --git a/cocos2dx/actions/CCActionProgressTimer.cpp b/cocos2dx/actions/CCActionProgressTimer.cpp index 2fd7f51253..fcdd62e527 100644 --- a/cocos2dx/actions/CCActionProgressTimer.cpp +++ b/cocos2dx/actions/CCActionProgressTimer.cpp @@ -24,6 +24,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCActionProgressTimer.h" #include "CCProgressTimer.h" +#include "CCZone.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionProgressTimer.h b/cocos2dx/actions/CCActionProgressTimer.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionProgressTimer.h rename to cocos2dx/actions/CCActionProgressTimer.h diff --git a/cocos2dx/actions/CCActionTiledGrid.cpp b/cocos2dx/actions/CCActionTiledGrid.cpp index 0a4a1a6dcc..82060c0f7f 100644 --- a/cocos2dx/actions/CCActionTiledGrid.cpp +++ b/cocos2dx/actions/CCActionTiledGrid.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "ccMacros.h" #include "CCPointExtension.h" #include "effects/CCGrid.h" - +#include "CCZone.h" #include NS_CC_BEGIN diff --git a/cocos2dx/include/CCActionTiledGrid.h b/cocos2dx/actions/CCActionTiledGrid.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCActionTiledGrid.h rename to cocos2dx/actions/CCActionTiledGrid.h diff --git a/cocos2dx/include/CCActionTween.h b/cocos2dx/actions/CCActionTween.h similarity index 100% rename from cocos2dx/include/CCActionTween.h rename to cocos2dx/actions/CCActionTween.h diff --git a/cocos2dx/include/CCAtlasNode.h b/cocos2dx/base_nodes/CCAtlasNode.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAtlasNode.h rename to cocos2dx/base_nodes/CCAtlasNode.h diff --git a/cocos2dx/include/CCNode.h b/cocos2dx/base_nodes/CCNode.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCNode.h rename to cocos2dx/base_nodes/CCNode.h diff --git a/cocos2dx/include/CCAffineTransform.h b/cocos2dx/cocoa/CCAffineTransform.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAffineTransform.h rename to cocos2dx/cocoa/CCAffineTransform.h diff --git a/cocos2dx/support/CCArray.cpp b/cocos2dx/cocoa/CCArray.cpp similarity index 100% rename from cocos2dx/support/CCArray.cpp rename to cocos2dx/cocoa/CCArray.cpp diff --git a/cocos2dx/include/CCArray.h b/cocos2dx/cocoa/CCArray.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCArray.h rename to cocos2dx/cocoa/CCArray.h diff --git a/cocos2dx/include/CCAutoreleasePool.h b/cocos2dx/cocoa/CCAutoreleasePool.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAutoreleasePool.h rename to cocos2dx/cocoa/CCAutoreleasePool.h diff --git a/cocos2dx/include/CCData.h b/cocos2dx/cocoa/CCData.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCData.h rename to cocos2dx/cocoa/CCData.h diff --git a/cocos2dx/include/CCDictionary.h b/cocos2dx/cocoa/CCDictionary.h similarity index 100% rename from cocos2dx/include/CCDictionary.h rename to cocos2dx/cocoa/CCDictionary.h diff --git a/cocos2dx/include/CCGeometry.h b/cocos2dx/cocoa/CCGeometry.h old mode 100755 new mode 100644 similarity index 92% rename from cocos2dx/include/CCGeometry.h rename to cocos2dx/cocoa/CCGeometry.h index e604cda53b..efc227472a --- a/cocos2dx/include/CCGeometry.h +++ b/cocos2dx/cocoa/CCGeometry.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCGEMETRY_H__ #define __CCGEMETRY_H__ -#include "CCCommon.h" +#include "CCPlatformMacros.h" NS_CC_BEGIN @@ -102,9 +102,9 @@ public: }; -#define CCPointMake(x, y) CCPoint((x), (y)) -#define CCSizeMake(width, height) CCSize((width), (height)) -#define CCRectMake(x, y, width, height) CCRect((x), (y), (width), (height)) +#define CCPointMake(x, y) CCPoint((float)(x), (float)(y)) +#define CCSizeMake(width, height) CCSize((float)(width), (float)(height)) +#define CCRectMake(x, y, width, height) CCRect((float)(x), (float)(y), (float)(width), (float)(height)) const CCPoint CCPointZero = CCPointMake(0,0); diff --git a/cocos2dx/include/CCInteger.h b/cocos2dx/cocoa/CCInteger.h similarity index 100% rename from cocos2dx/include/CCInteger.h rename to cocos2dx/cocoa/CCInteger.h diff --git a/cocos2dx/include/CCObject.h b/cocos2dx/cocoa/CCObject.h old mode 100755 new mode 100644 similarity index 97% rename from cocos2dx/include/CCObject.h rename to cocos2dx/cocoa/CCObject.h index 9698ae4163..47477c5d9f --- a/cocos2dx/include/CCObject.h +++ b/cocos2dx/cocoa/CCObject.h @@ -22,11 +22,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __COCOA_NSOBJECT_H__ -#define __COCOA_NSOBJECT_H__ +#ifndef __CCOBJECT_H__ +#define __CCOBJECT_H__ -#include "CCCommon.h" #include "ccTypes.h" +#include "CCCommon.h" NS_CC_BEGIN @@ -90,4 +90,4 @@ typedef void (CCObject::*SEL_EventHandler)(CCEvent*); NS_CC_END -#endif // __COCOA_NSOBJECT_H__ +#endif // __CCOBJECT_H__ diff --git a/cocos2dx/include/CCSet.h b/cocos2dx/cocoa/CCSet.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCSet.h rename to cocos2dx/cocoa/CCSet.h diff --git a/cocos2dx/include/CCString.h b/cocos2dx/cocoa/CCString.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCString.h rename to cocos2dx/cocoa/CCString.h diff --git a/cocos2dx/include/CCZone.h b/cocos2dx/cocoa/CCZone.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCZone.h rename to cocos2dx/cocoa/CCZone.h diff --git a/cocos2dx/effects/CCGrid.cpp b/cocos2dx/effects/CCGrid.cpp index 0ae1ecfcb7..78018b50dc 100644 --- a/cocos2dx/effects/CCGrid.cpp +++ b/cocos2dx/effects/CCGrid.cpp @@ -183,7 +183,7 @@ void CCGridBase::set2DProjection() CCSize size = director->getWinSizeInPixels(); - glViewport(0, 0, size.width * CC_CONTENT_SCALE_FACTOR(), size.height * CC_CONTENT_SCALE_FACTOR() ); + glViewport(0, 0, (GLsizei)(size.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(size.height * CC_CONTENT_SCALE_FACTOR()) ); kmGLMatrixMode(KM_GL_PROJECTION); kmGLLoadIdentity(); diff --git a/cocos2dx/include/CCGL.h b/cocos2dx/include/CCGL.h deleted file mode 100755 index ebde2e3823..0000000000 --- a/cocos2dx/include/CCGL.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2011 cocos2d-x.org -Copyright (c) 2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/CCGL.h" \ No newline at end of file diff --git a/cocos2dx/include/ccTypes.h b/cocos2dx/include/ccTypes.h index cbedd1b904..952a87fd63 100755 --- a/cocos2dx/include/ccTypes.h +++ b/cocos2dx/include/ccTypes.h @@ -28,7 +28,6 @@ THE SOFTWARE. #define __CCTYPES_H__ #include "CCGeometry.h" - #include "CCGL.h" NS_CC_BEGIN diff --git a/cocos2dx/include/cocos2d.h b/cocos2dx/include/cocos2d.h index ce583202a1..a74a42b2ff 100755 --- a/cocos2dx/include/cocos2d.h +++ b/cocos2dx/include/cocos2d.h @@ -24,116 +24,161 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #ifndef __COCOS2D_H__ #define __COCOS2D_H__ -// 0x00 HI ME LO -// 00 01 00 01 -#define COCOS2D_VERSION 0x00010001 - // // all cocos2d include files // -#include "ccConfig.h" // should be included first -#include "CCAction.h" -#include "CCAnimation.h" -#include "CCAnimationCache.h" -#include "CCActionManager.h" -#include "CCCamera.h" -#include "CCActionCamera.h" -#include "CCProtocols.h" -#include "CCNode.h" -#include "CCDirector.h" -#include "CCUserDefault.h" +#include "ccConfig.h" + +// actions +#include "CCAction.h" +#include "CCActionInterval.h" +#include "CCActionCamera.h" +#include "CCActionManager.h" +#include "CCActionEase.h" +#include "CCActionPageTurn3D.h" +#include "CCActionGrid.h" +#include "CCActionProgressTimer.h" +#include "CCActionGrid3D.h" +#include "CCActionTiledGrid.h" #include "CCActionInstant.h" -#include "CCActionInterval.h" -#include "CCActionEase.h" -#include "CCLabelTTF.h" -#include "CCLayer.h" -#include "CCMenu.h" -#include "CCMenuItem.h" -#include "CCParticleSystem.h" -#include "CCParticleBatchNode.h" -#include "CCParticleSystemQuad.h" -#include "CCParticleExamples.h" -#include "CCScene.h" -#include "CCSprite.h" -#include "CCSpriteFrameCache.h" -#include "CCTextureCache.h" -#include "CCTransition.h" -#include "CCTextureAtlas.h" -#include "CCLabelAtlas.h" -#include "CCAtlasNode.h" -#include "CCActionTiledGrid.h" -#include "CCActionGrid3D.h" -#include "CCActionGrid.h" #include "CCActionTween.h" -#include "CCLabelBMFont.h" -#include "CCParallaxNode.h" -#include "CCTileMapAtlas.h" -#include "CCTMXTiledMap.h" -#include "CCTMXLayer.h" -#include "CCTMXObjectGroup.h" -#include "CCTMXXMLParser.h" -#include "CCRenderTexture.h" -#include "CCMotionStreak.h" -#include "CCActionPageTurn3D.h" -#include "CCTransitionPageTurn.h" -#include "CCTexture2D.h" -#include "CCTexturePVR.h" -#include "CCActionProgressTimer.h" -#include "CCTouchHandler.h" -#include "CCTouchDispatcher.h" -#include "CCDrawingPrimitives.h" -#include "CCScheduler.h" -#include "CCProgressTimer.h" -#include "CCTransitionProgress.h" -#include "CCTextFieldTTF.h" -// -// cocoa includes -// -#include "CCSet.h" -#include "CCArray.h" -#include "CCDictionary.h" -#include "CCObject.h" +// base_nodes +#include "CCNode.h" +#include "CCAtlasNode.h" + +// cocoa +#include "CCAffineTransform.h" +#include "CCDictionary.h" +#include "CCObject.h" +#include "CCArray.h" +#include "CCGeometry.h" +#include "CCSet.h" +#include "CCAutoreleasePool.h" +#include "CCInteger.h" +#include "CCString.h" +#include "CCData.h" +#include "CCNS.h" #include "CCZone.h" -#include "CCGeometry.h" -#include "CCAffineTransform.h" -#include "CCTouch.h" -#include "CCPointExtension.h" -#include "CCString.h" -#include "cocoa/CCNS.h" -// -// platform specific -// -#include "CCApplication.h" -#include "CCEGLView.h" -#include "CCImage.h" -#include "CCFileUtils.h" -#include "CCAccelerometer.h" -#include "CCGL.h" -// Shaders -#include "CCGLProgram.h" -#include "ccGLStateCache.h" -#include "CCShaderCache.h" -// -// cocos2d macros -// -#include "ccTypes.h" -#include "ccMacros.h" +// effects +#include "CCGrabber.h" +#include "CCGrid.h" -// -// external -// +// include +#include "CCEventType.h" +#include "CCProtocols.h" +#include "ccConfig.h" +#include "ccMacros.h" +#include "ccTypes.h" +#include "cocos2dExt.h" + +// kazmath #include "kazmath/kazmath.h" #include "kazmath/GL/matrix.h" -// extensions -#include "cocos2dExt.h" +// keypad_dispatcher +#include "CCKeypadDelegate.h" +#include "CCKeypadDispatcher.h" + +// label_nodes +#include "CCLabelAtlas.h" +#include "CCLabelTTF.h" +#include "CCLabelBMFont.h" + +// layers_scenes_transitions_nodes +#include "CCLayer.h" +#include "CCScene.h" +#include "CCTransition.h" +#include "CCTransitionPageTurn.h" +#include "CCTransitionProgress.h" + +// menu_nodes +#include "CCMenu.h" +#include "CCMenuItem.h" + +// misc_nodes +#include "CCMotionStreak.h" +#include "CCProgressTimer.h" +#include "CCRenderTexture.h" + +// particle_nodes +#include "CCParticleBatchNode.h" +#include "CCParticleSystem.h" +#include "CCParticleExamples.h" +#include "CCParticleSystemQuad.h" + +// platform +#include "CCAccelerometer.h" +#include "CCApplication.h" +#include "CCEGLView.h" +#include "CCGL.h" +#include "CCCommon.h" +#include "CCFileUtils.h" +#include "CCImage.h" +#include "CCSAXParser.h" +#include "CCStdC.h" +#include "CCThread.h" +#include "platform.h" + +// script_support +#include "CCScriptSupport.h" + +// shaders +#include "CCGLProgram.h" +#include "ccGLStateCache.h" +#include "CCShaderCache.h" +#include "ccShaders.h" + +// sprite_nodes +#include "CCAnimation.h" +#include "CCAnimationCache.h" +#include "CCSprite.h" +#include "CCSpriteBatchNode.h" +#include "CCSpriteFrame.h" +#include "CCSpriteFrameCache.h" + +// support +#include "CCPointExtension.h" +#include "CCProfiling.h" +#include "CCUserDefault.h" +#include "CCVertex.h" + +// text_input_node +#include "CCIMEDelegate.h" +#include "CCIMEDispatcher.h" +#include "CCTextFieldTTF.h" + +// textures +#include "CCTexture2D.h" +#include "CCTextureAtlas.h" +#include "CCTextureCache.h" +#include "CCTexturePVR.h" + +// tileMap_parallax_nodes +#include "CCParallaxNode.h" +#include "CCTMXLayer.h" +#include "CCTMXObjectGroup.h" +#include "CCTMXTiledMap.h" +#include "CCTMXXMLParser.h" +#include "CCTileMapAtlas.h" + +// touch_dispatcher +#include "CCTouch.h" +#include "CCTouchDelegateProtocol.h" +#include "CCTouchDispatcher.h" +#include "CCTouchHandler.h" + +// root +#include "CCCamera.h" +#include "CCConfiguration.h" +#include "CCDirector.h" +#include "CCDrawingPrimitives.h" +#include "CCScheduler.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCKeypadDelegate.h b/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCKeypadDelegate.h rename to cocos2dx/keypad_dispatcher/CCKeypadDelegate.h diff --git a/cocos2dx/include/CCKeypadDispatcher.h b/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCKeypadDispatcher.h rename to cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h diff --git a/cocos2dx/include/CCLabelAtlas.h b/cocos2dx/label_nodes/CCLabelAtlas.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCLabelAtlas.h rename to cocos2dx/label_nodes/CCLabelAtlas.h diff --git a/cocos2dx/include/CCLabelBMFont.h b/cocos2dx/label_nodes/CCLabelBMFont.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCLabelBMFont.h rename to cocos2dx/label_nodes/CCLabelBMFont.h diff --git a/cocos2dx/include/CCLabelTTF.h b/cocos2dx/label_nodes/CCLabelTTF.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCLabelTTF.h rename to cocos2dx/label_nodes/CCLabelTTF.h diff --git a/cocos2dx/include/CCLayer.h b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCLayer.h rename to cocos2dx/layers_scenes_transitions_nodes/CCLayer.h diff --git a/cocos2dx/include/CCScene.h b/cocos2dx/layers_scenes_transitions_nodes/CCScene.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCScene.h rename to cocos2dx/layers_scenes_transitions_nodes/CCScene.h diff --git a/cocos2dx/include/CCTransition.h b/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTransition.h rename to cocos2dx/layers_scenes_transitions_nodes/CCTransition.h diff --git a/cocos2dx/include/CCTransitionPageTurn.h b/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTransitionPageTurn.h rename to cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h diff --git a/cocos2dx/include/CCTransitionProgress.h b/cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h similarity index 100% rename from cocos2dx/include/CCTransitionProgress.h rename to cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h diff --git a/cocos2dx/include/CCMenu.h b/cocos2dx/menu_nodes/CCMenu.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCMenu.h rename to cocos2dx/menu_nodes/CCMenu.h diff --git a/cocos2dx/include/CCMenuItem.h b/cocos2dx/menu_nodes/CCMenuItem.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCMenuItem.h rename to cocos2dx/menu_nodes/CCMenuItem.h diff --git a/cocos2dx/include/CCMotionStreak.h b/cocos2dx/misc_nodes/CCMotionStreak.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCMotionStreak.h rename to cocos2dx/misc_nodes/CCMotionStreak.h diff --git a/cocos2dx/include/CCProgressTimer.h b/cocos2dx/misc_nodes/CCProgressTimer.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCProgressTimer.h rename to cocos2dx/misc_nodes/CCProgressTimer.h diff --git a/cocos2dx/include/CCRenderTexture.h b/cocos2dx/misc_nodes/CCRenderTexture.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCRenderTexture.h rename to cocos2dx/misc_nodes/CCRenderTexture.h diff --git a/cocos2dx/include/CCParticleBatchNode.h b/cocos2dx/particle_nodes/CCParticleBatchNode.h similarity index 100% rename from cocos2dx/include/CCParticleBatchNode.h rename to cocos2dx/particle_nodes/CCParticleBatchNode.h diff --git a/cocos2dx/particle_nodes/CCParticleExamples.cpp b/cocos2dx/particle_nodes/CCParticleExamples.cpp index 3d97696d78..af96a3ed65 100644 --- a/cocos2dx/particle_nodes/CCParticleExamples.cpp +++ b/cocos2dx/particle_nodes/CCParticleExamples.cpp @@ -34,7 +34,7 @@ NS_CC_BEGIN // bool CCParticleFire::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -104,7 +104,7 @@ bool CCParticleFire::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleFireworks::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration= kCCParticleDurationInfinity; @@ -172,7 +172,7 @@ bool CCParticleFireworks::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleSun::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // additive this->setIsBlendAdditive(true); @@ -244,7 +244,7 @@ bool CCParticleSun::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleGalaxy::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -318,7 +318,7 @@ bool CCParticleGalaxy::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleFlower::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -391,7 +391,7 @@ bool CCParticleFlower::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleMeteor::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -465,7 +465,7 @@ bool CCParticleMeteor::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleSpiral::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -539,7 +539,7 @@ bool CCParticleSpiral::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleExplosion::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = 0.1f; @@ -612,7 +612,7 @@ bool CCParticleExplosion::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleSmoke::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -681,7 +681,7 @@ bool CCParticleSmoke::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleSnow::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; @@ -754,7 +754,7 @@ bool CCParticleSnow::initWithTotalParticles(unsigned int numberOfParticles) // bool CCParticleRain::initWithTotalParticles(unsigned int numberOfParticles) { - if( ARCH_OPTIMAL_PARTICLE_SYSTEM::initWithTotalParticles(numberOfParticles) ) + if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) ) { // duration m_fDuration = kCCParticleDurationInfinity; diff --git a/cocos2dx/include/CCParticleExamples.h b/cocos2dx/particle_nodes/CCParticleExamples.h old mode 100755 new mode 100644 similarity index 89% rename from cocos2dx/include/CCParticleExamples.h rename to cocos2dx/particle_nodes/CCParticleExamples.h index 5049d9763c..7ecee40876 --- a/cocos2dx/include/CCParticleExamples.h +++ b/cocos2dx/particle_nodes/CCParticleExamples.h @@ -27,12 +27,12 @@ THE SOFTWARE. #ifndef __CCPARTICLE_EXAMPLE_H__ #define __CCPARTICLE_EXAMPLE_H__ -#include "platform/CCArchOptimalParticleSystem.h" +#include "CCParticleSystemQuad.h" NS_CC_BEGIN //! @brief A fire particle system -class CC_DLL CCParticleFire : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleFire : public CCParticleSystemQuad { public: CCParticleFire(){} @@ -53,7 +53,7 @@ public: }; //! @brief A fireworks particle system -class CC_DLL CCParticleFireworks : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleFireworks : public CCParticleSystemQuad { public: CCParticleFireworks(){} @@ -74,7 +74,7 @@ public: }; //! @brief A sun particle system -class CC_DLL CCParticleSun : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleSun : public CCParticleSystemQuad { public: CCParticleSun(){} @@ -95,7 +95,7 @@ public: }; //! @brief A galaxy particle system -class CC_DLL CCParticleGalaxy : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleGalaxy : public CCParticleSystemQuad { public: CCParticleGalaxy(){} @@ -116,7 +116,7 @@ public: }; //! @brief A flower particle system -class CC_DLL CCParticleFlower : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleFlower : public CCParticleSystemQuad { public: CCParticleFlower(){} @@ -137,7 +137,7 @@ public: }; //! @brief A meteor particle system -class CC_DLL CCParticleMeteor : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleMeteor : public CCParticleSystemQuad { public: CCParticleMeteor(){} @@ -158,7 +158,7 @@ public: }; //! @brief An spiral particle system -class CC_DLL CCParticleSpiral : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleSpiral : public CCParticleSystemQuad { public: CCParticleSpiral(){} @@ -179,7 +179,7 @@ public: }; //! @brief An explosion particle system -class CC_DLL CCParticleExplosion : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleExplosion : public CCParticleSystemQuad { public: CCParticleExplosion(){} @@ -200,7 +200,7 @@ public: }; //! @brief An smoke particle system -class CC_DLL CCParticleSmoke : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleSmoke : public CCParticleSystemQuad { public: CCParticleSmoke(){} @@ -221,7 +221,7 @@ public: }; //! @brief An snow particle system -class CC_DLL CCParticleSnow : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleSnow : public CCParticleSystemQuad { public: CCParticleSnow(){} @@ -242,7 +242,7 @@ public: }; //! @brief A rain particle system -class CC_DLL CCParticleRain : public ARCH_OPTIMAL_PARTICLE_SYSTEM +class CC_DLL CCParticleRain : public CCParticleSystemQuad { public: CCParticleRain(){} diff --git a/cocos2dx/particle_nodes/CCParticleSystem.cpp b/cocos2dx/particle_nodes/CCParticleSystem.cpp index 47e60bb34c..e0de48bb0b 100644 --- a/cocos2dx/particle_nodes/CCParticleSystem.cpp +++ b/cocos2dx/particle_nodes/CCParticleSystem.cpp @@ -55,7 +55,7 @@ THE SOFTWARE. #include "CCDirector.h" #include "support/CCProfiling.h" // opengl -#include "platform/CCGL.h" +#include "CCGL.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCParticleSystem.h b/cocos2dx/particle_nodes/CCParticleSystem.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCParticleSystem.h rename to cocos2dx/particle_nodes/CCParticleSystem.h diff --git a/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp b/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp index 7b66222164..cf6980a8b6 100644 --- a/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp +++ b/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp @@ -25,15 +25,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "platform/CCGL.h" - +#include "CCGL.h" #include "CCParticleSystemQuad.h" #include "CCSpriteFrame.h" #include "CCDirector.h" - #include "CCParticleBatchNode.h" #include "CCTextureAtlas.h" -#include "CCDirector.h" #include "CCShaderCache.h" #include "ccGLStateCache.h" #include "CCGLProgram.h" diff --git a/cocos2dx/include/CCParticleSystemQuad.h b/cocos2dx/particle_nodes/CCParticleSystemQuad.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCParticleSystemQuad.h rename to cocos2dx/particle_nodes/CCParticleSystemQuad.h diff --git a/cocos2dx/include/CCAccelerometerDelegate.h b/cocos2dx/platform/CCAccelerometerDelegate.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAccelerometerDelegate.h rename to cocos2dx/platform/CCAccelerometerDelegate.h diff --git a/cocos2dx/platform/CCAccelerometer_platform.h b/cocos2dx/platform/CCAccelerometer_platform.h deleted file mode 100644 index 288ca8ed01..0000000000 --- a/cocos2dx/platform/CCAccelerometer_platform.h +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_ACCELEROMETER_PLATFORM_H__ -#define __CC_ACCELEROMETER_PLATFORM_H__ - -#include "CCPlatformConfig.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - #include "win32/CCAccelerometer_win32.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - #include "android/CCAccelerometer_android.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - #include "ios/CCAccelerometer_ios.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - #include "marmalade/CCAccelerometer_marmalade.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - #include "linux/CCAccelerometer_linux.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) - #include "bada/CCAccelerometer_bada.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) - #include "qnx/CCAccelerometer_qnx.h" -#else - #error -#endif - -#endif // __CC_UIACCELEROMETER_PLATFORM_H__ diff --git a/cocos2dx/platform/CCArchOptimalParticleSystem.h b/cocos2dx/platform/CCArchOptimalParticleSystem.h deleted file mode 100644 index 5ad54341bd..0000000000 --- a/cocos2dx/platform/CCArchOptimalParticleSystem.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* cocos2d for iPhone: http://www.cocos2d-iphone.org -* -* Copyright (c) 2008-2010 Ricardo Quesada -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -* -*/ - -#include "CCPlatformConfig.h" - -// build each architecture with the optimal particle system - -// ARMv7, Mac or Simulator use "Quad" particle -#if defined(__ARM_NEON__) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) || \ - (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) - -#include "CCParticleSystemQuad.h" -#define ARCH_OPTIMAL_PARTICLE_SYSTEM CCParticleSystemQuad - -// ARMv6 use "Point" particle -#elif __arm__ -#include "CCParticleSystemPoint.h" -#define ARCH_OPTIMAL_PARTICLE_SYSTEM CCParticleSystemPoint - -#else -#error "unknown architecture" -#endif - - diff --git a/cocos2dx/platform/CCCommon.cpp b/cocos2dx/platform/CCCommon.cpp deleted file mode 100644 index 7437fd6ff5..0000000000 --- a/cocos2dx/platform/CCCommon.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "CCCommon.h" - -#define MAX_LEN (cocos2d::kMaxLogLen + 1) - -/**************************************************** - * win32 - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#include - -#include "CCStdC.h" - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char szBuf[MAX_LEN]; - - va_list ap; - va_start(ap, pszFormat); - vsnprintf_s(szBuf, MAX_LEN, MAX_LEN, pszFormat, ap); - va_end(ap); - - WCHAR wszBuf[MAX_LEN] = {0}; - MultiByteToWideChar(CP_UTF8, 0, szBuf, -1, wszBuf, sizeof(wszBuf)); - OutputDebugStringW(wszBuf); - OutputDebugStringA("\n"); -} - -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - MessageBoxA(NULL, pszMsg, pszTitle, MB_OK); -} - -NS_CC_END - -#endif // CC_PLATFORM_WIN32 - - -/**************************************************** - * ios - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -// implement in CCCommon_iso.mm - -#endif // CC_PLATFORM_IOS - -/**************************************************** - * android - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - -#include -#include -#include - -#include "android/jni/MessageJni.h" - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char buf[MAX_LEN]; - - va_list args; - va_start(args, pszFormat); - vsprintf(buf, pszFormat, args); - va_end(args); - - __android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", buf); -} - -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - showMessageBoxJNI(pszMsg, pszTitle); -} - -NS_CC_END - -#endif // CC_PLATFORM_ANDROID -/**************************************************** - * linux - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - -#include -#include "CCStdC.h" - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char buf[MAX_LEN]; - - va_list args; - va_start(args, pszFormat); - vsprintf(buf, pszFormat, args); - va_end(args); - - //TODO will copy how orx do - printf(buf); -} - -// marmalade no MessageBox, use CCLog instead -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - CCLog("%s: %s", pszTitle, pszMsg); -} - -NS_CC_END -#endif -/**************************************************** - * marmalade - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - -#include -#include "IwUtil.h" -#include "IwUtilInitTerm.h" -#include -#include - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char buf[MAX_LEN]; - - va_list args; - va_start(args, pszFormat); - vsprintf(buf, pszFormat, args); - va_end(args); - - IwTrace(GAME, (buf)); -} - -// marmalade no MessageBox, use CCLog instead -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - CCLog("%s: %s", pszTitle, pszMsg); -} - -NS_CC_END - -#endif // CC_PLATFORM_MARMALADE - -/**************************************************** - * bada - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) -#include -#include -#include -#include - -using namespace Osp::Ui::Controls; - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char buf[MAX_LEN] = {0}; - - va_list args; - va_start(args, pszFormat); - vsnprintf(buf, MAX_LEN, pszFormat, args); - va_end(args); - __App_info(__PRETTY_FUNCTION__ , __LINE__, buf); -} - -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - if (pszMsg != NULL && pszTitle != NULL) - { - int iRet = 0; - MessageBox msgBox; - msgBox.Construct(pszTitle, pszMsg, MSGBOX_STYLE_OK); - msgBox.ShowAndWait(iRet); - } -} - -NS_CC_END - -#endif // CC_PLATFORM_BADA - - -/**************************************************** - * qnx - ***************************************************/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) -#include -#include -#include -#include -using namespace std; - -NS_CC_BEGIN - -void CCLog(const char * pszFormat, ...) -{ - char buf[MAX_LEN]; - - va_list args; - va_start(args, pszFormat); - vsprintf(buf, pszFormat, args); - va_end(args); - - fprintf(stderr, "cocos2d-x debug info [%s]\n", buf); -} - -void CCMessageBox(const char * pszMsg, const char * pszTitle) -{ - CCLog("%s: %s", pszTitle, pszMsg); -} - -void CCLuaLog(const char * pszFormat) -{ - CCLog(pszFormat); -} - -NS_CC_END - -#endif // CC_PLATFORM_QNX diff --git a/cocos2dx/platform/CCEGLView_platform.h b/cocos2dx/platform/CCEGLView_platform.h deleted file mode 100644 index 601a358cb0..0000000000 --- a/cocos2dx/platform/CCEGLView_platform.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EGLVIEW_PLATFORM_H__ -#define __CC_EGLVIEW_PLATFORM_H__ - -#include "CCPlatformConfig.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - #include "win32/CCEGLView_win32.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - #include "android/CCEGLView_android.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - #include "ios/CCEGLView_ios.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - #include "marmalade/CCEGLView_marmalade.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - #include "linux/CCEGLView_linux.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) - #include "bada/CCEGLView_bada.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) - #include "qnx/CCEGLView_qnx.h" -#else - #error -#endif - -#endif // end of __CC_EGLVIEW_PLATFORM_H__ diff --git a/cocos2dx/platform/CCFileUtils.cpp b/cocos2dx/platform/CCFileUtilsCommon_cpp.h similarity index 94% rename from cocos2dx/platform/CCFileUtils.cpp rename to cocos2dx/platform/CCFileUtilsCommon_cpp.h index 6ce08a0e5a..1f31c569f3 100644 --- a/cocos2dx/platform/CCFileUtils.cpp +++ b/cocos2dx/platform/CCFileUtilsCommon_cpp.h @@ -21,6 +21,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#ifndef __CC_PLATFORM_FILEUTILS_CPP__ +#error "CCFileUtilsCommon_cpp.h can only be included for CCFileUtils.cpp in platform/win32(android,...)" +#endif /* __CC_PLATFORM_FILEUTILS_CPP__ */ #include "CCFileUtils.h" #include "CCDirector.h" @@ -403,34 +406,34 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath) /// functions iOS specific void CCFileUtils::setiPhoneRetinaDisplaySuffix(const char *suffix) { - assert(0); + CCAssert(0, "not implement"); } void CCFileUtils::setiPadSuffix(const char *suffix) { - assert(0); + CCAssert(0, "not implement"); } void CCFileUtils::setiPadRetinaDisplaySuffix(const char *suffix) { - assert(0); + CCAssert(0, "not implement"); } bool CCFileUtils::iPadFileExistsAtPath(const char *filename) { - assert(0); + CCAssert(0, "not implement"); return false; } bool CCFileUtils::iPadRetinaDisplayFileExistsAtPath(const char *filename) { - assert(0); + CCAssert(0, "not implement"); return false; } bool CCFileUtils::iPhoneRetinaDisplayFileExistsAtPath(const char *filename) { - assert(0); + CCAssert(0, "not implement"); return false; } @@ -451,28 +454,4 @@ bool CCFileUtils::getIsPopupNotify() NS_CC_END -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#include "win32/CCFileUtils_win32.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "android/CCFileUtils_android.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) -#include "marmalade/CCFileUtils_marmalade.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) -#include "bada/CCFileUtils_bada.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) -#include "qnx/CCFileUtils_qnx.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#include "linux/CCFileUtils_linux.cpp" -#endif - #endif // (CC_TARGET_PLATFORM != CC_PLATFORM_IOS) diff --git a/cocos2dx/platform/CCGL.h b/cocos2dx/platform/CCGL.h deleted file mode 100644 index d89eee42d4..0000000000 --- a/cocos2dx/platform/CCGL.h +++ /dev/null @@ -1,155 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __PLATFOMR_CCGL_H__ -#define __PLATFOMR_CCGL_H__ - -// -// Common layer for OpenGL stuff -// - - -#define CC_GLVIEW cocos2d::CCEGLView -#define glClearDepth glClearDepthf -#define glDeleteVertexArrays glDeleteVertexArraysOES -#define glGenVertexArrays glGenVertexArraysOES -#define glBindVertexArray glBindVertexArrayOES - -#include "CCCommon.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "OpenGLES/ES2/gl.h" -#include "OpenGLES/ES2/glext.h" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -// GL_GLEXT_PROTOTYPES isn't defined in glplatform.h on android ndk r7 -// we manually define it here -#include -#ifndef GL_GLEXT_PROTOTYPES -#define GL_GLEXT_PROTOTYPES 1 -#endif - -// normal process -#include -#include -// gl2.h don't define GLchar on Android -typedef char GLchar; - -//declare here while define in CCEGLView_android.cpp -extern PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT; -extern PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT; -extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT; - -#define glGenVertexArraysOES glGenVertexArraysOESEXT -#define glBindVertexArrayOES glBindVertexArrayOESEXT -#define glDeleteVertexArraysOES glDeleteVertexArraysOESEXT - -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#include "GLES2/gl2.h" -#include "GLES2/gl2ext.h" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#include -#include "GL/glext.h" - -//declare here while define in CCEGLView_linux.cpp -extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT; -extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT; -extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT; -extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT; -extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT; -extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT; - -extern PFNGLGENBUFFERSARBPROC glGenBuffersARB; -extern PFNGLBINDBUFFERARBPROC glBindBufferARB; -extern PFNGLBUFFERDATAARBPROC glBufferDataARB; -extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB; -extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB; - - - - -#undef ccglOrtho -#undef ccglClearDepth -#undef ccglTranslate -#undef ccglGenerateMipmap -#undef ccglGenFramebuffers -#undef ccglBindFramebuffer -#undef ccglFramebufferTexture2D -#undef ccglDeleteFramebuffers -#undef ccglCheckFramebufferStatus - -#undef CC_GL_FRAMEBUFFER -#undef CC_GL_FRAMEBUFFER_BINDING -#undef CC_GL_COLOR_ATTACHMENT0 -#undef CC_GL_FRAMEBUFFER_COMPLETE - -#define ccglOrtho glOrtho -#define ccglClearDepth glClearDepth -#define ccglTranslate glTranslated - -#define ccglGenerateMipmap glGenerateMipmapEXT -#define ccglGenFramebuffers glGenFramebuffersEXT -#define ccglBindFramebuffer glBindFramebufferEXT -#define ccglFramebufferTexture2D glFramebufferTexture2DEXT -#define ccglDeleteFramebuffers glDeleteFramebuffersEXT -#define ccglCheckFramebufferStatus glCheckFramebufferStatusEXT - - -#define glFrustumf glFrustum -#define glGenBuffers glGenBuffersARB -#define glBindBuffer glBindBufferARB -#define glBufferData glBufferDataARB -#define glBufferSubData glBufferSubDataARB -#define glDeleteBuffers glDeleteBuffersARB - -#define CC_GL_FRAMEBUFFER GL_FRAMEBUFFER -#define CC_GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING -#define CC_GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0 -#define CC_GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE - -#define GL_POINT_SPRITE_OES GL_POINT_SPRITE_ARB -#define GL_COORD_REPLACE_OES GL_COORD_REPLACE_ARB -#define GL_POINT_SIZE_ARRAY_OES GL_POINT_SIZE -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) -#include -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) -#include "GLES/gl.h" -#include "GLES/glext.h" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) -#include -#include -#endif - -#endif // __PLATFOMR_CCGL_H__ diff --git a/cocos2dx/platform/CCImage.cpp b/cocos2dx/platform/CCImageCommon_cpp.h similarity index 97% rename from cocos2dx/platform/CCImage.cpp rename to cocos2dx/platform/CCImageCommon_cpp.h index 454688f4e5..23725eb528 100644 --- a/cocos2dx/platform/CCImage.cpp +++ b/cocos2dx/platform/CCImageCommon_cpp.h @@ -22,6 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#ifndef __CC_PLATFORM_IMAGE_CPP__ +#error "CCFileUtilsCommon_cpp.h can only be included for CCFileUtils.cpp in platform/win32(android,...)" +#endif /* __CC_PLATFORM_IMAGE_CPP__ */ #include "CCImage.h" #include "CCCommon.h" @@ -590,23 +593,3 @@ NS_CC_END /* ios/CCImage_ios.mm uses "mm" as the extension, so we cannot inclue it in this CCImage.cpp. It makes a little difference on ios */ - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#include "win32/CCImage_win32.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "android/CCImage_android.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) -#include "bada/CCImage_bada.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) -#include "qnx/CCImage_qnx.cpp" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#include "linux/CCImage_linux.cpp" -#endif diff --git a/cocos2dx/platform/CCPlatformMacros.h b/cocos2dx/platform/CCPlatformMacros.h index 61b415f6db..2b8090d208 100644 --- a/cocos2dx/platform/CCPlatformMacros.h +++ b/cocos2dx/platform/CCPlatformMacros.h @@ -29,9 +29,7 @@ */ #include "ccConfig.h" #include "CCPlatformConfig.h" - -#define MacGLView void -#define NSWindow void +#include "CCPlatformDefine.h" /** @def CC_ENABLE_CACHE_TEXTTURE_DATA Enable it if you want to cache the texture data. @@ -187,68 +185,5 @@ public: virtual void set##funName(varType var) \ #define LUALOG(format, ...) cocos2d::CCLog(format, ##__VA_ARGS__) #endif // Lua engine debug -// shared library declartor -#define CC_DLL - -#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA) -// assertion -#include -#define CC_ASSERT(cond) assert(cond) -#else -// bada platform - -#include -#include - -#undef CC_DLL -#define CC_DLL _EXPORT_ - -#include "CCPlatformFunc_bada.h" - -#ifdef _DEBUG -#define CC_ASSERT(cond) (void)( (!!(cond)) || (badaAssert(__PRETTY_FUNCTION__ , __LINE__ , #cond),0) ) -#else -#define CC_ASSERT(cond) void(0) -#endif /* _DEBUG */ -#endif - -#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#undef CC_UNUSED_PARAM -#define CC_UNUSED_PARAM(unusedparam) //unusedparam -#endif - - -// platform depended macros - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - - #undef CC_DLL - #if defined(_USRDLL) - #define CC_DLL __declspec(dllexport) - #else /* use a DLL library */ - #define CC_DLL __declspec(dllimport) - #endif - -#endif // CC_PLATFORM_WIN32 - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - -#include "CCCommon.h" -#include - - #undef CC_ASSERT - #define CC_ASSERT(cond) \ -if (! (cond)) \ -{ \ - char content[100]; \ - sprintf(content, "%s function:%s line:%d", __FILE__, __FUNCTION__, __LINE__ - 3); \ - CCMessageBox(content, "Assert error"); \ -} - -#endif // CC_PLATFORM_ANDROID - - #endif // __CC_PLATFORM_MACROS_H__ diff --git a/cocos2dx/platform/android/CCAccelerometer_android.cpp b/cocos2dx/platform/android/CCAccelerometer.cpp similarity index 98% rename from cocos2dx/platform/android/CCAccelerometer_android.cpp rename to cocos2dx/platform/android/CCAccelerometer.cpp index b681ad0943..3403b7b9d2 100644 --- a/cocos2dx/platform/android/CCAccelerometer_android.cpp +++ b/cocos2dx/platform/android/CCAccelerometer.cpp @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCAccelerometer_android.h" +#include "CCAccelerometer.h" #include "jni/SensorJni.h" #include #include diff --git a/cocos2dx/platform/android/CCAccelerometer_android.h b/cocos2dx/platform/android/CCAccelerometer.h similarity index 100% rename from cocos2dx/platform/android/CCAccelerometer_android.h rename to cocos2dx/platform/android/CCAccelerometer.h diff --git a/cocos2dx/platform/android/CCApplication_android.cpp b/cocos2dx/platform/android/CCApplication.cpp similarity index 100% rename from cocos2dx/platform/android/CCApplication_android.cpp rename to cocos2dx/platform/android/CCApplication.cpp diff --git a/cocos2dx/platform/android/CCApplication_android.h b/cocos2dx/platform/android/CCApplication.h similarity index 100% rename from cocos2dx/platform/android/CCApplication_android.h rename to cocos2dx/platform/android/CCApplication.h diff --git a/cocos2dx/include/CCEGLView.h b/cocos2dx/platform/android/CCCommon.cpp old mode 100755 new mode 100644 similarity index 69% rename from cocos2dx/include/CCEGLView.h rename to cocos2dx/platform/android/CCCommon.cpp index 2399eae60a..fcfc2acaf5 --- a/cocos2dx/include/CCEGLView.h +++ b/cocos2dx/platform/android/CCCommon.cpp @@ -22,9 +22,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_EGLVIEW_H__ -#define __CC_EGLVIEW_H__ +#include "CCCommon.h" -#include "../platform/CCEGLView_platform.h" +#define MAX_LEN (cocos2d::kMaxLogLen + 1) -#endif // end of __CC_EGLVIEW_H__ +#include +#include +#include +#include "android/jni/MessageJni.h" + +NS_CC_BEGIN + +void CCLog(const char * pszFormat, ...) +{ + char buf[MAX_LEN]; + + va_list args; + va_start(args, pszFormat); + vsprintf(buf, pszFormat, args); + va_end(args); + + __android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", buf); +} + +void CCMessageBox(const char * pszMsg, const char * pszTitle) +{ + showMessageBoxJNI(pszMsg, pszTitle); +} + +NS_CC_END diff --git a/cocos2dx/platform/android/CCEGLView_android.cpp b/cocos2dx/platform/android/CCEGLView.cpp similarity index 98% rename from cocos2dx/platform/android/CCEGLView_android.cpp rename to cocos2dx/platform/android/CCEGLView.cpp index b3951969bc..ae00ea5da6 100644 --- a/cocos2dx/platform/android/CCEGLView_android.cpp +++ b/cocos2dx/platform/android/CCEGLView.cpp @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCEGLView_android.h" +#include "CCEGLView.h" #include "CCSet.h" #include "CCDirector.h" #include "ccMacros.h" diff --git a/cocos2dx/platform/android/CCEGLView_android.h b/cocos2dx/platform/android/CCEGLView.h similarity index 100% rename from cocos2dx/platform/android/CCEGLView_android.h rename to cocos2dx/platform/android/CCEGLView.h diff --git a/cocos2dx/platform/android/CCFileUtils_android.cpp b/cocos2dx/platform/android/CCFileUtils.cpp similarity index 98% rename from cocos2dx/platform/android/CCFileUtils_android.cpp rename to cocos2dx/platform/android/CCFileUtils.cpp index 330f589db8..5c8f9747c2 100644 --- a/cocos2dx/platform/android/CCFileUtils_android.cpp +++ b/cocos2dx/platform/android/CCFileUtils.cpp @@ -22,6 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#define __CC_PLATFORM_FILEUTILS_CPP__ +#include "CCFileUtilsCommon_cpp.h" + NS_CC_BEGIN #include "CCCommon.h" diff --git a/cocos2dx/platform/CCApplication_platform.h b/cocos2dx/platform/android/CCGL.h similarity index 55% rename from cocos2dx/platform/CCApplication_platform.h rename to cocos2dx/platform/android/CCGL.h index 83ceb99a1c..cdd9794032 100644 --- a/cocos2dx/platform/CCApplication_platform.h +++ b/cocos2dx/platform/android/CCGL.h @@ -22,27 +22,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_APPLICATION_PLATFORM_H__ -#define __CC_APPLICATION_PLATFORM_H__ +#ifndef __CCGL_H__ +#define __CCGL_H__ -#include "CCPlatformConfig.h" +#define glClearDepth glClearDepthf +#define glDeleteVertexArrays glDeleteVertexArraysOES +#define glGenVertexArrays glGenVertexArraysOES +#define glBindVertexArray glBindVertexArrayOES -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - #include "win32/CCApplication_win32.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - #include "android/CCApplication_android.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - # include "ios/CCApplication_ios.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - #include "marmalade/CCApplication_marmalade.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - #include "linux/CCApplication_linux.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) - #include "bada/CCApplication_bada.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) - #include "qnx/CCApplication_qnx.h" -#else - #error +// GL_GLEXT_PROTOTYPES isn't defined in glplatform.h on android ndk r7 +// we manually define it here +#include +#ifndef GL_GLEXT_PROTOTYPES +#define GL_GLEXT_PROTOTYPES 1 #endif -#endif // __CC_APPLICATION_PLATFORM_H__ +// normal process +#include +#include +// gl2.h don't define GLchar on Android +typedef char GLchar; + +//declare here while define in CCEGLView_android.cpp +extern PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT; +extern PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT; +extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT; + +#define glGenVertexArraysOES glGenVertexArraysOESEXT +#define glBindVertexArrayOES glBindVertexArrayOESEXT +#define glDeleteVertexArraysOES glDeleteVertexArraysOESEXT + + +#endif // __PLATFOMR_CCGL_H__ diff --git a/cocos2dx/platform/android/CCImage_android.cpp b/cocos2dx/platform/android/CCImage.cpp similarity index 98% rename from cocos2dx/platform/android/CCImage_android.cpp rename to cocos2dx/platform/android/CCImage.cpp index b4acf64f8b..00d0b064ec 100644 --- a/cocos2dx/platform/android/CCImage_android.cpp +++ b/cocos2dx/platform/android/CCImage.cpp @@ -24,6 +24,9 @@ THE SOFTWARE. //#define COCOS2D_DEBUG 1 +#define __CC_PLATFORM_IMAGE_CPP__ +#include "CCImageCommon_cpp.h" + #include #include #include diff --git a/cocos2dx/platform/android/CCPlatformDefine.h b/cocos2dx/platform/android/CCPlatformDefine.h new file mode 100644 index 0000000000..6530015eae --- /dev/null +++ b/cocos2dx/platform/android/CCPlatformDefine.h @@ -0,0 +1,28 @@ +#ifndef __CCPLATFORMDEFINE_H__ +#define __CCPLATFORMDEFINE_H__ + +#define CC_DLL + +#define CC_ASSERT(cond) \ +if (! (cond)) \ +{ \ + char content[100]; \ + sprintf(content, "%s function:%s line:%d", __FILE__, __FUNCTION__, __LINE__ - 3); \ + CCMessageBox(content, "Assert error"); \ +} + + +#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam + +/* Define NULL pointer value */ +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + + +#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos2dx/platform/android/jni/SensorJni.cpp b/cocos2dx/platform/android/jni/SensorJni.cpp index ddc852b94d..18ba9a2c37 100644 --- a/cocos2dx/platform/android/jni/SensorJni.cpp +++ b/cocos2dx/platform/android/jni/SensorJni.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "SensorJni.h" #include "CCGeometry.h" #include "CCAccelerometer.h" -#include "platform/android/CCAccelerometer_android.h" +#include "platform/android/CCAccelerometer.h" #include "CCEGLView.h" #include "JniHelper.h" #include diff --git a/cocos2dx/platform/ios/CCAccelerometer_ios.h b/cocos2dx/platform/ios/CCAccelerometer.h similarity index 100% rename from cocos2dx/platform/ios/CCAccelerometer_ios.h rename to cocos2dx/platform/ios/CCAccelerometer.h diff --git a/cocos2dx/platform/ios/CCAccelerometer_ios.mm b/cocos2dx/platform/ios/CCAccelerometer.mm similarity index 100% rename from cocos2dx/platform/ios/CCAccelerometer_ios.mm rename to cocos2dx/platform/ios/CCAccelerometer.mm diff --git a/cocos2dx/platform/ios/CCApplication_ios.h b/cocos2dx/platform/ios/CCApplication.h similarity index 100% rename from cocos2dx/platform/ios/CCApplication_ios.h rename to cocos2dx/platform/ios/CCApplication.h diff --git a/cocos2dx/platform/ios/CCApplication_ios.mm b/cocos2dx/platform/ios/CCApplication.mm similarity index 99% rename from cocos2dx/platform/ios/CCApplication_ios.mm rename to cocos2dx/platform/ios/CCApplication.mm index 51393d7baf..f4ca5337eb 100644 --- a/cocos2dx/platform/ios/CCApplication_ios.mm +++ b/cocos2dx/platform/ios/CCApplication.mm @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#import "CCApplication_ios.h" +#import "CCApplication.h" #import diff --git a/cocos2dx/platform/ios/CCCommon_ios.mm b/cocos2dx/platform/ios/CCCommon.mm similarity index 100% rename from cocos2dx/platform/ios/CCCommon_ios.mm rename to cocos2dx/platform/ios/CCCommon.mm diff --git a/cocos2dx/platform/ios/CCEGLView_ios.h b/cocos2dx/platform/ios/CCEGLView.h similarity index 100% rename from cocos2dx/platform/ios/CCEGLView_ios.h rename to cocos2dx/platform/ios/CCEGLView.h diff --git a/cocos2dx/platform/ios/CCEGLView_ios.mm b/cocos2dx/platform/ios/CCEGLView.mm similarity index 99% rename from cocos2dx/platform/ios/CCEGLView_ios.mm rename to cocos2dx/platform/ios/CCEGLView.mm index 75806b8dcd..7a4fd16bed 100644 --- a/cocos2dx/platform/ios/CCEGLView_ios.mm +++ b/cocos2dx/platform/ios/CCEGLView.mm @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ #include "EAGLView.h" #include "CCDirectorCaller.h" -#include "CCEGLView_ios.h" +#include "CCEGLView.h" #include "CCSet.h" #include "CCTouch.h" #include "CCTouchDispatcher.h" diff --git a/cocos2dx/platform/ios/CCFileUtils_ios.mm b/cocos2dx/platform/ios/CCFileUtils.mm similarity index 100% rename from cocos2dx/platform/ios/CCFileUtils_ios.mm rename to cocos2dx/platform/ios/CCFileUtils.mm diff --git a/cocos2dx/include/CCApplication.h b/cocos2dx/platform/ios/CCGL.h old mode 100755 new mode 100644 similarity index 77% rename from cocos2dx/include/CCApplication.h rename to cocos2dx/platform/ios/CCGL.h index f1fb248b18..5dc4f76483 --- a/cocos2dx/include/CCApplication.h +++ b/cocos2dx/platform/ios/CCGL.h @@ -22,9 +22,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_APPLICATION_H__ -#define __CC_APPLICATION_H__ +#ifndef __CCGL_H__ +#define __CCGL_H__ -#include "platform/CCApplication_platform.h" +#define glClearDepth glClearDepthf +#define glDeleteVertexArrays glDeleteVertexArraysOES +#define glGenVertexArrays glGenVertexArraysOES +#define glBindVertexArray glBindVertexArrayOES -#endif // __CC_APPLICATION_H__ \ No newline at end of file +#include +#include + + +#endif // __PLATFOMR_CCGL_H__ diff --git a/cocos2dx/platform/ios/CCImage_ios.mm b/cocos2dx/platform/ios/CCImage.mm similarity index 100% rename from cocos2dx/platform/ios/CCImage_ios.mm rename to cocos2dx/platform/ios/CCImage.mm diff --git a/cocos2dx/platform/ios/CCPlatformDefine.h b/cocos2dx/platform/ios/CCPlatformDefine.h new file mode 100644 index 0000000000..6530015eae --- /dev/null +++ b/cocos2dx/platform/ios/CCPlatformDefine.h @@ -0,0 +1,28 @@ +#ifndef __CCPLATFORMDEFINE_H__ +#define __CCPLATFORMDEFINE_H__ + +#define CC_DLL + +#define CC_ASSERT(cond) \ +if (! (cond)) \ +{ \ + char content[100]; \ + sprintf(content, "%s function:%s line:%d", __FILE__, __FUNCTION__, __LINE__ - 3); \ + CCMessageBox(content, "Assert error"); \ +} + + +#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam + +/* Define NULL pointer value */ +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + + +#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos2dx/platform/ios/CCThread_ios.mm b/cocos2dx/platform/ios/CCThread.mm similarity index 100% rename from cocos2dx/platform/ios/CCThread_ios.mm rename to cocos2dx/platform/ios/CCThread.mm diff --git a/cocos2dx/platform/win32/CCAccelerometer_win32.cpp b/cocos2dx/platform/win32/CCAccelerometer.cpp similarity index 98% rename from cocos2dx/platform/win32/CCAccelerometer_win32.cpp rename to cocos2dx/platform/win32/CCAccelerometer.cpp index 0fbbeb1520..58bee51739 100644 --- a/cocos2dx/platform/win32/CCAccelerometer_win32.cpp +++ b/cocos2dx/platform/win32/CCAccelerometer.cpp @@ -21,8 +21,8 @@ THE SOFTWARE. ****************************************************************************/ -#include "CCAccelerometer_win32.h" -#include "CCEGLView_win32.h" +#include "CCAccelerometer.h" +#include "CCEGLView.h" #include "CCDirector.h" #include "ccMacros.h" diff --git a/cocos2dx/platform/win32/CCAccelerometer_win32.h b/cocos2dx/platform/win32/CCAccelerometer.h similarity index 100% rename from cocos2dx/platform/win32/CCAccelerometer_win32.h rename to cocos2dx/platform/win32/CCAccelerometer.h diff --git a/cocos2dx/platform/win32/CCApplication_win32.cpp b/cocos2dx/platform/win32/CCApplication.cpp similarity index 100% rename from cocos2dx/platform/win32/CCApplication_win32.cpp rename to cocos2dx/platform/win32/CCApplication.cpp diff --git a/cocos2dx/platform/win32/CCApplication_win32.h b/cocos2dx/platform/win32/CCApplication.h similarity index 100% rename from cocos2dx/platform/win32/CCApplication_win32.h rename to cocos2dx/platform/win32/CCApplication.h diff --git a/cocos2dx/include/CCAccelerometer.h b/cocos2dx/platform/win32/CCCommon.cpp old mode 100755 new mode 100644 similarity index 67% rename from cocos2dx/include/CCAccelerometer.h rename to cocos2dx/platform/win32/CCCommon.cpp index 9ad5fd25c7..15b97d4810 --- a/cocos2dx/include/CCAccelerometer.h +++ b/cocos2dx/platform/win32/CCCommon.cpp @@ -21,9 +21,35 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_CCAccelerometer_H__ -#define __CC_CCAccelerometer_H__ -#include "platform/CCAccelerometer_platform.h" +#include "CCCommon.h" + +#define MAX_LEN (cocos2d::kMaxLogLen + 1) + +#include +#include "CCStdC.h" + +NS_CC_BEGIN + +void CCLog(const char * pszFormat, ...) +{ + char szBuf[MAX_LEN]; + + va_list ap; + va_start(ap, pszFormat); + vsnprintf_s(szBuf, MAX_LEN, MAX_LEN, pszFormat, ap); + va_end(ap); + + WCHAR wszBuf[MAX_LEN] = {0}; + MultiByteToWideChar(CP_UTF8, 0, szBuf, -1, wszBuf, sizeof(wszBuf)); + OutputDebugStringW(wszBuf); + OutputDebugStringA("\n"); +} + +void CCMessageBox(const char * pszMsg, const char * pszTitle) +{ + MessageBoxA(NULL, pszMsg, pszTitle, MB_OK); +} + +NS_CC_END -#endif // __CC_CCAccelerometer_H__ diff --git a/cocos2dx/platform/win32/CCEGLView_win32.cpp b/cocos2dx/platform/win32/CCEGLView.cpp similarity index 100% rename from cocos2dx/platform/win32/CCEGLView_win32.cpp rename to cocos2dx/platform/win32/CCEGLView.cpp diff --git a/cocos2dx/platform/win32/CCEGLView_win32.h b/cocos2dx/platform/win32/CCEGLView.h similarity index 100% rename from cocos2dx/platform/win32/CCEGLView_win32.h rename to cocos2dx/platform/win32/CCEGLView.h diff --git a/cocos2dx/platform/win32/CCFileUtils_win32.cpp b/cocos2dx/platform/win32/CCFileUtils.cpp similarity index 98% rename from cocos2dx/platform/win32/CCFileUtils_win32.cpp rename to cocos2dx/platform/win32/CCFileUtils.cpp index 6aa416be0a..7d582a701a 100644 --- a/cocos2dx/platform/win32/CCFileUtils_win32.cpp +++ b/cocos2dx/platform/win32/CCFileUtils.cpp @@ -21,7 +21,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - +#define __CC_PLATFORM_FILEUTILS_CPP__ +#include "CCFileUtilsCommon_cpp.h" #include "windows.h" #include "CCDirector.h" diff --git a/cocos2dx/platform/CCGL.cpp b/cocos2dx/platform/win32/CCGL.h similarity index 78% rename from cocos2dx/platform/CCGL.cpp rename to cocos2dx/platform/win32/CCGL.h index 5eee56f9d3..c872d3461b 100644 --- a/cocos2dx/platform/CCGL.cpp +++ b/cocos2dx/platform/win32/CCGL.h @@ -22,10 +22,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCGL.h" -#include "CCStdC.h" +#ifndef __CCGL_H__ +#define __CCGL_H__ -NS_CC_BEGIN +#define glClearDepth glClearDepthf +#define glDeleteVertexArrays glDeleteVertexArraysOES +#define glGenVertexArrays glGenVertexArraysOES +#define glBindVertexArray glBindVertexArrayOES + +#include "GLES2/gl2.h" +#include "GLES2/gl2ext.h" -NS_CC_END +#endif // __PLATFOMR_CCGL_H__ diff --git a/cocos2dx/platform/win32/CCImage_win32.cpp b/cocos2dx/platform/win32/CCImage.cpp similarity index 99% rename from cocos2dx/platform/win32/CCImage_win32.cpp rename to cocos2dx/platform/win32/CCImage.cpp index e33887f880..93ca901bfe 100644 --- a/cocos2dx/platform/win32/CCImage_win32.cpp +++ b/cocos2dx/platform/win32/CCImage.cpp @@ -21,6 +21,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#define __CC_PLATFORM_IMAGE_CPP__ +#include "CCImageCommon_cpp.h" NS_CC_BEGIN diff --git a/cocos2dx/platform/win32/CCPlatformDefine.h b/cocos2dx/platform/win32/CCPlatformDefine.h new file mode 100644 index 0000000000..472bb9f4df --- /dev/null +++ b/cocos2dx/platform/win32/CCPlatformDefine.h @@ -0,0 +1,26 @@ +#ifndef __CCPLATFORMDEFINE_H__ +#define __CCPLATFORMDEFINE_H__ + + +#if defined(_USRDLL) + #define CC_DLL __declspec(dllexport) +#else /* use a DLL library */ + #define CC_DLL __declspec(dllimport) +#endif + +#include +#define CC_ASSERT(cond) assert(cond) +#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam + +/* Define NULL pointer value */ +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + + +#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos2dx/proj.ios/libcocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id b/cocos2dx/proj.ios/libcocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id index 6cf7f8e732..c59752cd2c 100644 --- a/cocos2dx/proj.ios/libcocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/cocos2dx/proj.ios/libcocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -1ff6aa7eb0f4aaec98e1cd7655f5794b78a60bb5 \ No newline at end of file +e9d68567e9d01d8eda8e981ab8a8d1fe12fd8a0b \ No newline at end of file diff --git a/cocos2dx/proj.win32/cocos2d-win32.vcproj b/cocos2dx/proj.win32/cocos2d-win32.vcproj index f369b4b117..99463be24c 100644 --- a/cocos2dx/proj.win32/cocos2d-win32.vcproj +++ b/cocos2dx/proj.win32/cocos2d-win32.vcproj @@ -42,7 +42,7 @@ + + + + + + + + + + + + + + + + + + + + @@ -231,18 +271,34 @@ RelativePath="..\cocoa\CCObject.cpp" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -683,14 +459,26 @@ RelativePath="..\label_nodes\CCLabelAtlas.cpp" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - @@ -803,30 +631,22 @@ RelativePath="..\platform\CCEGLViewProtocol.h" > - - - - - - + + @@ -871,27 +691,47 @@ Name="win32" > + + + + + + + + + + @@ -903,26 +743,50 @@ RelativePath="..\sprite_nodes\CCAnimation.cpp" > + + + + + + + + + + + + + + @@ -1043,18 +911,34 @@ RelativePath="..\textures\CCTexture2D.cpp" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1416,14 +1440,26 @@ RelativePath="..\CCDirector.cpp" > + + + + + + diff --git a/cocos2dx/include/CCScriptSupport.h b/cocos2dx/script_support/CCScriptSupport.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCScriptSupport.h rename to cocos2dx/script_support/CCScriptSupport.h diff --git a/cocos2dx/include/CCGLProgram.h b/cocos2dx/shaders/CCGLProgram.h similarity index 100% rename from cocos2dx/include/CCGLProgram.h rename to cocos2dx/shaders/CCGLProgram.h diff --git a/cocos2dx/include/CCShaderCache.h b/cocos2dx/shaders/CCShaderCache.h similarity index 100% rename from cocos2dx/include/CCShaderCache.h rename to cocos2dx/shaders/CCShaderCache.h diff --git a/cocos2dx/include/ccGLStateCache.h b/cocos2dx/shaders/ccGLStateCache.h similarity index 99% rename from cocos2dx/include/ccGLStateCache.h rename to cocos2dx/shaders/ccGLStateCache.h index da25d503a6..d920c0b3f5 100644 --- a/cocos2dx/include/ccGLStateCache.h +++ b/cocos2dx/shaders/ccGLStateCache.h @@ -28,6 +28,7 @@ THE SOFTWARE. #define __CCGLSTATE_H__ #include "CCGL.h" +#include "CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos2dx/include/ccShaders.h b/cocos2dx/shaders/ccShaders.h similarity index 98% rename from cocos2dx/include/ccShaders.h rename to cocos2dx/shaders/ccShaders.h index a4850cb2b5..834d1393db 100644 --- a/cocos2dx/include/ccShaders.h +++ b/cocos2dx/shaders/ccShaders.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __CCSHADER_H__ #include "CCGL.h" +#include "CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos2dx/include/CCAnimation.h b/cocos2dx/sprite_nodes/CCAnimation.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAnimation.h rename to cocos2dx/sprite_nodes/CCAnimation.h diff --git a/cocos2dx/include/CCAnimationCache.h b/cocos2dx/sprite_nodes/CCAnimationCache.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCAnimationCache.h rename to cocos2dx/sprite_nodes/CCAnimationCache.h diff --git a/cocos2dx/include/CCSprite.h b/cocos2dx/sprite_nodes/CCSprite.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCSprite.h rename to cocos2dx/sprite_nodes/CCSprite.h diff --git a/cocos2dx/include/CCSpriteBatchNode.h b/cocos2dx/sprite_nodes/CCSpriteBatchNode.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCSpriteBatchNode.h rename to cocos2dx/sprite_nodes/CCSpriteBatchNode.h diff --git a/cocos2dx/include/CCSpriteFrame.h b/cocos2dx/sprite_nodes/CCSpriteFrame.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCSpriteFrame.h rename to cocos2dx/sprite_nodes/CCSpriteFrame.h diff --git a/cocos2dx/include/CCSpriteFrameCache.h b/cocos2dx/sprite_nodes/CCSpriteFrameCache.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCSpriteFrameCache.h rename to cocos2dx/sprite_nodes/CCSpriteFrameCache.h diff --git a/cocos2dx/include/CCPointExtension.h b/cocos2dx/support/CCPointExtension.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCPointExtension.h rename to cocos2dx/support/CCPointExtension.h diff --git a/cocos2dx/support/CCUserDefault.cpp b/cocos2dx/support/CCUserDefault.cpp index e4c96e662f..927a4371e0 100644 --- a/cocos2dx/support/CCUserDefault.cpp +++ b/cocos2dx/support/CCUserDefault.cpp @@ -22,16 +22,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCUserDefault.h" +#include "CCCommon.h" #include "platform/CCFileUtils.h" - -//#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) #include #include -//#else -//#include -//#include -//#endif - // root name of xml #define USERDEFAULT_ROOT_NAME "userDefaultRoot" diff --git a/cocos2dx/include/CCUserDefault.h b/cocos2dx/support/CCUserDefault.h old mode 100755 new mode 100644 similarity index 99% rename from cocos2dx/include/CCUserDefault.h rename to cocos2dx/support/CCUserDefault.h index e5c8c3f6dd..148f4c4677 --- a/cocos2dx/include/CCUserDefault.h +++ b/cocos2dx/support/CCUserDefault.h @@ -25,10 +25,8 @@ THE SOFTWARE. #define __SUPPORT_CCUSERDEFAULT_H__ #include "CCPlatformMacros.h" - #include - NS_CC_BEGIN /** diff --git a/cocos2dx/include/CCIMEDelegate.h b/cocos2dx/text_input_node/CCIMEDelegate.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCIMEDelegate.h rename to cocos2dx/text_input_node/CCIMEDelegate.h diff --git a/cocos2dx/include/CCIMEDispatcher.h b/cocos2dx/text_input_node/CCIMEDispatcher.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCIMEDispatcher.h rename to cocos2dx/text_input_node/CCIMEDispatcher.h diff --git a/cocos2dx/include/CCTextFieldTTF.h b/cocos2dx/text_input_node/CCTextFieldTTF.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTextFieldTTF.h rename to cocos2dx/text_input_node/CCTextFieldTTF.h diff --git a/cocos2dx/include/CCTexture2D.h b/cocos2dx/textures/CCTexture2D.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTexture2D.h rename to cocos2dx/textures/CCTexture2D.h diff --git a/cocos2dx/include/CCTextureAtlas.h b/cocos2dx/textures/CCTextureAtlas.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTextureAtlas.h rename to cocos2dx/textures/CCTextureAtlas.h diff --git a/cocos2dx/include/CCTextureCache.h b/cocos2dx/textures/CCTextureCache.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTextureCache.h rename to cocos2dx/textures/CCTextureCache.h diff --git a/cocos2dx/include/CCTexturePVR.h b/cocos2dx/textures/CCTexturePVR.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTexturePVR.h rename to cocos2dx/textures/CCTexturePVR.h diff --git a/cocos2dx/include/CCParallaxNode.h b/cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCParallaxNode.h rename to cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h diff --git a/cocos2dx/include/CCTMXLayer.h b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTMXLayer.h rename to cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h diff --git a/cocos2dx/include/CCTMXObjectGroup.h b/cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTMXObjectGroup.h rename to cocos2dx/tileMap_parallax_nodes/CCTMXObjectGroup.h diff --git a/cocos2dx/include/CCTMXTiledMap.h b/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTMXTiledMap.h rename to cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h diff --git a/cocos2dx/include/CCTMXXMLParser.h b/cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTMXXMLParser.h rename to cocos2dx/tileMap_parallax_nodes/CCTMXXMLParser.h diff --git a/cocos2dx/include/CCTileMapAtlas.h b/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTileMapAtlas.h rename to cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h diff --git a/cocos2dx/include/CCTouch.h b/cocos2dx/touch_dispatcher/CCTouch.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTouch.h rename to cocos2dx/touch_dispatcher/CCTouch.h diff --git a/cocos2dx/include/CCTouchDelegateProtocol.h b/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTouchDelegateProtocol.h rename to cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h diff --git a/cocos2dx/include/CCTouchDispatcher.h b/cocos2dx/touch_dispatcher/CCTouchDispatcher.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTouchDispatcher.h rename to cocos2dx/touch_dispatcher/CCTouchDispatcher.h diff --git a/cocos2dx/include/CCTouchHandler.h b/cocos2dx/touch_dispatcher/CCTouchHandler.h old mode 100755 new mode 100644 similarity index 100% rename from cocos2dx/include/CCTouchHandler.h rename to cocos2dx/touch_dispatcher/CCTouchHandler.h diff --git a/tests/proj.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id b/tests/proj.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id index 77a5c7873f..757cabf91a 100644 --- a/tests/proj.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/tests/proj.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -5ba0d5201d4d8a46cb610cf9e9e0e3d8fcb5bb3c \ No newline at end of file +941978c520f1726cf972dfa50fcfee7f72769685 \ No newline at end of file diff --git a/tests/proj.win32/test.win32.vcproj b/tests/proj.win32/test.win32.vcproj index 0287b2dd54..b8b7e9649b 100644 --- a/tests/proj.win32/test.win32.vcproj +++ b/tests/proj.win32/test.win32.vcproj @@ -41,7 +41,7 @@