Merge branch 'v3' into fixEditBox_v3

This commit is contained in:
andyque 2014-12-08 15:20:06 +08:00
commit d53d71610b
490 changed files with 31238 additions and 57955 deletions

1
.gitignore vendored
View File

@ -151,3 +151,4 @@ tests/cpp-tests/Resources/audio
/external/audio/
/external/xxtea/
/external/protobuf-lite/
/external/flatbuffers/

View File

@ -5,7 +5,8 @@ env:
- GEN_COCOS_FILES=YES
- PLATFORM=mac-ios PUSH_TO_MAC=YES
- PLATFORM=linux DEBUG=1 CC_COMPILER=gcc CXX_COMPILER=g++
- PLATFORM=linux DEBUG=1 CC_COMPILER=clang CXX_COMPILER=clang++
# Disable clang build on linux temporarily since we're using "-stdlib=libc++ " which wasn't installed on travis machine.
# - PLATFORM=linux DEBUG=1 CC_COMPILER=clang CXX_COMPILER=clang++
# Since switching to C++11 only the ARM version of the nactive client
# port currently builds. TODO(sbc): Re-enable all architectures.
# Disabled travis-ci build for native client port since it doesn't support std::thread, std::mutex.
@ -33,11 +34,6 @@ script:
before_install:
- tools/travis-scripts/before-install.sh
notifications:
email:
- xiaoming.zhang@cocos2d-x.org
- jianhua.chen@cocos2d-x.org
# whitelist
branches:
only:

View File

@ -820,6 +820,7 @@ Developers:
aeonmine
Fixed ActionObject memory leak in ActionManagerEx::initWithDictionary
Fixed memory leak in cocos studiov2.0 reader
LoungeKatt
Corrected a mistake of building android project in README.md
@ -1053,6 +1054,13 @@ Developers:
vovkasm
Fix warnings for Xcode6.1
nilium
Unignore libs dir in plugin and fix Travis script to descend into included directories
shrimpz
Fix two typos in luaval_to_quaternion
Fix label crashed on android
Retired Core Developers:
WenSheng Yang
Author of windows port, CCTextField,

View File

@ -1,17 +1,41 @@
cocos2d-x-3.3 ??
[NEW] Vec2: added greater than operator
cocos2d-x-3.3-rc2 Dec.5
[FIX] C++: use 100% of one core on Windows
[FIX] Label: when a label is added to a invisible parent node, app will crash if switching from background
[FIX] Label: label will not be shown when using system font on Mac
[FIX] Studio reader: replace protocol buffer with flatbuffer
cocos2d-x-3.3-rc1 Nov.29 2014
[NEW] Vec2: added greater than operator
[NEW] Tools: Updated cocos console to v1.4 (from 1.2)
[NEW] WP8: Win8.1 universal app support
[FIX] Audio: `SimpleAudioEngine::sharedEngine()->playBackgroundMusic()` crashed freezen on Lollipop(Android5.0)
[FIX] Button: when the dimension of button title is larger than the button, button will scale to fit the dimension of the button title
[FIX] Button: when the dimension of button title is larger than the button, button will scale to fit the dimension of the button title
[FIX] Camera: does not work correctly when the up is not (0, 1, 0)
[FIX] Cocos console: compile failure on windows if using VS express version
[FIX] Director: Uses a low-pass filter to diplay the FPS
[FIX] DrawNode: drawPoint() may cause crash
[FIX] EventKeyboard: can not check right Shift, right Ctrl and right ALT
[FIX] GLProgramCache: doesn't release old program with the same key before adding a new one
[FIX] GLProgramState: enabled GLProgramState restoring on render recreated on WP8
[FIX] Label: label shifting when outline feature enabled
[FIX] Label: when applying additionalKerning to a Label that displays a string with only 1 character, the character is shifted
[FIX] Button: when the dimension of button title is larger than the button, button will scale to fit the dimension of the button title
[FIX] Label: display incompletely with multiline text with outline feature enabled
[FIX] Label: crash if using BMFont but missing corresponding png file
[FIX] Lua: logical error in luaval_to_quaternion
[FIX] New audio: can not loop on Android 2.3.x
[FIX] Random: CCRANDOM_0_1() and CCRANDOM_MINUS_1_1() can be seeded using std::srand(seed)
[FIX] Scale9Sprite: will be flipped if both flipX and flipY are false
[FIX] Scale9Sprite: if scale and flip property are set at the same time, the result would be wrong
[FIX] Scene: setScale() doesn't work as expected
[FIX] Sprite3D: did not create attached sprite from cache
[FIX] WP/WinRT: Windows 8.1 universal app support; `UIEditBox` support
[FIX] Tests: Sprite Performance Test automation works as expected
[FIX] UI: Text: invoke ignoreContentAdatpSize(false) will cause wrong effect
[FIX] VideoPlayer: showed in wrong place on Android v2.3.x
[FIX] WebView: showed in wrong place on Android v2.3.x
[FIX] WP: back key behaviour and Director::getInstance()->end() works not correctly
[FIX] Lua-binding: XmlHttpRequest would truncate binary data
cocos2d-x-3.3-rc0 Oct.21 2014
[NEW] 3d: added light support: direction light, point light, spot light and ambient light

View File

@ -24,19 +24,35 @@
# ****************************************************************************/
cmake_minimum_required(VERSION 2.8)
# It ensures that when Find*.cmake files included from cmake's Modules dir
# include another *.cmake file with relative path, that file will be included
# also from cmake's Modules dir, to not clash with per-project files.
cmake_policy(SET CMP0017 NEW)
project (Cocos2d-X)
# The version number
set(COCOS2D_X_VERSION 3.3.0-beta0)
set(COCOS2D_X_VERSION 3.3.0-rc1)
include(cmake/BuildHelpers.CMakeLists.txt)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
include(CocosBuildHelpers)
message(${BUILDING_STRING})
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()
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
option(USE_BOX2D "Use box2d for physics library" OFF)
option(BUILD_STATIC "Build static libraries" 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)
@ -45,6 +61,11 @@ option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON)
option(BUILD_CPP_TESTS "Build TestCpp samples" ON)
option(BUILD_LUA_LIBS "Build lua libraries" ON)
option(BUILD_LUA_TESTS "Build TestLua samples" ON)
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()
if(DEBUG_MODE)
set(CMAKE_BUILD_TYPE DEBUG)
@ -70,22 +91,18 @@ else()
endif()
endif(MSVC)
if(BUILD_STATIC)
set (BUILD_TYPE STATIC)
else()
set (BUILD_TYPE SHARED)
endif()
set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
# Some macro definitions
if(WINDOWS)
if(BUILD_STATIC)
ADD_DEFINITIONS (-DCC_STATIC)
else()
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)
ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
set(PLATFORM_FOLDER win32)
elseif(MACOSX OR APPLE)
ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
@ -102,10 +119,8 @@ else()
endif()
if(MINGW)
add_definitions(-DGLEW_STATIC)
#add_definitions(-DGLEW_STATIC)
add_definitions(-D__SSIZE_T)
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lws2_32")
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lws2_32")
if(CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions ")
@ -123,7 +138,6 @@ else()
endif()
include_directories(
${PLATFORM_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cocos
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/deprecated
@ -132,94 +146,137 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/external
)
# Specific Link Directories
if(LINUX)
set(PLATFORM_LINK_DIR
/usr/local/lib
${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
)
set(PLATFORM_FOLDER_ARCH
${PLATFORM_FOLDER}/${ARCH_DIR}
)
elseif(NOT MINGW)
set(PLATFORM_FOLDER_ARCH
${PLATFORM_FOLDER}
)
set(PLATFORM_LINK_DIR
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/prebuilt/${PLATFORM_FOLDER_ARCH}
)
if(USE_PREBUILT_LIBS)
include(CocosUsePrebuiltLibs)
endif()
# GLFW3 used on Mac, Windows and Linux desktop platforms
if(LINUX OR MACOSX OR WINDOWS)
cocos_find_package(OpenGL OPENGL REQUIRED)
# NB
# we need to return these to libraries to their official state rather than
# having our custom cocos2d namespace so that we may use system versions if
# the platform provides them. It is very important that this
# is done before we make prebuilt versions of these two libs
if(LINUX OR WINDOWS)
cocos_find_package(GLEW GLEW REQUIRED)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../external/unzip
${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash
)
if(LINUX OR APPLE)
find_package(GLFW3 REQUIRED)
message( STATUS "GLFW3 dirs: ${GLFW3_INCLUDE_DIRS}")
cocos_find_package(GLFW3 GLFW3 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIRS})
endif(LINUX OR APPLE)
if(LINUX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
cocos_find_package(FMODEX FMODEX REQUIRED)
cocos_find_package(Fontconfig FONTCONFIG REQUIRED)
endif()
if(NOT MINGW)
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)
include_directories(
# Freetype required on all platforms
cocos_find_package(Freetype FREETYPE REQUIRED)
${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2
${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk/include/chipmunk
${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/include
${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/png/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/curl/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf-lite/src
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/include/${PLATFORM_FOLDER}/freetype2
)
# WebP required if used
if(USE_WEBP)
cocos_find_package(WebP WEBP REQUIRED)
endif(USE_WEBP)
#todo: fix location of freetype includes for linux android on cocos prebuilt repo
#i.e we should not need to include an extra dir of /freetype2
link_directories(
${PLATFORM_LINK_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/prebuilt/${PLATFORM_FOLDER_ARCH}
${CMAKE_CURRENT_SOURCE_DIR}/external/curl/prebuilt/${PLATFORM_FOLDER_ARCH}
)
# Chipmunk
if(USE_CHIPMUNK)
cocos_find_package(Chipmunk CHIPMUNK REQUIRED)
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)
# 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)
add_subdirectory(external/unzip)
set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip)
set(MINIZIP_LIBRARIES unzip)
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 (not prebuilded, exists as source)
# TODO: for now we can't use upstream flatbuffers because these files:
# cocos/editor-support/cocostudio/CSParseBinary_generated.h
# was generated by concrete version of flatbuffers compiler
# and source file not provided. So these files can be
# compiled only with our in-source version of flatbuffers
## if(USE_PREBUILT_LIBS)
add_subdirectory(external/flatbuffers)
set(FLATBUFFERS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external)
set(FLATBUFFERS_LIBRARIES flatbuffers)
## else()
## cocos_find_package(Flatbuffers REQUIRED FLATBUFFERS_LIBRARIES)
## set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIRS})
## endif()
message(STATUS "Flatbuffers libs: ${FLATBUFFERS_LIBRARIES}")
message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}")
# build for 3rd party libraries
if(LINUX OR APPLE)
add_subdirectory(external/Box2D)
add_subdirectory(external/unzip)
add_subdirectory(external/xxhash)
add_subdirectory(external/tinyxml2)
add_subdirectory(external/protobuf-lite)
endif()
# libcocos2d.a

View File

@ -205,7 +205,7 @@ Contact us
[5]: http://www.box2d.org "Box2D"
[6]: http://www.chipmunk-physics.net "Chipmunk2D"
[7]: http://esotericsoftware.com/ "http://esotericsoftware.com/"
[8]: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Contribution
[8]: https://github.com/cocos2d/cocos2d-x/blob/v3/docs/CONTRIBUTE.md
[9]: http://forum.cocos2d-x.org "http://forum.cocos2d-x.org"
[10]: http://www.twitter.com/cocos2dx "http://www.twitter.com/cocos2dx"
[11]: http://t.sina.com.cn/cocos2dx "http://t.sina.com.cn/cocos2dx"

View File

@ -11,50 +11,78 @@ CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test']
LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test']
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES
def get_num_of_cpu():
''' The build process can be accelerated by running multiple concurrent job processes using the -j-option.
'''
try:
platform = sys.platform
if platform == 'win32':
if 'NUMBER_OF_PROCESSORS' in os.environ:
return int(os.environ['NUMBER_OF_PROCESSORS'])
else:
return 1
else:
from numpy.distutils import cpuinfo
return cpuinfo.cpu._getNCPUs()
except Exception:
print "Can't know cpuinfo, use default 1 cpu"
return 1
class BUILD_CONSTANT:
SDK_ROOT = None
COCOS_ROOT = None
NDK_BUILD_COMMAND = None
def check_environment_variables():
def initBuildConstant(ndk_build_param, build_mode):
''' Checking the environment NDK_ROOT, which will be used for building
'''
try:
NDK_ROOT = os.environ['NDK_ROOT']
ndk_root = os.environ['NDK_ROOT']
ndk_build_path = os.path.join(ndk_root, "ndk-build")
except Exception:
print "NDK_ROOT not defined. Please define NDK_ROOT in your environment"
sys.exit(1)
return NDK_ROOT
toolchainVersion = '4.8'
try:
versionFile = open(os.path.join(ndk_root, "RELEASE.TXT"))
firstLine = versionFile.readline()
if firstLine :
ndkVersion = firstLine[firstLine.index('r') : firstLine.index(' ')]
ndkVersionValue = int(filter(str.isdigit,ndkVersion))
if ndkVersionValue < 10 or cmp(ndkVersion,'r10c') < 0 :
print '''Please use NDK r10c above.
If you do not,your application may crash or freeze on Android L(5.0) when use BMFont and HttpClient.
For More information:
https://github.com/cocos2d/cocos2d-x/issues/9114
https://github.com/cocos2d/cocos2d-x/issues/9138\n'''
else:
toolchainVersion = '4.9'
versionFile.close()
except Exception:
print "Can not be determined your NDK version"
if toolchainVersion == '4.8':
print 'NDK_TOOLCHAIN_VERSION is 4.8,your application may crash on Androud when use c++ 11 regular\n'
current_dir = os.path.dirname(os.path.realpath(__file__))
cocos_root = os.path.join(current_dir, "..")
BUILD_CONSTANT.COCOS_ROOT = cocos_root
# windows should use ";" to seperate module paths
platform = sys.platform
if platform == 'win32':
ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root)
else:
ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root)
''' The build process can be accelerated by running multiple concurrent job processes using the -j-option.
'''
try:
import multiprocessing
num_of_cpu = multiprocessing.cpu_count()
except Exception:
print "Can't know cpuinfo, use default 1 cpu"
num_of_cpu = 1
if ndk_build_param == None:
BUILD_CONSTANT.NDK_BUILD_COMMAND = '%s -j%d NDK_DEBUG=%d %s NDK_TOOLCHAIN_VERSION=%s' % (ndk_build_path, num_of_cpu, build_mode=='debug', ndk_module_path, toolchainVersion)
else:
BUILD_CONSTANT.NDK_BUILD_COMMAND = '%s -j%d NDK_DEBUG=%d %s %s NDK_TOOLCHAIN_VERSION=%s' % (ndk_build_path, num_of_cpu, build_mode=='debug', ndk_build_param, ndk_module_path, toolchainVersion)
def check_environment_variables_sdk():
''' Checking the environment ANDROID_SDK_ROOT, which will be used for building
'''
try:
SDK_ROOT = os.environ['ANDROID_SDK_ROOT']
BUILD_CONSTANT.SDK_ROOT = os.environ['ANDROID_SDK_ROOT']
except Exception:
print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment"
sys.exit(1)
return SDK_ROOT
def select_toolchain_version():
pass
def caculate_built_samples(args):
''' Compute the sampels to be built
'cpp' for short of all cpp tests
@ -79,28 +107,14 @@ def caculate_built_samples(args):
targets = set(targets)
return list(targets)
def do_build(cocos_root, ndk_root, app_android_root, ndk_build_param,sdk_root,android_platform,build_mode):
ndk_path = os.path.join(ndk_root, "ndk-build")
# windows should use ";" to seperate module paths
platform = sys.platform
if platform == 'win32':
ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root)
else:
ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root)
num_of_cpu = get_num_of_cpu()
if ndk_build_param == None:
command = '%s -j%d -C %s NDK_DEBUG=%d %s' % (ndk_path, num_of_cpu, app_android_root, build_mode=='debug', ndk_module_path)
else:
command = '%s -j%d -C %s NDK_DEBUG=%d %s %s' % (ndk_path, num_of_cpu, app_android_root, build_mode=='debug', ndk_build_param, ndk_module_path)
def do_build(app_android_root, android_platform, build_mode):
command = '%s -C %s' % (BUILD_CONSTANT.NDK_BUILD_COMMAND, app_android_root)
print command
if os.system(command) != 0:
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
elif android_platform is not None:
sdk_tool_path = os.path.join(sdk_root, "tools/android")
cocoslib_path = os.path.join(cocos_root, "cocos/platform/android/java")
sdk_tool_path = os.path.join(BUILD_CONSTANT.SDK_ROOT, "tools/android")
cocoslib_path = os.path.join(BUILD_CONSTANT.COCOS_ROOT, "cocos/platform/android/java")
command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path)
if os.system(command) != 0:
raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!")
@ -108,7 +122,7 @@ def do_build(cocos_root, ndk_root, app_android_root, ndk_build_param,sdk_root,an
if os.system(command) != 0:
raise Exception("update project [ " + app_android_root + " ] fails!")
buildfile_path = os.path.join(app_android_root, "build.xml")
command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root)
command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,BUILD_CONSTANT.SDK_ROOT)
os.system(command)
def copy_files(src, dst):
@ -187,27 +201,23 @@ def copy_resources(target, app_android_root):
def build_samples(target,ndk_build_param,android_platform,build_mode):
ndk_root = check_environment_variables()
sdk_root = None
select_toolchain_version()
if build_mode is None:
build_mode = 'debug'
elif build_mode != 'release':
build_mode = 'debug'
initBuildConstant(ndk_build_param, build_mode)
build_targets = caculate_built_samples(target)
current_dir = os.path.dirname(os.path.realpath(__file__))
cocos_root = os.path.join(current_dir, "..")
if android_platform is not None:
sdk_root = check_environment_variables_sdk()
check_environment_variables_sdk()
if android_platform.isdigit():
android_platform = 'android-'+android_platform
else:
print 'please use vaild android platform'
exit(1)
if build_mode is None:
build_mode = 'debug'
elif build_mode != 'release':
build_mode = 'debug'
app_android_root = ''
target_proj_path_map = {
@ -221,13 +231,13 @@ def build_samples(target,ndk_build_param,android_platform,build_mode):
for target in build_targets:
if target in target_proj_path_map:
app_android_root = os.path.join(cocos_root, target_proj_path_map[target])
app_android_root = os.path.join(BUILD_CONSTANT.COCOS_ROOT, target_proj_path_map[target])
else:
print 'unknown target: %s' % target
continue
copy_resources(target, app_android_root)
do_build(cocos_root, ndk_root, app_android_root, ndk_build_param,sdk_root,android_platform,build_mode)
do_build(app_android_root, android_platform, build_mode)
# -------------- main --------------
if __name__ == '__main__':
@ -257,6 +267,7 @@ if __name__ == '__main__':
help='The build mode for java project,debug[default] or release. Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html')
(opts, args) = parser.parse_args()
print "We will use cocos console to build tests built-in with cocos2d-x and remove this script next version.\n"
if len(args) == 0:
parser.print_help()
sys.exit(1)

View File

@ -6,7 +6,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Box2D", "..\external\Box2D\proj.wp8\Box2D.vcxproj", "{C55734A3-702C-4FA1-B950-32C8E169302F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-tests", "cpp-tests", "{671E147E-1DBD-41FC-99B3-2119CA828C8A}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-tests-wp8-xaml", "cpp-tests-wp8-xaml", "{671E147E-1DBD-41FC-99B3-2119CA828C8A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-tests", "..\tests\cpp-tests\proj.wp8-xaml\cpp-tests\cpp-tests.csproj", "{60D53713-1675-4466-81DC-D67A031C3D21}"
ProjectSection(ProjectDependencies) = postProject
@ -15,7 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-tests", "..\tests\cpp-t
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-testsComponent", "..\tests\cpp-tests\proj.wp8-xaml\cpp-testsComponent\cpp-testsComponent.vcxproj", "{86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-empty-test", "cpp-empty-test", "{2C306303-EB4F-4058-8CA0-1F28A4FECE39}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-empty-test-wp8-xaml", "cpp-empty-test-wp8-xaml", "{2C306303-EB4F-4058-8CA0-1F28A4FECE39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj-wp8-xaml\cpp-empty-test\cpp-empty-test.csproj", "{5921FE12-7EF3-4847-8453-42EF286DDBE7}"
ProjectSection(ProjectDependencies) = postProject

File diff suppressed because it is too large Load Diff

View File

@ -141,6 +141,8 @@
1A1645A9191B6283008C7C7F /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A221C9C191771E300FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A221C9D191771E400FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A97AC001A1DC3E30076D9CC /* PerformanceMathTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97ABFE1A1DC3E30076D9CC /* PerformanceMathTest.cpp */; };
1A97AC011A1DC3E30076D9CC /* PerformanceMathTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97ABFE1A1DC3E30076D9CC /* PerformanceMathTest.cpp */; };
1A9F808D177E98A600D9A1CB /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9F808C177E98A600D9A1CB /* libcurl.dylib */; };
1AAF534D180E2F4E000584C8 /* libcocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46A15FB01807A4F9005B8026 /* libcocos2d Mac.a */; };
1AAF5400180E39D4000584C8 /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46A15FBE1807A4F9005B8026 /* libcocos2d iOS.a */; };
@ -715,6 +717,12 @@
29AFEF6719ACCAA000F6B10A /* Test.html in Resources */ = {isa = PBXBuildFile; fileRef = 29AFEF6619ACCAA000F6B10A /* Test.html */; };
29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; };
29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; };
3825CC491A2C982A00C92EA8 /* CustomRootNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC431A2C982A00C92EA8 /* CustomRootNode.cpp */; };
3825CC4A1A2C982A00C92EA8 /* CustomRootNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC431A2C982A00C92EA8 /* CustomRootNode.cpp */; };
3825CC4B1A2C982A00C92EA8 /* CustomRootNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC451A2C982A00C92EA8 /* CustomRootNodeReader.cpp */; };
3825CC4C1A2C982A00C92EA8 /* CustomRootNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC451A2C982A00C92EA8 /* CustomRootNodeReader.cpp */; };
3825CC4D1A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC471A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp */; };
3825CC4E1A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3825CC471A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp */; };
38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; };
38FA2E74194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; };
38FA2E76194AECF800FF2BE4 /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
@ -1067,6 +1075,8 @@
1A0EE41318CDF775004CD58F /* cpp-empty-test iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cpp-empty-test iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1A0EE47E18CDF799004CD58F /* lua-empty-test iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "lua-empty-test iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1A221C9B191771E300FD2BE4 /* ccs-res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "ccs-res"; path = "../tests/cpp-tests/Resources/ccs-res"; sourceTree = "<group>"; };
1A97ABFE1A1DC3E30076D9CC /* PerformanceMathTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceMathTest.cpp; sourceTree = "<group>"; };
1A97ABFF1A1DC3E30076D9CC /* PerformanceMathTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceMathTest.h; sourceTree = "<group>"; };
1A9F808C177E98A600D9A1CB /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; };
1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_lua_bindings.xcodeproj; path = "../cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj"; sourceTree = "<group>"; };
1ABCA28618CD91510087CE3A /* lua-tests Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "lua-tests Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1644,6 +1654,12 @@
29AFEF6619ACCAA000F6B10A /* Test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = Test.html; path = "../tests/cpp-tests/Resources/Test.html"; sourceTree = "<group>"; };
29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = "<group>"; };
29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = "<group>"; };
3825CC431A2C982A00C92EA8 /* CustomRootNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomRootNode.cpp; sourceTree = "<group>"; };
3825CC441A2C982A00C92EA8 /* CustomRootNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomRootNode.h; sourceTree = "<group>"; };
3825CC451A2C982A00C92EA8 /* CustomRootNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomRootNodeReader.cpp; sourceTree = "<group>"; };
3825CC461A2C982A00C92EA8 /* CustomRootNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomRootNodeReader.h; sourceTree = "<group>"; };
3825CC471A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomWidgetCallbackBindTest.cpp; sourceTree = "<group>"; };
3825CC481A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomWidgetCallbackBindTest.h; sourceTree = "<group>"; };
38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = "<group>"; };
38FA2E72194AEBE100FF2BE4 /* ActionTimelineTestScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActionTimelineTestScene.h; sourceTree = "<group>"; };
38FA2E75194AECF800FF2BE4 /* ActionTimeline */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ActionTimeline; path = "../tests/cpp-tests/Resources/ActionTimeline"; sourceTree = "<group>"; };
@ -2898,12 +2914,16 @@
children = (
1AC35AC218CECF0C00F37B72 /* PerformanceAllocTest.cpp */,
1AC35AC318CECF0C00F37B72 /* PerformanceAllocTest.h */,
1AF152D718FD252A00A52F3D /* PerformanceCallbackTest.cpp */,
1AF152D818FD252A00A52F3D /* PerformanceCallbackTest.h */,
1AC35AC418CECF0C00F37B72 /* PerformanceContainerTest.cpp */,
1AC35AC518CECF0C00F37B72 /* PerformanceContainerTest.h */,
1AC35AC618CECF0C00F37B72 /* PerformanceEventDispatcherTest.cpp */,
1AC35AC718CECF0C00F37B72 /* PerformanceEventDispatcherTest.h */,
1AC35AC818CECF0C00F37B72 /* PerformanceLabelTest.cpp */,
1AC35AC918CECF0C00F37B72 /* PerformanceLabelTest.h */,
1A97ABFE1A1DC3E30076D9CC /* PerformanceMathTest.cpp */,
1A97ABFF1A1DC3E30076D9CC /* PerformanceMathTest.h */,
1AC35ACA18CECF0C00F37B72 /* PerformanceNodeChildrenTest.cpp */,
1AC35ACB18CECF0C00F37B72 /* PerformanceNodeChildrenTest.h */,
1AC35ACC18CECF0C00F37B72 /* PerformanceParticleTest.cpp */,
@ -2920,8 +2940,6 @@
1AC35AD718CECF0C00F37B72 /* PerformanceTextureTest.h */,
1AC35AD818CECF0C00F37B72 /* PerformanceTouchesTest.cpp */,
1AC35AD918CECF0C00F37B72 /* PerformanceTouchesTest.h */,
1AF152D718FD252A00A52F3D /* PerformanceCallbackTest.cpp */,
1AF152D818FD252A00A52F3D /* PerformanceCallbackTest.h */,
);
path = PerformanceTest;
sourceTree = "<group>";
@ -3392,6 +3410,7 @@
29080D25191B595E0066F8DF /* CustomTest */ = {
isa = PBXGroup;
children = (
3825CC421A2C982A00C92EA8 /* CustomWidgetCallbackBindTest */,
29080D2C191B595E0066F8DF /* CustomWidget */,
29080D23191B595E0066F8DF /* CustomGUIScene.cpp */,
29080D24191B595E0066F8DF /* CustomGUIScene.h */,
@ -3755,6 +3774,19 @@
path = UITest/CocoStudioGUITest;
sourceTree = "<group>";
};
3825CC421A2C982A00C92EA8 /* CustomWidgetCallbackBindTest */ = {
isa = PBXGroup;
children = (
3825CC431A2C982A00C92EA8 /* CustomRootNode.cpp */,
3825CC441A2C982A00C92EA8 /* CustomRootNode.h */,
3825CC451A2C982A00C92EA8 /* CustomRootNodeReader.cpp */,
3825CC461A2C982A00C92EA8 /* CustomRootNodeReader.h */,
3825CC471A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp */,
3825CC481A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.h */,
);
path = CustomWidgetCallbackBindTest;
sourceTree = "<group>";
};
38FA2E70194AEBE100FF2BE4 /* CocoStudioActionTimelineTest */ = {
isa = PBXGroup;
children = (
@ -4679,6 +4711,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3825CC491A2C982A00C92EA8 /* CustomRootNode.cpp in Sources */,
1AC35B3118CECF0C00F37B72 /* GLES-Render.cpp in Sources */,
29080DE1191B595E0066F8DF /* UITextTest_Editor.cpp in Sources */,
1AC35C5318CECF0C00F37B72 /* TextInputTest.cpp in Sources */,
@ -4710,6 +4743,7 @@
59620E8F1921E5CF002021B6 /* Bug-Child.cpp in Sources */,
29080DCD191B595E0066F8DF /* UIScrollViewTest_Editor.cpp in Sources */,
1AC35B5118CECF0C00F37B72 /* ClippingNodeTest.cpp in Sources */,
3825CC4D1A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp in Sources */,
1AC35C1318CECF0C00F37B72 /* LayerTest.cpp in Sources */,
29080D97191B595E0066F8DF /* CustomImageView.cpp in Sources */,
1AC35C1F18CECF0C00F37B72 /* NodeTest.cpp in Sources */,
@ -4783,6 +4817,7 @@
1AC35C1118CECF0C00F37B72 /* LabelTestNew.cpp in Sources */,
1AC35B4D18CECF0C00F37B72 /* ChipmunkTest.cpp in Sources */,
1AC35BDF18CECF0C00F37B72 /* cons.cpp in Sources */,
3825CC4B1A2C982A00C92EA8 /* CustomRootNodeReader.cpp in Sources */,
1AC35B5718CECF0C00F37B72 /* ConsoleTest.cpp in Sources */,
29080DA7191B595E0066F8DF /* UICheckBoxTest.cpp in Sources */,
29080DDD191B595E0066F8DF /* UITextFieldTest_Editor.cpp in Sources */,
@ -4840,6 +4875,7 @@
29080DC9191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */,
1AC35B3F18CECF0C00F37B72 /* Bug-458.cpp in Sources */,
3E2F27B919CFF4AF00E7C490 /* NewAudioEngineTest.cpp in Sources */,
1A97AC001A1DC3E30076D9CC /* PerformanceMathTest.cpp in Sources */,
1AC35C3918CECF0C00F37B72 /* PerformanceTextureTest.cpp in Sources */,
1AC35B5318CECF0C00F37B72 /* CocosDenshionTest.cpp in Sources */,
29080DD3191B595E0066F8DF /* UITextAtlasTest.cpp in Sources */,
@ -4957,6 +4993,7 @@
1AC35C5018CECF0C00F37B72 /* SpriteTest.cpp in Sources */,
3E2BDAD019BEA3410055CDCD /* NewAudioEngineTest.cpp in Sources */,
1AC35C0418CECF0C00F37B72 /* FileUtilsTest.cpp in Sources */,
3825CC4C1A2C982A00C92EA8 /* CustomRootNodeReader.cpp in Sources */,
1AC35B5C18CECF0C00F37B72 /* CurlTest.cpp in Sources */,
1AC35C0018CECF0C00F37B72 /* CustomTableViewCell.cpp in Sources */,
29080D92191B595E0066F8DF /* CustomGUIScene.cpp in Sources */,
@ -5020,6 +5057,7 @@
1AC35B2218CECF0C00F37B72 /* ActionManagerTest.cpp in Sources */,
29080D90191B595E0066F8DF /* CocoStudioGUITest.cpp in Sources */,
1AC35C3E18CECF0C00F37B72 /* PhysicsTest.cpp in Sources */,
3825CC4A1A2C982A00C92EA8 /* CustomRootNode.cpp in Sources */,
29080DC6191B595E0066F8DF /* UIScene_Editor.cpp in Sources */,
29080DB2191B595E0066F8DF /* UILayoutTest.cpp in Sources */,
1AC35B6A18CECF0C00F37B72 /* ButtonTestLayer.cpp in Sources */,
@ -5031,6 +5069,7 @@
29080DC8191B595E0066F8DF /* UISceneManager.cpp in Sources */,
1AC35C6A18CECF0C00F37B72 /* VisibleRect.cpp in Sources */,
1AC35C4018CECF0C00F37B72 /* ReleasePoolTest.cpp in Sources */,
1A97AC011A1DC3E30076D9CC /* PerformanceMathTest.cpp in Sources */,
1AC35C5818CECF0C00F37B72 /* TextureCacheTest.cpp in Sources */,
1AC35B6E18CECF0C00F37B72 /* HelloCocosBuilderLayer.cpp in Sources */,
29080D96191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */,
@ -5047,6 +5086,7 @@
1AC35B5418CECF0C00F37B72 /* CocosDenshionTest.cpp in Sources */,
1AC35B8018CECF0C00F37B72 /* ProjectileController.cpp in Sources */,
1AC35C2618CECF0C00F37B72 /* PerformanceAllocTest.cpp in Sources */,
3825CC4E1A2C982A00C92EA8 /* CustomWidgetCallbackBindTest.cpp in Sources */,
3E92EA831921A1400094CD21 /* Sprite3DTest.cpp in Sources */,
1AC35B5A18CECF0C00F37B72 /* controller.cpp in Sources */,
1AC35C2A18CECF0C00F37B72 /* PerformanceEventDispatcherTest.cpp in Sources */,
@ -5644,7 +5684,6 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../tests/cpp-tests/proj.ios/Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
@ -5668,7 +5707,6 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../tests/cpp-tests/proj.ios/Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (

View File

@ -21,6 +21,7 @@ DEPENDS+=' libfontconfig1-dev'
DEPENDS+=' libsqlite3-dev'
DEPENDS+=' libglew*-dev'
DEPENDS+=' libssl-dev'
DEPENDS+=' gnutls-dev'
MISSING=
echo "Checking for missing packages ..."

View File

@ -1,71 +1,2 @@
macro(pre_build TARGET_NAME)
add_custom_target( ${TARGET_NAME}_PRE_BUILD ALL )
add_custom_command(
TARGET ${TARGET_NAME}_PRE_BUILD
${ARGN}
PRE_BUILD
COMMENT "${TARGET_NAME}_PRE_BUILD ..."
)
add_custom_target(${TARGET_NAME}_CORE_PRE_BUILD)
add_dependencies(${TARGET_NAME}_PRE_BUILD ${TARGET_NAME}_CORE_PRE_BUILD)
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_PRE_BUILD)
endmacro()
#cmake has some strange defaults, this should help us a lot
#Please use them everywhere
#WINDOWS = Windows Desktop
#WINRT = Windows RT
#WP8 = Windows Phone 8
#ANDROID = ANDROID
#IOS = IOS
#MACOSX = MAC OSX
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(WINRT)
set(SYSTEM_STRING "Windows RT")
elseif(WP8)
set(SYSTEM_STRING "Windows Phone 8")
else()
set(WINDOWS TRUE)
set(SYSTEM_STRING "Windows Desktop")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(ANDROID)
set(SYSTEM_STRING "Android")
else()
set(LINUX TRUE)
set(SYSTEM_STRING "Linux")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(IOS)
set(SYSTEM_STRING "IOS")
else()
set(MACOSX TRUE)
set(APPLE TRUE)
set(SYSTEM_STRING "Mac OSX")
endif()
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(COMPILER_STRING ${CMAKE_CXX_COMPILER_ID})
set(CLANG TRUE)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(MINGW)
set(COMPILER_STRING "Mingw GCC")
else()
set(COMPILER_STRING "GCC")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(COMPILER_STRING "${CMAKE_CXX_COMPILER_ID} C++")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(COMPILER_STRING "Visual Studio C++")
endif()
if(CMAKE_CROSSCOMPILING)
set(BUILDING_STRING "It appears you are cross compiling for ${SYSTEM_STRING} with ${COMPILER_STRING}")
else()
set(BUILDING_STRING "It appears you are builing natively for ${SYSTEM_STRING} with ${COMPILER_STRING}")
endif()
# For compatibility only, please use include(CocosBuildHelpers) in future projects
include(CocosBuildHelpers)

View File

@ -0,0 +1,163 @@
include(CMakeParseArguments)
macro(pre_build TARGET_NAME)
add_custom_target( ${TARGET_NAME}_PRE_BUILD ALL )
add_custom_command(
TARGET ${TARGET_NAME}_PRE_BUILD
${ARGN}
PRE_BUILD
COMMENT "${TARGET_NAME}_PRE_BUILD ..."
)
add_custom_target(${TARGET_NAME}_CORE_PRE_BUILD)
add_dependencies(${TARGET_NAME}_PRE_BUILD ${TARGET_NAME}_CORE_PRE_BUILD)
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_PRE_BUILD)
endmacro()
function(cocos_mark_resources)
set(oneValueArgs BASEDIR RESOURCEBASE)
set(multiValueArgs FILES)
cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT opt_RESOURCEBASE)
set(opt_RESOURCEBASE Resources)
endif()
get_filename_component(BASEDIR_ABS ${opt_BASEDIR} ABSOLUTE)
foreach(RES_FILE ${opt_FILES} ${opt_UNPARSED_ARGUMENTS})
get_filename_component(RES_FILE_ABS ${RES_FILE} ABSOLUTE)
file(RELATIVE_PATH RES ${BASEDIR_ABS} ${RES_FILE_ABS})
get_filename_component(RES_LOC ${RES} PATH)
set_source_files_properties(${RES_FILE} PROPERTIES
MACOSX_PACKAGE_LOCATION "${opt_RESOURCEBASE}/${RES_LOC}"
HEADER_FILE_ONLY 1
)
endforeach()
endfunction()
# cocos_find_package(pkg args...)
# works same as find_package, but do additional care to properly find
# prebuilt libs for cocos
macro(cocos_find_package pkg_name pkg_prefix)
if(NOT USE_PREBUILT_LIBS OR NOT ${pkg_prefix}_FOUND)
find_package(${pkg_name} ${ARGN})
endif()
if(NOT ${pkg_prefix}_INCLUDE_DIRS AND ${pkg_prefix}_INCLUDE_DIR)
set(${pkg_prefix}_INCLUDE_DIRS ${${pkg_prefix}_INCLUDE_DIR})
endif()
if(NOT ${pkg_prefix}_LIBRARIES AND ${pkg_prefix}_LIBRARY)
set(${pkg_prefix}_LIBRARIES ${${pkg_prefix}_LIBRARY})
endif()
message(STATUS "${pkg_name} include dirs: ${${pkg_prefix}_INCLUDE_DIRS}")
endmacro()
# cocos_use_pkg(pkg) function.
# This function applies standard package variables (after find_package(pkg) call) to current scope
# Recognized variables: <pkg>_INCLUDE_DIRS, <pkg>_LIBRARIES, <pkg>_LIBRARY_DIRS
# Also if BUILD_SHARED_LIBS variable off, it is try to use <pkg>_STATIC_* vars before
function(cocos_use_pkg target pkg)
set(prefix ${pkg})
set(_include_dirs)
if(NOT _include_dirs)
set(_include_dirs ${${prefix}_INCLUDE_DIRS})
endif()
if(NOT _include_dirs)
# backward compat with old package-find scripts
set(_include_dirs ${${prefix}_INCLUDE_DIR})
endif()
if(_include_dirs)
include_directories(${_include_dirs})
message(STATUS "${pkg} add to include_dirs: ${_include_dirs}")
endif()
set(_library_dirs)
if(NOT _library_dirs)
set(_library_dirs ${${prefix}_LIBRARY_DIRS})
endif()
if(_library_dirs)
link_directories(${_library_dirs})
message(STATUS "${pkg} add to link_dirs: ${_library_dirs}")
endif()
set(_libs)
if(NOT _libs)
set(_libs ${${prefix}_LIBRARIES})
endif()
if(NOT _libs)
set(_libs ${${prefix}_LIBRARY})
endif()
if(_libs)
target_link_libraries(${target} ${_libs})
message(STATUS "${pkg} libs added to '${target}': ${_libs}")
endif()
set(_defs)
if(NOT _defs)
set(_defs ${${prefix}_DEFINITIONS})
endif()
if(_defs)
add_definitions(${_defs})
message(STATUS "${pkg} add definitions: ${_defs}")
endif()
endfunction()
#cmake has some strange defaults, this should help us a lot
#Please use them everywhere
#WINDOWS = Windows Desktop
#WINRT = Windows RT
#WP8 = Windows Phone 8
#ANDROID = Android
#IOS = iOS
#MACOSX = MacOS X
#LINUX = Linux
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(WINRT)
set(SYSTEM_STRING "Windows RT")
elseif(WP8)
set(SYSTEM_STRING "Windows Phone 8")
else()
set(WINDOWS TRUE)
set(SYSTEM_STRING "Windows Desktop")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(ANDROID)
set(SYSTEM_STRING "Android")
else()
set(LINUX TRUE)
set(SYSTEM_STRING "Linux")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(IOS)
set(SYSTEM_STRING "IOS")
else()
set(MACOSX TRUE)
set(APPLE TRUE)
set(SYSTEM_STRING "Mac OSX")
endif()
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(COMPILER_STRING ${CMAKE_CXX_COMPILER_ID})
set(CLANG TRUE)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(MINGW)
set(COMPILER_STRING "Mingw GCC")
else()
set(COMPILER_STRING "GCC")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(COMPILER_STRING "${CMAKE_CXX_COMPILER_ID} C++")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(COMPILER_STRING "Visual Studio C++")
endif()
if(CMAKE_CROSSCOMPILING)
set(BUILDING_STRING "It appears you are cross compiling for ${SYSTEM_STRING} with ${COMPILER_STRING}")
else()
set(BUILDING_STRING "It appears you are builing natively for ${SYSTEM_STRING} with ${COMPILER_STRING}")
endif()

View File

@ -0,0 +1,169 @@
# CocosUsePrebuiltLibs - sets external libs variables to link with
# START CONFIG
set(_chipmunk_inc chipmunk.h)
set(_chipmunk_inc_paths chipmunk)
set(_chipmunk_libs chipmunk libchipmunk)
set(_curl_inc curl/curl.h)
set(_curl_libs crypto ssl libeay32 ssleay32 curl libcurl_imp libcurl)
set(_freetype2_prefix FREETYPE)
set(_freetype2_inc ft2build.h freetype/freetype.h)
set(_freetype2_inc_paths freetype2)
set(_freetype2_libs freetype freetype250)
set(_jpeg_inc jpeglib.h)
set(_jpeg_libs jpeg libjpeg)
set(_png_inc png.h)
set(_png_libs png libpng)
set(_tiff_inc tiff.h)
set(_tiff_libs tiff libtiff)
set(_webp_inc decode.h)
set(_webp_libs webp libwebp)
set(_websockets_inc libwebsockets.h)
set(_websockets_libs websockets libwebsockets)
set(_glfw3_inc glfw3.h)
set(_glfw3_libs glfw3 libglfw3)
set(_sqlite3_inc sqlite3.h)
set(_sqlite3_libs sqlite3)
set(_gles_prefix GLEW)
set(_gles_inc glew.h)
set(_gles_inc_paths OGLES)
set(_gles_libs glew32)
set(_icon_prefix ICONV)
set(_icon_inc iconv.h)
set(_icon_libs libiconv)
set(_MP3Decoder_prefix MPG123)
set(_MP3Decoder_inc mpg123.h)
set(_MP3Decoder_libs libmpg123)
set(_OggDecoder_prefix VORBIS)
set(_OggDecoder_inc ogg/ogg.h)
set(_OggDecoder_libs libogg libvorbis libvorbisfile)
set(_OpenalSoft_prefix OPENAL)
set(_OpenalSoft_inc al.h)
set(_OpenalSoft_inc_paths AL)
set(_OpenalSoft_libs OpenAL32)
set(_zlib_inc zlib.h)
set(_zlib_libs libzlib)
set(_fmod_prefix FMODEX)
set(_fmod_inc fmod.h)
set(_fmod_libs fmodex fmodex64 fmodexL fmodexL64)
set(all_prebuilt_libs
chipmunk
curl
freetype2
jpeg
png
tiff
webp
websockets
)
if(MACOSX)
list(APPEND all_prebuilt_libs glfw3)
endif()
# We use MSVC instead of WINDOWS because it can be mingw that can't use our prebuilt libs
if(MSVC)
list(APPEND all_prebuilt_libs glfw3 sqlite3 gles icon MP3Decoder OggDecoder OpenalSoft zlib)
endif()
if(LINUX)
list(APPEND all_prebuilt_libs fmod)
endif()
# END CONFIG
foreach(_lib ${all_prebuilt_libs})
if(_${_lib}_prefix)
set(_prefix ${_${_lib}_prefix})
else()
# auto-prefix is uppercased name
string(TOUPPER ${_lib} _prefix)
endif()
set(roots
${COCOS_EXTERNAL_DIR}/${_lib}
${COCOS_EXTERNAL_DIR}/${PLATFORM_FOLDER}-specific/${_lib}
)
foreach(_root ${roots})
if(EXISTS ${_root})
set(include_dir_candidates
${_root}/include
${_root}/include/${ARCH_DIR}
${_root}/include/${PLATFORM_FOLDER}
${_root}/include/${PLATFORM_FOLDER}/${ARCH_DIR}
)
set(include_dirs)
foreach(_dir ${include_dir_candidates})
if(EXISTS ${_dir})
# find all include paths
if(_${_lib}_inc_paths)
set(_suffixes ${_${_lib}_inc_paths})
else()
set(_suffixes include)
endif()
foreach(_inc_name ${_${_lib}_inc})
unset(_inc_tmp CACHE)
find_path(_inc_tmp ${_inc_name} PATH_SUFFIXES ${_suffixes} PATHS ${_dir} NO_DEFAULT_PATH)
if(_inc_tmp)
list(APPEND include_dirs ${_inc_tmp})
endif()
endforeach()
endif(EXISTS ${_dir})
endforeach()
if(include_dirs)
set(${_prefix}_INCLUDE_DIRS ${include_dirs} CACHE PATH "Path to includes for ${_prefix}" FORCE)
endif()
#message(STATUS "${_lib} ${_prefix}_INCLUDE_DIRS: ${${_prefix}_INCLUDE_DIRS}")
set(lib_dir_candidates
${_root}/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
${_root}/prebuilt/${PLATFORM_FOLDER}
${_root}/prebuilt/${PLATFORM_FOLDER}/release-lib
${_root}/prebuilt/${ARCH_DIR}
${_root}/libraries/${PLATFORM_FOLDER}
${_root}/prebuilt
)
set(libs)
foreach(_dir ${lib_dir_candidates})
if(EXISTS ${_dir})
# find all libs
foreach(_lib_name ${_${_lib}_libs})
unset(_lib_tmp CACHE)
find_library(_lib_tmp ${_lib_name} PATHS ${_dir} NO_DEFAULT_PATH)
if(_lib_tmp)
list(APPEND libs ${_lib_tmp})
endif()
endforeach()
endif(EXISTS ${_dir})
endforeach()
if(libs)
set(${_prefix}_LIBRARIES ${libs} CACHE STRING "Libraries to link for ${_prefix}" FORCE)
endif()
#message(STATUS "${_lib} ${_prefix}_LIBRARIES: ${${_prefix}_LIBRARIES}")
if(${_prefix}_LIBRARIES AND ${_prefix}_INCLUDE_DIRS)
set(${_prefix}_FOUND YES)
endif()
endif(EXISTS ${_root})
endforeach()
endforeach()

View File

@ -0,0 +1,86 @@
#.rst:
# FindCURL
# --------
#
# Find curl
#
# Find the native CURL headers and libraries.
#
# ::
#
# CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
# CURL_LIBRARIES - List of libraries when using curl.
# CURL_FOUND - True if curl found.
# CURL_VERSION_STRING - the version of curl found (since CMake 2.8.8)
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
set(CURL_LIBRARY_NAMES
curl
# Windows MSVC prebuilts:
curllib
libcurl_imp
curllib_static
# Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip):
libcurl
)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_search_module(CURL QUIET libcurl)
endif()
if(NOT CURL_FOUND)
# Look for the header file.
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
mark_as_advanced(CURL_INCLUDE_DIR)
# Look for the library (sorted from most current/relevant entry to least).
find_library(CURL_LIBRARY NAMES
curl
# Windows MSVC prebuilts:
curllib
libcurl_imp
curllib_static
# Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip):
libcurl
)
mark_as_advanced(CURL_LIBRARY)
if(CURL_INCLUDE_DIR)
foreach(_curl_version_header curlver.h curl.h)
if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}")
file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
string(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" CURL_VERSION_STRING "${curl_version_str}")
unset(curl_version_str)
break()
endif()
endforeach()
endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
VERSION_VAR CURL_VERSION_STRING)
if(CURL_FOUND)
set(CURL_LIBRARIES ${CURL_LIBRARY})
set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
endif()
endif()

View File

@ -0,0 +1,51 @@
#.rst:
# FindFMODEX
# ------------
#
# Locate FMOD Ex library
#
# This module defines
#
# ::
#
# FMODEX_LIBRARIES, the library to link against
# FMODEX_FOUND, if false, do not try to link to fmodex
# FMODEX_INCLUDE_DIRS, where to find headers.
#
find_path(FMODEX_INCLUDE_DIR fmod.h
HINTS ENV FMODEX_DIR
PATH_SUFFIXES include/fmodex include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(FMODEX_LIBRARY NAMES fmodex fmodex64
HINTS ENV FMODEX_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
set(FMODEX_INCLUDE_DIRS "${FMODEX_INCLUDE_DIR}")
set(FMODEX_LIBRARIES "${FMODEX_LIBRARY}")
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(FMODEX DEFAULT_MSG FMODEX_LIBRARIES FMODEX_INCLUDE_DIRS)
mark_as_advanced(FMODEX_INCLUDE_DIR FMODEX_LIBRARY FMODEX_INCLUDE_DIRS FMODEX_LIBRARIES)

View File

@ -0,0 +1,17 @@
# FindFontconfig
# --------------
#
# Locate Fontconfig library
#
if(NOT FONTCONFIG_FOUND)
find_package(PkgConfig)
pkg_search_module(FONTCONFIG fontconfig)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fontconfig
REQUIRED_VARS FONTCONFIG_FOUND
VERSION_VAR FONTCONFIG_VERSION
)

View File

@ -0,0 +1,168 @@
#.rst:
# FindFreetype
# ------------
#
# Locate FreeType library
#
# This module defines
#
# ::
#
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8)
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
#
#
# $FREETYPE_DIR is an environment variable that would correspond to the
# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
# Try find freetype for our arch in external folder
#todo: fix location of freetype includes for linux android on cocos prebuilt repo
#i.e we should not need to include an extra dir of /freetype2
# Try pkg-config first (because it provided deps info)
if(NOT FREETYPE_FOUND)
find_package(PkgConfig)
pkg_search_module(FREETYPE freetype2)
endif()
if(NOT FREETYPE_FOUND)
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like include_directories()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
ENV FREETYPE_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include
)
find_path(FREETYPE_INCLUDE_DIR_freetype2
NAMES
freetype/config/ftheader.h
config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include
)
find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
ENV FREETYPE_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
)
# set the user variables
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS)
endif()
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
endif()
if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
file(STRINGS "${FREETYPE_H}" freetype_version_str
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
unset(FREETYPE_VERSION_STRING)
foreach(VPART MAJOR MINOR PATCH)
foreach(VLINE ${freetype_version_str})
if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}")
string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1"
FREETYPE_VERSION_PART "${VLINE}")
if(FREETYPE_VERSION_STRING)
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
else()
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
endif()
unset(FREETYPE_VERSION_PART)
endif()
endforeach()
endforeach()
endif()
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype
REQUIRED_VARS FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIRS
VERSION_VAR FREETYPE_VERSION_STRING)
endif(NOT FREETYPE_FOUND)
mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build)

View File

@ -27,43 +27,130 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
FIND_PATH(GLFW3_INCLUDE_DIR glfw3.h
HINTS
ENV GLFW3_DIR
PATH_SUFFIXES include/GLFW include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
# glfw has special requirements for linking (from docs: http://www.glfw.org/docs/latest/build.html)
# MINGW or MSVC + static "glfw3" -> link: opengl32, gdi32 (plus glu32 if use GLU)
# MINGW or MSVC + dynamic "glfw3dll" (but this not true ;) -> -DGLFW_DLL link: no
# UNIX + static -> pkg-config --static --libs
# UNIX + dynamic -> pkg-config --libs
# So... if we find dynamic version, no problems, but if we find static, we need to determine deps
# but cmake can't simply say to us what kind of library it found. So we try to find static version
# first, and then if nothing found, we repeat search for dynamic
FIND_LIBRARY(GLFW3_LIBRARY
NAMES glfw3 libglfw3 glfw
HINTS
ENV GLFW3_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
message(STATUS "PkgConfig found")
else()
message(STATUS "PkgConfig not found, if you have only static glfw library, you build can fail")
endif()
set(GLFW3_INCLUDE_DIRS "${GLFW3_INCLUDE_DIR}")
set(GLFW3_LIBRARIES "${GLFW3_LIBRARY}")
if(PKG_CONFIG_FOUND)
# Save some global stuff that we change, to revert after work has been done
set(_saved_PKG_CONFIG_PATH "$ENV{PKG_CONFIG_PATH}")
set(_saved_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set GLFW3_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW3 DEFAULT_MSG GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
# add /usr/local/lib/pkgconfig to pkg-config search path (some linuxes do not do that, but glfw installs to taht prefix by default)
file(TO_CMAKE_PATH "$ENV{PKG_CONFIG_PATH}" PKG_CONFIG_PATH)
list(APPEND PKG_CONFIG_PATH "/usr/local/lib/pkgconfig")
file(TO_NATIVE_PATH "${PKG_CONFIG_PATH}" new_pkg_config_path)
set(ENV{PKG_CONFIG_PATH} "${new_pkg_config_path}")
MARK_AS_ADVANCED(GLFW3_INCLUDE_DIR GLFW3_LIBRARIES GLFW3_LIBRARY)
# now try to find glfw with pkg-config
pkg_check_modules(PC_GLFW3 glfw3)
if(PC_GLFW3_FOUND)
# try to find static library
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
find_library(GLFW3_STATIC_LIBRARY NAMES glfw3 libglfw3 PATHS ${PC_GLFW3_LIBRARY_DIRS} NO_DEFAULT_PATH)
find_library(GLFW3_STATIC_LIBRARY NAMES glfw3 libglfw3 PATHS ${PC_GLFW3_LIBRARY_DIRS})
# also we include glfw3.h header, not GLFW/glfw3.h :(
find_path(GLFW3_INCLUDE_DIRS glfw3.h PATH_SUFFIXES GLFW PATHS ${PC_GLFW3_INCLUDE_DIRS} NO_DEFAULT_PATH)
find_path(GLFW3_INCLUDE_DIRS glfw3.h PATH_SUFFIXES GLFW PATHS ${PC_GLFW3_INCLUDE_DIRS})
if(GLFW3_STATIC_LIBRARY)
# glfw3 is static
set(GLFW3_LIBRARIES ${PC_GLFW3_STATIC_LIBRARIES})
set(GLFW3_LIBRARY_DIRS ${PC_GLFW3_STATIC_LIBRARY_DIRS})
# We also need to add any other LDFLAGS, but with additional fixup for Apple frameworks :(
if(APPLE)
unset(_is_framework)
foreach(_arg ${PC_GLFW3_STATIC_LDFLAGS_OTHER})
if(_is_framework)
set(var FRAMEWORK_${_arg}_LIBRARY)
find_library(${var} ${_arg})
if(${var})
list(APPEND GLFW3_LIBRARIES ${${var}})
endif()
unset(var)
unset(_is_framework)
else()
if(_arg STREQUAL "-framework")
set(_is_framework 1)
else()
list(APPEND GLFW3_LIBRARIES ${_arg})
endif()
endif()
endforeach()
else(APPLE)
list(APPEND GLFW3_LIBRARIES ${PC_GLFW3_STATIC_LDFLAGS_OTHER})
endif(APPLE)
else()
# glfw3 is dynamic
set(GLFW3_DEFINITIONS -DGLFW_DLL)
set(GLFW3_LIBRARIES ${PC_GLFW3_LIBRARIES})
set(GLFW3_LIBRARY_DIRS ${PC_GLFW3_LIBRARY_DIRS})
endif()
set(GLFW3_FOUND 1)
endif()
# Restore global stuff
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_saved_CMAKE_FIND_LIBRARY_SUFFIXES}")
set(ENV{PKG_CONFIG_PATH} "${_saved_PKG_CONFIG_PATH}")
endif(PKG_CONFIG_FOUND)
# fallback if pkg-config method not work
if(NOT GLFW3_FOUND)
find_path(GLFW3_INCLUDE_DIR glfw3.h
HINTS
ENV GLFW3_DIR
PATH_SUFFIXES include/GLFW include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(GLFW3_LIBRARY
NAMES glfw3 libglfw3 glfw
HINTS
ENV GLFW3_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
set(GLFW3_INCLUDE_DIRS "${GLFW3_INCLUDE_DIR}")
set(GLFW3_LIBRARIES "${GLFW3_LIBRARY}")
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(GLFW3 DEFAULT_MSG GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
endif()
mark_as_advanced(GLFW3_INCLUDE_DIR GLFW3_LIBRARIES GLFW3_LIBRARY)

View File

@ -0,0 +1,69 @@
#.rst:
# FindJPEG
# --------
#
# Find JPEG
#
# Find the native JPEG includes and library This module defines
#
# ::
#
# JPEG_INCLUDE_DIRS, where to find jpeglib.h, etc.
# JPEG_LIBRARIES, the libraries needed to use JPEG.
# JPEG_FOUND, If false, do not try to use JPEG.
#
# also defined, but not for general use are
#
# ::
#
# JPEG_LIBRARY, where to find the JPEG library.
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(USE_PREBUILT_LIBS)
find_path(JPEG_INCLUDE_DIR jpeglib.h
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
PATHS ${COCOS_EXTERNAL_DIR}/jpeg
NO_DEFAULT_PATH
)
find_library(JPEG_LIBRARY NAMES jpeg
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/jpeg
NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT JPEG_INCLUDE_DIR OR NOT JPEG_LIBRARY)
unset(JPEG_INCLUDE_DIR CACHE)
unset(JPEG_LIBRARY CACHE)
endif()
endif()
find_path(JPEG_INCLUDE_DIR jpeglib.h)
set(JPEG_NAMES ${JPEG_NAMES} jpeg)
find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
if(JPEG_FOUND)
set(JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR})
set(JPEG_LIBRARIES ${JPEG_LIBRARY})
endif()
mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIRS )

View File

@ -0,0 +1,60 @@
#.rst:
# FindMINIZIP
# ------------
#
# Locate minizip library (from zlib package)
#
# This module defines
#
# ::
#
# MINIZIP_LIBRARIES, the library to link against
# MINIZIP_FOUND, if false, do not try to link to fmodex
# MINIZIP_INCLUDE_DIRS, where to find headers.
#
# Try pkg-config first
if(NOT MINIZIP_LIBRARY AND NOT MINIZIP_INCLUDE_DIR)
find_package(PkgConfig)
pkg_search_module(MINIZIP minizip)
if(MINIZIP_FOUND)
return()
endif()
endif()
find_path(MINIZIP_INCLUDE_DIR minizip/unzip.h
HINTS ENV MINIZIP_DIR
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(MINIZIP_LIBRARY NAMES minizip libminizip
HINTS ENV MINIZIP_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
set(MINIZIP_INCLUDE_DIRS "${MINIZIP_INCLUDE_DIR}")
set(MINIZIP_LIBRARIES "${MINIZIP_LIBRARY}")
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(MINIZIP DEFAULT_MSG MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS)
mark_as_advanced(MINIZIP_INCLUDE_DIR MINIZIP_LIBRARY)

View File

@ -0,0 +1,17 @@
# - Find mpg123
# Find the native mpg123 includes and libraries
#
# MPG123_INCLUDE_DIRS - where to find mpg123.h, etc.
# MPG123_LIBRARIES - List of libraries when using mpg123.
# MPG123_FOUND - True if mpg123 found.
find_path(MPG123_INCLUDE_DIR mpg123.h)
find_library(MPG123_LIBRARY NAMES mpg123 libmpg123)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPG123 DEFAULT_MSG MPG123_INCLUDE_DIR MPG123_LIBRARY)
set(MPG123_INCLUDE_DIRS ${MPG123_INCLUDE_DIR})
set(MPG123_LIBRARIES ${MPG123_LIBRARY})
mark_as_advanced(MPG123_INCLUDE_DIR MPG123_LIBRARY)

View File

@ -0,0 +1,20 @@
# - Find ogg
# Find the native ogg includes and libraries
#
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
# OGG_LIBRARIES - List of libraries when using ogg.
# OGG_FOUND - True if ogg found.
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
# MSVC built ogg may be named ogg_static.
# The provided project files name the library with the lib prefix.
find_library(OGG_LIBRARY NAMES ogg ogg_static libogg libogg_static)
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIR OGG_LIBRARY)
set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
set(OGG_LIBRARIES ${OGG_LIBRARY})
mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)

178
cmake/Modules/FindPNG.cmake Normal file
View File

@ -0,0 +1,178 @@
#.rst:
# FindPNG
# -------
#
# Find the native PNG includes and library
#
#
#
# This module searches libpng, the library for working with PNG images.
#
# It defines the following variables
#
# ::
#
# PNG_INCLUDE_DIRS, where to find png.h, etc.
# PNG_LIBRARIES, the libraries to link against to use PNG.
# PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
# PNG_FOUND, If false, do not try to use PNG.
# PNG_VERSION_STRING - the version of the PNG library found (since CMake 2.8.8)
#
# Also defined, but not for general use are
#
# ::
#
# PNG_LIBRARY, where to find the PNG library.
#
# For backward compatiblity the variable PNG_INCLUDE_DIR is also set.
# It has the same value as PNG_INCLUDE_DIRS.
#
# Since PNG depends on the ZLib compression library, none of the above
# will be defined unless ZLib can be found.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(PNG_FIND_QUIETLY)
set(_FIND_ZLIB_ARG QUIET)
endif()
find_package(ZLIB ${_FIND_ZLIB_ARG})
if(USE_PREBUILT_LIBS)
find_path(PNG_PNG_INCLUDE_DIR png.h
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
PATHS ${COCOS_EXTERNAL_DIR}/png NO_DEFAULT_PATH
)
find_library(PNG_LIBRARY NAMES png libpng
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/png NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT PNG_PNG_INCLUDE_DIR OR NOT PNG_LIBRARY)
unset(PNG_PNG_INCLUDE_DIR CACHE)
unset(PNG_LIBRARY CACHE)
endif()
endif()
if(ZLIB_FOUND)
find_path(PNG_PNG_INCLUDE_DIR png.h
HINTS ENV PNG_DIR
PATH_SUFFIXES include/libpng include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
list(APPEND PNG_NAMES png libpng)
unset(PNG_NAMES_DEBUG)
set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
if (PNG_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\..*)?$")
string(REGEX REPLACE
"^([0-9]+)\\.([0-9]+).*" "\\1\\2"
_PNG_VERSION_SUFFIX_MIN "${PNG_FIND_VERSION}")
if (PNG_FIND_VERSION_EXACT)
set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN})
else ()
string(REGEX REPLACE
"${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}"
_PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}")
endif ()
unset(_PNG_VERSION_SUFFIX_MIN)
endif ()
foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
list(APPEND PNG_NAMES png${v} libpng${v})
list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
endforeach()
unset(_PNG_VERSION_SUFFIXES)
# For compatiblity with versions prior to this multi-config search, honor
# any PNG_LIBRARY that is already specified and skip the search.
if(NOT PNG_LIBRARY)
find_library(PNG_LIBRARY_RELEASE
NAMES ${PNG_NAMES}
HINTS ENV PNG_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
find_library(PNG_LIBRARY_DEBUG
NAMES ${PNG_NAMES_DEBUG}
HINTS ENV PNG_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(PNG)
mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
endif()
unset(PNG_NAMES)
unset(PNG_NAMES_DEBUG)
# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
unset(PNG_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh.
set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN)
if(BUILD_SHARED_LIBS)
# No need to define PNG_USE_DLL here, because it's default for Cygwin.
else()
set (PNG_DEFINITIONS -DPNG_STATIC)
endif()
endif ()
endif ()
if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")
string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
unset(png_version_str)
endif ()
endif()
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PNG
REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
VERSION_VAR PNG_VERSION_STRING)
mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )

View File

@ -0,0 +1,435 @@
#.rst:
# FindPkgConfig
# -------------
#
# a pkg-config module for CMake
#
#
#
# Usage:
#
# ::
#
# pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for all the given modules
#
#
#
# ::
#
# pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for given modules and uses the first working one
#
#
#
# When the 'REQUIRED' argument was set, macros will fail with an error
# when module(s) could not be found
#
# When the 'QUIET' argument is set, no status messages will be printed.
#
# It sets the following variables:
#
# ::
#
# PKG_CONFIG_FOUND ... if pkg-config executable was found
# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
# PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found
# (since CMake 2.8.8)
#
#
#
# For the following variables two sets of values exist; first one is the
# common one and has the given PREFIX. The second set contains flags
# which are given out when pkgconfig was called with the '--static'
# option.
#
# ::
#
# <XPREFIX>_FOUND ... set to 1 if module(s) exist
# <XPREFIX>_LIBRARIES ... only the libraries (w/o the '-l')
# <XPREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L')
# <XPREFIX>_LDFLAGS ... all required linker flags
# <XPREFIX>_LDFLAGS_OTHER ... all other linker flags
# <XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I')
# <XPREFIX>_CFLAGS ... all required cflags
# <XPREFIX>_CFLAGS_OTHER ... the other compiler flags
#
#
#
# ::
#
# <XPREFIX> = <PREFIX> for common case
# <XPREFIX> = <PREFIX>_STATIC for static linking
#
#
#
# There are some special variables whose prefix depends on the count of
# given modules. When there is only one module, <PREFIX> stays
# unchanged. When there are multiple modules, the prefix will be
# changed to <PREFIX>_<MODNAME>:
#
# ::
#
# <XPREFIX>_VERSION ... version of the module
# <XPREFIX>_PREFIX ... prefix-directory of the module
# <XPREFIX>_INCLUDEDIR ... include-dir of the module
# <XPREFIX>_LIBDIR ... lib-dir of the module
#
#
#
# ::
#
# <XPREFIX> = <PREFIX> when |MODULES| == 1, else
# <XPREFIX> = <PREFIX>_<MODNAME>
#
#
#
# A <MODULE> parameter can have the following formats:
#
# ::
#
# {MODNAME} ... matches any version
# {MODNAME}>={VERSION} ... at least version <VERSION> is required
# {MODNAME}={VERSION} ... exactly version <VERSION> is required
# {MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
#
#
#
# Examples
#
# ::
#
# pkg_check_modules (GLIB2 glib-2.0)
#
#
#
# ::
#
# pkg_check_modules (GLIB2 glib-2.0>=2.10)
# requires at least version 2.10 of glib2 and defines e.g.
# GLIB2_VERSION=2.10.3
#
#
#
# ::
#
# pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0)
# requires both glib2 and gtk2, and defines e.g.
# FOO_glib-2.0_VERSION=2.10.3
# FOO_gtk+-2.0_VERSION=2.8.20
#
#
#
# ::
#
# pkg_check_modules (XRENDER REQUIRED xrender)
# defines e.g.:
# XRENDER_LIBRARIES=Xrender;X11
# XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp
#
#
#
# ::
#
# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2)
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
### Common stuff ####
set(PKG_CONFIG_VERSION 1)
find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable")
mark_as_advanced(PKG_CONFIG_EXECUTABLE)
if (PKG_CONFIG_EXECUTABLE)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE PKG_CONFIG_VERSION_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif ()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PkgConfig
REQUIRED_VARS PKG_CONFIG_EXECUTABLE
VERSION_VAR PKG_CONFIG_VERSION_STRING)
# This is needed because the module name is "PkgConfig" but the name of
# this variable has always been PKG_CONFIG_FOUND so this isn't automatically
# handled by FPHSA.
set(PKG_CONFIG_FOUND "${PKGCONFIG_FOUND}")
# Unsets the given variables
macro(_pkgconfig_unset var)
set(${var} "" CACHE INTERNAL "")
endmacro()
macro(_pkgconfig_set var value)
set(${var} ${value} CACHE INTERNAL "")
endmacro()
# Invokes pkgconfig, cleans up the result and sets variables
macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp)
set(_pkgconfig_invoke_result)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist}
OUTPUT_VARIABLE _pkgconfig_invoke_result
RESULT_VARIABLE _pkgconfig_failed)
if (_pkgconfig_failed)
set(_pkgconfig_${_varname} "")
_pkgconfig_unset(${_prefix}_${_varname})
else()
string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
if (NOT ${_regexp} STREQUAL "")
string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
endif()
separate_arguments(_pkgconfig_invoke_result)
#message(STATUS " ${_varname} ... ${_pkgconfig_invoke_result}")
set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result})
_pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}")
endif()
endmacro()
# Invokes pkgconfig two times; once without '--static' and once with
# '--static'
macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp)
_pkgconfig_invoke("${_pkglist}" ${_prefix} ${_varname} "${cleanup_regexp}" ${ARGN})
_pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static ${ARGN})
endmacro()
# Splits given arguments into options and a package list
macro(_pkgconfig_parse_options _result _is_req _is_silent)
set(${_is_req} 0)
set(${_is_silent} 0)
foreach(_pkg ${ARGN})
if (_pkg STREQUAL "REQUIRED")
set(${_is_req} 1)
endif ()
if (_pkg STREQUAL "QUIET")
set(${_is_silent} 1)
endif ()
endforeach()
set(${_result} ${ARGN})
list(REMOVE_ITEM ${_result} "REQUIRED")
list(REMOVE_ITEM ${_result} "QUIET")
endmacro()
###
macro(_pkg_check_modules_internal _is_required _is_silent _prefix)
_pkgconfig_unset(${_prefix}_FOUND)
_pkgconfig_unset(${_prefix}_VERSION)
_pkgconfig_unset(${_prefix}_PREFIX)
_pkgconfig_unset(${_prefix}_INCLUDEDIR)
_pkgconfig_unset(${_prefix}_LIBDIR)
_pkgconfig_unset(${_prefix}_LIBS)
_pkgconfig_unset(${_prefix}_LIBS_L)
_pkgconfig_unset(${_prefix}_LIBS_PATHS)
_pkgconfig_unset(${_prefix}_LIBS_OTHER)
_pkgconfig_unset(${_prefix}_CFLAGS)
_pkgconfig_unset(${_prefix}_CFLAGS_I)
_pkgconfig_unset(${_prefix}_CFLAGS_OTHER)
_pkgconfig_unset(${_prefix}_STATIC_LIBDIR)
_pkgconfig_unset(${_prefix}_STATIC_LIBS)
_pkgconfig_unset(${_prefix}_STATIC_LIBS_L)
_pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS)
_pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER)
_pkgconfig_unset(${_prefix}_STATIC_CFLAGS)
_pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I)
_pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER)
# create a better addressable variable of the modules and calculate its size
set(_pkg_check_modules_list ${ARGN})
list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt)
if(PKG_CONFIG_EXECUTABLE)
# give out status message telling checked module
if (NOT ${_is_silent})
if (_pkg_check_modules_cnt EQUAL 1)
message(STATUS "checking for module '${_pkg_check_modules_list}'")
else()
message(STATUS "checking for modules '${_pkg_check_modules_list}'")
endif()
endif()
set(_pkg_check_modules_packages)
set(_pkg_check_modules_failed)
# iterate through module list and check whether they exist and match the required version
foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list})
set(_pkg_check_modules_exist_query)
# check whether version is given
if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*")
string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}")
string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op "${_pkg_check_modules_pkg}")
string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver "${_pkg_check_modules_pkg}")
else()
set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}")
set(_pkg_check_modules_pkg_op)
set(_pkg_check_modules_pkg_ver)
endif()
# handle the operands
if (_pkg_check_modules_pkg_op STREQUAL ">=")
list(APPEND _pkg_check_modules_exist_query --atleast-version)
endif()
if (_pkg_check_modules_pkg_op STREQUAL "=")
list(APPEND _pkg_check_modules_exist_query --exact-version)
endif()
if (_pkg_check_modules_pkg_op STREQUAL "<=")
list(APPEND _pkg_check_modules_exist_query --max-version)
endif()
# create the final query which is of the format:
# * --atleast-version <version> <pkg-name>
# * --exact-version <version> <pkg-name>
# * --max-version <version> <pkg-name>
# * --exists <pkg-name>
if (_pkg_check_modules_pkg_op)
list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}")
else()
list(APPEND _pkg_check_modules_exist_query --exists)
endif()
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION)
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX)
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR)
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR)
list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}")
list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}")
# execute the query
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query}
RESULT_VARIABLE _pkgconfig_retval)
# evaluate result and tell failures
if (_pkgconfig_retval)
if(NOT ${_is_silent})
message(STATUS " package '${_pkg_check_modules_pkg}' not found")
endif()
set(_pkg_check_modules_failed 1)
endif()
endforeach()
if(_pkg_check_modules_failed)
# fail when requested
if (${_is_required})
message(SEND_ERROR "A required package was not found")
endif ()
else()
# when we are here, we checked whether requested modules
# exist. Now, go through them and set variables
_pkgconfig_set(${_prefix}_FOUND 1)
list(LENGTH _pkg_check_modules_packages pkg_count)
# iterate through all modules again and set individual variables
foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages})
# handle case when there is only one package required
if (pkg_count EQUAL 1)
set(_pkg_check_prefix "${_prefix}")
else()
set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}")
endif()
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion )
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix )
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir )
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir )
if (NOT ${_is_silent})
message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
endif ()
endforeach()
# set variables which are combined for multiple modules
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES "(^| )-l" --libs-only-l )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS "(^| )-L" --libs-only-L )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS "" --libs )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER "" --libs-only-other )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS "(^| )-I" --cflags-only-I )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS "" --cflags )
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other )
endif()
else()
if (${_is_required})
message(SEND_ERROR "pkg-config tool not found")
endif ()
endif()
endmacro()
###
### User visible macros start here
###
###
macro(pkg_check_modules _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
_pkgconfig_parse_options (_pkg_modules _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
_pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" "${_prefix}" ${_pkg_modules})
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
endif()
endmacro()
###
macro(pkg_search_module _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
set(_pkg_modules_found 0)
_pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
if (NOT ${_pkg_is_silent})
message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
endif ()
# iterate through all modules and stop at the first working one.
foreach(_pkg_alt ${_pkg_modules_alt})
if(NOT _pkg_modules_found)
_pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}")
endif()
if (${_prefix}_FOUND)
set(_pkg_modules_found 1)
endif()
endforeach()
if (NOT ${_prefix}_FOUND)
if(${_pkg_is_required})
message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found")
endif()
endif()
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
endif()
endmacro()
### Local Variables:
### mode: cmake
### End:

View File

@ -0,0 +1,106 @@
#.rst:
# FindTIFF
# --------
#
# Find TIFF library
#
# Find the native TIFF includes and library This module defines
#
# ::
#
# TIFF_INCLUDE_DIR, where to find tiff.h, etc.
# TIFF_LIBRARIES, libraries to link against to use TIFF.
# TIFF_FOUND, If false, do not try to use TIFF.
#
# also defined, but not for general use are
#
# ::
#
# TIFF_LIBRARY, where to find the TIFF library.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3)
if(USE_PREBUILT_LIBS)
find_path(TIFF_INCLUDE_DIR tiff.h
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
PATHS ${COCOS_EXTERNAL_DIR}/tiff NO_DEFAULT_PATH
)
find_library(TIFF_LIBRARY NAMES ${TIFF_NAMES}
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/tiff NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT TIFF_INCLUDE_DIR OR NOT TIFF_LIBRARY)
unset(TIFF_INCLUDE_DIR CACHE)
unset(TIFF_LIBRARY CACHE)
endif()
endif()
find_path(TIFF_INCLUDE_DIR tiff.h
HINTS ENV TIFF_DIR
PATH_SUFFIXES include/libtiff include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(TIFF_LIBRARY
NAMES ${TIFF_NAMES}
HINTS ENV TIFF_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
if(TIFF_INCLUDE_DIR AND EXISTS "${TIFF_INCLUDE_DIR}/tiffvers.h")
file(STRINGS "${TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str
REGEX "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version .*")
string(REGEX REPLACE "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version +([^ \\n]*).*"
"\\1" TIFF_VERSION_STRING "${tiff_version_str}")
unset(tiff_version_str)
endif()
set(TIFF_INCLUDE_DIRS ${TIFF_INCLUDE_DIR})
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF
REQUIRED_VARS TIFF_LIBRARY TIFF_INCLUDE_DIRS
VERSION_VAR TIFF_VERSION_STRING
)
if(TIFF_FOUND)
set( TIFF_LIBRARIES ${TIFF_LIBRARY} )
endif()
mark_as_advanced(TIFF_INCLUDE_DIRS TIFF_LIBRARY)

View File

@ -0,0 +1,74 @@
#.rst:
# FindTinyXML2
# ------------
#
# Locate tinyxml2 library
#
# This module defines
#
# ::
#
# TINYXML2_LIBRARIES, the library to link against
# TINYXML2_FOUND, if false, do not try to link to tinyxml2
# TINYXML2_INCLUDE_DIRS, where to find headers.
#
# Try find tinyxml for our arch in external folder
if(USE_PREBUILT_LIBS)
find_path(TinyXML2_INCLUDE_DIR tinyxml2.h
PATH_SUFFIXES
include/tinyxml2
include
PATHS ${COCOS_EXTERNAL_DIR}/tinyxml2
NO_DEFAULT_PATH
)
find_library(TinyXML2_LIBRARY NAMES tinyxml2 libtinyxml2
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/tinyxml2
NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT TinyXML2_INCLUDE_DIR OR NOT TinyXML2_LIBRARY)
unset(TinyXML2_INCLUDE_DIR CACHE)
unset(TinyXML2_LIBRARY CACHE)
endif()
endif(USE_PREBUILT_LIBS)
find_path(TinyXML2_INCLUDE_DIR tinyxml2.h
HINTS ENV TinyXML2_DIR
PATH_SUFFIXES include/tinyxml2 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(TinyXML2_LIBRARY
NAMES tinyxml2 libtinyxml2
HINTS ENV TinyXML2_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
set(TinyXML2_INCLUDE_DIRS "${TinyXML2_INCLUDE_DIR}")
set(TinyXML2_LIBRARIES "${TinyXML2_LIBRARY}")
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(TinyXML2 DEFAULT_MSG TinyXML2_LIBRARIES TinyXML2_INCLUDE_DIRS)
mark_as_advanced(TinyXML2_INCLUDE_DIRS TinyXML2_LIBRARIES TinyXML2_LIBRARY)

View File

@ -0,0 +1,29 @@
# - Find vorbis
# Find the native vorbis includes and libraries
#
# VORBIS_INCLUDE_DIRS - where to find vorbis.h, etc.
# VORBIS_LIBRARIES - List of libraries when using vorbis(file).
# VORBIS_FOUND - True if vorbis found.
find_package(Ogg)
if(OGG_FOUND)
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
# MSVC built vorbis may be named vorbis_static
# The provided project files name the library with the lib prefix.
find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static libvorbis libvorbis_static)
find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static libvorbisfile libvorbisfile_static)
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY)
endif(OGG_FOUND)
if(VORBIS_FOUND)
set(VORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
else(VORBIS_FOUND)
set(VORBIS_INCLUDE_DIRS)
set(VORBIS_LIBRARIES)
endif(VORBIS_FOUND)
mark_as_advanced(VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY)

View File

@ -0,0 +1,68 @@
#.rst:
# FindWEBSOCKETS
# --------
#
# Find websockets library
#
# ::
#
# WEBSOCKETS_INCLUDE_DIRS, where to find libwebsockets.h.
# WEBSOCKETS_LIBRARIES, the libraries needed to use WEBSOCKETS.
# WEBSOCKETS_FOUND, If false, do not try to use WEBSOCKETS.
#
if(USE_PREBUILT_LIBS)
find_path(WEBSOCKETS_INCLUDE_DIR libwebsockets.h
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
PATHS ${COCOS_EXTERNAL_DIR}/websockets
NO_DEFAULT_PATH
)
find_library(WEBSOCKETS_LIBRARY NAMES websockets libwebsockets
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/websockets
NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT WEBSOCKETS_INCLUDE_DIR OR NOT WEBSOCKETS_LIBRARY)
unset(WEBSOCKETS_INCLUDE_DIR CACHE)
unset(WEBSOCKETS_LIBRARY CACHE)
endif()
endif()
find_path(WEBSOCKETS_INCLUDE_DIR libwebsockets.h
HINTS ENV WEBSOCKETS_DIR
PATH_SUFFIXES include/websockets include/libwebsockets include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(WEBSOCKETS_LIBRARY NAMES websockets libwebsockets
HINTS ENV WEBSOCKETS_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
set(WEBSOCKETS_INCLUDE_DIRS ${WEBSOCKETS_INCLUDE_DIR})
set(WEBSOCKETS_LIBRARIES ${WEBSOCKETS_LIBRARY})
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(WEBSOCKETS DEFAULT_MSG WEBSOCKETS_LIBRARIES WEBSOCKETS_INCLUDE_DIRS)
mark_as_advanced(WEBSOCKETS_LIBRARIES WEBSOCKETS_INCLUDE_DIRS)

View File

@ -27,6 +27,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Try find WebP for our arch in external folder
if(USE_PREBUILT_LIBS)
find_path(WEBP_INCLUDE_DIR decode.h
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
PATHS ${COCOS_EXTERNAL_DIR}/webp
NO_DEFAULT_PATH
)
find_library(WEBP_LIBRARY NAMES webp libwebp
PATH_SUFFIXES
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
prebuilt/${PLATFORM_FOLDER}
PATHS ${COCOS_EXTERNAL_DIR}/webp
NO_DEFAULT_PATH
)
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
if(NOT WEBP_INCLUDE_DIR OR NOT WEBP_LIBRARY)
unset(WEBP_INCLUDE_DIR CACHE)
unset(WEBP_LIBRARY CACHE)
endif()
endif(USE_PREBUILT_LIBS)
FIND_PATH(WEBP_INCLUDE_DIR decode.h
HINTS
ENV WEBP_DIR
@ -43,7 +64,7 @@ FIND_PATH(WEBP_INCLUDE_DIR decode.h
)
FIND_LIBRARY(WEBP_LIBRARY
NAMES WEBP libWEBP
NAMES webp libwebp
HINTS
ENV WEBP_DIR
PATH_SUFFIXES lib

View File

@ -0,0 +1,81 @@
#.rst:
# SelectLibraryConfigurations
# ---------------------------
#
#
#
# select_library_configurations( basename )
#
# This macro takes a library base name as an argument, and will choose
# good values for basename_LIBRARY, basename_LIBRARIES,
# basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what
# has been found and set. If only basename_LIBRARY_RELEASE is defined,
# basename_LIBRARY will be set to the release value, and
# basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND.
# If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will
# take the debug value, and basename_LIBRARY_RELEASE will be set to
# basename_LIBRARY_RELEASE-NOTFOUND.
#
# If the generator supports configuration types, then basename_LIBRARY
# and basename_LIBRARIES will be set with debug and optimized flags
# specifying the library to be used for the given configuration. If no
# build type has been set or the generator in use does not support
# configuration types, then basename_LIBRARY and basename_LIBRARIES will
# take only the release value, or the debug value if the release one is
# not set.
#=============================================================================
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
macro( select_library_configurations basename )
if(NOT ${basename}_LIBRARY_RELEASE)
set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
if(NOT ${basename}_LIBRARY_DEBUG)
set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND
( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
set( ${basename}_LIBRARY "" )
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
endforeach()
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
endforeach()
elseif( ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
elseif( ${basename}_LIBRARY_DEBUG )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} )
else()
set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND")
endif()
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif()
mark_as_advanced( ${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro()

View File

@ -108,7 +108,7 @@ Speed* Speed::create(ActionInterval* action, float speed)
bool Speed::initWithAction(ActionInterval *action, float speed)
{
CCASSERT(action != nullptr, "");
CCASSERT(action != nullptr, "action must not be NULL");
action->retain();
_innerAction = action;
_speed = speed;
@ -121,7 +121,7 @@ Speed *Speed::clone() const
auto a = new (std::nothrow) Speed();
a->initWithAction(_innerAction->clone(), _speed);
a->autorelease();
return a;
return a;
}
void Speed::startWithTarget(Node* target)
@ -198,7 +198,7 @@ Follow* Follow::reverse() const
bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*/)
{
CCASSERT(followedNode != nullptr, "");
CCASSERT(followedNode != nullptr, "FollowedNode can't be NULL");
followedNode->retain();
_followedNode = followedNode;

View File

@ -244,7 +244,8 @@ public:
inline bool isBoundarySet() const { return _boundarySet; }
/** alter behavior - turn on/off boundary */
inline void setBoudarySet(bool value) { _boundarySet = value; }
inline void setBoundarySet(bool value) { _boundarySet = value; }
CC_DEPRECATED_ATTRIBUTE inline void setBoudarySet(bool value) { setBoundarySet(value); }
//
// Override

View File

@ -180,7 +180,7 @@ public:
}
// Overrides
virtual CardinalSplineTo *clone() const override;
virtual CardinalSplineTo *clone() const override;
virtual CardinalSplineTo* reverse() const override;
virtual void startWithTarget(Node *target) override;
virtual void update(float time) override;
@ -216,7 +216,7 @@ public:
// Overrides
virtual void startWithTarget(Node *target) override;
virtual void updatePosition(Vec2 &newPos) override;
virtual CardinalSplineBy *clone() const override;
virtual CardinalSplineBy *clone() const override;
virtual CardinalSplineBy* reverse() const override;
protected:
@ -245,8 +245,8 @@ public:
bool initWithDuration(float dt, PointArray* points);
// Override
virtual CatmullRomTo *clone() const override;
virtual CatmullRomTo *reverse() const override;
virtual CatmullRomTo *clone() const override;
virtual CatmullRomTo *reverse() const override;
};
/** An action that moves the target with a CatmullRom curve by a certain distance.
@ -270,8 +270,8 @@ public:
bool initWithDuration(float dt, PointArray* points);
// Override
virtual CatmullRomBy *clone() const override;
virtual CatmullRomBy *reverse() const override;
virtual CatmullRomBy *clone() const override;
virtual CatmullRomBy *reverse() const override;
};

View File

@ -28,9 +28,16 @@ THE SOFTWARE.
NS_CC_BEGIN
//class Ray;
class Scene;
/**
* Note:
* Scene creates a default camera. And the default camera mask of Node is 1, therefore it can be seen by the default camera.
* During rendering the scene, it draws the objects seen by each camera in the added order except default camera. The default camera is the last one being drawn with.
* If 3D objects exist, you'd better create a seperate camera for them. And set the 3d camera flag to CameraFlag::USER1 or anything else except DEFAULT. The DEFAULT camera is for UI, because it is rendered at last.
* You can change the camera added order to get different result when depth test is not enabled.
* For each camera, transparent 3d sprite is rendered after opaque 3d sprite and other 2d objects.
*/
enum class CameraFlag
{
DEFAULT = 1,

View File

@ -231,7 +231,7 @@ void ClippingNode::drawFullScreenQuadClearStencil()
void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
if(!_visible)
if (!_visible || !hasContent())
return;
uint32_t flags = processParentFlags(parentTransform, parentFlags);
@ -327,6 +327,11 @@ void ClippingNode::setStencil(Node *stencil)
_stencil = stencil;
}
bool ClippingNode::hasContent() const
{
return _children.size() > 0;
}
GLfloat ClippingNode::getAlphaThreshold() const
{
return _alphaThreshold;

View File

@ -59,6 +59,13 @@ public:
Node* getStencil() const;
void setStencil(Node *stencil);
/** If stencil has no childre it will not be drawn.
If you have custom stencil-based node with stencil drawing mechanics other then children-based,
then this method should return true every time you wish stencil to be visited.
By default returns true if has any children attached.
*/
virtual bool hasContent() const;
/** The alpha threshold.
The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
Should be a float between 0 and 1.

View File

@ -758,108 +758,83 @@ void DrawNode::drawPolygon(const Vec2 *verts, int count, const Color4F &fillColo
{
CCASSERT(count >= 0, "invalid count value");
struct ExtrudeVerts {Vec2 offset, n;};
struct ExtrudeVerts* extrude = (struct ExtrudeVerts*)malloc(sizeof(struct ExtrudeVerts)*count);
memset(extrude, 0, sizeof(struct ExtrudeVerts)*count);
bool outline = (borderColor.a > 0.0 && borderWidth > 0.0);
for (int i = 0; i < count; i++)
{
Vec2 v0 = __v2f(verts[(i-1+count)%count]);
Vec2 v1 = __v2f(verts[i]);
Vec2 v2 = __v2f(verts[(i+1)%count]);
Vec2 n1 = v2fnormalize(v2fperp(v2fsub(v1, v0)));
Vec2 n2 = v2fnormalize(v2fperp(v2fsub(v2, v1)));
Vec2 offset = v2fmult(v2fadd(n1, n2), 1.0/(v2fdot(n1, n2) + 1.0));
struct ExtrudeVerts tmp = {offset, n2};
extrude[i] = tmp;
}
bool outline = (borderColor.a > 0.0 && borderWidth > 0.0);
auto triangle_count = 3*count - 2;
auto vertex_count = 3*triangle_count;
auto triangle_count = outline ? (3*count - 2) : (count - 2);
auto vertex_count = 3*triangle_count;
ensureCapacity(vertex_count);
V2F_C4B_T2F_Triangle *triangles = (V2F_C4B_T2F_Triangle *)(_buffer + _bufferCount);
V2F_C4B_T2F_Triangle *cursor = triangles;
V2F_C4B_T2F_Triangle *triangles = (V2F_C4B_T2F_Triangle *)(_buffer + _bufferCount);
V2F_C4B_T2F_Triangle *cursor = triangles;
float inset = (outline == false ? 0.5 : 0.0);
for (int i = 0; i < count-2; i++)
for (int i = 0; i < count-2; i++)
{
Vec2 v0 = v2fsub(__v2f(verts[0 ]), v2fmult(extrude[0 ].offset, inset));
Vec2 v1 = v2fsub(__v2f(verts[i+1]), v2fmult(extrude[i+1].offset, inset));
Vec2 v2 = v2fsub(__v2f(verts[i+2]), v2fmult(extrude[i+2].offset, inset));
V2F_C4B_T2F_Triangle tmp = {
{v0, Color4B(fillColor), __t(v2fzero)},
{v1, Color4B(fillColor), __t(v2fzero)},
{v2, Color4B(fillColor), __t(v2fzero)},
{verts[0], Color4B(fillColor), __t(v2fzero)},
{verts[i+1], Color4B(fillColor), __t(v2fzero)},
{verts[i+2], Color4B(fillColor), __t(v2fzero)},
};
*cursor++ = tmp;
}
*cursor++ = tmp;
}
for(int i = 0; i < count; i++)
if(outline)
{
int j = (i+1)%count;
Vec2 v0 = __v2f(verts[i]);
Vec2 v1 = __v2f(verts[j]);
struct ExtrudeVerts {Vec2 offset, n;};
struct ExtrudeVerts* extrude = (struct ExtrudeVerts*)malloc(sizeof(struct ExtrudeVerts)*count);
memset(extrude, 0, sizeof(struct ExtrudeVerts)*count);
Vec2 n0 = extrude[i].n;
Vec2 offset0 = extrude[i].offset;
Vec2 offset1 = extrude[j].offset;
if(outline)
for (int i = 0; i < count; i++)
{
Vec2 inner0 = v2fsub(v0, v2fmult(offset0, borderWidth));
Vec2 inner1 = v2fsub(v1, v2fmult(offset1, borderWidth));
Vec2 outer0 = v2fadd(v0, v2fmult(offset0, borderWidth));
Vec2 outer1 = v2fadd(v1, v2fmult(offset1, borderWidth));
Vec2 v0 = __v2f(verts[(i-1+count)%count]);
Vec2 v1 = __v2f(verts[i]);
Vec2 v2 = __v2f(verts[(i+1)%count]);
Vec2 n1 = v2fnormalize(v2fperp(v2fsub(v1, v0)));
Vec2 n2 = v2fnormalize(v2fperp(v2fsub(v2, v1)));
Vec2 offset = v2fmult(v2fadd(n1, n2), 1.0/(v2fdot(n1, n2) + 1.0));
struct ExtrudeVerts tmp = {offset, n2};
extrude[i] = tmp;
}
for(int i = 0; i < count; i++)
{
int j = (i+1)%count;
Vec2 v0 = __v2f(verts[i]);
Vec2 v1 = __v2f(verts[j]);
Vec2 n0 = extrude[i].n;
Vec2 offset0 = extrude[i].offset;
Vec2 offset1 = extrude[j].offset;
Vec2 inner0 = v2fsub(v0, v2fmult(offset0, borderWidth));
Vec2 inner1 = v2fsub(v1, v2fmult(offset1, borderWidth));
Vec2 outer0 = v2fadd(v0, v2fmult(offset0, borderWidth));
Vec2 outer1 = v2fadd(v1, v2fmult(offset1, borderWidth));
V2F_C4B_T2F_Triangle tmp1 = {
{inner0, Color4B(borderColor), __t(v2fneg(n0))},
{inner1, Color4B(borderColor), __t(v2fneg(n0))},
{outer1, Color4B(borderColor), __t(n0)}
};
*cursor++ = tmp1;
*cursor++ = tmp1;
V2F_C4B_T2F_Triangle tmp2 = {
{inner0, Color4B(borderColor), __t(v2fneg(n0))},
{outer0, Color4B(borderColor), __t(n0)},
{outer1, Color4B(borderColor), __t(n0)}
};
*cursor++ = tmp2;
}
else {
Vec2 inner0 = v2fsub(v0, v2fmult(offset0, 0.5));
Vec2 inner1 = v2fsub(v1, v2fmult(offset1, 0.5));
Vec2 outer0 = v2fadd(v0, v2fmult(offset0, 0.5));
Vec2 outer1 = v2fadd(v1, v2fmult(offset1, 0.5));
*cursor++ = tmp2;
}
V2F_C4B_T2F_Triangle tmp1 = {
{inner0, Color4B(fillColor), __t(v2fzero)},
{inner1, Color4B(fillColor), __t(v2fzero)},
{outer1, Color4B(fillColor), __t(n0)}
};
*cursor++ = tmp1;
free(extrude);
}
V2F_C4B_T2F_Triangle tmp2 = {
{inner0, Color4B(fillColor), __t(v2fzero)},
{outer0, Color4B(fillColor), __t(n0)},
{outer1, Color4B(fillColor), __t(n0)}
};
*cursor++ = tmp2;
}
}
_bufferCount += vertex_count;
_bufferCount += vertex_count;
_dirty = true;
free(extrude);
_dirty = true;
}
void DrawNode::drawSolidRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color)

View File

@ -107,8 +107,7 @@ public:
*/
void setAliasTexParameters();
private:
protected:
void relaseTextures();
std::unordered_map<ssize_t, Texture2D*> _atlasTextures;
std::unordered_map<unsigned short, FontLetterDefinition> _fontLetterDefinitions;
@ -122,7 +121,6 @@ private:
float _currentPageOrigX;
float _currentPageOrigY;
float _letterPadding;
bool _makeDistanceMap;
int _fontAscender;
EventListenerCustom* _rendererRecreatedListener;

View File

@ -676,7 +676,6 @@ FontFNT * FontFNT::create(const std::string& fntFilePath, const Vec2& imageOffse
Texture2D *tempTexture = Director::getInstance()->getTextureCache()->addImage(newConf->getAtlasName());
if (!tempTexture)
{
delete newConf;
return nullptr;
}
@ -684,7 +683,6 @@ FontFNT * FontFNT::create(const std::string& fntFilePath, const Vec2& imageOffse
if (!tempFont)
{
delete newConf;
return nullptr;
}
tempFont->autorelease();

View File

@ -270,7 +270,14 @@ Label::Label(FontAtlas *atlas /* = nullptr */, TextHAlignment hAlignment /* = Te
_batchNodes.clear();
_batchNodes.push_back(this);
alignText();
if (_contentDirty)
{
updateContent();
}
else
{
alignText();
}
}
});
_eventDispatcher->addEventListenerWithSceneGraphPriority(purgeTextureListener, this);
@ -498,7 +505,7 @@ void Label::setMaxLineWidth(unsigned int maxLineWidth)
}
}
void Label::setDimensions(unsigned int width,unsigned int height)
void Label::setDimensions(unsigned int width, unsigned int height)
{
if (height != _labelHeight || width != _labelWidth)
{

View File

@ -256,7 +256,7 @@ void LabelAtlas::updateColor()
#if CC_LABELATLAS_DEBUG_DRAW
void LabelAtlas::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
AtlasNode::draw(renderer, transform, transformUpdated);
AtlasNode::draw(renderer, transform, _transformUpdated);
_debugDrawNode->clear();
auto size = getContentSize();

View File

@ -30,6 +30,7 @@ THE SOFTWARE.
#include "CCAtlasNode.h"
#if CC_LABELATLAS_DEBUG_DRAW
#include "renderer/CCCustomCommand.h"
#include "2d/CCDrawNode.h"
#endif
NS_CC_BEGIN

View File

@ -213,7 +213,7 @@ Rect LabelBMFont::getBoundingBox() const
#if CC_LABELBMFONT_DEBUG_DRAW
void LabelBMFont::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
Node::draw(renderer, transform, transformUpdated);
Node::draw(renderer, transform, _transformUpdated);
_debugDrawNode->clear();
auto size = getContentSize();

View File

@ -37,6 +37,7 @@ Use any of these editors to generate BMFonts:
#include "2d/CCLabel.h"
#if CC_LABELBMFONT_DEBUG_DRAW
#include "renderer/CCCustomCommand.h"
#include "2d/CCDrawNode.h"
#endif
NS_CC_BEGIN

View File

@ -269,18 +269,16 @@ bool LabelTextFormatter::alignText(Label *theLabel)
bool LabelTextFormatter::createStringSprites(Label *theLabel)
{
// check for string
unsigned int stringLen = theLabel->getStringLength();
theLabel->_limitShowCount = 0;
// no string
if (stringLen == 0)
// check for string
int stringLen = theLabel->getStringLength();
if (stringLen <= 0)
return false;
int longestLine = 0;
unsigned int totalHeight = theLabel->_commonLineHeight * theLabel->_currNumLines;
int nextFontPositionX = 0;
int nextFontPositionY = totalHeight;
auto totalHeight = theLabel->_commonLineHeight * theLabel->_currNumLines;
auto longestLine = 0.0f;
auto nextFontPositionX = 0.0f;
auto nextFontPositionY = totalHeight;
auto contentScaleFactor = CC_CONTENT_SCALE_FACTOR();
if (theLabel->_labelHeight > 0)
@ -307,7 +305,6 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
}
}
Rect charRect;
int charXOffset = 0;
int charYOffset = 0;
int charAdvance = 0;
@ -317,18 +314,19 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
FontLetterDefinition tempDefinition;
Vec2 letterPosition;
const auto& kernings = theLabel->_horizontalKernings;
CCASSERT(kernings, "kernings must's be nullptr!!!");
float clipTop = 0;
float clipBottom = 0;
int lineIndex = 0;
bool lineStart = true;
bool clip = false;
bool clipBlank = false;
if (theLabel->_currentLabelType == Label::LabelType::TTF && theLabel->_clipEnabled)
{
clip = true;
clipBlank = true;
}
for (unsigned int i = 0; i < stringLen; i++)
for (int i = 0; i < stringLen; i++)
{
char16_t c = strWhole[i];
if (fontAtlas->getLetterDefinitionForChar(c, tempDefinition))
@ -357,7 +355,7 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
lineStart = true;
continue;
}
else if (clip && tempDefinition.height > 0.0f)
else if (clipBlank && tempDefinition.height > 0.0f)
{
if (lineStart)
{
@ -382,7 +380,7 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
letterPosition.x = (nextFontPositionX + charXOffset + kernings[i]) / contentScaleFactor;
letterPosition.y = (nextFontPositionY - charYOffset) / contentScaleFactor;
if( theLabel->recordLetterInfo(letterPosition,tempDefinition,i) == false)
if( theLabel->recordLetterInfo(letterPosition, tempDefinition, i) == false)
{
log("WARNING: can't find letter definition in font file for letter: %c", c);
continue;
@ -420,7 +418,7 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
tmpSize.height = theLabel->_labelHeight * contentScaleFactor;
}
if (clip)
if (clipBlank)
{
int clipTotal = (clipTop + clipBottom) / contentScaleFactor;
tmpSize.height -= clipTotal * contentScaleFactor;

View File

@ -60,6 +60,8 @@ THE SOFTWARE.
#define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__))
#endif
extern int g_physicsSceneCount;
NS_CC_BEGIN
bool nodeComparisonLess(Node* n1, Node* n2)
@ -425,7 +427,13 @@ void Node::setScale(float scale)
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
updatePhysicsBodyTransform(getScene());
if(g_physicsSceneCount == 0)
return;
auto scene = getScene();
if (!scene || scene->getPhysicsWorld())
{
updatePhysicsBodyTransform(scene);
}
#endif
}
@ -446,7 +454,13 @@ void Node::setScale(float scaleX,float scaleY)
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
updatePhysicsBodyTransform(getScene());
if(g_physicsSceneCount == 0)
return;
auto scene = getScene();
if (!scene || scene->getPhysicsWorld())
{
updatePhysicsBodyTransform(scene);
}
#endif
}
@ -460,7 +474,13 @@ void Node::setScaleX(float scaleX)
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
updatePhysicsBodyTransform(getScene());
if(g_physicsSceneCount == 0)
return;
auto scene = getScene();
if (!scene || scene->getPhysicsWorld())
{
updatePhysicsBodyTransform(scene);
}
#endif
}
@ -503,7 +523,13 @@ void Node::setScaleY(float scaleY)
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
updatePhysicsBodyTransform(getScene());
if(g_physicsSceneCount == 0)
return;
auto scene = getScene();
if (!scene || scene->getPhysicsWorld())
{
updatePhysicsBodyTransform(scene);
}
#endif
}
@ -794,7 +820,13 @@ Scene* Node::getScene() const
if(!_parent)
return nullptr;
return _parent->getScene();
auto sceneNode = _parent;
while (sceneNode->_parent)
{
sceneNode = sceneNode->_parent;
}
return dynamic_cast<Scene*>(sceneNode);
}
Rect Node::getBoundingBox() const
@ -993,8 +1025,8 @@ void Node::addChildHelper(Node* child, int localZOrder, int tag, const std::stri
#if CC_USE_PHYSICS
// Recursive add children with which have physics body.
Scene* scene = this->getScene();
if (scene != nullptr && scene->getPhysicsWorld() != nullptr)
auto scene = this->getScene();
if (scene && scene->getPhysicsWorld())
{
child->updatePhysicsBodyTransform(scene);
scene->addChildToPhysicsWorld(child);
@ -1958,14 +1990,14 @@ void Node::updatePhysicsBodyPosition(Scene* scene)
{
if (_physicsBody != nullptr)
{
if (scene != nullptr && scene->getPhysicsWorld() != nullptr)
if (scene && scene->getPhysicsWorld())
{
Vec2 pos = getParent() == scene ? getPosition() : scene->convertToNodeSpace(_parent->convertToWorldSpace(getPosition()));
Vec2 pos = _parent == scene ? _position : scene->convertToNodeSpace(_parent->convertToWorldSpace(_position));
_physicsBody->setPosition(pos);
}
else
{
_physicsBody->setPosition(getPosition());
_physicsBody->setPosition(_position);
}
}
@ -1982,7 +2014,7 @@ void Node::updatePhysicsBodyRotation(Scene* scene)
if (scene != nullptr && scene->getPhysicsWorld() != nullptr)
{
float rotation = _rotationZ_X;
for (Node* parent = _parent; parent != scene; parent = parent->getParent())
for (Node* parent = _parent; parent != scene; parent = parent->_parent)
{
rotation += parent->getRotation();
}
@ -2009,10 +2041,10 @@ void Node::updatePhysicsBodyScale(Scene* scene)
{
float scaleX = _scaleX / _physicsScaleStartX;
float scaleY = _scaleY / _physicsScaleStartY;
for (Node* parent = _parent; parent != scene; parent = parent->getParent())
for (Node* parent = _parent; parent != scene; parent = parent->_parent)
{
scaleX *= parent->getScaleX();
scaleY *= parent->getScaleY();
scaleX *= parent->_scaleX;
scaleY *= parent->_scaleY;
}
_physicsBody->setScale(scaleX, scaleY);
}

View File

@ -28,6 +28,9 @@ THE SOFTWARE.
#include "2d/CCParticleSystemQuad.h"
#include <algorithm>
#include "2d/CCSpriteFrame.h"
#include "2d/CCParticleBatchNode.h"
#include "renderer/CCTextureAtlas.h"
@ -172,7 +175,7 @@ void ParticleSystemQuad::initTexCoordsWithRect(const Rect& pointRect)
#endif // ! CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
// Important. Texture in cocos2d are inverted, so the Y component should be inverted
CC_SWAP( top, bottom, float);
std::swap(top, bottom);
V3F_C4B_T2F_Quad *quads = nullptr;
unsigned int start = 0, end = 0;

View File

@ -25,6 +25,8 @@ THE SOFTWARE.
****************************************************************************/
#include "2d/CCProgressTimer.h"
#include <algorithm>
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "2d/CCSprite.h"
@ -159,7 +161,7 @@ Tex2F ProgressTimer::textureCoordFromAlphaPoint(Vec2 alpha)
Vec2 max = Vec2(quad.tr.texCoords.u,quad.tr.texCoords.v);
// Fix bug #1303 so that progress timer handles sprite frame texture rotation
if (_sprite->isTextureRectRotated()) {
CC_SWAP(alpha.x, alpha.y, float);
std::swap(alpha.x, alpha.y);
}
return Tex2F(min.x * (1.f - alpha.x) + max.x * alpha.x, min.y * (1.f - alpha.y) + max.y * alpha.y);
}

View File

@ -37,6 +37,8 @@ THE SOFTWARE.
#include "physics/CCPhysicsWorld.h"
#endif
int g_physicsSceneCount = 0;
NS_CC_BEGIN
Scene::Scene()
@ -58,6 +60,10 @@ Scene::Scene()
Scene::~Scene()
{
#if CC_USE_PHYSICS
if (_physicsWorld)
{
g_physicsSceneCount--;
}
CC_SAFE_DELETE(_physicsWorld);
#endif
Director::getInstance()->getEventDispatcher()->removeEventListener(_event);
@ -111,12 +117,6 @@ std::string Scene::getDescription() const
return StringUtils::format("<Scene | tag = %d>", _tag);
}
Scene* Scene::getScene() const
{
// FIX ME: should use const_case<> to fix compiling error
return const_cast<Scene*>(this);
}
void Scene::onProjectionChanged(EventCustom* event)
{
if (_defaultCamera)
@ -129,6 +129,7 @@ void Scene::render(Renderer* renderer)
{
auto director = Director::getInstance();
Camera* defaultCamera = nullptr;
const auto& transform = getNodeToParentTransform();
for (const auto& camera : _cameras)
{
Camera::_visitingCamera = camera;
@ -142,7 +143,7 @@ void Scene::render(Renderer* renderer)
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, Camera::_visitingCamera->getViewProjectionMatrix());
//visit the scene
visit(renderer, Mat4::IDENTITY, 0);
visit(renderer, transform, 0);
renderer->render();
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
@ -155,7 +156,7 @@ void Scene::render(Renderer* renderer)
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, Camera::_visitingCamera->getViewProjectionMatrix());
//visit the scene
visit(renderer, Mat4::IDENTITY, 0);
visit(renderer, transform, 0);
renderer->render();
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
@ -213,6 +214,7 @@ bool Scene::initWithPhysics()
this->scheduleUpdate();
// success
g_physicsSceneCount += 1;
ret = true;
} while (0);
return ret;

View File

@ -55,6 +55,8 @@ For the moment Scene has no other logic than that, but in future releases it mig
additional logic.
It is a good practice to use a Scene as the parent of all your nodes.
Scene will create a default camera for you.
*/
class CC_DLL Scene : public Node
{
@ -65,9 +67,6 @@ public:
/** creates a new Scene object with a predefined Size */
static Scene *createWithSize(const Size& size);
// Overrides
virtual Scene *getScene() const override;
using Node::addChild;
virtual std::string getDescription() const override;

View File

@ -27,6 +27,8 @@ THE SOFTWARE.
#include "2d/CCSprite.h"
#include <algorithm>
#include "2d/CCSpriteBatchNode.h"
#include "2d/CCAnimationCache.h"
#include "2d/CCSpriteFrame.h"
@ -306,7 +308,8 @@ void Sprite::setTexture(const std::string &filename)
setTexture(texture);
Rect rect = Rect::ZERO;
rect.size = texture->getContentSize();
if (texture)
rect.size = texture->getContentSize();
setTextureRect(rect);
}
@ -438,12 +441,12 @@ void Sprite::setTextureCoords(Rect rect)
if (_flippedX)
{
CC_SWAP(top, bottom, float);
std::swap(top, bottom);
}
if (_flippedY)
{
CC_SWAP(left, right, float);
std::swap(left, right);
}
_quad.bl.texCoords.u = left;
@ -471,12 +474,12 @@ void Sprite::setTextureCoords(Rect rect)
if(_flippedX)
{
CC_SWAP(left,right,float);
std::swap(left, right);
}
if(_flippedY)
{
CC_SWAP(top,bottom,float);
std::swap(top, bottom);
}
_quad.bl.texCoords.u = left;
@ -926,7 +929,7 @@ void Sprite::setSpriteFrame(const std::string &spriteFrameName)
SpriteFrameCache *cache = SpriteFrameCache::getInstance();
SpriteFrame *spriteFrame = cache->getSpriteFrameByName(spriteFrameName);
CCASSERT(spriteFrame, "Invalid spriteFrameName");
CCASSERT(spriteFrame, std::string("Invalid spriteFrameName :").append(spriteFrameName).c_str());
setSpriteFrame(spriteFrame);
}
@ -980,7 +983,7 @@ SpriteFrame* Sprite::getSpriteFrame() const
CC_SIZE_POINTS_TO_PIXELS(_contentSize));
}
SpriteBatchNode* Sprite::getBatchNode()
SpriteBatchNode* Sprite::getBatchNode() const
{
return _batchNode;
}

View File

@ -167,7 +167,7 @@ public:
* @return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,
* nullptr if the sprite isn't used batch node.
*/
virtual SpriteBatchNode* getBatchNode(void);
virtual SpriteBatchNode* getBatchNode() const;
/**
* Sets the batch node to sprite
* @warning This method is not recommended for game developers. Sample code for using batch node
@ -183,7 +183,6 @@ public:
/// @} end of BatchNode methods
/// @{
/// @name Texture / Frame methods

View File

@ -378,7 +378,7 @@ void SpriteBatchNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t f
renderer->addCommand(&_batchCommand);
}
void SpriteBatchNode::increaseAtlasCapacity(void)
void SpriteBatchNode::increaseAtlasCapacity()
{
// if we're going beyond the current TextureAtlas's capacity,
// all the previously initialized sprites will need to redo their texture coords
@ -574,7 +574,7 @@ void SpriteBatchNode::removeSpriteFromAtlas(Sprite *sprite)
}
}
void SpriteBatchNode::updateBlendFunc(void)
void SpriteBatchNode::updateBlendFunc()
{
if (! _textureAtlas->getTexture()->hasPremultipliedAlpha())
{
@ -594,12 +594,12 @@ void SpriteBatchNode::setBlendFunc(const BlendFunc &blendFunc)
_blendFunc = blendFunc;
}
const BlendFunc& SpriteBatchNode::getBlendFunc(void) const
const BlendFunc& SpriteBatchNode::getBlendFunc() const
{
return _blendFunc;
}
Texture2D* SpriteBatchNode::getTexture(void) const
Texture2D* SpriteBatchNode::getTexture() const
{
return _textureAtlas->getTexture();
}

View File

@ -79,7 +79,7 @@ public:
/** returns the TextureAtlas object */
inline TextureAtlas* getTextureAtlas(void) { return _textureAtlas; }
inline TextureAtlas* getTextureAtlas() { return _textureAtlas; }
/** sets the TextureAtlas object */
inline void setTextureAtlas(TextureAtlas* textureAtlas)

View File

@ -69,7 +69,7 @@ SpriteFrame* SpriteFrame::create(const std::string& filename, const Rect& rect,
return spriteFrame;
}
SpriteFrame::SpriteFrame(void)
SpriteFrame::SpriteFrame()
: _rotated(false)
, _texture(nullptr)
{
@ -123,7 +123,7 @@ bool SpriteFrame::initWithTextureFilename(const std::string& filename, const Rec
return true;
}
SpriteFrame::~SpriteFrame(void)
SpriteFrame::~SpriteFrame()
{
CCLOGINFO("deallocing SpriteFrame: %p", this);
CC_SAFE_RELEASE(_texture);
@ -182,7 +182,7 @@ void SpriteFrame::setTexture(Texture2D * texture)
}
}
Texture2D* SpriteFrame::getTexture(void)
Texture2D* SpriteFrame::getTexture()
{
if( _texture ) {
return _texture;

View File

@ -79,35 +79,35 @@ public:
inline const Rect& getRectInPixels() const { return _rectInPixels; }
void setRectInPixels(const Rect& rectInPixels);
inline bool isRotated(void) const { return _rotated; }
inline bool isRotated() const { return _rotated; }
inline void setRotated(bool rotated) { _rotated = rotated; }
/** get rect of the frame */
inline const Rect& getRect(void) const { return _rect; }
inline const Rect& getRect() const { return _rect; }
/** set rect of the frame */
void setRect(const Rect& rect);
/** get offset of the frame */
const Vec2& getOffsetInPixels(void) const;
const Vec2& getOffsetInPixels() const;
/** set offset of the frame */
void setOffsetInPixels(const Vec2& offsetInPixels);
/** get original size of the trimmed image */
inline const Size& getOriginalSizeInPixels(void) const { return _originalSizeInPixels; }
inline const Size& getOriginalSizeInPixels() const { return _originalSizeInPixels; }
/** set original size of the trimmed image */
inline void setOriginalSizeInPixels(const Size& sizeInPixels) { _originalSizeInPixels = sizeInPixels; }
/** get original size of the trimmed image */
inline const Size& getOriginalSize(void) const { return _originalSize; }
inline const Size& getOriginalSize() const { return _originalSize; }
/** set original size of the trimmed image */
inline void setOriginalSize(const Size& sizeInPixels) { _originalSize = sizeInPixels; }
/** get texture of the frame */
Texture2D* getTexture(void);
Texture2D* getTexture();
/** set texture of the frame, the texture is retained */
void setTexture(Texture2D* pobTexture);
const Vec2& getOffset(void) const;
const Vec2& getOffset() const;
void setOffset(const Vec2& offsets);
// Overrides
@ -117,12 +117,12 @@ CC_CONSTRUCTOR_ACCESS:
/**
* @lua NA
*/
SpriteFrame(void);
SpriteFrame();
/**
* @lua NA
*/
virtual ~SpriteFrame(void);
virtual ~SpriteFrame();
/** Initializes a SpriteFrame with a texture, rect in points.
It is assumed that the frame was not trimmed.

View File

@ -70,11 +70,6 @@ public:
/** @deprecated Use destroyInstance() instead */
CC_DEPRECATED_ATTRIBUTE static void purgeSharedSpriteFrameCache() { return SpriteFrameCache::destroyInstance(); }
protected:
// MARMALADE: Made this protected not private, as deriving from this class is pretty useful
SpriteFrameCache(){}
public:
/**
* @js NA
* @lua NA
@ -82,7 +77,6 @@ public:
virtual ~SpriteFrameCache();
bool init();
public:
/** Adds multiple Sprite Frames from a plist file.
* A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png
* If you want to use another texture, you should use the addSpriteFramesWithFile(const std::string& plist, const std::string& textureFileName) method.
@ -162,7 +156,10 @@ public:
/** @deprecated use getSpriteFrameByName() instead */
CC_DEPRECATED_ATTRIBUTE SpriteFrame* spriteFrameByName(const std::string&name) { return getSpriteFrameByName(name); }
private:
protected:
// MARMALADE: Made this protected not private, as deriving from this class is pretty useful
SpriteFrameCache(){}
/*Adds multiple Sprite Frames with a dictionary. The texture will be associated with the created sprite frames.
*/
void addSpriteFramesWithDictionary(ValueMap& dictionary, Texture2D *texture);
@ -172,7 +169,7 @@ private:
*/
void removeSpriteFramesFromDictionary(ValueMap& dictionary);
protected:
Map<std::string, SpriteFrame*> _spriteFrames;
ValueMap _spriteFramesAliases;
std::set<std::string>* _loadedFileNames;

View File

@ -190,7 +190,7 @@ public:
void removeChild(Node* child, bool cleanup) override;
virtual std::string getDescription() const override;
private:
protected:
Vec2 getPositionForIsoAt(const Vec2& pos);
Vec2 getPositionForOrthoAt(const Vec2& pos);
Vec2 getPositionForHexAt(const Vec2& pos);
@ -212,22 +212,22 @@ private:
ssize_t atlasIndexForExistantZ(int z);
ssize_t atlasIndexForNewZ(int z);
protected:
//! name of the layer
std::string _layerName;
//! TMX Layer supports opacity
unsigned char _opacity;
unsigned char _opacity;
//! Only used when vertexZ is used
int _vertexZvalue;
bool _useAutomaticVertexZ;
int _vertexZvalue;
bool _useAutomaticVertexZ;
//! used for optimization
Sprite *_reusedTile;
ccCArray *_atlasIndexArray;
Sprite *_reusedTile;
ccCArray *_atlasIndexArray;
// used for retina display
float _contentScaleFactor;
float _contentScaleFactor;
/** size of the layer in tiles */
Size _layerSize;

View File

@ -240,7 +240,7 @@ void TextFieldTTF::deleteBackward()
if (_delegate && _delegate->onTextFieldDeleteBackward(this, _inputText.c_str() + len - deleteLen, static_cast<int>(deleteLen)))
{
// delegate doesn't wan't to delete backwards
// delegate doesn't want to delete backwards
return;
}

View File

@ -160,7 +160,7 @@ public:
// place holder text property
// place holder text displayed when there is no text in the text field.
virtual void setPlaceHolder(const std::string& text);
virtual const std::string& getPlaceHolder(void) const;
virtual const std::string& getPlaceHolder() const;
virtual void setSecureTextEntry(bool value);
virtual bool isSecureTextEntry();

View File

@ -77,7 +77,7 @@
</PreBuildEvent>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\box2d;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\box2d;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -132,7 +132,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\debug-lib\*.*"
</Command>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32\;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32\;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
@ -209,20 +209,13 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\..\external\ConvertUTF\ConvertUTF.c" />
<ClCompile Include="..\..\external\ConvertUTF\ConvertUTFWrapper.cpp" />
<ClCompile Include="..\..\external\edtaa3func\edtaa3func.cpp" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\extension_set.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc" />
<ClCompile Include="..\..\external\flatbuffers\flatc.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_cpp.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_fbs.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_general.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_go.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_text.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_parser.cpp" />
<ClCompile Include="..\..\external\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="..\..\external\unzip\ioapi_mem.cpp" />
<ClCompile Include="..\..\external\unzip\ioapi.cpp" />
@ -360,20 +353,30 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\editor-support\cocostudio\CCTween.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCUtilMath.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CocoLoader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CSParseBinary.pb.cc" />
<ClCompile Include="..\editor-support\cocostudio\DictionaryHelper.cpp" />
<ClCompile Include="..\editor-support\cocostudio\FlatBuffersSerialize.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerBase.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerMng.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerObj.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.cpp" />
@ -562,6 +565,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\..\extensions\physics-nodes\CCPhysicsSprite.h" />
<ClInclude Include="..\..\external\ConvertUTF\ConvertUTF.h" />
<ClInclude Include="..\..\external\edtaa3func\edtaa3func.h" />
<ClInclude Include="..\..\external\flatbuffers\flatbuffers.h" />
<ClInclude Include="..\..\external\flatbuffers\idl.h" />
<ClInclude Include="..\..\external\flatbuffers\util.h" />
<ClInclude Include="..\..\external\json\document.h" />
<ClInclude Include="..\..\external\json\filestream.h" />
<ClInclude Include="..\..\external\json\internal\pow10.h" />
@ -572,36 +578,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\..\external\json\reader.h" />
<ClInclude Include="..\..\external\json\stringbuffer.h" />
<ClInclude Include="..\..\external\json\writer.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\extension_set.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h" />
<ClInclude Include="..\..\external\protobuf-lite\win32\config.h" />
<ClInclude Include="..\..\external\tinyxml2\tinyxml2.h" />
<ClInclude Include="..\..\external\unzip\ioapi_mem.h" />
<ClInclude Include="..\..\external\unzip\ioapi.h" />
@ -770,20 +746,31 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\editor-support\cocostudio\CocoLoader.h" />
<ClInclude Include="..\editor-support\cocostudio\CocosStudioExport.h" />
<ClInclude Include="..\editor-support\cocostudio\CocoStudio.h" />
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary.pb.h" />
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary_generated.h" />
<ClInclude Include="..\editor-support\cocostudio\DictionaryHelper.h" />
<ClInclude Include="..\editor-support\cocostudio\FlatBuffersSerialize.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerBase.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerMng.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerObj.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.h" />

View File

@ -211,18 +211,33 @@
<Filter Include="audioengine">
<UniqueIdentifier>{e916e2b4-0a6e-4d25-8b36-66fa03719f48}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite">
<UniqueIdentifier>{cca5b284-43d5-4f19-8a3f-41011ca8fb78}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\io">
<UniqueIdentifier>{95d0a465-a443-4974-ac90-ca1a46cd3066}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\stubs">
<UniqueIdentifier>{65b452e4-00df-4ab1-803a-af3fb369edc4}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\TimelineAction\trigger">
<UniqueIdentifier>{0554a5b1-03a1-4d38-87a5-976dbe9a39d9}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\flatbuffers">
<UniqueIdentifier>{db915acb-1838-413d-b290-dc280365eabc}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ComAudioReader">
<UniqueIdentifier>{b71e98df-9863-4ee5-9818-04fad2ef8da1}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\GameMapReader">
<UniqueIdentifier>{78a3fbcc-4233-47f0-9b53-5a445dad9400}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\NodeReader">
<UniqueIdentifier>{737cc376-2a40-4203-8280-842362c5db49}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ParticleReader">
<UniqueIdentifier>{7604b98b-40ff-440f-8335-7729e1fa310c}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ProjectNodeReader">
<UniqueIdentifier>{da363675-4650-4c12-892e-d5755a8b608f}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SingleNodeReader">
<UniqueIdentifier>{39a43e29-dd58-47a3-9906-bf714b185f6a}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SpriteReader">
<UniqueIdentifier>{9aee531c-f935-4836-bf84-be42e78e38bb}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
@ -1208,63 +1223,72 @@
<Filter>audioengine</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CSParseBinary.pb.cc">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp">
<Filter>cocostudio\TimelineAction</Filter>
</ClCompile>
<ClCompile Include="..\ui\UILayoutComponent.cpp">
<Filter>ui\Layouts</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\extension_set.cc">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClCompile>
<ClCompile Include="CCCamera.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCLight.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\flatc.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_cpp.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_fbs.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_general.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_go.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_text.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_parser.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\FlatBuffersSerialize.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SingleNodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCPhysicsBody.h">
@ -2424,111 +2448,63 @@
<Filter>audioengine</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary.pb.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h">
<Filter>cocostudio\TimelineAction</Filter>
</ClInclude>
<ClInclude Include="..\ui\UILayoutComponent.h">
<Filter>ui\Layouts</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\extension_set.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\win32\config.h">
<Filter>cocostudio\json\protobuf-lite</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h">
<Filter>cocostudio\json\protobuf-lite\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h">
<Filter>cocostudio\json\protobuf-lite\stubs</Filter>
</ClInclude>
<ClInclude Include="CCCamera.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCLight.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\flatbuffers.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\idl.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\util.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary_generated.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\FlatBuffersSerialize.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\SingleNodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">

View File

@ -42,6 +42,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\extensions\physics-nodes\CCPhysicsSprite.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\ConvertUTF\ConvertUTF.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\edtaa3func\edtaa3func.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\flatbuffers.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\util.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\document.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\filestream.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\internal\pow10.h" />
@ -52,36 +55,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\reader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\stringbuffer.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\json\writer.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\extension_set.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\message_lite.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\tinyxml2\tinyxml2.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi_mem.h" />
@ -250,20 +223,31 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CocoLoader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CocosStudioExport.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CocoStudio.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary.pb.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary_generated.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\DictionaryHelper.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\FlatBuffersSerialize.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerBase.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerMng.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerObj.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.h" />
@ -480,19 +464,12 @@
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\ConvertUTF\ConvertUTFWrapper.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\edtaa3func\edtaa3func.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_cpp.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_fbs.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_general.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_go.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_text.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_parser.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi_mem.cpp" />
@ -649,20 +626,30 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CCTween.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CCUtilMath.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CocoLoader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary.pb.cc" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\DictionaryHelper.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\FlatBuffersSerialize.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerBase.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerMng.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\TriggerObj.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.cpp" />

View File

@ -802,102 +802,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi_mem.h">
<Filter>external\unzip</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\config.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\extension_set.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\message_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CSLoader.h">
<Filter>cocostudio\TimelineAction</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary.pb.h">
<Filter>cocostudio</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UILayoutComponent.h">
<Filter>ui\Layouts</Filter>
</ClInclude>
@ -1306,6 +1213,51 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\base\ZipUtils.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\flatbuffers.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\util.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary_generated.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\FlatBuffersSerialize.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\SpriteReader\SingleNodeReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\cocos2d.cpp" />
@ -1952,51 +1904,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\unzip\ioapi_mem.cpp">
<Filter>external\unzip</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp">
<Filter>cocostudio\TimelineAction</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CSParseBinary.pb.cc">
<Filter>cocostudio</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\ui\UILayoutComponent.cpp">
<Filter>ui\Layouts</Filter>
</ClCompile>
@ -2369,6 +2279,57 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\base\ZipUtils.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_cpp.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_fbs.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_general.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_go.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_gen_text.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\external\flatbuffers\idl_parser.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\FlatBuffersSerialize.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SpriteReader\SingleNodeReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="2d">
@ -2575,23 +2536,29 @@
<Filter Include="cocosdenshion\Source Files">
<UniqueIdentifier>{5f37f118-5902-4683-9243-fcc77bdbf3e1}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite">
<UniqueIdentifier>{f51f496d-43b3-4c80-b01d-8db1ff82ba87}</UniqueIdentifier>
<Filter Include="cocostudio\json\flatbuffers">
<UniqueIdentifier>{ea248cf4-798f-418c-8beb-39c9c864a802}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src">
<UniqueIdentifier>{897038a8-2cd2-4c8b-adac-5d716757ebb8}</UniqueIdentifier>
<Filter Include="cocostudio\reader\WidgetReader\ComAudioReader">
<UniqueIdentifier>{a9889035-45b0-4671-97a0-61df5b0d9283}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google">
<UniqueIdentifier>{768b728a-70a8-4dd0-b04d-c8d7f70e7677}</UniqueIdentifier>
<Filter Include="cocostudio\reader\WidgetReader\GameMapReader">
<UniqueIdentifier>{9020bd24-1e83-4a61-98ce-3727c6677cc9}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf">
<UniqueIdentifier>{6d403f90-95d9-4ebf-9f53-5e79db30f68c}</UniqueIdentifier>
<Filter Include="cocostudio\reader\WidgetReader\NodeReader">
<UniqueIdentifier>{c98f9dbc-048a-4efe-95eb-a0867f320928}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf\io">
<UniqueIdentifier>{5f6acaf0-cbff-42f8-bdf2-21b43efa5680}</UniqueIdentifier>
<Filter Include="cocostudio\reader\WidgetReader\SpriteReader">
<UniqueIdentifier>{1b632e54-5bd0-4d5b-98b2-8d656f96fa5d}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf\stubs">
<UniqueIdentifier>{b16255cc-6a35-4ee4-b77b-46a781b40d9b}</UniqueIdentifier>
<Filter Include="cocostudio\reader\WidgetReader\ParticleReader">
<UniqueIdentifier>{0bffceb2-5483-4697-a6d6-4e56f469e0af}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SpriteReader\SingleNodeReader">
<UniqueIdentifier>{b6756a21-fab2-49e2-94ee-8100c134e797}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ProjectNodeReader">
<UniqueIdentifier>{a6638f35-5c81-4835-9897-0f9efb0be02b}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -197,6 +197,9 @@
<ClInclude Include="..\..\extensions\physics-nodes\CCPhysicsSprite.h" />
<ClInclude Include="..\..\external\ConvertUTF\ConvertUTF.h" />
<ClInclude Include="..\..\external\edtaa3func\edtaa3func.h" />
<ClInclude Include="..\..\external\flatbuffers\flatbuffers.h" />
<ClInclude Include="..\..\external\flatbuffers\idl.h" />
<ClInclude Include="..\..\external\flatbuffers\util.h" />
<ClInclude Include="..\..\external\json\document.h" />
<ClInclude Include="..\..\external\json\filestream.h" />
<ClInclude Include="..\..\external\json\internal\pow10.h" />
@ -207,35 +210,6 @@
<ClInclude Include="..\..\external\json\reader.h" />
<ClInclude Include="..\..\external\json\stringbuffer.h" />
<ClInclude Include="..\..\external\json\writer.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\config.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h" />
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h" />
<ClInclude Include="..\..\external\tinyxml2\tinyxml2.h" />
<ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\..\external\unzip\ioapi_mem.h" />
@ -394,19 +368,32 @@
<ClInclude Include="..\editor-support\cocostudio\CCTween.h" />
<ClInclude Include="..\editor-support\cocostudio\CCUtilMath.h" />
<ClInclude Include="..\editor-support\cocostudio\CocoLoader.h" />
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary.pb.h" />
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary_generated.h" />
<ClInclude Include="..\editor-support\cocostudio\DictionaryHelper.h" />
<ClInclude Include="..\editor-support\cocostudio\FlatBuffersSerialize.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerBase.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerMng.h" />
<ClInclude Include="..\editor-support\cocostudio\TriggerObj.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.h" />
@ -633,19 +620,12 @@
</ClCompile>
<ClCompile Include="..\..\external\ConvertUTF\ConvertUTFWrapper.cpp" />
<ClCompile Include="..\..\external\edtaa3func\edtaa3func.cpp" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc" />
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_cpp.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_fbs.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_general.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_go.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_gen_text.cpp" />
<ClCompile Include="..\..\external\flatbuffers\idl_parser.cpp" />
<ClCompile Include="..\..\external\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="..\..\external\unzip\ioapi.cpp" />
<ClCompile Include="..\..\external\unzip\ioapi_mem.cpp" />
@ -865,20 +845,30 @@
<ClCompile Include="..\editor-support\cocostudio\CCTween.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCUtilMath.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CocoLoader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CSParseBinary.pb.cc" />
<ClCompile Include="..\editor-support\cocostudio\DictionaryHelper.cpp" />
<ClCompile Include="..\editor-support\cocostudio\FlatBuffersSerialize.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerBase.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerMng.cpp" />
<ClCompile Include="..\editor-support\cocostudio\TriggerObj.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ButtonReader\ButtonReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\LoadingBarReader\LoadingBarReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\PageViewReader\PageViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextBMFontReader\TextBMFontReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextFieldReader\TextFieldReader.cpp" />

View File

@ -212,30 +212,36 @@
<Filter Include="network\Source Files">
<UniqueIdentifier>{e3dc7161-12e0-4d3b-b364-00de56fe3755}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite">
<UniqueIdentifier>{f68c00d5-e79f-4b3b-b352-20808e2b4f39}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src">
<UniqueIdentifier>{0037c6b3-aa22-4e63-9048-42ca6c88c9fb}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google">
<UniqueIdentifier>{4efe3422-d5e4-4dd9-8c5e-51a2333f554b}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf">
<UniqueIdentifier>{38e945e9-f3d8-44e5-8ef9-54ff95ab6f1e}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf\io">
<UniqueIdentifier>{2002113e-f002-4ce3-ad7e-3e8609c691d0}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\protobuf-lite\src\google\protobuf\stubs">
<UniqueIdentifier>{b7fdf4e2-b3be-4b7a-b586-ddab39fb05b7}</UniqueIdentifier>
</Filter>
<Filter Include="renderer">
<UniqueIdentifier>{c52c9563-bc10-4b77-8bcc-0e061628fae7}</UniqueIdentifier>
</Filter>
<Filter Include="renderer\shaders">
<UniqueIdentifier>{1be811ab-a9b0-44f7-9a37-b7ef7f1ef24a}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\json\flatbuffers">
<UniqueIdentifier>{9f28aa19-1a5e-4f76-b915-734cd7dc94cf}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ComAudioReader">
<UniqueIdentifier>{af096722-1565-4e19-87fa-06d052073a2b}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\NodeReader">
<UniqueIdentifier>{8e995aa7-e8e2-40ee-9cfe-c22bf5efeae3}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ParticleReader">
<UniqueIdentifier>{f247e00b-f848-448e-8c27-a64392192476}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\ProjectNodeReader">
<UniqueIdentifier>{d0f94ee2-2126-4391-94e2-8b3d59faa899}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SingleNodeReader">
<UniqueIdentifier>{60b8a779-16d8-477f-9de4-a827679dce0a}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SpriteReader">
<UniqueIdentifier>{fa1426ae-957e-4d62-82c2-9f55e7fbc524}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\GameMapReader">
<UniqueIdentifier>{02d389d5-8f57-4bd6-b12a-95af86c5b356}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CCAction.cpp">
@ -1227,51 +1233,9 @@
<ClCompile Include="..\..\external\unzip\ioapi_mem.cpp">
<Filter>external\unzip</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.cc">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp">
<Filter>cocostudio\TimelineAction</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\CSParseBinary.pb.cc">
<Filter>cocostudio</Filter>
</ClCompile>
<ClCompile Include="..\ui\UILayoutComponent.cpp">
<Filter>ui\Layouts</Filter>
</ClCompile>
@ -1293,6 +1257,60 @@
<ClCompile Include="CCClippingRectangleNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_cpp.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_fbs.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_general.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_go.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_gen_text.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\..\external\flatbuffers\idl_parser.cpp">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SingleNodeReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.cpp">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\CSParseBinary.pb.cc">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\FlatBuffersSerialize.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CCAction.h">
@ -2451,93 +2469,6 @@
<ClInclude Include="..\..\external\unzip\ioapi_mem.h">
<Filter>external\unzip</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\config.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\generated_message_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\message_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\repeated_field.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\wire_format_lite_inl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\coded_stream_inl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\io\zero_copy_stream_impl_lite.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\io</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_macosx.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_pnacl.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\common.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\hash.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\map-util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\once.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\platform_macros.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stl_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\stringprintf.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\template_util.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\..\external\protobuf-lite\src\google\protobuf\stubs\type_traits.h">
<Filter>cocostudio\json\protobuf-lite\src\google\protobuf\stubs</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h">
<Filter>cocostudio\TimelineAction</Filter>
</ClInclude>
@ -2562,6 +2493,54 @@
<ClInclude Include="CCClippingRectangleNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\flatbuffers.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\idl.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\..\external\flatbuffers\util.h">
<Filter>cocostudio\json\flatbuffers</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h">
<Filter>cocostudio\reader\WidgetReader\ComAudioReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReader\NodeReader.h">
<Filter>cocostudio\reader\WidgetReader\NodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ParticleReader\ParticleReader.h">
<Filter>cocostudio\reader\WidgetReader\ParticleReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\ProjectNodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\SingleNodeReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h">
<Filter>cocostudio\reader\WidgetReader\SpriteReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderDefine.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\NodeReaderProtocol.h">
<Filter>cocostudio\reader\WidgetReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary.pb.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\CSParseBinary_generated.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\FlatBuffersSerialize.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h">
<Filter>cocostudio\reader\WidgetReader\GameMapReader</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">

View File

@ -85,7 +85,7 @@ public:
float getWeight() const { return _weight; }
void setWeight(float weight);
/** animate transistion time */
/** animate transition time */
static float getTransitionTime() { return _transTime; }
/**get & set play reverse, these are deprecated, use set negative speed instead*/

View File

@ -70,18 +70,15 @@ public:
Curve* getBoneCurveByName(const std::string& name) const;
CC_CONSTRUCTOR_ACCESS:
Animation3D();
virtual ~Animation3D();
/**init Animation3D from bundle data*/
bool init(const Animation3DData& data);
protected:
std::unordered_map<std::string, Curve*> _boneCurves;//bone curves map, key bone name, value AnimationCurve
float _duration; //animation duration
float _duration; //animation duration
};
/**

View File

@ -58,7 +58,7 @@ CC_CONSTRUCTOR_ACCESS:
protected:
Bone3D* _attachBone;
Bone3D* _attachBone;
};

View File

@ -291,6 +291,7 @@ bool Bundle3D::loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeD
materialdatas.materials.push_back(materialdata);
meshdata->subMeshIndices.push_back(it.mesh.indices);
meshdata->subMeshAABB.push_back(calculateAABB(meshdata->vertex, meshdata->getPerVertexSize(), it.mesh.indices));
meshdata->subMeshIds.push_back(str);
auto node = new (std::nothrow) NodeData();
auto modelnode = new (std::nothrow) ModelData();
@ -438,6 +439,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas)
}
meshData->subMeshIndices.push_back(indexArray);
meshData->numIndex = (int)meshData->subMeshIndices.size();
meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray));
}
meshdatas.meshDatas.push_back(meshData);
}
@ -545,6 +547,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas)
}
meshdata->subMeshIndices.push_back(indices);
meshdata->subMeshAABB.push_back(calculateAABB(meshdata->vertex, meshdata->getPerVertexSize(), indices));
}
meshdatas.meshDatas.push_back(meshdata);
@ -659,6 +662,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas)
}
meshdata->subMeshIndices.push_back(indices);
meshdata->subMeshAABB.push_back(calculateAABB(meshdata->vertex, meshdata->getPerVertexSize(), indices));
}
meshdatas.meshDatas.push_back(meshdata);
@ -714,6 +718,7 @@ bool Bundle3D::loadMeshDatasJson(MeshDatas& meshdatas)
meshData->subMeshIndices.push_back(indexArray);
meshData->numIndex = (int)meshData->subMeshIndices.size();
meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray));
}
meshdatas.meshDatas.push_back(meshData);
}
@ -1080,6 +1085,7 @@ bool Bundle3D::loadMeshDataJson_0_1(MeshDatas& meshdatas)
indices[i] = (unsigned short)indices_val_array[i].GetUint();
meshdata->subMeshIndices.push_back(indices);
meshdata->subMeshAABB.push_back(calculateAABB(meshdata->vertex, meshdata->getPerVertexSize(), indices));
meshdatas.meshDatas.push_back(meshdata);
return true;
}
@ -1134,6 +1140,7 @@ bool Bundle3D::loadMeshDataJson_0_2(MeshDatas& meshdatas)
indices[j] = (unsigned short)indices_val_array[j].GetUint();
meshdata->subMeshIndices.push_back(indices);
meshdata->subMeshAABB.push_back(calculateAABB(meshdata->vertex, meshdata->getPerVertexSize(), indices));
}
meshdatas.meshDatas.push_back(meshdata);
return true;
@ -1285,18 +1292,23 @@ bool Bundle3D::loadMaterialDataJson_0_1(MaterialDatas& materialdatas)
NMaterialData materialData;
const rapidjson::Value& material_data_array = _jsonReader[MATERIAL];
const rapidjson::Value& material_data_array_0 = material_data_array[(rapidjson::SizeType)0];
if (material_data_array.Size() > 0)
{
const rapidjson::Value& material_data_array_0 = material_data_array[(rapidjson::SizeType)0];
if (material_data_array_0.HasMember(BASE))
{
const rapidjson::Value& material_data_base_array = material_data_array_0[BASE];
const rapidjson::Value& material_data_base_array_0 = material_data_base_array[(rapidjson::SizeType)0];
NTextureData textureData;
// set texture
textureData.filename =_modelPath + material_data_base_array_0[FILENAME].GetString();
textureData.type= NTextureData::Usage::Diffuse;
textureData.id="";
materialData.textures.push_back(textureData);
materialdatas.materials.push_back(materialData);
}
}
const rapidjson::Value& material_data_base_array = material_data_array_0[BASE];
const rapidjson::Value& material_data_base_array_0 = material_data_base_array[(rapidjson::SizeType)0];
NTextureData textureData;
// set texture
textureData.filename =_modelPath + material_data_base_array_0[FILENAME].GetString();
textureData.type= NTextureData::Usage::Diffuse;
textureData.id="";
materialData.textures.push_back(textureData);
materialdatas.materials.push_back(materialData);
return true;
}
@ -1404,8 +1416,22 @@ bool Bundle3D::loadAnimationDataJson(const std::string& id, Animation3DData* ani
bool Bundle3D::loadAnimationDataBinary(const std::string& id, Animation3DData* animationdata)
{
if (!seekToFirstType(BUNDLE_TYPE_ANIMATIONS))
return false;
if( _version == "0.1"|| _version == "0.2" || _version == "0.3"|| _version == "0.4")
{
if (!seekToFirstType(BUNDLE_TYPE_ANIMATIONS))
return false;
}
else
{
// if id is not a null string, we need to add a suffix of "animation" for seeding.
std::string id_ = id;
if(id != "") id_ = id + "animation";
if (!seekToFirstType(BUNDLE_TYPE_ANIMATIONS, id_))
return false;
}
unsigned int animNum = 1;
if( _version == "0.3"|| _version == "0.4")
{
@ -1459,7 +1485,7 @@ bool Bundle3D::loadAnimationDataBinary(const std::string& id, Animation3DData* a
// transform flag
unsigned char transformFlag(0);
if (_version == "0.4")
if (_version != "0.1" && _version != "0.2" && _version != "0.3")
{
if (!_binaryReader.read(&transformFlag))
{
@ -1470,7 +1496,7 @@ bool Bundle3D::loadAnimationDataBinary(const std::string& id, Animation3DData* a
// rotation
bool hasRotate = true;
if (_version == "0.4")
if (_version != "0.1" && _version != "0.2" && _version != "0.3")
hasRotate = transformFlag & 0x01;
if (hasRotate)
@ -1486,7 +1512,7 @@ bool Bundle3D::loadAnimationDataBinary(const std::string& id, Animation3DData* a
// scale
bool hasScale = true;
if (_version == "0.4")
if (_version != "0.1" && _version != "0.2" && _version != "0.3")
hasScale = (transformFlag >> 1) & 0x01;
if (hasScale)
@ -1502,7 +1528,7 @@ bool Bundle3D::loadAnimationDataBinary(const std::string& id, Animation3DData* a
// translation
bool hasTranslation = true;
if (_version == "0.4")
if (_version != "0.1" && _version != "0.2" && _version != "0.3")
hasTranslation = (transformFlag >> 2) & 0x01;
if (hasTranslation)
@ -1938,7 +1964,7 @@ void Bundle3D::getModelRelativePath(const std::string& path)
_modelPath = path.substr(0, index + 1);
}
Reference* Bundle3D::seekToFirstType(unsigned int type)
Reference* Bundle3D::seekToFirstType(unsigned int type, const std::string& id)
{
// for each Reference
for (unsigned int i = 0; i < _referenceCount; ++i)
@ -1946,6 +1972,12 @@ Reference* Bundle3D::seekToFirstType(unsigned int type)
Reference* ref = &_references[i];
if (ref->type == type)
{
// if id is not a null string, we also need to check the Reference's id.
if (id != "" && id != ref->id)
{
continue;
}
// Found a match
if (_binaryReader.seek(ref->offset, SEEK_SET) == false)
{
@ -1976,4 +2008,16 @@ Bundle3D::~Bundle3D()
}
cocos2d::AABB Bundle3D::calculateAABB( const std::vector<float>& vertex, int stride, const std::vector<unsigned short>& index )
{
AABB aabb;
stride /= 4;
for(const auto& it : index)
{
Vec3 point = Vec3(vertex[it * stride ], vertex[ it * stride + 1], vertex[it * stride + 2 ]);
aabb.updateMinMax(&point, 1);
}
return aabb;
}
NS_CC_END

View File

@ -144,15 +144,18 @@ protected:
void getModelRelativePath(const std::string& path);
/*
* set the read position in buffer to the target type
* @param The data type
*/
Reference* seekToFirstType(unsigned int type);
* set the read position in buffer to the target type
* @param The data type
* @param The data id
*/
Reference* seekToFirstType(unsigned int type, const std::string& id = "");
CC_CONSTRUCTOR_ACCESS:
Bundle3D();
virtual ~Bundle3D();
static AABB calculateAABB(const std::vector<float>& vertex, int stride, const std::vector<unsigned short>& index);
protected:
static Bundle3D* _instance;
std::string _modelPath;

View File

@ -28,6 +28,7 @@
#include "base/CCRef.h"
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "3d/CCAABB.h"
#include <vector>
#include <map>
@ -122,6 +123,7 @@ struct MeshData
int vertexSizeInFloat;
std::vector<IndexArray> subMeshIndices;
std::vector<std::string> subMeshIds; //subMesh Names (since 3.3)
std::vector<AABB> subMeshAABB;
int numIndex;
std::vector<MeshVertexAttrib> attribs;
int attribCount;
@ -140,6 +142,7 @@ public:
{
vertex.clear();
subMeshIndices.clear();
subMeshAABB.clear();
attribs.clear();
vertexSizeInFloat = 0;
numIndex = 0;

View File

@ -49,13 +49,16 @@ void BundleReader::init(char* buffer, ssize_t length)
ssize_t BundleReader::read(void* ptr, ssize_t size, ssize_t count)
{
if (!_buffer || eof())
{
CCLOG("warning: bundle reader out of range");
return 0;
}
ssize_t validCount;
ssize_t validLength = _length - _position;
ssize_t needLength = size*count;
char* ptr1 = (char*)ptr;
if(validLength <= needLength)
if(validLength < needLength)
{
validCount = validLength/size;
ssize_t readLength = size*validCount;

View File

@ -102,15 +102,14 @@ MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
vertexdata->_vertexBuffer->updateVertices((void*)&meshdata.vertex[0], (int)meshdata.vertex.size() * 4 / vertexdata->_vertexBuffer->getSizePerVertex(), 0);
}
AABB aabb;
for (size_t i = 0; i < meshdata.subMeshIndices.size(); i++) {
auto& index = meshdata.subMeshIndices[i];
auto indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_SHORT_16, (int)(index.size()));
indexBuffer->updateIndices(&index[0], (int)index.size(), 0);
aabb = MeshVertexData::calculateAABB(meshdata.vertex, meshdata.getPerVertexSize(), index);
std::string id = (i < meshdata.subMeshIds.size() ? meshdata.subMeshIds[i] : "");
MeshIndexData* indexdata = MeshIndexData::create(id, vertexdata, indexBuffer, aabb);
MeshIndexData* indexdata = MeshIndexData::create(id, vertexdata, indexBuffer, meshdata.subMeshAABB[i]);
vertexdata->_indexs.pushBack(indexdata);
}
@ -118,18 +117,6 @@ MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
return vertexdata;
}
AABB MeshVertexData::calculateAABB(const std::vector<float>& vertex, int stride, const std::vector<unsigned short>& index)
{
AABB aabb;
stride /= 4;
for(const auto& it : index)
{
Vec3 point = Vec3(vertex[it * stride ], vertex[ it * stride + 1], vertex[it * stride + 2 ]);
aabb.updateMinMax(&point, 1);
}
return aabb;
}
MeshIndexData* MeshVertexData::getMeshIndexDataById(const std::string& id) const
{
for (auto it : _indexs) {

View File

@ -115,7 +115,6 @@ CC_CONSTRUCTOR_ACCESS:
MeshVertexData();
virtual ~MeshVertexData();
static AABB calculateAABB(const std::vector<float>& vertex, int stride, const std::vector<unsigned short>& index);
protected:
VertexData* _vertexData; //mesh vertex data
VertexBuffer* _vertexBuffer; // vertex buffer

View File

@ -518,8 +518,7 @@ void Sprite3D::removeAllAttachNode()
}
_attachments.clear();
}
#ifndef NDEBUG
#if (!defined NDEBUG) || (defined CC_MODEL_VIEWER)
//Generate a dummy texture when the texture file is missing
static Texture2D * getDummyTexture()
{
@ -564,9 +563,8 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
}
auto programstate = mesh->getGLProgramState();
auto& meshCommand = mesh->getMeshCommand();
#ifdef NDEBUG
GLuint textureID = mesh->getTexture() ? mesh->getTexture()->getName() : 0;
#else
#if (!defined NDEBUG) || (defined CC_MODEL_VIEWER)
GLuint textureID = 0;
if(mesh->getTexture())
{
@ -577,7 +575,11 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
mesh->setTexture(texture);
textureID = texture->getName();
}
#else
GLuint textureID = mesh->getTexture() ? mesh->getTexture()->getName() : 0;
#endif
float globalZ = _globalZOrder;
bool isTransparent = (mesh->_isTransparent || color.a < 1.f);
if (isTransparent && Camera::getVisitingCamera())

View File

@ -1,5 +1,5 @@
if(WINDOWS AND NOT BUILD_STATIC)
if(WINDOWS AND BUILD_SHARED_LIBS)
ADD_DEFINITIONS (-D_USE3DDLL)
endif()

View File

@ -272,4 +272,4 @@ $(call import-module,extensions)
$(call import-module,Box2D)
$(call import-module,curl/prebuilt/android)
$(call import-module,websockets/prebuilt/android)
$(call import-module,protobuf-lite)
$(call import-module,flatbuffers)

View File

@ -31,10 +31,6 @@ if(WINDOWS)
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
endif()
if(WINDOWS AND NOT BUILD_STATIC)
ADD_DEFINITIONS (-D_USRDLL)
endif()
include(2d/CMakeLists.txt)
include(3d/CMakeLists.txt)
include(platform/CMakeLists.txt)
@ -46,20 +42,26 @@ include(deprecated/CMakeLists.txt)
include(ui/CMakeLists.txt)
include(network/CMakeLists.txt)
include(audio/CMakeLists.txt)
include_directories(audio/include)
include(storage/CMakeLists.txt)
if(BUILD_EDITOR_COCOSBUILDER)
include(editor-support/cocosbuilder/CMakeLists.txt)
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_CCB_SRC})
endif(BUILD_EDITOR_COCOSBUILDER)
if(BUILD_EDITOR_COCOSTUDIO)
include(editor-support/cocostudio/CMakeLists.txt)
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_CS_SRC})
endif(BUILD_EDITOR_COCOSTUDIO)
if(BUILD_EDITOR_SPINE)
include(editor-support/spine/CMakeLists.txt)
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_SPINE_SRC})
endif(BUILD_EDITOR_SPINE)
include(../extensions/CMakeLists.txt)
set(COCOS_EDITOR_SUPPORT_SRC
${COCOS_CCB_SRC}
${COCOS_CS_SRC}
${COCOS_SPINE_SRC}
)
set(COCOS_SRC cocos2d.cpp
${COCOS_2D_SRC}
${COCOS_3D_SRC}
@ -76,78 +78,27 @@ set(COCOS_SRC cocos2d.cpp
${COCOS_EXTENSIONS_SRC}
)
if(MACOSX OR APPLE)
include(FindFreetype REQUIRED)
if(NOT FREETYPE_FOUND)
if(IOS)
FIND_LIBRARY(FREETYPE_LIBRARIES NAMES libfreetype PATHS "../external/freetype2/prebuilt/ios" DOC "Freetype includes")
find_path(FREETYPE_INCLUDE_DIRS ft2build.h "../external/freetype2/include/ios" "../external/freetype2/include/ios/freetype" DOC "Freetype includes")
elseif()
FIND_LIBRARY(FREETYPE_LIBRARIES NAMES libfreetype PATHS "../external/freetype2/prebuilt/mac" DOC "Freetype includes")
find_path(FREETYPE_INCLUDE_DIRS ft2build.h "../external/freetype2/include/mac" "../external/freetype2/include/mac/freetype" DOC "Freetype includes")
endif(IOS)
endif(NOT FREETYPE_FOUND)
find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})
endif()
if(MINGW)
find_package(Freetype REQUIRED)
find_package(WebP REQUIRED)
#find_package(MiniZip REQUIRED)
#${MINIZIP_INCLUDE_DIR}
#find_package(GLFW REQUIRED)
#${GLFW_INCLUDE_DIRS}
find_package(ZLIB REQUIRED)
find_package(Chipmunk REQUIRED)
message( STATUS "ZLIB dirs: ${ZLIB_INCLUDE_DIRS}")
message( STATUS "WEBP dirs: ${WEBP_INCLUDE_DIRS}")
message( STATUS "FREETYPE dirs: ${FREETYPE_INCLUDE_DIRS}")
message( STATUS "Chipmunk dirs: ${CHIPMUNK_INCLUDE_DIRS}")
include_directories(${FREETYPE_INCLUDE_DIRS} ${WEBP_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${CHIPMUNK_INCLUDE_DIRS})
else()
#todo: provide prebuild versions of minizip for android ios mac and msvc
#done: prebuilt version for mingw-w64 (linux distros should have them also)
# check for opensuse the buildbot system arch and ubuntu
include_directories(
../external/unzip)
endif()
#todo: provide prebuild versions of the xx libs for all platforms
include_directories(
../external/xxhash
../external/xxtea)
add_library(cocos2d ${BUILD_TYPE} ${COCOS_SRC})
add_library(cocos2d ${COCOS_SRC})
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(FMOD_LIB "fmodex64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(FMOD_LIB "fmodex")
endif()
if(MINGW)
set(PLATFORM_SPECIFIC_LIBS z jpeg png webp tiff curl websockets glfw3 glew32 opengl32 iconv freetype bz2)
elseif(WINDOWS)
set(PLATFORM_SPECIFIC_LIBS libjpeg libpng libwebp libtiff libcurl_imp libwebsockets freetype250 glfw3 glew32 opengl32 libiconv libzlib)
set(PLATFORM_SPECIFIC_LIBS)
if(WINDOWS)
foreach(_pkg OPENGL GLEW GLFW3 VORBIS MPG123 OPENAL)
cocos_use_pkg(cocos2d ${_pkg})
endforeach()
list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 winmm)
elseif(LINUX)
set(PLATFORM_SPECIFIC_LIBS jpeg webp tiff freetype curl websockets ssl crypto
fontconfig png pthread glfw GLEW GL X11 rt z protobuf ${FMOD_LIB})
foreach(_pkg OPENGL GLEW GLFW3 FMODEX FONTCONFIG THREADS)
cocos_use_pkg(cocos2d ${_pkg})
endforeach()
elseif(MACOSX OR APPLE)
cocos_use_pkg(cocos2d GLFW3)
INCLUDE_DIRECTORIES ( /System/Library/Frameworks )
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
@ -160,8 +111,6 @@ elseif(MACOSX OR APPLE)
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation)
set(PLATFORM_SPECIFIC_LIBS
z jpeg png webp tiff curl glfw3
websockets freetype
${COCOA_LIBRARY}
${OPENGL_LIBRARY}
${OPENAL_LIBRARY}
@ -173,12 +122,31 @@ elseif(MACOSX OR APPLE)
)
elseif(ANDROID)
set(PLATFORM_SPECIFIC_LIBS GLESv2 log z android)
set(PLATFORM_SPECIFIC_LIBS GLESv2 log android)
else()
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
endif()
target_link_libraries(cocos2d chipmunk box2d tinyxml2 unzip xxhash ${PLATFORM_SPECIFIC_LIBS})
foreach(pkg ZLIB MINIZIP JPEG PNG TIFF TinyXML2 FREETYPE WEBSOCKETS CURL FLATBUFFERS)
cocos_use_pkg(cocos2d ${pkg})
endforeach()
target_link_libraries(cocos2d xxhash ${PLATFORM_SPECIFIC_LIBS})
if(USE_WEBP)
add_definitions(-DCC_USE_WEBP=1)
cocos_use_pkg(cocos2d WEBP)
else()
add_definitions(-DCC_USE_WEBP=0)
endif()
if(USE_CHIPMUNK)
cocos_use_pkg(cocos2d CHIPMUNK)
endif()
if(USE_BOX2D)
cocos_use_pkg(cocos2d Box2D)
endif()
set_target_properties(cocos2d
PROPERTIES

View File

@ -40,6 +40,10 @@
#define TIME_DELAY_PRECISION 0.0001
#ifdef ERROR
#undef ERROR
#endif // ERROR
using namespace cocos2d;
using namespace cocos2d::experimental;

View File

@ -1,55 +1,48 @@
if(WINDOWS AND NOT BUILD_STATIC)
ADD_DEFINITIONS (-D_EXPORT_DLL_)
endif()
set(COCOS_AUDIO_SRC
audio/AudioEngine.cpp
)
if(WINDOWS)
set(COCOS_AUDIO_SRC
audio/win32/SimpleAudioEngine.cpp
audio/win32/MciPlayer.cpp
audio/win32/MciPlayer.h
)
set(COCOS_AUDIO_PLATFORM_SRC
audio/win32/SimpleAudioEngine.cpp
audio/win32/MciPlayer.cpp
audio/win32/MciPlayer.h
audio/win32/AudioEngine-win32.cpp
audio/win32/AudioCache.cpp
audio/win32/AudioPlayer.cpp
)
elseif(LINUX)
set(COCOS_AUDIO_SRC
audio/linux/SimpleAudioEngineFMOD.cpp
audio/linux/FmodAudioPlayer.cpp
audio/linux/FmodAudioPlayer.h
audio/linux/AudioPlayer.h
)
include_directories( ../external/linux-specific/fmod/include/${ARCH_DIR} )
set(COCOS_AUDIO_PLATFORM_SRC
audio/linux/SimpleAudioEngineFMOD.cpp
audio/linux/FmodAudioPlayer.cpp
audio/linux/FmodAudioPlayer.h
audio/linux/AudioPlayer.h
)
elseif(MACOSX)
# split it in _C and non C
# because C files needs to be compiled with C compiler and not C++
# compiler
set(COCOS_AUDIO_SRC_C
set(COCOS_AUDIO_PLATFORM_SRC_C
audio/mac/CDAudioManager.m
audio/mac/CDOpenALSupport.m
audio/mac/CocosDenshion.m
audio/mac/SimpleAudioEngine_objc.m
)
set(COCOS_AUDIO_SRC
${COCOS_AUDIO_SRC_C}
)
set(COCOS_AUDIO_PLATFORM_SRC
${COCOS_AUDIO_PLATFORM_SRC_C}
audio/apple/AudioCache.mm
audio/apple/AudioEngine-inl.mm
audio/apple/AudioPlayer.mm
audio/mac/SimpleAudioEngine.mm
audio/mac/CDXMacOSXSupport.mm
)
SET_SOURCE_FILES_PROPERTIES(
${COCOS_AUDIO_SRC_C}
)
set_source_files_properties(
${COCOS_AUDIO_PLATFORM_SRC_C}
PROPERTIES LANGUAGE C
)
endif()
if(LINUX)
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set(FMOD_LIB "fmodex64")
else()
set(FMOD_LIB "fmodex")
endif()
set(AUDIO_LIB ${FMOD_LIB})
elseif(WINDOWS)
set(AUDIO_LIB Winmm)
endif()
include_directories( audio/include )
list(APPEND COCOS_AUDIO_SRC ${COCOS_AUDIO_PLATFORM_SRC})

View File

@ -46,7 +46,15 @@ void PlayOverEvent(SLPlayItf caller, void* context, SLuint32 playEvent)
if (context && playEvent == SL_PLAYEVENT_HEADATEND)
{
AudioPlayer* player = (AudioPlayer*)context;
player->_playOver = true;
//fix issue#8965:AudioEngine can't looping audio on Android 2.3.x
if (player->_loop)
{
(*(player->_fdPlayerPlay))->SetPlayState(player->_fdPlayerPlay, SL_PLAYSTATE_PLAYING);
}
else
{
player->_playOver = true;
}
}
}
@ -55,6 +63,7 @@ AudioPlayer::AudioPlayer()
, _finishCallback(nullptr)
, _duration(0.0f)
, _playOver(false)
, _loop(false)
{
}
@ -143,6 +152,7 @@ bool AudioPlayer::init(SLEngineItf engineEngine, SLObjectItf outputMixObject,con
result = (*_fdPlayerObject)->GetInterface(_fdPlayerObject, SL_IID_VOLUME, &_fdPlayerVolume);
if(SL_RESULT_SUCCESS != result){ ERRORLOG("get the volume interface fail"); break; }
_loop = loop;
if (loop){
(*_fdPlayerSeek)->SetLoop(_fdPlayerSeek, SL_BOOLEAN_TRUE, 0, SL_TIME_UNKNOWN);
}
@ -286,13 +296,14 @@ void AudioEngineImpl::setVolume(int audioID,float volume)
}
auto result = (*player._fdPlayerVolume)->SetVolumeLevel(player._fdPlayerVolume, dbVolume);
if(SL_RESULT_SUCCESS != result){
log("%s error:%lu",__func__, result);
log("%s error:%u",__func__, result);
}
}
void AudioEngineImpl::setLoop(int audioID, bool loop)
{
auto& player = _audioPlayers[audioID];
player._loop = loop;
SLboolean loopEnabled = SL_BOOLEAN_TRUE;
if (!loop){
loopEnabled = SL_BOOLEAN_FALSE;
@ -305,7 +316,7 @@ void AudioEngineImpl::pause(int audioID)
auto& player = _audioPlayers[audioID];
auto result = (*player._fdPlayerPlay)->SetPlayState(player._fdPlayerPlay, SL_PLAYSTATE_PAUSED);
if(SL_RESULT_SUCCESS != result){
log("%s error:%lu",__func__, result);
log("%s error:%u",__func__, result);
}
}
@ -314,7 +325,7 @@ void AudioEngineImpl::resume(int audioID)
auto& player = _audioPlayers[audioID];
auto result = (*player._fdPlayerPlay)->SetPlayState(player._fdPlayerPlay, SL_PLAYSTATE_PLAYING);
if(SL_RESULT_SUCCESS != result){
log("%s error:%lu",__func__, result);
log("%s error:%u",__func__, result);
}
}
@ -323,7 +334,7 @@ void AudioEngineImpl::stop(int audioID)
auto& player = _audioPlayers[audioID];
auto result = (*player._fdPlayerPlay)->SetPlayState(player._fdPlayerPlay, SL_PLAYSTATE_STOPPED);
if(SL_RESULT_SUCCESS != result){
log("%s error:%lu",__func__, result);
log("%s error:%u",__func__, result);
}
_audioPlayers.erase(audioID);

View File

@ -50,17 +50,16 @@ public:
bool init(SLEngineItf engineEngine, SLObjectItf outputMixObject,const std::string& fileFullPath, float volume, bool loop);
bool _playOver;
private:
SLObjectItf _fdPlayerObject;
bool _loop;
SLPlayItf _fdPlayerPlay;
private:
SLObjectItf _fdPlayerObject;
SLSeekItf _fdPlayerSeek;
SLVolumeItf _fdPlayerVolume;
float _duration;
int _audioID;
std::function<void (int, const std::string &)> _finishCallback;
friend class AudioEngineImpl;

View File

@ -53,10 +53,8 @@ public:
void addCallbacks(const std::function<void()> &callback);
private:
protected:
void readDataTask();
void invokingCallbacks();
//pcm data related stuff

View File

@ -53,13 +53,13 @@ using namespace cocos2d;
using namespace cocos2d::experimental;
AudioCache::AudioCache()
: _pcmData(nullptr)
, _dataSize(0)
: _dataSize(0)
, _pcmData(nullptr)
, _bytesOfRead(0)
, _exitReadDataTask(false)
, _queBufferFrames(0)
, _queBufferBytes(0)
, _alBufferReady(false)
, _exitReadDataTask(false)
{
}

View File

@ -128,11 +128,10 @@ namespace cocos2d {
}
AudioEngineImpl::AudioEngineImpl()
: _lazyInitLoop(true)
: _threadPool(nullptr)
, _lazyInitLoop(true)
, _currentAudioID(0)
, _threadPool(nullptr)
{
}
AudioEngineImpl::~AudioEngineImpl()
@ -340,7 +339,7 @@ bool AudioEngineImpl::stop(int audioID)
}
}
alSourcei(player._alSource, AL_BUFFER, NULL);
alSourcei(player._alSource, AL_BUFFER, 0);
_alSourceUsed[player._alSource] = false;
_audioPlayers.erase(audioID);
@ -353,7 +352,7 @@ void AudioEngineImpl::stopAll()
for(int index = 0; index < MAX_AUDIOINSTANCES; ++index)
{
alSourceStop(_alSources[index]);
alSourcei(_alSources[index], AL_BUFFER, NULL);
alSourcei(_alSources[index], AL_BUFFER, 0);
_alSourceUsed[_alSources[index]] = false;
}

View File

@ -52,7 +52,7 @@ public:
float getTime() { return _currTime;}
bool setLoop(bool loop);
private:
protected:
void rotateBufferThread(int offsetFrame);
bool play2d(AudioCache* cache);

View File

@ -36,15 +36,14 @@ using namespace cocos2d;
using namespace cocos2d::experimental;
AudioPlayer::AudioPlayer()
: _exitThread(false)
, _timeDirty(false)
, _streamingSource(false)
, _currTime(0.0f)
: _audioCache(nullptr)
, _finishCallbak(nullptr)
, _ready(false)
, _audioCache(nullptr)
, _currTime(0.0f)
, _streamingSource(false)
, _exitThread(false)
, _timeDirty(false)
{
}
AudioPlayer::~AudioPlayer()

View File

@ -28,10 +28,12 @@
#ifndef __AUDIO_ENGINE_H_
#define __AUDIO_ENGINE_H_
#include <string.h>
#include <functional>
#include <list>
#include <string>
#include <unordered_map>
#include "2d/CCNode.h"
#include "platform/CCPlatformMacros.h"
#include "Export.h"
#ifdef ERROR
@ -53,8 +55,8 @@ public:
double minDelay;
AudioProfile()
: minDelay(0.0)
, maxInstances(0)
: maxInstances(0)
, minDelay(0.0)
{
}

View File

@ -4,7 +4,11 @@
#include <vector>
#include <string>
#include <stdio.h>
#ifdef OPENAL_PLAIN_INCLUDES
#include <al.h>
#else
#include <AL/al.h>
#endif
#include "cocos2d.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN

View File

@ -30,9 +30,15 @@ THE SOFTWARE.
#include <stdio.h>
#include <unistd.h>
#ifdef OPENAL_PLAIN_INCLUDES
#include <al.h>
#include <alc.h>
#include <alut.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/alut.h>
#endif
#include "OpenALDecoder.h"
#ifdef ENABLE_MPG123

View File

@ -51,7 +51,7 @@ AudioCache::AudioCache()
}
AudioCache::AudioCache(AudioCache& cache)
AudioCache::AudioCache(const AudioCache& cache)
{
_pcmData = cache._pcmData;
_pcmDataSize = cache._pcmDataSize;

View File

@ -31,8 +31,12 @@
#include <string>
#include <mutex>
#include <vector>
#ifdef OPENAL_PLAIN_INCLUDES
#include <al.h>
#else
#include <AL/al.h>
#endif
#include "CCPlatformMacros.h"
#include "AL/al.h"
#define QUEUEBUFFER_NUM 3
#define QUEUEBUFFER_TIME_STEP 0.1f
@ -53,7 +57,7 @@ public:
};
AudioCache();
AudioCache(AudioCache&);
AudioCache(const AudioCache&);
~AudioCache();
void addCallbacks(const std::function<void()> &callback);

View File

@ -45,7 +45,7 @@ AudioPlayer::AudioPlayer()
}
AudioPlayer::AudioPlayer(AudioPlayer& player)
AudioPlayer::AudioPlayer(const AudioPlayer& player)
{
_exitThread = player._exitThread;
_timeDirty = player._timeDirty;

View File

@ -31,7 +31,11 @@
#include <string>
#include <condition_variable>
#include <thread>
#include "AL/al.h"
#ifdef OPENAL_PLAIN_INCLUDES
#include <al.h>
#else
#include <AL/al.h>
#endif
#include "CCPlatformMacros.h"
NS_CC_BEGIN
@ -44,7 +48,7 @@ class CC_DLL AudioPlayer
{
public:
AudioPlayer();
AudioPlayer(AudioPlayer&);
AudioPlayer(const AudioPlayer&);
~AudioPlayer();
//queue buffer related stuff

View File

@ -224,7 +224,7 @@ static void _log(const char *format, va_list args)
fflush(stdout);
#else
// Linux, Mac, iOS, etc
fprintf(stdout, "cocos2d: %s", buf);
fprintf(stdout, "%s", buf);
fflush(stdout);
#endif

View File

@ -67,7 +67,7 @@ THE SOFTWARE.
*/
#ifndef CC_DIRECTOR_STATS_POSITION
#define CC_DIRECTOR_STATS_POSITION Director::getInstance()->getVisibleOrigin()
#endif
#endif // CC_DIRECTOR_STATS_POSITION
using namespace std;
@ -117,7 +117,7 @@ bool Director::init(void)
_accumDt = 0.0f;
_frameRate = 0.0f;
_FPSLabel = _drawnBatchesLabel = _drawnVerticesLabel = nullptr;
_totalFrames = _frames = 0;
_totalFrames = 0;
_lastUpdate = new struct timeval;
// paused ?
@ -431,6 +431,12 @@ void Director::setNextDeltaTimeZero(bool nextDeltaTimeZero)
_nextDeltaTimeZero = nextDeltaTimeZero;
}
//
// FIXME TODO
// Matrix code MUST NOT be part of the Director
// MUST BE moved outide.
// Why the Director must have this code ?
//
void Director::initMatrixStack()
{
while (!_modelViewMatrixStack.empty())
@ -1069,22 +1075,27 @@ void Director::showStats()
{
static unsigned long prevCalls = 0;
static unsigned long prevVerts = 0;
static float prevDeltaTime = 0.016; // 60FPS
static const float FPS_FILTER = 0.10;
++_frames;
_accumDt += _deltaTime;
if (_displayStats && _FPSLabel && _drawnBatchesLabel && _drawnVerticesLabel)
{
char buffer[30];
float dt = _deltaTime * FPS_FILTER + (1-FPS_FILTER) * prevDeltaTime;
prevDeltaTime = dt;
_frameRate = 1/dt;
// Probably we don't need this anymore since
// the framerate is using a low-pass filter
// to make the FPS stable
if (_accumDt > CC_DIRECTOR_STATS_INTERVAL)
{
_frameRate = _frames / _accumDt;
_frames = 0;
_accumDt = 0;
sprintf(buffer, "%.1f / %.3f", _frameRate, _secondsPerFrame);
_FPSLabel->setString(buffer);
_accumDt = 0;
}
auto currentCalls = (unsigned long)_renderer->getDrawnBatches();
@ -1102,7 +1113,6 @@ void Director::showStats()
}
Mat4 identity = Mat4::IDENTITY;
_drawnVerticesLabel->visit(_renderer, identity, 0);
_drawnBatchesLabel->visit(_renderer, identity, 0);
_FPSLabel->visit(_renderer, identity, 0);
@ -1111,10 +1121,16 @@ void Director::showStats()
void Director::calculateMPF()
{
static float prevSecondsPerFrame = 0;
static const float MPF_FILTER = 0.10;
struct timeval now;
gettimeofday(&now, nullptr);
_secondsPerFrame = (now.tv_sec - _lastUpdate->tv_sec) + (now.tv_usec - _lastUpdate->tv_usec) / 1000000.0f;
_secondsPerFrame = _secondsPerFrame * MPF_FILTER + (1-MPF_FILTER) * prevSecondsPerFrame;
prevSecondsPerFrame = _secondsPerFrame;
}
// returns the FPS image data pointer and len

View File

@ -461,7 +461,6 @@ protected:
/* How many frames were called since the director started */
unsigned int _totalFrames;
unsigned int _frames;
float _secondsPerFrame;
/* The running scene */

View File

@ -202,6 +202,12 @@ public:
KEY_DPAD_CENTER,
KEY_ENTER,
KEY_PLAY,
KEY_LEFT_CTRL,
KEY_RIGHT_CTRL,
KEY_LEFT_ALT,
KEY_RIGHT_ALT,
KEY_LEFT_SHIFT,
KEY_RIGHT_SHIFT
};
EventKeyboard(KeyCode keyCode, bool isPressed);

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