mirror of https://github.com/axmolengine/axmol.git
Merge pull request #868 from dumganhar/iss1188_dir
issue #1188: Refactor directories, compile successfully on ios, android and win32(vs2008 debug).
This commit is contained in:
commit
b5c84aff38
|
@ -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)
|
||||
|
|
|
@ -1 +1 @@
|
|||
97caf44d91d679d65cd39a8dfc4378df7694d735
|
||||
7dc2eddab8c675364c06b0818030b2ed1792ca81
|
|
@ -41,7 +41,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)cocos2dx\platform";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\kazmath\include";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";..\Classes"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\actions";"$(SolutionDir)cocos2dx\base_nodes";"$(SolutionDir)cocos2dx\cocoa";"$(SolutionDir)cocos2dx\effects";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx\kazmath\include";"$(SolutionDir)cocos2dx\keypad_dispatcher";"$(SolutionDir)cocos2dx\label_nodes";"$(SolutionDir)cocos2dx\layers_scenes_transitions_nodes";"$(SolutionDir)cocos2dx\menu_nodes";"$(SolutionDir)cocos2dx\misc_nodes";"$(SolutionDir)cocos2dx\particle_nodes";"$(SolutionDir)cocos2dx\script_support";"$(SolutionDir)cocos2dx\shaders";"$(SolutionDir)cocos2dx\sprite_nodes";"$(SolutionDir)cocos2dx\support";"$(SolutionDir)cocos2dx\text_input_node";"$(SolutionDir)cocos2dx\textures";"$(SolutionDir)cocos2dx\tileMap_parallax_nodes";"$(SolutionDir)cocos2dx\touch_dispatcher";"$(SolutionDir)cocos2dx\platform";"$(SolutionDir)cocos2dx\platform\win32";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";..\Classes"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
|
|
@ -35,6 +35,7 @@ cocoa/CCObject.cpp \
|
|||
cocoa/CCSet.cpp \
|
||||
cocoa/CCString.cpp \
|
||||
cocoa/CCZone.cpp \
|
||||
cocoa/CCArray.cpp \
|
||||
cocos2d.cpp \
|
||||
CCDirector.cpp \
|
||||
effects/CCGrabber.cpp \
|
||||
|
@ -84,18 +85,17 @@ particle_nodes/CCParticleExamples.cpp \
|
|||
particle_nodes/CCParticleSystem.cpp \
|
||||
particle_nodes/CCParticleBatchNode.cpp \
|
||||
particle_nodes/CCParticleSystemQuad.cpp \
|
||||
platform/CCFileUtils.cpp \
|
||||
platform/CCGL.cpp \
|
||||
platform/CCImage.cpp \
|
||||
platform/CCStdC.cpp \
|
||||
platform/CCSAXParser.cpp \
|
||||
platform/CCThread.cpp \
|
||||
platform/CCCommon.cpp \
|
||||
platform/platform.cpp \
|
||||
platform/CCEGLViewProtocol.cpp \
|
||||
platform/android/CCEGLView_android.cpp \
|
||||
platform/android/CCAccelerometer_android.cpp \
|
||||
platform/android/CCApplication_android.cpp \
|
||||
platform/android/CCEGLView.cpp \
|
||||
platform/android/CCAccelerometer.cpp \
|
||||
platform/android/CCApplication.cpp \
|
||||
platform/android/CCCommon.cpp \
|
||||
platform/android/CCFileUtils.cpp \
|
||||
platform/android/CCImage.cpp \
|
||||
platform/android/jni/JniHelper.cpp \
|
||||
platform/android/jni/IMEJni.cpp \
|
||||
platform/android/jni/MessageJni.cpp \
|
||||
|
@ -113,7 +113,6 @@ sprite_nodes/CCSprite.cpp \
|
|||
sprite_nodes/CCSpriteBatchNode.cpp \
|
||||
sprite_nodes/CCSpriteFrame.cpp \
|
||||
sprite_nodes/CCSpriteFrameCache.cpp \
|
||||
support/CCArray.cpp \
|
||||
support/CCProfiling.cpp \
|
||||
support/CCPointExtension.cpp \
|
||||
support/TransformUtils.cpp \
|
||||
|
@ -141,25 +140,67 @@ touch_dispatcher/CCTouchDispatcher.cpp \
|
|||
touch_dispatcher/CCTouchHandler.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/platform \
|
||||
$(LOCAL_PATH)/kazmath/include
|
||||
|
||||
$(LOCAL_PATH)/actions \
|
||||
$(LOCAL_PATH)/base_nodes \
|
||||
$(LOCAL_PATH)/cocoa \
|
||||
$(LOCAL_PATH)/effects \
|
||||
$(LOCAL_PATH)/extensions \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/kazmath/include \
|
||||
$(LOCAL_PATH)/keypad_dispatcher \
|
||||
$(LOCAL_PATH)/label_nodes \
|
||||
$(LOCAL_PATH)/layers_scenes_transitions_nodes \
|
||||
$(LOCAL_PATH)/menu_nodes \
|
||||
$(LOCAL_PATH)/misc_nodes \
|
||||
$(LOCAL_PATH)/particle_nodes \
|
||||
$(LOCAL_PATH)/platform \
|
||||
$(LOCAL_PATH)/platform/android \
|
||||
$(LOCAL_PATH)/script_support \
|
||||
$(LOCAL_PATH)/shaders \
|
||||
$(LOCAL_PATH)/sprite_nodes \
|
||||
$(LOCAL_PATH)/support \
|
||||
$(LOCAL_PATH)/text_input_node \
|
||||
$(LOCAL_PATH)/textures \
|
||||
$(LOCAL_PATH)/tileMap_parallax_nodes \
|
||||
$(LOCAL_PATH)/touch_dispatcher
|
||||
|
||||
|
||||
LOCAL_EXPORT_LDLIBS := -llog\
|
||||
-lz \
|
||||
-lGLESv2 \
|
||||
-lEGL
|
||||
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \
|
||||
$(LOCAL_PATH)/actions \
|
||||
$(LOCAL_PATH)/base_nodes \
|
||||
$(LOCAL_PATH)/cocoa \
|
||||
$(LOCAL_PATH)/effects \
|
||||
$(LOCAL_PATH)/extensions \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/kazmath/include \
|
||||
$(LOCAL_PATH)/keypad_dispatcher \
|
||||
$(LOCAL_PATH)/label_nodes \
|
||||
$(LOCAL_PATH)/layers_scenes_transitions_nodes \
|
||||
$(LOCAL_PATH)/menu_nodes \
|
||||
$(LOCAL_PATH)/misc_nodes \
|
||||
$(LOCAL_PATH)/particle_nodes \
|
||||
$(LOCAL_PATH)/platform \
|
||||
$(LOCAL_PATH)/kazmath/include
|
||||
$(LOCAL_PATH)/platform/android \
|
||||
$(LOCAL_PATH)/script_support \
|
||||
$(LOCAL_PATH)/shaders \
|
||||
$(LOCAL_PATH)/sprite_nodes \
|
||||
$(LOCAL_PATH)/support \
|
||||
$(LOCAL_PATH)/text_input_node \
|
||||
$(LOCAL_PATH)/textures \
|
||||
$(LOCAL_PATH)/tileMap_parallax_nodes \
|
||||
$(LOCAL_PATH)/touch_dispatcher
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv2 \
|
||||
-lEGL \
|
||||
-llog \
|
||||
-lz
|
||||
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := png_static_prebuilt
|
||||
LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt
|
||||
LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt
|
||||
|
|
|
@ -23,9 +23,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.
|
||||
****************************************************************************/
|
||||
|
||||
#include "cocoa/CCNS.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCNS.h"
|
||||
#include "CCScene.h"
|
||||
#include "CCArray.h"
|
||||
#include "CCScheduler.h"
|
||||
|
@ -287,7 +286,7 @@ void CCDirector::calculateDeltaTime(void)
|
|||
|
||||
// m_pobOpenGLView
|
||||
|
||||
void CCDirector::setOpenGLView(CC_GLVIEW *pobOpenGLView)
|
||||
void CCDirector::setOpenGLView(CCEGLView *pobOpenGLView)
|
||||
{
|
||||
CCAssert(pobOpenGLView, "opengl view should not be null");
|
||||
|
||||
|
@ -357,7 +356,7 @@ void CCDirector::setProjection(ccDirectorProjection kProjection)
|
|||
// reset the viewport if 3d proj & retina display
|
||||
if( CC_CONTENT_SCALE_FACTOR() != 1.0f )
|
||||
{
|
||||
glViewport(-size.width/2, -size.height/2, size.width * CC_CONTENT_SCALE_FACTOR(), size.height * CC_CONTENT_SCALE_FACTOR() );
|
||||
glViewport((GLint)-size.width/2, (GLint)-size.height/2, (GLsizei)(size.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(size.height * CC_CONTENT_SCALE_FACTOR()) );
|
||||
}
|
||||
|
||||
float zeye = this->getZEye();
|
||||
|
|
|
@ -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;
|
0
cocos2dx/include/CCDrawingPrimitives.h → cocos2dx/CCDrawingPrimitives.h
Executable file → Normal file
0
cocos2dx/include/CCDrawingPrimitives.h → cocos2dx/CCDrawingPrimitives.h
Executable file → Normal file
|
@ -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
|
||||
|
|
@ -27,6 +27,7 @@ THE SOFTWARE.
|
|||
#include "CCNode.h"
|
||||
#include "CCCamera.h"
|
||||
#include "CCStdC.h"
|
||||
#include "CCZone.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
//
|
||||
|
|
1
cocos2dx/include/CCActionCamera.h → cocos2dx/actions/CCActionCamera.h
Executable file → Normal file
1
cocos2dx/include/CCActionCamera.h → cocos2dx/actions/CCActionCamera.h
Executable file → Normal file
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CCCAMERA_ACTION_H__
|
||||
#define __CCCAMERA_ACTION_H__
|
||||
|
||||
#include "CCActionInterval.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -31,7 +31,7 @@ THE SOFTWARE.
|
|||
*/
|
||||
|
||||
#include "CCActionEase.h"
|
||||
#include "CCObject.h"
|
||||
#include "CCZone.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
#include "CCActionGrid3D.h"
|
||||
#include "CCPointExtension.h"
|
||||
#include "CCDirector.h"
|
||||
|
||||
#include "CCZone.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
0
cocos2dx/include/CCActionGrid3D.h → cocos2dx/actions/CCActionGrid3D.h
Executable file → Normal file
0
cocos2dx/include/CCActionGrid3D.h → cocos2dx/actions/CCActionGrid3D.h
Executable file → Normal file
|
@ -27,6 +27,7 @@
|
|||
#include "CCActionInstant.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCSprite.h"
|
||||
#include "CCZone.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
//
|
||||
|
|
0
cocos2dx/include/CCActionInstant.h → cocos2dx/actions/CCActionInstant.h
Executable file → Normal file
0
cocos2dx/include/CCActionInstant.h → cocos2dx/actions/CCActionInstant.h
Executable file → Normal file
|
@ -30,6 +30,7 @@ THE SOFTWARE.
|
|||
#include "CCPointExtension.h"
|
||||
#include "CCStdC.h"
|
||||
#include "CCActionInstant.h"
|
||||
#include "CCZone.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
0
cocos2dx/include/CCActionInterval.h → cocos2dx/actions/CCActionInterval.h
Executable file → Normal file
0
cocos2dx/include/CCActionInterval.h → cocos2dx/actions/CCActionInterval.h
Executable file → Normal file
|
@ -26,6 +26,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCActionManager.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCScheduler.h"
|
||||
#include "ccMacros.h"
|
||||
#include "support/data_support/ccCArray.h"
|
||||
|
|
0
cocos2dx/include/CCActionManager.h → cocos2dx/actions/CCActionManager.h
Executable file → Normal file
0
cocos2dx/include/CCActionManager.h → cocos2dx/actions/CCActionManager.h
Executable file → Normal file
|
@ -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
|
||||
|
||||
|
|
0
cocos2dx/include/CCActionPageTurn3D.h → cocos2dx/actions/CCActionPageTurn3D.h
Executable file → Normal file
0
cocos2dx/include/CCActionPageTurn3D.h → cocos2dx/actions/CCActionPageTurn3D.h
Executable file → Normal file
|
@ -24,6 +24,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#include "CCActionProgressTimer.h"
|
||||
#include "CCProgressTimer.h"
|
||||
#include "CCZone.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
0
cocos2dx/include/CCActionProgressTimer.h → cocos2dx/actions/CCActionProgressTimer.h
Executable file → Normal file
0
cocos2dx/include/CCActionProgressTimer.h → cocos2dx/actions/CCActionProgressTimer.h
Executable file → Normal file
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
#include "ccMacros.h"
|
||||
#include "CCPointExtension.h"
|
||||
#include "effects/CCGrid.h"
|
||||
|
||||
#include "CCZone.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
0
cocos2dx/include/CCActionTiledGrid.h → cocos2dx/actions/CCActionTiledGrid.h
Executable file → Normal file
0
cocos2dx/include/CCActionTiledGrid.h → cocos2dx/actions/CCActionTiledGrid.h
Executable file → Normal file
0
cocos2dx/include/CCAffineTransform.h → cocos2dx/cocoa/CCAffineTransform.h
Executable file → Normal file
0
cocos2dx/include/CCAffineTransform.h → cocos2dx/cocoa/CCAffineTransform.h
Executable file → Normal file
0
cocos2dx/include/CCAutoreleasePool.h → cocos2dx/cocoa/CCAutoreleasePool.h
Executable file → Normal file
0
cocos2dx/include/CCAutoreleasePool.h → cocos2dx/cocoa/CCAutoreleasePool.h
Executable file → Normal file
|
@ -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);
|
|
@ -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__
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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"
|
|
@ -28,7 +28,6 @@ THE SOFTWARE.
|
|||
#define __CCTYPES_H__
|
||||
|
||||
#include "CCGeometry.h"
|
||||
|
||||
#include "CCGL.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
0
cocos2dx/include/CCKeypadDelegate.h → cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
Executable file → Normal file
0
cocos2dx/include/CCKeypadDelegate.h → cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
Executable file → Normal file
0
cocos2dx/include/CCKeypadDispatcher.h → cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
Executable file → Normal file
0
cocos2dx/include/CCKeypadDispatcher.h → cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
Executable file → Normal file
0
cocos2dx/include/CCLabelAtlas.h → cocos2dx/label_nodes/CCLabelAtlas.h
Executable file → Normal file
0
cocos2dx/include/CCLabelAtlas.h → cocos2dx/label_nodes/CCLabelAtlas.h
Executable file → Normal file
0
cocos2dx/include/CCLabelBMFont.h → cocos2dx/label_nodes/CCLabelBMFont.h
Executable file → Normal file
0
cocos2dx/include/CCLabelBMFont.h → cocos2dx/label_nodes/CCLabelBMFont.h
Executable file → Normal file
0
cocos2dx/include/CCLayer.h → cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
Executable file → Normal file
0
cocos2dx/include/CCLayer.h → cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
Executable file → Normal file
0
cocos2dx/include/CCScene.h → cocos2dx/layers_scenes_transitions_nodes/CCScene.h
Executable file → Normal file
0
cocos2dx/include/CCScene.h → cocos2dx/layers_scenes_transitions_nodes/CCScene.h
Executable file → Normal file
0
cocos2dx/include/CCTransition.h → cocos2dx/layers_scenes_transitions_nodes/CCTransition.h
Executable file → Normal file
0
cocos2dx/include/CCTransition.h → cocos2dx/layers_scenes_transitions_nodes/CCTransition.h
Executable file → Normal file
0
cocos2dx/include/CCTransitionPageTurn.h → cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h
Executable file → Normal file
0
cocos2dx/include/CCTransitionPageTurn.h → cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h
Executable file → Normal file
0
cocos2dx/include/CCMotionStreak.h → cocos2dx/misc_nodes/CCMotionStreak.h
Executable file → Normal file
0
cocos2dx/include/CCMotionStreak.h → cocos2dx/misc_nodes/CCMotionStreak.h
Executable file → Normal file
0
cocos2dx/include/CCProgressTimer.h → cocos2dx/misc_nodes/CCProgressTimer.h
Executable file → Normal file
0
cocos2dx/include/CCProgressTimer.h → cocos2dx/misc_nodes/CCProgressTimer.h
Executable file → Normal file
0
cocos2dx/include/CCRenderTexture.h → cocos2dx/misc_nodes/CCRenderTexture.h
Executable file → Normal file
0
cocos2dx/include/CCRenderTexture.h → cocos2dx/misc_nodes/CCRenderTexture.h
Executable file → Normal file
|
@ -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;
|
||||
|
|
24
cocos2dx/include/CCParticleExamples.h → cocos2dx/particle_nodes/CCParticleExamples.h
Executable file → Normal file
24
cocos2dx/include/CCParticleExamples.h → cocos2dx/particle_nodes/CCParticleExamples.h
Executable file → Normal file
|
@ -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(){}
|
|
@ -55,7 +55,7 @@ THE SOFTWARE.
|
|||
#include "CCDirector.h"
|
||||
#include "support/CCProfiling.h"
|
||||
// opengl
|
||||
#include "platform/CCGL.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
0
cocos2dx/include/CCParticleSystem.h → cocos2dx/particle_nodes/CCParticleSystem.h
Executable file → Normal file
0
cocos2dx/include/CCParticleSystem.h → cocos2dx/particle_nodes/CCParticleSystem.h
Executable file → Normal file
|
@ -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"
|
||||
|
|
0
cocos2dx/include/CCParticleSystemQuad.h → cocos2dx/particle_nodes/CCParticleSystemQuad.h
Executable file → Normal file
0
cocos2dx/include/CCParticleSystemQuad.h → cocos2dx/particle_nodes/CCParticleSystemQuad.h
Executable file → Normal file
0
cocos2dx/include/CCAccelerometerDelegate.h → cocos2dx/platform/CCAccelerometerDelegate.h
Executable file → Normal file
0
cocos2dx/include/CCAccelerometerDelegate.h → cocos2dx/platform/CCAccelerometerDelegate.h
Executable file → Normal file
|
@ -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__
|
|
@ -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
|
||||
|
||||
|
|
@ -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 <Windows.h>
|
||||
|
||||
#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 <android/log.h>
|
||||
#include <stdio.h>
|
||||
#include <jni.h>
|
||||
|
||||
#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 <stdio.h>
|
||||
#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 <s3e.h>
|
||||
#include "IwUtil.h"
|
||||
#include "IwUtilInitTerm.h"
|
||||
#include <IwMemBucketHelpers.h>
|
||||
#include <stdio.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);
|
||||
|
||||
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 <FBaseSys.h>
|
||||
#include <FUi.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
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 <cstdio>
|
||||
#include <cstdarg>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
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
|
|
@ -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__
|
|
@ -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)
|
|
@ -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 <GLES2/gl2platform.h>
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
// normal process
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
// 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 <GL/gl.h>
|
||||
#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 <IwGL.h>
|
||||
#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 <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
#endif
|
||||
|
||||
#endif // __PLATFOMR_CCGL_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
|
|
@ -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 <assert.h>
|
||||
#define CC_ASSERT(cond) assert(cond)
|
||||
#else
|
||||
// bada platform
|
||||
|
||||
#include <FBaseConfig.h>
|
||||
#include <FBaseSys.h>
|
||||
|
||||
#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 <stdio.h>
|
||||
|
||||
#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__
|
||||
|
|
|
@ -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 <stdio.h>
|
||||
#include <android/log.h>
|
31
cocos2dx/include/CCEGLView.h → cocos2dx/platform/android/CCCommon.cpp
Executable file → Normal file
31
cocos2dx/include/CCEGLView.h → cocos2dx/platform/android/CCCommon.cpp
Executable file → Normal file
|
@ -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 <android/log.h>
|
||||
#include <stdio.h>
|
||||
#include <jni.h>
|
||||
#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
|
|
@ -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"
|
|
@ -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"
|
|
@ -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 <GLES2/gl2platform.h>
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
#endif // __CC_APPLICATION_PLATFORM_H__
|
||||
// normal process
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
// 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__
|
|
@ -24,6 +24,9 @@ THE SOFTWARE.
|
|||
|
||||
//#define COCOS2D_DEBUG 1
|
||||
|
||||
#define __CC_PLATFORM_IMAGE_CPP__
|
||||
#include "CCImageCommon_cpp.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <string.h>
|
||||
#include <jni.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__*/
|
|
@ -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 <android/log.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#import "CCApplication_ios.h"
|
||||
#import "CCApplication.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
|
@ -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"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue