Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3

Conflicts:
	cocos/network/HttpAsynConnection-apple.m
	cocos/network/HttpClient-android.cpp
	cocos/network/HttpClient.cpp
	cocos/network/HttpCookie.h
	cocos/network/HttpRequest.h
	cocos/network/HttpResponse.h
	cocos/network/SocketIO.cpp
	cocos/network/WebSocket.h
This commit is contained in:
pandamicro 2016-05-25 19:19:27 +08:00
commit 8692ee176c
662 changed files with 32855 additions and 22532 deletions

5
.gitignore vendored
View File

@ -40,6 +40,7 @@ Generated Files
AppPackages AppPackages
BundleArtifacts BundleArtifacts
.vs/ .vs/
*.VC.db
# Ignore files build by ndk and eclipse # Ignore files build by ndk and eclipse
libs/ libs/
@ -149,3 +150,7 @@ tests/cpp-tests/Resources/audio
/*/*/*/prebuilt-mk/Android.mk /*/*/*/prebuilt-mk/Android.mk
/*/*/*/*/prebuilt-mk/Android.mk /*/*/*/*/prebuilt-mk/Android.mk
*.xcscmblueprint *.xcscmblueprint
tests/cpp-empty-test/proj.tizen/res/
tests/cpp-tests/proj.tizen/res/
tests/lua-empty-test/project/proj.tizen/res/
tests/lua-tests/project/proj.tizen/res/

View File

@ -37,4 +37,4 @@ before_install:
# whitelist # whitelist
branches: branches:
only: only:
- v3 - v3.11

View File

@ -1,11 +1,10 @@
cocos2d-x-3.11 ?? 2016 cocos2d-x-3.11 May 11 2016
[REFINE] add optional alpha parameter to Color4B and Color4F constructors
cocos2d-x-3.11 Apr ? 2016
[HIGHLIGHT] Physics: upgrade chipmunk to v7.0.1 [HIGHLIGHT] Physics: upgrade chipmunk to v7.0.1
[HIGHLIGHT] JS: new memory model, don't have to use retain/release in JS [HIGHLIGHT] JS: new memory model, don't have to use retain/release in JS
[HIGHLIGHT] Curl: upgrade to v7.48
[HIGHLIGHT] OpenSSL: upgrade to 1.0.2g
[HIGHLIGHT] JS: can use Firefox 30+ and VSCode to debug cocos2d-x JSB programs
[NEW] JS: web console is enabled debugging JSB projects via firefox [NEW] JS: web console is enabled debugging JSB projects via firefox
[NEW] UI: add a setter for touch total time threshold in ScrollView [NEW] UI: add a setter for touch total time threshold in ScrollView
@ -26,14 +25,22 @@ cocos2d-x-3.11 Apr ? 2016
[REFINE] Renderer: TriangleCommand and QuadCommand are merged [REFINE] Renderer: TriangleCommand and QuadCommand are merged
[REFINE] 2D: SpriteFrameCache takes pixelFormat into account if specified [REFINE] 2D: SpriteFrameCache takes pixelFormat into account if specified
[REFINE] UI: let ScrollView swallow touch events by default [REFINE] UI: let ScrollView swallow touch events by default
[REFINE] JSB: make selectedSprite optional
[FIX] JS: firefox v30+ can not debug cocos2d-x JSB projects [FIX] JS: firefox v30+ can not debug cocos2d-x JSB projects
[FIX] UI: can not get event when PageView was turning [FIX] UI: can not get event when PageView was turning
[FIX] UI: bitmap font sizes are not loaded from binary .fnt files [FIX] UI: bitmap font sizes are not loaded from binary .fnt files
[FIX] 2D: TargetedAction::isDone() always return false [FIX] UI: some fonts were rendered incorreclty
[FIX] 2D: some fonts were rendered incorreclty [FIX] Action: TargetedAction::isDone() always return false
[FIX] Action: Repeat: will run actions more than speicific times, instant action will run one frame later
[FIX] 2D: drawing in incorrect app state on iOS [FIX] 2D: drawing in incorrect app state on iOS
[FIX] 2D: FileUtils::getValueVectorFromFile() returns wrong value on iOS and Mac [FIX] Platform: FileUtils::getValueVectorFromFile() returns wrong value on iOS and Mac
[FIX] Network: downloader crashed when storage path contains spaces on iOS
[FIX] Network: downloader may crash on Android
[FIX] HTTPAsyncConnection: crash when custom SSL certification is set on iOS
[FIX] AssetsManagerEX: will stuck at UPDATING forever if last task fails
[FIX] AssetsManagerEX: may repeatly update some assets and cause file write conflict
[FIX] Lua: fix display.wrapScene()
cocos2d-x-3.10 Jan 11 2016 cocos2d-x-3.10 Jan 11 2016

View File

@ -41,60 +41,19 @@ project (Cocos2d-X)
# The version number # The version number
set(COCOS2D_X_VERSION 3.11) set(COCOS2D_X_VERSION 3.11)
# define some variables
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
include(CocosBuildHelpers) set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
# architecture
message(${BUILDING_STRING}) if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_DIR "64-bit")
set(USE_WEBP_DEFAULT ON) elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
if(WINRT OR WP8) set(ARCH_DIR "32-bit")
set(USE_WEBP_DEFAULT OFF) else()
message(FATAL_ERROR "Unsupported architecture, CMake will exit")
return()
endif() endif()
set(USE_PREBUILT_LIBS_DEFAULT ON)
if(MINGW)
set(USE_PREBUILT_LIBS_DEFAULT OFF)
endif()
set(BUILD_CPP_EMPTY_TEST_DEFAULT ON)
set(BUILD_CPP_TESTS_DEFAULT ON)
set(BUILD_LUA_LIBS_DEFAULT ON)
set(BUILD_LUA_TESTS_DEFAULT ON)
set(BUILD_JS_LIBS_DEFAULT ON)
set(BUILD_JS_TESTS_DEFAULT ON)
# TODO: fix test samples for MSVC
if(MSVC)
set(BUILD_CPP_EMPTY_TEST_DEFAULT OFF)
set(BUILD_CPP_TESTS_DEFAULT OFF)
set(BUILD_LUA_LIBS_DEFAULT OFF)
set(BUILD_LUA_TESTS_DEFAULT OFF)
set(BUILD_JS_LIBS_DEFAULT OFF)
set(BUILD_JS_TESTS_DEFAULT OFF)
endif()
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
option(USE_BOX2D "Use box2d for physics library" OFF)
option(USE_BULLET "Use bullet for physics3d library" ON)
option(USE_RECAST "Use Recast for navigation mesh" ON)
option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT})
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(DEBUG_MODE "Debug or release?" ON)
option(BUILD_EXTENSIONS "Build extension library" ON)
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON)
option(BUILD_CPP_TESTS "Build TestCpp samples" ${BUILD_CPP_TESTS_DEFAULT})
option(BUILD_CPP_EMPTY_TEST "Build TestCpp samples" ${BUILD_CPP_EMPTY_TEST_DEFAULT})
option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT})
option(BUILD_LUA_TESTS "Build TestLua samples" ${BUILD_LUA_TESTS_DEFAULT})
option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT})
option(BUILD_JS_TESTS "Build TestJS samples" ${BUILD_JS_TESTS_DEFAULT})
option(USE_PREBUILT_LIBS "Use prebuilt libraries in external directory" ${USE_PREBUILT_LIBS_DEFAULT})
if(USE_PREBUILT_LIBS AND MINGW)
message(FATAL_ERROR "Prebuilt windows libs can't be used with mingw, please use packages.")
endif()
# CMAKE_BUILD_TYPE has precedence over DEBUG_MODE # CMAKE_BUILD_TYPE has precedence over DEBUG_MODE
# Still supporting DEBUG_MODE for backwards compatibility # Still supporting DEBUG_MODE for backwards compatibility
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
@ -105,259 +64,32 @@ if (NOT CMAKE_BUILD_TYPE)
endif(DEBUG_MODE) endif(DEBUG_MODE)
endif(NOT CMAKE_BUILD_TYPE) endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCOCOS2D_DEBUG=1") include(CocosBuildHelpers)
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
# Compiler options message(${BUILDING_STRING})
if(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
-wd4514 -wd4056 -wd4996 -wd4099)
# Use inline debug info (/Z7) format. Or internal error may occur. # SelectModule() is a macro to select building modules
# Errors looks like: "xmemory0(592): error C3130: Internal Compiler Error: failed to write injected code block to PDB" include(SelectModule)
foreach(lang C CXX) SelectModule()
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG}")
set(CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG} /Z7")
endforeach()
else() # set compiler options
set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -DCOCOS2D_DEBUG=1") include(SetCompilerOptions)
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) SetCompilerOptions()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
if(CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
endif(MSVC)
set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
# Some macro definitions
if(WINDOWS)
if(BUILD_SHARED_LIBS)
ADD_DEFINITIONS (-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL)
else()
ADD_DEFINITIONS (-DCC_STATIC)
endif()
ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
set(PLATFORM_FOLDER win32)
elseif(MACOSX OR APPLE)
ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
ADD_DEFINITIONS (-DUSE_FILE32API)
set(PLATFORM_FOLDER mac)
elseif(LINUX)
ADD_DEFINITIONS(-DLINUX)
set(PLATFORM_FOLDER linux)
elseif(ANDROID)
ADD_DEFINITIONS (-DUSE_FILE32API)
set(PLATFORM_FOLDER android)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -latomic")
else()
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
endif()
if(MINGW)
#add_definitions(-DGLEW_STATIC)
add_definitions(-D__SSIZE_T)
if(CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
endif()
endif()
# architecture
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set(ARCH_DIR "64-bit")
elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set(ARCH_DIR "32-bit")
else()
message( FATAL_ERROR "Unsupported architecture, CMake will exit" )
endif()
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/cocos
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cocos
${CMAKE_CURRENT_SOURCE_DIR}/deprecated ${CMAKE_CURRENT_SOURCE_DIR}/deprecated
${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform ${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform
${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_CURRENT_SOURCE_DIR}/extensions
${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/external
) )
if(USE_PREBUILT_LIBS) if(USE_PREBUILT_LIBS)
include(CocosUsePrebuiltLibs) include(CocosUsePrebuiltLibs)
endif() endif()
# desktop platforms include(BuildModules)
if(LINUX OR MACOSX OR WINDOWS) BuildModules()
cocos_find_package(OpenGL OPENGL REQUIRED)
if(LINUX OR WINDOWS)
cocos_find_package(GLEW GLEW REQUIRED)
#TODO: implement correct schema for pass cocos2d specific requirements to projects
include_directories(${GLEW_INCLUDE_DIRS})
endif()
cocos_find_package(GLFW3 GLFW3 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIRS})
if(LINUX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
cocos_find_package(FMOD FMOD REQUIRED)
cocos_find_package(Fontconfig FONTCONFIG REQUIRED)
cocos_find_package(GTK3 GTK3 REQUIRED)
endif()
if(WINDOWS)
cocos_find_package(Vorbis VORBIS REQUIRED)
cocos_find_package(MPG123 MPG123 REQUIRED)
cocos_find_package(OpenAL OPENAL REQUIRED)
# because FindOpenAL.cmake set include dir for '#include <al.h>' for portability (not for '#include <AL/al.h>'
set(OPENAL_DEFINITIONS "-DOPENAL_PLAIN_INCLUDES")
endif()
endif(LINUX OR MACOSX OR WINDOWS)
# Freetype required on all platforms
cocos_find_package(Freetype FREETYPE REQUIRED)
# WebP required if used
if(USE_WEBP)
cocos_find_package(WebP WEBP REQUIRED)
endif(USE_WEBP)
# Chipmunk
if(USE_CHIPMUNK)
if(USE_PREBUILT_LIBS)
cocos_find_package(Chipmunk CHIPMUNK REQUIRED)
endif()
add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1)
if(IOS OR MACOSX)
# without this chipmunk will try to use apple defined geometry types, that conflicts with cocos
add_definitions(-DCP_USE_CGPOINTS=0)
endif()
else(USE_CHIPMUNK)
add_definitions(-DCC_USE_PHYSICS=0)
endif(USE_CHIPMUNK)
# Box2d (not prebuilded, exists as source)
if(USE_BOX2D)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/Box2D)
set(Box2D_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/include)
set(Box2D_LIBRARIES box2d)
else()
find_package(Box2D REQUIRED CONFIG)
# actually Box2D in next line is not a library, it is target exported from Box2DConfig.cmake
set(Box2D_LIBRARIES Box2D)
endif()
message(STATUS "Box2D include dirs: ${Box2D_INCLUDE_DIRS}")
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1)
else()
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0)
endif(USE_BOX2D)
# Bullet (not prebuilded, exists as source)
if(USE_BULLET)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/bullet)
set(BULLET_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet)
set(BULLET_LIBRARIES bullet)
else()
cocos_find_package(bullet BULLET REQUIRED)
set(BULLET_LIBRARIES bullet)
endif()
message(STATUS "Bullet include dirs: ${BULLET_INCLUDE_DIRS}")
add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1)
add_definitions(-DCC_USE_PHYSICS=1)
else()
add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=0)
add_definitions(-DCC_USE_3D_PHYSICS=0)
endif(USE_BULLET)
# Recast (not prebuilded, exists as source)
if(USE_RECAST)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/recast)
set(RECAST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/recast)
set(RECAST_LIBRARIES recast)
else()
cocos_find_package(recast RECAST REQUIRED)
set(RECAST_LIBRARIES recast)
endif()
message(STATUS "Recast include dirs: ${RECAST_INCLUDE_DIRS}")
add_definitions(-DCC_USE_NAVMESH=1)
else()
add_definitions(-DCC_USE_NAVMESH=0)
endif(USE_RECAST)
# Tinyxml2 (not prebuilded, exists as source)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/tinyxml2)
set(TinyXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2)
set(TinyXML2_LIBRARIES tinyxml2)
else()
cocos_find_package(TinyXML2 TinyXML2 REQUIRED)
endif()
message(STATUS "TinyXML2 include dirs: ${TinyXML2_INCLUDE_DIRS}")
# libjpeg
cocos_find_package(JPEG JPEG REQUIRED)
cocos_find_package(ZLIB ZLIB REQUIRED)
# minizip (we try to migrate to minizip from https://github.com/nmoinvaz/minizip)
# only msys2 currently provides package for this variant, all other
# dists have packages from zlib, thats very old for us.
# moreover our embedded version modified to quick provide
# functionality needed by cocos.
if(USE_PREBUILT_LIBS OR NOT MINGW)
#TODO: hack! should be in external/unzip/CMakeLists.txt
include_directories(${ZLIB_INCLUDE_DIRS})
add_subdirectory(external/unzip)
set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip ${ZLIB_INCLUDE_DIRS})
set(MINIZIP_LIBRARIES unzip ${ZLIB_LIBRARIES})
message(STATUS "MINIZIP include dirs: ${MINIZIP_INCLUDE_DIRS}")
else()
cocos_find_package(MINIZIP MINIZIP REQUIRED)
# double check that we have needed functions
include(CheckLibraryExists)
check_library_exists(${MINIZIP_LIBRARIES} "unzGoToFirstFile2" "" MINIZIP_HAS_GOTOFIRSTFILE2)
if(NOT MINIZIP_HAS_GOTOFIRSTFILE2)
message(FATAL_ERROR "Minizip library on you system very old. Please use recent version from https://github.com/nmoinvaz/minizip or enable USE_PREBUILT_LIBS")
endif()
add_definitions(-DMINIZIP_FROM_SYSTEM)
endif()
cocos_find_package(PNG PNG REQUIRED)
cocos_find_package(TIFF TIFF REQUIRED)
cocos_find_package(WEBSOCKETS WEBSOCKETS REQUIRED)
cocos_find_package(CURL CURL REQUIRED)
# flatbuffers
if(USE_PREBUILT_LIBS)
add_subdirectory(external/flatbuffers)
set(FLATBUFFERS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external)
message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}")
else()
cocos_find_package(flatbuffers flatbuffers REQUIRED)
endif()
# xxhash
if(USE_PREBUILT_LIBS)
add_subdirectory(external/xxhash)
set(XXHASH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/xxhash)
set(XXHASH_LIBRARIES xxhash)
else()
cocos_find_package(xxhash xxhash REQUIRED)
endif()
# libcocos2d.a
add_subdirectory(cocos)
# build cpp-empty-test # build cpp-empty-test
if(BUILD_CPP_EMPTY_TEST) if(BUILD_CPP_EMPTY_TEST)

File diff suppressed because it is too large Load Diff

975
build/tizen/.cproject Normal file
View File

@ -0,0 +1,975 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.tizen.nativecore.NativeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="cocos2dx" buildArtefactType="org.tizen.nativecore.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.lib.debug">
<folderInfo id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909." name="/" resourcePath="">
<toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.lib.debug.1058948864" name="Tizen Core Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1917154358" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
<builder autoBuildTarget="all" buildPath="${workspace_loc:/libcocos2dx}/Debug" enableAutoBuild="false" id="org.tizen.nativecore.target.sbi.gnu.builder.1324275630" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.tizen.nativecore.target.sbi.gnu.builder">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool command="arm-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.111378497" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
<tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1192678710" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.1795635207" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.debugging.level.core.755789665" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.2080204225" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-device.core_gcc49.armel.core.staticLib"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.402804074" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.78316533" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-mthumb"/>
</option>
<option id="gnu.cpp.compiler.option.include.paths.2085102509" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/bullet}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/Box2D}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/extensions}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/jpeg/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxhash}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/websockets/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks.core.1072548352" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.cpp.compiler.option.preprocessor.def.1822971437" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="CC_ENABLE_BULLET_INTEGRATION"/>
<listOptionValue builtIn="false" value="CC_USE_3D_PHYSICS"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
<listOptionValue builtIn="false" value="_DEBUG"/>
<listOptionValue builtIn="false" value="USE_MINICL"/>
</option>
<option id="gnu.cpp.compiler.option.dialect.std.1640297893" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.misc.pic.core.814244042" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.warnings.allwarn.2011421402" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1379131477"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.912473507" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.85030265" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.977128313" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.debugging.level.core.1582609268" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.1240985229" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-device.core_gcc49.armel.core.staticLib"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_inc.core.200190354" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.2120964296" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-mthumb"/>
</option>
<option id="gnu.c.compiler.option.include.paths.223810905" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/jpeg/include/tizen}&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks.core.683593138" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.418237079" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
<listOptionValue builtIn="false" value="_DEBUG"/>
</option>
<option id="gnu.c.compiler.option.dialect.std.1434979666" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.misc.pic.core.812466775" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.allwarn.1076719763" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.c.compiler.tizen.inputType.176288026"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1402861048" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1220871656" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
<tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.721251534" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker">
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.915780918" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
<listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/>
</option>
<option id="gnu.cpp.link.option.paths.990744263" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
</option>
</tool>
<tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1441046627" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
<option id="gnu.both.asm.option.include.paths.2125079002" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1225421527" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="org.tizen.nativecore.tool.sbi.po.compiler.1609364116" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
<tool id="org.tizen.nativecore.tool.sbi.edc.compiler.358380890" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.360068670" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.cpp.1678244492" name="C++ FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen.cpp"/>
<tool id="org.tizen.nativecore.tool.ast.880964402" name="C Static Analyzer" superClass="org.tizen.nativecore.tool.ast"/>
<tool id="org.tizen.nativecore.tool.ast.cpp.1417980081" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/>
<tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.1923963860" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="network/CCDownloader-android.cpp|network/HttpClient-android.cpp" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="extensions"/>
<entry excluding="bullet/BulletMultiThreaded/GpuSoftBodySolvers" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="external"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="org.tizen.nativecore.config.sbi.gcc45.lib.release.1390671773">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecore.config.sbi.gcc45.lib.release.1390671773" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.tizen.nativecore.NativeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="cocos2dx" buildArtefactType="org.tizen.nativecore.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.lib.release.1390671773" name="Release" parent="org.tizen.nativecore.config.sbi.gcc45.lib.release">
<folderInfo id="org.tizen.nativecore.config.sbi.gcc45.lib.release.1390671773." name="/" resourcePath="">
<toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.lib.release.1153757351" name="Tizen Core Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.lib.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.241740618" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
<builder buildPath="${workspace_loc:/libcocos2dx}/Release" id="org.tizen.nativecore.target.sbi.gnu.builder.1315412805" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" parallelBuildOn="true" parallelizationNumber="7" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/>
<tool command="arm-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.356704776" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
<tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.650668146" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.793329258" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.debugging.level.core.1888794748" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.2132639541" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-device.core_gcc49.armel.core.staticLib"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1213582958" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.1450970449" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-mthumb"/>
</option>
<option id="gnu.cpp.compiler.option.include.paths.693014654" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/bullet}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/Box2D}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/extensions}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/jpeg/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxhash}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/websockets/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks.core.666062841" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.cpp.compiler.option.preprocessor.def.2108436448" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CC_ENABLE_BULLET_INTEGRATION"/>
<listOptionValue builtIn="false" value="CC_USE_3D_PHYSICS"/>
<listOptionValue builtIn="false" value="USE_MINICL"/>
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
</option>
<option id="gnu.cpp.compiler.option.dialect.std.1527288287" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.misc.pic.core.749524955" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.warnings.allwarn.1092939666" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1887959397"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1900511771" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.1598717447" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.598078310" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.debugging.level.core.138130928" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.929146647" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-device.core_gcc49.armel.core.staticLib"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1556056641" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.1764369277" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-mthumb"/>
</option>
<option id="gnu.c.compiler.option.include.paths.2014757294" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/jpeg/include/tizen}&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks.core.1541534724" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.c.compiler.option.dialect.std.45917009" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.741638519" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
</option>
<option id="sbi.gnu.c.compiler.option.misc.pic.core.1893226271" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.allwarn.2022888530" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.c.compiler.tizen.inputType.1454335070"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.265441794" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.80630159" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
<tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1921625612" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker">
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.1811884059" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
<listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/>
</option>
<option id="gnu.cpp.link.option.paths.106515496" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
</option>
</tool>
<tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.706009162" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.193938562" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="org.tizen.nativecore.tool.sbi.po.compiler.948785896" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
<tool id="org.tizen.nativecore.tool.sbi.edc.compiler.66733304" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.1269775735" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.cpp.1974729469" name="C++ FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen.cpp"/>
<tool id="org.tizen.nativecore.tool.ast.1086825526" name="C Static Analyzer" superClass="org.tizen.nativecore.tool.ast"/>
<tool id="org.tizen.nativecore.tool.ast.cpp.314379569" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/>
<tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.46749639" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="network/CCDownloader-android.cpp|network/HttpClient-android.cpp" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="extensions"/>
<entry excluding="bullet/BulletMultiThreaded/GpuSoftBodySolvers" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="external"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909.1736948835">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909.1736948835" moduleId="org.eclipse.cdt.core.settings" name="Emulator">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.tizen.nativecore.NativeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="cocos2dx" buildArtefactType="org.tizen.nativecore.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909.1736948835" name="Emulator" parent="org.tizen.nativecore.config.sbi.gcc45.lib.debug">
<folderInfo id="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909.1736948835." name="/" resourcePath="">
<toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.lib.debug.2045202119" name="Tizen Core Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.708502179" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
<builder autoBuildTarget="all" buildPath="${workspace_loc:/libcocos2dx}/Debug" enableAutoBuild="false" id="org.tizen.nativecore.target.sbi.gnu.builder.636675337" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.tizen.nativecore.target.sbi.gnu.builder">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool command="i386-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.549482395" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
<tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.267963460" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.1973675719" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.debugging.level.core.1333727763" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.1988169721" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-emulator.core_gcc49.i386.core.staticLib"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1541588710" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.1899054803" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.include.paths.1494054141" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/bullet}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/extensions}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/jpeg/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxhash}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/websockets/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
</option>
<option id="sbi.gnu.cpp.compiler.option.frameworks.core.1074731372" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.cpp.compiler.option.preprocessor.def.132413730" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="CC_ENABLE_BULLET_INTEGRATION"/>
<listOptionValue builtIn="false" value="CC_USE_3D_PHYSICS"/>
<listOptionValue builtIn="false" value="USE_MINICL"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
<listOptionValue builtIn="false" value="_DEBUG"/>
</option>
<option id="gnu.cpp.compiler.option.dialect.std.1074859780" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
<option id="sbi.gnu.cpp.compiler.option.misc.pic.core.810251121" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.warnings.allwarn.361229427" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1379131477.2118627262"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.289990907" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="i386-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.682612154" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1415283024" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.debugging.level.core.1132396016" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.2095729090" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
<listOptionValue builtIn="false" value="mobile-2.4-emulator.core_gcc49.i386.core.staticLib"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1794796378" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-x-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/e_dbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ewebkit2-0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.1625481993" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
</option>
<option id="gnu.c.compiler.option.include.paths.1938147790" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/edtaa3func}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/unzip}&quot;"/>
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/ConvertUTF}&quot;"/>
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/webp/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cocos/editor-support}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/xxtea}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tiff/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/json}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external/tinyxml2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/external}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/png/include/tizen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/libcocos2dx/external/jpeg/include/tizen}&quot;"/>
</option>
<option id="sbi.gnu.c.compiler.option.frameworks.core.705978973" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" valueType="userObjs">
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.440341544" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="TIZEN"/>
<listOptionValue builtIn="false" value="HAVE_PTHREAD=1"/>
<listOptionValue builtIn="false" value="_DEBUG"/>
</option>
<option id="gnu.c.compiler.option.dialect.std.1722492206" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
<option id="sbi.gnu.c.compiler.option.misc.pic.core.1497432168" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.allwarn.1207054760" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="sbi.gnu.c.compiler.tizen.inputType.176288026.69723678"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.276153400" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.154958868" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
<tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1796310884" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker">
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.1181541846" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList">
<listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/>
<listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
<listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
<listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/>
</option>
<option id="gnu.cpp.link.option.paths.852250486" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
</option>
</tool>
<tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.413311545" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
<option id="gnu.both.asm.option.include.paths.2060573887" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.147071465" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="org.tizen.nativecore.tool.sbi.po.compiler.1793815256" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
<tool id="org.tizen.nativecore.tool.sbi.edc.compiler.1473084150" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.1794099272" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
<tool id="org.tizen.nativecore.tool.fnmapgen.cpp.1868680475" name="C++ FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen.cpp"/>
<tool id="org.tizen.nativecore.tool.ast.735994311" name="C Static Analyzer" superClass="org.tizen.nativecore.tool.ast"/>
<tool id="org.tizen.nativecore.tool.ast.cpp.1593701178" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/>
<tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.1810383019" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="network/CCDownloader-android.cpp|network/HttpClient-android.cpp" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="extensions"/>
<entry excluding="bullet/BulletMultiThreaded/GpuSoftBodySolvers" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="external"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="libcocos2dx.org.tizen.nativecore.target.sbi.gcc45.lib.2049268012" name="Tizen Core Static Library" projectType="org.tizen.nativecore.target.sbi.gcc45.lib"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="org.tizen.nativecore.config.sbi.gcc45.lib.release.1390671773">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.tizen.nativecore.config.sbi.gcc45.lib.debug.1482968909">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Emulator"/>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/libcocos2dx"/>
</configuration>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/libcocos2dx"/>
</configuration>
</storageModule>
<storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
</cproject>

4
build/tizen/.exportMap Normal file
View File

@ -0,0 +1,4 @@
{
global: main;
local: *;
};

3
build/tizen/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/SA_Report
/Emulator
/res

301
build/tizen/.project Normal file
View File

@ -0,0 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>libcocos2dx</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.tizen.nativecore.apichecker.apicheckerbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.tizen.nativecore.apichecker.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.tizen.nativecore.apichecker.core.tizenCppNature</nature>
<nature>org.tizen.nativecore.apichecker.apicheckernature</nature>
</natures>
<linkedResources>
<link>
<name>cocos</name>
<type>2</type>
<locationURI>PARENT-2-PROJECT_LOC/cocos</locationURI>
</link>
<link>
<name>extensions</name>
<type>2</type>
<locationURI>PARENT-2-PROJECT_LOC/extensions</locationURI>
</link>
<link>
<name>external</name>
<type>2</type>
<locationURI>PARENT-2-PROJECT_LOC/external</locationURI>
</link>
</linkedResources>
<filteredResources>
<filter>
<id>1423558551456</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-projectRelativePath-matches-false-false-*/.tpk</arguments>
</matcher>
</filter>
<filter>
<id>1423558551461</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-Android.mk</arguments>
</matcher>
</filter>
<filter>
<id>1423558551465</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-CMakeLists.txt</arguments>
</matcher>
</filter>
<filter>
<id>1423558551469</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*_props$</arguments>
</matcher>
</filter>
<filter>
<id>1423558551473</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-libcocos2d_8_1</arguments>
</matcher>
</filter>
<filter>
<id>1423558551477</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*.props$</arguments>
</matcher>
</filter>
<filter>
<id>1423558551482</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*vcxproj.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551486</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*\.def$</arguments>
</matcher>
</filter>
<filter>
<id>1423558551490</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*\.mm$</arguments>
</matcher>
</filter>
<filter>
<id>1423558551494</id>
<name></name>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*\.m$</arguments>
</matcher>
</filter>
<filter>
<id>1423558551498</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-proj.win32</arguments>
</matcher>
</filter>
<filter>
<id>1423558551503</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-proj.wp8</arguments>
</matcher>
</filter>
<filter>
<id>1423558551508</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-^proj.win.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551513</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-android</arguments>
</matcher>
</filter>
<filter>
<id>1423558551518</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-apple</arguments>
</matcher>
</filter>
<filter>
<id>1423558551523</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-desktop</arguments>
</matcher>
</filter>
<filter>
<id>1423558551528</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-ios</arguments>
</matcher>
</filter>
<filter>
<id>1423558551533</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-linux</arguments>
</matcher>
</filter>
<filter>
<id>1423558551537</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-mac</arguments>
</matcher>
</filter>
<filter>
<id>1423558551542</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*win8.1.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551559</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*wp8.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551564</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*winrt.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551578</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-scripting</arguments>
</matcher>
</filter>
<filter>
<id>1423558551597</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-lua</arguments>
</matcher>
</filter>
<filter>
<id>1423558551615</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*win32.*</arguments>
</matcher>
</filter>
<filter>
<id>1423558551627</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-true-.*wp_8.*</arguments>
</matcher>
</filter>
<filter>
<id>1414416409298</id>
<name>cocos/audio</name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-openal</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>

12
build/tizen/.tproject Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tproject xmlns="http://www.tizen.org/tproject">
<platforms>
<platform>
<name>mobile-2.4</name>
</platform>
</platforms>
<package>
<blacklist/>
<resFallback autoGen="true"/>
</package>
</tproject>

View File

@ -0,0 +1,151 @@
macro (BuildModules)
# desktop platforms
if(LINUX OR MACOSX OR WINDOWS)
cocos_find_package(OpenGL OPENGL REQUIRED)
if(LINUX OR WINDOWS)
cocos_find_package(GLEW GLEW REQUIRED)
#TODO: implement correct schema for pass cocos2d specific requirements to projects
include_directories(${GLEW_INCLUDE_DIRS})
endif()
cocos_find_package(GLFW3 GLFW3 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIRS})
if(LINUX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
cocos_find_package(FMOD FMOD REQUIRED)
cocos_find_package(Fontconfig FONTCONFIG REQUIRED)
cocos_find_package(GTK3 GTK3 REQUIRED)
endif()
if(WINDOWS)
cocos_find_package(Vorbis VORBIS REQUIRED)
cocos_find_package(MPG123 MPG123 REQUIRED)
cocos_find_package(OpenAL OPENAL REQUIRED)
# because FindOpenAL.cmake set include dir for '#include <al.h>' for portability (not for '#include <AL/al.h>'
set(OPENAL_DEFINITIONS "-DOPENAL_PLAIN_INCLUDES")
endif()
endif(LINUX OR MACOSX OR WINDOWS)
# Freetype required on all platforms
cocos_find_package(Freetype FREETYPE REQUIRED)
# WebP required if used
if(USE_WEBP)
cocos_find_package(WebP WEBP REQUIRED)
endif(USE_WEBP)
# Chipmunk
if(USE_CHIPMUNK)
if(USE_PREBUILT_LIBS)
cocos_find_package(Chipmunk CHIPMUNK REQUIRED)
endif()
endif(USE_CHIPMUNK)
# Box2d (not prebuilded, exists as source)
if(USE_BOX2D)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/Box2D)
set(Box2D_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/include)
set(Box2D_LIBRARIES box2d)
else()
find_package(Box2D REQUIRED CONFIG)
# actually Box2D in next line is not a library, it is target exported from Box2DConfig.cmake
set(Box2D_LIBRARIES Box2D)
endif()
message(STATUS "Box2D include dirs: ${Box2D_INCLUDE_DIRS}")
endif(USE_BOX2D)
# Bullet (not prebuilded, exists as source)
if(USE_BULLET)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/bullet)
set(BULLET_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet)
set(BULLET_LIBRARIES bullet)
else()
cocos_find_package(bullet BULLET REQUIRED)
set(BULLET_LIBRARIES bullet)
endif()
message(STATUS "Bullet include dirs: ${BULLET_INCLUDE_DIRS}")
endif(USE_BULLET)
# Recast (not prebuilded, exists as source)
if(USE_RECAST)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/recast)
set(RECAST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/recast)
set(RECAST_LIBRARIES recast)
else()
cocos_find_package(recast RECAST REQUIRED)
set(RECAST_LIBRARIES recast)
endif()
message(STATUS "Recast include dirs: ${RECAST_INCLUDE_DIRS}")
endif(USE_RECAST)
# Tinyxml2 (not prebuilded, exists as source)
if(USE_PREBUILT_LIBS)
add_subdirectory(external/tinyxml2)
set(TinyXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2)
set(TinyXML2_LIBRARIES tinyxml2)
else()
cocos_find_package(TinyXML2 TinyXML2 REQUIRED)
endif()
message(STATUS "TinyXML2 include dirs: ${TinyXML2_INCLUDE_DIRS}")
# libjpeg
cocos_find_package(JPEG JPEG REQUIRED)
cocos_find_package(ZLIB ZLIB REQUIRED)
# minizip (we try to migrate to minizip from https://github.com/nmoinvaz/minizip)
# only msys2 currently provides package for this variant, all other
# dists have packages from zlib, thats very old for us.
# moreover our embedded version modified to quick provide
# functionality needed by cocos.
if(USE_PREBUILT_LIBS OR NOT MINGW)
#TODO: hack! should be in external/unzip/CMakeLists.txt
include_directories(${ZLIB_INCLUDE_DIRS})
add_subdirectory(external/unzip)
set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip ${ZLIB_INCLUDE_DIRS})
set(MINIZIP_LIBRARIES unzip ${ZLIB_LIBRARIES})
message(STATUS "MINIZIP include dirs: ${MINIZIP_INCLUDE_DIRS}")
else()
cocos_find_package(MINIZIP MINIZIP REQUIRED)
# double check that we have needed functions
include(CheckLibraryExists)
check_library_exists(${MINIZIP_LIBRARIES} "unzGoToFirstFile2" "" MINIZIP_HAS_GOTOFIRSTFILE2)
if(NOT MINIZIP_HAS_GOTOFIRSTFILE2)
message(FATAL_ERROR "Minizip library on you system very old. Please use recent version from https://github.com/nmoinvaz/minizip or enable USE_PREBUILT_LIBS")
return()
endif()
endif()
cocos_find_package(PNG PNG REQUIRED)
cocos_find_package(TIFF TIFF REQUIRED)
cocos_find_package(WEBSOCKETS WEBSOCKETS REQUIRED)
cocos_find_package(CURL CURL REQUIRED)
# flatbuffers
if(USE_PREBUILT_LIBS)
add_subdirectory(external/flatbuffers)
set(FLATBUFFERS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external)
message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}")
else()
cocos_find_package(flatbuffers flatbuffers REQUIRED)
endif()
# xxhash
if(USE_PREBUILT_LIBS)
add_subdirectory(external/xxhash)
set(XXHASH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/xxhash)
set(XXHASH_LIBRARIES xxhash)
else()
cocos_find_package(xxhash xxhash REQUIRED)
endif()
# libcocos2d.a
add_subdirectory(cocos)
endmacro(BuildModules)

View File

@ -0,0 +1,52 @@
macro (SelectModule)
set(USE_WEBP_DEFAULT ON)
if(WINRT OR WP8)
set(USE_WEBP_DEFAULT OFF)
endif()
set(USE_PREBUILT_LIBS_DEFAULT ON)
if(MINGW)
set(USE_PREBUILT_LIBS_DEFAULT OFF)
endif()
set(BUILD_CPP_EMPTY_TEST_DEFAULT ON)
set(BUILD_CPP_TESTS_DEFAULT ON)
set(BUILD_LUA_LIBS_DEFAULT ON)
set(BUILD_LUA_TESTS_DEFAULT ON)
set(BUILD_JS_LIBS_DEFAULT ON)
set(BUILD_JS_TESTS_DEFAULT ON)
# TODO: fix test samples for MSVC
if(MSVC)
set(BUILD_CPP_EMPTY_TEST_DEFAULT OFF)
set(BUILD_CPP_TESTS_DEFAULT OFF)
set(BUILD_LUA_LIBS_DEFAULT OFF)
set(BUILD_LUA_TESTS_DEFAULT OFF)
set(BUILD_JS_LIBS_DEFAULT OFF)
set(BUILD_JS_TESTS_DEFAULT OFF)
endif()
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
option(USE_BOX2D "Use box2d for physics library" OFF)
option(USE_BULLET "Use bullet for physics3d library" ON)
option(USE_RECAST "Use Recast for navigation mesh" ON)
option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT})
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(DEBUG_MODE "Debug or release?" ON)
option(BUILD_EXTENSIONS "Build extension library" ON)
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON)
option(BUILD_CPP_TESTS "Build TestCpp samples" ${BUILD_CPP_TESTS_DEFAULT})
option(BUILD_CPP_EMPTY_TEST "Build TestCpp samples" ${BUILD_CPP_EMPTY_TEST_DEFAULT})
option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT})
option(BUILD_LUA_TESTS "Build TestLua samples" ${BUILD_LUA_TESTS_DEFAULT})
option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT})
option(BUILD_JS_TESTS "Build TestJS samples" ${BUILD_JS_TESTS_DEFAULT})
option(USE_PREBUILT_LIBS "Use prebuilt libraries in external directory" ${USE_PREBUILT_LIBS_DEFAULT})
if(USE_PREBUILT_LIBS AND MINGW)
message(FATAL_ERROR "Prebuilt windows libs can't be used with mingw, please use packages.")
return()
endif()
endmacro(SelectModule)

View File

@ -0,0 +1,104 @@
macro (SetCompilerOptions)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCOCOS2D_DEBUG=1")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
# definitions for chipmunk
if (USE_CHIPMUNK)
add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1)
if (IOS OR MACOSX)
# without this chipmunk will try to use apple defined geometry types, that conflicts with cocos
add_definitions(-DCP_USE_CGPOINTS=0)
endif()
else()
add_definitions(-DCC_USE_PHYSICS=0)
endif()
# definitions for box2d
if (USE_BOX2D)
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1)
else()
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0)
endif()
# definitions for bullet
if (USE_BULLET)
add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1)
add_definitions(-DCC_USE_PHYSICS=1)
else()
add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=0)
add_definitions(-DCC_USE_3D_PHYSICS=0)
endif()
# definitions for recast
if (USE_RECAST)
add_definitions(-DCC_USE_NAVMESH=1)
else()
add_definitions(-DCC_USE_NAVMESH=0)
endif()
# Compiler options
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
-wd4514 -wd4056 -wd4996 -wd4099)
# Use inline debug info (/Z7) format. Or internal error may occur.
# Errors looks like: "xmemory0(592): error C3130: Internal Compiler Error: failed to write injected code block to PDB"
foreach(lang C CXX)
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG}")
set(CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG} /Z7")
endforeach()
else()
set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
if(CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
endif(MSVC)
# Some macro definitions
if(WINDOWS)
if(BUILD_SHARED_LIBS)
add_definitions(-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL)
else()
add_definitions(-DCC_STATIC)
endif()
add_definitions(-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
set(PLATFORM_FOLDER win32)
elseif(MACOSX OR APPLE)
add_definitions(-DCC_TARGET_OS_MAC)
add_definitions(-DUSE_FILE32API)
set(PLATFORM_FOLDER mac)
elseif(LINUX)
add_definitions(-DLINUX)
set(PLATFORM_FOLDER linux)
elseif(ANDROID)
add_definitions(-DUSE_FILE32API)
set(PLATFORM_FOLDER android)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -latomic")
else()
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
return()
endif()
if(MINGW)
#add_definitions(-DGLEW_STATIC)
add_definitions(-D__SSIZE_T)
if(CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
endif()
endif()
if (MINGW OR NOT USE_PREBUILT_LIBS)
add_definitions(-DMINIZIP_FROM_SYSTEM)
endif()
endmacro (SetCompilerOptions)

View File

@ -192,8 +192,19 @@ Follow::~Follow()
Follow* Follow::create(Node *followedNode, const Rect& rect/* = Rect::ZERO*/) Follow* Follow::create(Node *followedNode, const Rect& rect/* = Rect::ZERO*/)
{ {
return createWithOffset(followedNode, 0.0, 0.0,rect);
}
Follow* Follow::createWithOffset(Node* followedNode,float xOffset,float yOffset,const Rect& rect/*= Rect::ZERO*/){
Follow *follow = new (std::nothrow) Follow(); Follow *follow = new (std::nothrow) Follow();
if (follow && follow->initWithTarget(followedNode, rect))
bool valid;
valid = follow->initWithTargetAndOffset(followedNode, xOffset, yOffset,rect);
if (follow && valid)
{ {
follow->autorelease(); follow->autorelease();
return follow; return follow;
@ -201,12 +212,13 @@ Follow* Follow::create(Node *followedNode, const Rect& rect/* = Rect::ZERO*/)
delete follow; delete follow;
return nullptr; return nullptr;
}
}
Follow* Follow::clone() const Follow* Follow::clone() const
{ {
// no copy constructor // no copy constructor
return Follow::create(_followedNode, _worldRect); return Follow::createWithOffset(_followedNode, _offsetX,_offsetY,_worldRect);
} }
Follow* Follow::reverse() const Follow* Follow::reverse() const
@ -214,7 +226,7 @@ Follow* Follow::reverse() const
return clone(); return clone();
} }
bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*/) bool Follow::initWithTargetAndOffset(Node *followedNode, float xOffset,float yOffset,const Rect& rect)
{ {
CCASSERT(followedNode != nullptr, "FollowedNode can't be NULL"); CCASSERT(followedNode != nullptr, "FollowedNode can't be NULL");
if(followedNode == nullptr) if(followedNode == nullptr)
@ -232,6 +244,10 @@ bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
_fullScreenSize.set(winSize.width, winSize.height); _fullScreenSize.set(winSize.width, winSize.height);
_halfScreenSize = _fullScreenSize * 0.5f; _halfScreenSize = _fullScreenSize * 0.5f;
_offsetX=xOffset;
_offsetY=yOffset;
_halfScreenSize.x += _offsetX;
_halfScreenSize.y += _offsetY;
if (_boundarySet) if (_boundarySet)
{ {
@ -262,6 +278,11 @@ bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*
return true; return true;
} }
bool Follow::initWithTarget(Node *followedNode, const Rect& rect /*= Rect::ZERO*/){
return initWithTargetAndOffset(followedNode, 0.0, 0.0,rect);
}
void Follow::step(float dt) void Follow::step(float dt)
{ {
CC_UNUSED_PARAM(dt); CC_UNUSED_PARAM(dt);

View File

@ -324,7 +324,26 @@ public:
* @param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work * @param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
* with no boundary. * with no boundary.
*/ */
static Follow* create(Node *followedNode, const Rect& rect = Rect::ZERO); static Follow* create(Node *followedNode, const Rect& rect = Rect::ZERO);
/**
* Creates the action with a set boundary or with no boundary with offsets.
*
* @param followedNode The node to be followed.
* @param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
* with no boundary.
* @param xOffset The horizontal offset from the center of the screen from which the
* node is to be followed.It can be positive,negative or zero.If
* set to zero the node will be horizontally centered followed.
* @param yOffset The vertical offset from the center of the screen from which the
* node is to be followed.It can be positive,negative or zero.
* If set to zero the node will be vertically centered followed.
* If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed.
*/
static Follow* createWithOffset(Node* followedNode,float xOffset,float yOffset,const Rect& rect = Rect::ZERO);
/** Return boundarySet. /** Return boundarySet.
* *
* @return Return boundarySet. * @return Return boundarySet.
@ -367,6 +386,8 @@ CC_CONSTRUCTOR_ACCESS:
, _rightBoundary(0.0) , _rightBoundary(0.0)
, _topBoundary(0.0) , _topBoundary(0.0)
, _bottomBoundary(0.0) , _bottomBoundary(0.0)
, _offsetX(0.0)
, _offsetY(0.0)
, _worldRect(Rect::ZERO) , _worldRect(Rect::ZERO)
{} {}
/** /**
@ -384,6 +405,24 @@ CC_CONSTRUCTOR_ACCESS:
*/ */
bool initWithTarget(Node *followedNode, const Rect& rect = Rect::ZERO); bool initWithTarget(Node *followedNode, const Rect& rect = Rect::ZERO);
/**
* Initializes the action with a set boundary or with no boundary with offsets.
*
* @param followedNode The node to be followed.
* @param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
* with no boundary.
* @param xOffset The horizontal offset from the center of the screen from which the
* node is to be followed.It can be positive,negative or zero.If
* set to zero the node will be horizontally centered followed.
* @param yOffset The vertical offset from the center of the screen from which the
* node is to be followed.It can be positive,negative or zero.
* If set to zero the node will be vertically centered followed.
* If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed.
*/
bool initWithTargetAndOffset(Node *followedNode,float xOffset,float yOffset,const Rect& rect = Rect::ZERO);
protected: protected:
/** Node to follow. */ /** Node to follow. */
Node *_followedNode; Node *_followedNode;
@ -403,6 +442,11 @@ protected:
float _rightBoundary; float _rightBoundary;
float _topBoundary; float _topBoundary;
float _bottomBoundary; float _bottomBoundary;
/** Horizontal (x) and vertical (y) offset values. */
float _offsetX;
float _offsetY;
Rect _worldRect; Rect _worldRect;
private: private:

View File

@ -194,11 +194,11 @@ void OrbitCamera::startWithTarget(Node *target)
float r, zenith, azimuth; float r, zenith, azimuth;
this->sphericalRadius(&r, &zenith, &azimuth); this->sphericalRadius(&r, &zenith, &azimuth);
if( isnan(_radius) ) if( std::isnan(_radius) )
_radius = r; _radius = r;
if( isnan(_angleZ) ) if( std::isnan(_angleZ) )
_angleZ = (float)CC_RADIANS_TO_DEGREES(zenith); _angleZ = (float)CC_RADIANS_TO_DEGREES(zenith);
if( isnan(_angleX) ) if( std::isnan(_angleX) )
_angleX = (float)CC_RADIANS_TO_DEGREES(azimuth); _angleX = (float)CC_RADIANS_TO_DEGREES(azimuth);
_radZ = (float)CC_DEGREES_TO_RADIANS(_angleZ); _radZ = (float)CC_DEGREES_TO_RADIANS(_angleZ);

View File

@ -112,7 +112,7 @@ void PointArray::setControlPoints(vector<Vec2*> *controlPoints)
_controlPoints = controlPoints; _controlPoints = controlPoints;
} }
void PointArray::addControlPoint(Vec2 controlPoint) void PointArray::addControlPoint(const Vec2& controlPoint)
{ {
_controlPoints->push_back(new Vec2(controlPoint.x, controlPoint.y)); _controlPoints->push_back(new Vec2(controlPoint.x, controlPoint.y));
} }

View File

@ -88,7 +88,7 @@ public:
* @js NA * @js NA
* @param controlPoint A control point. * @param controlPoint A control point.
*/ */
void addControlPoint(Vec2 controlPoint); void addControlPoint(const Vec2& controlPoint);
/** Inserts a controlPoint at index. /** Inserts a controlPoint at index.
* *

View File

@ -653,7 +653,7 @@ void Waves::update(float time)
// implementation of Twirl // implementation of Twirl
Twirl* Twirl::create(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude) Twirl* Twirl::create(float duration, const Size& gridSize, const Vec2& position, unsigned int twirls, float amplitude)
{ {
Twirl *action = new (std::nothrow) Twirl(); Twirl *action = new (std::nothrow) Twirl();
@ -672,7 +672,7 @@ Twirl* Twirl::create(float duration, const Size& gridSize, Vec2 position, unsign
return action; return action;
} }
bool Twirl::initWithDuration(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude) bool Twirl::initWithDuration(float duration, const Size& gridSize, const Vec2& position, unsigned int twirls, float amplitude)
{ {
if (Grid3DAction::initWithDuration(duration, gridSize)) if (Grid3DAction::initWithDuration(duration, gridSize))
{ {

View File

@ -545,7 +545,7 @@ public:
@param amplitude Specify the amplitude of the Twirl action. @param amplitude Specify the amplitude of the Twirl action.
@return If the creation success, return a pointer of Twirl action; otherwise, return nil. @return If the creation success, return a pointer of Twirl action; otherwise, return nil.
*/ */
static Twirl* create(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude); static Twirl* create(float duration, const Size& gridSize, const Vec2& position, unsigned int twirls, float amplitude);
/** /**
@brief Get the center position of twirl action. @brief Get the center position of twirl action.
@ -598,7 +598,7 @@ CC_CONSTRUCTOR_ACCESS:
@param amplitude Specify the amplitude of the Twirl action. @param amplitude Specify the amplitude of the Twirl action.
@return If the initialization success, return true; otherwise, return false. @return If the initialization success, return true; otherwise, return false.
*/ */
bool initWithDuration(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude); bool initWithDuration(float duration, const Size& gridSize, const Vec2& position, unsigned int twirls, float amplitude);
protected: protected:
/* twirl center */ /* twirl center */

View File

@ -304,6 +304,7 @@ Sequence* Sequence::clone() const
} }
Sequence::Sequence() Sequence::Sequence()
: _split(0)
{ {
_actions[0] = nullptr; _actions[0] = nullptr;
_actions[1] = nullptr; _actions[1] = nullptr;
@ -327,11 +328,10 @@ void Sequence::startWithTarget(Node *target)
log("Sequence::startWithTarget error: _actions[0] or _actions[1] is nullptr!"); log("Sequence::startWithTarget error: _actions[0] or _actions[1] is nullptr!");
return; return;
} }
if (_duration <= FLT_EPSILON) if (_duration > FLT_EPSILON)
return; _split = _actions[0]->getDuration() / _duration;
ActionInterval::startWithTarget(target); ActionInterval::startWithTarget(target);
_split = _actions[0]->getDuration() / _duration;
_last = -1; _last = -1;
} }
@ -1958,7 +1958,7 @@ bool Blink::initWithDuration(float duration, int blinks)
void Blink::stop() void Blink::stop()
{ {
if(NULL != _target) if (nullptr != _target)
_target->setVisible(_originalState); _target->setVisible(_originalState);
ActionInterval::stop(); ActionInterval::stop();
} }

View File

@ -452,6 +452,11 @@ void ActionManager::update(float dt)
{ {
deleteHashElement(_currentTarget); deleteHashElement(_currentTarget);
} }
//if some node reference 'target', it's reference count >= 2 (issues #14050)
else if (_currentTarget->target->getReferenceCount() == 1)
{
deleteHashElement(_currentTarget);
}
} }
// issue #635 // issue #635

View File

@ -70,7 +70,7 @@ bool ShakyTiles3D::initWithDuration(float duration, const Size& gridSize, int ra
ShakyTiles3D* ShakyTiles3D::clone() const ShakyTiles3D* ShakyTiles3D::clone() const
{ {
// no copy constructor // no copy constructor
return ShakyTiles3D::create(_duration, _gridSize, _randrange, -_shakeZ); return ShakyTiles3D::create(_duration, _gridSize, _randrange, _shakeZ);
} }
void ShakyTiles3D::update(float time) void ShakyTiles3D::update(float time)

View File

@ -40,8 +40,8 @@ const static float PRECISION = 10.0f;
PolygonInfo::PolygonInfo(const PolygonInfo& other): PolygonInfo::PolygonInfo(const PolygonInfo& other):
triangles(), triangles(),
isVertsOwner(true), rect(),
rect() isVertsOwner(true)
{ {
filename = other.filename; filename = other.filename;
isVertsOwner = true; isVertsOwner = true;
@ -421,7 +421,7 @@ float AutoPolygon::perpendicularDistance(const cocos2d::Vec2& i, const cocos2d::
} }
return res; return res;
} }
std::vector<cocos2d::Vec2> AutoPolygon::rdp(std::vector<cocos2d::Vec2> v, const float& optimization) std::vector<cocos2d::Vec2> AutoPolygon::rdp(const std::vector<cocos2d::Vec2>& v, float optimization)
{ {
if(v.size() < 3) if(v.size() < 3)
return v; return v;
@ -435,7 +435,7 @@ std::vector<cocos2d::Vec2> AutoPolygon::rdp(std::vector<cocos2d::Vec2> v, const
if(cdist > dist) if(cdist > dist)
{ {
dist = cdist; dist = cdist;
index = i; index = static_cast<int>(i);
} }
} }
if (dist>optimization) if (dist>optimization)

View File

@ -55,9 +55,9 @@ public:
* @return PolygonInfo object * @return PolygonInfo object
*/ */
PolygonInfo(): PolygonInfo():
isVertsOwner(true),
rect(cocos2d::Rect::ZERO), rect(cocos2d::Rect::ZERO),
filename("") filename(""),
isVertsOwner(true)
{ {
triangles.verts = nullptr; triangles.verts = nullptr;
triangles.indices = nullptr; triangles.indices = nullptr;
@ -260,7 +260,7 @@ protected:
int getIndexFromPos(const unsigned int& x, const unsigned int& y){return y*_width+x;}; int getIndexFromPos(const unsigned int& x, const unsigned int& y){return y*_width+x;};
cocos2d::Vec2 getPosFromIndex(const unsigned int& i){return cocos2d::Vec2(i%_width, i/_width);}; cocos2d::Vec2 getPosFromIndex(const unsigned int& i){return cocos2d::Vec2(i%_width, i/_width);};
std::vector<cocos2d::Vec2> rdp(std::vector<cocos2d::Vec2> v, const float& optimization); std::vector<cocos2d::Vec2> rdp(const std::vector<cocos2d::Vec2>& v, float optimization);
float perpendicularDistance(const cocos2d::Vec2& i, const cocos2d::Vec2& start, const cocos2d::Vec2& end); float perpendicularDistance(const cocos2d::Vec2& i, const cocos2d::Vec2& start, const cocos2d::Vec2& end);
//real rect is the size that is in scale with the texture file //real rect is the size that is in scale with the texture file

View File

@ -107,9 +107,7 @@ bool ClippingNode::init()
bool ClippingNode::init(Node *stencil) bool ClippingNode::init(Node *stencil)
{ {
CC_SAFE_RELEASE(_stencil);
setStencil(stencil); setStencil(stencil);
CC_SAFE_RETAIN(_stencil);
return true; return true;
} }
@ -292,6 +290,9 @@ Node* ClippingNode::getStencil() const
void ClippingNode::setStencil(Node *stencil) void ClippingNode::setStencil(Node *stencil)
{ {
if (_stencil == stencil)
return;
#if CC_ENABLE_GC_FOR_NATIVE_OBJECTS #if CC_ENABLE_GC_FOR_NATIVE_OBJECTS
auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine(); auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine();
if (sEngine) if (sEngine)

View File

@ -326,9 +326,7 @@ void DrawNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
void DrawNode::onDraw(const Mat4 &transform, uint32_t flags) void DrawNode::onDraw(const Mat4 &transform, uint32_t flags)
{ {
auto glProgram = getGLProgram(); getGLProgramState()->apply(transform);
glProgram->use();
glProgram->setUniformsForBuiltins(transform);
GL::blendFunc(_blendFunc.src, _blendFunc.dst); GL::blendFunc(_blendFunc.src, _blendFunc.dst);

View File

@ -196,7 +196,7 @@ namespace DrawPrimitives
* @param origin The origin of the bezier path. * @param origin The origin of the bezier path.
* @param control The control of the bezier path. * @param control The control of the bezier path.
* @param destination The destination of the bezier path. * @param destination The destination of the bezier path.
* @param segments The The number of segments. * @param segments The number of segments.
* @warning This function could be pretty slow. Use it only for debugging purposes. * @warning This function could be pretty slow. Use it only for debugging purposes.
* @since v0.8 * @since v0.8
*/ */
@ -208,7 +208,7 @@ namespace DrawPrimitives
* @param control1 The first control of the bezier path. * @param control1 The first control of the bezier path.
* @param control2 The second control of the bezier path. * @param control2 The second control of the bezier path.
* @param destination The destination of the bezier path. * @param destination The destination of the bezier path.
* @param segments The The number of segments. * @param segments The number of segments.
* @warning This function could be pretty slow. Use it only for debugging purposes. * @warning This function could be pretty slow. Use it only for debugging purposes.
* @since v0.8 * @since v0.8
*/ */
@ -217,7 +217,7 @@ namespace DrawPrimitives
/** Draws a Catmull Rom path. /** Draws a Catmull Rom path.
* *
* @param arrayOfControlPoints A point array of control point. * @param arrayOfControlPoints A point array of control point.
* @param segments The The number of segments. * @param segments The number of segments.
* @warning This function could be pretty slow. Use it only for debugging purposes. * @warning This function could be pretty slow. Use it only for debugging purposes.
* @since v2.0 * @since v2.0
*/ */
@ -227,7 +227,7 @@ namespace DrawPrimitives
* *
* @param config A array point. * @param config A array point.
* @param tension The tension of the spline. * @param tension The tension of the spline.
* @param segments The The number of segments. * @param segments The number of segments.
* @warning This function could be pretty slow. Use it only for debugging purposes. * @warning This function could be pretty slow. Use it only for debugging purposes.
* @since v2.0 * @since v2.0
*/ */

View File

@ -828,7 +828,7 @@ void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flag
} }
} }
void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid) void TMXLayer::setupTileSprite(Sprite* sprite, const Vec2& pos, int gid)
{ {
sprite->setPosition(getPositionAt(pos)); sprite->setPosition(getPositionAt(pos));
sprite->setPositionZ((float)getVertexZForPos(pos)); sprite->setPositionZ((float)getVertexZForPos(pos));

View File

@ -261,7 +261,7 @@ public:
* @param pos The tile coordinate. * @param pos The tile coordinate.
* @param gid The tile gid. * @param gid The tile gid.
*/ */
void setupTileSprite(Sprite* sprite, Vec2 pos, int gid); void setupTileSprite(Sprite* sprite, const Vec2& pos, int gid);
// //
// Override // Override

View File

@ -316,8 +316,8 @@ std::set<unsigned int>* BMFontConfiguration::parseConfigFile(const std::string&
auto next = strchr(contents, '\n'); auto next = strchr(contents, '\n');
auto base = contents; auto base = contents;
int lineLength = 0; size_t lineLength = 0;
int parseCount = 0; size_t parseCount = 0;
while (next) while (next)
{ {
lineLength = ((int)(next - base)); lineLength = ((int)(next - base));
@ -809,8 +809,12 @@ FontAtlas * FontFNT::createFontAtlas()
tempDefinition.validDefinition = true; tempDefinition.validDefinition = true;
tempDefinition.xAdvance = fontDef.xAdvance; tempDefinition.xAdvance = fontDef.xAdvance;
// add the new definition // add the new definition
if (65535 < fontDef.charID) {
CCLOGWARN("Warning: 65535 < fontDef.charID (%u), ignored", fontDef.charID);
} else {
tempAtlas->addLetterDefinition(fontDef.charID,tempDefinition); tempAtlas->addLetterDefinition(fontDef.charID,tempDefinition);
} }
}
// add the texture (only one texture for now) // add the texture (only one texture for now)

View File

@ -46,7 +46,6 @@
NS_CC_BEGIN NS_CC_BEGIN
static const int UNDERLINE_NODE_TAG = 0xaabbccdd;
/** /**
* LabelLetter used to update the quad in texture atlas without SpriteBatchNode. * LabelLetter used to update the quad in texture atlas without SpriteBatchNode.
*/ */
@ -780,9 +779,9 @@ bool Label::alignText()
do { do {
_fontAtlas->prepareLetterDefinitions(_utf16Text); _fontAtlas->prepareLetterDefinitions(_utf16Text);
auto& textures = _fontAtlas->getTextures(); auto& textures = _fontAtlas->getTextures();
if (textures.size() > _batchNodes.size()) if (textures.size() > static_cast<size_t>(_batchNodes.size()))
{ {
for (auto index = _batchNodes.size(); index < textures.size(); ++index) for (auto index = static_cast<size_t>(_batchNodes.size()); index < textures.size(); ++index)
{ {
auto batchNode = SpriteBatchNode::createWithTexture(textures.at(index)); auto batchNode = SpriteBatchNode::createWithTexture(textures.at(index));
if (batchNode) if (batchNode)
@ -1129,7 +1128,7 @@ void Label::enableBold()
if (!_boldEnabled) if (!_boldEnabled)
{ {
// bold is implemented with outline // bold is implemented with outline
enableShadow(Color4B::WHITE, Size(0.9,0), 0); enableShadow(Color4B::WHITE, Size(0.9f, 0), 0);
// add one to kerning // add one to kerning
setAdditionalKerning(_additionalKerning+1); setAdditionalKerning(_additionalKerning+1);
_boldEnabled = true; _boldEnabled = true;

View File

@ -137,7 +137,7 @@ bool Menu::initWithArray(const Vector<MenuItem*>& arrayOfItems)
// menu in the center of the screen // menu in the center of the screen
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
this->ignoreAnchorPointForPosition(true); this->setIgnoreAnchorPointForPosition(true);
setAnchorPoint(Vec2(0.5f, 0.5f)); setAnchorPoint(Vec2(0.5f, 0.5f));
this->setContentSize(s); this->setContentSize(s);

View File

@ -102,7 +102,7 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const Co
{ {
Node::setPosition(Vec2::ZERO); Node::setPosition(Vec2::ZERO);
setAnchorPoint(Vec2::ZERO); setAnchorPoint(Vec2::ZERO);
ignoreAnchorPointForPosition(true); setIgnoreAnchorPointForPosition(true);
_startingPositionInitialized = false; _startingPositionInitialized = false;
_positionR.setZero(); _positionR.setZero();

View File

@ -1,5 +1,3 @@
/**************************************************************************** /****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2009 Valentin Milea Copyright (c) 2009 Valentin Milea
@ -653,8 +651,9 @@ bool Node::isIgnoreAnchorPointForPosition() const
{ {
return _ignoreAnchorPointForPosition; return _ignoreAnchorPointForPosition;
} }
/// isRelativeAnchorPoint setter /// isRelativeAnchorPoint setter
void Node::ignoreAnchorPointForPosition(bool newValue) void Node::setIgnoreAnchorPointForPosition(bool newValue)
{ {
if (newValue != _ignoreAnchorPointForPosition) if (newValue != _ignoreAnchorPointForPosition)
{ {

View File

@ -38,6 +38,10 @@
#include "2d/CCComponentContainer.h" #include "2d/CCComponentContainer.h"
#include "2d/CCComponent.h" #include "2d/CCComponent.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsBody.h"
#endif
NS_CC_BEGIN NS_CC_BEGIN
class GridBase; class GridBase;
@ -701,13 +705,14 @@ public:
* The default value is false, while in Layer and Scene are true. * The default value is false, while in Layer and Scene are true.
* *
* @param ignore true if anchor point will be (0,0) when you position this node. * @param ignore true if anchor point will be (0,0) when you position this node.
* @todo This method should be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set".
*/ */
virtual void ignoreAnchorPointForPosition(bool ignore); virtual void setIgnoreAnchorPointForPosition(bool ignore);
CC_DEPRECATED_ATTRIBUTE virtual void ignoreAnchorPointForPosition(bool ignore) { setIgnoreAnchorPointForPosition(ignore); }
/** /**
* Gets whether the anchor point will be (0,0) when you position this node. * Gets whether the anchor point will be (0,0) when you position this node.
* *
* @see `ignoreAnchorPointForPosition(bool)` * @see `setIgnoreAnchorPointForPosition(bool)`
* *
* @return true if the anchor point will be (0,0) when you position this node. * @return true if the anchor point will be (0,0) when you position this node.
*/ */
@ -1260,7 +1265,6 @@ public:
* Composable actions are counted as 1 action. Example: * Composable actions are counted as 1 action. Example:
* If you are running 1 Sequence of 7 actions, it will return 1. * If you are running 1 Sequence of 7 actions, it will return 1.
* If you are running 7 Sequences of 2 actions, it will return 7. * If you are running 7 Sequences of 2 actions, it will return 7.
* @todo Rename to getNumberOfRunningActions()
* *
* @return The number of actions that are running plus the ones that are schedule to run. * @return The number of actions that are running plus the ones that are schedule to run.
*/ */
@ -1961,8 +1965,13 @@ protected:
#if CC_USE_PHYSICS #if CC_USE_PHYSICS
PhysicsBody* _physicsBody; PhysicsBody* _physicsBody;
public: public:
void setPhysicsBody(Component* physicsBody) void setPhysicsBody(PhysicsBody* physicsBody)
{ {
if (_physicsBody != nullptr)
{
removeComponent(_physicsBody);
}
addComponent(physicsBody); addComponent(physicsBody);
} }
PhysicsBody* getPhysicsBody() const { return _physicsBody; } PhysicsBody* getPhysicsBody() const { return _physicsBody; }

View File

@ -932,6 +932,12 @@ void ParticleSystem::update(float dt)
} }
else else
{ {
//Why use so many for-loop separately instead of putting them together?
//When the processor needs to read from or write to a location in memory,
//it first checks whether a copy of that data is in the cache.
//And every property's memory of the particle system is continuous,
//for the purpose of improving cache hit rate, we should process only one property in one for-loop AFAP.
//It was proved to be effective especially for low-end machine.
for (int i = 0; i < _particleCount; ++i) for (int i = 0; i < _particleCount; ++i)
{ {
_particleData.modeB.angle[i] += _particleData.modeB.degreesPerSecond[i] * dt; _particleData.modeB.angle[i] += _particleData.modeB.degreesPerSecond[i] * dt;

View File

@ -924,10 +924,10 @@ void Sprite::setAnchorPoint(const Vec2& anchor)
SET_DIRTY_RECURSIVELY(); SET_DIRTY_RECURSIVELY();
} }
void Sprite::ignoreAnchorPointForPosition(bool value) void Sprite::setIgnoreAnchorPointForPosition(bool value)
{ {
CCASSERT(! _batchNode, "ignoreAnchorPointForPosition is invalid in Sprite"); CCASSERT(! _batchNode, "setIgnoreAnchorPointForPosition is invalid in Sprite");
Node::ignoreAnchorPointForPosition(value); Node::setIgnoreAnchorPointForPosition(value);
} }
void Sprite::setVisible(bool bVisible) void Sprite::setVisible(bool bVisible)

View File

@ -467,7 +467,9 @@ public:
virtual void setScale(float scale) override; virtual void setScale(float scale) override;
virtual void setPositionZ(float positionZ) override; virtual void setPositionZ(float positionZ) override;
virtual void setAnchorPoint(const Vec2& anchor) override; virtual void setAnchorPoint(const Vec2& anchor) override;
virtual void ignoreAnchorPointForPosition(bool value) override;
virtual void setIgnoreAnchorPointForPosition(bool value) override;
virtual void setVisible(bool bVisible) override; virtual void setVisible(bool bVisible) override;
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
virtual void setOpacityModifyRGB(bool modify) override; virtual void setOpacityModifyRGB(bool modify) override;

View File

@ -252,7 +252,7 @@ void SpriteBatchNode::removeAllChildrenWithCleanup(bool doCleanup)
Node::removeAllChildrenWithCleanup(doCleanup); Node::removeAllChildrenWithCleanup(doCleanup);
_descendants.clear(); _descendants.clear();
_textureAtlas->removeAllQuads(); if (_textureAtlas) {_textureAtlas->removeAllQuads();}
} }
//override sortAllChildren //override sortAllChildren

View File

@ -137,6 +137,7 @@ SpriteFrame* SpriteFrame::clone() const
SpriteFrame *copy = new (std::nothrow) SpriteFrame(); SpriteFrame *copy = new (std::nothrow) SpriteFrame();
copy->initWithTextureFilename(_textureFilename, _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels); copy->initWithTextureFilename(_textureFilename, _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels);
copy->setTexture(_texture); copy->setTexture(_texture);
copy->setPolygonInfo(_polygonInfo);
copy->autorelease(); copy->autorelease();
return copy; return copy;
} }
@ -187,7 +188,7 @@ void SpriteFrame::setAnchorPoint(const Vec2& anchorPoint)
bool SpriteFrame::hasAnchorPoint() const bool SpriteFrame::hasAnchorPoint() const
{ {
return !isnan(_anchorPoint.x); return !std::isnan(_anchorPoint.x);
} }
void SpriteFrame::setTexture(Texture2D * texture) void SpriteFrame::setTexture(Texture2D * texture)

View File

@ -130,9 +130,9 @@ void SpriteFrameCache::initializePolygonInfo(const Size &textureSize,
indexData[i] = static_cast<unsigned short>(triangleIndices[i]); indexData[i] = static_cast<unsigned short>(triangleIndices[i]);
} }
info.triangles.vertCount = vertexCount; info.triangles.vertCount = static_cast<int>(vertexCount);
info.triangles.verts = vertexData; info.triangles.verts = vertexData;
info.triangles.indexCount = indexCount; info.triangles.indexCount = static_cast<int>(indexCount);
info.triangles.indices = indexData; info.triangles.indices = indexData;
info.rect = Rect(0, 0, spriteSize.width, spriteSize.height); info.rect = Rect(0, 0, spriteSize.width, spriteSize.height);
} }
@ -322,7 +322,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dict, const std::
{"I8", Texture2D::PixelFormat::I8}, {"I8", Texture2D::PixelFormat::I8},
{"AI88", Texture2D::PixelFormat::AI88}, {"AI88", Texture2D::PixelFormat::AI88},
{"ALPHA_INTENSITY", Texture2D::PixelFormat::AI88}, {"ALPHA_INTENSITY", Texture2D::PixelFormat::AI88},
//{"BGRA8888", Texture2D::PixelFormat::BGRA8888}, no Image convertion RGBA -> BGRA //{"BGRA8888", Texture2D::PixelFormat::BGRA8888}, no Image conversion RGBA -> BGRA
{"RGB888", Texture2D::PixelFormat::RGB888} {"RGB888", Texture2D::PixelFormat::RGB888}
}; };

View File

@ -224,7 +224,7 @@ void TMXLayer::parseInternalProperties()
} }
} }
void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid) void TMXLayer::setupTileSprite(Sprite* sprite, const Vec2& pos, int gid)
{ {
sprite->setPosition(getPositionAt(pos)); sprite->setPosition(getPositionAt(pos));
sprite->setPositionZ((float)getVertexZForPos(pos)); sprite->setPositionZ((float)getVertexZForPos(pos));
@ -281,7 +281,7 @@ void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
} }
} }
Sprite* TMXLayer::reusedTileWithRect(Rect rect) Sprite* TMXLayer::reusedTileWithRect(const Rect& rect)
{ {
if (! _reusedTile) if (! _reusedTile)
{ {

View File

@ -307,8 +307,8 @@ protected:
/* The layer recognizes some special properties, like cc_vertexz */ /* The layer recognizes some special properties, like cc_vertexz */
void parseInternalProperties(); void parseInternalProperties();
void setupTileSprite(Sprite* sprite, Vec2 pos, int gid); void setupTileSprite(Sprite* sprite, const Vec2& pos, int gid);
Sprite* reusedTileWithRect(Rect rect); Sprite* reusedTileWithRect(const Rect& rect);
int getVertexZForPos(const Vec2& pos); int getVertexZForPos(const Vec2& pos);
// index // index

View File

@ -439,6 +439,12 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
} }
CCASSERT( compression == "" || compression == "gzip" || compression == "zlib", "TMX: unsupported compression method" ); CCASSERT( compression == "" || compression == "gzip" || compression == "zlib", "TMX: unsupported compression method" );
} }
else if (encoding == "csv")
{
int layerAttribs = tmxMapInfo->getLayerAttribs();
tmxMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribCSV);
tmxMapInfo->setStoringCharacters(true);
}
} }
else if (elementName == "object") else if (elementName == "object")
{ {
@ -448,7 +454,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
// Create an instance of TMXObjectInfo to store the object and its properties // Create an instance of TMXObjectInfo to store the object and its properties
ValueMap dict; ValueMap dict;
// Parse everything automatically // Parse everything automatically
const char* keys[] = {"name", "type", "width", "height", "gid"}; const char* keys[] = {"name", "type", "width", "height", "gid", "id"};
for (const auto& key : keys) for (const auto& key : keys)
{ {
@ -671,6 +677,45 @@ void TMXMapInfo::endElement(void *ctx, const char *name)
tmxMapInfo->setCurrentString(""); tmxMapInfo->setCurrentString("");
} }
else if (tmxMapInfo->getLayerAttribs() & TMXLayerAttribCSV)
{
unsigned char *buffer;
TMXLayerInfo* layer = tmxMapInfo->getLayers().back();
tmxMapInfo->setStoringCharacters(false);
std::string currentString = tmxMapInfo->getCurrentString();
vector<string> gidTokens;
istringstream filestr(currentString);
string sRow;
while(getline(filestr, sRow, '\n')) {
string sGID;
istringstream rowstr(sRow);
while (getline(rowstr, sGID, ',')) {
gidTokens.push_back(sGID);
}
}
// 32-bits per gid
buffer = (unsigned char*)malloc(gidTokens.size() * 4);
if (!buffer)
{
CCLOG("cocos2d: TiledMap: CSV buffer not allocated.");
return;
}
uint32_t* bufferPtr = reinterpret_cast<uint32_t*>(buffer);
for(auto gidToken : gidTokens) {
auto tileGid = (uint32_t)strtol(gidToken.c_str(), nullptr, 10);
*bufferPtr = tileGid;
bufferPtr++;
}
layer->_tiles = reinterpret_cast<uint32_t*>(buffer);
tmxMapInfo->setCurrentString("");
}
else if (tmxMapInfo->getLayerAttribs() & TMXLayerAttribNone) else if (tmxMapInfo->getLayerAttribs() & TMXLayerAttribNone)
{ {
_xmlTileIndex = 0; _xmlTileIndex = 0;

View File

@ -62,6 +62,7 @@ enum {
TMXLayerAttribBase64 = 1 << 1, TMXLayerAttribBase64 = 1 << 1,
TMXLayerAttribGzip = 1 << 2, TMXLayerAttribGzip = 1 << 2,
TMXLayerAttribZlib = 1 << 3, TMXLayerAttribZlib = 1 << 3,
TMXLayerAttribCSV = 1 << 4,
}; };
enum { enum {

View File

@ -34,7 +34,7 @@ NS_CC_BEGIN
#define CURSOR_TIME_SHOW_HIDE 0.5f #define CURSOR_TIME_SHOW_HIDE 0.5f
#define CURSOR_DEFAULT_CHAR '|' #define CURSOR_DEFAULT_CHAR '|'
#define PASSWORD_STYLE_TEXT_DEFAULT "\xe2\x80\xa2"
static int _calcCharCount(const char * text) static int _calcCharCount(const char * text)
{ {
int n = 0; int n = 0;
@ -63,7 +63,7 @@ TextFieldTTF::TextFieldTTF()
, _placeHolder("") // prevent Label initWithString assertion , _placeHolder("") // prevent Label initWithString assertion
, _colorText(Color4B::WHITE) , _colorText(Color4B::WHITE)
, _secureTextEntry(false) , _secureTextEntry(false)
,_passwordStyleText("\u25CF") , _passwordStyleText(PASSWORD_STYLE_TEXT_DEFAULT)
, _cursorEnabled(false) , _cursorEnabled(false)
, _cursorPosition(0) , _cursorPosition(0)
, _cursorChar(CURSOR_DEFAULT_CHAR) , _cursorChar(CURSOR_DEFAULT_CHAR)
@ -134,7 +134,7 @@ bool TextFieldTTF::initWithPlaceHolder(const std::string& placeholder, const std
// If fontName is ttf file and it corrected, use TTFConfig // If fontName is ttf file and it corrected, use TTFConfig
if (FileUtils::getInstance()->isFileExist(fontName)) if (FileUtils::getInstance()->isFileExist(fontName))
{ {
TTFConfig ttfConfig(fontName.c_str(), fontSize, GlyphCollection::DYNAMIC); TTFConfig ttfConfig(fontName, fontSize, GlyphCollection::DYNAMIC);
if (setTTFConfig(ttfConfig)) if (setTTFConfig(ttfConfig))
{ {
break; break;

View File

@ -1147,6 +1147,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIButton.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIButton.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIAbstractCheckButton.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIAbstractCheckButton.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UICheckBox.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UICheckBox.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIEditBox\UIEditBoxImpl-common.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIRadioButton.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIRadioButton.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIDeprecated.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIDeprecated.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIEditBox\UIEditBox.cpp" /> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIEditBox\UIEditBox.cpp" />

View File

@ -3610,6 +3610,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\LocalizationManager.cpp"> <ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\LocalizationManager.cpp">
<Filter>cocostudio\components</Filter> <Filter>cocostudio\components</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UIEditBox\UIEditBoxImpl-common.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Filter Include="2d"> <Filter Include="2d">

View File

@ -642,6 +642,7 @@
<ClCompile Include="..\..\ui\UIButton.cpp" /> <ClCompile Include="..\..\ui\UIButton.cpp" />
<ClCompile Include="..\..\ui\UIAbstractCheckButton.cpp" /> <ClCompile Include="..\..\ui\UIAbstractCheckButton.cpp" />
<ClCompile Include="..\..\ui\UICheckBox.cpp" /> <ClCompile Include="..\..\ui\UICheckBox.cpp" />
<ClCompile Include="..\..\ui\UIEditBox\UIEditBoxImpl-common.cpp" />
<ClCompile Include="..\..\ui\UIRadioButton.cpp" /> <ClCompile Include="..\..\ui\UIRadioButton.cpp" />
<ClCompile Include="..\..\ui\UIDeprecated.cpp" /> <ClCompile Include="..\..\ui\UIDeprecated.cpp" />
<ClCompile Include="..\..\ui\UIEditBox\UIEditBox.cpp" /> <ClCompile Include="..\..\ui\UIEditBox\UIEditBox.cpp" />
@ -1248,6 +1249,7 @@
<ClInclude Include="..\..\renderer\CCBatchCommand.h" /> <ClInclude Include="..\..\renderer\CCBatchCommand.h" />
<ClInclude Include="..\..\renderer\CCCustomCommand.h" /> <ClInclude Include="..\..\renderer\CCCustomCommand.h" />
<ClInclude Include="..\..\renderer\CCTextureCube.h" /> <ClInclude Include="..\..\renderer\CCTextureCube.h" />
<ClInclude Include="..\..\ui\UIEditBox\UIEditBoxImpl-common.h" />
<ClInclude Include="..\..\ui\UITabControl.h" /> <ClInclude Include="..\..\ui\UITabControl.h" />
<ClInclude Include="..\CCAutoPolygon.h" /> <ClInclude Include="..\CCAutoPolygon.h" />
<ClInclude Include="..\CCCameraBackgroundBrush.h" /> <ClInclude Include="..\CCCameraBackgroundBrush.h" />

View File

@ -1990,6 +1990,9 @@
<ClCompile Include="..\..\ui\UITabControl.cpp"> <ClCompile Include="..\..\ui\UITabControl.cpp">
<Filter>ui\UIWidgets</Filter> <Filter>ui\UIWidgets</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\ui\UIEditBox\UIEditBoxImpl-common.cpp">
<Filter>ui\UIWidgets\EditBox</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\cocos2d.h" /> <ClInclude Include="..\..\cocos2d.h" />
@ -3887,6 +3890,9 @@
<ClInclude Include="..\..\ui\UITabControl.h"> <ClInclude Include="..\..\ui\UITabControl.h">
<Filter>ui\UIWidgets</Filter> <Filter>ui\UIWidgets</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\ui\UIEditBox\UIEditBoxImpl-common.h">
<Filter>ui\UIWidgets\EditBox</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\base\CCController-iOS.mm"> <None Include="..\..\base\CCController-iOS.mm">

View File

@ -10,7 +10,7 @@
<AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<ClCompile> <ClCompile>
<PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;_USRJSSTATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT> <CompileAsWinRT>true</CompileAsWinRT>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>

View File

@ -10,7 +10,7 @@
<AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<ClCompile> <ClCompile>
<PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;_USRJSSTATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT> <CompileAsWinRT>true</CompileAsWinRT>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>

View File

@ -4,6 +4,7 @@
<PropertyGroup Label="APP_DLLS"> <PropertyGroup Label="APP_DLLS">
<AngleBinPath Condition=" '$(AngleBinPath)' == '' ">$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\</AngleBinPath> <AngleBinPath Condition=" '$(AngleBinPath)' == '' ">$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\</AngleBinPath>
<CurlBinPath Condition=" '$(CurlBinPath)' == '' ">$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\</CurlBinPath> <CurlBinPath Condition=" '$(CurlBinPath)' == '' ">$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\</CurlBinPath>
<ZLibBinPath Condition=" '$(ZLibBinPath)' == '' ">$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform)\</ZLibBinPath>
<WebsocketsBinPath Condition=" '$(WebsocketsBinPath)' == '' ">$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\</WebsocketsBinPath> <WebsocketsBinPath Condition=" '$(WebsocketsBinPath)' == '' ">$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\</WebsocketsBinPath>
<SQLiteBinPath Condition=" '$(SQLiteBinPath)' == '' ">$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\</SQLiteBinPath> <SQLiteBinPath Condition=" '$(SQLiteBinPath)' == '' ">$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\</SQLiteBinPath>
<OggBinPath Condition=" '$(OggBinPath)' == '' ">$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\OggDecoder\prebuilt\$(Platform)\</OggBinPath> <OggBinPath Condition=" '$(OggBinPath)' == '' ">$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\OggDecoder\prebuilt\$(Platform)\</OggBinPath>
@ -14,6 +15,9 @@
</None> </None>
<None Include="$(AngleBinPath)libGLESv2.dll"> <None Include="$(AngleBinPath)libGLESv2.dll">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>
</None>
<None Include="$(ZLibBinPath)zlib.dll">
<DeploymentContent>true</DeploymentContent>
</None> </None>
<None Include="$(SQLiteBinPath)sqlite3.dll"> <None Include="$(SQLiteBinPath)sqlite3.dll">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>

View File

@ -248,7 +248,7 @@ void Animate3D::startWithTarget(Node *target)
action->_accTransTime = 0.0f; action->_accTransTime = 0.0f;
action->_weight = 1.0f; action->_weight = 1.0f;
action->_lastTime = 0.f; action->_lastTime = 0.f;
s_runningAnimates.erase(target);
s_fadeInAnimates[target] = this; s_fadeInAnimates[target] = this;
_accTransTime = 0.0f; _accTransTime = 0.0f;
_state = Animate3D::Animate3DState::FadeIn; _state = Animate3D::Animate3DState::FadeIn;

View File

@ -104,7 +104,7 @@ bool MotionStreak3D::initWithFade(float fade, float minSeg, float stroke, const
{ {
Node::setPosition(Vec2::ZERO); Node::setPosition(Vec2::ZERO);
setAnchorPoint(Vec2::ZERO); setAnchorPoint(Vec2::ZERO);
ignoreAnchorPointForPosition(true); setIgnoreAnchorPointForPosition(true);
_startingPositionInitialized = false; _startingPositionInitialized = false;
_positionR.setZero(); _positionR.setZero();

View File

@ -464,7 +464,7 @@ void Sprite3D::setMaterial(Material *material, int meshIndex)
if (meshIndex == -1) if (meshIndex == -1)
{ {
for (size_t i = 0; i < _meshes.size(); i++) for (ssize_t i = 0; i < _meshes.size(); i++)
{ {
_meshes.at(i)->setMaterial(i == 0 ? material : material->clone()); _meshes.at(i)->setMaterial(i == 0 ? material : material->clone());
} }
@ -774,7 +774,7 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
const auto lights = scene->getLights(); const auto lights = scene->getLights();
bool usingLight = false; bool usingLight = false;
for (const auto light : lights) { for (const auto light : lights) {
usingLight = (light->isEnabled() && (unsigned int)light->getLightFlag() & _lightMask) > 0; usingLight = light->isEnabled() && ((static_cast<unsigned int>(light->getLightFlag()) & _lightMask) > 0);
if (usingLight) if (usingLight)
break; break;
} }
@ -974,8 +974,8 @@ void Sprite3DCache::removeSprite3DData(const std::string& key)
if (it != _spriteDatas.end()) if (it != _spriteDatas.end())
{ {
delete it->second; delete it->second;
}
_spriteDatas.erase(it); _spriteDatas.erase(it);
}
} }
void Sprite3DCache::removeAllSprite3DData() void Sprite3DCache::removeAllSprite3DData()

View File

@ -294,7 +294,7 @@ Terrain::Terrain()
#endif #endif
} }
void Terrain::setChunksLOD(Vec3 cameraPos) void Terrain::setChunksLOD(const Vec3& cameraPos)
{ {
int chunk_amount_y = _imageHeight/_chunkSize.height; int chunk_amount_y = _imageHeight/_chunkSize.height;
int chunk_amount_x = _imageWidth/_chunkSize.width; int chunk_amount_x = _imageWidth/_chunkSize.width;
@ -369,9 +369,9 @@ float Terrain::getHeight(float x, float z, Vec3 * normal) const
} }
} }
float Terrain::getHeight(Vec2 pos, Vec3*Normal) const float Terrain::getHeight(const Vec2& pos, Vec3* normal) const
{ {
return getHeight(pos.x,pos.y,Normal); return getHeight(pos.x, pos.y, normal);
} }
float Terrain::getImageHeight(int pixel_x,int pixel_y) const float Terrain::getImageHeight(int pixel_x,int pixel_y) const
@ -606,7 +606,7 @@ void Terrain::setMaxDetailMapAmount(int max_value)
_maxDetailMapValue = max_value; _maxDetailMapValue = max_value;
} }
cocos2d::Vec2 Terrain::convertToTerrainSpace(Vec2 worldSpaceXZ) const cocos2d::Vec2 Terrain::convertToTerrainSpace(const Vec2& worldSpaceXZ) const
{ {
Vec2 pos(worldSpaceXZ.x,worldSpaceXZ.y); Vec2 pos(worldSpaceXZ.x,worldSpaceXZ.y);
@ -1638,14 +1638,14 @@ Terrain::DetailMap::DetailMap()
_detailMapSize = 35; _detailMapSize = 35;
} }
Terrain::Triangle::Triangle(Vec3 p1, Vec3 p2, Vec3 p3) Terrain::Triangle::Triangle(const Vec3& p1, const Vec3& p2, const Vec3& p3)
{ {
_p1 = p1; _p1 = p1;
_p2 = p2; _p2 = p2;
_p3 = p3; _p3 = p3;
} }
void Terrain::Triangle::transform(cocos2d::Mat4 matrix) void Terrain::Triangle::transform(const cocos2d::Mat4& matrix)
{ {
matrix.transformPoint(&_p1); matrix.transformPoint(&_p1);
matrix.transformPoint(&_p2); matrix.transformPoint(&_p2);

View File

@ -114,9 +114,9 @@ public:
*/ */
struct Triangle struct Triangle
{ {
Triangle(Vec3 p1, Vec3 p2, Vec3 p3); Triangle(const Vec3& p1, const Vec3& p2, const Vec3& p3);
bool getInsterctPoint(const Ray &ray, Vec3& interScetPoint) const; bool getInsterctPoint(const Ray &ray, Vec3& interScetPoint) const;
void transform(Mat4 matrix); void transform(const Mat4& matrix);
Vec3 _p1, _p2, _p3; Vec3 _p1, _p2, _p3;
}; };
@ -181,7 +181,7 @@ private:
{ {
/*constructor*/ /*constructor*/
TerrainVertexData(){}; TerrainVertexData(){};
TerrainVertexData(Vec3 v1, Tex2F v2) TerrainVertexData(const Vec3& v1, const Tex2F& v2)
{ {
_position = v1; _position = v1;
_texcoord = v2; _texcoord = v2;
@ -334,7 +334,7 @@ public:
* @param normal the specified position's normal vector in terrain . if this argument is NULL or nullptr,Normal calculation shall be skip. * @param normal the specified position's normal vector in terrain . if this argument is NULL or nullptr,Normal calculation shall be skip.
* @return the height value of the specified position of the terrain, if the (X,Z) position is out of the terrain bounds,it shall return 0; * @return the height value of the specified position of the terrain, if the (X,Z) position is out of the terrain bounds,it shall return 0;
**/ **/
float getHeight(Vec2 pos, Vec3*Normal = nullptr) const; float getHeight(const Vec2& pos, Vec3* normal = nullptr) const;
/**get the normal of the specified position in terrain /**get the normal of the specified position in terrain
* @return the normal vector of the specified position of the terrain. * @return the normal vector of the specified position of the terrain.
@ -387,7 +387,7 @@ public:
/** /**
* Convert a world Space position (X,Z) to terrain space position (X,Z) * Convert a world Space position (X,Z) to terrain space position (X,Z)
*/ */
Vec2 convertToTerrainSpace(Vec2 worldSpace) const; Vec2 convertToTerrainSpace(const Vec2& worldSpace) const;
/** /**
* reset the heightmap data. * reset the heightmap data.
@ -442,7 +442,7 @@ protected:
* recursively set each chunk's LOD * recursively set each chunk's LOD
* @param cameraPos the camera position in world space * @param cameraPos the camera position in world space
**/ **/
void setChunksLOD(Vec3 cameraPos); void setChunksLOD(const Vec3& cameraPos);
/** /**
* load Vertices from height filed for the whole terrain. * load Vertices from height filed for the whole terrain.

View File

@ -277,9 +277,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static
# define the macro to compile through support/zip_support/ioapi.c # define the macro to compile through support/zip_support/ioapi.c
LOCAL_CFLAGS := -DUSE_FILE32API LOCAL_CFLAGS := -DUSE_FILE32API
LOCAL_CFLAGS += -fexceptions LOCAL_CFLAGS += -fexceptions
LOCAL_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat LOCAL_CPPFLAGS := -Wno-deprecated-declarations
LOCAL_EXPORT_CFLAGS := -DUSE_FILE32API LOCAL_EXPORT_CFLAGS := -DUSE_FILE32API
LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -40,6 +40,8 @@
#include "audio/winrt/AudioEngine-winrt.h" #include "audio/winrt/AudioEngine-winrt.h"
#elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
#include "audio/linux/AudioEngine-linux.h" #include "audio/linux/AudioEngine-linux.h"
#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
#include "audio/tizen/AudioEngine-tizen.h"
#endif #endif
#define TIME_DELAY_PRECISION 0.0001 #define TIME_DELAY_PRECISION 0.0001

View File

@ -38,6 +38,7 @@
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCScheduler.h" #include "base/CCScheduler.h"
#include "platform/android/CCFileUtils-android.h" #include "platform/android/CCFileUtils-android.h"
#include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h"
using namespace cocos2d; using namespace cocos2d;
using namespace cocos2d::experimental; using namespace cocos2d::experimental;
@ -104,27 +105,31 @@ bool AudioPlayer::init(SLEngineItf engineEngine, SLObjectItf outputMixObject,con
SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, NULL, SL_CONTAINERTYPE_UNSPECIFIED}; SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, NULL, SL_CONTAINERTYPE_UNSPECIFIED};
audioSrc.pFormat = &format_mime; audioSrc.pFormat = &format_mime;
if (fileFullPath[0] != '/'){ if (fileFullPath[0] != '/') {
std::string relativePath = ""; off_t start, length;
std::string relativePath;
size_t position = fileFullPath.find("assets/"); size_t position = fileFullPath.find("assets/");
if (0 == position) { if (0 == position) {
// "assets/" is at the beginning of the path and we don't want it // "assets/" is at the beginning of the path and we don't want it
relativePath += fileFullPath.substr(strlen("assets/")); relativePath = fileFullPath.substr(strlen("assets/"));
} else { } else {
relativePath += fileFullPath; relativePath = fileFullPath;
} }
if (cocos2d::FileUtilsAndroid::getObbFile() != nullptr) {
_assetFd = getObbAssetFileDescriptorJNI(relativePath.c_str(), &start, &length);
} else {
auto asset = AAssetManager_open(cocos2d::FileUtilsAndroid::getAssetManager(), relativePath.c_str(), AASSET_MODE_UNKNOWN); auto asset = AAssetManager_open(cocos2d::FileUtilsAndroid::getAssetManager(), relativePath.c_str(), AASSET_MODE_UNKNOWN);
// open asset as file descriptor // open asset as file descriptor
off_t start, length;
_assetFd = AAsset_openFileDescriptor(asset, &start, &length); _assetFd = AAsset_openFileDescriptor(asset, &start, &length);
if (_assetFd <= 0){
AAsset_close(asset); AAsset_close(asset);
}
if (_assetFd <= 0) {
CCLOGERROR("Failed to open file descriptor for '%s'", fileFullPath.c_str());
break; break;
} }
AAsset_close(asset);
// configure audio source // configure audio source
loc_fd = {SL_DATALOCATOR_ANDROIDFD, _assetFd, start, length}; loc_fd = {SL_DATALOCATOR_ANDROIDFD, _assetFd, start, length};

View File

@ -75,12 +75,12 @@ AndroidJavaEngine::~AndroidJavaEngine()
void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) { void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) {
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "preloadBackgroundMusic", filePath); JniHelper::callStaticVoidMethod(helperClassName, "preloadBackgroundMusic", fullPath);
} }
void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) { void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) {
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", filePath, loop); JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", fullPath, loop);
} }
void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) { void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) {

View File

@ -24,7 +24,8 @@ THE SOFTWARE.
#include "audio/include/SimpleAudioEngine.h" #include "audio/include/SimpleAudioEngine.h"
#include "audio/ios/SimpleAudioEngine_objc.h" #include "audio/ios/SimpleAudioEngine_objc.h"
#include "cocos2d.h" #include "platform/CCFileUtils.h"
USING_NS_CC; USING_NS_CC;
static void static_end() static void static_end()

View File

@ -2,20 +2,27 @@
* @author cesarpachon * @author cesarpachon
*/ */
#include <cstring> #include <cstring>
#include <cstdint>
#include "audio/linux/AudioEngine-linux.h" #include "audio/linux/AudioEngine-linux.h"
#include "cocos2d.h"
#include "base/CCDirector.h"
#include "base/CCScheduler.h"
#include "platform/CCFileUtils.h"
using namespace cocos2d; using namespace cocos2d;
using namespace cocos2d::experimental; using namespace cocos2d::experimental;
AudioEngineImpl * g_AudioEngineImpl = nullptr; AudioEngineImpl * g_AudioEngineImpl = nullptr;
void ERRCHECKWITHEXIT(FMOD_RESULT result) { void ERRCHECKWITHEXIT(FMOD_RESULT result)
{
if (result != FMOD_OK) { if (result != FMOD_OK) {
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
} }
} }
bool ERRCHECK(FMOD_RESULT result) { bool ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK) { if (result != FMOD_OK) {
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
return true; return true;
@ -28,28 +35,27 @@ FMOD_RESULT F_CALLBACK channelCallback(FMOD_CHANNELCONTROL *channelcontrol,
FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype, FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype,
void *commandData1, void *commandData2) void *commandData1, void *commandData2)
{ {
if (controltype == FMOD_CHANNELCONTROL_CHANNEL && callbacktype == FMOD_CHANNELCONTROL_CALLBACK_END) {
if(controltype == FMOD_CHANNELCONTROL_CHANNEL && callbacktype == FMOD_CHANNELCONTROL_CALLBACK_END){
g_AudioEngineImpl->onSoundFinished((FMOD::Channel *)channelcontrol); g_AudioEngineImpl->onSoundFinished((FMOD::Channel *)channelcontrol);
}else{
} }
return FMOD_OK; return FMOD_OK;
} }
AudioEngineImpl::AudioEngineImpl()
{
}
AudioEngineImpl::AudioEngineImpl(){ AudioEngineImpl::~AudioEngineImpl()
}; {
AudioEngineImpl::~AudioEngineImpl(){
FMOD_RESULT result; FMOD_RESULT result;
result = pSystem->close(); result = pSystem->close();
ERRCHECKWITHEXIT(result); ERRCHECKWITHEXIT(result);
result = pSystem->release(); result = pSystem->release();
ERRCHECKWITHEXIT(result); ERRCHECKWITHEXIT(result);
}; }
bool AudioEngineImpl::init()
bool AudioEngineImpl::init(){ {
FMOD_RESULT result; FMOD_RESULT result;
/* /*
Create a System object and initialize. Create a System object and initialize.
@ -72,11 +78,12 @@ bool AudioEngineImpl::init(){
g_AudioEngineImpl = this; g_AudioEngineImpl = this;
return true; return true;
}; }
int AudioEngineImpl::play2d(const std::string &fileFullPath ,bool loop ,float volume){ int AudioEngineImpl::play2d(const std::string &fileFullPath, bool loop, float volume)
{
int id = preload(fileFullPath, nullptr); int id = preload(fileFullPath, nullptr);
if(id >= 0){ if (id >= 0) {
mapChannelInfo[id].loop=loop; mapChannelInfo[id].loop=loop;
mapChannelInfo[id].channel->setPaused(true); mapChannelInfo[id].channel->setPaused(true);
mapChannelInfo[id].volume = volume; mapChannelInfo[id].volume = volume;
@ -84,50 +91,56 @@ int AudioEngineImpl::play2d(const std::string &fileFullPath ,bool loop ,float vo
resume(id); resume(id);
} }
return id; return id;
}; }
void AudioEngineImpl::setVolume(int audioID,float volume){ void AudioEngineImpl::setVolume(int audioID, float volume)
try{ {
try {
mapChannelInfo[audioID].channel->setVolume(volume); mapChannelInfo[audioID].channel->setVolume(volume);
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::setVolume: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::setVolume: invalid audioID: %d\n", audioID);
} }
}; }
void AudioEngineImpl::setLoop(int audioID, bool loop){ void AudioEngineImpl::setLoop(int audioID, bool loop)
try{ {
mapChannelInfo[audioID].channel->setLoopCount(loop?-1:0); try {
}catch(const std::out_of_range& oor){ mapChannelInfo[audioID].channel->setLoopCount(loop ? -1 : 0);
}
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::setLoop: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::setLoop: invalid audioID: %d\n", audioID);
} }
}; }
bool AudioEngineImpl::pause(int audioID){ bool AudioEngineImpl::pause(int audioID)
try{ {
try {
mapChannelInfo[audioID].channel->setPaused(true); mapChannelInfo[audioID].channel->setPaused(true);
AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PAUSED; AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PAUSED;
return true; return true;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::pause: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::pause: invalid audioID: %d\n", audioID);
return false; return false;
} }
}; }
bool AudioEngineImpl::resume(int audioID){ bool AudioEngineImpl::resume(int audioID)
try{ {
try {
if(!mapChannelInfo[audioID].channel){ if (!mapChannelInfo[audioID].channel) {
FMOD::Channel *channel = nullptr; FMOD::Channel *channel = nullptr;
FMOD::ChannelGroup *channelgroup = nullptr; FMOD::ChannelGroup *channelgroup = nullptr;
//starts the sound in pause mode, use the channel to unpause //starts the sound in pause mode, use the channel to unpause
FMOD_RESULT result = pSystem->playSound(mapChannelInfo[audioID].sound, channelgroup, true, &channel); FMOD_RESULT result = pSystem->playSound(mapChannelInfo[audioID].sound, channelgroup, true, &channel);
if(ERRCHECK(result)){ if (ERRCHECK(result)) {
return false; return false;
} }
channel->setMode(mapChannelInfo[audioID].loop?FMOD_LOOP_NORMAL:FMOD_LOOP_OFF); channel->setMode(mapChannelInfo[audioID].loop ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF);
channel->setLoopCount(mapChannelInfo[audioID].loop?-1:0); channel->setLoopCount(mapChannelInfo[audioID].loop ? -1 : 0);
channel->setVolume(mapChannelInfo[audioID].volume); channel->setVolume(mapChannelInfo[audioID].volume);
channel->setUserData((void *)mapChannelInfo[audioID].id); channel->setUserData(reinterpret_cast<void *>(static_cast<std::intptr_t>(mapChannelInfo[audioID].id)));
mapChannelInfo[audioID].channel = channel; mapChannelInfo[audioID].channel = channel;
} }
@ -135,128 +148,141 @@ try{
AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING;
return true; return true;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::resume: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::resume: invalid audioID: %d\n", audioID);
return false; return false;
} }
}; }
bool AudioEngineImpl::stop(int audioID){ bool AudioEngineImpl::stop(int audioID)
try{ {
try {
mapChannelInfo[audioID].channel->stop(); mapChannelInfo[audioID].channel->stop();
mapChannelInfo[audioID].channel = nullptr; mapChannelInfo[audioID].channel = nullptr;
return true; return true;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::stop: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::stop: invalid audioID: %d\n", audioID);
return false; return false;
} }
}; }
void AudioEngineImpl::stopAll(){ void AudioEngineImpl::stopAll()
{
for (auto it = mapChannelInfo.begin(); it != mapChannelInfo.end(); ++it) { for (auto it = mapChannelInfo.begin(); it != mapChannelInfo.end(); ++it) {
ChannelInfo & audioRef = it->second; ChannelInfo & audioRef = it->second;
audioRef.channel->stop(); audioRef.channel->stop();
audioRef.channel = nullptr; audioRef.channel = nullptr;
} }
}; }
float AudioEngineImpl::getDuration(int audioID){ float AudioEngineImpl::getDuration(int audioID)
try{ {
try {
FMOD::Sound * sound = mapChannelInfo[audioID].sound; FMOD::Sound * sound = mapChannelInfo[audioID].sound;
unsigned int length; unsigned int length;
FMOD_RESULT result = sound->getLength(&length, FMOD_TIMEUNIT_MS); FMOD_RESULT result = sound->getLength(&length, FMOD_TIMEUNIT_MS);
ERRCHECK(result); ERRCHECK(result);
float duration = (float)length / 1000.0f; float duration = (float)length / 1000.0f;
return duration; return duration;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::getDuration: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::getDuration: invalid audioID: %d\n", audioID);
return AudioEngine::TIME_UNKNOWN; return AudioEngine::TIME_UNKNOWN;
} }
}; }
float AudioEngineImpl::getCurrentTime(int audioID){ float AudioEngineImpl::getCurrentTime(int audioID)
try{ {
try {
unsigned int position; unsigned int position;
FMOD_RESULT result = mapChannelInfo[audioID].channel->getPosition(&position, FMOD_TIMEUNIT_MS); FMOD_RESULT result = mapChannelInfo[audioID].channel->getPosition(&position, FMOD_TIMEUNIT_MS);
ERRCHECK(result); ERRCHECK(result);
float currenttime = position /1000.0f; float currenttime = position /1000.0f;
return currenttime; return currenttime;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::getCurrentTime: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::getCurrentTime: invalid audioID: %d\n", audioID);
return AudioEngine::TIME_UNKNOWN; return AudioEngine::TIME_UNKNOWN;
} }
}; }
bool AudioEngineImpl::setCurrentTime(int audioID, float time){ bool AudioEngineImpl::setCurrentTime(int audioID, float time)
try{ {
try {
unsigned int position = (unsigned int)(time * 1000.0f); unsigned int position = (unsigned int)(time * 1000.0f);
FMOD_RESULT result = mapChannelInfo[audioID].channel->setPosition(position, FMOD_TIMEUNIT_MS); FMOD_RESULT result = mapChannelInfo[audioID].channel->setPosition(position, FMOD_TIMEUNIT_MS);
ERRCHECK(result); ERRCHECK(result);
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::setCurrentTime: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::setCurrentTime: invalid audioID: %d\n", audioID);
} }
}; }
void AudioEngineImpl::setFinishCallback(int audioID, const std::function<void (int, const std::string &)> &callback){ void AudioEngineImpl::setFinishCallback(int audioID, const std::function<void (int, const std::string &)> &callback)
try{ {
try {
FMOD::Channel * channel = mapChannelInfo[audioID].channel; FMOD::Channel * channel = mapChannelInfo[audioID].channel;
mapChannelInfo[audioID].callback = callback; mapChannelInfo[audioID].callback = callback;
FMOD_RESULT result = channel->setCallback(channelCallback); FMOD_RESULT result = channel->setCallback(channelCallback);
ERRCHECK(result); ERRCHECK(result);
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::setFinishCallback: invalid audioID: %d\n", audioID); printf("AudioEngineImpl::setFinishCallback: invalid audioID: %d\n", audioID);
} }
}; }
void AudioEngineImpl::onSoundFinished(FMOD::Channel * channel)
void AudioEngineImpl::onSoundFinished(FMOD::Channel * channel){ {
size_t id; int id = 0;
try{ try {
void * data; void * data;
channel->getUserData(&data); channel->getUserData(&data);
id = (size_t) data; id = static_cast<int>(reinterpret_cast<std::intptr_t>(data));
if(mapChannelInfo[id].callback){ if (mapChannelInfo[id].callback) {
mapChannelInfo[id].callback(id, mapChannelInfo[id].path); mapChannelInfo[id].callback(id, mapChannelInfo[id].path);
} }
mapChannelInfo[id].channel = nullptr; mapChannelInfo[id].channel = nullptr;
}catch(const std::out_of_range& oor){ }
catch (const std::out_of_range& oor) {
printf("AudioEngineImpl::onSoundFinished: invalid audioID: %d\n", id); printf("AudioEngineImpl::onSoundFinished: invalid audioID: %d\n", id);
} }
}; }
void AudioEngineImpl::uncache(const std::string& path)
void AudioEngineImpl::uncache(const std::string& path){ {
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path); std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
std::map<std::string, FMOD::Sound *>::const_iterator it = mapSound.find(fullPath); std::map<std::string, FMOD::Sound *>::const_iterator it = mapSound.find(fullPath);
if(it!=mapSound.end()){ if (it!=mapSound.end()) {
FMOD::Sound * sound = it->second; FMOD::Sound * sound = it->second;
if(sound){ if (sound) {
sound->release(); sound->release();
} }
mapSound.erase(it); mapSound.erase(it);
} }
}; }
void AudioEngineImpl::uncacheAll()
void AudioEngineImpl::uncacheAll(){ {
for (auto it = mapSound.cbegin(); it != mapSound.cend(); ++it) { for (auto it = mapSound.cbegin(); it != mapSound.cend(); ++it) {
auto sound = it->second; auto sound = it->second;
if(sound){ if (sound) {
sound->release(); sound->release();
} }
} }
mapSound.clear(); mapSound.clear();
}; }
int AudioEngineImpl::preload(const std::string& filePath, std::function<void(bool isSuccess)> callback)
int AudioEngineImpl::preload(const std::string& filePath, std::function<void(bool isSuccess)> callback){ {
FMOD::Sound * sound = findSound(filePath); FMOD::Sound * sound = findSound(filePath);
if(!sound){ if (!sound) {
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filePath); std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filePath);
FMOD_RESULT result = pSystem->createSound(fullPath.c_str(), FMOD_LOOP_OFF, 0, &sound); FMOD_RESULT result = pSystem->createSound(fullPath.c_str(), FMOD_LOOP_OFF, 0, &sound);
if (ERRCHECK(result)){ if (ERRCHECK(result)) {
printf("sound effect in %s could not be preload\n", filePath.c_str()); printf("sound effect in %s could not be preload\n", filePath.c_str());
if(callback){ if (callback) {
callback(false); callback(false);
} }
return -1; return -1;
@ -264,39 +290,38 @@ int AudioEngineImpl::preload(const std::string& filePath, std::function<void(boo
mapSound[fullPath] = sound; mapSound[fullPath] = sound;
} }
int id = mapChannelInfo.size() + 1; int id = static_cast<int>(mapChannelInfo.size()) + 1;
auto& chanelInfo = mapChannelInfo[id]; auto& chanelInfo = mapChannelInfo[id];
chanelInfo.sound = sound; chanelInfo.sound = sound;
chanelInfo.id = (size_t) id; chanelInfo.id = id;
chanelInfo.channel = nullptr; chanelInfo.channel = nullptr;
chanelInfo.callback = nullptr; chanelInfo.callback = nullptr;
chanelInfo.path = filePath; chanelInfo.path = filePath;
//we are going to use UserData to store pointer to Channel when playing //we are going to use UserData to store pointer to Channel when playing
chanelInfo.sound->setUserData((void *)id); chanelInfo.sound->setUserData(reinterpret_cast<void *>(static_cast<std::intptr_t>(id)));
if(callback){ if (callback) {
callback(true); callback(true);
} }
return id; return id;
};
void AudioEngineImpl::update(float dt){
pSystem->update();
};
FMOD::Sound * AudioEngineImpl::findSound(const std::string &path){
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
std::map<std::string, FMOD::Sound *>::const_iterator it = mapSound.find(fullPath);
return (it!=mapSound.end())?(it->second):nullptr;
} }
void AudioEngineImpl::update(float dt)
{
pSystem->update();
}
FMOD::Channel * AudioEngineImpl::getChannel(FMOD::Sound *sound){ FMOD::Sound * AudioEngineImpl::findSound(const std::string &path)
size_t id; {
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
std::map<std::string, FMOD::Sound *>::const_iterator it = mapSound.find(fullPath);
return (it != mapSound.end()) ? (it->second) : nullptr;
}
FMOD::Channel * AudioEngineImpl::getChannel(FMOD::Sound *sound)
{
void * data; void * data;
sound->getUserData(&data); sound->getUserData(&data);
id = (size_t) data; int id = static_cast<int>(reinterpret_cast<std::intptr_t>(data));
return mapChannelInfo[id].channel; return mapChannelInfo[id].channel;
}; }

View File

@ -83,7 +83,7 @@ private:
FMOD::Channel * getChannel(FMOD::Sound *); FMOD::Channel * getChannel(FMOD::Sound *);
struct ChannelInfo{ struct ChannelInfo{
size_t id; int id;
std::string path; std::string path;
FMOD::Sound * sound; FMOD::Sound * sound;
FMOD::Channel * channel; FMOD::Channel * channel;

View File

@ -7,8 +7,7 @@ using namespace CocosDenshion;
using namespace cocos2d; using namespace cocos2d;
using namespace cocos2d::experimental; using namespace cocos2d::experimental;
struct SimpleAudioEngineLinux {
struct SimpleAudioEngineLinux{
SimpleAudioEngine * engine = nullptr; SimpleAudioEngine * engine = nullptr;
int musicid; int musicid;
float effectsvolume; float effectsvolume;
@ -17,111 +16,124 @@ struct SimpleAudioEngineLinux{
SimpleAudioEngineLinux * g_SimpleAudioEngineLinux = nullptr; SimpleAudioEngineLinux * g_SimpleAudioEngineLinux = nullptr;
SimpleAudioEngine* SimpleAudioEngine::getInstance()
SimpleAudioEngine* SimpleAudioEngine::getInstance(){ {
if(!g_SimpleAudioEngineLinux){ if (!g_SimpleAudioEngineLinux) {
g_SimpleAudioEngineLinux = new SimpleAudioEngineLinux(); g_SimpleAudioEngineLinux = new SimpleAudioEngineLinux();
g_SimpleAudioEngineLinux->engine = new SimpleAudioEngine(); g_SimpleAudioEngineLinux->engine = new SimpleAudioEngine();
} }
return g_SimpleAudioEngineLinux->engine; return g_SimpleAudioEngineLinux->engine;
}; }
void SimpleAudioEngine::end(){ void SimpleAudioEngine::end()
if(g_SimpleAudioEngineLinux){ {
if (g_SimpleAudioEngineLinux) {
delete g_SimpleAudioEngineLinux->engine; delete g_SimpleAudioEngineLinux->engine;
delete g_SimpleAudioEngineLinux; delete g_SimpleAudioEngineLinux;
} }
g_SimpleAudioEngineLinux = nullptr; g_SimpleAudioEngineLinux = nullptr;
}; }
SimpleAudioEngine::SimpleAudioEngine()
SimpleAudioEngine::SimpleAudioEngine(){ {
g_SimpleAudioEngineLinux->musicid = -1; g_SimpleAudioEngineLinux->musicid = -1;
g_SimpleAudioEngineLinux->effectsvolume = 1.0f; g_SimpleAudioEngineLinux->effectsvolume = 1.0f;
}; }
SimpleAudioEngine::~SimpleAudioEngine(){ SimpleAudioEngine::~SimpleAudioEngine()
{
}
}; void SimpleAudioEngine::preloadBackgroundMusic(const char* filePath)
{
void SimpleAudioEngine::preloadBackgroundMusic(const char* filePath){
g_SimpleAudioEngineLinux->musicpath = filePath; g_SimpleAudioEngineLinux->musicpath = filePath;
AudioEngine::preload(filePath); AudioEngine::preload(filePath);
}; }
void SimpleAudioEngine::playBackgroundMusic(const char* filePath, bool loop){ void SimpleAudioEngine::playBackgroundMusic(const char* filePath, bool loop)
{
g_SimpleAudioEngineLinux->musicpath = filePath; g_SimpleAudioEngineLinux->musicpath = filePath;
g_SimpleAudioEngineLinux->musicid = AudioEngine::play2d(filePath, loop); g_SimpleAudioEngineLinux->musicid = AudioEngine::play2d(filePath, loop);
}; }
void SimpleAudioEngine::stopBackgroundMusic(bool releaseData){ void SimpleAudioEngine::stopBackgroundMusic(bool releaseData)
{
AudioEngine::stop(g_SimpleAudioEngineLinux->musicid); AudioEngine::stop(g_SimpleAudioEngineLinux->musicid);
if(releaseData){ if (releaseData) {
AudioEngine::uncache(g_SimpleAudioEngineLinux->musicpath.c_str()); AudioEngine::uncache(g_SimpleAudioEngineLinux->musicpath.c_str());
} }
}; }
void SimpleAudioEngine::pauseBackgroundMusic(){ void SimpleAudioEngine::pauseBackgroundMusic()
{
AudioEngine::pause(g_SimpleAudioEngineLinux->musicid); AudioEngine::pause(g_SimpleAudioEngineLinux->musicid);
}; }
void SimpleAudioEngine::resumeBackgroundMusic(){ void SimpleAudioEngine::resumeBackgroundMusic()
{
AudioEngine::resume(g_SimpleAudioEngineLinux->musicid); AudioEngine::resume(g_SimpleAudioEngineLinux->musicid);
}; }
void SimpleAudioEngine::rewindBackgroundMusic(){ void SimpleAudioEngine::rewindBackgroundMusic()
{
AudioEngine::setCurrentTime(g_SimpleAudioEngineLinux->musicid, 0); AudioEngine::setCurrentTime(g_SimpleAudioEngineLinux->musicid, 0);
}; }
bool SimpleAudioEngine::willPlayBackgroundMusic(){ bool SimpleAudioEngine::willPlayBackgroundMusic()
{
return g_SimpleAudioEngineLinux->musicid != -1; return g_SimpleAudioEngineLinux->musicid != -1;
}; }
bool SimpleAudioEngine::isBackgroundMusicPlaying(){ bool SimpleAudioEngine::isBackgroundMusicPlaying()
{
return AudioEngine::getState(g_SimpleAudioEngineLinux->musicid) == AudioEngine::AudioState::PLAYING; return AudioEngine::getState(g_SimpleAudioEngineLinux->musicid) == AudioEngine::AudioState::PLAYING;
}; }
// //
// properties // properties
// //
/** /**
* The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum. * The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum.
* @js getMusicVolume * @js getMusicVolume
* @lua getMusicVolume * @lua getMusicVolume
*/ */
float SimpleAudioEngine::getBackgroundMusicVolume(){ float SimpleAudioEngine::getBackgroundMusicVolume()
{
return AudioEngine::getVolume(g_SimpleAudioEngineLinux->musicid); return AudioEngine::getVolume(g_SimpleAudioEngineLinux->musicid);
}; }
/** /**
* Set the volume of background music. * Set the volume of background music.
* *
* @param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum. * @param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum.
* @js setMusicVolume * @js setMusicVolume
* @lua setMusicVolume * @lua setMusicVolume
*/ */
void SimpleAudioEngine::setBackgroundMusicVolume(float volume){ void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
{
AudioEngine::setVolume(g_SimpleAudioEngineLinux->musicid, volume); AudioEngine::setVolume(g_SimpleAudioEngineLinux->musicid, volume);
}; }
/** /**
* The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum. * The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum.
*/ */
float SimpleAudioEngine::getEffectsVolume(){ float SimpleAudioEngine::getEffectsVolume()
{
return g_SimpleAudioEngineLinux->effectsvolume; return g_SimpleAudioEngineLinux->effectsvolume;
}; }
/** /**
* Set the volume of sound effects. * Set the volume of sound effects.
* *
* @param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum. * @param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum.
*/ */
void SimpleAudioEngine::setEffectsVolume(float volume){ void SimpleAudioEngine::setEffectsVolume(float volume)
{
g_SimpleAudioEngineLinux->effectsvolume = volume; g_SimpleAudioEngineLinux->effectsvolume = volume;
}; }
/** /**
* Play sound effect with a file path, pitch, pan and gain. * Play sound effect with a file path, pitch, pan and gain.
* *
* @param filePath The path of the effect file. * @param filePath The path of the effect file.
@ -135,59 +147,66 @@ SimpleAudioEngine* SimpleAudioEngine::getInstance(){
* - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled; * - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled;
* - no pitch/pan/gain on win32. * - no pitch/pan/gain on win32.
*/ */
unsigned int SimpleAudioEngine::playEffect(const char* filePath, bool loop, float pitch, float pan, float gain){ unsigned int SimpleAudioEngine::playEffect(const char* filePath, bool loop, float pitch, float pan, float gain)
{
return AudioEngine::play2d(filePath, loop, gain); return AudioEngine::play2d(filePath, loop, gain);
}; }
/** /**
* Pause playing sound effect. * Pause playing sound effect.
* *
* @param soundId The return value of function playEffect. * @param soundId The return value of function playEffect.
*/ */
void SimpleAudioEngine::pauseEffect(unsigned int soundId){ void SimpleAudioEngine::pauseEffect(unsigned int soundId)
{
AudioEngine::pause(soundId); AudioEngine::pause(soundId);
}; }
/** /**
* Pause all playing sound effect. * Pause all playing sound effect.
*/ */
void SimpleAudioEngine::pauseAllEffects(){ void SimpleAudioEngine::pauseAllEffects()
{
AudioEngine::pauseAll(); AudioEngine::pauseAll();
}; }
/** /**
* Resume playing sound effect. * Resume playing sound effect.
* *
* @param soundId The return value of function playEffect. * @param soundId The return value of function playEffect.
*/ */
void SimpleAudioEngine::resumeEffect(unsigned int soundId){ void SimpleAudioEngine::resumeEffect(unsigned int soundId)
{
AudioEngine::resume(soundId); AudioEngine::resume(soundId);
}; }
/** /**
* Resume all playing sound effect. * Resume all playing sound effect.
*/ */
void SimpleAudioEngine::resumeAllEffects(){ void SimpleAudioEngine::resumeAllEffects()
{
AudioEngine::resumeAll(); AudioEngine::resumeAll();
}; }
/** /**
* Stop playing sound effect. * Stop playing sound effect.
* *
* @param soundId The return value of function playEffect. * @param soundId The return value of function playEffect.
*/ */
void SimpleAudioEngine::stopEffect(unsigned int soundId){ void SimpleAudioEngine::stopEffect(unsigned int soundId)
{
AudioEngine::stop(soundId); AudioEngine::stop(soundId);
}; }
/** /**
* Stop all playing sound effects. * Stop all playing sound effects.
*/ */
void SimpleAudioEngine::stopAllEffects(){ void SimpleAudioEngine::stopAllEffects()
{
AudioEngine::stopAll(); AudioEngine::stopAll();
}; }
/** /**
* Preload a compressed audio file. * Preload a compressed audio file.
* *
* The compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine. * The compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine.
@ -195,17 +214,17 @@ SimpleAudioEngine* SimpleAudioEngine::getInstance(){
* @param filePath The path of the effect file. * @param filePath The path of the effect file.
* @js NA * @js NA
*/ */
void SimpleAudioEngine::preloadEffect(const char* filePath){ void SimpleAudioEngine::preloadEffect(const char* filePath)
{
AudioEngine::preload(filePath); AudioEngine::preload(filePath);
}; }
/** /**
* Unload the preloaded effect from internal buffer. * Unload the preloaded effect from internal buffer.
* *
* @param filePath The path of the effect file. * @param filePath The path of the effect file.
*/ */
void SimpleAudioEngine::unloadEffect(const char* filePath){ void SimpleAudioEngine::unloadEffect(const char* filePath)
{
AudioEngine::uncache(filePath); AudioEngine::uncache(filePath);
}; }

View File

@ -9,7 +9,7 @@
#else #else
#include <AL/al.h> #include <AL/al.h>
#endif #endif
#include "cocos2d.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN #if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
#define DISABLE_VORBIS #define DISABLE_VORBIS

View File

@ -0,0 +1,402 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
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/CCPlatformConfig.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
#include "audio/tizen/AudioEngine-tizen.h"
// for native asset manager
#include <condition_variable>
#include <sys/types.h>
#include <sound_manager.h>
#include "audio/include/AudioEngine.h"
#include "base/CCDirector.h"
#include "base/CCScheduler.h"
#include "platform/CCFileUtils.h"
#include <queue>
class AudioEngineThreadPool
{
public:
AudioEngineThreadPool()
: _running(true) {
_threads = std::thread(std::bind(&AudioEngineThreadPool::threadFunc, this));
}
~AudioEngineThreadPool()
{
_running = false;
_sleepCondition.notify_one();
_threads.join();
}
void addTask(const std::function<void()> &task) {
_tasks.push(task);
_sleepCondition.notify_one();
}
private:
bool _running;
std::thread _threads;
std::queue< std::function<void ()> > _tasks;
void threadFunc(void) {
while (true) {
std::function<void ()> task = nullptr;
if (_tasks.empty())
{
if (!_running)
{
break;
}
std::unique_lock<std::mutex> lk(_sleepMutex);
_sleepCondition.wait(lk);
continue;
}
task = _tasks.front();
task();
_tasks.pop();
}
}
std::mutex _sleepMutex;
std::condition_variable _sleepCondition;
};
static AudioEngineThreadPool* _threadPool = nullptr;
using namespace cocos2d;
using namespace cocos2d::experimental;
AudioPlayer::AudioPlayer()
: _playerHandle(nullptr)
, _finishCallback(nullptr)
, _initCallback(nullptr)
, _duration(0.0f)
, _playOver(false)
, _initSucceed(false)
{
}
static void _stopPlayer(player_h player)
{
player_state_e state = PLAYER_STATE_NONE;
player_get_state(player, &state);
if (state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED)
{
player_stop(player);
}
player_unprepare(player);
}
static void _pausePlayer(player_h player)
{
player_state_e state;
player_get_state(player, &state);
if(state == PLAYER_STATE_PLAYING)
{
player_pause(player);
}
}
static void _resumePlayer(player_h player)
{
player_state_e state;
player_get_state(player, &state);
if(state != PLAYER_STATE_PLAYING)
{
player_start(player);
}
}
AudioPlayer::~AudioPlayer()
{
_taskMutex.lock();
_threadPool->addTask(std::bind(_stopPlayer, _playerHandle));
_threadPool->addTask(std::bind(player_destroy, _playerHandle));
_taskMutex.unlock();
}
void AudioPlayer::stopPlayer()
{
_playOver = true;
}
static void completed_callback(void* user_data)
{
AudioPlayer* player = (AudioPlayer*)user_data;
player->stopPlayer();
}
void AudioPlayer::init(const std::string& fileFullPath, float volume, bool loop)
{
do
{
player_h player;
auto playerRet = player_create(&player);
if(playerRet != PLAYER_ERROR_NONE)
{
log("Fail to create player.Error code:%d",playerRet);
break;
}
_playerHandle = player;
playerRet = player_set_uri(player, fileFullPath.c_str());
if(playerRet != PLAYER_ERROR_NONE)
{
log("Fail to sets the data source for player.Error code:%d",playerRet);
break;
}
player_set_volume(player, volume, volume);
player_set_completed_cb(player, completed_callback, this);
if (loop)
{
player_set_looping(player, true);
}
playerRet = player_prepare(player);
if(playerRet != PLAYER_ERROR_NONE){
log("Fail to prepares the media player for playback.Error code:%d",playerRet);
break;
}
playerRet = player_start(player);
if(playerRet != PLAYER_ERROR_NONE){
log("Fail to starts playback.Error code:%d",playerRet);
break;
}
_initSucceed = true;
} while (0);
if (_initCallback)
{
_initCallback();
}
_taskMutex.unlock();
}
//====================================================
AudioEngineImpl::AudioEngineImpl()
: currentAudioID(0)
, _lazyInitLoop(true)
{
}
AudioEngineImpl::~AudioEngineImpl()
{
this->stopAll();
if (_threadPool)
{
delete _threadPool;
_threadPool = nullptr;
}
auto scheduler = Director::getInstance()->getScheduler();
scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this);
}
bool AudioEngineImpl::init()
{
sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START,
SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
if (!_threadPool)
{
_threadPool = new (std::nothrow) AudioEngineThreadPool();
}
return true;
}
int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume)
{
auto audioId = AudioEngine::INVALID_AUDIO_ID;
do
{
audioId = currentAudioID++;
auto& player = _audioPlayers[audioId];
player._audioID = audioId;
player._initCallback = std::bind(&AudioEngineImpl::initPlayerCallback,this,&player,audioId);
player._taskMutex.lock();
_threadPool->addTask(std::bind(&AudioPlayer::init,&player,FileUtils::getInstance()->fullPathForFilename(filePath), volume, loop));
if (_lazyInitLoop) {
_lazyInitLoop = false;
auto scheduler = Director::getInstance()->getScheduler();
scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.03f, false);
}
} while (0);
return audioId;
}
void AudioEngineImpl::initPlayerCallback(AudioPlayer *player, int audioID)
{
if (player->_initSucceed)
{
AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING;
}
else
{
_threadMutex.lock();
_toRemoveAudioIDs.push_back(audioID);
_threadMutex.unlock();
}
}
void AudioEngineImpl::update(float dt)
{
if (_threadMutex.try_lock()) {
int audioID;
size_t removeAudioCount = _toRemoveAudioIDs.size();
for (size_t index = 0; index < removeAudioCount; ++index) {
audioID = _toRemoveAudioIDs[index];
auto playerIt = _audioPlayers.find(audioID);
if (playerIt != _audioPlayers.end()) {
if(playerIt->second._finishCallback) {
auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID];
playerIt->second._finishCallback(audioID, *audioInfo.filePath);
}
_audioPlayers.erase(audioID);
AudioEngine::remove(audioID);
}
}
_threadMutex.unlock();
}
auto itend = _audioPlayers.end();
for (auto iter = _audioPlayers.begin(); iter != itend; ++iter)
{
if(iter->second._playOver)
{
if (iter->second._finishCallback)
iter->second._finishCallback(iter->second._audioID, *AudioEngine::_audioIDInfoMap[iter->second._audioID].filePath);
AudioEngine::remove(iter->second._audioID);
_audioPlayers.erase(iter);
break;
}
}
if(_audioPlayers.empty()){
_lazyInitLoop = true;
auto scheduler = Director::getInstance()->getScheduler();
scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this);
}
}
void AudioEngineImpl::setVolume(int audioID,float volume)
{
auto& player = _audioPlayers[audioID];
player_set_volume(player._playerHandle, volume, volume);
}
void AudioEngineImpl::setLoop(int audioID, bool loop)
{
auto& player = _audioPlayers[audioID];
player_set_looping(player._playerHandle, loop);
}
void AudioEngineImpl::pause(int audioID)
{
auto& player = _audioPlayers[audioID];
_threadPool->addTask(std::bind(_pausePlayer, player._playerHandle));
}
void AudioEngineImpl::resume(int audioID)
{
auto& player = _audioPlayers[audioID];
_threadPool->addTask(std::bind(_resumePlayer, player._playerHandle));
}
void AudioEngineImpl::stop(int audioID)
{
_audioPlayers.erase(audioID);
}
void AudioEngineImpl::stopAll()
{
_audioPlayers.clear();
}
float AudioEngineImpl::getDuration(int audioID)
{
int duration;
auto& player = _audioPlayers[audioID];
auto ret = player_get_duration(player._playerHandle, &duration);
if(ret != PLAYER_ERROR_NONE)
{
log("Fail to get duration:%d",ret);
}
return duration / 1000.0f;
}
float AudioEngineImpl::getCurrentTime(int audioID)
{
int currPos;
auto& player = _audioPlayers[audioID];
auto ret = player_get_play_position(player._playerHandle, &currPos);
if(ret != PLAYER_ERROR_NONE)
{
CCLOG("Fail to get position:%d",ret);
}
return currPos / 1000.0f;
}
bool AudioEngineImpl::setCurrentTime(int audioID, float time)
{
auto& player = _audioPlayers[audioID];
int pos = 1000 * time;
player_set_play_position(player._playerHandle, pos, true, NULL, NULL);
return true;
}
void AudioEngineImpl::setFinishCallback(int audioID, const std::function<void (int, const std::string &)> &callback)
{
_audioPlayers[audioID]._finishCallback = callback;
}
void AudioEngineImpl::preload(const std::string& filePath, std::function<void(bool)> callback)
{
//TODO: implement preload on Tizen platform.
}
#endif

View File

@ -0,0 +1,117 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
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/CCPlatformConfig.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
#ifndef __AUDIO_ENGINE_TIZEN_H_
#define __AUDIO_ENGINE_TIZEN_H_
#include <string>
#include <unordered_map>
#include <mutex>
#include <vector>
#include <player.h>
#include "base/CCRef.h"
#include "base/ccUtils.h"
#define MAX_AUDIOINSTANCES 8
#define ERRORLOG(msg) log("fun:%s,line:%d,msg:%s",__func__,__LINE__,#msg)
NS_CC_BEGIN
namespace experimental{
class AudioEngineImpl;
class AudioPlayer
{
public:
AudioPlayer();
~AudioPlayer();
void init(const std::string& fileFullPath, float volume, bool loop);
void stopPlayer();
player_h _playerHandle;
std::function<void()> _initCallback;
std::mutex _taskMutex;
private:
bool _playOver;
float _duration;
int _audioID;
bool _initSucceed;
std::function<void (int, const std::string &)> _finishCallback;
friend class AudioEngineImpl;
};
class AudioEngineImpl : public cocos2d::Ref
{
public:
AudioEngineImpl();
~AudioEngineImpl();
bool init();
int play2d(const std::string &fileFullPath ,bool loop ,float volume);
void setVolume(int audioID,float volume);
void setLoop(int audioID, bool loop);
void pause(int audioID);
void resume(int audioID);
void stop(int audioID);
void stopAll();
float getDuration(int audioID);
float getCurrentTime(int audioID);
bool setCurrentTime(int audioID, float time);
void setFinishCallback(int audioID, const std::function<void (int, const std::string &)> &callback);
void uncache(const std::string& filePath){}
void uncacheAll(){}
void update(float dt);
void preload(const std::string& filePath, std::function<void(bool)> callback);
private:
void initPlayerCallback(AudioPlayer *player, int audioID);
//audioID,AudioInfo
std::unordered_map<int, AudioPlayer> _audioPlayers;
std::mutex _threadMutex;
std::vector<int> _toRemoveAudioIDs;
int currentAudioID;
bool _lazyInitLoop;
};
}
NS_CC_END
#endif // __AUDIO_ENGINE_TIZEN_H_
#endif

View File

@ -0,0 +1,217 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
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/CCPlatformConfig.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
#include "audio/include/SimpleAudioEngine.h"
#include "audio/include/AudioEngine.h"
USING_NS_CC;
using namespace cocos2d::experimental;
static float s_bgMusicVolume = 1.0f;
static float s_effectVolume = 1.0f;
namespace CocosDenshion {
SimpleAudioEngine::SimpleAudioEngine() {
}
SimpleAudioEngine::~SimpleAudioEngine() {
}
SimpleAudioEngine* SimpleAudioEngine::getInstance() {
static SimpleAudioEngine s_SharedEngine;
return &s_SharedEngine;
}
void SimpleAudioEngine::end() {
AudioEngine::end();
}
static int s_bgAudioID = AudioEngine::INVALID_AUDIO_ID;
static std::string bgMusicFilePath;
//////////////////////////////////////////////////////////////////////////
// BackgroundMusic
//////////////////////////////////////////////////////////////////////////
void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath,bool bLoop) {
if (s_bgAudioID != AudioEngine::INVALID_AUDIO_ID)
{
AudioEngine::stop(s_bgAudioID);
s_bgAudioID = AudioEngine::INVALID_AUDIO_ID;
}
if (pszFilePath)
{
bgMusicFilePath = pszFilePath;
s_bgAudioID = AudioEngine::play2d(pszFilePath,bLoop,s_bgMusicVolume);
}
}
void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) {
AudioEngine::stop(s_bgAudioID);
}
void SimpleAudioEngine::pauseBackgroundMusic() {
AudioEngine::pause(s_bgAudioID);
}
void SimpleAudioEngine::resumeBackgroundMusic() {
AudioEngine::resume(s_bgAudioID);
}
void SimpleAudioEngine::rewindBackgroundMusic() {
AudioEngine::stop(s_bgAudioID);
if (!bgMusicFilePath.empty())
{
s_bgAudioID = AudioEngine::play2d(bgMusicFilePath);
}
}
bool SimpleAudioEngine::willPlayBackgroundMusic() {
return false;
}
bool SimpleAudioEngine::isBackgroundMusicPlaying() {
auto state = AudioEngine::getState(s_bgAudioID);
if (state == AudioEngine::AudioState::PLAYING)
{
return true;
}
return false;
}
void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) {
bgMusicFilePath = pszFilePath;
}
//////////////////////////////////////////////////////////////////////////
// effect function
//////////////////////////////////////////////////////////////////////////
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,
float pitch, float pan, float gain) {
return AudioEngine::play2d(pszFilePath,bLoop,s_effectVolume);
}
void SimpleAudioEngine::stopEffect(unsigned int nSoundId) {
AudioEngine::stop(nSoundId);
}
void SimpleAudioEngine::preloadEffect(const char* pszFilePath) {
// FIXME: need implementation
}
void SimpleAudioEngine::unloadEffect(const char* pszFilePath) {
AudioEngine::uncache(pszFilePath);
}
void SimpleAudioEngine::pauseEffect(unsigned int uSoundId) {
AudioEngine::pause(uSoundId);
}
void SimpleAudioEngine::pauseAllEffects() {
bool resumeBGMusic = false;
auto state = AudioEngine::getState(s_bgAudioID);
if (state == AudioEngine::AudioState::PLAYING)
{
resumeBGMusic = true;
}
AudioEngine::pauseAll();
if (resumeBGMusic)
{
AudioEngine::resume(s_bgAudioID);
}
}
void SimpleAudioEngine::resumeEffect(unsigned int uSoundId) {
AudioEngine::resume(uSoundId);
}
void SimpleAudioEngine::resumeAllEffects() {
bool pauseBGMusic = false;
auto state = AudioEngine::getState(s_bgAudioID);
if (state == AudioEngine::AudioState::PAUSED)
{
pauseBGMusic = true;
}
AudioEngine::resumeAll();
if (pauseBGMusic)
{
AudioEngine::pause(s_bgAudioID);
}
}
void SimpleAudioEngine::stopAllEffects() {
//FIXME
AudioEngine::stopAll();
}
//////////////////////////////////////////////////////////////////////////
// volume interface
//////////////////////////////////////////////////////////////////////////
float SimpleAudioEngine::getBackgroundMusicVolume() {
return s_bgMusicVolume;
}
void SimpleAudioEngine::setBackgroundMusicVolume(float volume) {
if (volume > 1.0f)
{
volume = 1.0f;
}
else if(volume < 0.0f)
{
volume = 0.0f;
}
s_bgMusicVolume = volume;
AudioEngine::setVolume(s_bgAudioID, s_bgMusicVolume);
}
float SimpleAudioEngine::getEffectsVolume() {
return s_effectVolume;
}
void SimpleAudioEngine::setEffectsVolume(float volume) {
if (volume > 1.0f)
{
volume = 1.0f;
}
else if(volume < 0.0f)
{
volume = 0.0f;
}
s_effectVolume = volume;
//FIXME
}
} // end of namespace CocosDenshion
#endif

View File

@ -28,7 +28,8 @@ THE SOFTWARE.
#include <cstdlib> #include <cstdlib>
#include "audio/win32/MciPlayer.h" #include "audio/win32/MciPlayer.h"
#include "cocos2d.h" #include "platform/CCFileUtils.h"
USING_NS_CC; USING_NS_CC;
using namespace std; using namespace std;

View File

@ -18,10 +18,11 @@
#include "audio/include/SimpleAudioEngine.h" #include "audio/include/SimpleAudioEngine.h"
#include "audio/winrt/Audio.h" #include "audio/winrt/Audio.h"
#include "cocos2d.h"
#include <map> #include <map>
//#include "platform/CCCommon.h" #include "platform/CCPlatformMacros.h"
#include "platform/CCFileUtils.h"
using namespace std; using namespace std;
USING_NS_CC; USING_NS_CC;
@ -83,7 +84,7 @@ void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
return; return;
} }
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop); sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop);
} }
@ -124,7 +125,7 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying()
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain) unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain)
{ {
unsigned int sound; unsigned int sound;
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound); // TODO: need to support playEffect parameters sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound); // TODO: need to support playEffect parameters
return sound; return sound;
} }
@ -136,7 +137,7 @@ void SimpleAudioEngine::stopEffect(unsigned int nSoundId)
void SimpleAudioEngine::preloadEffect(const char* pszFilePath) void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
{ {
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PreloadSoundEffect(fullPath.c_str()); sharedAudioController()->PreloadSoundEffect(fullPath.c_str());
} }
@ -172,7 +173,7 @@ void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath)
void SimpleAudioEngine::unloadEffect(const char* pszFilePath) void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{ {
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->UnloadSoundEffect(fullPath.c_str()); sharedAudioController()->UnloadSoundEffect(fullPath.c_str());
} }

File diff suppressed because it is too large Load Diff

View File

@ -75,10 +75,70 @@ class CC_DLL Console
: public Ref : public Ref
{ {
public: public:
/** Console Utils */
class Utility {
public:
// Trimming functions
static std::string& ltrim(std::string& s);
static std::string& rtrim(std::string& s);
static std::string& trim(std::string& s);
// split
static std::vector<std::string>& split(const std::string& s, char delim, std::vector<std::string>& elems);
static std::vector<std::string> split(const std::string& s, char delim);
/** Checks myString is a floating-point type. */
static bool isFloat(const std::string& myString);
/** send a message to console */
static ssize_t sendToConsole(int fd, const void* buffer, size_t length, int flags = 0);
/** my dprintf() */
static ssize_t mydprintf(int sock, const char *format, ...);
/** send prompt string to console */
static void sendPrompt(int fd);
/** set a new string for the prompt. */
static void setPrompt(const std::string &prompt);
/** get the prompt string. */
static const std::string& getPrompt();
private:
static std::string _prompt; /*!< prompt */
};
/** Command Struct */
struct Command { struct Command {
using Callback = std::function<void(int fd, const std::string& args)>;
std::string name; std::string name;
std::string help; std::string help;
std::function<void(int, const std::string&)> callback; Callback callback{nullptr};
std::map<std::string, Command> subCommands;
/** Constructor */
Command() {}
Command(std::string name_, std::string help_) : name(name_), help(help_) {};
Command(std::string name_, std::string help_, Callback callback_) : name(name_), help(help_), callback(callback_) {};
/** add callback */
void addCallback(const Callback& callback);
/** add sub command */
void addSubCommand(const Command& subCmd);
/** get sub command */
const Command* getSubCommand(const std::string& subCmdName) const;
/** delete sub command */
void delSubCommand(const std::string& subCmdName);
/** help command handler */
void commandHelp(int fd, const std::string& args);
/** generic command handler */
void commandGeneric(int fd, const std::string& args);
}; };
/** Constructor */ /** Constructor */
@ -98,6 +158,19 @@ public:
/** add custom command */ /** add custom command */
void addCommand(const Command& cmd); void addCommand(const Command& cmd);
void addSubCommand(const std::string& cmdName, const Command& subCmd);
void addSubCommand(Command& cmd, const Command& subCmd);
/** get custom command */
const Command* getCommand(const std::string& cmdName);
const Command* getSubCommand(const std::string& cmdName, const std::string& subCmdName);
const Command* getSubCommand(const Command& cmd, const std::string& subCmdName);
/** delete custom command */
void delCommand(const std::string& cmdName);
void delSubCommand(const std::string& cmdName, const std::string& subCmdName);
void delSubCommand(Command& cmd, const std::string& subCmdName);
/** log something in the console */ /** log something in the console */
void log(const char *buf); void log(const char *buf);
@ -109,26 +182,61 @@ public:
void setBindAddress(const std::string &address); void setBindAddress(const std::string &address);
protected: protected:
// Main Loop
void loop(); void loop();
// Helpers
ssize_t readline(int fd, char *buf, size_t maxlen); ssize_t readline(int fd, char *buf, size_t maxlen);
ssize_t readBytes(int fd, char* buffer, size_t maxlen, bool* more); ssize_t readBytes(int fd, char* buffer, size_t maxlen, bool* more);
bool parseCommand(int fd); bool parseCommand(int fd);
void addClient(); void addClient();
// create a map of command.
void createCommandAllocator();
void createCommandConfig();
void createCommandDebugMsg();
void createCommandDirector();
void createCommandExit();
void createCommandFileUtils();
void createCommandFps();
void createCommandHelp();
void createCommandProjection();
void createCommandResolution();
void createCommandSceneGraph();
void createCommandTexture();
void createCommandTouch();
void createCommandUpload();
void createCommandVersion();
// Add commands here // Add commands here
void commandHelp(int fd, const std::string &args); void commandAllocator(int fd, const std::string& args);
void commandExit(int fd, const std::string &args); void commandConfig(int fd, const std::string& args);
void commandSceneGraph(int fd, const std::string &args); void commandDebugMsg(int fd, const std::string& args);
void commandFileUtils(int fd, const std::string &args); void commandDebugMsgSubCommandOnOff(int fd, const std::string& args);
void commandConfig(int fd, const std::string &args); void commandDirectorSubCommandPause(int fd, const std::string& args);
void commandTextures(int fd, const std::string &args); void commandDirectorSubCommandResume(int fd, const std::string& args);
void commandResolution(int fd, const std::string &args); void commandDirectorSubCommandStop(int fd, const std::string& args);
void commandProjection(int fd, const std::string &args); void commandDirectorSubCommandStart(int fd, const std::string& args);
void commandDirector(int fd, const std::string &args); void commandDirectorSubCommandEnd(int fd, const std::string& args);
void commandTouch(int fd, const std::string &args); void commandExit(int fd, const std::string& args);
void commandFileUtils(int fd, const std::string& args);
void commandFileUtilsSubCommandFlush(int fd, const std::string& args);
void commandFps(int fd, const std::string& args);
void commandFpsSubCommandOnOff(int fd, const std::string& args);
void commandHelp(int fd, const std::string& args);
void commandProjection(int fd, const std::string& args);
void commandProjectionSubCommand2d(int fd, const std::string& args);
void commandProjectionSubCommand3d(int fd, const std::string& args);
void commandResolution(int fd, const std::string& args);
void commandResolutionSubCommandEmpty(int fd, const std::string& args);
void commandSceneGraph(int fd, const std::string& args);
void commandTextures(int fd, const std::string& args);
void commandTexturesSubCommandFlush(int fd, const std::string& args);
void commandTouchSubCommandTap(int fd, const std::string& args);
void commandTouchSubCommandSwipe(int fd, const std::string& args);
void commandUpload(int fd); void commandUpload(int fd);
void commandAllocator(int fd, const std::string &args); void commandVersion(int fd, const std::string& args);
// file descriptor: socket, console, etc. // file descriptor: socket, console, etc.
int _listenfd; int _listenfd;
int _maxfd; int _maxfd;
@ -152,6 +260,14 @@ protected:
std::string _bindAddress; std::string _bindAddress;
private: private:
CC_DISALLOW_COPY_AND_ASSIGN(Console); CC_DISALLOW_COPY_AND_ASSIGN(Console);
// helper functions
int printSceneGraph(int fd, Node* node, int level);
void printSceneGraphBoot(int fd);
void printFileUtils(int fd);
/** send help message to console */
static void sendHelp(int fd, const std::map<std::string, Command>& commands, const char* msg);
}; };
NS_CC_END NS_CC_END

View File

@ -116,6 +116,9 @@ public:
void Controller::startDiscoveryController() void Controller::startDiscoveryController()
{ {
if (NSClassFromString(@"GCController") == nil) {
return;
}
[GCController startWirelessControllerDiscoveryWithCompletionHandler: nil]; [GCController startWirelessControllerDiscoveryWithCompletionHandler: nil];
[[GCControllerConnectionEventHandler getInstance] observerConnection: ^(GCController* gcController) { [[GCControllerConnectionEventHandler getInstance] observerConnection: ^(GCController* gcController) {
@ -148,6 +151,9 @@ void Controller::startDiscoveryController()
void Controller::stopDiscoveryController() void Controller::stopDiscoveryController()
{ {
if (NSClassFromString(@"GCController") == nil) {
return;
}
[GCController stopWirelessControllerDiscovery]; [GCController stopWirelessControllerDiscovery];
} }

View File

@ -56,6 +56,8 @@ public:
*/ */
enum Key enum Key
{ {
KEY_NONE = 0,
JOYSTICK_LEFT_X = 1000, JOYSTICK_LEFT_X = 1000,
JOYSTICK_LEFT_Y, JOYSTICK_LEFT_Y,
JOYSTICK_RIGHT_X, JOYSTICK_RIGHT_X,

View File

@ -122,4 +122,13 @@ void Data::clear()
_size = 0; _size = 0;
} }
unsigned char* Data::takeBuffer(ssize_t* size)
{
auto buffer = getBytes();
if (size)
*size = getSize();
fastSet(nullptr, 0);
return buffer;
}
NS_CC_END NS_CC_END

View File

@ -120,6 +120,29 @@ public:
*/ */
bool isNull() const; bool isNull() const;
/**
* Get the internal buffer of data and set data to empty state.
*
* The ownership of the buffer removed from the data object.
* That is the user have to free the returned buffer.
* The data object is set to empty state, that is internal buffer is set to nullptr
* and size is set to zero.
* Usage:
* <pre>
* {@code
* Data d;
* // ...
* ssize_t size;
* unsigned char* buffer = d.takeBuffer(&size);
* // use buffer and size
* free(buffer);
* }
* </pre
*
* @param size Will fill with the data buffer size in bytes, if you do not care buffer size, pass nullptr.
* @return the internal data buffer, free it after use.
*/
unsigned char* takeBuffer(ssize_t* size);
private: private:
void move(Data& other); void move(Data& other);

View File

@ -1088,7 +1088,7 @@ void Director::restartDirector()
// Real restart in script level // Real restart in script level
#if CC_ENABLE_SCRIPT_BINDING #if CC_ENABLE_SCRIPT_BINDING
ScriptEvent scriptEvent(kRestartGame, NULL); ScriptEvent scriptEvent(kRestartGame, nullptr);
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent); ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent);
#endif #endif
} }

View File

@ -605,6 +605,10 @@ void EventDispatcher::removeEventListener(EventListener* listener)
if (listener == nullptr) if (listener == nullptr)
return; return;
// just return if listener is in _toRemovedListeners to avoid remove listeners more than once
if (std::find(_toRemovedListeners.begin(), _toRemovedListeners.end(), listener) != _toRemovedListeners.end())
return;
bool isFound = false; bool isFound = false;
auto removeListenerInVector = [&](std::vector<EventListener*>* listeners){ auto removeListenerInVector = [&](std::vector<EventListener*>* listeners){

View File

@ -273,7 +273,7 @@ void IMEDispatcher::dispatchKeyboardWillShow(IMEKeyboardNotificationInfo& info)
{ {
if (_impl) if (_impl)
{ {
IMEDelegate * delegate = 0; IMEDelegate * delegate = nullptr;
DelegateIter last = _impl->_delegateList.end(); DelegateIter last = _impl->_delegateList.end();
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first) for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
{ {
@ -290,7 +290,7 @@ void IMEDispatcher::dispatchKeyboardDidShow(IMEKeyboardNotificationInfo& info)
{ {
if (_impl) if (_impl)
{ {
IMEDelegate * delegate = 0; IMEDelegate * delegate = nullptr;
DelegateIter last = _impl->_delegateList.end(); DelegateIter last = _impl->_delegateList.end();
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first) for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
{ {
@ -307,7 +307,7 @@ void IMEDispatcher::dispatchKeyboardWillHide(IMEKeyboardNotificationInfo& info)
{ {
if (_impl) if (_impl)
{ {
IMEDelegate * delegate = 0; IMEDelegate * delegate = nullptr;
DelegateIter last = _impl->_delegateList.end(); DelegateIter last = _impl->_delegateList.end();
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first) for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
{ {
@ -324,7 +324,7 @@ void IMEDispatcher::dispatchKeyboardDidHide(IMEKeyboardNotificationInfo& info)
{ {
if (_impl) if (_impl)
{ {
IMEDelegate * delegate = 0; IMEDelegate * delegate = nullptr;
DelegateIter last = _impl->_delegateList.end(); DelegateIter last = _impl->_delegateList.end();
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first) for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
{ {

View File

@ -159,8 +159,6 @@ class Data;
*/ */
class CC_DLL Properties class CC_DLL Properties
{ {
friend class Game;
public: public:
/** /**

View File

@ -38,7 +38,6 @@
NS_CC_BEGIN NS_CC_BEGIN
GLint StencilStateManager::s_layer = -1; GLint StencilStateManager::s_layer = -1;
static GLint g_sStencilBits = -1;
StencilStateManager::StencilStateManager() StencilStateManager::StencilStateManager()
: _alphaThreshold(1.0f) : _alphaThreshold(1.0f)
@ -57,17 +56,6 @@ StencilStateManager::StencilStateManager()
, _currentAlphaTestRef(1) , _currentAlphaTestRef(1)
{ {
// get (only once) the number of bits of the stencil buffer
static bool once = true;
if (once)
{
glGetIntegerv(GL_STENCIL_BITS, &g_sStencilBits);
if (g_sStencilBits <= 0)
{
CCLOG("Stencil buffer is not enabled.");
}
once = false;
}
} }
void StencilStateManager::drawFullScreenQuadClearStencil() void StencilStateManager::drawFullScreenQuadClearStencil()

View File

@ -394,7 +394,7 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value) {
return; return;
} }
char *encodedData = 0; char *encodedData = nullptr;
base64Encode(value.getBytes(), static_cast<unsigned int>(value.getSize()), &encodedData); base64Encode(value.getBytes(), static_cast<unsigned int>(value.getSize()), &encodedData);

View File

@ -53,6 +53,12 @@ Value::Value(int v)
_field.intVal = v; _field.intVal = v;
} }
Value::Value(unsigned int v)
: _type(Type::UNSIGNED)
{
_field.unsignedVal = v;
}
Value::Value(float v) Value::Value(float v)
: _type(Type::FLOAT) : _type(Type::FLOAT)
{ {
@ -159,6 +165,9 @@ Value& Value::operator= (const Value& other)
case Type::INTEGER: case Type::INTEGER:
_field.intVal = other._field.intVal; _field.intVal = other._field.intVal;
break; break;
case Type::UNSIGNED:
_field.unsignedVal = other._field.unsignedVal;
break;
case Type::FLOAT: case Type::FLOAT:
_field.floatVal = other._field.floatVal; _field.floatVal = other._field.floatVal;
break; break;
@ -216,6 +225,9 @@ Value& Value::operator= (Value&& other)
case Type::INTEGER: case Type::INTEGER:
_field.intVal = other._field.intVal; _field.intVal = other._field.intVal;
break; break;
case Type::UNSIGNED:
_field.unsignedVal = other._field.unsignedVal;
break;
case Type::FLOAT: case Type::FLOAT:
_field.floatVal = other._field.floatVal; _field.floatVal = other._field.floatVal;
break; break;
@ -263,6 +275,13 @@ Value& Value::operator= (int v)
return *this; return *this;
} }
Value& Value::operator= (unsigned int v)
{
reset(Type::UNSIGNED);
_field.unsignedVal = v;
return *this;
}
Value& Value::operator= (float v) Value& Value::operator= (float v)
{ {
reset(Type::FLOAT); reset(Type::FLOAT);
@ -363,6 +382,7 @@ bool Value::operator== (const Value& v) const
{ {
case Type::BYTE: return v._field.byteVal == this->_field.byteVal; case Type::BYTE: return v._field.byteVal == this->_field.byteVal;
case Type::INTEGER: return v._field.intVal == this->_field.intVal; case Type::INTEGER: return v._field.intVal == this->_field.intVal;
case Type::UNSIGNED:return v._field.unsignedVal == this->_field.unsignedVal;
case Type::BOOLEAN: return v._field.boolVal == this->_field.boolVal; case Type::BOOLEAN: return v._field.boolVal == this->_field.boolVal;
case Type::STRING: return *v._field.strVal == *this->_field.strVal; case Type::STRING: return *v._field.strVal == *this->_field.strVal;
case Type::FLOAT: return fabs(v._field.floatVal - this->_field.floatVal) <= FLT_EPSILON; case Type::FLOAT: return fabs(v._field.floatVal - this->_field.floatVal) <= FLT_EPSILON;
@ -378,9 +398,10 @@ bool Value::operator== (const Value& v) const
{ {
if (v1[i] != v2[i]) return false; if (v1[i] != v2[i]) return false;
} }
}
return true; return true;
} }
return false;
}
case Type::MAP: case Type::MAP:
{ {
const auto &map1 = *(this->_field.mapVal); const auto &map1 = *(this->_field.mapVal);
@ -431,6 +452,11 @@ unsigned char Value::asByte() const
return static_cast<unsigned char>(_field.intVal); return static_cast<unsigned char>(_field.intVal);
} }
if (_type == Type::UNSIGNED)
{
return static_cast<unsigned char>(_field.unsignedVal);
}
if (_type == Type::STRING) if (_type == Type::STRING)
{ {
return static_cast<unsigned char>(atoi(_field.strVal->c_str())); return static_cast<unsigned char>(atoi(_field.strVal->c_str()));
@ -462,6 +488,12 @@ int Value::asInt() const
return _field.intVal; return _field.intVal;
} }
if (_type == Type::UNSIGNED)
{
CCASSERT(_field.unsignedVal < INT_MAX, "Can only convert values < INT_MAX");
return (int)_field.unsignedVal;
}
if (_type == Type::BYTE) if (_type == Type::BYTE)
{ {
return _field.byteVal; return _field.byteVal;
@ -490,6 +522,50 @@ int Value::asInt() const
return 0; return 0;
} }
unsigned int Value::asUnsignedInt() const
{
CCASSERT(_type != Type::VECTOR && _type != Type::MAP && _type != Type::INT_KEY_MAP, "Only base type (bool, string, float, double, int) could be converted");
if (_type == Type::UNSIGNED)
{
return _field.unsignedVal;
}
if (_type == Type::INTEGER)
{
CCASSERT(_field.intVal >= 0, "Only values >= 0 can be converted to unsigned");
return static_cast<unsigned int>(_field.intVal);
}
if (_type == Type::BYTE)
{
return static_cast<unsigned int>(_field.byteVal);
}
if (_type == Type::STRING)
{
// NOTE: strtoul is required (need to augment on unsupported platforms)
return static_cast<unsigned int>(strtoul(_field.strVal->c_str(), nullptr, 10));
}
if (_type == Type::FLOAT)
{
return static_cast<unsigned int>(_field.floatVal);
}
if (_type == Type::DOUBLE)
{
return static_cast<unsigned int>(_field.doubleVal);
}
if (_type == Type::BOOLEAN)
{
return _field.boolVal ? 1u : 0u;
}
return 0u;
}
float Value::asFloat() const float Value::asFloat() const
{ {
CCASSERT(_type != Type::VECTOR && _type != Type::MAP && _type != Type::INT_KEY_MAP, "Only base type (bool, string, float, double, int) could be converted"); CCASSERT(_type != Type::VECTOR && _type != Type::MAP && _type != Type::INT_KEY_MAP, "Only base type (bool, string, float, double, int) could be converted");
@ -513,6 +589,11 @@ float Value::asFloat() const
return static_cast<float>(_field.intVal); return static_cast<float>(_field.intVal);
} }
if (_type == Type::UNSIGNED)
{
return static_cast<float>(_field.unsignedVal);
}
if (_type == Type::DOUBLE) if (_type == Type::DOUBLE)
{ {
return static_cast<float>(_field.doubleVal); return static_cast<float>(_field.doubleVal);
@ -549,6 +630,11 @@ double Value::asDouble() const
return static_cast<double>(_field.intVal); return static_cast<double>(_field.intVal);
} }
if (_type == Type::UNSIGNED)
{
return static_cast<double>(_field.unsignedVal);
}
if (_type == Type::FLOAT) if (_type == Type::FLOAT)
{ {
return static_cast<double>(_field.floatVal); return static_cast<double>(_field.floatVal);
@ -585,6 +671,11 @@ bool Value::asBool() const
return _field.intVal == 0 ? false : true; return _field.intVal == 0 ? false : true;
} }
if (_type == Type::UNSIGNED)
{
return _field.unsignedVal == 0 ? false : true;
}
if (_type == Type::FLOAT) if (_type == Type::FLOAT)
{ {
return _field.floatVal == 0.0f ? false : true; return _field.floatVal == 0.0f ? false : true;
@ -617,6 +708,9 @@ std::string Value::asString() const
case Type::INTEGER: case Type::INTEGER:
ret << _field.intVal; ret << _field.intVal;
break; break;
case Type::UNSIGNED:
ret << _field.unsignedVal;
break;
case Type::FLOAT: case Type::FLOAT:
ret << std::fixed << std::setprecision( 7 )<< _field.floatVal; ret << std::fixed << std::setprecision( 7 )<< _field.floatVal;
break; break;
@ -733,6 +827,7 @@ static std::string visit(const Value& v, int depth)
case Value::Type::NONE: case Value::Type::NONE:
case Value::Type::BYTE: case Value::Type::BYTE:
case Value::Type::INTEGER: case Value::Type::INTEGER:
case Value::Type::UNSIGNED:
case Value::Type::FLOAT: case Value::Type::FLOAT:
case Value::Type::DOUBLE: case Value::Type::DOUBLE:
case Value::Type::BOOLEAN: case Value::Type::BOOLEAN:
@ -774,6 +869,9 @@ void Value::clear()
case Type::INTEGER: case Type::INTEGER:
_field.intVal = 0; _field.intVal = 0;
break; break;
case Type::UNSIGNED:
_field.unsignedVal = 0u;
break;
case Type::FLOAT: case Type::FLOAT:
_field.floatVal = 0.0f; _field.floatVal = 0.0f;
break; break;

View File

@ -66,6 +66,9 @@ public:
/** Create a Value by an integer value. */ /** Create a Value by an integer value. */
explicit Value(int v); explicit Value(int v);
/** Create a Value by an unsigned value. */
explicit Value(unsigned int v);
/** Create a Value by a float value. */ /** Create a Value by a float value. */
explicit Value(float v); explicit Value(float v);
@ -113,6 +116,8 @@ public:
Value& operator= (unsigned char v); Value& operator= (unsigned char v);
/** Assignment operator, assign from integer to Value. */ /** Assignment operator, assign from integer to Value. */
Value& operator= (int v); Value& operator= (int v);
/** Assignment operator, assign from integer to Value. */
Value& operator= (unsigned int v);
/** Assignment operator, assign from float to Value. */ /** Assignment operator, assign from float to Value. */
Value& operator= (float v); Value& operator= (float v);
/** Assignment operator, assign from double to Value. */ /** Assignment operator, assign from double to Value. */
@ -152,6 +157,8 @@ public:
unsigned char asByte() const; unsigned char asByte() const;
/** Gets as an integer value. Will convert to integer if possible, or will trigger assert error. */ /** Gets as an integer value. Will convert to integer if possible, or will trigger assert error. */
int asInt() const; int asInt() const;
/** Gets as an unsigned value. Will convert to unsigned if possible, or will trigger assert error. */
unsigned int asUnsignedInt() const;
/** Gets as a float value. Will convert to float if possible, or will trigger assert error. */ /** Gets as a float value. Will convert to float if possible, or will trigger assert error. */
float asFloat() const; float asFloat() const;
/** Gets as a double value. Will convert to double if possible, or will trigger assert error. */ /** Gets as a double value. Will convert to double if possible, or will trigger assert error. */
@ -191,6 +198,8 @@ public:
BYTE, BYTE,
/// wrap integer /// wrap integer
INTEGER, INTEGER,
/// wrap unsigned
UNSIGNED,
/// wrap float /// wrap float
FLOAT, FLOAT,
/// wrap double /// wrap double
@ -221,6 +230,7 @@ private:
{ {
unsigned char byteVal; unsigned char byteVal;
int intVal; int intVal;
unsigned int unsignedVal;
float floatVal; float floatVal;
double doubleVal; double doubleVal;
bool boolVal; bool boolVal;

View File

@ -645,6 +645,35 @@ unsigned char *ZipFile::getFileData(const std::string &fileName, ssize_t *size)
return buffer; return buffer;
} }
bool ZipFile::getFileData(const std::string &fileName, ResizableBuffer* buffer)
{
bool res = false;
do
{
CC_BREAK_IF(!_data->zipFile);
CC_BREAK_IF(fileName.empty());
ZipFilePrivate::FileListContainer::const_iterator it = _data->fileList.find(fileName);
CC_BREAK_IF(it == _data->fileList.end());
ZipEntryInfo fileInfo = it->second;
int nRet = unzGoToFilePos(_data->zipFile, &fileInfo.pos);
CC_BREAK_IF(UNZ_OK != nRet);
nRet = unzOpenCurrentFile(_data->zipFile);
CC_BREAK_IF(UNZ_OK != nRet);
buffer->resize(fileInfo.uncompressed_size);
int CC_UNUSED nSize = unzReadCurrentFile(_data->zipFile, buffer->buffer(), static_cast<unsigned int>(fileInfo.uncompressed_size));
CCASSERT(nSize == 0 || nSize == (int)fileInfo.uncompressed_size, "the file size is wrong");
unzCloseCurrentFile(_data->zipFile);
res = true;
} while (0);
return res;
}
std::string ZipFile::getFirstFilename() std::string ZipFile::getFirstFilename()
{ {
if (unzGoToFirstFile(_data->zipFile) != UNZ_OK) return emptyFilename; if (unzGoToFirstFile(_data->zipFile) != UNZ_OK) return emptyFilename;

View File

@ -31,6 +31,7 @@ THE SOFTWARE.
#include "platform/CCPlatformConfig.h" #include "platform/CCPlatformConfig.h"
#include "platform/CCPlatformMacros.h" #include "platform/CCPlatformMacros.h"
#include "platform/CCPlatformDefine.h" #include "platform/CCPlatformDefine.h"
#include "platform/CCFileUtils.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "platform/android/CCFileUtils-android.h" #include "platform/android/CCFileUtils-android.h"
@ -276,6 +277,14 @@ typedef struct unz_file_info_s unz_file_info;
*/ */
unsigned char *getFileData(const std::string &fileName, ssize_t *size); unsigned char *getFileData(const std::string &fileName, ssize_t *size);
/**
* Get resource file data from a zip file.
* @param fileName File name
* @param[out] buffer If the file read operation succeeds, if will contain the file data.
* @return True if successful.
*/
bool getFileData(const std::string &fileName, ResizableBuffer* buffer);
std::string getFirstFilename(); std::string getFirstFilename();
std::string getNextFilename(); std::string getNextFilename();

View File

@ -29,7 +29,7 @@
#include "platform/CCPlatformMacros.h" #include "platform/CCPlatformMacros.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
#include "pthread.h" #include "pthread.h"
#define MUTEX pthread_mutex_t #define MUTEX pthread_mutex_t
#define MUTEX_INIT(m) \ #define MUTEX_INIT(m) \

View File

@ -27,6 +27,7 @@
#define CC_ALLOCATOR_STRATEGY_DEFAULT_H #define CC_ALLOCATOR_STRATEGY_DEFAULT_H
/// @cond DO_NOT_SHOW /// @cond DO_NOT_SHOW
#include <stdlib.h>
#include "base/allocator/CCAllocatorMacros.h" #include "base/allocator/CCAllocatorMacros.h"
#include "base/allocator/CCAllocatorBase.h" #include "base/allocator/CCAllocatorBase.h"

View File

@ -142,7 +142,7 @@ int base64Decode(const unsigned char *in, unsigned int inLength, unsigned char *
unsigned int outLength = 0; unsigned int outLength = 0;
//should be enough to store 6-bit buffers in 8-bit buffers //should be enough to store 6-bit buffers in 8-bit buffers
*out = (unsigned char*)malloc(inLength * 3.0f / 4.0f + 1); *out = (unsigned char*)malloc(inLength / 4 * 3 + 1);
if( *out ) { if( *out ) {
int ret = _base64Decode(in, inLength, *out, &outLength); int ret = _base64Decode(in, inLength, *out, &outLength);
@ -160,7 +160,7 @@ int base64Decode(const unsigned char *in, unsigned int inLength, unsigned char *
} }
int base64Encode(const unsigned char *in, unsigned int inLength, char **out) { int base64Encode(const unsigned char *in, unsigned int inLength, char **out) {
unsigned int outLength = inLength * 4 / 3 + (inLength % 3 > 0 ? 4 : 0); unsigned int outLength = (inLength + 2) / 3 * 4;
//should be enough to store 8-bit buffers in 6-bit buffers //should be enough to store 8-bit buffers in 6-bit buffers
*out = (char*)malloc(outLength+1); *out = (char*)malloc(outLength+1);

View File

@ -338,7 +338,7 @@ THE SOFTWARE.
*/ */
#ifdef CC_ENABLE_SCRIPT_BINDING #ifdef CC_ENABLE_SCRIPT_BINDING
#ifndef CC_ENABLE_GC_FOR_NATIVE_OBJECTS #ifndef CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#define CC_ENABLE_GC_FOR_NATIVE_OBJECTS 1 #define CC_ENABLE_GC_FOR_NATIVE_OBJECTS 0
#endif #endif
#endif #endif
@ -393,4 +393,8 @@ THE SOFTWARE.
# define CC_ALLOCATOR_GLOBAL_NEW_DELETE cocos2d::allocator::AllocatorStrategyGlobalSmallBlock # define CC_ALLOCATOR_GLOBAL_NEW_DELETE cocos2d::allocator::AllocatorStrategyGlobalSmallBlock
#endif #endif
#ifndef CC_FILEUTILS_APPLE_ENABLE_OBJC
#define CC_FILEUTILS_APPLE_ENABLE_OBJC 1
#endif
#endif // __CCCONFIG_H__ #endif // __CCCONFIG_H__

View File

@ -228,7 +228,7 @@ std::string getStringUTFCharsJNI(JNIEnv* env, jstring srcjStr, bool* ret)
return utf8Str; return utf8Str;
} }
jstring newStringUTFJNI(JNIEnv* env, std::string utf8Str, bool* ret) jstring newStringUTFJNI(JNIEnv* env, const std::string& utf8Str, bool* ret)
{ {
std::u16string utf16Str; std::u16string utf16Str;
bool flag = cocos2d::StringUtils::UTF8ToUTF16(utf8Str, utf16Str); bool flag = cocos2d::StringUtils::UTF8ToUTF16(utf8Str, utf16Str);
@ -354,14 +354,21 @@ bool StringUTF8::insert(std::size_t pos, const StringUTF8& insertStr)
} //namespace StringUtils { } //namespace StringUtils {
namespace {
int cc_wcslen(const unsigned short* str) inline int wcslen_internal(const unsigned short* str)
{ {
if (str == nullptr) if (str == nullptr)
return -1; return -1;
int i=0; int i=0;
while(*str++) i++; while(*str++) i++;
return i; return i;
}
}
int cc_wcslen(const unsigned short* str)
{
return wcslen_internal(str);
} }
void cc_utf8_trim_ws(std::vector<unsigned short>* str) void cc_utf8_trim_ws(std::vector<unsigned short>* str)
@ -411,7 +418,7 @@ std::vector<unsigned short> cc_utf16_vec_from_utf16_str(const unsigned short* st
if (str == nullptr) if (str == nullptr)
return str_new; return str_new;
int len = cc_wcslen(str); int len = wcslen_internal(str);
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
{ {
@ -428,7 +435,8 @@ unsigned short* cc_utf8_to_utf16(const char* str_old, int length/* = -1*/, int*
unsigned short* ret = nullptr; unsigned short* ret = nullptr;
std::u16string outUtf16; std::u16string outUtf16;
bool succeed = StringUtils::UTF8ToUTF16(str_old, outUtf16); std::string inUtf8 = length == -1 ? std::string(str_old) : std::string(str_old, length);
bool succeed = StringUtils::UTF8ToUTF16(inUtf8, outUtf16);
if (succeed) if (succeed)
{ {
@ -454,7 +462,7 @@ char * cc_utf16_to_utf8 (const unsigned short *str,
std::u16string utf16; std::u16string utf16;
int utf16Len = len < 0 ? cc_wcslen(str) : len; int utf16Len = len < 0 ? wcslen_internal(str) : len;
for (int i = 0; i < utf16Len; ++i) for (int i = 0; i < utf16Len; ++i)
{ {

View File

@ -118,7 +118,7 @@ CC_DLL std::string getStringUTFCharsJNI(JNIEnv* env, jstring srcjStr, bool* ret
* @param ret True if the conversion succeeds and the ret pointer isn't null * @param ret True if the conversion succeeds and the ret pointer isn't null
* @returns the result of jstring,the jstring need to DeleteLocalRef(jstring); * @returns the result of jstring,the jstring need to DeleteLocalRef(jstring);
*/ */
CC_DLL jstring newStringUTFJNI(JNIEnv* env, std::string utf8Str, bool* ret = nullptr); CC_DLL jstring newStringUTFJNI(JNIEnv* env, const std::string& utf8Str, bool* ret = nullptr);
#endif #endif
/** /**

View File

@ -33,9 +33,11 @@ THE SOFTWARE.
#include "base/base64.h" #include "base/base64.h"
#include "renderer/CCCustomCommand.h" #include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "platform/CCImage.h" #include "platform/CCImage.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "2d/CCRenderTexture.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -174,6 +176,49 @@ void captureScreen(const std::function<void(bool, const std::string&)>& afterCap
}); });
} }
Image* captureNode(Node* startNode, float scale)
{ // The best snapshot API, support Scene and any Node
auto& size = startNode->getContentSize();
Director::getInstance()->setNextDeltaTimeZero(true);
RenderTexture* finalRtx = nullptr;
auto rtx = RenderTexture::create(size.width, size.height, Texture2D::PixelFormat::RGBA8888, GL_DEPTH24_STENCIL8);
// rtx->setKeepMatrix(true);
Point savedPos = startNode->getPosition();
Point anchor;
if (!startNode->isIgnoreAnchorPointForPosition()) {
anchor = startNode->getAnchorPoint();
}
startNode->setPosition(Point(size.width * anchor.x, size.height * anchor.y));
rtx->begin();
startNode->visit();
rtx->end();
startNode->setPosition(savedPos);
if (std::abs(scale - 1.0f) < 1e-6/* no scale */)
finalRtx = rtx;
else {
/* scale */
auto finalRect = Rect(0, 0, size.width, size.height);
Sprite *sprite = Sprite::createWithTexture(rtx->getSprite()->getTexture(), finalRect);
sprite->setAnchorPoint(Point(0, 0));
sprite->setFlippedY(true);
finalRtx = RenderTexture::create(size.width * scale, size.height * scale, Texture2D::PixelFormat::RGBA8888, GL_DEPTH24_STENCIL8);
sprite->setScale(scale); // or use finalRtx->setKeepMatrix(true);
finalRtx->begin();
sprite->visit();
finalRtx->end();
}
Director::getInstance()->getRenderer()->render();
return finalRtx->newImage();
}
std::vector<Node*> findChildren(const Node &node, const std::string &name) std::vector<Node*> findChildren(const Node &node, const std::string &name)
{ {
std::vector<Node*> vec; std::vector<Node*> vec;
@ -287,6 +332,51 @@ Sprite* createSpriteFromBase64(const char* base64String)
return sprite; return sprite;
} }
Node* findChild(Node* levelRoot, const char* name)
{
if (levelRoot == nullptr)
return nullptr;
// Find this node
{
auto target = levelRoot->getChildByName(name);
if (target != nullptr)
return target;
}
// Find recursively
for (auto& child : levelRoot->getChildren())
{
auto target = findChild(child, name);
if (target != nullptr)
return target;
}
return nullptr;
}
Node* findChild(Node* levelRoot, int tag)
{
if (levelRoot == nullptr)
return nullptr;
// Find this node
{
auto target = levelRoot->getChildByTag(tag);
if (target != nullptr)
return target;
}
// Find recursively
for (auto& child : levelRoot->getChildren())
{
auto target = findChild(child, tag);
if (target != nullptr)
return target;
}
return nullptr;
}
} }
NS_CC_END NS_CC_END

View File

@ -53,6 +53,7 @@ Examples:
int ccNextPOT(int value); int ccNextPOT(int value);
class Sprite; class Sprite;
class Image;
namespace utils namespace utils
{ {
@ -64,7 +65,16 @@ namespace utils
* base filename ("hello.png" etc.), don't use a relative path containing directory names.("mydir/hello.png" etc.). * base filename ("hello.png" etc.), don't use a relative path containing directory names.("mydir/hello.png" etc.).
* @since v3.2 * @since v3.2
*/ */
void CC_DLL captureScreen(const std::function<void(bool, const std::string&)>& afterCaptured, const std::string& filename); CC_DLL void captureScreen(const std::function<void(bool, const std::string&)>& afterCaptured, const std::string& filename);
/** Capture a specific Node.
* @param startNode: specify the snapshot Node. It chould be cocos2d::Scene
* @param scale
* @returns: return a Image, then can call saveToFile to save the image as "xxx.png or xxx.jpg".
* @since v3.11
* !!! remark: Caller is responsible for releasing it by calling delete.
*/
CC_DLL Image* captureNode(Node* startNode, float scale = 1.0f);
/** Find children by name, it will return all child that has the same name. /** Find children by name, it will return all child that has the same name.
* It supports c++ 11 regular expression. It is a helper function of `Node::enumerateChildren()`. * It supports c++ 11 regular expression. It is a helper function of `Node::enumerateChildren()`.
@ -75,7 +85,7 @@ namespace utils
* @return Array of Nodes that matches the name * @return Array of Nodes that matches the name
* @since v3.2 * @since v3.2
*/ */
std::vector<Node*> CC_DLL findChildren(const Node &node, const std::string &name); CC_DLL std::vector<Node*> findChildren(const Node &node, const std::string &name);
/** Same to ::atof, but strip the string, remain 7 numbers after '.' before call atof. /** Same to ::atof, but strip the string, remain 7 numbers after '.' before call atof.
* Why we need this? Because in android c++_static, atof ( and std::atof ) is unsupported for numbers have long decimal part and contain * Why we need this? Because in android c++_static, atof ( and std::atof ) is unsupported for numbers have long decimal part and contain
@ -83,33 +93,68 @@ namespace utils
* @param str The string be to converted to double. * @param str The string be to converted to double.
* @return Returns converted value of a string. * @return Returns converted value of a string.
*/ */
double CC_DLL atof(const char* str); CC_DLL double atof(const char* str);
/** Get current exact time, accurate to nanoseconds. /** Get current exact time, accurate to nanoseconds.
* @return Returns the time in seconds since the Epoch. * @return Returns the time in seconds since the Epoch.
*/ */
double CC_DLL gettime(); CC_DLL double gettime();
/** /**
* Get current time in milliseconds, accurate to nanoseconds * Get current time in milliseconds, accurate to nanoseconds
* *
* @return Returns the time in milliseconds since the Epoch. * @return Returns the time in milliseconds since the Epoch.
*/ */
long long CC_DLL getTimeInMilliseconds(); CC_DLL long long getTimeInMilliseconds();
/** /**
* Calculate unionof bounding box of a node and its children. * Calculate unionof bounding box of a node and its children.
* @return Returns unionof bounding box of a node and its children. * @return Returns unionof bounding box of a node and its children.
*/ */
Rect CC_DLL getCascadeBoundingBox(Node *node); CC_DLL Rect getCascadeBoundingBox(Node *node);
/** /**
* Create a sprite instance from base64 encoded image. * Create a sprite instance from base64 encoded image.
* @return Returns an instance of sprite * @return Returns an instance of sprite
*/ */
Sprite* createSpriteFromBase64(const char* base64String); CC_DLL Sprite* createSpriteFromBase64(const char* base64String);
/**
* Find a child by name recursively
* @return Returns found node or nullptr
*/
CC_DLL Node* findChild(Node* levelRoot, const char* name);
/**
* Find a child by tag recursively
* @return Returns found node or nullptr
*/
CC_DLL Node* findChild(Node* levelRoot, int tag);
/**
* Find a child by name recursively
* @return Returns found node or nullptr with specified type 'T'
*/
template<typename T> inline
T findChild(Node* levelRoot, const char* name)
{
return dynamic_cast<T>(findChild(levelRoot, name));
}
/**
* Find a child by tag recursively
* @return Returns found node or nullptr with specified type 'T'
*/
template<typename T> inline
T findChild(Node* levelRoot, int tag)
{
return dynamic_cast<T>(findChild(levelRoot, tag));
}
} }
NS_CC_END NS_CC_END

View File

@ -249,6 +249,13 @@ THE SOFTWARE.
#include "platform/winrt/CCStdC.h" #include "platform/winrt/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
#include "platform/tizen/CCApplication-tizen.h"
#include "platform/tizen/CCGLViewImpl-tizen.h"
#include "platform/tizen/CCGL-tizen.h"
#include "platform/tizen/CCStdC-tizen.h"
#endif
// script_support // script_support
#include "base/CCScriptSupport.h" #include "base/CCScriptSupport.h"
@ -302,17 +309,10 @@ THE SOFTWARE.
#include "3d/CCTerrain.h" #include "3d/CCTerrain.h"
// Deprecated include // Deprecated
#include "deprecated/CCArray.h" // All deprecated features are include inside deprecated/CCDeprecated.h.
#include "deprecated/CCBool.h" // It is recommanded that you just inlcude what is needed.
#include "deprecated/CCDictionary.h" // eg. #include "deprecated/CCString.h" if you only need cocos2d::__String.
#include "deprecated/CCDouble.h"
#include "deprecated/CCFloat.h"
#include "deprecated/CCInteger.h"
#include "deprecated/CCNotificationCenter.h"
#include "deprecated/CCSet.h"
#include "deprecated/CCString.h"
// CCDeprecated.h must be included at the end
#include "deprecated/CCDeprecated.h" #include "deprecated/CCDeprecated.h"

View File

@ -502,7 +502,7 @@ public:
* @js NA * @js NA
* @lua NA * @lua NA
*/ */
virtual __Array* clone() const; virtual __Array* clone() const override;
// ------------------------------------------ // ------------------------------------------
// Iterators // Iterators

View File

@ -57,7 +57,7 @@ public:
/* override functions */ /* override functions */
virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); }
__Bool* clone() const virtual __Bool* clone() const override
{ {
return __Bool::create(_value); return __Bool::create(_value);
} }

Some files were not shown because too many files have changed in this diff Show More