diff --git a/.appveyor.yml b/.appveyor.yml index a3834cec3d57..3c034ccb38a0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,6 +37,7 @@ branches: - v3-doc - v3.11_backup - v35-for-tizen + - metal-support clone_depth: 1 diff --git a/.gitignore b/.gitignore index 0f469c24b0b0..9daa6ef5da4a 100644 --- a/.gitignore +++ b/.gitignore @@ -168,3 +168,7 @@ tests/lua-tests/project/proj.tizen/res/ cmake-build-*/ .vs cmake_build* +metal-support*.zip +**/.project + +desktop.ini diff --git a/.travis.yml b/.travis.yml index 434feab6f0fe..679331605109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ matrix: include: # linux - os: linux + dist: xenial env: - BUILD_TARGET=linux - GEN_BINDING_AND_COCOSFILE=true @@ -61,9 +62,10 @@ matrix: sudo: required - os: linux env: BUILD_TARGET=android_cocos_new_test - language: cpp + language: android sudo: required - os: linux + dist: xenial env: BUILD_TARGET=linux_cocos_new_test language: cpp sudo: required diff --git a/CMakeLists.txt b/CMakeLists.txt index f379e71ece8b..90bf705b7cbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,15 +34,34 @@ project(Cocos2d-x) set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/) +# prevent in-source-build +include(PreventInSourceBuilds) +AssureOutOfSourceBuilds() + # works before build libcocos2d include(CocosBuildSet) -# default tests include lua, js test project, so we set those option on to build libs -set(BUILD_LUA_LIBS ON) -set(BUILD_JS_LIBS ON) +# for metal-support alpha release, we only test cpp +set(BUILD_LUA_LIBS OFF) +set(BUILD_JS_LIBS OFF) + +add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core) + +# prevent tests project to build "cocos2d-x/cocos" again +set(BUILD_ENGINE_DONE ON) + +# add cpp tests default +add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-empty-test ${ENGINE_BINARY_PATH}/tests/cpp-empty-test) +add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-tests ${ENGINE_BINARY_PATH}/tests/cpp-tests) + +if(BUILD_LUA_LIBS) + add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-empty-test/project ${ENGINE_BINARY_PATH}/tests/lua-empty-test) + add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test) +endif(BUILD_LUA_LIBS) -if(NOT USE_COCOS_PREBUILT) - add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core) +if(BUILD_JS_LIBS) + add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/js-tests/project ${ENGINE_BINARY_PATH}/tests/js-tests) endif() -add_subdirectory(${COCOS2DX_ROOT_PATH}/tests ${ENGINE_BINARY_PATH}/tests) +# add cpp-template-default into project(Cocos2d-x) for tmp test +add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/tests/HelloCpp) diff --git a/build/cocos2d-win32.sln b/build/cocos2d-win32.sln deleted file mode 100644 index 9526be0a4c27..000000000000 --- a/build/cocos2d-win32.sln +++ /dev/null @@ -1,125 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 12.0.21005.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win32\cpp-empty-test.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{92D54E36-7916-48EF-A951-224DD3B25442}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\cocos\scripting\js-bindings\proj.win32\libjscocos2d.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js-tests", "..\tests\js-tests\project\proj.win32\js-tests.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "performance-tests", "..\tests\performance-tests\proj.win32\performance-tests.vcxproj", "{2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-controller-test", "..\tests\game-controller-test\proj.win32\game-controller-test.vcxproj", "{1FA2BD06-2F52-48F6-8468-C0CC33127F5E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|Win32 = Debug|Win32 - Release|ARM = Release|ARM - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|ARM.ActiveCfg = Debug|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|ARM.ActiveCfg = Release|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|ARM.ActiveCfg = Debug|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|ARM.ActiveCfg = Release|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|ARM.ActiveCfg = Debug|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|ARM.ActiveCfg = Release|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32 - {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|ARM.ActiveCfg = Debug|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|ARM.ActiveCfg = Release|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32 - {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|ARM.ActiveCfg = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|ARM.ActiveCfg = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|ARM.ActiveCfg = Debug|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.Build.0 = Debug|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|ARM.ActiveCfg = Release|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.ActiveCfg = Release|Win32 - {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.Build.0 = Release|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|ARM.ActiveCfg = Debug|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|ARM.ActiveCfg = Release|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|ARM.ActiveCfg = Debug|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Release|ARM.ActiveCfg = Release|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32 - {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|ARM.ActiveCfg = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|ARM.ActiveCfg = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|ARM.ActiveCfg = Debug|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Release|ARM.ActiveCfg = Release|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32 - {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Debug|ARM.ActiveCfg = Debug|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Debug|Win32.Build.0 = Debug|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Release|ARM.ActiveCfg = Release|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Release|Win32.ActiveCfg = Release|Win32 - {2778C02D-DDD0-4A92-A6AA-C3E2B7EDE3FF}.Release|Win32.Build.0 = Release|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Debug|ARM.ActiveCfg = Debug|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Debug|Win32.Build.0 = Debug|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Release|ARM.ActiveCfg = Release|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Release|Win32.ActiveCfg = Release|Win32 - {1FA2BD06-2F52-48F6-8468-C0CC33127F5E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} - {41E34993-647E-4282-8384-4AB1AE31A452} = {92D54E36-7916-48EF-A951-224DD3B25442} - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 5e77ca9c4506..7ce645cc7489 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -7,520 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 0C261F281BE7528900707478 /* Light3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C261F261BE7528900707478 /* Light3DReader.cpp */; }; - 0C261F291BE7528900707478 /* Light3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C261F261BE7528900707478 /* Light3DReader.cpp */; }; - 0C261F2A1BE7528900707478 /* Light3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C261F271BE7528900707478 /* Light3DReader.h */; }; - 0C261F2B1BE7528900707478 /* Light3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C261F271BE7528900707478 /* Light3DReader.h */; }; - 15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */; }; - 15AE180919AAD2F700C27E9E /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */; }; - 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E519AAD2F700C27E9E /* CCAABB.h */; }; - 15AE180B19AAD2F700C27E9E /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E519AAD2F700C27E9E /* CCAABB.h */; }; - 15AE180C19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */; }; - 15AE180D19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */; }; - 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E719AAD2F700C27E9E /* CCAnimate3D.h */; }; - 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E719AAD2F700C27E9E /* CCAnimate3D.h */; }; - 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E819AAD2F700C27E9E /* CCAnimation3D.cpp */; }; - 15AE181119AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E819AAD2F700C27E9E /* CCAnimation3D.cpp */; }; - 15AE181219AAD2F700C27E9E /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E919AAD2F700C27E9E /* CCAnimation3D.h */; }; - 15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E919AAD2F700C27E9E /* CCAnimation3D.h */; }; - 15AE181419AAD2F700C27E9E /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EA19AAD2F700C27E9E /* CCAnimationCurve.h */; }; - 15AE181519AAD2F700C27E9E /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EA19AAD2F700C27E9E /* CCAnimationCurve.h */; }; - 15AE181619AAD2F700C27E9E /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EC19AAD2F700C27E9E /* CCAttachNode.cpp */; }; - 15AE181719AAD2F700C27E9E /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EC19AAD2F700C27E9E /* CCAttachNode.cpp */; }; - 15AE181819AAD2F700C27E9E /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17ED19AAD2F700C27E9E /* CCAttachNode.h */; }; - 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17ED19AAD2F700C27E9E /* CCAttachNode.h */; }; - 15AE181A19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EE19AAD2F700C27E9E /* CCBundle3D.cpp */; }; - 15AE181B19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EE19AAD2F700C27E9E /* CCBundle3D.cpp */; }; - 15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EF19AAD2F700C27E9E /* CCBundle3D.h */; }; - 15AE181D19AAD2F700C27E9E /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EF19AAD2F700C27E9E /* CCBundle3D.h */; }; - 15AE181E19AAD2F700C27E9E /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F019AAD2F700C27E9E /* CCBundle3DData.h */; }; - 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F019AAD2F700C27E9E /* CCBundle3DData.h */; }; - 15AE182019AAD2F700C27E9E /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F119AAD2F700C27E9E /* CCBundleReader.cpp */; }; - 15AE182119AAD2F700C27E9E /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F119AAD2F700C27E9E /* CCBundleReader.cpp */; }; - 15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F219AAD2F700C27E9E /* CCBundleReader.h */; }; - 15AE182319AAD2F700C27E9E /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F219AAD2F700C27E9E /* CCBundleReader.h */; }; - 15AE182419AAD2F700C27E9E /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F319AAD2F700C27E9E /* CCMesh.cpp */; }; - 15AE182519AAD2F700C27E9E /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F319AAD2F700C27E9E /* CCMesh.cpp */; }; - 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F419AAD2F700C27E9E /* CCMesh.h */; }; - 15AE182719AAD2F700C27E9E /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F419AAD2F700C27E9E /* CCMesh.h */; }; - 15AE182819AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F519AAD2F700C27E9E /* CCMeshSkin.cpp */; }; - 15AE182919AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F519AAD2F700C27E9E /* CCMeshSkin.cpp */; }; - 15AE182A19AAD2F700C27E9E /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F619AAD2F700C27E9E /* CCMeshSkin.h */; }; - 15AE182B19AAD2F700C27E9E /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F619AAD2F700C27E9E /* CCMeshSkin.h */; }; - 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F719AAD2F700C27E9E /* CCMeshVertexIndexData.cpp */; }; - 15AE182D19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F719AAD2F700C27E9E /* CCMeshVertexIndexData.cpp */; }; - 15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F819AAD2F700C27E9E /* CCMeshVertexIndexData.h */; }; - 15AE182F19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F819AAD2F700C27E9E /* CCMeshVertexIndexData.h */; }; - 15AE183019AAD2F700C27E9E /* CCOBB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F919AAD2F700C27E9E /* CCOBB.cpp */; }; - 15AE183119AAD2F700C27E9E /* CCOBB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F919AAD2F700C27E9E /* CCOBB.cpp */; }; - 15AE183219AAD2F700C27E9E /* CCOBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FA19AAD2F700C27E9E /* CCOBB.h */; }; - 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FA19AAD2F700C27E9E /* CCOBB.h */; }; - 15AE183419AAD2F700C27E9E /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FB19AAD2F700C27E9E /* CCObjLoader.cpp */; }; - 15AE183519AAD2F700C27E9E /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FB19AAD2F700C27E9E /* CCObjLoader.cpp */; }; - 15AE183619AAD2F700C27E9E /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FC19AAD2F700C27E9E /* CCObjLoader.h */; }; - 15AE183719AAD2F700C27E9E /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FC19AAD2F700C27E9E /* CCObjLoader.h */; }; - 15AE183819AAD2F700C27E9E /* CCRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FD19AAD2F700C27E9E /* CCRay.cpp */; }; - 15AE183919AAD2F700C27E9E /* CCRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FD19AAD2F700C27E9E /* CCRay.cpp */; }; - 15AE183A19AAD2F700C27E9E /* CCRay.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FE19AAD2F700C27E9E /* CCRay.h */; }; - 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FE19AAD2F700C27E9E /* CCRay.h */; }; - 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FF19AAD2F700C27E9E /* CCSkeleton3D.cpp */; }; - 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FF19AAD2F700C27E9E /* CCSkeleton3D.cpp */; }; - 15AE183E19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180019AAD2F700C27E9E /* CCSkeleton3D.h */; }; - 15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180019AAD2F700C27E9E /* CCSkeleton3D.h */; }; - 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180119AAD2F700C27E9E /* CCSprite3D.cpp */; }; - 15AE184119AAD2F700C27E9E /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180119AAD2F700C27E9E /* CCSprite3D.cpp */; }; - 15AE184219AAD2F700C27E9E /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180219AAD2F700C27E9E /* CCSprite3D.h */; }; - 15AE184319AAD2F700C27E9E /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180219AAD2F700C27E9E /* CCSprite3D.h */; }; - 15AE184419AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */; }; - 15AE184519AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */; }; - 15AE184619AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */; }; - 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */; }; - 15AE184819AAD2F700C27E9E /* cocos3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180519AAD2F700C27E9E /* cocos3d.h */; }; - 15AE184919AAD2F700C27E9E /* cocos3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180519AAD2F700C27E9E /* cocos3d.h */; }; 15AE184A19AAD30500C27E9E /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE11807A56F005B8026 /* Export.h */; }; 15AE184B19AAD30500C27E9E /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE11807A56F005B8026 /* Export.h */; }; - 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */; }; - 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */; }; - 15AE185819AAD31200C27E9E /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE41807A56F005B8026 /* CDAudioManager.h */; }; - 15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FE51807A56F005B8026 /* CDAudioManager.m */; }; - 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE61807A56F005B8026 /* CDConfig.h */; }; - 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE71807A56F005B8026 /* CDOpenALSupport.h */; }; - 15AE185C19AAD31200C27E9E /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FE81807A56F005B8026 /* CDOpenALSupport.m */; }; - 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE91807A56F005B8026 /* CocosDenshion.h */; }; - 15AE185E19AAD31200C27E9E /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FEA1807A56F005B8026 /* CocosDenshion.m */; }; - 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FEB1807A56F005B8026 /* SimpleAudioEngine.mm */; }; - 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FEC1807A56F005B8026 /* SimpleAudioEngine_objc.h */; }; - 15AE186119AAD31200C27E9E /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FED1807A56F005B8026 /* SimpleAudioEngine_objc.m */; }; - 15AE186219AAD31D00C27E9E /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FF41807A56F005B8026 /* CDAudioManager.h */; }; - 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FF51807A56F005B8026 /* CDAudioManager.m */; }; - 15AE186419AAD31D00C27E9E /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FF61807A56F005B8026 /* CDConfig.h */; }; - 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FF71807A56F005B8026 /* CDOpenALSupport.h */; }; - 15AE186619AAD31D00C27E9E /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FF81807A56F005B8026 /* CDOpenALSupport.m */; }; - 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FF91807A56F005B8026 /* CDXMacOSXSupport.h */; }; - 15AE186819AAD31D00C27E9E /* CDXMacOSXSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FFA1807A56F005B8026 /* CDXMacOSXSupport.mm */; }; - 15AE186919AAD31D00C27E9E /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FFB1807A56F005B8026 /* CocosDenshion.h */; }; - 15AE186A19AAD31D00C27E9E /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FFC1807A56F005B8026 /* CocosDenshion.m */; }; - 15AE186B19AAD31D00C27E9E /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FFD1807A56F005B8026 /* SimpleAudioEngine.mm */; }; - 15AE186C19AAD31D00C27E9E /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FFE1807A56F005B8026 /* SimpleAudioEngine_objc.h */; }; - 15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FFF1807A56F005B8026 /* SimpleAudioEngine_objc.m */; }; - 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFA180E26E600808F54 /* CCBAnimationManager.cpp */; }; - 15AE187B19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */; }; - 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFC180E26E600808F54 /* CCBFileLoader.cpp */; }; - 15AE187D19AAD33D00C27E9E /* CCBFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */; }; - 15AE187E19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFE180E26E600808F54 /* CCBKeyframe.cpp */; }; - 15AE187F19AAD33D00C27E9E /* CCBKeyframe.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */; }; - 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D00180E26E600808F54 /* CCBMemberVariableAssigner.h */; }; - 15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D01180E26E600808F54 /* CCBReader.cpp */; }; - 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D02180E26E600808F54 /* CCBReader.h */; }; - 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D03180E26E600808F54 /* CCBSelectorResolver.h */; }; - 15AE188419AAD33D00C27E9E /* CCBSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D04180E26E600808F54 /* CCBSequence.cpp */; }; - 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D05180E26E600808F54 /* CCBSequence.h */; }; - 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D06180E26E600808F54 /* CCBSequenceProperty.cpp */; }; - 15AE188719AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D07180E26E600808F54 /* CCBSequenceProperty.h */; }; - 15AE188819AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0A180E26E600808F54 /* CCControlButtonLoader.cpp */; }; - 15AE188919AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0B180E26E600808F54 /* CCControlButtonLoader.h */; }; - 15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0C180E26E600808F54 /* CCControlLoader.cpp */; }; - 15AE188B19AAD33D00C27E9E /* CCControlLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0D180E26E600808F54 /* CCControlLoader.h */; }; - 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0E180E26E600808F54 /* CCLabelBMFontLoader.cpp */; }; - 15AE188D19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0F180E26E600808F54 /* CCLabelBMFontLoader.h */; }; - 15AE188E19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D10180E26E600808F54 /* CCLabelTTFLoader.cpp */; }; - 15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D11180E26E600808F54 /* CCLabelTTFLoader.h */; }; - 15AE189019AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D12180E26E600808F54 /* CCLayerColorLoader.cpp */; }; - 15AE189119AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D13180E26E600808F54 /* CCLayerColorLoader.h */; }; - 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D14180E26E600808F54 /* CCLayerGradientLoader.cpp */; }; - 15AE189319AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D15180E26E600808F54 /* CCLayerGradientLoader.h */; }; - 15AE189419AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D16180E26E600808F54 /* CCLayerLoader.cpp */; }; - 15AE189519AAD33D00C27E9E /* CCLayerLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D17180E26E600808F54 /* CCLayerLoader.h */; }; - 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D18180E26E600808F54 /* CCMenuItemImageLoader.cpp */; }; - 15AE189719AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D19180E26E600808F54 /* CCMenuItemImageLoader.h */; }; - 15AE189819AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1A180E26E600808F54 /* CCMenuItemLoader.cpp */; }; - 15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1B180E26E600808F54 /* CCMenuItemLoader.h */; }; - 15AE189A19AAD33D00C27E9E /* CCMenuLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1C180E26E600808F54 /* CCMenuLoader.h */; }; - 15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1D180E26E600808F54 /* CCNode+CCBRelativePositioning.cpp */; }; - 15AE189C19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1E180E26E600808F54 /* CCNode+CCBRelativePositioning.h */; }; - 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1F180E26E600808F54 /* CCNodeLoader.cpp */; }; - 15AE189E19AAD33D00C27E9E /* CCNodeLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D20180E26E600808F54 /* CCNodeLoader.h */; }; - 15AE189F19AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D21180E26E600808F54 /* CCNodeLoaderLibrary.cpp */; }; - 15AE18A019AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D22180E26E600808F54 /* CCNodeLoaderLibrary.h */; }; - 15AE18A119AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D23180E26E600808F54 /* CCNodeLoaderListener.h */; }; - 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D24180E26E600808F54 /* CCParticleSystemQuadLoader.cpp */; }; - 15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D25180E26E600808F54 /* CCParticleSystemQuadLoader.h */; }; - 15AE18A419AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D26180E26E600808F54 /* CCScale9SpriteLoader.cpp */; }; - 15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D27180E26E600808F54 /* CCScale9SpriteLoader.h */; }; - 15AE18A619AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D28180E26E600808F54 /* CCScrollViewLoader.cpp */; }; - 15AE18A719AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D29180E26E600808F54 /* CCScrollViewLoader.h */; }; - 15AE18A819AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */; }; - 15AE18A919AAD33D00C27E9E /* CCSpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */; }; - 15AE18AA19AAD33D00C27E9E /* CocosBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2C180E26E600808F54 /* CocosBuilder.h */; }; - 15AE18AB19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFA180E26E600808F54 /* CCBAnimationManager.cpp */; }; - 15AE18AC19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */; }; - 15AE18AD19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFC180E26E600808F54 /* CCBFileLoader.cpp */; }; - 15AE18AE19AAD33D00C27E9E /* CCBFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */; }; - 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFE180E26E600808F54 /* CCBKeyframe.cpp */; }; - 15AE18B019AAD33D00C27E9E /* CCBKeyframe.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */; }; - 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D00180E26E600808F54 /* CCBMemberVariableAssigner.h */; }; - 15AE18B219AAD33D00C27E9E /* CCBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D01180E26E600808F54 /* CCBReader.cpp */; }; - 15AE18B319AAD33D00C27E9E /* CCBReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D02180E26E600808F54 /* CCBReader.h */; }; - 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D03180E26E600808F54 /* CCBSelectorResolver.h */; }; - 15AE18B519AAD33D00C27E9E /* CCBSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D04180E26E600808F54 /* CCBSequence.cpp */; }; - 15AE18B619AAD33D00C27E9E /* CCBSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D05180E26E600808F54 /* CCBSequence.h */; }; - 15AE18B719AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D06180E26E600808F54 /* CCBSequenceProperty.cpp */; }; - 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D07180E26E600808F54 /* CCBSequenceProperty.h */; }; - 15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0A180E26E600808F54 /* CCControlButtonLoader.cpp */; }; - 15AE18BA19AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0B180E26E600808F54 /* CCControlButtonLoader.h */; }; - 15AE18BB19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0C180E26E600808F54 /* CCControlLoader.cpp */; }; - 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0D180E26E600808F54 /* CCControlLoader.h */; }; - 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0E180E26E600808F54 /* CCLabelBMFontLoader.cpp */; }; - 15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0F180E26E600808F54 /* CCLabelBMFontLoader.h */; }; - 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D10180E26E600808F54 /* CCLabelTTFLoader.cpp */; }; - 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D11180E26E600808F54 /* CCLabelTTFLoader.h */; }; - 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D12180E26E600808F54 /* CCLayerColorLoader.cpp */; }; - 15AE18C219AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D13180E26E600808F54 /* CCLayerColorLoader.h */; }; - 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D14180E26E600808F54 /* CCLayerGradientLoader.cpp */; }; - 15AE18C419AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D15180E26E600808F54 /* CCLayerGradientLoader.h */; }; - 15AE18C519AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D16180E26E600808F54 /* CCLayerLoader.cpp */; }; - 15AE18C619AAD33D00C27E9E /* CCLayerLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D17180E26E600808F54 /* CCLayerLoader.h */; }; - 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D18180E26E600808F54 /* CCMenuItemImageLoader.cpp */; }; - 15AE18C819AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D19180E26E600808F54 /* CCMenuItemImageLoader.h */; }; - 15AE18C919AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1A180E26E600808F54 /* CCMenuItemLoader.cpp */; }; - 15AE18CA19AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1B180E26E600808F54 /* CCMenuItemLoader.h */; }; - 15AE18CB19AAD33D00C27E9E /* CCMenuLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1C180E26E600808F54 /* CCMenuLoader.h */; }; - 15AE18CC19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1D180E26E600808F54 /* CCNode+CCBRelativePositioning.cpp */; }; - 15AE18CD19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1E180E26E600808F54 /* CCNode+CCBRelativePositioning.h */; }; - 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1F180E26E600808F54 /* CCNodeLoader.cpp */; }; - 15AE18CF19AAD33D00C27E9E /* CCNodeLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D20180E26E600808F54 /* CCNodeLoader.h */; }; - 15AE18D019AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D21180E26E600808F54 /* CCNodeLoaderLibrary.cpp */; }; - 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D22180E26E600808F54 /* CCNodeLoaderLibrary.h */; }; - 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D23180E26E600808F54 /* CCNodeLoaderListener.h */; }; - 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D24180E26E600808F54 /* CCParticleSystemQuadLoader.cpp */; }; - 15AE18D419AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D25180E26E600808F54 /* CCParticleSystemQuadLoader.h */; }; - 15AE18D519AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D26180E26E600808F54 /* CCScale9SpriteLoader.cpp */; }; - 15AE18D619AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D27180E26E600808F54 /* CCScale9SpriteLoader.h */; }; - 15AE18D719AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D28180E26E600808F54 /* CCScrollViewLoader.cpp */; }; - 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D29180E26E600808F54 /* CCScrollViewLoader.h */; }; - 15AE18D919AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */; }; - 15AE18DA19AAD33D00C27E9E /* CCSpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */; }; - 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2C180E26E600808F54 /* CocosBuilder.h */; }; - 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E99D1C1957BA7000046604 /* CocoLoader.cpp */; }; - 15AE18DD19AAD35000C27E9E /* CocoLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E99D1D1957BA7000046604 /* CocoLoader.h */; }; - 15AE18DE19AAD35000C27E9E /* TriggerObj.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAAC1186AD63B0012A414 /* TriggerObj.h */; }; - 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABC186AD63B0012A414 /* TriggerBase.cpp */; }; - 15AE18E019AAD35000C27E9E /* TriggerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABD186AD63B0012A414 /* TriggerBase.h */; }; - 15AE18E119AAD35000C27E9E /* TriggerMng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABE186AD63B0012A414 /* TriggerMng.cpp */; }; - 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABF186AD63B0012A414 /* TriggerMng.h */; }; - 15AE18E319AAD35000C27E9E /* TriggerObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */; }; - 15AE18E419AAD35000C27E9E /* CCActionFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5948180E930E00EF57C3 /* CCActionFrame.cpp */; }; - 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5949180E930E00EF57C3 /* CCActionFrame.h */; }; - 15AE18E619AAD35000C27E9E /* CCActionFrameEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594A180E930E00EF57C3 /* CCActionFrameEasing.cpp */; }; - 15AE18E719AAD35000C27E9E /* CCActionFrameEasing.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594B180E930E00EF57C3 /* CCActionFrameEasing.h */; }; - 15AE18E819AAD35000C27E9E /* CCActionManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594C180E930E00EF57C3 /* CCActionManagerEx.cpp */; }; - 15AE18E919AAD35000C27E9E /* CCActionManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594D180E930E00EF57C3 /* CCActionManagerEx.h */; }; - 15AE18EA19AAD35000C27E9E /* CCActionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594E180E930E00EF57C3 /* CCActionNode.cpp */; }; - 15AE18EB19AAD35000C27E9E /* CCActionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594F180E930E00EF57C3 /* CCActionNode.h */; }; - 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5950180E930E00EF57C3 /* CCActionObject.cpp */; }; - 15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5951180E930E00EF57C3 /* CCActionObject.h */; }; - 15AE18EE19AAD35000C27E9E /* CCArmature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5952180E930E00EF57C3 /* CCArmature.cpp */; }; - 15AE18EF19AAD35000C27E9E /* CCArmature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5953180E930E00EF57C3 /* CCArmature.h */; }; - 15AE18F019AAD35000C27E9E /* CCArmatureAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5954180E930E00EF57C3 /* CCArmatureAnimation.cpp */; }; - 15AE18F119AAD35000C27E9E /* CCArmatureAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5955180E930E00EF57C3 /* CCArmatureAnimation.h */; }; - 15AE18F219AAD35000C27E9E /* CCArmatureDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5956180E930E00EF57C3 /* CCArmatureDataManager.cpp */; }; - 15AE18F319AAD35000C27E9E /* CCArmatureDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5957180E930E00EF57C3 /* CCArmatureDataManager.h */; }; - 15AE18F419AAD35000C27E9E /* CCArmatureDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5958180E930E00EF57C3 /* CCArmatureDefine.cpp */; }; - 15AE18F519AAD35000C27E9E /* CCArmatureDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5959180E930E00EF57C3 /* CCArmatureDefine.h */; }; - 15AE18F619AAD35000C27E9E /* CCBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595A180E930E00EF57C3 /* CCBatchNode.cpp */; }; - 15AE18F719AAD35000C27E9E /* CCBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595B180E930E00EF57C3 /* CCBatchNode.h */; }; - 15AE18F819AAD35000C27E9E /* CCBone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595C180E930E00EF57C3 /* CCBone.cpp */; }; - 15AE18F919AAD35000C27E9E /* CCBone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595D180E930E00EF57C3 /* CCBone.h */; }; - 15AE18FA19AAD35000C27E9E /* CCColliderDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595E180E930E00EF57C3 /* CCColliderDetector.cpp */; }; - 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595F180E930E00EF57C3 /* CCColliderDetector.h */; }; - 15AE18FC19AAD35000C27E9E /* CCComBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 373B910718787C0B00198F86 /* CCComBase.h */; }; - 15AE18FD19AAD35000C27E9E /* CCComAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5960180E930E00EF57C3 /* CCComAttribute.cpp */; }; - 15AE18FE19AAD35000C27E9E /* CCComAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5961180E930E00EF57C3 /* CCComAttribute.h */; }; - 15AE18FF19AAD35000C27E9E /* CCComAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5962180E930E00EF57C3 /* CCComAudio.cpp */; }; - 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5963180E930E00EF57C3 /* CCComAudio.h */; }; - 15AE190119AAD35000C27E9E /* CCComController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5964180E930E00EF57C3 /* CCComController.cpp */; }; - 15AE190219AAD35000C27E9E /* CCComController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5965180E930E00EF57C3 /* CCComController.h */; }; - 15AE190319AAD35000C27E9E /* CCComRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5966180E930E00EF57C3 /* CCComRender.cpp */; }; - 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5967180E930E00EF57C3 /* CCComRender.h */; }; - 15AE190519AAD35000C27E9E /* CCDataReaderHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5968180E930E00EF57C3 /* CCDataReaderHelper.cpp */; }; - 15AE190619AAD35000C27E9E /* CCDataReaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5969180E930E00EF57C3 /* CCDataReaderHelper.h */; }; - 15AE190719AAD35000C27E9E /* CCDatas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596A180E930E00EF57C3 /* CCDatas.cpp */; }; - 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596B180E930E00EF57C3 /* CCDatas.h */; }; - 15AE190919AAD35000C27E9E /* CCDecorativeDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596C180E930E00EF57C3 /* CCDecorativeDisplay.cpp */; }; - 15AE190A19AAD35000C27E9E /* CCDecorativeDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596D180E930E00EF57C3 /* CCDecorativeDisplay.h */; }; - 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596E180E930E00EF57C3 /* CCDisplayFactory.cpp */; }; - 15AE190C19AAD35000C27E9E /* CCDisplayFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596F180E930E00EF57C3 /* CCDisplayFactory.h */; }; - 15AE190D19AAD35000C27E9E /* CCDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5970180E930E00EF57C3 /* CCDisplayManager.cpp */; }; - 15AE190E19AAD35000C27E9E /* CCDisplayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5971180E930E00EF57C3 /* CCDisplayManager.h */; }; - 15AE190F19AAD35000C27E9E /* CCInputDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5972180E930E00EF57C3 /* CCInputDelegate.cpp */; }; - 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5973180E930E00EF57C3 /* CCInputDelegate.h */; }; - 15AE191119AAD35000C27E9E /* CCProcessBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5974180E930E00EF57C3 /* CCProcessBase.cpp */; }; - 15AE191219AAD35000C27E9E /* CCProcessBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5975180E930E00EF57C3 /* CCProcessBase.h */; }; - 15AE191319AAD35000C27E9E /* CCSGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5976180E930E00EF57C3 /* CCSGUIReader.cpp */; }; - 15AE191419AAD35000C27E9E /* CCSGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5977180E930E00EF57C3 /* CCSGUIReader.h */; }; - 15AE191519AAD35000C27E9E /* CCSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5978180E930E00EF57C3 /* CCSkin.cpp */; }; - 15AE191619AAD35000C27E9E /* CCSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5979180E930E00EF57C3 /* CCSkin.h */; }; - 15AE191719AAD35000C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597A180E930E00EF57C3 /* CCSpriteFrameCacheHelper.cpp */; }; - 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597B180E930E00EF57C3 /* CCSpriteFrameCacheHelper.h */; }; - 15AE191919AAD35000C27E9E /* CCSSceneReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597C180E930E00EF57C3 /* CCSSceneReader.cpp */; }; - 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597D180E930E00EF57C3 /* CCSSceneReader.h */; }; - 15AE191B19AAD35000C27E9E /* CCTransformHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597E180E930E00EF57C3 /* CCTransformHelp.cpp */; }; - 15AE191C19AAD35000C27E9E /* CCTransformHelp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597F180E930E00EF57C3 /* CCTransformHelp.h */; }; - 15AE191D19AAD35000C27E9E /* CCTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5980180E930E00EF57C3 /* CCTween.cpp */; }; - 15AE191E19AAD35000C27E9E /* CCTween.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5981180E930E00EF57C3 /* CCTween.h */; }; - 15AE191F19AAD35000C27E9E /* CCUtilMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5984180E930E00EF57C3 /* CCUtilMath.cpp */; }; - 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5985180E930E00EF57C3 /* CCUtilMath.h */; }; - 15AE192119AAD35000C27E9E /* CocoStudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5986180E930E00EF57C3 /* CocoStudio.h */; }; - 15AE192219AAD35000C27E9E /* DictionaryHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5989180E930E00EF57C3 /* DictionaryHelper.cpp */; }; - 15AE192319AAD35000C27E9E /* DictionaryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C598A180E930E00EF57C3 /* DictionaryHelper.h */; }; - 15AE192419AAD35100C27E9E /* CocoLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E99D1C1957BA7000046604 /* CocoLoader.cpp */; }; - 15AE192519AAD35100C27E9E /* CocoLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E99D1D1957BA7000046604 /* CocoLoader.h */; }; - 15AE192619AAD35100C27E9E /* TriggerObj.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAAC1186AD63B0012A414 /* TriggerObj.h */; }; - 15AE192719AAD35100C27E9E /* TriggerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABC186AD63B0012A414 /* TriggerBase.cpp */; }; - 15AE192819AAD35100C27E9E /* TriggerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABD186AD63B0012A414 /* TriggerBase.h */; }; - 15AE192919AAD35100C27E9E /* TriggerMng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABE186AD63B0012A414 /* TriggerMng.cpp */; }; - 15AE192A19AAD35100C27E9E /* TriggerMng.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABF186AD63B0012A414 /* TriggerMng.h */; }; - 15AE192B19AAD35100C27E9E /* TriggerObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */; }; - 15AE192C19AAD35100C27E9E /* CCActionFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5948180E930E00EF57C3 /* CCActionFrame.cpp */; }; - 15AE192D19AAD35100C27E9E /* CCActionFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5949180E930E00EF57C3 /* CCActionFrame.h */; }; - 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594A180E930E00EF57C3 /* CCActionFrameEasing.cpp */; }; - 15AE192F19AAD35100C27E9E /* CCActionFrameEasing.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594B180E930E00EF57C3 /* CCActionFrameEasing.h */; }; - 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594C180E930E00EF57C3 /* CCActionManagerEx.cpp */; }; - 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594D180E930E00EF57C3 /* CCActionManagerEx.h */; }; - 15AE193219AAD35100C27E9E /* CCActionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594E180E930E00EF57C3 /* CCActionNode.cpp */; }; - 15AE193319AAD35100C27E9E /* CCActionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594F180E930E00EF57C3 /* CCActionNode.h */; }; - 15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5950180E930E00EF57C3 /* CCActionObject.cpp */; }; - 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5951180E930E00EF57C3 /* CCActionObject.h */; }; - 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5952180E930E00EF57C3 /* CCArmature.cpp */; }; - 15AE193719AAD35100C27E9E /* CCArmature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5953180E930E00EF57C3 /* CCArmature.h */; }; - 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5954180E930E00EF57C3 /* CCArmatureAnimation.cpp */; }; - 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5955180E930E00EF57C3 /* CCArmatureAnimation.h */; }; - 15AE193A19AAD35100C27E9E /* CCArmatureDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5956180E930E00EF57C3 /* CCArmatureDataManager.cpp */; }; - 15AE193B19AAD35100C27E9E /* CCArmatureDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5957180E930E00EF57C3 /* CCArmatureDataManager.h */; }; - 15AE193C19AAD35100C27E9E /* CCArmatureDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5958180E930E00EF57C3 /* CCArmatureDefine.cpp */; }; - 15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5959180E930E00EF57C3 /* CCArmatureDefine.h */; }; - 15AE193E19AAD35100C27E9E /* CCBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595A180E930E00EF57C3 /* CCBatchNode.cpp */; }; - 15AE193F19AAD35100C27E9E /* CCBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595B180E930E00EF57C3 /* CCBatchNode.h */; }; - 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595C180E930E00EF57C3 /* CCBone.cpp */; }; - 15AE194119AAD35100C27E9E /* CCBone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595D180E930E00EF57C3 /* CCBone.h */; }; - 15AE194219AAD35100C27E9E /* CCColliderDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595E180E930E00EF57C3 /* CCColliderDetector.cpp */; }; - 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595F180E930E00EF57C3 /* CCColliderDetector.h */; }; - 15AE194419AAD35100C27E9E /* CCComBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 373B910718787C0B00198F86 /* CCComBase.h */; }; - 15AE194519AAD35100C27E9E /* CCComAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5960180E930E00EF57C3 /* CCComAttribute.cpp */; }; - 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5961180E930E00EF57C3 /* CCComAttribute.h */; }; - 15AE194719AAD35100C27E9E /* CCComAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5962180E930E00EF57C3 /* CCComAudio.cpp */; }; - 15AE194819AAD35100C27E9E /* CCComAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5963180E930E00EF57C3 /* CCComAudio.h */; }; - 15AE194919AAD35100C27E9E /* CCComController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5964180E930E00EF57C3 /* CCComController.cpp */; }; - 15AE194A19AAD35100C27E9E /* CCComController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5965180E930E00EF57C3 /* CCComController.h */; }; - 15AE194B19AAD35100C27E9E /* CCComRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5966180E930E00EF57C3 /* CCComRender.cpp */; }; - 15AE194C19AAD35100C27E9E /* CCComRender.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5967180E930E00EF57C3 /* CCComRender.h */; }; - 15AE194D19AAD35100C27E9E /* CCDataReaderHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5968180E930E00EF57C3 /* CCDataReaderHelper.cpp */; }; - 15AE194E19AAD35100C27E9E /* CCDataReaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5969180E930E00EF57C3 /* CCDataReaderHelper.h */; }; - 15AE194F19AAD35100C27E9E /* CCDatas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596A180E930E00EF57C3 /* CCDatas.cpp */; }; - 15AE195019AAD35100C27E9E /* CCDatas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596B180E930E00EF57C3 /* CCDatas.h */; }; - 15AE195119AAD35100C27E9E /* CCDecorativeDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596C180E930E00EF57C3 /* CCDecorativeDisplay.cpp */; }; - 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596D180E930E00EF57C3 /* CCDecorativeDisplay.h */; }; - 15AE195319AAD35100C27E9E /* CCDisplayFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596E180E930E00EF57C3 /* CCDisplayFactory.cpp */; }; - 15AE195419AAD35100C27E9E /* CCDisplayFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596F180E930E00EF57C3 /* CCDisplayFactory.h */; }; - 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5970180E930E00EF57C3 /* CCDisplayManager.cpp */; }; - 15AE195619AAD35100C27E9E /* CCDisplayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5971180E930E00EF57C3 /* CCDisplayManager.h */; }; - 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5972180E930E00EF57C3 /* CCInputDelegate.cpp */; }; - 15AE195819AAD35100C27E9E /* CCInputDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5973180E930E00EF57C3 /* CCInputDelegate.h */; }; - 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5974180E930E00EF57C3 /* CCProcessBase.cpp */; }; - 15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5975180E930E00EF57C3 /* CCProcessBase.h */; }; - 15AE195B19AAD35100C27E9E /* CCSGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5976180E930E00EF57C3 /* CCSGUIReader.cpp */; }; - 15AE195C19AAD35100C27E9E /* CCSGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5977180E930E00EF57C3 /* CCSGUIReader.h */; }; - 15AE195D19AAD35100C27E9E /* CCSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5978180E930E00EF57C3 /* CCSkin.cpp */; }; - 15AE195E19AAD35100C27E9E /* CCSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5979180E930E00EF57C3 /* CCSkin.h */; }; - 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597A180E930E00EF57C3 /* CCSpriteFrameCacheHelper.cpp */; }; - 15AE196019AAD35100C27E9E /* CCSpriteFrameCacheHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597B180E930E00EF57C3 /* CCSpriteFrameCacheHelper.h */; }; - 15AE196119AAD35100C27E9E /* CCSSceneReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597C180E930E00EF57C3 /* CCSSceneReader.cpp */; }; - 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597D180E930E00EF57C3 /* CCSSceneReader.h */; }; - 15AE196319AAD35100C27E9E /* CCTransformHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597E180E930E00EF57C3 /* CCTransformHelp.cpp */; }; - 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597F180E930E00EF57C3 /* CCTransformHelp.h */; }; - 15AE196519AAD35100C27E9E /* CCTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5980180E930E00EF57C3 /* CCTween.cpp */; }; - 15AE196619AAD35100C27E9E /* CCTween.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5981180E930E00EF57C3 /* CCTween.h */; }; - 15AE196719AAD35100C27E9E /* CCUtilMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5984180E930E00EF57C3 /* CCUtilMath.cpp */; }; - 15AE196819AAD35100C27E9E /* CCUtilMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5985180E930E00EF57C3 /* CCUtilMath.h */; }; - 15AE196919AAD35100C27E9E /* CocoStudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5986180E930E00EF57C3 /* CocoStudio.h */; }; - 15AE196A19AAD35100C27E9E /* DictionaryHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5989180E930E00EF57C3 /* DictionaryHelper.cpp */; }; - 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C598A180E930E00EF57C3 /* DictionaryHelper.h */; }; - 15AE196C19AAD35700C27E9E /* CCActionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */; }; - 15AE196D19AAD35700C27E9E /* CCActionTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C6194B19E400E608AF /* CCActionTimeline.h */; }; - 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C7194B19E400E608AF /* CCActionTimelineCache.cpp */; }; - 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C8194B19E400E608AF /* CCActionTimelineCache.h */; }; - 15AE197019AAD35700C27E9E /* CCFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C9194B19E400E608AF /* CCFrame.cpp */; }; - 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CA194B19E400E608AF /* CCFrame.h */; }; - 15AE197419AAD35700C27E9E /* CCTimeLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4CD194B19E400E608AF /* CCTimeLine.cpp */; }; - 15AE197519AAD35700C27E9E /* CCTimeLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CE194B19E400E608AF /* CCTimeLine.h */; }; - 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CF194B19E400E608AF /* CCTimelineMacro.h */; }; - 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */; }; - 15AE197819AAD35700C27E9E /* CCActionTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C6194B19E400E608AF /* CCActionTimeline.h */; }; - 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C7194B19E400E608AF /* CCActionTimelineCache.cpp */; }; - 15AE197A19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C8194B19E400E608AF /* CCActionTimelineCache.h */; }; - 15AE197B19AAD35700C27E9E /* CCFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C9194B19E400E608AF /* CCFrame.cpp */; }; - 15AE197C19AAD35700C27E9E /* CCFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CA194B19E400E608AF /* CCFrame.h */; }; - 15AE197F19AAD35700C27E9E /* CCTimeLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4CD194B19E400E608AF /* CCTimeLine.cpp */; }; - 15AE198019AAD35700C27E9E /* CCTimeLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CE194B19E400E608AF /* CCTimeLine.h */; }; - 15AE198119AAD35700C27E9E /* CCTimelineMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CF194B19E400E608AF /* CCTimelineMacro.h */; }; - 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB9018C72017004AD434 /* WidgetReader.cpp */; }; - 15AE198319AAD36400C27E9E /* WidgetReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9118C72017004AD434 /* WidgetReader.h */; }; - 15AE198419AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9218C72017004AD434 /* WidgetReaderProtocol.h */; }; - 15AE198519AAD36400C27E9E /* WidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB9018C72017004AD434 /* WidgetReader.cpp */; }; - 15AE198619AAD36400C27E9E /* WidgetReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9118C72017004AD434 /* WidgetReader.h */; }; - 15AE198719AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9218C72017004AD434 /* WidgetReaderProtocol.h */; }; - 15AE198819AAD36A00C27E9E /* ButtonReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */; }; - 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6B18C72017004AD434 /* ButtonReader.h */; }; - 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */; }; - 15AE198B19AAD36A00C27E9E /* ButtonReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6B18C72017004AD434 /* ButtonReader.h */; }; - 15AE198C19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */; }; - 15AE198D19AAD36E00C27E9E /* CheckBoxReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6E18C72017004AD434 /* CheckBoxReader.h */; }; - 15AE198E19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */; }; - 15AE198F19AAD36E00C27E9E /* CheckBoxReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6E18C72017004AD434 /* CheckBoxReader.h */; }; - 15AE199019AAD37200C27E9E /* ImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7018C72017004AD434 /* ImageViewReader.cpp */; }; - 15AE199119AAD37200C27E9E /* ImageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7118C72017004AD434 /* ImageViewReader.h */; }; - 15AE199219AAD37300C27E9E /* ImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7018C72017004AD434 /* ImageViewReader.cpp */; }; - 15AE199319AAD37300C27E9E /* ImageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7118C72017004AD434 /* ImageViewReader.h */; }; - 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7318C72017004AD434 /* LayoutReader.cpp */; }; - 15AE199519AAD39600C27E9E /* LayoutReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7418C72017004AD434 /* LayoutReader.h */; }; - 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7618C72017004AD434 /* ListViewReader.cpp */; }; - 15AE199719AAD39600C27E9E /* ListViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7718C72017004AD434 /* ListViewReader.h */; }; - 15AE199819AAD39600C27E9E /* LoadingBarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7918C72017004AD434 /* LoadingBarReader.cpp */; }; - 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7A18C72017004AD434 /* LoadingBarReader.h */; }; - 15AE199A19AAD39600C27E9E /* PageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7C18C72017004AD434 /* PageViewReader.cpp */; }; - 15AE199B19AAD39600C27E9E /* PageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7D18C72017004AD434 /* PageViewReader.h */; }; - 15AE199C19AAD39600C27E9E /* ScrollViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7F18C72017004AD434 /* ScrollViewReader.cpp */; }; - 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8018C72017004AD434 /* ScrollViewReader.h */; }; - 15AE199E19AAD39600C27E9E /* SliderReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8218C72017004AD434 /* SliderReader.cpp */; }; - 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8318C72017004AD434 /* SliderReader.h */; }; - 15AE19A019AAD39600C27E9E /* TextAtlasReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8518C72017004AD434 /* TextAtlasReader.cpp */; }; - 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8618C72017004AD434 /* TextAtlasReader.h */; }; - 15AE19A219AAD39600C27E9E /* TextBMFontReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8818C72017004AD434 /* TextBMFontReader.cpp */; }; - 15AE19A319AAD39600C27E9E /* TextBMFontReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8918C72017004AD434 /* TextBMFontReader.h */; }; - 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8B18C72017004AD434 /* TextFieldReader.cpp */; }; - 15AE19A519AAD39600C27E9E /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8C18C72017004AD434 /* TextFieldReader.h */; }; - 15AE19A619AAD39600C27E9E /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8E18C72017004AD434 /* TextReader.cpp */; }; - 15AE19A719AAD39600C27E9E /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8F18C72017004AD434 /* TextReader.h */; }; - 15AE19A819AAD39700C27E9E /* LayoutReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7318C72017004AD434 /* LayoutReader.cpp */; }; - 15AE19A919AAD39700C27E9E /* LayoutReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7418C72017004AD434 /* LayoutReader.h */; }; - 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7618C72017004AD434 /* ListViewReader.cpp */; }; - 15AE19AB19AAD39700C27E9E /* ListViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7718C72017004AD434 /* ListViewReader.h */; }; - 15AE19AC19AAD39700C27E9E /* LoadingBarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7918C72017004AD434 /* LoadingBarReader.cpp */; }; - 15AE19AD19AAD39700C27E9E /* LoadingBarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7A18C72017004AD434 /* LoadingBarReader.h */; }; - 15AE19AE19AAD39700C27E9E /* PageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7C18C72017004AD434 /* PageViewReader.cpp */; }; - 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7D18C72017004AD434 /* PageViewReader.h */; }; - 15AE19B019AAD39700C27E9E /* ScrollViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7F18C72017004AD434 /* ScrollViewReader.cpp */; }; - 15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8018C72017004AD434 /* ScrollViewReader.h */; }; - 15AE19B219AAD39700C27E9E /* SliderReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8218C72017004AD434 /* SliderReader.cpp */; }; - 15AE19B319AAD39700C27E9E /* SliderReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8318C72017004AD434 /* SliderReader.h */; }; - 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8518C72017004AD434 /* TextAtlasReader.cpp */; }; - 15AE19B519AAD39700C27E9E /* TextAtlasReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8618C72017004AD434 /* TextAtlasReader.h */; }; - 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8818C72017004AD434 /* TextBMFontReader.cpp */; }; - 15AE19B719AAD39700C27E9E /* TextBMFontReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8918C72017004AD434 /* TextBMFontReader.h */; }; - 15AE19B819AAD39700C27E9E /* TextFieldReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8B18C72017004AD434 /* TextFieldReader.cpp */; }; - 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8C18C72017004AD434 /* TextFieldReader.h */; }; - 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8E18C72017004AD434 /* TextReader.cpp */; }; - 15AE19BB19AAD39700C27E9E /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8F18C72017004AD434 /* TextReader.h */; }; - 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FE18CF08D000240AA3 /* UIListView.cpp */; }; - 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FF18CF08D000240AA3 /* UIListView.h */; }; - 15AE1B4F19AADA9900C27E9E /* UILoadingBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */; }; - 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0118CF08D000240AA3 /* UILoadingBar.h */; }; - 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0218CF08D000240AA3 /* UIPageView.cpp */; }; - 15AE1B5219AADA9900C27E9E /* UIPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0318CF08D000240AA3 /* UIPageView.h */; }; - 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0418CF08D000240AA3 /* UIRichText.cpp */; }; - 15AE1B5419AADA9900C27E9E /* UIRichText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0518CF08D000240AA3 /* UIRichText.h */; }; - 15AE1B5519AADA9900C27E9E /* UIScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0718CF08D000240AA3 /* UIScrollView.cpp */; }; - 15AE1B5619AADA9900C27E9E /* UIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0818CF08D000240AA3 /* UIScrollView.h */; }; - 15AE1B5719AADA9900C27E9E /* UISlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0918CF08D000240AA3 /* UISlider.cpp */; }; - 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0A18CF08D100240AA3 /* UISlider.h */; }; - 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0B18CF08D100240AA3 /* UIText.cpp */; }; - 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0C18CF08D100240AA3 /* UIText.h */; }; - 15AE1B5B19AADA9900C27E9E /* UITextAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0D18CF08D100240AA3 /* UITextAtlas.cpp */; }; - 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0E18CF08D100240AA3 /* UITextAtlas.h */; }; - 15AE1B5D19AADA9900C27E9E /* UITextBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0F18CF08D100240AA3 /* UITextBMFont.cpp */; }; - 15AE1B5E19AADA9900C27E9E /* UITextBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1018CF08D100240AA3 /* UITextBMFont.h */; }; - 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1118CF08D100240AA3 /* UITextField.cpp */; }; - 15AE1B6019AADA9900C27E9E /* UITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1218CF08D100240AA3 /* UITextField.h */; }; - 15AE1B6119AADA9900C27E9E /* UIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F018CF08D000240AA3 /* UIButton.cpp */; }; - 15AE1B6219AADA9900C27E9E /* UIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F118CF08D000240AA3 /* UIButton.h */; }; - 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F218CF08D000240AA3 /* UICheckBox.cpp */; }; - 15AE1B6419AADA9900C27E9E /* UICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F318CF08D000240AA3 /* UICheckBox.h */; }; - 15AE1B6519AADA9900C27E9E /* UIImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F618CF08D000240AA3 /* UIImageView.cpp */; }; - 15AE1B6619AADA9900C27E9E /* UIImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F718CF08D000240AA3 /* UIImageView.h */; }; - 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; - 15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 2958244A19873D8E00F9746D /* UIScale9Sprite.h */; }; - 15AE1B6919AADA9900C27E9E /* UIDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 29080DEB191B82CE0066F8DF /* UIDeprecated.h */; }; - 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */; }; - 15AE1B6B19AADA9900C27E9E /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; }; - 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; }; - 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F418CF08D000240AA3 /* UIHelper.cpp */; }; - 15AE1B6E19AADA9900C27E9E /* UIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F518CF08D000240AA3 /* UIHelper.h */; }; - 15AE1B6F19AADA9900C27E9E /* GUIDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EB18CF08D000240AA3 /* GUIDefine.h */; }; - 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */; }; - 15AE1B7119AADA9900C27E9E /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EA18CF08D000240AA3 /* CocosGUI.h */; }; - 15AE1B7219AADA9A00C27E9E /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FE18CF08D000240AA3 /* UIListView.cpp */; }; - 15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FF18CF08D000240AA3 /* UIListView.h */; }; - 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */; }; - 15AE1B7519AADA9A00C27E9E /* UILoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0118CF08D000240AA3 /* UILoadingBar.h */; }; - 15AE1B7619AADA9A00C27E9E /* UIPageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0218CF08D000240AA3 /* UIPageView.cpp */; }; - 15AE1B7719AADA9A00C27E9E /* UIPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0318CF08D000240AA3 /* UIPageView.h */; }; - 15AE1B7819AADA9A00C27E9E /* UIRichText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0418CF08D000240AA3 /* UIRichText.cpp */; }; - 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0518CF08D000240AA3 /* UIRichText.h */; }; - 15AE1B7A19AADA9A00C27E9E /* UIScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0718CF08D000240AA3 /* UIScrollView.cpp */; }; - 15AE1B7B19AADA9A00C27E9E /* UIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0818CF08D000240AA3 /* UIScrollView.h */; }; - 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0918CF08D000240AA3 /* UISlider.cpp */; }; - 15AE1B7D19AADA9A00C27E9E /* UISlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0A18CF08D100240AA3 /* UISlider.h */; }; - 15AE1B7E19AADA9A00C27E9E /* UIText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0B18CF08D100240AA3 /* UIText.cpp */; }; - 15AE1B7F19AADA9A00C27E9E /* UIText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0C18CF08D100240AA3 /* UIText.h */; }; - 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0D18CF08D100240AA3 /* UITextAtlas.cpp */; }; - 15AE1B8119AADA9A00C27E9E /* UITextAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0E18CF08D100240AA3 /* UITextAtlas.h */; }; - 15AE1B8219AADA9A00C27E9E /* UITextBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0F18CF08D100240AA3 /* UITextBMFont.cpp */; }; - 15AE1B8319AADA9A00C27E9E /* UITextBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1018CF08D100240AA3 /* UITextBMFont.h */; }; - 15AE1B8419AADA9A00C27E9E /* UITextField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1118CF08D100240AA3 /* UITextField.cpp */; }; - 15AE1B8519AADA9A00C27E9E /* UITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1218CF08D100240AA3 /* UITextField.h */; }; - 15AE1B8619AADA9A00C27E9E /* UIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F018CF08D000240AA3 /* UIButton.cpp */; }; - 15AE1B8719AADA9A00C27E9E /* UIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F118CF08D000240AA3 /* UIButton.h */; }; - 15AE1B8819AADA9A00C27E9E /* UICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F218CF08D000240AA3 /* UICheckBox.cpp */; }; - 15AE1B8919AADA9A00C27E9E /* UICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F318CF08D000240AA3 /* UICheckBox.h */; }; - 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F618CF08D000240AA3 /* UIImageView.cpp */; }; - 15AE1B8B19AADA9A00C27E9E /* UIImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F718CF08D000240AA3 /* UIImageView.h */; }; - 15AE1B8C19AADA9A00C27E9E /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; - 15AE1B8D19AADA9A00C27E9E /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 2958244A19873D8E00F9746D /* UIScale9Sprite.h */; }; - 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 29080DEB191B82CE0066F8DF /* UIDeprecated.h */; }; - 15AE1B8F19AADA9A00C27E9E /* UIDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */; }; - 15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; }; - 15AE1B9119AADA9A00C27E9E /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; }; - 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F418CF08D000240AA3 /* UIHelper.cpp */; }; - 15AE1B9319AADA9A00C27E9E /* UIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F518CF08D000240AA3 /* UIHelper.h */; }; - 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EB18CF08D000240AA3 /* GUIDefine.h */; }; - 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */; }; - 15AE1B9619AADA9A00C27E9E /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EA18CF08D000240AA3 /* CocosGUI.h */; }; - 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; - 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */; }; - 15AE1B9919AADFDF00C27E9E /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D32E18E174130051CA34 /* UIHBox.cpp */; }; - 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D32F18E174130051CA34 /* UIHBox.h */; }; - 15AE1B9B19AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */; }; - 15AE1B9C19AADFDF00C27E9E /* UIRelativeBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33118E174130051CA34 /* UIRelativeBox.h */; }; - 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33218E174130051CA34 /* UIVBox.cpp */; }; - 15AE1B9E19AADFDF00C27E9E /* UIVBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33318E174130051CA34 /* UIVBox.h */; }; - 15AE1B9F19AADFDF00C27E9E /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F818CF08D000240AA3 /* UILayout.cpp */; }; - 15AE1BA019AADFDF00C27E9E /* UILayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F918CF08D000240AA3 /* UILayout.h */; }; - 15AE1BA119AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FC18CF08D000240AA3 /* UILayoutParameter.cpp */; }; - 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FD18CF08D000240AA3 /* UILayoutParameter.h */; }; - 15AE1BA319AADFDF00C27E9E /* UILayoutManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */; }; - 15AE1BA419AADFDF00C27E9E /* UILayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */; }; - 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D32E18E174130051CA34 /* UIHBox.cpp */; }; - 15AE1BA619AADFDF00C27E9E /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D32F18E174130051CA34 /* UIHBox.h */; }; - 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */; }; - 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33118E174130051CA34 /* UIRelativeBox.h */; }; - 15AE1BA919AADFDF00C27E9E /* UIVBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33218E174130051CA34 /* UIVBox.cpp */; }; - 15AE1BAA19AADFDF00C27E9E /* UIVBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33318E174130051CA34 /* UIVBox.h */; }; - 15AE1BAB19AADFDF00C27E9E /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F818CF08D000240AA3 /* UILayout.cpp */; }; - 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F918CF08D000240AA3 /* UILayout.h */; }; - 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FC18CF08D000240AA3 /* UILayoutParameter.cpp */; }; - 15AE1BAE19AADFDF00C27E9E /* UILayoutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FD18CF08D000240AA3 /* UILayoutParameter.h */; }; - 15AE1BAF19AADFDF00C27E9E /* UILayoutManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */; }; - 15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */; }; 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5363180E3374000584C8 /* HttpClient.h */; }; 15AE1BB319AADFEF00C27E9E /* HttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5364180E3374000584C8 /* HttpRequest.h */; }; 15AE1BB419AADFEF00C27E9E /* HttpResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5365180E3374000584C8 /* HttpResponse.h */; }; @@ -535,98 +23,8 @@ 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5367180E3374000584C8 /* SocketIO.h */; }; 15AE1BBF19AADFF000C27E9E /* WebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5368180E3374000584C8 /* WebSocket.cpp */; }; 15AE1BC019AADFF000C27E9E /* WebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5369180E3374000584C8 /* WebSocket.h */; }; - 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; }; - 15AE1BC219AADFFB00C27E9E /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; }; - 15AE1BC319AADFFB00C27E9E /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; }; - 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; }; - 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5351180E3060000584C8 /* AssetsManager.cpp */; }; - 15AE1BC619AAE00000C27E9E /* AssetsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5352180E3060000584C8 /* AssetsManager.h */; }; - 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5351180E3060000584C8 /* AssetsManager.cpp */; }; - 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5352180E3060000584C8 /* AssetsManager.h */; }; - 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168351807AF4E005B8026 /* CCControl.cpp */; }; - 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168361807AF4E005B8026 /* CCControl.h */; }; - 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; }; - 15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168381807AF4E005B8026 /* CCControlButton.h */; }; - 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */; }; - 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */; }; - 15AE1BCF19AAE01E00C27E9E /* CCControlExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683B1807AF4E005B8026 /* CCControlExtensions.h */; }; - 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683C1807AF4E005B8026 /* CCControlHuePicker.cpp */; }; - 15AE1BD119AAE01E00C27E9E /* CCControlHuePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683D1807AF4E005B8026 /* CCControlHuePicker.h */; }; - 15AE1BD219AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683E1807AF4E005B8026 /* CCControlPotentiometer.cpp */; }; - 15AE1BD319AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683F1807AF4E005B8026 /* CCControlPotentiometer.h */; }; - 15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168401807AF4E005B8026 /* CCControlSaturationBrightnessPicker.cpp */; }; - 15AE1BD519AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168411807AF4E005B8026 /* CCControlSaturationBrightnessPicker.h */; }; - 15AE1BD619AAE01E00C27E9E /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168421807AF4E005B8026 /* CCControlSlider.cpp */; }; - 15AE1BD719AAE01E00C27E9E /* CCControlSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168431807AF4E005B8026 /* CCControlSlider.h */; }; - 15AE1BD819AAE01E00C27E9E /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168441807AF4E005B8026 /* CCControlStepper.cpp */; }; - 15AE1BD919AAE01E00C27E9E /* CCControlStepper.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168451807AF4E005B8026 /* CCControlStepper.h */; }; - 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168461807AF4E005B8026 /* CCControlSwitch.cpp */; }; - 15AE1BDB19AAE01E00C27E9E /* CCControlSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168471807AF4E005B8026 /* CCControlSwitch.h */; }; - 15AE1BDC19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168481807AF4E005B8026 /* CCControlUtils.cpp */; }; - 15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168491807AF4E005B8026 /* CCControlUtils.h */; }; - 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */; }; - 15AE1BDF19AAE01E00C27E9E /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; - 15AE1BE219AAE01E00C27E9E /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; - 15AE1BE319AAE01E00C27E9E /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; - 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; - 15AE1BE519AAE01E00C27E9E /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168631807AF4E005B8026 /* CCTableView.h */; }; - 15AE1BE619AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */; }; - 15AE1BE719AAE01E00C27E9E /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168651807AF4E005B8026 /* CCTableViewCell.h */; }; - 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168351807AF4E005B8026 /* CCControl.cpp */; }; - 15AE1BE919AAE01E00C27E9E /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168361807AF4E005B8026 /* CCControl.h */; }; - 15AE1BEA19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; }; - 15AE1BEB19AAE01E00C27E9E /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168381807AF4E005B8026 /* CCControlButton.h */; }; - 15AE1BEC19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */; }; - 15AE1BED19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */; }; - 15AE1BEE19AAE01E00C27E9E /* CCControlExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683B1807AF4E005B8026 /* CCControlExtensions.h */; }; - 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683C1807AF4E005B8026 /* CCControlHuePicker.cpp */; }; - 15AE1BF019AAE01E00C27E9E /* CCControlHuePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683D1807AF4E005B8026 /* CCControlHuePicker.h */; }; - 15AE1BF119AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683E1807AF4E005B8026 /* CCControlPotentiometer.cpp */; }; - 15AE1BF219AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683F1807AF4E005B8026 /* CCControlPotentiometer.h */; }; - 15AE1BF319AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168401807AF4E005B8026 /* CCControlSaturationBrightnessPicker.cpp */; }; - 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168411807AF4E005B8026 /* CCControlSaturationBrightnessPicker.h */; }; - 15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168421807AF4E005B8026 /* CCControlSlider.cpp */; }; - 15AE1BF619AAE01E00C27E9E /* CCControlSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168431807AF4E005B8026 /* CCControlSlider.h */; }; - 15AE1BF719AAE01E00C27E9E /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168441807AF4E005B8026 /* CCControlStepper.cpp */; }; - 15AE1BF819AAE01E00C27E9E /* CCControlStepper.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168451807AF4E005B8026 /* CCControlStepper.h */; }; - 15AE1BF919AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168461807AF4E005B8026 /* CCControlSwitch.cpp */; }; - 15AE1BFA19AAE01E00C27E9E /* CCControlSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168471807AF4E005B8026 /* CCControlSwitch.h */; }; - 15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168481807AF4E005B8026 /* CCControlUtils.cpp */; }; - 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168491807AF4E005B8026 /* CCControlUtils.h */; }; - 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */; }; - 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; - 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; - 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; - 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; - 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168631807AF4E005B8026 /* CCTableView.h */; }; - 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */; }; - 15AE1C0619AAE01E00C27E9E /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168651807AF4E005B8026 /* CCTableViewCell.h */; }; - 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */; }; - 15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */; }; - 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; - 15AE1C1419AAE2C600C27E9E /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; - 15AE1C1519AAE2C700C27E9E /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */; }; - 15AE1C1619AAE2C700C27E9E /* CCPhysicsDebugNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */; }; - 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; - 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; 15AE1C1919AAE30900C27E9E /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5387180E35AC000584C8 /* libwebsockets.a */; }; 15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5384180E35A3000584C8 /* libwebsockets.a */; }; - 15B3707819EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */; }; - 15B3707919EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */; }; - 15B3707A19EE414C00ABE682 /* AssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */; }; - 15B3707B19EE414C00ABE682 /* AssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */; }; - 15B3707C19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */; }; - 15B3707D19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */; }; - 15B3707E19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */; }; - 15B3707F19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */; }; - 15B3708019EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */; }; - 15B3708119EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */; }; - 15B3708219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */; }; - 15B3708319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */; }; - 15B3708819EE414C00ABE682 /* Manifest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707619EE414C00ABE682 /* Manifest.cpp */; }; - 15B3708919EE414C00ABE682 /* Manifest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707619EE414C00ABE682 /* Manifest.cpp */; }; - 15B3708A19EE414C00ABE682 /* Manifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707719EE414C00ABE682 /* Manifest.h */; }; - 15B3708B19EE414C00ABE682 /* Manifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707719EE414C00ABE682 /* Manifest.h */; }; 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; }; 15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; }; 15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */; }; @@ -659,56 +57,6 @@ 15FB209C1AE7C57D00C31518 /* sweep_context.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB20851AE7C57D00C31518 /* sweep_context.cc */; }; 15FB209D1AE7C57D00C31518 /* sweep_context.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20861AE7C57D00C31518 /* sweep_context.h */; }; 15FB209E1AE7C57D00C31518 /* sweep_context.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20861AE7C57D00C31518 /* sweep_context.h */; }; - 182C5CAE1A95961600C30D34 /* CSParse3DBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CAD1A95961600C30D34 /* CSParse3DBinary_generated.h */; }; - 182C5CB21A95964700C30D34 /* Node3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CB01A95964700C30D34 /* Node3DReader.cpp */; }; - 182C5CB31A95964700C30D34 /* Node3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CB11A95964700C30D34 /* Node3DReader.h */; }; - 182C5CB41A95964C00C30D34 /* Node3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CB01A95964700C30D34 /* Node3DReader.cpp */; }; - 182C5CB51A95964F00C30D34 /* Node3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CB11A95964700C30D34 /* Node3DReader.h */; }; - 182C5CB61A95965500C30D34 /* CSParse3DBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CAD1A95961600C30D34 /* CSParse3DBinary_generated.h */; }; - 182C5CD61A98F30500C30D34 /* Sprite3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CD41A98F30500C30D34 /* Sprite3DReader.cpp */; }; - 182C5CD71A98F30500C30D34 /* Sprite3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CD41A98F30500C30D34 /* Sprite3DReader.cpp */; }; - 182C5CD81A98F30500C30D34 /* Sprite3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CD51A98F30500C30D34 /* Sprite3DReader.h */; }; - 182C5CD91A98F30500C30D34 /* Sprite3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CD51A98F30500C30D34 /* Sprite3DReader.h */; }; - 182C5CE51A9D725400C30D34 /* UserCameraReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CE31A9D725400C30D34 /* UserCameraReader.cpp */; }; - 182C5CE61A9D725400C30D34 /* UserCameraReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CE31A9D725400C30D34 /* UserCameraReader.cpp */; }; - 182C5CE71A9D725400C30D34 /* UserCameraReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CE41A9D725400C30D34 /* UserCameraReader.h */; }; - 182C5CE81A9D725400C30D34 /* UserCameraReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CE41A9D725400C30D34 /* UserCameraReader.h */; }; - 18956BB21A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18956BB01A9DFBFD006E9155 /* Particle3DReader.cpp */; }; - 18956BB31A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18956BB01A9DFBFD006E9155 /* Particle3DReader.cpp */; }; - 18956BB41A9DFBFD006E9155 /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 18956BB11A9DFBFD006E9155 /* Particle3DReader.h */; }; - 18956BB51A9DFBFD006E9155 /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 18956BB11A9DFBFD006E9155 /* Particle3DReader.h */; }; - 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */; }; - 1A01C68518F57BE800EFE3A6 /* CCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */; }; - 1A01C68618F57BE800EFE3A6 /* CCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67718F57BE800EFE3A6 /* CCArray.h */; }; - 1A01C68718F57BE800EFE3A6 /* CCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67718F57BE800EFE3A6 /* CCArray.h */; }; - 1A01C68818F57BE800EFE3A6 /* CCBool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67818F57BE800EFE3A6 /* CCBool.h */; }; - 1A01C68918F57BE800EFE3A6 /* CCBool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67818F57BE800EFE3A6 /* CCBool.h */; }; - 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67918F57BE800EFE3A6 /* CCDeprecated.cpp */; }; - 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67918F57BE800EFE3A6 /* CCDeprecated.cpp */; }; - 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67A18F57BE800EFE3A6 /* CCDeprecated.h */; }; - 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67A18F57BE800EFE3A6 /* CCDeprecated.h */; }; - 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67B18F57BE800EFE3A6 /* CCDictionary.cpp */; }; - 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67B18F57BE800EFE3A6 /* CCDictionary.cpp */; }; - 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67C18F57BE800EFE3A6 /* CCDictionary.h */; }; - 1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67C18F57BE800EFE3A6 /* CCDictionary.h */; }; - 1A01C69218F57BE800EFE3A6 /* CCDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67D18F57BE800EFE3A6 /* CCDouble.h */; }; - 1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67D18F57BE800EFE3A6 /* CCDouble.h */; }; - 1A01C69418F57BE800EFE3A6 /* CCFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67E18F57BE800EFE3A6 /* CCFloat.h */; }; - 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67E18F57BE800EFE3A6 /* CCFloat.h */; }; - 1A01C69618F57BE800EFE3A6 /* CCInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67F18F57BE800EFE3A6 /* CCInteger.h */; }; - 1A01C69718F57BE800EFE3A6 /* CCInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67F18F57BE800EFE3A6 /* CCInteger.h */; }; - 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68018F57BE800EFE3A6 /* CCSet.cpp */; }; - 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68018F57BE800EFE3A6 /* CCSet.cpp */; }; - 1A01C69A18F57BE800EFE3A6 /* CCSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68118F57BE800EFE3A6 /* CCSet.h */; }; - 1A01C69B18F57BE800EFE3A6 /* CCSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68118F57BE800EFE3A6 /* CCSet.h */; }; - 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68218F57BE800EFE3A6 /* CCString.cpp */; }; - 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68218F57BE800EFE3A6 /* CCString.cpp */; }; - 1A01C69E18F57BE800EFE3A6 /* CCString.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68318F57BE800EFE3A6 /* CCString.h */; }; - 1A01C69F18F57BE800EFE3A6 /* CCString.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68318F57BE800EFE3A6 /* CCString.h */; }; - 1A01C6A418F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C6A218F58F7500EFE3A6 /* CCNotificationCenter.cpp */; }; - 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C6A218F58F7500EFE3A6 /* CCNotificationCenter.cpp */; }; - 1A01C6A618F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C6A318F58F7500EFE3A6 /* CCNotificationCenter.h */; }; - 1A01C6A718F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C6A318F58F7500EFE3A6 /* CCNotificationCenter.h */; }; 1A087AE81860400400196EF5 /* edtaa3func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A087AE61860400400196EF5 /* edtaa3func.cpp */; }; 1A087AE91860400400196EF5 /* edtaa3func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A087AE61860400400196EF5 /* edtaa3func.cpp */; }; 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A087AE71860400400196EF5 /* edtaa3func.h */; }; @@ -901,18 +249,10 @@ 1A57009F180BC5D20088DEC7 /* CCNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57009C180BC5D20088DEC7 /* CCNode.cpp */; }; 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57009D180BC5D20088DEC7 /* CCNode.h */; }; 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57009D180BC5D20088DEC7 /* CCNode.h */; }; - 1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010A180BC8ED0088DEC7 /* CCDrawingPrimitives.cpp */; }; - 1A57010F180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010A180BC8ED0088DEC7 /* CCDrawingPrimitives.cpp */; }; - 1A570110180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010B180BC8EE0088DEC7 /* CCDrawingPrimitives.h */; }; - 1A570111180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010B180BC8EE0088DEC7 /* CCDrawingPrimitives.h */; }; 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010C180BC8EE0088DEC7 /* CCDrawNode.cpp */; }; 1A570113180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010C180BC8EE0088DEC7 /* CCDrawNode.cpp */; }; 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010D180BC8EE0088DEC7 /* CCDrawNode.h */; }; 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010D180BC8EE0088DEC7 /* CCDrawNode.h */; }; - 1A57011B180BC90D0088DEC7 /* CCGrabber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570117180BC90D0088DEC7 /* CCGrabber.cpp */; }; - 1A57011C180BC90D0088DEC7 /* CCGrabber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570117180BC90D0088DEC7 /* CCGrabber.cpp */; }; - 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570118180BC90D0088DEC7 /* CCGrabber.h */; }; - 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570118180BC90D0088DEC7 /* CCGrabber.h */; }; 1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570119180BC90D0088DEC7 /* CCGrid.cpp */; }; 1A570120180BC90D0088DEC7 /* CCGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570119180BC90D0088DEC7 /* CCGrid.cpp */; }; 1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57011A180BC90D0088DEC7 /* CCGrid.h */; }; @@ -945,18 +285,10 @@ 1A5701BE180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570192180BCB590088DEC7 /* CCLabelAtlas.cpp */; }; 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570193180BCB590088DEC7 /* CCLabelAtlas.h */; }; 1A5701C0180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570193180BCB590088DEC7 /* CCLabelAtlas.h */; }; - 1A5701C1180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570194180BCB590088DEC7 /* CCLabelBMFont.cpp */; }; - 1A5701C2180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570194180BCB590088DEC7 /* CCLabelBMFont.cpp */; }; - 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570195180BCB590088DEC7 /* CCLabelBMFont.h */; }; - 1A5701C4180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570195180BCB590088DEC7 /* CCLabelBMFont.h */; }; 1A5701C7180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570197180BCB590088DEC7 /* CCLabelTextFormatter.cpp */; }; 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570197180BCB590088DEC7 /* CCLabelTextFormatter.cpp */; }; 1A5701C9180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570198180BCB590088DEC7 /* CCLabelTextFormatter.h */; }; 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570198180BCB590088DEC7 /* CCLabelTextFormatter.h */; }; - 1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570199180BCB590088DEC7 /* CCLabelTTF.cpp */; }; - 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570199180BCB590088DEC7 /* CCLabelTTF.cpp */; }; - 1A5701CD180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57019A180BCB590088DEC7 /* CCLabelTTF.h */; }; - 1A5701CE180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57019A180BCB590088DEC7 /* CCLabelTTF.h */; }; 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701D4180BCB8C0088DEC7 /* CCLayer.cpp */; }; 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701D4180BCB8C0088DEC7 /* CCLayer.cpp */; }; 1A5701E0180BCB8C0088DEC7 /* CCLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701D5180BCB8C0088DEC7 /* CCLayer.h */; }; @@ -1103,14 +435,6 @@ 1A5FB7C41DF012D900C918C1 /* AudioMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5FB7C31DF012D900C918C1 /* AudioMacros.h */; }; 1A5FB7C51DF012D900C918C1 /* AudioMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5FB7C31DF012D900C918C1 /* AudioMacros.h */; }; 1A5FB7C61DF012D900C918C1 /* AudioMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5FB7C31DF012D900C918C1 /* AudioMacros.h */; }; - 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */; }; - 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */; }; - 1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9DCA03180E6955007A3AD4 /* CCGLBufferedNode.h */; }; - 1A9DCA2A180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9DCA03180E6955007A3AD4 /* CCGLBufferedNode.h */; }; - 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */; }; - 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */; }; - 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF584D180E40B9000584C8 /* LocalStorage.h */; }; - 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF584D180E40B9000584C8 /* LocalStorage.h */; }; 1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */; }; 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */; }; 1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; @@ -1123,64 +447,10 @@ 291901441B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */; }; 291901451B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */; }; 291901461B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */; }; - 291A09241C5F06A60068C1D2 /* CCUIEditBoxMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 291A09221C5F06A60068C1D2 /* CCUIEditBoxMac.h */; }; - 291A09251C5F06A60068C1D2 /* CCUIEditBoxMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 291A09231C5F06A60068C1D2 /* CCUIEditBoxMac.mm */; }; - 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; - 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; - 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; - 292DB14019B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; - 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; - 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; - 292DB14319B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */; }; - 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */; }; - 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */; }; - 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */; }; - 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */; }; - 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */; }; - 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */; }; - 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */; }; - 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */; }; - 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */; }; - 292DB14D19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */; }; - 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */; }; - 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */; }; - 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */; }; - 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; - 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; - 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; - 292DB16219B461CA00A80320 /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; - 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; - 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; - 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; - 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; - 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */; }; - 29394CF519B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */; }; - 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */; }; - 29394CF719B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */; }; 294D7D941D0E67B4002CE7B7 /* CCDevice-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 294D7D921D0E67B4002CE7B7 /* CCDevice-apple.mm */; }; 294D7D951D0E67B4002CE7B7 /* CCDevice-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 294D7D921D0E67B4002CE7B7 /* CCDevice-apple.mm */; }; 294D7D961D0E67B4002CE7B7 /* CCDevice-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 294D7D931D0E67B4002CE7B7 /* CCDevice-apple.h */; }; 294D7D971D0E67B4002CE7B7 /* CCDevice-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 294D7D931D0E67B4002CE7B7 /* CCDevice-apple.h */; }; - 2962D5E81C61CBF9004821A3 /* CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2962D5E71C61CBF9004821A3 /* CCUITextInput.h */; }; - 2962D5EF1C61CF3F004821A3 /* CCUISingleLineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2962D5ED1C61CF3F004821A3 /* CCUISingleLineTextField.h */; }; - 2962D5F01C61CF3F004821A3 /* CCUISingleLineTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 2962D5EE1C61CF3F004821A3 /* CCUISingleLineTextField.m */; }; - 2962D5F71C61DBBF004821A3 /* CCUIPasswordTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2962D5F51C61DBBF004821A3 /* CCUIPasswordTextField.h */; }; - 2962D5F81C61DBBF004821A3 /* CCUIPasswordTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 2962D5F61C61DBBF004821A3 /* CCUIPasswordTextField.m */; }; - 2962D5FF1C61DF1A004821A3 /* CCUIMultilineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2962D5FD1C61DF1A004821A3 /* CCUIMultilineTextField.h */; }; - 2962D6001C61DF1A004821A3 /* CCUIMultilineTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 2962D5FE1C61DF1A004821A3 /* CCUIMultilineTextField.m */; }; - 2962D6031C61F02E004821A3 /* CCUITextFieldFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2962D6011C61F02E004821A3 /* CCUITextFieldFormatter.h */; }; - 2962D6041C61F02E004821A3 /* CCUITextFieldFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2962D6021C61F02E004821A3 /* CCUITextFieldFormatter.m */; }; - 2980F0221BA9A5550059E678 /* CCUIEditBoxIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0171BA9A5550059E678 /* CCUIEditBoxIOS.h */; }; - 2980F0231BA9A5550059E678 /* CCUIEditBoxIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F0181BA9A5550059E678 /* CCUIEditBoxIOS.mm */; }; - 2980F0241BA9A5550059E678 /* CCUIMultilineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0191BA9A5550059E678 /* CCUIMultilineTextField.h */; }; - 2980F0251BA9A5550059E678 /* CCUIMultilineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01A1BA9A5550059E678 /* CCUIMultilineTextField.mm */; }; - 2980F0261BA9A5550059E678 /* CCUISingleLineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01B1BA9A5550059E678 /* CCUISingleLineTextField.h */; }; - 2980F0271BA9A5550059E678 /* CCUISingleLineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01C1BA9A5550059E678 /* CCUISingleLineTextField.mm */; }; - 2980F0281BA9A5550059E678 /* CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01D1BA9A5550059E678 /* CCUITextInput.h */; }; - 2980F0291BA9A5550059E678 /* UITextField+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01E1BA9A5550059E678 /* UITextField+CCUITextInput.h */; }; - 2980F02A1BA9A5550059E678 /* UITextField+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01F1BA9A5550059E678 /* UITextField+CCUITextInput.mm */; }; - 2980F02B1BA9A5550059E678 /* UITextView+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0201BA9A5550059E678 /* UITextView+CCUITextInput.h */; }; - 2980F02C1BA9A5550059E678 /* UITextView+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F0211BA9A5550059E678 /* UITextView+CCUITextInput.mm */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; 298C75D51C0465D0006BAE63 /* CCStencilStateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298C75D31C0465D0006BAE63 /* CCStencilStateManager.cpp */; }; 298C75D61C0465D1006BAE63 /* CCStencilStateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298C75D31C0465D0006BAE63 /* CCStencilStateManager.cpp */; }; @@ -1192,76 +462,6 @@ 299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299CF1F919A434BC00C378C1 /* ccRandom.cpp */; }; 299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; }; 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; }; - 29DA08F41C63351600F4052B /* UIEditBoxImpl-linux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29DA08F01C63351600F4052B /* UIEditBoxImpl-linux.cpp */; }; - 29DA08F51C63351600F4052B /* UIEditBoxImpl-linux.h in Headers */ = {isa = PBXBuildFile; fileRef = 29DA08F11C63351600F4052B /* UIEditBoxImpl-linux.h */; }; - 29DA08F61C63351600F4052B /* UIEditBoxImpl-winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29DA08F21C63351600F4052B /* UIEditBoxImpl-winrt.cpp */; }; - 29DA08F71C63351600F4052B /* UIEditBoxImpl-winrt.h in Headers */ = {isa = PBXBuildFile; fileRef = 29DA08F31C63351600F4052B /* UIEditBoxImpl-winrt.h */; }; - 382384031A259005002C4610 /* CSParseBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384021A259005002C4610 /* CSParseBinary_generated.h */; }; - 382384041A259005002C4610 /* CSParseBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384021A259005002C4610 /* CSParseBinary_generated.h */; }; - 382384071A25900F002C4610 /* FlatBuffersSerialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384051A25900F002C4610 /* FlatBuffersSerialize.cpp */; }; - 382384081A25900F002C4610 /* FlatBuffersSerialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384051A25900F002C4610 /* FlatBuffersSerialize.cpp */; }; - 382384091A25900F002C4610 /* FlatBuffersSerialize.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384061A25900F002C4610 /* FlatBuffersSerialize.h */; }; - 3823840A1A25900F002C4610 /* FlatBuffersSerialize.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384061A25900F002C4610 /* FlatBuffersSerialize.h */; }; - 3823840F1A259092002C4610 /* NodeReaderDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840B1A259092002C4610 /* NodeReaderDefine.cpp */; }; - 382384101A259092002C4610 /* NodeReaderDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840B1A259092002C4610 /* NodeReaderDefine.cpp */; }; - 382384111A259092002C4610 /* NodeReaderDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840C1A259092002C4610 /* NodeReaderDefine.h */; }; - 382384121A259092002C4610 /* NodeReaderDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840C1A259092002C4610 /* NodeReaderDefine.h */; }; - 382384131A259092002C4610 /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840D1A259092002C4610 /* NodeReaderProtocol.cpp */; }; - 382384141A259092002C4610 /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840D1A259092002C4610 /* NodeReaderProtocol.cpp */; }; - 382384151A259092002C4610 /* NodeReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840E1A259092002C4610 /* NodeReaderProtocol.h */; }; - 382384161A259092002C4610 /* NodeReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840E1A259092002C4610 /* NodeReaderProtocol.h */; }; - 3823841A1A2590D2002C4610 /* ComAudioReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384181A2590D2002C4610 /* ComAudioReader.cpp */; }; - 3823841B1A2590D2002C4610 /* ComAudioReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384181A2590D2002C4610 /* ComAudioReader.cpp */; }; - 3823841C1A2590D2002C4610 /* ComAudioReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384191A2590D2002C4610 /* ComAudioReader.h */; }; - 3823841D1A2590D2002C4610 /* ComAudioReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384191A2590D2002C4610 /* ComAudioReader.h */; }; - 382384211A2590DA002C4610 /* GameMapReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823841F1A2590DA002C4610 /* GameMapReader.cpp */; }; - 382384221A2590DA002C4610 /* GameMapReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823841F1A2590DA002C4610 /* GameMapReader.cpp */; }; - 382384231A2590DA002C4610 /* GameMapReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384201A2590DA002C4610 /* GameMapReader.h */; }; - 382384241A2590DA002C4610 /* GameMapReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384201A2590DA002C4610 /* GameMapReader.h */; }; - 382384281A2590F9002C4610 /* NodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384261A2590F9002C4610 /* NodeReader.cpp */; }; - 382384291A2590F9002C4610 /* NodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384261A2590F9002C4610 /* NodeReader.cpp */; }; - 3823842A1A2590F9002C4610 /* NodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384271A2590F9002C4610 /* NodeReader.h */; }; - 3823842B1A2590F9002C4610 /* NodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384271A2590F9002C4610 /* NodeReader.h */; }; - 3823842F1A259112002C4610 /* ParticleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823842D1A259112002C4610 /* ParticleReader.cpp */; }; - 382384301A259112002C4610 /* ParticleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823842D1A259112002C4610 /* ParticleReader.cpp */; }; - 382384311A259112002C4610 /* ParticleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823842E1A259112002C4610 /* ParticleReader.h */; }; - 382384321A259112002C4610 /* ParticleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823842E1A259112002C4610 /* ParticleReader.h */; }; - 382384361A259126002C4610 /* ProjectNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384341A259126002C4610 /* ProjectNodeReader.cpp */; }; - 382384371A259126002C4610 /* ProjectNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384341A259126002C4610 /* ProjectNodeReader.cpp */; }; - 382384381A259126002C4610 /* ProjectNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384351A259126002C4610 /* ProjectNodeReader.h */; }; - 382384391A259126002C4610 /* ProjectNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384351A259126002C4610 /* ProjectNodeReader.h */; }; - 3823843D1A259140002C4610 /* SingleNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823843B1A259140002C4610 /* SingleNodeReader.cpp */; }; - 3823843E1A259140002C4610 /* SingleNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823843B1A259140002C4610 /* SingleNodeReader.cpp */; }; - 3823843F1A259140002C4610 /* SingleNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823843C1A259140002C4610 /* SingleNodeReader.h */; }; - 382384401A259140002C4610 /* SingleNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823843C1A259140002C4610 /* SingleNodeReader.h */; }; - 382384441A25915C002C4610 /* SpriteReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384421A25915C002C4610 /* SpriteReader.cpp */; }; - 382384451A25915C002C4610 /* SpriteReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384421A25915C002C4610 /* SpriteReader.cpp */; }; - 382384461A25915C002C4610 /* SpriteReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384431A25915C002C4610 /* SpriteReader.h */; }; - 382384471A25915C002C4610 /* SpriteReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384431A25915C002C4610 /* SpriteReader.h */; }; - 38ACD1FC1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38ACD1FA1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp */; }; - 38ACD1FD1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38ACD1FA1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp */; }; - 38ACD1FE1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 38ACD1FB1A27111900C3093D /* WidgetCallBackHandlerProtocol.h */; }; - 38ACD1FF1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 38ACD1FB1A27111900C3093D /* WidgetCallBackHandlerProtocol.h */; }; - 38B8E2D519E66581002D7CE7 /* CSLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2D319E66581002D7CE7 /* CSLoader.cpp */; }; - 38B8E2D619E66581002D7CE7 /* CSLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2D319E66581002D7CE7 /* CSLoader.cpp */; }; - 38B8E2D719E66581002D7CE7 /* CSLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2D419E66581002D7CE7 /* CSLoader.h */; }; - 38B8E2D819E66581002D7CE7 /* CSLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2D419E66581002D7CE7 /* CSLoader.h */; }; - 38B8E2E119E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2DF19E671D2002D7CE7 /* UILayoutComponent.cpp */; }; - 38B8E2E219E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2DF19E671D2002D7CE7 /* UILayoutComponent.cpp */; }; - 38B8E2E319E671D2002D7CE7 /* UILayoutComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2E019E671D2002D7CE7 /* UILayoutComponent.h */; }; - 38B8E2E419E671D2002D7CE7 /* UILayoutComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2E019E671D2002D7CE7 /* UILayoutComponent.h */; }; - 38D9629D1ACA9721007C6FAF /* CocoStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38D9629C1ACA9721007C6FAF /* CocoStudio.cpp */; }; - 38D9629E1ACA9721007C6FAF /* CocoStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38D9629C1ACA9721007C6FAF /* CocoStudio.cpp */; }; - 38F5263E1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */; }; - 38F5263F1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */; }; - 38F526401A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */; }; - 38F526411A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */; }; - 38F526421A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */; }; - 38F526431A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */; }; - 3E2A09C21BAA91B70086B878 /* CCMotionStreak3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */; }; - 3E2A09C31BAA91B70086B878 /* CCMotionStreak3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */; }; - 3E2A09C41BAA91B70086B878 /* CCMotionStreak3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */; }; - 3E2A09C51BAA91B70086B878 /* CCMotionStreak3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */; }; 3E2BDADE19C030ED0055CDCD /* AudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDADD19C030ED0055CDCD /* AudioEngine.h */; }; 3E2BDAEC19C0436F0055CDCD /* AudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */; }; 3E2F27A619CFBFE100E7C490 /* AudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */; }; @@ -1282,18 +482,268 @@ 3EACC9A519F5014D00EB3C5E /* CCLight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EACC99E19F5014D00EB3C5E /* CCLight.cpp */; }; 3EACC9A619F5014D00EB3C5E /* CCLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EACC99F19F5014D00EB3C5E /* CCLight.h */; }; 3EACC9A719F5014D00EB3C5E /* CCLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EACC99F19F5014D00EB3C5E /* CCLight.h */; }; - 43015DBF1B60DF4000E75161 /* CCComExtensionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43015DBD1B60DF4000E75161 /* CCComExtensionData.cpp */; }; - 43015DC01B60DF4000E75161 /* CCComExtensionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43015DBD1B60DF4000E75161 /* CCComExtensionData.cpp */; }; - 43015DC11B60DF4000E75161 /* CCComExtensionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 43015DBE1B60DF4000E75161 /* CCComExtensionData.h */; }; - 43015DC21B60DF4000E75161 /* CCComExtensionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 43015DBE1B60DF4000E75161 /* CCComExtensionData.h */; }; + 40FE104721F070640061C04F /* CCControlHuePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103021F070640061C04F /* CCControlHuePicker.h */; }; + 40FE104821F070640061C04F /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103121F070640061C04F /* CCControlUtils.cpp */; }; + 40FE104921F070640061C04F /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103221F070640061C04F /* CCControlColourPicker.cpp */; }; + 40FE104A21F070640061C04F /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103321F070640061C04F /* CCControlSwitch.cpp */; }; + 40FE104B21F070640061C04F /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103421F070640061C04F /* CCControlUtils.h */; }; + 40FE104C21F070640061C04F /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103521F070640061C04F /* CCInvocation.cpp */; }; + 40FE104D21F070640061C04F /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103621F070640061C04F /* CCControlStepper.cpp */; }; + 40FE104E21F070640061C04F /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103721F070640061C04F /* CCControl.cpp */; }; + 40FE104F21F070640061C04F /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103821F070640061C04F /* CCControlButton.cpp */; }; + 40FE105021F070640061C04F /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103921F070640061C04F /* CCControlPotentiometer.cpp */; }; + 40FE105121F070640061C04F /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103A21F070640061C04F /* CCControl.h */; }; + 40FE105221F070640061C04F /* CCControlExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103B21F070640061C04F /* CCControlExtensions.h */; }; + 40FE105321F070640061C04F /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103C21F070640061C04F /* CCControlHuePicker.cpp */; }; + 40FE105421F070640061C04F /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103D21F070640061C04F /* CCControlColourPicker.h */; }; + 40FE105521F070640061C04F /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103E21F070640061C04F /* CCControlSaturationBrightnessPicker.cpp */; }; + 40FE105621F070640061C04F /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103F21F070640061C04F /* CCControlButton.h */; }; + 40FE105721F070640061C04F /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104021F070640061C04F /* CCInvocation.h */; }; + 40FE105821F070640061C04F /* CCControlSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104121F070640061C04F /* CCControlSlider.h */; }; + 40FE105921F070640061C04F /* CCControlStepper.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104221F070640061C04F /* CCControlStepper.h */; }; + 40FE105A21F070640061C04F /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE104321F070640061C04F /* CCControlSlider.cpp */; }; + 40FE105B21F070640061C04F /* CCControlSaturationBrightnessPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104421F070640061C04F /* CCControlSaturationBrightnessPicker.h */; }; + 40FE105C21F070640061C04F /* CCControlPotentiometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104521F070640061C04F /* CCControlPotentiometer.h */; }; + 40FE105D21F070640061C04F /* CCControlSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104621F070640061C04F /* CCControlSwitch.h */; }; + 40FE105E21F073BF0061C04F /* CCControlHuePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103021F070640061C04F /* CCControlHuePicker.h */; }; + 40FE105F21F073BF0061C04F /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103121F070640061C04F /* CCControlUtils.cpp */; }; + 40FE106021F073BF0061C04F /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103221F070640061C04F /* CCControlColourPicker.cpp */; }; + 40FE106121F073BF0061C04F /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103321F070640061C04F /* CCControlSwitch.cpp */; }; + 40FE106221F073BF0061C04F /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103421F070640061C04F /* CCControlUtils.h */; }; + 40FE106321F073BF0061C04F /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103521F070640061C04F /* CCInvocation.cpp */; }; + 40FE106421F073BF0061C04F /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103621F070640061C04F /* CCControlStepper.cpp */; }; + 40FE106521F073BF0061C04F /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103721F070640061C04F /* CCControl.cpp */; }; + 40FE106621F073BF0061C04F /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103821F070640061C04F /* CCControlButton.cpp */; }; + 40FE106721F073BF0061C04F /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103921F070640061C04F /* CCControlPotentiometer.cpp */; }; + 40FE106821F073BF0061C04F /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103A21F070640061C04F /* CCControl.h */; }; + 40FE106921F073BF0061C04F /* CCControlExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103B21F070640061C04F /* CCControlExtensions.h */; }; + 40FE106A21F073BF0061C04F /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103C21F070640061C04F /* CCControlHuePicker.cpp */; }; + 40FE106B21F073BF0061C04F /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103D21F070640061C04F /* CCControlColourPicker.h */; }; + 40FE106C21F073BF0061C04F /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE103E21F070640061C04F /* CCControlSaturationBrightnessPicker.cpp */; }; + 40FE106D21F073BF0061C04F /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE103F21F070640061C04F /* CCControlButton.h */; }; + 40FE106E21F073BF0061C04F /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104021F070640061C04F /* CCInvocation.h */; }; + 40FE106F21F073BF0061C04F /* CCControlSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104121F070640061C04F /* CCControlSlider.h */; }; + 40FE107021F073BF0061C04F /* CCControlStepper.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104221F070640061C04F /* CCControlStepper.h */; }; + 40FE107121F073BF0061C04F /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FE104321F070640061C04F /* CCControlSlider.cpp */; }; + 40FE107221F073BF0061C04F /* CCControlSaturationBrightnessPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104421F070640061C04F /* CCControlSaturationBrightnessPicker.h */; }; + 40FE107321F073BF0061C04F /* CCControlPotentiometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104521F070640061C04F /* CCControlPotentiometer.h */; }; + 40FE107421F073BF0061C04F /* CCControlSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FE104621F070640061C04F /* CCControlSwitch.h */; }; + 460D4CD321A5666E0075726E /* CCRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CD121A5666E0075726E /* CCRenderer.h */; }; + 460D4CD421A5666E0075726E /* CCRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CD121A5666E0075726E /* CCRenderer.h */; }; + 460D4CD521A5666E0075726E /* CCRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CD221A5666E0075726E /* CCRenderer.cpp */; }; + 460D4CD621A5666E0075726E /* CCRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CD221A5666E0075726E /* CCRenderer.cpp */; }; + 460D4D0821ABD0C60075726E /* Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF421ABD0C60075726E /* Utils.h */; }; + 460D4D0921ABD0C60075726E /* DeviceMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF521ABD0C60075726E /* DeviceMTL.h */; }; + 460D4D0A21ABD0C60075726E /* Utils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF621ABD0C60075726E /* Utils.mm */; }; + 460D4D0B21ABD0C60075726E /* BufferMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF721ABD0C60075726E /* BufferMTL.mm */; }; + 460D4D0C21ABD0C60075726E /* ShaderModuleMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF821ABD0C60075726E /* ShaderModuleMTL.h */; }; + 460D4D0D21ABD0C60075726E /* BlendStateMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF921ABD0C60075726E /* BlendStateMTL.mm */; }; + 460D4D0E21ABD0C60075726E /* DepthStencilStateMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CFA21ABD0C60075726E /* DepthStencilStateMTL.mm */; }; + 460D4D0F21ABD0C60075726E /* BlendStateMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFB21ABD0C60075726E /* BlendStateMTL.h */; }; + 460D4D1021ABD0C60075726E /* DepthStencilStateMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFC21ABD0C60075726E /* DepthStencilStateMTL.h */; }; + 460D4D1121ABD0C60075726E /* ShaderModuleMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CFD21ABD0C60075726E /* ShaderModuleMTL.mm */; }; + 460D4D1221ABD0C60075726E /* BufferMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFE21ABD0C60075726E /* BufferMTL.h */; }; + 460D4D1321ABD0C60075726E /* CommandBufferMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFF21ABD0C60075726E /* CommandBufferMTL.h */; }; + 460D4D1421ABD0C60075726E /* DeviceMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0021ABD0C60075726E /* DeviceMTL.mm */; }; + 460D4D1521ABD0C60075726E /* TextureMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0121ABD0C60075726E /* TextureMTL.mm */; }; + 460D4D1621ABD0C60075726E /* TextureMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4D0221ABD0C60075726E /* TextureMTL.h */; }; + 460D4D1821ABD0C60075726E /* CommandBufferMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0421ABD0C60075726E /* CommandBufferMTL.mm */; }; + 460D4D1921ABD0C60075726E /* RenderPipelineMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4D0521ABD0C60075726E /* RenderPipelineMTL.h */; }; + 460D4D1B21ABD0C60075726E /* RenderPipelineMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0721ABD0C60075726E /* RenderPipelineMTL.mm */; }; + 461C204F21A5304A00F3BD47 /* CCPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 461C204C21A5304A00F3BD47 /* CCPipelineDescriptor.h */; }; + 461C205021A5304A00F3BD47 /* CCPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 461C204C21A5304A00F3BD47 /* CCPipelineDescriptor.h */; }; + 461FE08421C34EEB00E5378F /* CCEnumClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 461FE08321C34EEB00E5378F /* CCEnumClass.h */; }; + 461FE08521C34EEB00E5378F /* CCEnumClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 461FE08321C34EEB00E5378F /* CCEnumClass.h */; }; + 461FE09021CA129B00E5378F /* CCCallbackCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 461FE08E21CA129B00E5378F /* CCCallbackCommand.cpp */; }; + 461FE09121CA129B00E5378F /* CCCallbackCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 461FE08E21CA129B00E5378F /* CCCallbackCommand.cpp */; }; + 461FE09221CA129B00E5378F /* CCCallbackCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 461FE08F21CA129B00E5378F /* CCCallbackCommand.h */; }; + 461FE09321CA129B00E5378F /* CCCallbackCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 461FE08F21CA129B00E5378F /* CCCallbackCommand.h */; }; 46270FA41E1CC6A200AAA098 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46270FA21E1CC6A100AAA098 /* libcrypto.a */; }; 46270FA51E1CC6A200AAA098 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46270FA31E1CC6A100AAA098 /* libssl.a */; }; 46270FA81E1CC84500AAA098 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46270FA61E1CC84500AAA098 /* libcrypto.a */; }; 46270FA91E1CC84500AAA098 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46270FA71E1CC84500AAA098 /* libssl.a */; }; + 462CBDDB21D46525005712AB /* libglsl_optimizer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 462CBDD821D46525005712AB /* libglsl_optimizer.a */; }; + 462CBDDC21D46525005712AB /* libmesa.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 462CBDD921D46525005712AB /* libmesa.a */; }; + 462CBDDD21D46525005712AB /* libglcpp-library.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 462CBDDA21D46525005712AB /* libglcpp-library.a */; }; + 4631CB0D21AFD9F90000D408 /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9121AFD9F90000D408 /* UIWidget.cpp */; }; + 4631CB0E21AFD9F90000D408 /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9121AFD9F90000D408 /* UIWidget.cpp */; }; + 4631CB0F21AFD9F90000D408 /* UIRadioButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9221AFD9F90000D408 /* UIRadioButton.h */; }; + 4631CB1021AFD9F90000D408 /* UIRadioButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9221AFD9F90000D408 /* UIRadioButton.h */; }; + 4631CB1321AFD9F90000D408 /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9421AFD9F90000D408 /* UIVideoPlayer-ios.mm */; }; + 4631CB1421AFD9F90000D408 /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9421AFD9F90000D408 /* UIVideoPlayer-ios.mm */; }; + 4631CB1521AFD9F90000D408 /* UITextAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9521AFD9F90000D408 /* UITextAtlas.h */; }; + 4631CB1621AFD9F90000D408 /* UITextAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9521AFD9F90000D408 /* UITextAtlas.h */; }; + 4631CB1721AFD9F90000D408 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9621AFD9F90000D408 /* UIVideoPlayer.h */; }; + 4631CB1821AFD9F90000D408 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9621AFD9F90000D408 /* UIVideoPlayer.h */; }; + 4631CB1B21AFD9F90000D408 /* UILayoutComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9821AFD9F90000D408 /* UILayoutComponent.h */; }; + 4631CB1C21AFD9F90000D408 /* UILayoutComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9821AFD9F90000D408 /* UILayoutComponent.h */; }; + 4631CB1D21AFD9F90000D408 /* UIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9921AFD9F90000D408 /* UIButton.cpp */; }; + 4631CB1E21AFD9F90000D408 /* UIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9921AFD9F90000D408 /* UIButton.cpp */; }; + 4631CB1F21AFD9F90000D408 /* UIPageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9A21AFD9F90000D408 /* UIPageView.cpp */; }; + 4631CB2021AFD9F90000D408 /* UIPageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9A21AFD9F90000D408 /* UIPageView.cpp */; }; + 4631CB2121AFD9F90000D408 /* UITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9D21AFD9F90000D408 /* UITabControl.h */; }; + 4631CB2221AFD9F90000D408 /* UITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CA9D21AFD9F90000D408 /* UITabControl.h */; }; + 4631CB2321AFD9F90000D408 /* UIVBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9E21AFD9F90000D408 /* UIVBox.cpp */; }; + 4631CB2421AFD9F90000D408 /* UIVBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9E21AFD9F90000D408 /* UIVBox.cpp */; }; + 4631CB2521AFD9F90000D408 /* UIAbstractCheckButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9F21AFD9F90000D408 /* UIAbstractCheckButton.cpp */; }; + 4631CB2621AFD9F90000D408 /* UIAbstractCheckButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CA9F21AFD9F90000D408 /* UIAbstractCheckButton.cpp */; }; + 4631CB2721AFD9F90000D408 /* UICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA021AFD9F90000D408 /* UICheckBox.cpp */; }; + 4631CB2821AFD9F90000D408 /* UICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA021AFD9F90000D408 /* UICheckBox.cpp */; }; + 4631CB2921AFD9F90000D408 /* UITextAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA121AFD9F90000D408 /* UITextAtlas.cpp */; }; + 4631CB2A21AFD9F90000D408 /* UITextAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA121AFD9F90000D408 /* UITextAtlas.cpp */; }; + 4631CB2B21AFD9F90000D408 /* UIVideoPlayer-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA221AFD9F90000D408 /* UIVideoPlayer-android.cpp */; }; + 4631CB2C21AFD9F90000D408 /* UIVideoPlayer-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA221AFD9F90000D408 /* UIVideoPlayer-android.cpp */; }; + 4631CB2D21AFD9F90000D408 /* UIScrollViewBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAA321AFD9F90000D408 /* UIScrollViewBar.h */; }; + 4631CB2E21AFD9F90000D408 /* UIScrollViewBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAA321AFD9F90000D408 /* UIScrollViewBar.h */; }; + 4631CB2F21AFD9F90000D408 /* UIText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA421AFD9F90000D408 /* UIText.cpp */; }; + 4631CB3021AFD9F90000D408 /* UIText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA421AFD9F90000D408 /* UIText.cpp */; }; + 4631CB3121AFD9F90000D408 /* UIEditBoxImpl-common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA621AFD9F90000D408 /* UIEditBoxImpl-common.cpp */; }; + 4631CB3221AFD9F90000D408 /* UIEditBoxImpl-common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAA621AFD9F90000D408 /* UIEditBoxImpl-common.cpp */; }; + 4631CB3321AFD9F90000D408 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAA721AFD9F90000D408 /* UIEditBox.h */; }; + 4631CB3421AFD9F90000D408 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAA721AFD9F90000D408 /* UIEditBox.h */; }; + 4631CB3B21AFD9F90000D408 /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAAB21AFD9F90000D408 /* UIEditBoxImpl-mac.mm */; }; + 4631CB3F21AFD9F90000D408 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAAD21AFD9F90000D408 /* UIEditBoxImpl-mac.h */; }; + 4631CB4021AFD9F90000D408 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAAD21AFD9F90000D408 /* UIEditBoxImpl-mac.h */; }; + 4631CB4321AFD9F90000D408 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAAF21AFD9F90000D408 /* UIEditBoxImpl-stub.cpp */; }; + 4631CB4421AFD9F90000D408 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAAF21AFD9F90000D408 /* UIEditBoxImpl-stub.cpp */; }; + 4631CB4921AFD9F90000D408 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAB221AFD9F90000D408 /* UIEditBox.cpp */; }; + 4631CB4A21AFD9F90000D408 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAB221AFD9F90000D408 /* UIEditBox.cpp */; }; + 4631CB4C21AFD9F90000D408 /* CCUIEditBoxIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAB421AFD9F90000D408 /* CCUIEditBoxIOS.h */; }; + 4631CB4E21AFD9F90000D408 /* CCUIEditBoxIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAB521AFD9F90000D408 /* CCUIEditBoxIOS.mm */; }; + 4631CB5021AFD9F90000D408 /* CCUIMultilineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAB621AFD9F90000D408 /* CCUIMultilineTextField.h */; }; + 4631CB5221AFD9F90000D408 /* UITextView+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAB721AFD9F90000D408 /* UITextView+CCUITextInput.mm */; }; + 4631CB5421AFD9F90000D408 /* CCUISingleLineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAB821AFD9F90000D408 /* CCUISingleLineTextField.mm */; }; + 4631CB5621AFD9F90000D408 /* CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAB921AFD9F90000D408 /* CCUITextInput.h */; }; + 4631CB5821AFD9F90000D408 /* UITextView+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CABA21AFD9F90000D408 /* UITextView+CCUITextInput.h */; }; + 4631CB5A21AFD9F90000D408 /* CCUIMultilineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CABB21AFD9F90000D408 /* CCUIMultilineTextField.mm */; }; + 4631CB5C21AFD9F90000D408 /* UITextField+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CABC21AFD9F90000D408 /* UITextField+CCUITextInput.mm */; }; + 4631CB5E21AFD9F90000D408 /* UITextField+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CABD21AFD9F90000D408 /* UITextField+CCUITextInput.h */; }; + 4631CB6021AFD9F90000D408 /* CCUISingleLineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CABE21AFD9F90000D408 /* CCUISingleLineTextField.h */; }; + 4631CB6121AFD9F90000D408 /* CCUITextFieldFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAC021AFD9F90000D408 /* CCUITextFieldFormatter.m */; }; + 4631CB6321AFD9F90000D408 /* CCUIPasswordTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC121AFD9F90000D408 /* CCUIPasswordTextField.h */; }; + 4631CB6521AFD9F90000D408 /* CCUISingleLineTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAC221AFD9F90000D408 /* CCUISingleLineTextField.m */; }; + 4631CB6721AFD9F90000D408 /* CCUIMultilineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC321AFD9F90000D408 /* CCUIMultilineTextField.h */; }; + 4631CB6921AFD9F90000D408 /* CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC421AFD9F90000D408 /* CCUITextInput.h */; }; + 4631CB6B21AFD9F90000D408 /* CCUIEditBoxMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAC521AFD9F90000D408 /* CCUIEditBoxMac.mm */; }; + 4631CB6D21AFD9F90000D408 /* CCUIEditBoxMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC621AFD9F90000D408 /* CCUIEditBoxMac.h */; }; + 4631CB6F21AFD9F90000D408 /* CCUISingleLineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC721AFD9F90000D408 /* CCUISingleLineTextField.h */; }; + 4631CB7121AFD9F90000D408 /* CCUITextFieldFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAC821AFD9F90000D408 /* CCUITextFieldFormatter.h */; }; + 4631CB7321AFD9F90000D408 /* CCUIPasswordTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAC921AFD9F90000D408 /* CCUIPasswordTextField.m */; }; + 4631CB7521AFD9F90000D408 /* CCUIMultilineTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4631CACA21AFD9F90000D408 /* CCUIMultilineTextField.m */; }; + 4631CB7721AFD9F90000D408 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CACB21AFD9F90000D408 /* UIEditBoxImpl-ios.mm */; }; + 4631CB7821AFD9F90000D408 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4631CACB21AFD9F90000D408 /* UIEditBoxImpl-ios.mm */; }; + 4631CB7921AFD9F90000D408 /* UIEditBoxImpl-common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CACC21AFD9F90000D408 /* UIEditBoxImpl-common.h */; }; + 4631CB7A21AFD9F90000D408 /* UIEditBoxImpl-common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CACC21AFD9F90000D408 /* UIEditBoxImpl-common.h */; }; + 4631CB7D21AFD9F90000D408 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CACE21AFD9F90000D408 /* UIEditBoxImpl-ios.h */; }; + 4631CB7E21AFD9F90000D408 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CACE21AFD9F90000D408 /* UIEditBoxImpl-ios.h */; }; + 4631CB7F21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CACF21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp */; }; + 4631CB8021AFD9F90000D408 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CACF21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp */; }; + 4631CB8321AFD9F90000D408 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAD121AFD9F90000D408 /* UIEditBoxImpl.h */; }; + 4631CB8421AFD9F90000D408 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAD121AFD9F90000D408 /* UIEditBoxImpl.h */; }; + 4631CB8721AFD9F90000D408 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAD321AFD9F90000D408 /* UIWidget.h */; }; + 4631CB8821AFD9F90000D408 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAD321AFD9F90000D408 /* UIWidget.h */; }; + 4631CB8921AFD9F90000D408 /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD421AFD9F90000D408 /* CocosGUI.cpp */; }; + 4631CB8A21AFD9FA0000D408 /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD421AFD9F90000D408 /* CocosGUI.cpp */; }; + 4631CB8B21AFD9FA0000D408 /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD521AFD9F90000D408 /* UILayout.cpp */; }; + 4631CB8C21AFD9FA0000D408 /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD521AFD9F90000D408 /* UILayout.cpp */; }; + 4631CB8D21AFD9FA0000D408 /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD621AFD9F90000D408 /* UIScale9Sprite.cpp */; }; + 4631CB8E21AFD9FA0000D408 /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD621AFD9F90000D408 /* UIScale9Sprite.cpp */; }; + 4631CB9321AFD9FA0000D408 /* UIHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD921AFD9F90000D408 /* UIHelper.cpp */; }; + 4631CB9421AFD9FA0000D408 /* UIHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAD921AFD9F90000D408 /* UIHelper.cpp */; }; + 4631CB9521AFD9FA0000D408 /* UITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADA21AFD9F90000D408 /* UITextField.h */; }; + 4631CB9621AFD9FA0000D408 /* UITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADA21AFD9F90000D408 /* UITextField.h */; }; + 4631CB9721AFD9FA0000D408 /* UIPageViewIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CADB21AFD9F90000D408 /* UIPageViewIndicator.cpp */; }; + 4631CB9821AFD9FA0000D408 /* UIPageViewIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CADB21AFD9F90000D408 /* UIPageViewIndicator.cpp */; }; + 4631CB9921AFD9FA0000D408 /* UIRadioButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CADC21AFD9F90000D408 /* UIRadioButton.cpp */; }; + 4631CB9A21AFD9FA0000D408 /* UIRadioButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CADC21AFD9F90000D408 /* UIRadioButton.cpp */; }; + 4631CB9D21AFD9FA0000D408 /* UIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADE21AFD9F90000D408 /* UIScrollView.h */; }; + 4631CB9E21AFD9FA0000D408 /* UIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADE21AFD9F90000D408 /* UIScrollView.h */; }; + 4631CB9F21AFD9FA0000D408 /* UIRelativeBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADF21AFD9F90000D408 /* UIRelativeBox.h */; }; + 4631CBA021AFD9FA0000D408 /* UIRelativeBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CADF21AFD9F90000D408 /* UIRelativeBox.h */; }; + 4631CBA121AFD9FA0000D408 /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE021AFD9F90000D408 /* UIHBox.cpp */; }; + 4631CBA221AFD9FA0000D408 /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE021AFD9F90000D408 /* UIHBox.cpp */; }; + 4631CBA321AFD9FA0000D408 /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE121AFD9F90000D408 /* UIListView.cpp */; }; + 4631CBA421AFD9FA0000D408 /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE121AFD9F90000D408 /* UIListView.cpp */; }; + 4631CBA521AFD9FA0000D408 /* UITextBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE221AFD9F90000D408 /* UITextBMFont.h */; }; + 4631CBA621AFD9FA0000D408 /* UITextBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE221AFD9F90000D408 /* UITextBMFont.h */; }; + 4631CBA921AFD9FA0000D408 /* UIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE421AFD9F90000D408 /* UIHelper.h */; }; + 4631CBAA21AFD9FA0000D408 /* UIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE421AFD9F90000D408 /* UIHelper.h */; }; + 4631CBAB21AFD9FA0000D408 /* UICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE521AFD9F90000D408 /* UICheckBox.h */; }; + 4631CBAC21AFD9FA0000D408 /* UICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE521AFD9F90000D408 /* UICheckBox.h */; }; + 4631CBAD21AFD9FA0000D408 /* GUIDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE621AFD9F90000D408 /* GUIDefine.h */; }; + 4631CBAE21AFD9FA0000D408 /* GUIDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE621AFD9F90000D408 /* GUIDefine.h */; }; + 4631CBAF21AFD9FA0000D408 /* UIImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE721AFD9F90000D408 /* UIImageView.cpp */; }; + 4631CBB021AFD9FA0000D408 /* UIImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAE721AFD9F90000D408 /* UIImageView.cpp */; }; + 4631CBB121AFD9FA0000D408 /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE821AFD9F90000D408 /* UIListView.h */; }; + 4631CBB221AFD9FA0000D408 /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE821AFD9F90000D408 /* UIListView.h */; }; + 4631CBB321AFD9FA0000D408 /* UIVBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE921AFD9F90000D408 /* UIVBox.h */; }; + 4631CBB421AFD9FA0000D408 /* UIVBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAE921AFD9F90000D408 /* UIVBox.h */; }; + 4631CBB521AFD9FA0000D408 /* UITextBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEA21AFD9F90000D408 /* UITextBMFont.cpp */; }; + 4631CBB621AFD9FA0000D408 /* UITextBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEA21AFD9F90000D408 /* UITextBMFont.cpp */; }; + 4631CBB721AFD9FA0000D408 /* UITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEB21AFD9F90000D408 /* UITabControl.cpp */; }; + 4631CBB821AFD9FA0000D408 /* UITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEB21AFD9F90000D408 /* UITabControl.cpp */; }; + 4631CBB921AFD9FA0000D408 /* GUIExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAEC21AFD9F90000D408 /* GUIExport.h */; }; + 4631CBBA21AFD9FA0000D408 /* GUIExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAEC21AFD9F90000D408 /* GUIExport.h */; }; + 4631CBBB21AFD9FA0000D408 /* UIText.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAED21AFD9F90000D408 /* UIText.h */; }; + 4631CBBC21AFD9FA0000D408 /* UIText.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAED21AFD9F90000D408 /* UIText.h */; }; + 4631CBBD21AFD9FA0000D408 /* UILayoutManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEE21AFD9F90000D408 /* UILayoutManager.cpp */; }; + 4631CBBE21AFD9FA0000D408 /* UILayoutManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEE21AFD9F90000D408 /* UILayoutManager.cpp */; }; + 4631CBBF21AFD9FA0000D408 /* UITextField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEF21AFD9F90000D408 /* UITextField.cpp */; }; + 4631CBC021AFD9FA0000D408 /* UITextField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAEF21AFD9F90000D408 /* UITextField.cpp */; }; + 4631CBC121AFD9FA0000D408 /* UILayoutComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF021AFD9F90000D408 /* UILayoutComponent.cpp */; }; + 4631CBC221AFD9FA0000D408 /* UILayoutComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF021AFD9F90000D408 /* UILayoutComponent.cpp */; }; + 4631CBC321AFD9FA0000D408 /* UIScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF121AFD9F90000D408 /* UIScrollView.cpp */; }; + 4631CBC421AFD9FA0000D408 /* UIScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF121AFD9F90000D408 /* UIScrollView.cpp */; }; + 4631CBC521AFD9FA0000D408 /* UIImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF221AFD9F90000D408 /* UIImageView.h */; }; + 4631CBC621AFD9FA0000D408 /* UIImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF221AFD9F90000D408 /* UIImageView.h */; }; + 4631CBC721AFD9FA0000D408 /* UILayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF321AFD9F90000D408 /* UILayoutManager.h */; }; + 4631CBC821AFD9FA0000D408 /* UILayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF321AFD9F90000D408 /* UILayoutManager.h */; }; + 4631CBCB21AFD9FA0000D408 /* UIPageViewIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF521AFD9F90000D408 /* UIPageViewIndicator.h */; }; + 4631CBCC21AFD9FA0000D408 /* UIPageViewIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF521AFD9F90000D408 /* UIPageViewIndicator.h */; }; + 4631CBCD21AFD9FA0000D408 /* UIScrollViewBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF621AFD9F90000D408 /* UIScrollViewBar.cpp */; }; + 4631CBCE21AFD9FA0000D408 /* UIScrollViewBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF621AFD9F90000D408 /* UIScrollViewBar.cpp */; }; + 4631CBCF21AFD9FA0000D408 /* UILoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF721AFD9F90000D408 /* UILoadingBar.h */; }; + 4631CBD021AFD9FA0000D408 /* UILoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF721AFD9F90000D408 /* UILoadingBar.h */; }; + 4631CBD121AFD9FA0000D408 /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF821AFD9F90000D408 /* UIScale9Sprite.h */; }; + 4631CBD221AFD9FA0000D408 /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAF821AFD9F90000D408 /* UIScale9Sprite.h */; }; + 4631CBD321AFD9FA0000D408 /* UIRichText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF921AFD9F90000D408 /* UIRichText.cpp */; }; + 4631CBD421AFD9FA0000D408 /* UIRichText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAF921AFD9F90000D408 /* UIRichText.cpp */; }; + 4631CBD521AFD9FA0000D408 /* UIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFA21AFD9F90000D408 /* UIButton.h */; }; + 4631CBD621AFD9FA0000D408 /* UIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFA21AFD9F90000D408 /* UIButton.h */; }; + 4631CBD921AFD9FA0000D408 /* UIAbstractCheckButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFC21AFD9F90000D408 /* UIAbstractCheckButton.h */; }; + 4631CBDA21AFD9FA0000D408 /* UIAbstractCheckButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFC21AFD9F90000D408 /* UIAbstractCheckButton.h */; }; + 4631CBDB21AFD9FA0000D408 /* UILoadingBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAFD21AFD9F90000D408 /* UILoadingBar.cpp */; }; + 4631CBDC21AFD9FA0000D408 /* UILoadingBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAFD21AFD9F90000D408 /* UILoadingBar.cpp */; }; + 4631CBDD21AFD9FA0000D408 /* UILayoutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFE21AFD9F90000D408 /* UILayoutParameter.h */; }; + 4631CBDE21AFD9FA0000D408 /* UILayoutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CAFE21AFD9F90000D408 /* UILayoutParameter.h */; }; + 4631CBDF21AFD9FA0000D408 /* UILayoutParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAFF21AFD9F90000D408 /* UILayoutParameter.cpp */; }; + 4631CBE021AFD9FA0000D408 /* UILayoutParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CAFF21AFD9F90000D408 /* UILayoutParameter.cpp */; }; + 4631CBE321AFD9FA0000D408 /* UISlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CB0121AFD9F90000D408 /* UISlider.cpp */; }; + 4631CBE421AFD9FA0000D408 /* UISlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CB0121AFD9F90000D408 /* UISlider.cpp */; }; + 4631CBE521AFD9FA0000D408 /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CB0221AFD9F90000D408 /* UIRelativeBox.cpp */; }; + 4631CBE621AFD9FA0000D408 /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4631CB0221AFD9F90000D408 /* UIRelativeBox.cpp */; }; + 4631CBE721AFD9FA0000D408 /* UILayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0321AFD9F90000D408 /* UILayout.h */; }; + 4631CBE821AFD9FA0000D408 /* UILayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0321AFD9F90000D408 /* UILayout.h */; }; + 4631CBEB21AFD9FA0000D408 /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0521AFD9F90000D408 /* CocosGUI.h */; }; + 4631CBEC21AFD9FA0000D408 /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0521AFD9F90000D408 /* CocosGUI.h */; }; + 4631CBED21AFD9FA0000D408 /* UIPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0921AFD9F90000D408 /* UIPageView.h */; }; + 4631CBEE21AFD9FA0000D408 /* UIPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0921AFD9F90000D408 /* UIPageView.h */; }; + 4631CBEF21AFD9FA0000D408 /* UISlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0A21AFD9F90000D408 /* UISlider.h */; }; + 4631CBF021AFD9FA0000D408 /* UISlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0A21AFD9F90000D408 /* UISlider.h */; }; + 4631CBF121AFD9FA0000D408 /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0B21AFD9F90000D408 /* UIHBox.h */; }; + 4631CBF221AFD9FA0000D408 /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0B21AFD9F90000D408 /* UIHBox.h */; }; + 4631CBF321AFD9FA0000D408 /* UIRichText.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0C21AFD9F90000D408 /* UIRichText.h */; }; + 4631CBF421AFD9FA0000D408 /* UIRichText.h in Headers */ = {isa = PBXBuildFile; fileRef = 4631CB0C21AFD9F90000D408 /* UIRichText.h */; }; 464AD6E5197EBB1400E502D8 /* pvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 464AD6E3197EBB1400E502D8 /* pvr.cpp */; }; 464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 464AD6E3197EBB1400E502D8 /* pvr.cpp */; }; 464AD6E7197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; }; 464AD6E8197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; }; + 46535CD521ABD559005B5370 /* libglcpp-library.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CD221ABD559005B5370 /* libglcpp-library.a */; }; + 46535CD621ABD559005B5370 /* libmesa.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CD321ABD559005B5370 /* libmesa.a */; }; + 46535CD721ABD559005B5370 /* libglsl_optimizer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CD421ABD559005B5370 /* libglsl_optimizer.a */; }; + 46535CD921ABD63B005B5370 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CD821ABD63B005B5370 /* Metal.framework */; }; + 46535CDE21ABE8C0005B5370 /* CCGLViewImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46535CDC21ABE8C0005B5370 /* CCGLViewImpl-mac.h */; }; + 46535CDF21ABE8C0005B5370 /* CCGLViewImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46535CDD21ABE8C0005B5370 /* CCGLViewImpl-mac.mm */; }; 466F05251EF7659300B80080 /* libBulletCollision.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466F05201EF7659300B80080 /* libBulletCollision.a */; }; 466F05261EF7659300B80080 /* libBulletDynamics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466F05211EF7659300B80080 /* libBulletDynamics.a */; }; 466F05271EF7659300B80080 /* libBulletMultiThreaded.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466F05221EF7659300B80080 /* libBulletMultiThreaded.a */; }; @@ -1334,86 +784,87 @@ 468A197B1EF3BA6500ECA675 /* libBulletMultiThreaded.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 468A19761EF3BA6500ECA675 /* libBulletMultiThreaded.a */; }; 468A197C1EF3BA6500ECA675 /* libLinearMath.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 468A19771EF3BA6500ECA675 /* libLinearMath.a */; }; 468A197D1EF3BA6500ECA675 /* libMiniCL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 468A19781EF3BA6500ECA675 /* libMiniCL.a */; }; - 46A170E61807CECA005B8026 /* CCPhysicsBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */; }; - 46A170E71807CECA005B8026 /* CCPhysicsBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */; }; - 46A170E81807CECA005B8026 /* CCPhysicsContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */; }; - 46A170E91807CECA005B8026 /* CCPhysicsContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170711807CE7A005B8026 /* CCPhysicsContact.h */; }; - 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */; }; - 46A170EB1807CECA005B8026 /* CCPhysicsJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170731807CE7A005B8026 /* CCPhysicsJoint.h */; }; - 46A170ED1807CECA005B8026 /* CCPhysicsShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170751807CE7A005B8026 /* CCPhysicsShape.cpp */; }; - 46A170EE1807CECA005B8026 /* CCPhysicsShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170761807CE7A005B8026 /* CCPhysicsShape.h */; }; - 46A170EF1807CECA005B8026 /* CCPhysicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170771807CE7A005B8026 /* CCPhysicsWorld.cpp */; }; - 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170781807CE7A005B8026 /* CCPhysicsWorld.h */; }; - 46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */; }; - 46A170FD1807CECB005B8026 /* CCPhysicsBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */; }; - 46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */; }; - 46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170711807CE7A005B8026 /* CCPhysicsContact.h */; }; - 46A171011807CECB005B8026 /* CCPhysicsJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170731807CE7A005B8026 /* CCPhysicsJoint.h */; }; - 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170751807CE7A005B8026 /* CCPhysicsShape.cpp */; }; - 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170761807CE7A005B8026 /* CCPhysicsShape.h */; }; - 46A171051807CECB005B8026 /* CCPhysicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170771807CE7A005B8026 /* CCPhysicsWorld.cpp */; }; - 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170781807CE7A005B8026 /* CCPhysicsWorld.h */; }; + 46AF3A0D21F1877100D5AFCD /* CCPhysicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0121F1877100D5AFCD /* CCPhysicsWorld.cpp */; }; + 46AF3A0E21F1877100D5AFCD /* CCPhysicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0121F1877100D5AFCD /* CCPhysicsWorld.cpp */; }; + 46AF3A0F21F1877100D5AFCD /* CCPhysicsBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0221F1877100D5AFCD /* CCPhysicsBody.cpp */; }; + 46AF3A1021F1877100D5AFCD /* CCPhysicsBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0221F1877100D5AFCD /* CCPhysicsBody.cpp */; }; + 46AF3A1121F1877100D5AFCD /* CCPhysicsShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0321F1877100D5AFCD /* CCPhysicsShape.cpp */; }; + 46AF3A1221F1877100D5AFCD /* CCPhysicsShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0321F1877100D5AFCD /* CCPhysicsShape.cpp */; }; + 46AF3A1321F1877100D5AFCD /* CCPhysicsContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0421F1877100D5AFCD /* CCPhysicsContact.h */; }; + 46AF3A1421F1877100D5AFCD /* CCPhysicsContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0421F1877100D5AFCD /* CCPhysicsContact.h */; }; + 46AF3A1521F1877100D5AFCD /* CCPhysicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0521F1877100D5AFCD /* CCPhysicsWorld.h */; }; + 46AF3A1621F1877100D5AFCD /* CCPhysicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0521F1877100D5AFCD /* CCPhysicsWorld.h */; }; + 46AF3A1721F1877100D5AFCD /* CCPhysicsContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0621F1877100D5AFCD /* CCPhysicsContact.cpp */; }; + 46AF3A1821F1877100D5AFCD /* CCPhysicsContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0621F1877100D5AFCD /* CCPhysicsContact.cpp */; }; + 46AF3A1921F1877100D5AFCD /* CCPhysicsBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0721F1877100D5AFCD /* CCPhysicsBody.h */; }; + 46AF3A1A21F1877100D5AFCD /* CCPhysicsBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0721F1877100D5AFCD /* CCPhysicsBody.h */; }; + 46AF3A1B21F1877100D5AFCD /* cpCompat62.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0821F1877100D5AFCD /* cpCompat62.h */; }; + 46AF3A1C21F1877100D5AFCD /* cpCompat62.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0821F1877100D5AFCD /* cpCompat62.h */; }; + 46AF3A1D21F1877100D5AFCD /* CCPhysicsShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0921F1877100D5AFCD /* CCPhysicsShape.h */; }; + 46AF3A1E21F1877100D5AFCD /* CCPhysicsShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0921F1877100D5AFCD /* CCPhysicsShape.h */; }; + 46AF3A1F21F1877100D5AFCD /* CCPhysicsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0A21F1877100D5AFCD /* CCPhysicsHelper.h */; }; + 46AF3A2021F1877100D5AFCD /* CCPhysicsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0A21F1877100D5AFCD /* CCPhysicsHelper.h */; }; + 46AF3A2121F1877100D5AFCD /* CCPhysicsJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0B21F1877100D5AFCD /* CCPhysicsJoint.h */; }; + 46AF3A2221F1877100D5AFCD /* CCPhysicsJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46AF3A0B21F1877100D5AFCD /* CCPhysicsJoint.h */; }; + 46AF3A2321F1877100D5AFCD /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0C21F1877100D5AFCD /* CCPhysicsJoint.cpp */; }; + 46AF3A2421F1877100D5AFCD /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3A0C21F1877100D5AFCD /* CCPhysicsJoint.cpp */; }; + 46BD387A21D35A46002BD50F /* BlendStateMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF921ABD0C60075726E /* BlendStateMTL.mm */; }; + 46BD387B21D35A4A002BD50F /* BlendStateMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFB21ABD0C60075726E /* BlendStateMTL.h */; }; + 46BD387C21D35A4E002BD50F /* BufferMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFE21ABD0C60075726E /* BufferMTL.h */; }; + 46BD387D21D35A51002BD50F /* BufferMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF721ABD0C60075726E /* BufferMTL.mm */; }; + 46BD387E21D35A54002BD50F /* CommandBufferMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFF21ABD0C60075726E /* CommandBufferMTL.h */; }; + 46BD387F21D35A57002BD50F /* CommandBufferMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0421ABD0C60075726E /* CommandBufferMTL.mm */; }; + 46BD388021D35A5B002BD50F /* DepthStencilStateMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CFC21ABD0C60075726E /* DepthStencilStateMTL.h */; }; + 46BD388121D35A5F002BD50F /* DepthStencilStateMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CFA21ABD0C60075726E /* DepthStencilStateMTL.mm */; }; + 46BD388221D35A62002BD50F /* DeviceMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF521ABD0C60075726E /* DeviceMTL.h */; }; + 46BD388321D35A68002BD50F /* DeviceMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0021ABD0C60075726E /* DeviceMTL.mm */; }; + 46BD388421D35A68002BD50F /* RenderPipelineMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4D0521ABD0C60075726E /* RenderPipelineMTL.h */; }; + 46BD388521D35A68002BD50F /* RenderPipelineMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0721ABD0C60075726E /* RenderPipelineMTL.mm */; }; + 46BD388621D35A68002BD50F /* ShaderModuleMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF821ABD0C60075726E /* ShaderModuleMTL.h */; }; + 46BD388721D35A68002BD50F /* ShaderModuleMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CFD21ABD0C60075726E /* ShaderModuleMTL.mm */; }; + 46BD388821D35A68002BD50F /* TextureMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4D0221ABD0C60075726E /* TextureMTL.h */; }; + 46BD388921D35A68002BD50F /* TextureMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4D0121ABD0C60075726E /* TextureMTL.mm */; }; + 46BD388A21D35A68002BD50F /* Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 460D4CF421ABD0C60075726E /* Utils.h */; }; + 46BD388B21D35A68002BD50F /* Utils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 460D4CF621ABD0C60075726E /* Utils.mm */; }; 46BDE4A81FA32D3400104C05 /* libbox2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46BDE4A71FA32D3400104C05 /* libbox2d.a */; }; 46BDE4AA1FA3316A00104C05 /* libbox2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46BDE4A91FA3316A00104C05 /* libbox2d.a */; }; - 46BDE4C21FA86C7F00104C05 /* Array.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B11FA86C7F00104C05 /* Array.c */; }; - 46BDE4C31FA86C7F00104C05 /* Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B21FA86C7F00104C05 /* Array.h */; }; - 46BDE4C41FA86C7F00104C05 /* ClippingAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B31FA86C7F00104C05 /* ClippingAttachment.c */; }; - 46BDE4C51FA86C7F00104C05 /* ClippingAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B41FA86C7F00104C05 /* ClippingAttachment.h */; }; - 46BDE4C61FA86C7F00104C05 /* Color.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B51FA86C7F00104C05 /* Color.c */; }; - 46BDE4C71FA86C7F00104C05 /* Color.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B61FA86C7F00104C05 /* Color.h */; }; - 46BDE4C81FA86C7F00104C05 /* dll.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B71FA86C7F00104C05 /* dll.h */; }; - 46BDE4C91FA86C7F00104C05 /* PointAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B81FA86C7F00104C05 /* PointAttachment.c */; }; - 46BDE4CA1FA86C7F00104C05 /* PointAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B91FA86C7F00104C05 /* PointAttachment.h */; }; - 46BDE4CB1FA86C7F00104C05 /* SkeletonClipping.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BA1FA86C7F00104C05 /* SkeletonClipping.c */; }; - 46BDE4CC1FA86C7F00104C05 /* SkeletonClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BB1FA86C7F00104C05 /* SkeletonClipping.h */; }; - 46BDE4CD1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BC1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp */; }; - 46BDE4CE1FA86C7F00104C05 /* SkeletonTwoColorBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BD1FA86C7F00104C05 /* SkeletonTwoColorBatch.h */; }; - 46BDE4CF1FA86C7F00104C05 /* Triangulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BE1FA86C7F00104C05 /* Triangulator.c */; }; - 46BDE4D01FA86C7F00104C05 /* Triangulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BF1FA86C7F00104C05 /* Triangulator.h */; }; - 46BDE4D11FA86C7F00104C05 /* VertexEffect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4C01FA86C7F00104C05 /* VertexEffect.c */; }; - 46BDE4D21FA86C7F00104C05 /* VertexEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4C11FA86C7F00104C05 /* VertexEffect.h */; }; - 46BDE4D31FA87CAC00104C05 /* PointAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B81FA86C7F00104C05 /* PointAttachment.c */; }; - 46BDE4D41FA87CB000104C05 /* SkeletonClipping.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BA1FA86C7F00104C05 /* SkeletonClipping.c */; }; - 46BDE4D51FA87CB400104C05 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BC1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp */; }; - 46BDE4D61FA87CB700104C05 /* Triangulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BE1FA86C7F00104C05 /* Triangulator.c */; }; - 46BDE4D71FA87CBD00104C05 /* VertexEffect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4C01FA86C7F00104C05 /* VertexEffect.c */; }; - 46BDE4D81FA87CCC00104C05 /* PointAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B81FA86C7F00104C05 /* PointAttachment.c */; }; - 46BDE4D91FA87CCF00104C05 /* SkeletonClipping.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BA1FA86C7F00104C05 /* SkeletonClipping.c */; }; - 46BDE4DA1FA87CD200104C05 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BC1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp */; }; - 46BDE4DB1FA87CD500104C05 /* Triangulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4BE1FA86C7F00104C05 /* Triangulator.c */; }; - 46BDE4DC1FA87CD700104C05 /* VertexEffect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4C01FA86C7F00104C05 /* VertexEffect.c */; }; - 46BDE4DD1FA87D4900104C05 /* ClippingAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B31FA86C7F00104C05 /* ClippingAttachment.c */; }; - 46BDE4DE1FA87D4900104C05 /* ClippingAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B31FA86C7F00104C05 /* ClippingAttachment.c */; }; - 46BDE4DF1FA87D4D00104C05 /* ClippingAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B41FA86C7F00104C05 /* ClippingAttachment.h */; }; - 46BDE4E01FA87D4D00104C05 /* ClippingAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B41FA86C7F00104C05 /* ClippingAttachment.h */; }; - 46BDE4E11FA87D5000104C05 /* Array.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B11FA86C7F00104C05 /* Array.c */; }; - 46BDE4E21FA87D5000104C05 /* Array.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B11FA86C7F00104C05 /* Array.c */; }; - 46BDE4E31FA87D5300104C05 /* Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B21FA86C7F00104C05 /* Array.h */; }; - 46BDE4E41FA87D5300104C05 /* Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B21FA86C7F00104C05 /* Array.h */; }; - 46BDE4E51FA87D5700104C05 /* Color.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B51FA86C7F00104C05 /* Color.c */; }; - 46BDE4E61FA87D5800104C05 /* Color.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BDE4B51FA86C7F00104C05 /* Color.c */; }; - 46BDE4E71FA87D5A00104C05 /* Color.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B61FA86C7F00104C05 /* Color.h */; }; - 46BDE4E81FA87D5B00104C05 /* Color.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B61FA86C7F00104C05 /* Color.h */; }; - 46BDE4E91FA87D5D00104C05 /* dll.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B71FA86C7F00104C05 /* dll.h */; }; - 46BDE4EA1FA87D5D00104C05 /* dll.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B71FA86C7F00104C05 /* dll.h */; }; - 46BDE4EB1FA87D6100104C05 /* PointAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B91FA86C7F00104C05 /* PointAttachment.h */; }; - 46BDE4EC1FA87D6200104C05 /* PointAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4B91FA86C7F00104C05 /* PointAttachment.h */; }; - 46BDE4ED1FA87D6600104C05 /* SkeletonClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BB1FA86C7F00104C05 /* SkeletonClipping.h */; }; - 46BDE4EE1FA87D6700104C05 /* SkeletonClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BB1FA86C7F00104C05 /* SkeletonClipping.h */; }; - 46BDE4EF1FA87D6B00104C05 /* SkeletonTwoColorBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BD1FA86C7F00104C05 /* SkeletonTwoColorBatch.h */; }; - 46BDE4F01FA87D6B00104C05 /* SkeletonTwoColorBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BD1FA86C7F00104C05 /* SkeletonTwoColorBatch.h */; }; - 46BDE4F11FA87D6F00104C05 /* Triangulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BF1FA86C7F00104C05 /* Triangulator.h */; }; - 46BDE4F21FA87D6F00104C05 /* Triangulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4BF1FA86C7F00104C05 /* Triangulator.h */; }; - 46BDE4F31FA87D7400104C05 /* VertexEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4C11FA86C7F00104C05 /* VertexEffect.h */; }; - 46BDE4F41FA87D7500104C05 /* VertexEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BDE4C11FA86C7F00104C05 /* VertexEffect.h */; }; 46C02E0718E91123004B7456 /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C02E0518E91123004B7456 /* xxhash.c */; }; 46C02E0818E91123004B7456 /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C02E0518E91123004B7456 /* xxhash.c */; }; 46C02E0918E91123004B7456 /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C02E0618E91123004B7456 /* xxhash.h */; }; 46C02E0A18E91123004B7456 /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C02E0618E91123004B7456 /* xxhash.h */; }; - 4D76BE3A1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */; }; - 4D76BE3B1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */; }; - 4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */; }; - 4D76BE3D1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */; }; + 46D3D45B21DE014500EF5E75 /* BufferManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46D3D45921DE014500EF5E75 /* BufferManager.mm */; }; + 46D3D45C21DE014500EF5E75 /* BufferManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46D3D45921DE014500EF5E75 /* BufferManager.mm */; }; + 46D3D45D21DE014500EF5E75 /* BufferManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D3D45A21DE014500EF5E75 /* BufferManager.h */; }; + 46D3D45E21DE014500EF5E75 /* BufferManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D3D45A21DE014500EF5E75 /* BufferManager.h */; }; + 46D3D48A21E6E8F700EF5E75 /* SimpleAudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46D3D48921E6E8F700EF5E75 /* SimpleAudioEngine.cpp */; }; + 46D3D48B21E6E8F700EF5E75 /* SimpleAudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46D3D48921E6E8F700EF5E75 /* SimpleAudioEngine.cpp */; }; + 46E21B4721B900C900430A43 /* StringUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46E21B4521B900C900430A43 /* StringUtils.cpp */; }; + 46E21B4821B900C900430A43 /* StringUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46E21B4521B900C900430A43 /* StringUtils.cpp */; }; + 46E21B4921B900C900430A43 /* StringUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46E21B4621B900C900430A43 /* StringUtils.h */; }; + 46E21B4A21B900C900430A43 /* StringUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46E21B4621B900C900430A43 /* StringUtils.h */; }; + 46F9B47621AFE64C009DF858 /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B31321AFE64B009DF858 /* ExtensionMacros.h */; }; + 46F9B47721AFE64C009DF858 /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B31321AFE64B009DF858 /* ExtensionMacros.h */; }; + 46F9B6F021AFE64C009DF858 /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B45421AFE64B009DF858 /* cocos-ext.h */; }; + 46F9B6F121AFE64C009DF858 /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B45421AFE64B009DF858 /* cocos-ext.h */; }; + 46F9B72221AFE64D009DF858 /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47021AFE64C009DF858 /* CCTableViewCell.h */; }; + 46F9B72321AFE64D009DF858 /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47021AFE64C009DF858 /* CCTableViewCell.h */; }; + 46F9B72421AFE64D009DF858 /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B47121AFE64C009DF858 /* CCTableView.cpp */; }; + 46F9B72521AFE64D009DF858 /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B47121AFE64C009DF858 /* CCTableView.cpp */; }; + 46F9B72821AFE64D009DF858 /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B47321AFE64C009DF858 /* CCTableViewCell.cpp */; }; + 46F9B72921AFE64D009DF858 /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B47321AFE64C009DF858 /* CCTableViewCell.cpp */; }; + 46F9B72A21AFE64D009DF858 /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47421AFE64C009DF858 /* CCTableView.h */; }; + 46F9B72B21AFE64D009DF858 /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47421AFE64C009DF858 /* CCTableView.h */; }; + 46F9B72C21AFE64D009DF858 /* ExtensionExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47521AFE64C009DF858 /* ExtensionExport.h */; }; + 46F9B72D21AFE64D009DF858 /* ExtensionExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B47521AFE64C009DF858 /* ExtensionExport.h */; }; + 46F9B73021AFE7C0009DF858 /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B72E21AFE7BF009DF858 /* CCScrollView.h */; }; + 46F9B73121AFE7C0009DF858 /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B72E21AFE7BF009DF858 /* CCScrollView.h */; }; + 46F9B73221AFE7C0009DF858 /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B72F21AFE7C0009DF858 /* CCScrollView.cpp */; }; + 46F9B73321AFE7C0009DF858 /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B72F21AFE7C0009DF858 /* CCScrollView.cpp */; }; + 46F9B74121B0CB44009DF858 /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B73721B0CB44009DF858 /* UIWebView.h */; }; + 46F9B74421B0CB44009DF858 /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B73A21B0CB44009DF858 /* UIWebView.mm */; }; + 46F9B74521B0CB44009DF858 /* UIWebView-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B73B21B0CB44009DF858 /* UIWebView-inl.h */; }; + 46F9B74721B0CB44009DF858 /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B73D21B0CB44009DF858 /* UIWebViewImpl-ios.h */; }; + 46F9B74A21B0CB44009DF858 /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46F9B74021B0CB44009DF858 /* UIWebViewImpl-ios.mm */; }; 5012168E1AC47380009A4BEA /* CCRenderState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5012168C1AC47380009A4BEA /* CCRenderState.cpp */; }; 5012168F1AC47380009A4BEA /* CCRenderState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5012168C1AC47380009A4BEA /* CCRenderState.cpp */; }; 501216901AC47380009A4BEA /* CCRenderState.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012168D1AC47380009A4BEA /* CCRenderState.h */; }; @@ -1430,250 +881,10 @@ 501216A11AC473AD009A4BEA /* CCMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5012169E1AC473AD009A4BEA /* CCMaterial.cpp */; }; 501216A21AC473AD009A4BEA /* CCMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012169F1AC473AD009A4BEA /* CCMaterial.h */; }; 501216A31AC473AD009A4BEA /* CCMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012169F1AC473AD009A4BEA /* CCMaterial.h */; }; - 5020A1501D49912500E80C72 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1051D49912500E80C72 /* Animation.c */; }; - 5020A1511D49912500E80C72 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1051D49912500E80C72 /* Animation.c */; }; - 5020A1521D49912500E80C72 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1051D49912500E80C72 /* Animation.c */; }; - 5020A1531D49912500E80C72 /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1061D49912500E80C72 /* Animation.h */; }; - 5020A1541D49912500E80C72 /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1061D49912500E80C72 /* Animation.h */; }; - 5020A1551D49912500E80C72 /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1061D49912500E80C72 /* Animation.h */; }; - 5020A1561D49912500E80C72 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1071D49912500E80C72 /* AnimationState.c */; }; - 5020A1571D49912500E80C72 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1071D49912500E80C72 /* AnimationState.c */; }; - 5020A1581D49912500E80C72 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1071D49912500E80C72 /* AnimationState.c */; }; - 5020A1591D49912500E80C72 /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1081D49912500E80C72 /* AnimationState.h */; }; - 5020A15A1D49912500E80C72 /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1081D49912500E80C72 /* AnimationState.h */; }; - 5020A15B1D49912500E80C72 /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1081D49912500E80C72 /* AnimationState.h */; }; - 5020A15C1D49912500E80C72 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1091D49912500E80C72 /* AnimationStateData.c */; }; - 5020A15D1D49912500E80C72 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1091D49912500E80C72 /* AnimationStateData.c */; }; - 5020A15E1D49912500E80C72 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1091D49912500E80C72 /* AnimationStateData.c */; }; - 5020A15F1D49912500E80C72 /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10A1D49912500E80C72 /* AnimationStateData.h */; }; - 5020A1601D49912500E80C72 /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10A1D49912500E80C72 /* AnimationStateData.h */; }; - 5020A1611D49912500E80C72 /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10A1D49912500E80C72 /* AnimationStateData.h */; }; - 5020A1621D49912500E80C72 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10B1D49912500E80C72 /* Atlas.c */; }; - 5020A1631D49912500E80C72 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10B1D49912500E80C72 /* Atlas.c */; }; - 5020A1641D49912500E80C72 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10B1D49912500E80C72 /* Atlas.c */; }; - 5020A1651D49912500E80C72 /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10C1D49912500E80C72 /* Atlas.h */; }; - 5020A1661D49912500E80C72 /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10C1D49912500E80C72 /* Atlas.h */; }; - 5020A1671D49912500E80C72 /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10C1D49912500E80C72 /* Atlas.h */; }; - 5020A1681D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10D1D49912500E80C72 /* AtlasAttachmentLoader.c */; }; - 5020A1691D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10D1D49912500E80C72 /* AtlasAttachmentLoader.c */; }; - 5020A16A1D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10D1D49912500E80C72 /* AtlasAttachmentLoader.c */; }; - 5020A16B1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10E1D49912500E80C72 /* AtlasAttachmentLoader.h */; }; - 5020A16C1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10E1D49912500E80C72 /* AtlasAttachmentLoader.h */; }; - 5020A16D1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A10E1D49912500E80C72 /* AtlasAttachmentLoader.h */; }; - 5020A16E1D49912500E80C72 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10F1D49912500E80C72 /* Attachment.c */; }; - 5020A16F1D49912500E80C72 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10F1D49912500E80C72 /* Attachment.c */; }; - 5020A1701D49912500E80C72 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A10F1D49912500E80C72 /* Attachment.c */; }; - 5020A1711D49912500E80C72 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1101D49912500E80C72 /* Attachment.h */; }; - 5020A1721D49912500E80C72 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1101D49912500E80C72 /* Attachment.h */; }; - 5020A1731D49912500E80C72 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1101D49912500E80C72 /* Attachment.h */; }; - 5020A1741D49912500E80C72 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1111D49912500E80C72 /* AttachmentLoader.c */; }; - 5020A1751D49912500E80C72 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1111D49912500E80C72 /* AttachmentLoader.c */; }; - 5020A1761D49912500E80C72 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1111D49912500E80C72 /* AttachmentLoader.c */; }; - 5020A1771D49912500E80C72 /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1121D49912500E80C72 /* AttachmentLoader.h */; }; - 5020A1781D49912500E80C72 /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1121D49912500E80C72 /* AttachmentLoader.h */; }; - 5020A1791D49912500E80C72 /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1121D49912500E80C72 /* AttachmentLoader.h */; }; - 5020A17A1D49912500E80C72 /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1131D49912500E80C72 /* AttachmentVertices.cpp */; }; - 5020A17B1D49912500E80C72 /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1131D49912500E80C72 /* AttachmentVertices.cpp */; }; - 5020A17C1D49912500E80C72 /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1131D49912500E80C72 /* AttachmentVertices.cpp */; }; - 5020A17D1D49912500E80C72 /* AttachmentVertices.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1141D49912500E80C72 /* AttachmentVertices.h */; }; - 5020A17E1D49912500E80C72 /* AttachmentVertices.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1141D49912500E80C72 /* AttachmentVertices.h */; }; - 5020A17F1D49912500E80C72 /* AttachmentVertices.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1141D49912500E80C72 /* AttachmentVertices.h */; }; - 5020A1801D49912500E80C72 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1151D49912500E80C72 /* Bone.c */; }; - 5020A1811D49912500E80C72 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1151D49912500E80C72 /* Bone.c */; }; - 5020A1821D49912500E80C72 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1151D49912500E80C72 /* Bone.c */; }; - 5020A1831D49912500E80C72 /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1161D49912500E80C72 /* Bone.h */; }; - 5020A1841D49912500E80C72 /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1161D49912500E80C72 /* Bone.h */; }; - 5020A1851D49912500E80C72 /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1161D49912500E80C72 /* Bone.h */; }; - 5020A1861D49912500E80C72 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1171D49912500E80C72 /* BoneData.c */; }; - 5020A1871D49912500E80C72 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1171D49912500E80C72 /* BoneData.c */; }; - 5020A1881D49912500E80C72 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1171D49912500E80C72 /* BoneData.c */; }; - 5020A1891D49912500E80C72 /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1181D49912500E80C72 /* BoneData.h */; }; - 5020A18A1D49912500E80C72 /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1181D49912500E80C72 /* BoneData.h */; }; - 5020A18B1D49912500E80C72 /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1181D49912500E80C72 /* BoneData.h */; }; - 5020A18C1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1191D49912500E80C72 /* BoundingBoxAttachment.c */; }; - 5020A18D1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1191D49912500E80C72 /* BoundingBoxAttachment.c */; }; - 5020A18E1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1191D49912500E80C72 /* BoundingBoxAttachment.c */; }; - 5020A18F1D49912500E80C72 /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11A1D49912500E80C72 /* BoundingBoxAttachment.h */; }; - 5020A1901D49912500E80C72 /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11A1D49912500E80C72 /* BoundingBoxAttachment.h */; }; - 5020A1911D49912500E80C72 /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11A1D49912500E80C72 /* BoundingBoxAttachment.h */; }; - 5020A1921D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11B1D49912500E80C72 /* Cocos2dAttachmentLoader.cpp */; }; - 5020A1931D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11B1D49912500E80C72 /* Cocos2dAttachmentLoader.cpp */; }; - 5020A1941D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11B1D49912500E80C72 /* Cocos2dAttachmentLoader.cpp */; }; - 5020A1951D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11C1D49912500E80C72 /* Cocos2dAttachmentLoader.h */; }; - 5020A1961D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11C1D49912500E80C72 /* Cocos2dAttachmentLoader.h */; }; - 5020A1971D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11C1D49912500E80C72 /* Cocos2dAttachmentLoader.h */; }; - 5020A1981D49912500E80C72 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11D1D49912500E80C72 /* Event.c */; }; - 5020A1991D49912500E80C72 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11D1D49912500E80C72 /* Event.c */; }; - 5020A19A1D49912500E80C72 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11D1D49912500E80C72 /* Event.c */; }; - 5020A19B1D49912500E80C72 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11E1D49912500E80C72 /* Event.h */; }; - 5020A19C1D49912500E80C72 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11E1D49912500E80C72 /* Event.h */; }; - 5020A19D1D49912500E80C72 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A11E1D49912500E80C72 /* Event.h */; }; - 5020A19E1D49912500E80C72 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11F1D49912500E80C72 /* EventData.c */; }; - 5020A19F1D49912500E80C72 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11F1D49912500E80C72 /* EventData.c */; }; - 5020A1A01D49912500E80C72 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A11F1D49912500E80C72 /* EventData.c */; }; - 5020A1A11D49912500E80C72 /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1201D49912500E80C72 /* EventData.h */; }; - 5020A1A21D49912500E80C72 /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1201D49912500E80C72 /* EventData.h */; }; - 5020A1A31D49912500E80C72 /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1201D49912500E80C72 /* EventData.h */; }; - 5020A1A41D49912500E80C72 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1211D49912500E80C72 /* extension.c */; }; - 5020A1A51D49912500E80C72 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1211D49912500E80C72 /* extension.c */; }; - 5020A1A61D49912500E80C72 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1211D49912500E80C72 /* extension.c */; }; - 5020A1A71D49912500E80C72 /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1221D49912500E80C72 /* extension.h */; }; - 5020A1A81D49912500E80C72 /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1221D49912500E80C72 /* extension.h */; }; - 5020A1A91D49912500E80C72 /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1221D49912500E80C72 /* extension.h */; }; - 5020A1AA1D49912500E80C72 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1231D49912500E80C72 /* IkConstraint.c */; }; - 5020A1AB1D49912500E80C72 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1231D49912500E80C72 /* IkConstraint.c */; }; - 5020A1AC1D49912500E80C72 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1231D49912500E80C72 /* IkConstraint.c */; }; - 5020A1AD1D49912500E80C72 /* IkConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1241D49912500E80C72 /* IkConstraint.h */; }; - 5020A1AE1D49912500E80C72 /* IkConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1241D49912500E80C72 /* IkConstraint.h */; }; - 5020A1AF1D49912500E80C72 /* IkConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1241D49912500E80C72 /* IkConstraint.h */; }; - 5020A1B01D49912500E80C72 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1251D49912500E80C72 /* IkConstraintData.c */; }; - 5020A1B11D49912500E80C72 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1251D49912500E80C72 /* IkConstraintData.c */; }; - 5020A1B21D49912500E80C72 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1251D49912500E80C72 /* IkConstraintData.c */; }; - 5020A1B31D49912500E80C72 /* IkConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1261D49912500E80C72 /* IkConstraintData.h */; }; - 5020A1B41D49912500E80C72 /* IkConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1261D49912500E80C72 /* IkConstraintData.h */; }; - 5020A1B51D49912500E80C72 /* IkConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1261D49912500E80C72 /* IkConstraintData.h */; }; - 5020A1B61D49912500E80C72 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1271D49912500E80C72 /* Json.c */; }; - 5020A1B71D49912500E80C72 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1271D49912500E80C72 /* Json.c */; }; - 5020A1B81D49912500E80C72 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1271D49912500E80C72 /* Json.c */; }; - 5020A1B91D49912500E80C72 /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1281D49912500E80C72 /* Json.h */; }; - 5020A1BA1D49912500E80C72 /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1281D49912500E80C72 /* Json.h */; }; - 5020A1BB1D49912500E80C72 /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1281D49912500E80C72 /* Json.h */; }; - 5020A1BC1D49912500E80C72 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1291D49912500E80C72 /* MeshAttachment.c */; }; - 5020A1BD1D49912500E80C72 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1291D49912500E80C72 /* MeshAttachment.c */; }; - 5020A1BE1D49912500E80C72 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1291D49912500E80C72 /* MeshAttachment.c */; }; - 5020A1BF1D49912500E80C72 /* MeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12A1D49912500E80C72 /* MeshAttachment.h */; }; - 5020A1C01D49912500E80C72 /* MeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12A1D49912500E80C72 /* MeshAttachment.h */; }; - 5020A1C11D49912500E80C72 /* MeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12A1D49912500E80C72 /* MeshAttachment.h */; }; - 5020A1C21D49912500E80C72 /* PathAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12B1D49912500E80C72 /* PathAttachment.c */; }; - 5020A1C31D49912500E80C72 /* PathAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12B1D49912500E80C72 /* PathAttachment.c */; }; - 5020A1C41D49912500E80C72 /* PathAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12B1D49912500E80C72 /* PathAttachment.c */; }; - 5020A1C51D49912500E80C72 /* PathAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12C1D49912500E80C72 /* PathAttachment.h */; }; - 5020A1C61D49912500E80C72 /* PathAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12C1D49912500E80C72 /* PathAttachment.h */; }; - 5020A1C71D49912500E80C72 /* PathAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12C1D49912500E80C72 /* PathAttachment.h */; }; - 5020A1C81D49912500E80C72 /* PathConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12D1D49912500E80C72 /* PathConstraint.c */; }; - 5020A1C91D49912500E80C72 /* PathConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12D1D49912500E80C72 /* PathConstraint.c */; }; - 5020A1CA1D49912500E80C72 /* PathConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12D1D49912500E80C72 /* PathConstraint.c */; }; - 5020A1CB1D49912500E80C72 /* PathConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12E1D49912500E80C72 /* PathConstraint.h */; }; - 5020A1CC1D49912500E80C72 /* PathConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12E1D49912500E80C72 /* PathConstraint.h */; }; - 5020A1CD1D49912500E80C72 /* PathConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A12E1D49912500E80C72 /* PathConstraint.h */; }; - 5020A1CE1D49912500E80C72 /* PathConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12F1D49912500E80C72 /* PathConstraintData.c */; }; - 5020A1CF1D49912500E80C72 /* PathConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12F1D49912500E80C72 /* PathConstraintData.c */; }; - 5020A1D01D49912500E80C72 /* PathConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A12F1D49912500E80C72 /* PathConstraintData.c */; }; - 5020A1D11D49912500E80C72 /* PathConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1301D49912500E80C72 /* PathConstraintData.h */; }; - 5020A1D21D49912500E80C72 /* PathConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1301D49912500E80C72 /* PathConstraintData.h */; }; - 5020A1D31D49912500E80C72 /* PathConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1301D49912500E80C72 /* PathConstraintData.h */; }; - 5020A1D41D49912500E80C72 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1311D49912500E80C72 /* RegionAttachment.c */; }; - 5020A1D51D49912500E80C72 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1311D49912500E80C72 /* RegionAttachment.c */; }; - 5020A1D61D49912500E80C72 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1311D49912500E80C72 /* RegionAttachment.c */; }; - 5020A1D71D49912500E80C72 /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1321D49912500E80C72 /* RegionAttachment.h */; }; - 5020A1D81D49912500E80C72 /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1321D49912500E80C72 /* RegionAttachment.h */; }; - 5020A1D91D49912500E80C72 /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1321D49912500E80C72 /* RegionAttachment.h */; }; - 5020A1DA1D49912500E80C72 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1331D49912500E80C72 /* Skeleton.c */; }; - 5020A1DB1D49912500E80C72 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1331D49912500E80C72 /* Skeleton.c */; }; - 5020A1DC1D49912500E80C72 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1331D49912500E80C72 /* Skeleton.c */; }; - 5020A1DD1D49912500E80C72 /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1341D49912500E80C72 /* Skeleton.h */; }; - 5020A1DE1D49912500E80C72 /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1341D49912500E80C72 /* Skeleton.h */; }; - 5020A1DF1D49912500E80C72 /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1341D49912500E80C72 /* Skeleton.h */; }; - 5020A1E01D49912500E80C72 /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1351D49912500E80C72 /* SkeletonAnimation.cpp */; }; - 5020A1E11D49912500E80C72 /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1351D49912500E80C72 /* SkeletonAnimation.cpp */; }; - 5020A1E21D49912500E80C72 /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1351D49912500E80C72 /* SkeletonAnimation.cpp */; }; - 5020A1E31D49912500E80C72 /* SkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1361D49912500E80C72 /* SkeletonAnimation.h */; }; - 5020A1E41D49912500E80C72 /* SkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1361D49912500E80C72 /* SkeletonAnimation.h */; }; - 5020A1E51D49912500E80C72 /* SkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1361D49912500E80C72 /* SkeletonAnimation.h */; }; - 5020A1E61D49912500E80C72 /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1371D49912500E80C72 /* SkeletonBatch.cpp */; }; - 5020A1E71D49912500E80C72 /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1371D49912500E80C72 /* SkeletonBatch.cpp */; }; - 5020A1E81D49912500E80C72 /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1371D49912500E80C72 /* SkeletonBatch.cpp */; }; - 5020A1E91D49912500E80C72 /* SkeletonBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1381D49912500E80C72 /* SkeletonBatch.h */; }; - 5020A1EA1D49912500E80C72 /* SkeletonBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1381D49912500E80C72 /* SkeletonBatch.h */; }; - 5020A1EB1D49912500E80C72 /* SkeletonBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1381D49912500E80C72 /* SkeletonBatch.h */; }; - 5020A1EC1D49912500E80C72 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1391D49912500E80C72 /* SkeletonBounds.c */; }; - 5020A1ED1D49912500E80C72 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1391D49912500E80C72 /* SkeletonBounds.c */; }; - 5020A1EE1D49912500E80C72 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1391D49912500E80C72 /* SkeletonBounds.c */; }; - 5020A1EF1D49912500E80C72 /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13A1D49912500E80C72 /* SkeletonBounds.h */; }; - 5020A1F01D49912500E80C72 /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13A1D49912500E80C72 /* SkeletonBounds.h */; }; - 5020A1F11D49912500E80C72 /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13A1D49912500E80C72 /* SkeletonBounds.h */; }; - 5020A1F21D49912500E80C72 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13B1D49912500E80C72 /* SkeletonData.c */; }; - 5020A1F31D49912500E80C72 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13B1D49912500E80C72 /* SkeletonData.c */; }; - 5020A1F41D49912500E80C72 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13B1D49912500E80C72 /* SkeletonData.c */; }; - 5020A1F51D49912500E80C72 /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13C1D49912500E80C72 /* SkeletonData.h */; }; - 5020A1F61D49912500E80C72 /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13C1D49912500E80C72 /* SkeletonData.h */; }; - 5020A1F71D49912500E80C72 /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13C1D49912500E80C72 /* SkeletonData.h */; }; - 5020A1F81D49912500E80C72 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13D1D49912500E80C72 /* SkeletonJson.c */; }; - 5020A1F91D49912500E80C72 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13D1D49912500E80C72 /* SkeletonJson.c */; }; - 5020A1FA1D49912500E80C72 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13D1D49912500E80C72 /* SkeletonJson.c */; }; - 5020A1FB1D49912500E80C72 /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13E1D49912500E80C72 /* SkeletonJson.h */; }; - 5020A1FC1D49912500E80C72 /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13E1D49912500E80C72 /* SkeletonJson.h */; }; - 5020A1FD1D49912500E80C72 /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A13E1D49912500E80C72 /* SkeletonJson.h */; }; - 5020A1FE1D49912500E80C72 /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13F1D49912500E80C72 /* SkeletonRenderer.cpp */; }; - 5020A1FF1D49912500E80C72 /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13F1D49912500E80C72 /* SkeletonRenderer.cpp */; }; - 5020A2001D49912500E80C72 /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A13F1D49912500E80C72 /* SkeletonRenderer.cpp */; }; - 5020A2011D49912500E80C72 /* SkeletonRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1401D49912500E80C72 /* SkeletonRenderer.h */; }; - 5020A2021D49912500E80C72 /* SkeletonRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1401D49912500E80C72 /* SkeletonRenderer.h */; }; - 5020A2031D49912500E80C72 /* SkeletonRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1401D49912500E80C72 /* SkeletonRenderer.h */; }; - 5020A2041D49912500E80C72 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1411D49912500E80C72 /* Skin.c */; }; - 5020A2051D49912500E80C72 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1411D49912500E80C72 /* Skin.c */; }; - 5020A2061D49912500E80C72 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1411D49912500E80C72 /* Skin.c */; }; - 5020A2071D49912500E80C72 /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1421D49912500E80C72 /* Skin.h */; }; - 5020A2081D49912500E80C72 /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1421D49912500E80C72 /* Skin.h */; }; - 5020A2091D49912500E80C72 /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1421D49912500E80C72 /* Skin.h */; }; - 5020A20A1D49912500E80C72 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1431D49912500E80C72 /* Slot.c */; }; - 5020A20B1D49912500E80C72 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1431D49912500E80C72 /* Slot.c */; }; - 5020A20C1D49912500E80C72 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1431D49912500E80C72 /* Slot.c */; }; - 5020A20D1D49912500E80C72 /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1441D49912500E80C72 /* Slot.h */; }; - 5020A20E1D49912500E80C72 /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1441D49912500E80C72 /* Slot.h */; }; - 5020A20F1D49912500E80C72 /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1441D49912500E80C72 /* Slot.h */; }; - 5020A2101D49912500E80C72 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1451D49912500E80C72 /* SlotData.c */; }; - 5020A2111D49912500E80C72 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1451D49912500E80C72 /* SlotData.c */; }; - 5020A2121D49912500E80C72 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1451D49912500E80C72 /* SlotData.c */; }; - 5020A2131D49912500E80C72 /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1461D49912500E80C72 /* SlotData.h */; }; - 5020A2141D49912500E80C72 /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1461D49912500E80C72 /* SlotData.h */; }; - 5020A2151D49912500E80C72 /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1461D49912500E80C72 /* SlotData.h */; }; - 5020A2161D49912500E80C72 /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1471D49912500E80C72 /* spine-cocos2dx.cpp */; }; - 5020A2171D49912500E80C72 /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1471D49912500E80C72 /* spine-cocos2dx.cpp */; }; - 5020A2181D49912500E80C72 /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5020A1471D49912500E80C72 /* spine-cocos2dx.cpp */; }; - 5020A2191D49912500E80C72 /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1481D49912500E80C72 /* spine-cocos2dx.h */; }; - 5020A21A1D49912500E80C72 /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1481D49912500E80C72 /* spine-cocos2dx.h */; }; - 5020A21B1D49912500E80C72 /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1481D49912500E80C72 /* spine-cocos2dx.h */; }; - 5020A21C1D49912500E80C72 /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1491D49912500E80C72 /* spine.h */; }; - 5020A21D1D49912500E80C72 /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1491D49912500E80C72 /* spine.h */; }; - 5020A21E1D49912500E80C72 /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A1491D49912500E80C72 /* spine.h */; }; - 5020A21F1D49912500E80C72 /* TransformConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14A1D49912500E80C72 /* TransformConstraint.c */; }; - 5020A2201D49912500E80C72 /* TransformConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14A1D49912500E80C72 /* TransformConstraint.c */; }; - 5020A2211D49912500E80C72 /* TransformConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14A1D49912500E80C72 /* TransformConstraint.c */; }; - 5020A2221D49912500E80C72 /* TransformConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14B1D49912500E80C72 /* TransformConstraint.h */; }; - 5020A2231D49912500E80C72 /* TransformConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14B1D49912500E80C72 /* TransformConstraint.h */; }; - 5020A2241D49912500E80C72 /* TransformConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14B1D49912500E80C72 /* TransformConstraint.h */; }; - 5020A2251D49912500E80C72 /* TransformConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14C1D49912500E80C72 /* TransformConstraintData.c */; }; - 5020A2261D49912500E80C72 /* TransformConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14C1D49912500E80C72 /* TransformConstraintData.c */; }; - 5020A2271D49912500E80C72 /* TransformConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14C1D49912500E80C72 /* TransformConstraintData.c */; }; - 5020A2281D49912500E80C72 /* TransformConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14D1D49912500E80C72 /* TransformConstraintData.h */; }; - 5020A2291D49912500E80C72 /* TransformConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14D1D49912500E80C72 /* TransformConstraintData.h */; }; - 5020A22A1D49912500E80C72 /* TransformConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14D1D49912500E80C72 /* TransformConstraintData.h */; }; - 5020A22B1D49912500E80C72 /* VertexAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14E1D49912500E80C72 /* VertexAttachment.c */; }; - 5020A22C1D49912500E80C72 /* VertexAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14E1D49912500E80C72 /* VertexAttachment.c */; }; - 5020A22D1D49912500E80C72 /* VertexAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 5020A14E1D49912500E80C72 /* VertexAttachment.c */; }; - 5020A22E1D49912500E80C72 /* VertexAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14F1D49912500E80C72 /* VertexAttachment.h */; }; - 5020A22F1D49912500E80C72 /* VertexAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14F1D49912500E80C72 /* VertexAttachment.h */; }; - 5020A2301D49912500E80C72 /* VertexAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5020A14F1D49912500E80C72 /* VertexAttachment.h */; }; 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; }; 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; }; 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50272539190BF1B900AAF4ED /* cocos2d.cpp */; }; 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50272539190BF1B900AAF4ED /* cocos2d.cpp */; }; - 502AF9781D0711B8006AF256 /* CCVRGenericHeadTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 502AF9771D0711B8006AF256 /* CCVRGenericHeadTracker.cpp */; }; - 502AF9791D0711C9006AF256 /* CCVRGenericHeadTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 502AF9771D0711B8006AF256 /* CCVRGenericHeadTracker.cpp */; }; - 502AF97A1D0711CA006AF256 /* CCVRGenericHeadTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 502AF9771D0711B8006AF256 /* CCVRGenericHeadTracker.cpp */; }; - 5030C0421CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5030C03E1CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h */; }; - 5030C0431CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5030C03E1CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h */; }; - 5030C0441CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5030C03E1CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h */; }; - 503341991D9DC7B400770EC7 /* kvec.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341961D9DC7B400770EC7 /* kvec.h */; }; - 5033419A1D9DC7B400770EC7 /* kvec.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341961D9DC7B400770EC7 /* kvec.h */; }; - 5033419B1D9DC7B400770EC7 /* kvec.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341961D9DC7B400770EC7 /* kvec.h */; }; - 5033419C1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = 503341971D9DC7B400770EC7 /* SkeletonBinary.c */; }; - 5033419D1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = 503341971D9DC7B400770EC7 /* SkeletonBinary.c */; }; - 5033419E1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = 503341971D9DC7B400770EC7 /* SkeletonBinary.c */; }; - 5033419F1D9DC7B400770EC7 /* SkeletonBinary.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341981D9DC7B400770EC7 /* SkeletonBinary.h */; }; - 503341A01D9DC7B400770EC7 /* SkeletonBinary.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341981D9DC7B400770EC7 /* SkeletonBinary.h */; }; - 503341A11D9DC7B400770EC7 /* SkeletonBinary.h in Headers */ = {isa = PBXBuildFile; fileRef = 503341981D9DC7B400770EC7 /* SkeletonBinary.h */; }; 5034CA21191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034C9FB191D591000CE6051 /* ccShader_PositionTextureColorAlphaTest.frag */; }; 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034C9FB191D591000CE6051 /* ccShader_PositionTextureColorAlphaTest.frag */; }; 5034CA2B191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA00191D591000CE6051 /* ccShader_PositionTextureA8Color.vert */; }; @@ -1709,18 +920,6 @@ 5034CA4A191D591100CE6051 /* ccShader_Label_df.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0F191D591000CE6051 /* ccShader_Label_df.frag */; }; 5034CA4B191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */; }; 5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */; }; - 503D4F631CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F611CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp */; }; - 503D4F641CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F611CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp */; }; - 503D4F651CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F611CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp */; }; - 503D4F661CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F621CE29D4E0054A2D1 /* CCVRDistortionMesh.h */; }; - 503D4F671CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F621CE29D4E0054A2D1 /* CCVRDistortionMesh.h */; }; - 503D4F681CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F621CE29D4E0054A2D1 /* CCVRDistortionMesh.h */; }; - 503D4F6B1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F691CE2BDBE0054A2D1 /* CCVRDistortion.cpp */; }; - 503D4F6C1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F691CE2BDBE0054A2D1 /* CCVRDistortion.cpp */; }; - 503D4F6D1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503D4F691CE2BDBE0054A2D1 /* CCVRDistortion.cpp */; }; - 503D4F6E1CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F6A1CE2BDBE0054A2D1 /* CCVRDistortion.h */; }; - 503D4F6F1CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F6A1CE2BDBE0054A2D1 /* CCVRDistortion.h */; }; - 503D4F701CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */ = {isa = PBXBuildFile; fileRef = 503D4F6A1CE2BDBE0054A2D1 /* CCVRDistortion.h */; }; 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */; }; 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */; }; 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */; }; @@ -1729,9 +928,6 @@ 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */; }; 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */; }; 503DD8E71926736A00CD74DD /* CCEAGLView-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */; }; - 503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */; }; - 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */; }; - 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */; }; 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D91926736A00CD74DD /* CCGL-ios.h */; }; 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */; }; 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */; }; @@ -1760,8 +956,6 @@ 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD719BFAF4400EF68ED /* CCApplication.h */; }; 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; - 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */; }; - 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */; }; 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */; }; 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */; }; 50643BE419BFCF1800EF68ED /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */; }; @@ -1770,472 +964,160 @@ 50693C5F1B6BF2AE005C5820 /* CCDownloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50693C5C1B6BF2AE005C5820 /* CCDownloader.cpp */; }; 50693C601B6BF2AE005C5820 /* CCDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50693C5D1B6BF2AE005C5820 /* CCDownloader.h */; }; 50693C611B6BF2AE005C5820 /* CCDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50693C5D1B6BF2AE005C5820 /* CCDownloader.h */; }; - 5070031B1B69735200E83DDD /* HttpClient-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003161B69735200E83DDD /* HttpClient-android.cpp */; }; - 5070031D1B69735200E83DDD /* HttpClient-winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003171B69735200E83DDD /* HttpClient-winrt.cpp */; }; - 507003211B69735300E83DDD /* HttpConnection-winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003191B69735200E83DDD /* HttpConnection-winrt.cpp */; }; - 507003221B69735300E83DDD /* HttpConnection-winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003191B69735200E83DDD /* HttpConnection-winrt.cpp */; }; - 507003231B69735300E83DDD /* HttpConnection-winrt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5070031A1B69735200E83DDD /* HttpConnection-winrt.h */; }; - 507003241B69735300E83DDD /* HttpConnection-winrt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5070031A1B69735200E83DDD /* HttpConnection-winrt.h */; }; - 507B39C21C31BDD30067B53E /* CCAllocatorGlobalNewDelete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD03401A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp */; }; - 507B39C31C31BDD30067B53E /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */; }; - 507B39C41C31BDD30067B53E /* CCPUPlaneCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19A1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp */; }; - 507B39C51C31BDD30067B53E /* CCPUBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E01AA80A6500DDB1C5 /* CCPUBehaviour.cpp */; }; 507B39C71C31BDD30067B53E /* DetourPathQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */; }; - 507B39C81C31BDD30067B53E /* CCPUPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1981AA80A6500DDB1C5 /* CCPUPlane.cpp */; }; - 507B39C91C31BDD30067B53E /* CCPUDoPlacementParticleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10C1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp */; }; - 507B39CA1C31BDD30067B53E /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */; }; - 507B39CC1C31BDD30067B53E /* ButtonReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */; }; - 507B39CD1C31BDD30067B53E /* CCNodeLoaderLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D21180E26E600808F54 /* CCNodeLoaderLibrary.cpp */; }; - 507B39CE1C31BDD30067B53E /* CCActionFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5948180E930E00EF57C3 /* CCActionFrame.cpp */; }; - 507B39D01C31BDD30067B53E /* CCSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68018F57BE800EFE3A6 /* CCSet.cpp */; }; - 507B39D11C31BDD30067B53E /* CCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C68218F57BE800EFE3A6 /* CCString.cpp */; }; 507B39D21C31BDD30067B53E /* sweep.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB20831AE7C57D00C31518 /* sweep.cc */; }; - 507B39D31C31BDD30067B53E /* ImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7018C72017004AD434 /* ImageViewReader.cpp */; }; - 507B39D51C31BDD30067B53E /* CCPUAffectorManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */; }; 507B39D61C31BDD30067B53E /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; - 507B39D71C31BDD30067B53E /* CCPhysicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170771807CE7A005B8026 /* CCPhysicsWorld.cpp */; }; 507B39D91C31BDD30067B53E /* CCGroupCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD721925AB4100A911A9 /* CCGroupCommand.cpp */; }; - 507B39DA1C31BDD30067B53E /* CCPhysicsShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170751807CE7A005B8026 /* CCPhysicsShape.cpp */; }; - 507B39DB1C31BDD30067B53E /* CCPUOnRandomObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1801AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp */; }; 507B39DC1C31BDD30067B53E /* CCImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF271926664700A911A9 /* CCImage.cpp */; }; - 507B39DD1C31BDD30067B53E /* CCPURandomiserTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A81AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp */; }; 507B39DE1C31BDD30067B53E /* DetourPathCorridor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */; }; - 507B39DF1C31BDD30067B53E /* CCNotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C6A218F58F7500EFE3A6 /* CCNotificationCenter.cpp */; }; - 507B39E01C31BDD30067B53E /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */; }; - 507B39E31C31BDD30067B53E /* CCPURandomiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A61AA80A6500DDB1C5 /* CCPURandomiser.cpp */; }; - 507B39E41C31BDD30067B53E /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168481807AF4E005B8026 /* CCControlUtils.cpp */; }; - 507B39E51C31BDD30067B53E /* CCPUObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15A1AA80A6500DDB1C5 /* CCPUObserver.cpp */; }; 507B39E71C31BDD30067B53E /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; }; - 507B39EA1C31BDD30067B53E /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; }; 507B39EB1C31BDD30067B53E /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; - 507B39EC1C31BDD30067B53E /* CCPUDoAffectorEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FC1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp */; }; - 507B39ED1C31BDD30067B53E /* CCPUSlaveEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CE1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.cpp */; }; - 507B39EF1C31BDD30067B53E /* CCDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67B18F57BE800EFE3A6 /* CCDictionary.cpp */; }; 507B39F01C31BDD30067B53E /* CCVertexIndexData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */; }; 507B39F11C31BDD30067B53E /* CCEventFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDDC1925AB6E00A911A9 /* CCEventFocus.cpp */; }; - 507B39F21C31BDD30067B53E /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FF19AAD2F700C27E9E /* CCSkeleton3D.cpp */; }; 507B39F31C31BDD30067B53E /* DetourTileCacheBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */; }; 507B39F41C31BDD30067B53E /* CCApplication-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */; }; - 507B39F81C31BDD30067B53E /* CCMenuItemImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D18180E26E600808F54 /* CCMenuItemImageLoader.cpp */; }; 507B39F91C31BDD30067B53E /* fastlz.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA51B04825B00E47F5F /* fastlz.c */; }; 507B39FA1C31BDD30067B53E /* CCSAXParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF291926664700A911A9 /* CCSAXParser.cpp */; }; - 507B39FC1C31BDD30067B53E /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */; }; - 507B39FE1C31BDD30067B53E /* UserCameraReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CE31A9D725400C30D34 /* UserCameraReader.cpp */; }; - 507B39FF1C31BDD30067B53E /* UILayoutComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2DF19E671D2002D7CE7 /* UILayoutComponent.cpp */; }; - 507B3A011C31BDD30067B53E /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; }; - 507B3A021C31BDD30067B53E /* UIScrollViewBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5668D7B1B3838E4003CBD5E /* UIScrollViewBar.cpp */; }; - 507B3A031C31BDD30067B53E /* CCPUOnCountObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1681AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp */; }; - 507B3A041C31BDD30067B53E /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FE81807A56F005B8026 /* CDOpenALSupport.m */; }; - 507B3A061C31BDD30067B53E /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FED1807A56F005B8026 /* SimpleAudioEngine_objc.m */; }; - 507B3A071C31BDD30067B53E /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F319AAD2F700C27E9E /* CCMesh.cpp */; }; - 507B3A081C31BDD30067B53E /* CCPUSphereSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D61AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.cpp */; }; 507B3A091C31BDD30067B53E /* CCImage-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DC1926736A00CD74DD /* CCImage-ios.mm */; }; - 507B3A0C1C31BDD30067B53E /* CCPhysicsBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */; }; - 507B3A0D1C31BDD30067B53E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; }; 507B3A0E1C31BDD30067B53E /* CCGLProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD6C1925AB4100A911A9 /* CCGLProgramState.cpp */; }; - 507B3A0F1C31BDD30067B53E /* CCPUSimpleSpline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C21AA80A6500DDB1C5 /* CCPUSimpleSpline.cpp */; }; - 507B3A111C31BDD30067B53E /* CCPrimitive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B44C1989D5E800D9A687 /* CCPrimitive.cpp */; }; 507B3A121C31BDD30067B53E /* CCAutoreleasePool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDC51925AB6E00A911A9 /* CCAutoreleasePool.cpp */; }; - 507B3A131C31BDD30067B53E /* CCScale9SpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D26180E26E600808F54 /* CCScale9SpriteLoader.cpp */; }; - 507B3A141C31BDD30067B53E /* TriggerMng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABE186AD63B0012A414 /* TriggerMng.cpp */; }; - 507B3A181C31BDD30067B53E /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FEA1807A56F005B8026 /* CocosDenshion.m */; }; - 507B3A191C31BDD30067B53E /* CCPUBaseCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D61AA80A6500DDB1C5 /* CCPUBaseCollider.cpp */; }; 507B3A1A1C31BDD30067B53E /* RecastDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */; }; - 507B3A1B1C31BDD30067B53E /* CCPhysicsContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */; }; 507B3A1C1C31BDD30067B53E /* CCAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570047180BC5A10088DEC7 /* CCAction.cpp */; }; 507B3A1D1C31BDD30067B53E /* CCActionCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570049180BC5A10088DEC7 /* CCActionCamera.cpp */; }; - 507B3A1E1C31BDD30067B53E /* CCPUJetAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13E1AA80A6500DDB1C5 /* CCPUJetAffector.cpp */; }; 507B3A1F1C31BDD30067B53E /* CCVertexIndexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */; }; - 507B3A211C31BDD30067B53E /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; - 507B3A231C31BDD30067B53E /* Manifest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707619EE414C00ABE682 /* Manifest.cpp */; }; 507B3A261C31BDD30067B53E /* CCActionCatmullRom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57004B180BC5A10088DEC7 /* CCActionCatmullRom.cpp */; }; - 507B3A271C31BDD30067B53E /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683C1807AF4E005B8026 /* CCControlHuePicker.cpp */; }; - 507B3A281C31BDD30067B53E /* CCFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C9194B19E400E608AF /* CCFrame.cpp */; }; 507B3A2B1C31BDD30067B53E /* CCActionEase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57004D180BC5A10088DEC7 /* CCActionEase.cpp */; }; 507B3A2C1C31BDD30067B53E /* CCGLProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD681925AB4100A911A9 /* CCGLProgram.cpp */; }; - 507B3A2D1C31BDD30067B53E /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1061AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp */; }; - 507B3A2F1C31BDD30067B53E /* CCPhysicsSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */; }; - 507B3A301C31BDD30067B53E /* CCSSceneReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597C180E930E00EF57C3 /* CCSSceneReader.cpp */; }; 507B3A311C31BDD30067B53E /* CCActionGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57004F180BC5A10088DEC7 /* CCActionGrid.cpp */; }; - 507B3A341C31BDD30067B53E /* CCPULinearForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1481AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp */; }; - 507B3A351C31BDD30067B53E /* CCPUUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E61AA80A6500DDB1C5 /* CCPUUtil.cpp */; }; - 507B3A361C31BDD30067B53E /* CCPUGeometryRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1321AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp */; }; 507B3A391C31BDD30067B53E /* HttpClient-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2B1A5349A3004E4C60 /* HttpClient-apple.mm */; }; - 507B3A3B1C31BDD30067B53E /* CCPUBaseForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DC1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp */; }; - 507B3A3C1C31BDD30067B53E /* FlatBuffersSerialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384051A25900F002C4610 /* FlatBuffersSerialize.cpp */; }; - 507B3A3D1C31BDD30067B53E /* CCParticle3DRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F41A8CA82E00643ABF /* CCParticle3DRender.cpp */; }; 507B3A3E1C31BDD30067B53E /* CCClippingRectangleNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */; }; - 507B3A3F1C31BDD30067B53E /* CCPULinearForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1461AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp */; }; - 507B3A401C31BDD30067B53E /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1683E1807AF4E005B8026 /* CCControlPotentiometer.cpp */; }; - 507B3A421C31BDD30067B53E /* CCPUDynamicAttributeTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11A1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp */; }; - 507B3A431C31BDD30067B53E /* CCPUOnClearObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1601AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp */; }; - 507B3A481C31BDD30067B53E /* UITextField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1118CF08D100240AA3 /* UITextField.cpp */; }; - 507B3A491C31BDD30067B53E /* CheckBoxReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */; }; - 507B3A4A1C31BDD30067B53E /* CCPhysics3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */; }; 507B3A4B1C31BDD30067B53E /* CCEventListenerAcceleration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDE21925AB6E00A911A9 /* CCEventListenerAcceleration.cpp */; }; - 507B3A4C1C31BDD30067B53E /* CCPUGravityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1361AA80A6500DDB1C5 /* CCPUGravityAffector.cpp */; }; - 507B3A4D1C31BDD30067B53E /* CCPULineAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1441AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp */; }; - 507B3A4F1C31BDD30067B53E /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; 507B3A531C31BDD30067B53E /* CCController-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176551960F89B00DE83F5 /* CCController-apple.mm */; }; - 507B3A541C31BDD30067B53E /* CCBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D01180E26E600808F54 /* CCBReader.cpp */; }; - 507B3A551C31BDD30067B53E /* CCArmatureDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5958180E930E00EF57C3 /* CCArmatureDefine.cpp */; }; - 507B3A561C31BDD30067B53E /* CCPUOnRandomObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1821AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp */; }; 507B3A571C31BDD30067B53E /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; }; 507B3A581C31BDD30067B53E /* CCStencilStateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298C75D31C0465D0006BAE63 /* CCStencilStateManager.cpp */; }; - 507B3A591C31BDD30067B53E /* CCComRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5966180E930E00EF57C3 /* CCComRender.cpp */; }; - 507B3A5A1C31BDD30067B53E /* SpriteReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384421A25915C002C4610 /* SpriteReader.cpp */; }; - 507B3A5D1C31BDD30067B53E /* LoadingBarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7918C72017004AD434 /* LoadingBarReader.cpp */; }; 507B3A5E1C31BDD30067B53E /* CCEventTouch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDF01925AB6E00A911A9 /* CCEventTouch.cpp */; }; - 507B3A5F1C31BDD30067B53E /* CCOBB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F919AAD2F700C27E9E /* CCOBB.cpp */; }; - 507B3A621C31BDD30067B53E /* CCLayerLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D16180E26E600808F54 /* CCLayerLoader.cpp */; }; - 507B3A631C31BDD30067B53E /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168441807AF4E005B8026 /* CCControlStepper.cpp */; }; 507B3A651C31BDD30067B53E /* CCPass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 501216921AC47393009A4BEA /* CCPass.cpp */; }; 507B3A661C31BDD30067B53E /* CCEventListenerKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDE81925AB6E00A911A9 /* CCEventListenerKeyboard.cpp */; }; - 507B3A671C31BDD30067B53E /* CCPUGravityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1381AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp */; }; - 507B3A681C31BDD30067B53E /* CCScrollViewLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D28180E26E600808F54 /* CCScrollViewLoader.cpp */; }; 507B3A691C31BDD30067B53E /* AudioEngine-inl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50CB247219D9C5A100687767 /* AudioEngine-inl.mm */; }; 507B3A6B1C31BDD30067B53E /* CCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD41925AB6E00A911A9 /* CCEvent.cpp */; }; 507B3A6D1C31BDD30067B53E /* shapes.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB207A1AE7C57D00C31518 /* shapes.cc */; }; 507B3A6F1C31BDD30067B53E /* CCScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE011925AB6E00A911A9 /* CCScheduler.cpp */; }; 507B3A711C31BDD30067B53E /* CCEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD81925AB6E00A911A9 /* CCEventCustom.cpp */; }; - 507B3A731C31BDD30067B53E /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168421807AF4E005B8026 /* CCControlSlider.cpp */; }; - 507B3A741C31BDD30067B53E /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EC19AAD2F700C27E9E /* CCAttachNode.cpp */; }; - 507B3A751C31BDD30067B53E /* CCParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */; }; - 507B3A761C31BDD30067B53E /* CCBSequenceProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D06180E26E600808F54 /* CCBSequenceProperty.cpp */; }; - 507B3A791C31BDD30067B53E /* CCControlButtonLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0A180E26E600808F54 /* CCControlButtonLoader.cpp */; }; 507B3A7B1C31BDD30067B53E /* CCEventListenerTouch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDEC1925AB6E00A911A9 /* CCEventListenerTouch.cpp */; }; 507B3A7E1C31BDD30067B53E /* DetourTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */; }; - 507B3A811C31BDD30067B53E /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180119AAD2F700C27E9E /* CCSprite3D.cpp */; }; 507B3A821C31BDD30067B53E /* CCEventKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDDE1925AB6E00A911A9 /* CCEventKeyboard.cpp */; }; - 507B3A831C31BDD30067B53E /* CCArmatureDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5956180E930E00EF57C3 /* CCArmatureDataManager.cpp */; }; - 507B3A841C31BDD30067B53E /* CCPUBehaviourManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E21AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp */; }; - 507B3A851C31BDD30067B53E /* CCPUParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1901AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp */; }; 507B3A861C31BDD30067B53E /* CCLight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EACC99E19F5014D00EB3C5E /* CCLight.cpp */; }; - 507B3A871C31BDD30067B53E /* UIScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0718CF08D000240AA3 /* UIScrollView.cpp */; }; 507B3A881C31BDD30067B53E /* CCActionGrid3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570051180BC5A10088DEC7 /* CCActionGrid3D.cpp */; }; - 507B3A8B1C31BDD30067B53E /* SliderReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8218C72017004AD434 /* SliderReader.cpp */; }; - 507B3A8D1C31BDD30067B53E /* CCPURibbonTrail.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AE1AA80A6500DDB1C5 /* CCPURibbonTrail.cpp */; }; - 507B3A8E1C31BDD30067B53E /* CCPUAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */; }; - 507B3A8F1C31BDD30067B53E /* UIText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0B18CF08D100240AA3 /* UIText.cpp */; }; 507B3A941C31BDD30067B53E /* DetourLocalBoundary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */; }; - 507B3A951C31BDD30067B53E /* CCLayerColorLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D12180E26E600808F54 /* CCLayerColorLoader.cpp */; }; 507B3A961C31BDD30067B53E /* TransformUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD2D1925AB0000A911A9 /* TransformUtils.cpp */; }; - 507B3A971C31BDD30067B53E /* CCPUInterParticleCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13A1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp */; }; - 507B3A981C31BDD30067B53E /* UIEditBoxImpl-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */; }; - 507B3A991C31BDD30067B53E /* CCArmature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5952180E930E00EF57C3 /* CCArmature.cpp */; }; 507B3A9A1C31BDD30067B53E /* CCActionInstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570053180BC5A10088DEC7 /* CCActionInstant.cpp */; }; 507B3A9C1C31BDD30067B53E /* DetourObstacleAvoidance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */; }; - 507B3A9D1C31BDD30067B53E /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */; }; - 507B3AA01C31BDD30067B53E /* ComAudioReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384181A2590D2002C4610 /* ComAudioReader.cpp */; }; 507B3AA21C31BDD30067B53E /* CCValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE111925AB6F00A911A9 /* CCValue.cpp */; }; 507B3AA31C31BDD30067B53E /* Vec2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD2F1925AB0000A911A9 /* Vec2.cpp */; }; - 507B3AA41C31BDD30067B53E /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B81AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp */; }; - 507B3AA61C31BDD30067B53E /* CCPUOnCountObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16A1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp */; }; - 507B3AA71C31BDD30067B53E /* CocoLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E99D1C1957BA7000046604 /* CocoLoader.cpp */; }; - 507B3AA81C31BDD30067B53E /* CCPURibbonTrailRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B01AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp */; }; - 507B3AA91C31BDD30067B53E /* CCBoneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306631B60B583001E6D43 /* CCBoneNode.cpp */; }; 507B3AAA1C31BDD30067B53E /* CCDirector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD21925AB6E00A911A9 /* CCDirector.cpp */; }; - 507B3AAB1C31BDD30067B53E /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; - 507B3AAD1C31BDD30067B53E /* CCPUPositionEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A21AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp */; }; 507B3AAE1C31BDD30067B53E /* CCActionInterval.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570055180BC5A10088DEC7 /* CCActionInterval.cpp */; }; - 507B3AAF1C31BDD30067B53E /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168401807AF4E005B8026 /* CCControlSaturationBrightnessPicker.cpp */; }; - 507B3AB11C31BDD30067B53E /* CCPUInterParticleColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13C1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp */; }; - 507B3AB21C31BDD30067B53E /* CCPUOnEmissionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16C1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp */; }; 507B3AB31C31BDD30067B53E /* CCActionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570057180BC5A10088DEC7 /* CCActionManager.cpp */; }; 507B3AB41C31BDD30067B53E /* CCDownloader-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */; }; - 507B3AB51C31BDD30067B53E /* CCPUBoxColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EA1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp */; }; 507B3AB61C31BDD30067B53E /* CCActionPageTurn3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570059180BC5A10088DEC7 /* CCActionPageTurn3D.cpp */; }; 507B3AB81C31BDD30067B53E /* CCActionProgressTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57005B180BC5A10088DEC7 /* CCActionProgressTimer.cpp */; }; - 507B3ABA1C31BDD30067B53E /* CCPUSlaveBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CA1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp */; }; - 507B3ABB1C31BDD30067B53E /* CCBKeyframe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFE180E26E600808F54 /* CCBKeyframe.cpp */; }; - 507B3ABF1C31BDD30067B53E /* LocalStorage-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */; }; 507B3AC01C31BDD30067B53E /* ZipUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE1D1925AB6F00A911A9 /* ZipUtils.cpp */; }; - 507B3AC11C31BDD30067B53E /* UIHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F418CF08D000240AA3 /* UIHelper.cpp */; }; - 507B3AC31C31BDD30067B53E /* CCPhysics3DDebugDrawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */; }; - 507B3AC61C31BDD30067B53E /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17EE19AAD2F700C27E9E /* CCBundle3D.cpp */; }; 507B3AC91C31BDD30067B53E /* CCActionTiledGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57005D180BC5A10088DEC7 /* CCActionTiledGrid.cpp */; }; - 507B3ACA1C31BDD30067B53E /* CCNavMeshAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */; }; 507B3ACC1C31BDD30067B53E /* CCActionTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57005F180BC5A10088DEC7 /* CCActionTween.cpp */; }; 507B3ACD1C31BDD30067B53E /* CCAtlasNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570096180BC5C10088DEC7 /* CCAtlasNode.cpp */; }; - 507B3ACF1C31BDD30067B53E /* CCPhysics3DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */; }; - 507B3AD01C31BDD30067B53E /* CCPUEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11C1AA80A6500DDB1C5 /* CCPUEmitter.cpp */; }; 507B3AD11C31BDD30067B53E /* MathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD261925AB0000A911A9 /* MathUtil.cpp */; }; 507B3AD21C31BDD30067B53E /* DetourNavMeshQuery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */; }; - 507B3AD31C31BDD30067B53E /* CCDataVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD01925AB6E00A911A9 /* CCDataVisitor.cpp */; }; 507B3AD51C31BDD30067B53E /* CCNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57009C180BC5D20088DEC7 /* CCNode.cpp */; }; - 507B3AD61C31BDD30067B53E /* CCDrawingPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010A180BC8ED0088DEC7 /* CCDrawingPrimitives.cpp */; }; - 507B3AD71C31BDD30067B53E /* CCPUSlaveEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CC1AA80A6500DDB1C5 /* CCPUSlaveEmitter.cpp */; }; 507B3AD81C31BDD30067B53E /* CCDrawNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57010C180BC8EE0088DEC7 /* CCDrawNode.cpp */; }; - 507B3AD91C31BDD30067B53E /* CCGrabber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570117180BC90D0088DEC7 /* CCGrabber.cpp */; }; - 507B3ADA1C31BDD30067B53E /* ParticleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823842D1A259112002C4610 /* ParticleReader.cpp */; }; 507B3ADC1C31BDD30067B53E /* CCGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570119180BC90D0088DEC7 /* CCGrid.cpp */; }; - 507B3ADD1C31BDD30067B53E /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E819AAD2F700C27E9E /* CCAnimation3D.cpp */; }; - 507B3ADF1C31BDD30067B53E /* CCPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61241A3FFE3D0038DE01 /* CCPlane.cpp */; }; 507B3AE01C31BDD30067B53E /* CCFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570182180BCB590088DEC7 /* CCFont.cpp */; }; - 507B3AE21C31BDD30067B53E /* CCSpriteFrameCacheHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597A180E930E00EF57C3 /* CCSpriteFrameCacheHelper.cpp */; }; - 507B3AE31C31BDD30067B53E /* CCActionManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594C180E930E00EF57C3 /* CCActionManagerEx.cpp */; }; - 507B3AE41C31BDD30067B53E /* CCEventListenerAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */; }; 507B3AE61C31BDD30067B53E /* CCCommon-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */; }; - 507B3AE71C31BDD30067B53E /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */; }; - 507B3AE81C31BDD30067B53E /* CCNavMeshObstacle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */; }; - 507B3AED1C31BDD30067B53E /* CCComExtensionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43015DBD1B60DF4000E75161 /* CCComExtensionData.cpp */; }; 507B3AF01C31BDD30067B53E /* CCFontAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570184180BCB590088DEC7 /* CCFontAtlas.cpp */; }; 507B3AF11C31BDD30067B53E /* CCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E61781C1966A5A300DE83F5 /* CCController.cpp */; }; 507B3AF31C31BDD30067B53E /* CCFileUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF231926664700A911A9 /* CCFileUtils.cpp */; }; 507B3AF41C31BDD30067B53E /* ccRandom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299CF1F919A434BC00C378C1 /* ccRandom.cpp */; }; 507B3AF51C31BDD30067B53E /* ioapi_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA8C62A019E52C6400000516 /* ioapi_mem.cpp */; }; - 507B3AF61C31BDD30067B53E /* ProjectNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384341A259126002C4610 /* ProjectNodeReader.cpp */; }; - 507B3AF71C31BDD30067B53E /* CCMenuItemLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1A180E26E600808F54 /* CCMenuItemLoader.cpp */; }; - 507B3AF91C31BDD30067B53E /* CCPUDoStopSystemEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1141AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp */; }; 507B3AFA1C31BDD30067B53E /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDC31925AB6E00A911A9 /* base64.cpp */; }; - 507B3AFB1C31BDD30067B53E /* CCPUOnVelocityObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18A1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp */; }; 507B3AFC1C31BDD30067B53E /* CCFontAtlasCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570186180BCB590088DEC7 /* CCFontAtlasCache.cpp */; }; - 507B3AFD1C31BDD30067B53E /* TriggerObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */; }; - 507B3AFE1C31BDD30067B53E /* CCPhysics3DConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */; }; - 507B3AFF1C31BDD30067B53E /* CCNavMeshDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */; }; - 507B3B001C31BDD30067B53E /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */; }; - 507B3B011C31BDD30067B53E /* WidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB9018C72017004AD434 /* WidgetReader.cpp */; }; - 507B3B021C31BDD30067B53E /* CCPUOnVelocityObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1881AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp */; }; - 507B3B041C31BDD30067B53E /* CCPUObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15E1AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp */; }; - 507B3B061C31BDD30067B53E /* CCPUAlignAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D41AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp */; }; 507B3B081C31BDD30067B53E /* CCFontFNT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57018C180BCB590088DEC7 /* CCFontFNT.cpp */; }; - 507B3B091C31BDD30067B53E /* CCParticle3DAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */; }; - 507B3B0A1C31BDD30067B53E /* CCPUBillboardChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E61AA80A6500DDB1C5 /* CCPUBillboardChain.cpp */; }; - 507B3B0B1C31BDD30067B53E /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */; }; 507B3B0C1C31BDD30067B53E /* CCFontFreeType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57018E180BCB590088DEC7 /* CCFontFreeType.cpp */; }; - 507B3B0D1C31BDD30067B53E /* CCPUTechniqueTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DA1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.cpp */; }; - 507B3B0E1C31BDD30067B53E /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; 507B3B0F1C31BDD30067B53E /* ccTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE071925AB6E00A911A9 /* ccTypes.cpp */; }; - 507B3B101C31BDD30067B53E /* DictionaryHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5989180E930E00EF57C3 /* DictionaryHelper.cpp */; }; - 507B3B131C31BDD30067B53E /* CCPUDoFreezeEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1081AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp */; }; 507B3B151C31BDD30067B53E /* CCLabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570190180BCB590088DEC7 /* CCLabel.cpp */; }; - 507B3B161C31BDD30067B53E /* CCBFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFC180E26E600808F54 /* CCBFileLoader.cpp */; }; - 507B3B181C31BDD30067B53E /* UIRadioButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DC61B3C05BA002B0419 /* UIRadioButton.cpp */; }; - 507B3B191C31BDD30067B53E /* CCBAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71CFA180E26E600808F54 /* CCBAnimationManager.cpp */; }; - 507B3B1A1C31BDD30067B53E /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FE18CF08D000240AA3 /* UIListView.cpp */; }; 507B3B1B1C31BDD30067B53E /* CCLabelAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570192180BCB590088DEC7 /* CCLabelAtlas.cpp */; }; 507B3B1C1C31BDD30067B53E /* CCAutoPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15FB20721AE7BF8600C31518 /* CCAutoPolygon.cpp */; }; - 507B3B1D1C31BDD30067B53E /* UIEditBoxImpl-common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */; }; - 507B3B201C31BDD30067B53E /* CCLabelBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570194180BCB590088DEC7 /* CCLabelBMFont.cpp */; }; 507B3B211C31BDD30067B53E /* edtaa3func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A087AE61860400400196EF5 /* edtaa3func.cpp */; }; - 507B3B221C31BDD30067B53E /* CCPUOnEventFlagObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1721AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp */; }; - 507B3B231C31BDD30067B53E /* CCColliderDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595E180E930E00EF57C3 /* CCColliderDetector.cpp */; }; - 507B3B271C31BDD30067B53E /* CCPUParticleFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18E1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp */; }; - 507B3B291C31BDD30067B53E /* UISlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0918CF08D000240AA3 /* UISlider.cpp */; }; 507B3B2A1C31BDD30067B53E /* DetourNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */; }; - 507B3B2B1C31BDD30067B53E /* CCPhysics3DWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */; }; - 507B3B2C1C31BDD30067B53E /* CCPUOnExpireObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1761AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp */; }; - 507B3B311C31BDD30067B53E /* UILayoutParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FC18CF08D000240AA3 /* UILayoutParameter.cpp */; }; - 507B3B321C31BDD30067B53E /* SingleNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823843B1A259140002C4610 /* SingleNodeReader.cpp */; }; - 507B3B351C31BDD30067B53E /* CCPUDynamicAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1181AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp */; }; - 507B3B371C31BDD30067B53E /* ListViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7618C72017004AD434 /* ListViewReader.cpp */; }; 507B3B381C31BDD30067B53E /* CCLabelTextFormatter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570197180BCB590088DEC7 /* CCLabelTextFormatter.cpp */; }; - 507B3B391C31BDD30067B53E /* CCLabelTTF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570199180BCB590088DEC7 /* CCLabelTTF.cpp */; }; 507B3B3A1C31BDD30067B53E /* CCNinePatchImageParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */; }; - 507B3B3B1C31BDD30067B53E /* CCPUPointEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A01AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp */; }; - 507B3B3C1C31BDD30067B53E /* NodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 382384261A2590F9002C4610 /* NodeReader.cpp */; }; - 507B3B3D1C31BDD30067B53E /* CCActionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5950180E930E00EF57C3 /* CCActionObject.cpp */; }; - 507B3B3E1C31BDD30067B53E /* CCPUTextureAnimatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DE1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.cpp */; }; 507B3B3F1C31BDD30067B53E /* cdt.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB20811AE7C57D00C31518 /* cdt.cc */; }; - 507B3B401C31BDD30067B53E /* CCPUOnPositionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1781AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp */; }; - 507B3B421C31BDD30067B53E /* CCSkinNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306671B60B583001E6D43 /* CCSkinNode.cpp */; }; 507B3B441C31BDD30067B53E /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 507B3B451C31BDD30067B53E /* CCLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701D4180BCB8C0088DEC7 /* CCLayer.cpp */; }; 507B3B471C31BDD30067B53E /* CCTextureCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD811925AB4100A911A9 /* CCTextureCache.cpp */; }; - 507B3B481C31BDD30067B53E /* CCPUMaterialManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1501AA80A6500DDB1C5 /* CCPUMaterialManager.cpp */; }; 507B3B491C31BDD30067B53E /* CCScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701D6180BCB8C0088DEC7 /* CCScene.cpp */; }; 507B3B4A1C31BDD30067B53E /* Vec4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD351925AB0000A911A9 /* Vec4.cpp */; }; - 507B3B4B1C31BDD30067B53E /* CCBillBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */; }; - 507B3B4C1C31BDD30067B53E /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18956BB01A9DFBFD006E9155 /* Particle3DReader.cpp */; }; - 507B3B4D1C31BDD30067B53E /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */; }; - 507B3B501C31BDD30067B53E /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1021AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp */; }; 507B3B511C31BDD30067B53E /* CCTransition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701D8180BCB8C0088DEC7 /* CCTransition.cpp */; }; - 507B3B531C31BDD30067B53E /* CCEventAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */; }; - 507B3B541C31BDD30067B53E /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; - 507B3B551C31BDD30067B53E /* CCLabelBMFontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0E180E26E600808F54 /* CCLabelBMFontLoader.cpp */; }; - 507B3B571C31BDD30067B53E /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F61AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp */; }; - 507B3B581C31BDD30067B53E /* CCThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2B1926664700A911A9 /* CCThread.cpp */; }; - 507B3B591C31BDD30067B53E /* CCUISingleLineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01C1BA9A5550059E678 /* CCUISingleLineTextField.mm */; }; 507B3B5B1C31BDD30067B53E /* CCTransitionPageTurn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701DA180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp */; }; - 507B3B5D1C31BDD30067B53E /* CCPUOnPositionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17A1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp */; }; 507B3B5E1C31BDD30067B53E /* CCTransitionProgress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701DC180BCB8C0088DEC7 /* CCTransitionProgress.cpp */; }; - 507B3B5F1C31BDD30067B53E /* CCSkybox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */; }; - 507B3B601C31BDD30067B53E /* CCFrameBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */; }; 507B3B611C31BDD30067B53E /* CCMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701F3180BCBAD0088DEC7 /* CCMenu.cpp */; }; - 507B3B621C31BDD30067B53E /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840D1A259092002C4610 /* NodeReaderProtocol.cpp */; }; 507B3B631C31BDD30067B53E /* Quaternion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD2A1925AB0000A911A9 /* Quaternion.cpp */; }; 507B3B641C31BDD30067B53E /* CCMenuItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5701F5180BCBAD0088DEC7 /* CCMenuItem.cpp */; }; 507B3B651C31BDD30067B53E /* CCProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 505385011B01887A00793096 /* CCProperties.cpp */; }; - 507B3B671C31BDD30067B53E /* CCPUEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1261AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp */; }; - 507B3B691C31BDD30067B53E /* CCDecorativeDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596C180E930E00EF57C3 /* CCDecorativeDisplay.cpp */; }; - 507B3B6A1C31BDD30067B53E /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8E18C72017004AD434 /* TextReader.cpp */; }; 507B3B6B1C31BDD30067B53E /* Mat4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD231925AB0000A911A9 /* Mat4.cpp */; }; 507B3B6C1C31BDD30067B53E /* CCClippingNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570200180BCBD40088DEC7 /* CCClippingNode.cpp */; }; - 507B3B6D1C31BDD30067B53E /* UIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F018CF08D000240AA3 /* UIButton.cpp */; }; 507B3B6E1C31BDD30067B53E /* CCMotionStreak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570206180BCBDF0088DEC7 /* CCMotionStreak.cpp */; }; 507B3B6F1C31BDD30067B53E /* CCProgressTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57020C180BCBF40088DEC7 /* CCProgressTimer.cpp */; }; - 507B3B701C31BDD30067B53E /* CCArmatureAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5954180E930E00EF57C3 /* CCArmatureAnimation.cpp */; }; 507B3B711C31BDD30067B53E /* CCGLViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */; }; - 507B3B721C31BDD30067B53E /* CCActionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */; }; - 507B3B731C31BDD30067B53E /* TextAtlasReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8518C72017004AD434 /* TextAtlasReader.cpp */; }; 507B3B741C31BDD30067B53E /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */; }; - 507B3B751C31BDD30067B53E /* CCPUEventHandlerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1241AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp */; }; - 507B3B771C31BDD30067B53E /* CCBone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595C180E930E00EF57C3 /* CCBone.cpp */; }; 507B3B781C31BDD30067B53E /* CCRenderTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57020E180BCBF40088DEC7 /* CCRenderTexture.cpp */; }; 507B3B7A1C31BDD30067B53E /* CCParticleBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570219180BCC1A0088DEC7 /* CCParticleBatchNode.cpp */; }; - 507B3B7B1C31BDD30067B53E /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */; }; - 507B3B7C1C31BDD30067B53E /* CCPUDoEnableComponentEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1001AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp */; }; - 507B3B7D1C31BDD30067B53E /* CCPUOnExpireObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1741AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp */; }; - 507B3B7E1C31BDD30067B53E /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FEB1807A56F005B8026 /* SimpleAudioEngine.mm */; }; - 507B3B801C31BDD30067B53E /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168351807AF4E005B8026 /* CCControl.cpp */; }; 507B3B821C31BDD30067B53E /* CCParticleExamples.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57021B180BCC1A0088DEC7 /* CCParticleExamples.cpp */; }; - 507B3B841C31BDD30067B53E /* CCComController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5964180E930E00EF57C3 /* CCComController.cpp */; }; - 507B3B851C31BDD30067B53E /* CCTerrain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */; }; - 507B3B861C31BDD30067B53E /* CCPUScriptCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BA1AA80A6500DDB1C5 /* CCPUScriptCompiler.cpp */; }; 507B3B871C31BDD30067B53E /* CCParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57021D180BCC1A0088DEC7 /* CCParticleSystem.cpp */; }; - 507B3B881C31BDD30067B53E /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F519AAD2F700C27E9E /* CCMeshSkin.cpp */; }; 507B3B891C31BDD30067B53E /* CCCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EACC99C19F5014D00EB3C5E /* CCCamera.cpp */; }; - 507B3B8A1C31BDD30067B53E /* CCPUSineForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C61AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.cpp */; }; 507B3B8B1C31BDD30067B53E /* SocketIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5366180E3374000584C8 /* SocketIO.cpp */; }; 507B3B8F1C31BDD30067B53E /* DetourNavMeshBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */; }; - 507B3B901C31BDD30067B53E /* CCPUVelocityMatchingAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E81AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.cpp */; }; - 507B3B911C31BDD30067B53E /* CCPUOnEmissionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16E1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp */; }; - 507B3B921C31BDD30067B53E /* TextBMFontReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8818C72017004AD434 /* TextBMFontReader.cpp */; }; 507B3B931C31BDD30067B53E /* DetourCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */; }; - 507B3B941C31BDD30067B53E /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */; }; 507B3B951C31BDD30067B53E /* CCFastTMXTiledMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA983195A675C007B4522 /* CCFastTMXTiledMap.cpp */; }; - 507B3B961C31BDD30067B53E /* ArmatureNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */; }; - 507B3B981C31BDD30067B53E /* CCPUFlockCenteringAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1281AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp */; }; - 507B3B991C31BDD30067B53E /* CCPUOnTimeObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1861AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp */; }; - 507B3B9A1C31BDD30067B53E /* CCPUDoScaleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1101AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp */; }; - 507B3B9B1C31BDD30067B53E /* CCNodeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1F180E26E600808F54 /* CCNodeLoader.cpp */; }; - 507B3B9C1C31BDD30067B53E /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EA1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp */; }; - 507B3B9D1C31BDD30067B53E /* WidgetCallBackHandlerProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38ACD1FA1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp */; }; - 507B3B9E1C31BDD30067B53E /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */; }; - 507B3B9F1C31BDD30067B53E /* CCPUGeometryRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1341AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp */; }; 507B3BA31C31BDD30067B53E /* CCFastTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */; }; 507B3BA41C31BDD30067B53E /* CCParticleSystemQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57021F180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp */; }; 507B3BA51C31BDD30067B53E /* CCGLProgramCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD6A1925AB4100A911A9 /* CCGLProgramCache.cpp */; }; - 507B3BA61C31BDD30067B53E /* CCTimeLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4CD194B19E400E608AF /* CCTimeLine.cpp */; }; 507B3BA91C31BDD30067B53E /* CCSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570276180BCC900088DEC7 /* CCSprite.cpp */; }; - 507B3BAB1C31BDD30067B53E /* CCPUColorAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FA1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp */; }; - 507B3BAC1C31BDD30067B53E /* CCComAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5962180E930E00EF57C3 /* CCComAudio.cpp */; }; - 507B3BAD1C31BDD30067B53E /* TriggerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06CAAABC186AD63B0012A414 /* TriggerBase.cpp */; }; - 507B3BAE1C31BDD30067B53E /* UICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F218CF08D000240AA3 /* UICheckBox.cpp */; }; - 507B3BB11C31BDD30067B53E /* CCPUOnCollisionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1641AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp */; }; - 507B3BB21C31BDD30067B53E /* CCPUOnCollisionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1661AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp */; }; - 507B3BB31C31BDD30067B53E /* CCBSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D04180E26E600808F54 /* CCBSequence.cpp */; }; - 507B3BB41C31BDD30067B53E /* CCPUScaleAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B41AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.cpp */; }; - 507B3BB51C31BDD30067B53E /* CCPUDoExpireEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1041AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp */; }; 507B3BB81C31BDD30067B53E /* CCSpriteBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570278180BCC900088DEC7 /* CCSpriteBatchNode.cpp */; }; - 507B3BBA1C31BDD30067B53E /* CCPUListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14E1AA80A6500DDB1C5 /* CCPUListener.cpp */; }; 507B3BBB1C31BDD30067B53E /* CCSpriteFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57027A180BCC900088DEC7 /* CCSpriteFrame.cpp */; }; - 507B3BBC1C31BDD30067B53E /* HttpConnection-winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003191B69735200E83DDD /* HttpConnection-winrt.cpp */; }; - 507B3BBE1C31BDD30067B53E /* UITextField+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01F1BA9A5550059E678 /* UITextField+CCUITextInput.mm */; }; - 507B3BBF1C31BDD30067B53E /* CCPUCollisionAvoidanceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F41AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp */; }; - 507B3BC11C31BDD30067B53E /* CCPUSlaveBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C81AA80A6500DDB1C5 /* CCPUSlaveBehaviour.cpp */; }; - 507B3BC21C31BDD30067B53E /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10E1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp */; }; - 507B3BC31C31BDD30067B53E /* CCBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C595A180E930E00EF57C3 /* CCBatchNode.cpp */; }; - 507B3BC41C31BDD30067B53E /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A15FE51807A56F005B8026 /* CDAudioManager.m */; }; 507B3BC51C31BDD30067B53E /* CCSpriteFrameCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57027C180BCC900088DEC7 /* CCSpriteFrameCache.cpp */; }; 507B3BC61C31BDD30067B53E /* sweep_context.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB20851AE7C57D00C31518 /* sweep_context.cc */; }; - 507B3BC71C31BDD30067B53E /* CCPUSineForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C41AA80A6500DDB1C5 /* CCPUSineForceAffector.cpp */; }; 507B3BC81C31BDD30067B53E /* CCAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57028E180BCCAB0088DEC7 /* CCAnimation.cpp */; }; - 507B3BCA1C31BDD30067B53E /* CCDataReaderHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5968180E930E00EF57C3 /* CCDataReaderHelper.cpp */; }; 507B3BCB1C31BDD30067B53E /* CCVertexAttribBinding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */; }; 507B3BCC1C31BDD30067B53E /* advancing_front.cc in Sources */ = {isa = PBXBuildFile; fileRef = 15FB207F1AE7C57D00C31518 /* advancing_front.cc */; }; - 507B3BCD1C31BDD30067B53E /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; - 507B3BCE1C31BDD30067B53E /* PageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7C18C72017004AD434 /* PageViewReader.cpp */; }; - 507B3BCF1C31BDD30067B53E /* CCParticle3DEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F21A8CA82E00643ABF /* CCParticle3DEmitter.cpp */; }; 507B3BD01C31BDD30067B53E /* CCAnimationCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570290180BCCAB0088DEC7 /* CCAnimationCache.cpp */; }; - 507B3BD11C31BDD30067B53E /* CCPUSphereColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D41AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.cpp */; }; 507B3BD21C31BDD30067B53E /* CCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDCA1925AB6E00A911A9 /* CCConfiguration.cpp */; }; 507B3BD61C31BDD30067B53E /* CCTextFieldTTF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702C6180BCE370088DEC7 /* CCTextFieldTTF.cpp */; }; - 507B3BD71C31BDD30067B53E /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; 507B3BD81C31BDD30067B53E /* CCTileMapAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702E0180BCE750088DEC7 /* CCTileMapAtlas.cpp */; }; - 507B3BD91C31BDD30067B53E /* CCPUTextureAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DC1AA80A6500DDB1C5 /* CCPUTextureAnimator.cpp */; }; 507B3BDA1C31BDD30067B53E /* CCTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702E2180BCE750088DEC7 /* CCTMXLayer.cpp */; }; - 507B3BDB1C31BDD30067B53E /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D32E18E174130051CA34 /* UIHBox.cpp */; }; - 507B3BDD1C31BDD30067B53E /* CCPUScriptTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C01AA80A6500DDB1C5 /* CCPUScriptTranslator.cpp */; }; - 507B3BDE1C31BDD30067B53E /* CCPUOnEventFlagObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1701AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp */; }; - 507B3BDF1C31BDD30067B53E /* CCMotionStreak3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */; }; 507B3BE01C31BDD30067B53E /* CCTMXObjectGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702E4180BCE750088DEC7 /* CCTMXObjectGroup.cpp */; }; - 507B3BE11C31BDD30067B53E /* GameMapReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823841F1A2590DA002C4610 /* GameMapReader.cpp */; }; - 507B3BE21C31BDD30067B53E /* UILayoutManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */; }; - 507B3BE31C31BDD30067B53E /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F119AAD2F700C27E9E /* CCBundleReader.cpp */; }; - 507B3BE41C31BDD30067B53E /* CCPUForceFieldAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12E1AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp */; }; 507B3BE51C31BDD30067B53E /* CCGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1D1925AB0000A911A9 /* CCGeometry.cpp */; }; - 507B3BE61C31BDD30067B53E /* CCPUNoise.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1581AA80A6500DDB1C5 /* CCPUNoise.cpp */; }; - 507B3BE71C31BDD30067B53E /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp */; }; - 507B3BE91C31BDD30067B53E /* CCSpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */; }; 507B3BEA1C31BDD30067B53E /* s3tc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE171925AB6F00A911A9 /* s3tc.cpp */; }; - 507B3BEB1C31BDD30067B53E /* UIRichText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0418CF08D000240AA3 /* UIRichText.cpp */; }; - 507B3BED1C31BDD30067B53E /* CCSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5978180E930E00EF57C3 /* CCSkin.cpp */; }; - 507B3BEE1C31BDD30067B53E /* CCPUJetAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1401AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp */; }; 507B3BF31C31BDD30067B53E /* CCTMXTiledMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702E6180BCE750088DEC7 /* CCTMXTiledMap.cpp */; }; 507B3BF41C31BDD30067B53E /* etc1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE141925AB6F00A911A9 /* etc1.cpp */; }; 507B3BF51C31BDD30067B53E /* CCNS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDF71925AB6E00A911A9 /* CCNS.cpp */; }; 507B3BF61C31BDD30067B53E /* DetourDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */; }; - 507B3BFB1C31BDD30067B53E /* SkeletonNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306731B60B5B2001E6D43 /* SkeletonNodeReader.cpp */; }; - 507B3BFC1C31BDD30067B53E /* CCAllocatorGlobal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033E1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp */; }; - 507B3BFD1C31BDD30067B53E /* CCPUBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E41AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp */; }; - 507B3BFE1C31BDD30067B53E /* CCPUScriptParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BE1AA80A6500DDB1C5 /* CCPUScriptParser.cpp */; }; - 507B3BFF1C31BDD30067B53E /* CCPUBoxEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EC1AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp */; }; - 507B3C001C31BDD30067B53E /* UIVBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33218E174130051CA34 /* UIVBox.cpp */; }; - 507B3C021C31BDD30067B53E /* CCRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD791925AB4100A911A9 /* CCRenderer.cpp */; }; - 507B3C031C31BDD30067B53E /* CCPURender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AA1AA80A6500DDB1C5 /* CCPURender.cpp */; }; - 507B3C051C31BDD30067B53E /* CCPULineEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14A1AA80A6500DDB1C5 /* CCPULineEmitter.cpp */; }; - 507B3C071C31BDD30067B53E /* CocoStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38D9629C1ACA9721007C6FAF /* CocoStudio.cpp */; }; 507B3C081C31BDD30067B53E /* CCTextureAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD7F1925AB4100A911A9 /* CCTextureAtlas.cpp */; }; 507B3C091C31BDD30067B53E /* CCTMXXMLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702E8180BCE750088DEC7 /* CCTMXXMLParser.cpp */; }; - 507B3C0A1C31BDD30067B53E /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D81AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp */; }; 507B3C0B1C31BDD30067B53E /* CCParallaxNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5702FE180BCE890088DEC7 /* CCParallaxNode.cpp */; }; - 507B3C0C1C31BDD30067B53E /* CCPUAlignAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D21AA80A6500DDB1C5 /* CCPUAlignAffector.cpp */; }; 507B3C0F1C31BDD30067B53E /* CCComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570308180BCF190088DEC7 /* CCComponent.cpp */; }; - 507B3C101C31BDD30067B53E /* UIDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */; }; 507B3C121C31BDD30067B53E /* pvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 464AD6E3197EBB1400E502D8 /* pvr.cpp */; }; - 507B3C131C31BDD30067B53E /* CCFrustum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61221A3FFE3D0038DE01 /* CCFrustum.cpp */; }; - 507B3C141C31BDD30067B53E /* CCPUBoxCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E81AA80A6500DDB1C5 /* CCPUBoxCollider.cpp */; }; - 507B3C151C31BDD30067B53E /* CCPUMeshSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1541AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp */; }; - 507B3C161C31BDD30067B53E /* CCPUOnQuotaObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17E1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp */; }; - 507B3C171C31BDD30067B53E /* UIPageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0218CF08D000240AA3 /* UIPageView.cpp */; }; 507B3C181C31BDD30067B53E /* CCComponentContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A57030A180BCF190088DEC7 /* CCComponentContainer.cpp */; }; 507B3C191C31BDD30067B53E /* ccCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDC71925AB6E00A911A9 /* ccCArray.cpp */; }; - 507B3C1A1C31BDD30067B53E /* CCActionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594E180E930E00EF57C3 /* CCActionNode.cpp */; }; - 507B3C1B1C31BDD30067B53E /* CCDisplayFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596E180E930E00EF57C3 /* CCDisplayFactory.cpp */; }; - 507B3C1C1C31BDD30067B53E /* Sprite3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CD41A98F30500C30D34 /* Sprite3DReader.cpp */; }; - 507B3C1D1C31BDD30067B53E /* CCThread-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */; }; - 507B3C1E1C31BDD30067B53E /* UIAbstractCheckButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DBC1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp */; }; 507B3C201C31BDD30067B53E /* CCUserDefault-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0C1925AB6F00A911A9 /* CCUserDefault-android.cpp */; }; 507B3C221C31BDD30067B53E /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570349180BD09B0088DEC7 /* tinyxml2.cpp */; }; 507B3C231C31BDD30067B53E /* CCTexture2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD7D1925AB4100A911A9 /* CCTexture2D.cpp */; }; - 507B3C241C31BDD30067B53E /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1161AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp */; }; - 507B3C251C31BDD30067B53E /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F818CF08D000240AA3 /* UILayout.cpp */; }; 507B3C261C31BDD30067B53E /* ioapi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570350180BD0B00088DEC7 /* ioapi.cpp */; }; - 507B3C271C31BDD30067B53E /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1561AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp */; }; - 507B3C281C31BDD30067B53E /* CCPUForceField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12C1AA80A6500DDB1C5 /* CCPUForceField.cpp */; }; 507B3C291C31BDD30067B53E /* unzip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A570352180BD0B00088DEC7 /* unzip.cpp */; }; - 507B3C2A1C31BDD30067B53E /* CCControlLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D0C180E26E600808F54 /* CCControlLoader.cpp */; }; - 507B3C2B1C31BDD30067B53E /* TextFieldReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8B18C72017004AD434 /* TextFieldReader.cpp */; }; - 507B3C2C1C31BDD30067B53E /* CCPUEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1201AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp */; }; - 507B3C2D1C31BDD30067B53E /* NodeReaderDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3823840B1A259092002C4610 /* NodeReaderDefine.cpp */; }; - 507B3C2E1C31BDD30067B53E /* CCSGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5976180E930E00EF57C3 /* CCSGUIReader.cpp */; }; 507B3C2F1C31BDD30067B53E /* CCCustomCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD661925AB4100A911A9 /* CCCustomCommand.cpp */; }; - 507B3C311C31BDD30067B53E /* ScrollViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7F18C72017004AD434 /* ScrollViewReader.cpp */; }; - 507B3C321C31BDD30067B53E /* UITextView+CCUITextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F0211BA9A5550059E678 /* UITextView+CCUITextInput.mm */; }; - 507B3C331C31BDD30067B53E /* CCSkeletonNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */; }; 507B3C341C31BDD30067B53E /* CCProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDFB1925AB6E00A911A9 /* CCProfiling.cpp */; }; 507B3C351C31BDD30067B53E /* CCTechnique.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 501216981AC473A3009A4BEA /* CCTechnique.cpp */; }; - 507B3C361C31BDD30067B53E /* CCMeshVertexIndexData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17F719AAD2F700C27E9E /* CCMeshVertexIndexData.cpp */; }; 507B3C371C31BDD30067B53E /* CCEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDE01925AB6E00A911A9 /* CCEventListener.cpp */; }; 507B3C381C31BDD30067B53E /* CCRenderState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5012168C1AC47380009A4BEA /* CCRenderState.cpp */; }; - 507B3C391C31BDD30067B53E /* AssetsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5351180E3060000584C8 /* AssetsManager.cpp */; }; 507B3C3B1C31BDD30067B53E /* CCTouch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE051925AB6E00A911A9 /* CCTouch.cpp */; }; - 507B3C3E1C31BDD30067B53E /* CCPUParticleSystem3DTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1921AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp */; }; - 507B3C401C31BDD30067B53E /* CCES2Renderer-ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */; }; 507B3C411C31BDD30067B53E /* cocos2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50272539190BF1B900AAF4ED /* cocos2d.cpp */; }; - 507B3C461C31BDD30067B53E /* CCRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FD19AAD2F700C27E9E /* CCRay.cpp */; }; - 507B3C471C31BDD30067B53E /* UITextBMFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0F18CF08D100240AA3 /* UITextBMFont.cpp */; }; 507B3C491C31BDD30067B53E /* CCEventListenerFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDE61925AB6E00A911A9 /* CCEventListenerFocus.cpp */; }; 507B3C4B1C31BDD30067B53E /* CCEventListenerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDE41925AB6E00A911A9 /* CCEventListenerCustom.cpp */; }; 507B3C4C1C31BDD30067B53E /* CCIMEDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */; }; @@ -2246,133 +1128,50 @@ 507B3C521C31BDD30067B53E /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6D41BA81577005076C7 /* CCTextureCube.cpp */; }; 507B3C551C31BDD30067B53E /* HttpAsynConnection-apple.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2A1A5349A3004E4C60 /* HttpAsynConnection-apple.m */; }; 507B3C561C31BDD30067B53E /* RecastDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F801B04825B00E47F5F /* RecastDump.cpp */; }; - 507B3C571C31BDD30067B53E /* CCPUCircleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F01AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp */; }; - 507B3C581C31BDD30067B53E /* UITextAtlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0D18CF08D100240AA3 /* UITextAtlas.cpp */; }; - 507B3C591C31BDD30067B53E /* CCProcessBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5974180E930E00EF57C3 /* CCProcessBase.cpp */; }; 507B3C5A1C31BDD30067B53E /* DetourAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */; }; - 507B3C5B1C31BDD30067B53E /* CCPUSphereCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D21AA80A6500DDB1C5 /* CCPUSphereCollider.cpp */; }; - 507B3C5C1C31BDD30067B53E /* CCParticleSystemQuadLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D24180E26E600808F54 /* CCParticleSystemQuadLoader.cpp */; }; - 507B3C601C31BDD30067B53E /* CCPUBoxEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EE1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp */; }; - 507B3C611C31BDD30067B53E /* CCTransformHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C597E180E930E00EF57C3 /* CCTransformHelp.cpp */; }; - 507B3C631C31BDD30067B53E /* LayoutReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB7318C72017004AD434 /* LayoutReader.cpp */; }; - 507B3C641C31BDD30067B53E /* CCDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67918F57BE800EFE3A6 /* CCDeprecated.cpp */; }; - 507B3C651C31BDD30067B53E /* CCInputDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5972180E930E00EF57C3 /* CCInputDelegate.cpp */; }; - 507B3C671C31BDD30067B53E /* UIImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F618CF08D000240AA3 /* UIImageView.cpp */; }; 507B3C681C31BDD30067B53E /* DetourCrowd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */; }; 507B3C691C31BDD30067B53E /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; - 507B3C6C1C31BDD30067B53E /* CCPUPathFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1941AA80A6500DDB1C5 /* CCPUPathFollower.cpp */; }; - 507B3C6D1C31BDD30067B53E /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */; }; - 507B3C701C31BDD30067B53E /* CCBatchCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD641925AB4100A911A9 /* CCBatchCommand.cpp */; }; - 507B3C711C31BDD30067B53E /* CCPUBeamRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DE1AA80A6500DDB1C5 /* CCPUBeamRender.cpp */; }; 507B3C721C31BDD30067B53E /* CCRenderCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD761925AB4100A911A9 /* CCRenderCommand.cpp */; }; - 507B3C731C31BDD30067B53E /* CCPUAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D01AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp */; }; - 507B3C741C31BDD30067B53E /* CCPUPlaneColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19C1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp */; }; - 507B3C761C31BDD30067B53E /* UIPageViewIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5A738941BB0051F00BAAEF8 /* UIPageViewIndicator.cpp */; }; - 507B3C771C31BDD30067B53E /* CCPUColorAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F81AA80A6500DDB1C5 /* CCPUColorAffector.cpp */; }; - 507B3C781C31BDD30067B53E /* CCPUBaseForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DA1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp */; }; - 507B3C791C31BDD30067B53E /* UILoadingBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */; }; 507B3C7A1C31BDD30067B53E /* CCScriptSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE031925AB6E00A911A9 /* CCScriptSupport.cpp */; }; - 507B3C7C1C31BDD30067B53E /* BoneNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306701B60B5B2001E6D43 /* BoneNodeReader.cpp */; }; 507B3C7D1C31BDD30067B53E /* CCMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5012169E1AC473AD009A4BEA /* CCMaterial.cpp */; }; - 507B3C7E1C31BDD30067B53E /* CCPUPointEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19E1AA80A6500DDB1C5 /* CCPUPointEmitter.cpp */; }; 507B3C811C31BDD30067B53E /* CCEventListenerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176631960F89B00DE83F5 /* CCEventListenerController.cpp */; }; 507B3C831C31BDD30067B53E /* CCEAGLView-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */; }; 507B3C841C31BDD30067B53E /* AudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */; }; 507B3C861C31BDD30067B53E /* HttpCookie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2C1A5349A3004E4C60 /* HttpCookie.cpp */; }; - 507B3C871C31BDD30067B53E /* AssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */; }; 507B3C881C31BDD30067B53E /* CCQuadCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD741925AB4100A911A9 /* CCQuadCommand.cpp */; }; - 507B3C8A1C31BDD30067B53E /* CCLayerGradientLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D14180E26E600808F54 /* CCLayerGradientLoader.cpp */; }; - 507B3C8C1C31BDD30067B53E /* CCActionTimelineCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0634A4C7194B19E400E608AF /* CCActionTimelineCache.cpp */; }; - 507B3C8D1C31BDD30067B53E /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */; }; - 507B3C8E1C31BDD30067B53E /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */; }; - 507B3C8F1C31BDD30067B53E /* CCActionFrameEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C594A180E930E00EF57C3 /* CCActionFrameEasing.cpp */; }; - 507B3C911C31BDD30067B53E /* CCPUOnQuotaObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17C1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp */; }; - 507B3C931C31BDD30067B53E /* CCPUEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1221AA80A6500DDB1C5 /* CCPUEventHandler.cpp */; }; - 507B3C941C31BDD30067B53E /* CCDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5970180E930E00EF57C3 /* CCDisplayManager.cpp */; }; - 507B3C951C31BDD30067B53E /* CCPUVortexAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */; }; - 507B3C961C31BDD30067B53E /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */; }; - 507B3C981C31BDD30067B53E /* CCPULineAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1421AA80A6500DDB1C5 /* CCPULineAffector.cpp */; }; - 507B3C9A1C31BDD30067B53E /* CCGLBufferedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */; }; - 507B3C9B1C31BDD30067B53E /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168461807AF4E005B8026 /* CCControlSwitch.cpp */; }; - 507B3C9C1C31BDD30067B53E /* CCPUSphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D01AA80A6500DDB1C5 /* CCPUSphere.cpp */; }; - 507B3C9D1C31BDD30067B53E /* CCUtilMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5984180E930E00EF57C3 /* CCUtilMath.cpp */; }; - 507B3C9E1C31BDD30067B53E /* CCPUBaseColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D81AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp */; }; - 507B3C9F1C31BDD30067B53E /* CCPUScriptLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BC1AA80A6500DDB1C5 /* CCPUScriptLexer.cpp */; }; 507B3CA01C31BDD30067B53E /* atitc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDC11925AB6E00A911A9 /* atitc.cpp */; }; - 507B3CA21C31BDD30067B53E /* CCPUObserverManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15C1AA80A6500DDB1C5 /* CCPUObserverManager.cpp */; }; 507B3CA31C31BDD30067B53E /* AudioPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50CB247419D9C5A100687767 /* AudioPlayer.mm */; }; 507B3CA41C31BDD30067B53E /* CCRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDFE1925AB6E00A911A9 /* CCRef.cpp */; }; - 507B3CA51C31BDD30067B53E /* CCUIMultilineTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F01A1BA9A5550059E678 /* CCUIMultilineTextField.mm */; }; 507B3CA61C31BDD30067B53E /* clipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85B374381B204B9400C488D6 /* clipper.cpp */; }; - 507B3CA71C31BDD30067B53E /* CCLabelTTFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D10180E26E600808F54 /* CCLabelTTFLoader.cpp */; }; - 507B3CA91C31BDD30067B53E /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */; }; - 507B3CAA1C31BDD30067B53E /* CCPUForceFieldAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1301AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp */; }; - 507B3CAB1C31BDD30067B53E /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */; }; - 507B3CAD1C31BDD30067B53E /* CCPUCircleEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F21AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp */; }; 507B3CAF1C31BDD30067B53E /* CCEventController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176611960F89B00DE83F5 /* CCEventController.cpp */; }; - 507B3CB01C31BDD30067B53E /* Node3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 182C5CB01A95964700C30D34 /* Node3DReader.cpp */; }; 507B3CB11C31BDD30067B53E /* CCAsyncTaskPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */; }; 507B3CB21C31BDD30067B53E /* CCConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDCC1925AB6E00A911A9 /* CCConsole.cpp */; }; - 507B3CB51C31BDD30067B53E /* CCPUVortexAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EE1AA80A6500DDB1C5 /* CCPUVortexAffector.cpp */; }; - 507B3CB61C31BDD30067B53E /* CCPULineEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14C1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp */; }; - 507B3CB71C31BDD30067B53E /* CCPUParticleFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18C1AA80A6500DDB1C5 /* CCPUParticleFollower.cpp */; }; 507B3CB81C31BDD30067B53E /* CCCameraBackgroundBrush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */; }; - 507B3CB91C31BDD30067B53E /* CCPUTextureRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E21AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.cpp */; }; 507B3CBA1C31BDD30067B53E /* CCDirectorCaller-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */; }; - 507B3CBB1C31BDD30067B53E /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FE1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp */; }; - 507B3CBC1C31BDD30067B53E /* CCPhysics3DShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */; }; - 507B3CBD1C31BDD30067B53E /* CCComAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5960180E930E00EF57C3 /* CCComAttribute.cpp */; }; - 507B3CBE1C31BDD30067B53E /* CCNode+CCBRelativePositioning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D1D180E26E600808F54 /* CCNode+CCBRelativePositioning.cpp */; }; 507B3CBF1C31BDD30067B53E /* AudioCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50CB247019D9C5A100687767 /* AudioCache.mm */; }; - 507B3CC01C31BDD30067B53E /* CCPUTranslateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E41AA80A6500DDB1C5 /* CCPUTranslateManager.cpp */; }; 507B3CC21C31BDD30067B53E /* Vec3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD321925AB0000A911A9 /* Vec3.cpp */; }; - 507B3CC41C31BDD30067B53E /* CSLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38B8E2D319E66581002D7CE7 /* CSLoader.cpp */; }; - 507B3CC51C31BDD30067B53E /* CCNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0BF1B18492D006762CB /* CCNavMesh.cpp */; }; - 507B3CC61C31BDD30067B53E /* CCPURendererTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AC1AA80A6500DDB1C5 /* CCPURendererTranslator.cpp */; }; - 507B3CC71C31BDD30067B53E /* CCPhysics3DComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */; }; 507B3CCA1C31BDD30067B53E /* CCGLView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF251926664700A911A9 /* CCGLView.cpp */; }; - 507B3CCC1C31BDD30067B53E /* CCPUPathFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1961AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp */; }; - 507B3CCD1C31BDD30067B53E /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1121AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp */; }; 507B3CCE1C31BDD30067B53E /* CCLock-apple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */; }; 507B3CD01C31BDD30067B53E /* ccUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0F1925AB6F00A911A9 /* ccUtils.cpp */; }; 507B3CD21C31BDD30067B53E /* CCEventListenerMouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDEA1925AB6E00A911A9 /* CCEventListenerMouse.cpp */; }; - 507B3CD41C31BDD30067B53E /* CCPUTextureRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E01AA80A6500DDB1C5 /* CCPUTextureRotator.cpp */; }; - 507B3CD51C31BDD30067B53E /* CCPUEmitterManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11E1AA80A6500DDB1C5 /* CCPUEmitterManager.cpp */; }; 507B3CD61C31BDD30067B53E /* CCFileUtils-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */; }; 507B3CD71C31BDD30067B53E /* ccUTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0D1925AB6F00A911A9 /* ccUTF8.cpp */; }; - 507B3CD81C31BDD30067B53E /* CCDatas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C596A180E930E00EF57C3 /* CCDatas.cpp */; }; 507B3CD91C31BDD30067B53E /* ccFPSImages.c in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDF31925AB6E00A911A9 /* ccFPSImages.c */; }; 507B3CDB1C31BDD30067B53E /* CCEventAcceleration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD61925AB6E00A911A9 /* CCEventAcceleration.cpp */; }; - 507B3CDD1C31BDD30067B53E /* CCPUPositionEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp */; }; - 507B3CDE1C31BDD30067B53E /* CCTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8C5980180E930E00EF57C3 /* CCTween.cpp */; }; 507B3CDF1C31BDD30067B53E /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C02E0518E91123004B7456 /* xxhash.c */; }; - 507B3CE01C31BDD30067B53E /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17FB19AAD2F700C27E9E /* CCObjLoader.cpp */; }; - 507B3CE11C31BDD30067B53E /* CCAllocatorDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */; }; - 507B3CE21C31BDD30067B53E /* CCPUOnClearObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1621AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp */; }; - 507B3CE31C31BDD30067B53E /* CCUIEditBoxIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2980F0181BA9A5550059E678 /* CCUIEditBoxIOS.mm */; }; - 507B3CE41C31BDD30067B53E /* CCPUVertexEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EC1AA80A6500DDB1C5 /* CCPUVertexEmitter.cpp */; }; - 507B3CE51C31BDD30067B53E /* CCNavMeshUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */; }; - 507B3CE61C31BDD30067B53E /* CCPUScaleVelocityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B61AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.cpp */; }; 507B3CE81C31BDD30067B53E /* TGAlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE191925AB6F00A911A9 /* TGAlib.cpp */; }; 507B3CE91C31BDD30067B53E /* CCDownloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50693C5C1B6BF2AE005C5820 /* CCDownloader.cpp */; }; - 507B3CEA1C31BDD30067B53E /* Light3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C261F261BE7528900707478 /* Light3DReader.cpp */; }; - 507B3CEB1C31BDD30067B53E /* CCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */; }; - 507B3CEC1C31BDD30067B53E /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12A1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp */; }; 507B3CEE1C31BDD30067B53E /* CCDevice-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D11926736A00CD74DD /* CCDevice-ios.mm */; }; 507B3CF11C31BDD30067B53E /* CCUserDefault-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0B1925AB6F00A911A9 /* CCUserDefault-apple.mm */; }; 507B3CF21C31BDD30067B53E /* ConvertUTF.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A1645AE191B726C008C7C7F /* ConvertUTF.c */; }; - 507B3CF41C31BDD30067B53E /* CCPUMaterialTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1521AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp */; }; 507B3CF51C31BDD30067B53E /* CCData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDCE1925AB6E00A911A9 /* CCData.cpp */; }; 507B3CF71C31BDD30067B53E /* ConvertUTFWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1645AF191B726C008C7C7F /* ConvertUTFWrapper.cpp */; }; 507B3CF81C31BDD30067B53E /* DetourProximityGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */; }; 507B3CF91C31BDD30067B53E /* CCFontCharMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */; }; 507B3CFA1C31BDD30067B53E /* DetourNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */; }; - 507B3CFC1C31BDD30067B53E /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */; }; 507B3CFE1C31BDD30067B53E /* CCEventMouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDEE1925AB6E00A911A9 /* CCEventMouse.cpp */; }; - 507B3CFF1C31BDD30067B53E /* CCPUScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B21AA80A6500DDB1C5 /* CCPUScaleAffector.cpp */; }; 507B3D001C31BDD30067B53E /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; }; 507B3D011C31BDD30067B53E /* CCGLProgramStateCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD6E1925AB4100A911A9 /* CCGLProgramStateCache.cpp */; }; - 507B3D041C31BDD30067B53E /* CCPUOnTimeObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1841AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp */; }; 507B3D051C31BDD30067B53E /* WebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF5368180E3374000584C8 /* WebSocket.cpp */; }; 507B3D071C31BDD30067B53E /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5387180E35AC000584C8 /* libwebsockets.a */; }; 507B3D081C31BDD30067B53E /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 292F1A5C1A5151CE00E479F8 /* libssl.a */; }; @@ -2385,678 +1184,259 @@ 507B3D0F1C31BDD30067B53E /* libwebp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A5703BA180BD2800088DEC7 /* libwebp.a */; }; 507B3D101C31BDD30067B53E /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A57052D180BD3280088DEC7 /* libfreetype.a */; }; 507B3D121C31BDD30067B53E /* CCStdC-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DE1926736A00CD74DD /* CCStdC-ios.h */; }; - 507B3D141C31BDD30067B53E /* CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01D1BA9A5550059E678 /* CCUITextInput.h */; }; - 507B3D161C31BDD30067B53E /* CCPUPathFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1951AA80A6500DDB1C5 /* CCPUPathFollower.h */; }; - 507B3D171C31BDD30067B53E /* UITextField+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01E1BA9A5550059E678 /* UITextField+CCUITextInput.h */; }; - 507B3D181C31BDD30067B53E /* CCPhysicsContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170711807CE7A005B8026 /* CCPhysicsContact.h */; }; 507B3D1C1C31BDD30067B53E /* CCCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EACC99D19F5014D00EB3C5E /* CCCamera.h */; }; - 507B3D1F1C31BDD30067B53E /* CCPULinearForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1491AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h */; }; 507B3D211C31BDD30067B53E /* CCGroupCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD731925AB4100A911A9 /* CCGroupCommand.h */; }; - 507B3D221C31BDD30067B53E /* CCLayerColorLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D13180E26E600808F54 /* CCLayerColorLoader.h */; }; 507B3D231C31BDD30067B53E /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD719BFAF4400EF68ED /* CCApplication.h */; }; - 507B3D251C31BDD30067B53E /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EA19AAD2F700C27E9E /* CCAnimationCurve.h */; }; - 507B3D271C31BDD30067B53E /* CCPUTextureAnimatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DF1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.h */; }; 507B3D281C31BDD30067B53E /* CCPlatformDefine-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DD1926736A00CD74DD /* CCPlatformDefine-ios.h */; }; - 507B3D291C31BDD30067B53E /* CocoStudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5986180E930E00EF57C3 /* CocoStudio.h */; }; - 507B3D2A1C31BDD30067B53E /* CCPhysicsShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170761807CE7A005B8026 /* CCPhysicsShape.h */; }; - 507B3D2B1C31BDD30067B53E /* CCOBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FA19AAD2F700C27E9E /* CCOBB.h */; }; - 507B3D2D1C31BDD30067B53E /* CCPUOnEventFlagObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1711AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h */; }; - 507B3D2E1C31BDD30067B53E /* CCBMemberVariableAssigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D00180E26E600808F54 /* CCBMemberVariableAssigner.h */; }; - 507B3D301C31BDD30067B53E /* CCPUParticleFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18F1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h */; }; - 507B3D311C31BDD30067B53E /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; 507B3D321C31BDD30067B53E /* CCAffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */; }; 507B3D331C31BDD30067B53E /* ccShader_PositionColorLengthTexture.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA06191D591000CE6051 /* ccShader_PositionColorLengthTexture.vert */; }; - 507B3D341C31BDD30067B53E /* UITextAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0E18CF08D100240AA3 /* UITextAtlas.h */; }; 507B3D361C31BDD30067B53E /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB207C1AE7C57D00C31518 /* utils.h */; }; - 507B3D371C31BDD30067B53E /* CCPUForceField.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12D1AA80A6500DDB1C5 /* CCPUForceField.h */; }; - 507B3D391C31BDD30067B53E /* CCPUJetAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13F1AA80A6500DDB1C5 /* CCPUJetAffector.h */; }; - 507B3D3A1C31BDD30067B53E /* CCEventListenerAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */; }; - 507B3D3C1C31BDD30067B53E /* CCAllocatorGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033F1A3B51AA00825BB5 /* CCAllocatorGlobal.h */; }; - 507B3D3F1C31BDD30067B53E /* CCPUScriptCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BB1AA80A6500DDB1C5 /* CCPUScriptCompiler.h */; }; - 507B3D401C31BDD30067B53E /* CCPURibbonTrail.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AF1AA80A6500DDB1C5 /* CCPURibbonTrail.h */; }; 507B3D411C31BDD30067B53E /* CCEventMouse.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDEF1925AB6E00A911A9 /* CCEventMouse.h */; }; - 507B3D431C31BDD30067B53E /* CCPhysicsJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170731807CE7A005B8026 /* CCPhysicsJoint.h */; }; - 507B3D441C31BDD30067B53E /* CCPUScriptParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BF1AA80A6500DDB1C5 /* CCPUScriptParser.h */; }; - 507B3D451C31BDD30067B53E /* CCPUVortexAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */; }; 507B3D461C31BDD30067B53E /* poly2tri.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB207D1AE7C57D00C31518 /* poly2tri.h */; }; - 507B3D481C31BDD30067B53E /* CCPhysicsBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */; }; 507B3D491C31BDD30067B53E /* CCRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFF1925AB6E00A911A9 /* CCRef.h */; }; - 507B3D4B1C31BDD30067B53E /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; 507B3D4C1C31BDD30067B53E /* CCGLProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD6D1925AB4100A911A9 /* CCGLProgramState.h */; }; - 507B3D4D1C31BDD30067B53E /* CCPhysicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A170781807CE7A005B8026 /* CCPhysicsWorld.h */; }; 507B3D4E1C31BDD30067B53E /* ccShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7C1925AB4100A911A9 /* ccShaders.h */; }; - 507B3D4F1C31BDD30067B53E /* SliderReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8318C72017004AD434 /* SliderReader.h */; }; - 507B3D501C31BDD30067B53E /* UIRichText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0518CF08D000240AA3 /* UIRichText.h */; }; - 507B3D511C31BDD30067B53E /* CCPUScaleAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B31AA80A6500DDB1C5 /* CCPUScaleAffector.h */; }; - 507B3D551C31BDD30067B53E /* UIEditBoxImpl-common.h in Headers */ = {isa = PBXBuildFile; fileRef = A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */; }; 507B3D571C31BDD30067B53E /* ccFPSImages.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF41925AB6E00A911A9 /* ccFPSImages.h */; }; - 507B3D5A1C31BDD30067B53E /* TriggerObj.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAAC1186AD63B0012A414 /* TriggerObj.h */; }; - 507B3D5B1C31BDD30067B53E /* CCPULineAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1451AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h */; }; 507B3D5C1C31BDD30067B53E /* ccCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDC81925AB6E00A911A9 /* ccCArray.h */; }; - 507B3D5E1C31BDD30067B53E /* AssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */; }; - 507B3D5F1C31BDD30067B53E /* CCPUSineForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C71AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.h */; }; - 507B3D631C31BDD30067B53E /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; }; - 507B3D651C31BDD30067B53E /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1031AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h */; }; 507B3D661C31BDD30067B53E /* CCLock-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock-apple.h */; }; - 507B3D681C31BDD30067B53E /* SingleNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823843C1A259140002C4610 /* SingleNodeReader.h */; }; - 507B3D691C31BDD30067B53E /* CCPUDoPlacementParticleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10D1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h */; }; - 507B3D6D1C31BDD30067B53E /* CCPUOnVelocityObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1891AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h */; }; - 507B3D6F1C31BDD30067B53E /* CCPhysicsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */; }; 507B3D701C31BDD30067B53E /* ccShader_Position_uColor.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0A191D591000CE6051 /* ccShader_Position_uColor.vert */; }; 507B3D711C31BDD30067B53E /* DetourStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F911B04825B00E47F5F /* DetourStatus.h */; }; - 507B3D721C31BDD30067B53E /* UIRadioButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DC71B3C05BA002B0419 /* UIRadioButton.h */; }; - 507B3D731C31BDD30067B53E /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1171AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h */; }; - 507B3D741C31BDD30067B53E /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */; }; 507B3D751C31BDD30067B53E /* DetourMath.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F881B04825B00E47F5F /* DetourMath.h */; }; - 507B3D771C31BDD30067B53E /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168491807AF4E005B8026 /* CCControlUtils.h */; }; - 507B3D781C31BDD30067B53E /* CCActionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5951180E930E00EF57C3 /* CCActionObject.h */; }; - 507B3D7A1C31BDD30067B53E /* CCPUGravityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1371AA80A6500DDB1C5 /* CCPUGravityAffector.h */; }; - 507B3D7B1C31BDD30067B53E /* CCActionTimelineCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C8194B19E400E608AF /* CCActionTimelineCache.h */; }; - 507B3D7D1C31BDD30067B53E /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8C18C72017004AD434 /* TextFieldReader.h */; }; - 507B3D7E1C31BDD30067B53E /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E919AAD2F700C27E9E /* CCAnimation3D.h */; }; 507B3D7F1C31BDD30067B53E /* CCValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE121925AB6F00A911A9 /* CCValue.h */; }; - 507B3D801C31BDD30067B53E /* CCUIMultilineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0191BA9A5550059E678 /* CCUIMultilineTextField.h */; }; 507B3D821C31BDD30067B53E /* firePngData.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE161925AB6F00A911A9 /* firePngData.h */; }; - 507B3D831C31BDD30067B53E /* CCPrimitive.h in Headers */ = {isa = PBXBuildFile; fileRef = B257B44D1989D5E800D9A687 /* CCPrimitive.h */; }; 507B3D841C31BDD30067B53E /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */; }; - 507B3D851C31BDD30067B53E /* CCPUDoScaleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1111AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h */; }; 507B3D861C31BDD30067B53E /* DetourPathQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */; }; - 507B3D881C31BDD30067B53E /* CCNavMeshObstacle.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */; }; - 507B3D891C31BDD30067B53E /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F019AAD2F700C27E9E /* CCBundle3DData.h */; }; - 507B3D8A1C31BDD30067B53E /* CCActionManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594D180E930E00EF57C3 /* CCActionManagerEx.h */; }; - 507B3D8B1C31BDD30067B53E /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE71807A56F005B8026 /* CDOpenALSupport.h */; }; - 507B3D8C1C31BDD30067B53E /* CCDataVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD11925AB6E00A911A9 /* CCDataVisitor.h */; }; - 507B3D8E1C31BDD30067B53E /* TextBMFontReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8918C72017004AD434 /* TextBMFontReader.h */; }; 507B3D8F1C31BDD30067B53E /* CCAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570048180BC5A10088DEC7 /* CCAction.h */; }; - 507B3D921C31BDD30067B53E /* UIRelativeBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33118E174130051CA34 /* UIRelativeBox.h */; }; 507B3D931C31BDD30067B53E /* CCGLViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */; }; - 507B3D941C31BDD30067B53E /* CCScrollViewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D29180E26E600808F54 /* CCScrollViewLoader.h */; }; - 507B3D961C31BDD30067B53E /* CocosBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2C180E26E600808F54 /* CocosBuilder.h */; }; - 507B3D971C31BDD30067B53E /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6EE1BA81821005076C7 /* GameNode3DReader.h */; }; - 507B3D991C31BDD30067B53E /* CCPUAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */; }; 507B3D9C1C31BDD30067B53E /* ccUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE0E1925AB6F00A911A9 /* ccUTF8.h */; }; 507B3DA01C31BDD30067B53E /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; 507B3DA11C31BDD30067B53E /* DetourNavMeshQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */; }; 507B3DA21C31BDD30067B53E /* CCActionCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57004A180BC5A10088DEC7 /* CCActionCamera.h */; }; - 507B3DA51C31BDD30067B53E /* CCControlLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0D180E26E600808F54 /* CCControlLoader.h */; }; - 507B3DA61C31BDD30067B53E /* CCLabelTTFLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D11180E26E600808F54 /* CCLabelTTFLoader.h */; }; 507B3DA71C31BDD30067B53E /* CCActionCatmullRom.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57004C180BC5A10088DEC7 /* CCActionCatmullRom.h */; }; - 507B3DA81C31BDD30067B53E /* CCSGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5977180E930E00EF57C3 /* CCSGUIReader.h */; }; 507B3DA91C31BDD30067B53E /* ccShader_PositionColorLengthTexture.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA07191D591000CE6051 /* ccShader_PositionColorLengthTexture.frag */; }; - 507B3DAA1C31BDD30067B53E /* CCAllocatorDiagnostics.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */; }; - 507B3DAB1C31BDD30067B53E /* CCPUEventHandlerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1251AA80A6500DDB1C5 /* CCPUEventHandlerManager.h */; }; 507B3DAD1C31BDD30067B53E /* CCClippingRectangleNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */; }; - 507B3DAE1C31BDD30067B53E /* CCPUVelocityMatchingAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EB1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h */; }; - 507B3DB01C31BDD30067B53E /* CCPUScaleAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B51AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.h */; }; 507B3DB11C31BDD30067B53E /* fastlz.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA61B04825B00E47F5F /* fastlz.h */; }; - 507B3DB21C31BDD30067B53E /* CCPUVertexEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1ED1AA80A6500DDB1C5 /* CCPUVertexEmitter.h */; }; - 507B3DB31C31BDD30067B53E /* CCPUCollisionAvoidanceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F51AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h */; }; 507B3DB51C31BDD30067B53E /* CCVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE131925AB6F00A911A9 /* CCVector.h */; }; 507B3DB61C31BDD30067B53E /* CCEventCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD91925AB6E00A911A9 /* CCEventCustom.h */; }; - 507B3DB81C31BDD30067B53E /* CCPUOnCountObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16B1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h */; }; 507B3DB91C31BDD30067B53E /* CCDownloader-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */; }; - 507B3DBA1C31BDD30067B53E /* CCFrameBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */; }; - 507B3DBC1C31BDD30067B53E /* CCPUAlignAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D51AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h */; }; 507B3DBD1C31BDD30067B53E /* CCActionEase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57004E180BC5A10088DEC7 /* CCActionEase.h */; }; 507B3DBE1C31BDD30067B53E /* CCActionGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570050180BC5A10088DEC7 /* CCActionGrid.h */; }; - 507B3DBF1C31BDD30067B53E /* CCComController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5965180E930E00EF57C3 /* CCComController.h */; }; - 507B3DC01C31BDD30067B53E /* NodeReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840E1A259092002C4610 /* NodeReaderProtocol.h */; }; 507B3DC11C31BDD30067B53E /* ccShader_Label_outline.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0D191D591000CE6051 /* ccShader_Label_outline.frag */; }; 507B3DC21C31BDD30067B53E /* CCActionGrid3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570052180BC5A10088DEC7 /* CCActionGrid3D.h */; }; 507B3DC31C31BDD30067B53E /* Vec4.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD361925AB0000A911A9 /* Vec4.h */; }; - 507B3DC41C31BDD30067B53E /* CCPURandomiser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A71AA80A6500DDB1C5 /* CCPURandomiser.h */; }; - 507B3DC51C31BDD30067B53E /* PageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7D18C72017004AD434 /* PageViewReader.h */; }; - 507B3DC71C31BDD30067B53E /* CCMotionStreak3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */; }; - 507B3DCC1C31BDD30067B53E /* CCBool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67818F57BE800EFE3A6 /* CCBool.h */; }; - 507B3DCD1C31BDD30067B53E /* CCPUDoStopSystemEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1151AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h */; }; - 507B3DCE1C31BDD30067B53E /* CSParse3DBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CAD1A95961600C30D34 /* CSParse3DBinary_generated.h */; }; - 507B3DCF1C31BDD30067B53E /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180219AAD2F700C27E9E /* CCSprite3D.h */; }; 507B3DD01C31BDD30067B53E /* AudioPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CB247319D9C5A100687767 /* AudioPlayer.h */; }; 507B3DD11C31BDD30067B53E /* CCActionInstant.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570054180BC5A10088DEC7 /* CCActionInstant.h */; }; 507B3DD21C31BDD30067B53E /* CCEventController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176621960F89B00DE83F5 /* CCEventController.h */; }; - 507B3DD31C31BDD30067B53E /* CCNode+CCBRelativePositioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1E180E26E600808F54 /* CCNode+CCBRelativePositioning.h */; }; - 507B3DD41C31BDD30067B53E /* NodeReaderDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823840C1A259092002C4610 /* NodeReaderDefine.h */; }; 507B3DD51C31BDD30067B53E /* CCEventListenerTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDED1925AB6E00A911A9 /* CCEventListenerTouch.h */; }; 507B3DD61C31BDD30067B53E /* WebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5369180E3374000584C8 /* WebSocket.h */; }; - 507B3DD81C31BDD30067B53E /* CCPUMaterialManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1511AA80A6500DDB1C5 /* CCPUMaterialManager.h */; }; - 507B3DD91C31BDD30067B53E /* FlatBuffersSerialize.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384061A25900F002C4610 /* FlatBuffersSerialize.h */; }; 507B3DDB1C31BDD30067B53E /* CCActionInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570056180BC5A10088DEC7 /* CCActionInterval.h */; }; - 507B3DDC1C31BDD30067B53E /* CCPUEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1231AA80A6500DDB1C5 /* CCPUEventHandler.h */; }; - 507B3DDD1C31BDD30067B53E /* CCActionFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5949180E930E00EF57C3 /* CCActionFrame.h */; }; - 507B3DDE1C31BDD30067B53E /* CCActionFrameEasing.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594B180E930E00EF57C3 /* CCActionFrameEasing.h */; }; 507B3DDF1C31BDD30067B53E /* CCActionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570058180BC5A10088DEC7 /* CCActionManager.h */; }; - 507B3DE01C31BDD30067B53E /* CCPUObserverManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15D1AA80A6500DDB1C5 /* CCPUObserverManager.h */; }; - 507B3DE11C31BDD30067B53E /* CCLayerLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D17180E26E600808F54 /* CCLayerLoader.h */; }; - 507B3DE41C31BDD30067B53E /* CCPUGeometryRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1351AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h */; }; 507B3DE91C31BDD30067B53E /* CCGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF261926664700A911A9 /* CCGLView.h */; }; 507B3DEB1C31BDD30067B53E /* CCActionPageTurn3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57005A180BC5A10088DEC7 /* CCActionPageTurn3D.h */; }; - 507B3DEC1C31BDD30067B53E /* UIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F518CF08D000240AA3 /* UIHelper.h */; }; - 507B3DED1C31BDD30067B53E /* CCNavMeshUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C81B18492D006762CB /* CCNavMeshUtils.h */; }; - 507B3DEF1C31BDD30067B53E /* CCPUBaseForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DB1AA80A6500DDB1C5 /* CCPUBaseForceAffector.h */; }; - 507B3DF01C31BDD30067B53E /* CCPUNoise.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1591AA80A6500DDB1C5 /* CCPUNoise.h */; }; - 507B3DF11C31BDD30067B53E /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EA18CF08D000240AA3 /* CocosGUI.h */; }; 507B3DF21C31BDD30067B53E /* CCActionProgressTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57005C180BC5A10088DEC7 /* CCActionProgressTimer.h */; }; - 507B3DF41C31BDD30067B53E /* CCPUBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E11AA80A6500DDB1C5 /* CCPUBehaviour.h */; }; 507B3DF51C31BDD30067B53E /* CCActionTiledGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57005E180BC5A10088DEC7 /* CCActionTiledGrid.h */; }; - 507B3DF61C31BDD30067B53E /* CCPUEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1271AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h */; }; 507B3DF81C31BDD30067B53E /* ioapi_mem.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8C62A119E52C6400000516 /* ioapi_mem.h */; }; 507B3DFA1C31BDD30067B53E /* CCActionTween.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570060180BC5A10088DEC7 /* CCActionTween.h */; }; 507B3DFB1C31BDD30067B53E /* CCAtlasNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570097180BC5C10088DEC7 /* CCAtlasNode.h */; }; - 507B3DFC1C31BDD30067B53E /* cocos3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180519AAD2F700C27E9E /* cocos3d.h */; }; 507B3DFD1C31BDD30067B53E /* CCNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57009D180BC5D20088DEC7 /* CCNode.h */; }; - 507B3DFE1C31BDD30067B53E /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17ED19AAD2F700C27E9E /* CCAttachNode.h */; }; - 507B3E001C31BDD30067B53E /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */; }; - 507B3E011C31BDD30067B53E /* CCControlHuePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683D1807AF4E005B8026 /* CCControlHuePicker.h */; }; - 507B3E021C31BDD30067B53E /* CCPUOnRandomObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1831AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h */; }; - 507B3E031C31BDD30067B53E /* CCPUObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15B1AA80A6500DDB1C5 /* CCPUObserver.h */; }; - 507B3E041C31BDD30067B53E /* CCBSequenceProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D07180E26E600808F54 /* CCBSequenceProperty.h */; }; - 507B3E051C31BDD30067B53E /* CCPUBoxColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EB1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h */; }; - 507B3E061C31BDD30067B53E /* BoneNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306711B60B5B2001E6D43 /* BoneNodeReader.h */; }; 507B3E081C31BDD30067B53E /* CCDirectorCaller-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D21926736A00CD74DD /* CCDirectorCaller-ios.h */; }; - 507B3E091C31BDD30067B53E /* CCTimelineMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CF194B19E400E608AF /* CCTimelineMacro.h */; }; - 507B3E0C1C31BDD30067B53E /* CCPUColorAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F91AA80A6500DDB1C5 /* CCPUColorAffector.h */; }; - 507B3E0E1C31BDD30067B53E /* UIPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0318CF08D000240AA3 /* UIPageView.h */; }; 507B3E0F1C31BDD30067B53E /* CCCustomCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD671925AB4100A911A9 /* CCCustomCommand.h */; }; - 507B3E101C31BDD30067B53E /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306721B60B5B2001E6D43 /* CSBoneBinary_generated.h */; }; 507B3E111C31BDD30067B53E /* ObjectFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 299754F3193EC95400A54AC3 /* ObjectFactory.h */; }; 507B3E121C31BDD30067B53E /* advancing_front.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20801AE7C57D00C31518 /* advancing_front.h */; }; 507B3E131C31BDD30067B53E /* ccMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF51925AB6E00A911A9 /* ccMacros.h */; }; - 507B3E141C31BDD30067B53E /* CCPUPointEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19F1AA80A6500DDB1C5 /* CCPUPointEmitter.h */; }; 507B3E161C31BDD30067B53E /* CCFileUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF241926664700A911A9 /* CCFileUtils.h */; }; - 507B3E181C31BDD30067B53E /* LayoutReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7418C72017004AD434 /* LayoutReader.h */; }; - 507B3E191C31BDD30067B53E /* CCPUEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1211AA80A6500DDB1C5 /* CCPUEmitterTranslator.h */; }; - 507B3E1A1C31BDD30067B53E /* UIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0818CF08D000240AA3 /* UIScrollView.h */; }; 507B3E1B1C31BDD30067B53E /* ccShader_PositionTexture.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA02191D591000CE6051 /* ccShader_PositionTexture.vert */; }; - 507B3E1C1C31BDD30067B53E /* ProjectNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384351A259126002C4610 /* ProjectNodeReader.h */; }; - 507B3E1D1C31BDD30067B53E /* CCDrawingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010B180BC8EE0088DEC7 /* CCDrawingPrimitives.h */; }; 507B3E1F1C31BDD30067B53E /* CCConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDCD1925AB6E00A911A9 /* CCConsole.h */; }; 507B3E211C31BDD30067B53E /* CCMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF61925AB6E00A911A9 /* CCMap.h */; }; - 507B3E221C31BDD30067B53E /* CCPUOnCountObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1691AA80A6500DDB1C5 /* CCPUOnCountObserver.h */; }; 507B3E231C31BDD30067B53E /* CCEAGLView-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */; }; 507B3E241C31BDD30067B53E /* CCEventAcceleration.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD71925AB6E00A911A9 /* CCEventAcceleration.h */; }; - 507B3E251C31BDD30067B53E /* CCPUListener.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14F1AA80A6500DDB1C5 /* CCPUListener.h */; }; 507B3E271C31BDD30067B53E /* TransformUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD2E1925AB0000A911A9 /* TransformUtils.h */; }; - 507B3E281C31BDD30067B53E /* CCPUDoFreezeEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h */; }; 507B3E291C31BDD30067B53E /* CCDrawNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57010D180BC8EE0088DEC7 /* CCDrawNode.h */; }; - 507B3E2A1C31BDD30067B53E /* CCNavMeshDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */; }; - 507B3E2C1C31BDD30067B53E /* CCGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570118180BC90D0088DEC7 /* CCGrabber.h */; }; 507B3E2F1C31BDD30067B53E /* CCGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57011A180BC90D0088DEC7 /* CCGrid.h */; }; 507B3E321C31BDD30067B53E /* ccShader_PositionTextureA8Color.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA01191D591000CE6051 /* ccShader_PositionTextureA8Color.frag */; }; - 507B3E351C31BDD30067B53E /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */; }; 507B3E361C31BDD30067B53E /* Vec2.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD301925AB0000A911A9 /* Vec2.h */; }; - 507B3E371C31BDD30067B53E /* CCComExtensionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 43015DBE1B60DF4000E75161 /* CCComExtensionData.h */; }; - 507B3E381C31BDD30067B53E /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03451A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h */; }; 507B3E391C31BDD30067B53E /* CCMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD1F1925AB0000A911A9 /* CCMath.h */; }; 507B3E3A1C31BDD30067B53E /* CCFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570183180BCB590088DEC7 /* CCFont.h */; }; - 507B3E3D1C31BDD30067B53E /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */; }; 507B3E401C31BDD30067B53E /* AudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDADD19C030ED0055CDCD /* AudioEngine.h */; }; - 507B3E411C31BDD30067B53E /* CCPUMaterialTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1531AA80A6500DDB1C5 /* CCPUMaterialTranslator.h */; }; 507B3E421C31BDD30067B53E /* CCGLProgramStateCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD6F1925AB4100A911A9 /* CCGLProgramStateCache.h */; }; - 507B3E431C31BDD30067B53E /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17EF19AAD2F700C27E9E /* CCBundle3D.h */; }; - 507B3E441C31BDD30067B53E /* CocoLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E99D1D1957BA7000046604 /* CocoLoader.h */; }; 507B3E451C31BDD30067B53E /* HttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5364180E3374000584C8 /* HttpRequest.h */; }; - 507B3E471C31BDD30067B53E /* CCPUForceFieldAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1311AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h */; }; - 507B3E481C31BDD30067B53E /* CCBillBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = B60C5BD319AC68B10056FBDE /* CCBillBoard.h */; }; 507B3E491C31BDD30067B53E /* CCTrianglesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */; }; - 507B3E4A1C31BDD30067B53E /* CCPUDynamicAttributeTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11B1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h */; }; - 507B3E4C1C31BDD30067B53E /* UIEditBoxImpl-win32.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */; }; - 507B3E4E1C31BDD30067B53E /* CCPUOnExpireObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1771AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h */; }; 507B3E4F1C31BDD30067B53E /* CCGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD1E1925AB0000A911A9 /* CCGeometry.h */; }; - 507B3E511C31BDD30067B53E /* CCPUOnCollisionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1671AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h */; }; - 507B3E531C31BDD30067B53E /* CCAllocatorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */; }; 507B3E571C31BDD30067B53E /* CCFileUtils-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1B1926664700A911A9 /* CCFileUtils-apple.h */; }; 507B3E591C31BDD30067B53E /* CCFontAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570185180BCB590088DEC7 /* CCFontAtlas.h */; }; - 507B3E5B1C31BDD30067B53E /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; 507B3E5C1C31BDD30067B53E /* CCFontAtlasCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570187180BCB590088DEC7 /* CCFontAtlasCache.h */; }; - 507B3E5D1C31BDD30067B53E /* CCPUSineForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C51AA80A6500DDB1C5 /* CCPUSineForceAffector.h */; }; - 507B3E5E1C31BDD30067B53E /* UserCameraReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CE41A9D725400C30D34 /* UserCameraReader.h */; }; 507B3E601C31BDD30067B53E /* RecastDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */; }; 507B3E631C31BDD30067B53E /* CCFontFNT.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57018D180BCB590088DEC7 /* CCFontFNT.h */; }; 507B3E641C31BDD30067B53E /* DetourAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F851B04825B00E47F5F /* DetourAssert.h */; }; - 507B3E651C31BDD30067B53E /* CCParticleSystemQuadLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D25180E26E600808F54 /* CCParticleSystemQuadLoader.h */; }; - 507B3E661C31BDD30067B53E /* CCPUOnEventFlagObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1731AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h */; }; 507B3E691C31BDD30067B53E /* DetourTileCacheBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */; }; - 507B3E6B1C31BDD30067B53E /* NodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384271A2590F9002C4610 /* NodeReader.h */; }; 507B3E6D1C31BDD30067B53E /* CCFontFreeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57018F180BCB590088DEC7 /* CCFontFreeType.h */; }; - 507B3E6E1C31BDD30067B53E /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F419AAD2F700C27E9E /* CCMesh.h */; }; - 507B3E701C31BDD30067B53E /* ImageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7118C72017004AD434 /* ImageViewReader.h */; }; - 507B3E711C31BDD30067B53E /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10F1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h */; }; - 507B3E731C31BDD30067B53E /* CCPUMeshSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1571AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h */; }; - 507B3E741C31BDD30067B53E /* CCMenuLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1C180E26E600808F54 /* CCMenuLoader.h */; }; - 507B3E751C31BDD30067B53E /* CCPUSphereCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D31AA80A6500DDB1C5 /* CCPUSphereCollider.h */; }; 507B3E771C31BDD30067B53E /* DetourNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */; }; 507B3E781C31BDD30067B53E /* CCLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570191180BCB590088DEC7 /* CCLabel.h */; }; - 507B3E791C31BDD30067B53E /* CCPUInterParticleColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13D1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h */; }; 507B3E7A1C31BDD30067B53E /* CCLabelAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570193180BCB590088DEC7 /* CCLabelAtlas.h */; }; 507B3E7C1C31BDD30067B53E /* CCEventListenerCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDE51925AB6E00A911A9 /* CCEventListenerCustom.h */; }; - 507B3E7D1C31BDD30067B53E /* CCPUFlockCenteringAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1291AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h */; }; - 507B3E7E1C31BDD30067B53E /* DictionaryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C598A180E930E00EF57C3 /* DictionaryHelper.h */; }; 507B3E801C31BDD30067B53E /* clipper.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 8525E3A11B291E42008EE815 /* clipper.hpp */; }; - 507B3E821C31BDD30067B53E /* CCPUCircleEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F31AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h */; }; 507B3E881C31BDD30067B53E /* HttpClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5363180E3374000584C8 /* HttpClient.h */; }; 507B3E8A1C31BDD30067B53E /* DetourNavMeshBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */; }; - 507B3E8B1C31BDD30067B53E /* UIEditBoxImpl-android.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */; }; - 507B3E8D1C31BDD30067B53E /* CCPUJetAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1411AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h */; }; - 507B3E8E1C31BDD30067B53E /* GUIDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EB18CF08D000240AA3 /* GUIDefine.h */; }; 507B3E8F1C31BDD30067B53E /* CCDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50693C5D1B6BF2AE005C5820 /* CCDownloader.h */; }; - 507B3E911C31BDD30067B53E /* CCRay.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FE19AAD2F700C27E9E /* CCRay.h */; }; 507B3E921C31BDD30067B53E /* ccShader_Position_uColor.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0B191D591000CE6051 /* ccShader_Position_uColor.frag */; }; - 507B3E931C31BDD30067B53E /* CCLabelBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570195180BCB590088DEC7 /* CCLabelBMFont.h */; }; - 507B3E951C31BDD30067B53E /* CCBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595B180E930E00EF57C3 /* CCBatchNode.h */; }; - 507B3E961C31BDD30067B53E /* CCPUParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1911AA80A6500DDB1C5 /* CCPUParticleSystem3D.h */; }; - 507B3E971C31BDD30067B53E /* CCPUDoEnableComponentEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1011AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h */; }; - 507B3E991C31BDD30067B53E /* CCPUPointEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A11AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h */; }; - 507B3E9B1C31BDD30067B53E /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; - 507B3E9C1C31BDD30067B53E /* AssetsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5352180E3060000584C8 /* AssetsManager.h */; }; - 507B3E9D1C31BDD30067B53E /* CCPULineAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1431AA80A6500DDB1C5 /* CCPULineAffector.h */; }; 507B3EA01C31BDD30067B53E /* HttpAsynConnection-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B47A291A5349A3004E4C60 /* HttpAsynConnection-apple.h */; }; 507B3EA21C31BDD30067B53E /* HttpResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5365180E3374000584C8 /* HttpResponse.h */; }; - 507B3EA31C31BDD30067B53E /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FEC1807A56F005B8026 /* SimpleAudioEngine_objc.h */; }; 507B3EA41C31BDD30067B53E /* CCQuadCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD751925AB4100A911A9 /* CCQuadCommand.h */; }; - 507B3EA51C31BDD30067B53E /* UILayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */; }; 507B3EA71C31BDD30067B53E /* CCRefPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE001925AB6E00A911A9 /* CCRefPtr.h */; }; - 507B3EA81C31BDD30067B53E /* CCSpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */; }; - 507B3EAA1C31BDD30067B53E /* CCSSceneReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597D180E930E00EF57C3 /* CCSSceneReader.h */; }; - 507B3EAB1C31BDD30067B53E /* CCFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67E18F57BE800EFE3A6 /* CCFloat.h */; }; - 507B3EAC1C31BDD30067B53E /* CCPUAlignAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D31AA80A6500DDB1C5 /* CCPUAlignAffector.h */; }; 507B3EAD1C31BDD30067B53E /* DetourProximityGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */; }; 507B3EAF1C31BDD30067B53E /* CCLabelTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570198180BCB590088DEC7 /* CCLabelTextFormatter.h */; }; 507B3EB41C31BDD30067B53E /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; 507B3EB51C31BDD30067B53E /* ccShader_PositionTextureColorAlphaTest.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034C9FB191D591000CE6051 /* ccShader_PositionTextureColorAlphaTest.frag */; }; - 507B3EB61C31BDD30067B53E /* UIDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 29080DEB191B82CE0066F8DF /* UIDeprecated.h */; }; 507B3EB81C31BDD30067B53E /* s3tc.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE181925AB6F00A911A9 /* s3tc.h */; }; 507B3EB91C31BDD30067B53E /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */; }; - 507B3EBA1C31BDD30067B53E /* CCControlSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168471807AF4E005B8026 /* CCControlSwitch.h */; }; - 507B3EBB1C31BDD30067B53E /* CCMeshVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F819AAD2F700C27E9E /* CCMeshVertexIndexData.h */; }; - 507B3EBC1C31BDD30067B53E /* UIVBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D33318E174130051CA34 /* UIVBox.h */; }; 507B3EBD1C31BDD30067B53E /* CCLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EACC99F19F5014D00EB3C5E /* CCLight.h */; }; - 507B3EBE1C31BDD30067B53E /* CCFrustum.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61231A3FFE3D0038DE01 /* CCFrustum.h */; }; - 507B3EBF1C31BDD30067B53E /* CCPUPositionEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A31AA80A6500DDB1C5 /* CCPUPositionEmitter.h */; }; - 507B3EC01C31BDD30067B53E /* CCDataReaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5969180E930E00EF57C3 /* CCDataReaderHelper.h */; }; - 507B3EC11C31BDD30067B53E /* CCPUDoExpireEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1071AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h */; }; - 507B3EC21C31BDD30067B53E /* CCSkinNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306681B60B583001E6D43 /* CCSkinNode.h */; }; - 507B3EC41C31BDD30067B53E /* CCAllocatorMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03411A3B51AA00825BB5 /* CCAllocatorMacros.h */; }; - 507B3EC51C31BDD30067B53E /* CCPUVelocityMatchingAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E91AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.h */; }; - 507B3EC61C31BDD30067B53E /* CCLabelTTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57019A180BCB590088DEC7 /* CCLabelTTF.h */; }; - 507B3EC81C31BDD30067B53E /* CCPUTextureRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E31AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.h */; }; 507B3EC91C31BDD30067B53E /* CCRenderState.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012168D1AC47380009A4BEA /* CCRenderState.h */; }; 507B3ECB1C31BDD30067B53E /* CCLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701D5180BCB8C0088DEC7 /* CCLayer.h */; }; - 507B3ECF1C31BDD30067B53E /* CCPUOnTimeObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1871AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h */; }; - 507B3ED01C31BDD30067B53E /* CCControlExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683B1807AF4E005B8026 /* CCControlExtensions.h */; }; 507B3ED11C31BDD30067B53E /* CCScene.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701D7180BCB8C0088DEC7 /* CCScene.h */; }; 507B3ED31C31BDD30067B53E /* CCTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701D9180BCB8C0088DEC7 /* CCTransition.h */; }; - 507B3ED41C31BDD30067B53E /* CheckBoxReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6E18C72017004AD434 /* CheckBoxReader.h */; }; - 507B3ED51C31BDD30067B53E /* UIAbstractCheckButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DBD1B3BF2B1002B0419 /* UIAbstractCheckButton.h */; }; - 507B3ED61C31BDD30067B53E /* CCPUPlaneCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19B1AA80A6500DDB1C5 /* CCPUPlaneCollider.h */; }; 507B3ED71C31BDD30067B53E /* DetourDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */; }; - 507B3ED91C31BDD30067B53E /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 18956BB11A9DFBFD006E9155 /* Particle3DReader.h */; }; 507B3EDA1C31BDD30067B53E /* DetourCrowd.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F941B04825B00E47F5F /* DetourCrowd.h */; }; - 507B3EDC1C31BDD30067B53E /* CCPUSlaveEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CF1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.h */; }; - 507B3EDD1C31BDD30067B53E /* CCPUDoAffectorEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FD1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h */; }; 507B3EDF1C31BDD30067B53E /* uthash.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1B1925AB6F00A911A9 /* uthash.h */; }; - 507B3EE01C31BDD30067B53E /* CCPURandomiserTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A91AA80A6500DDB1C5 /* CCPURandomiserTranslator.h */; }; 507B3EE21C31BDD30067B53E /* CCTransitionPageTurn.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701DB180BCB8C0088DEC7 /* CCTransitionPageTurn.h */; }; 507B3EE31C31BDD30067B53E /* CCTransitionProgress.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701DD180BCB8C0088DEC7 /* CCTransitionProgress.h */; }; 507B3EE61C31BDD30067B53E /* CCMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701F4180BCBAD0088DEC7 /* CCMenu.h */; }; - 507B3EE71C31BDD30067B53E /* CCControlButtonLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0B180E26E600808F54 /* CCControlButtonLoader.h */; }; 507B3EE81C31BDD30067B53E /* CCMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5701F6180BCBAD0088DEC7 /* CCMenuItem.h */; }; 507B3EE91C31BDD30067B53E /* CCDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF221926664700A911A9 /* CCDevice.h */; }; 507B3EEA1C31BDD30067B53E /* CCClippingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570201180BCBD40088DEC7 /* CCClippingNode.h */; }; - 507B3EEC1C31BDD30067B53E /* UICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F318CF08D000240AA3 /* UICheckBox.h */; }; 507B3EEE1C31BDD30067B53E /* ccShader_PositionTexture_uColor.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA04191D591000CE6051 /* ccShader_PositionTexture_uColor.frag */; }; - 507B3EEF1C31BDD30067B53E /* CCPUSphereSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D91AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h */; }; - 507B3EF21C31BDD30067B53E /* CCFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CA194B19E400E608AF /* CCFrame.h */; }; - 507B3EF31C31BDD30067B53E /* CCPUOnClearObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1611AA80A6500DDB1C5 /* CCPUOnClearObserver.h */; }; - 507B3EF51C31BDD30067B53E /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168631807AF4E005B8026 /* CCTableView.h */; }; - 507B3EF61C31BDD30067B53E /* CCPUPositionEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h */; }; - 507B3EF71C31BDD30067B53E /* CCParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */; }; - 507B3EF81C31BDD30067B53E /* CCPUDoExpireEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1051AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h */; }; 507B3EF91C31BDD30067B53E /* shapes.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB207B1AE7C57D00C31518 /* shapes.h */; }; 507B3EFA1C31BDD30067B53E /* CCScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE021925AB6E00A911A9 /* CCScheduler.h */; }; 507B3EFC1C31BDD30067B53E /* CCMotionStreak.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570207180BCBDF0088DEC7 /* CCMotionStreak.h */; }; - 507B3EFD1C31BDD30067B53E /* CCPUBehaviourManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E31AA80A6500DDB1C5 /* CCPUBehaviourManager.h */; }; - 507B3EFE1C31BDD30067B53E /* CCDecorativeDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596D180E930E00EF57C3 /* CCDecorativeDisplay.h */; }; 507B3EFF1C31BDD30067B53E /* DebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */; }; - 507B3F001C31BDD30067B53E /* CCTween.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5981180E930E00EF57C3 /* CCTween.h */; }; - 507B3F011C31BDD30067B53E /* CCComAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5961180E930E00EF57C3 /* CCComAttribute.h */; }; - 507B3F031C31BDD30067B53E /* CCPhysics3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */; }; - 507B3F051C31BDD30067B53E /* GameMapReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384201A2590DA002C4610 /* GameMapReader.h */; }; 507B3F061C31BDD30067B53E /* DetourLocalBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */; }; - 507B3F091C31BDD30067B53E /* CCPUBoxEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EF1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h */; }; - 507B3F0A1C31BDD30067B53E /* Manifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707719EE414C00ABE682 /* Manifest.h */; }; 507B3F0B1C31BDD30067B53E /* sweep.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20841AE7C57D00C31518 /* sweep.h */; }; 507B3F0C1C31BDD30067B53E /* CCProgressTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57020D180BCBF40088DEC7 /* CCProgressTimer.h */; }; - 507B3F0D1C31BDD30067B53E /* CSArmatureNode_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */; }; 507B3F0E1C31BDD30067B53E /* CCRenderTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57020F180BCBF40088DEC7 /* CCRenderTexture.h */; }; - 507B3F0F1C31BDD30067B53E /* CCTerrain.h in Headers */ = {isa = PBXBuildFile; fileRef = B603F1A71AC8EA0900A9579C /* CCTerrain.h */; }; - 507B3F121C31BDD30067B53E /* WidgetReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9218C72017004AD434 /* WidgetReaderProtocol.h */; }; - 507B3F131C31BDD30067B53E /* CCPUSlaveBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C91AA80A6500DDB1C5 /* CCPUSlaveBehaviour.h */; }; - 507B3F151C31BDD30067B53E /* WidgetReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB9118C72017004AD434 /* WidgetReader.h */; }; 507B3F161C31BDD30067B53E /* CCParticleBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57021A180BCC1A0088DEC7 /* CCParticleBatchNode.h */; }; 507B3F181C31BDD30067B53E /* cdt.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20821AE7C57D00C31518 /* cdt.h */; }; - 507B3F1B1C31BDD30067B53E /* CCNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C01B18492D006762CB /* CCNavMesh.h */; }; - 507B3F1C1C31BDD30067B53E /* CCPUDoScaleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1131AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h */; }; - 507B3F1D1C31BDD30067B53E /* CCUtilMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5985180E930E00EF57C3 /* CCUtilMath.h */; }; 507B3F1F1C31BDD30067B53E /* CCIMEDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F21926B0DB00CD74DD /* CCIMEDelegate.h */; }; - 507B3F201C31BDD30067B53E /* CCPhysics3DConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */; }; 507B3F211C31BDD30067B53E /* CCParticleExamples.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57021C180BCC1A0088DEC7 /* CCParticleExamples.h */; }; - 507B3F221C31BDD30067B53E /* CCPUVortexAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */; }; 507B3F231C31BDD30067B53E /* CCParticleSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57021E180BCC1A0088DEC7 /* CCParticleSystem.h */; }; - 507B3F251C31BDD30067B53E /* CCPUUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E71AA80A6500DDB1C5 /* CCPUUtil.h */; }; - 507B3F261C31BDD30067B53E /* UILayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F918CF08D000240AA3 /* UILayout.h */; }; 507B3F271C31BDD30067B53E /* CCParticleSystemQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570220180BCC1A0088DEC7 /* CCParticleSystemQuad.h */; }; - 507B3F291C31BDD30067B53E /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; - 507B3F2A1C31BDD30067B53E /* CCUISingleLineTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F01B1BA9A5550059E678 /* CCUISingleLineTextField.h */; }; - 507B3F2C1C31BDD30067B53E /* CCBSelectorResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D03180E26E600808F54 /* CCBSelectorResolver.h */; }; 507B3F2D1C31BDD30067B53E /* CCFastTMXLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA982195A675C007B4522 /* CCFastTMXLayer.h */; }; - 507B3F2F1C31BDD30067B53E /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FF18CF08D000240AA3 /* UIListView.h */; }; - 507B3F301C31BDD30067B53E /* TriggerMng.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABF186AD63B0012A414 /* TriggerMng.h */; }; 507B3F311C31BDD30067B53E /* ccShader_PositionTextureA8Color.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA00191D591000CE6051 /* ccShader_PositionTextureA8Color.vert */; }; 507B3F331C31BDD30067B53E /* CCProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFD1925AB6E00A911A9 /* CCProtocols.h */; }; 507B3F351C31BDD30067B53E /* AudioEngine-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CB247119D9C5A100687767 /* AudioEngine-inl.h */; }; 507B3F361C31BDD30067B53E /* HttpCookie.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B47A2D1A5349A3004E4C60 /* HttpCookie.h */; }; 507B3F371C31BDD30067B53E /* CCMathBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD201925AB0000A911A9 /* CCMathBase.h */; }; 507B3F381C31BDD30067B53E /* CCProtectedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */; }; - 507B3F3A1C31BDD30067B53E /* CCComBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 373B910718787C0B00198F86 /* CCComBase.h */; }; - 507B3F3C1C31BDD30067B53E /* CCDisplayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5971180E930E00EF57C3 /* CCDisplayManager.h */; }; - 507B3F3D1C31BDD30067B53E /* UIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F118CF08D000240AA3 /* UIButton.h */; }; - 507B3F3E1C31BDD30067B53E /* ArmatureNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */; }; 507B3F401C31BDD30067B53E /* CCDirector.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD31925AB6E00A911A9 /* CCDirector.h */; }; 507B3F421C31BDD30067B53E /* ccShader_Label_df.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0F191D591000CE6051 /* ccShader_Label_df.frag */; }; - 507B3F471C31BDD30067B53E /* CCPUDoAffectorEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FF1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h */; }; - 507B3F481C31BDD30067B53E /* CCPUAffectorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CF1AA80A6500DDB1C5 /* CCPUAffectorManager.h */; }; - 507B3F491C31BDD30067B53E /* CCUIEditBoxIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0171BA9A5550059E678 /* CCUIEditBoxIOS.h */; }; - 507B3F4A1C31BDD30067B53E /* CCPUBoxEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0ED1AA80A6500DDB1C5 /* CCPUBoxEmitter.h */; }; - 507B3F4D1C31BDD30067B53E /* UILoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0118CF08D000240AA3 /* UILoadingBar.h */; }; - 507B3F4E1C31BDD30067B53E /* CCControlPotentiometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683F1807AF4E005B8026 /* CCControlPotentiometer.h */; }; - 507B3F4F1C31BDD30067B53E /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168381807AF4E005B8026 /* CCControlButton.h */; }; - 507B3F511C31BDD30067B53E /* CCPUOnRandomObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1811AA80A6500DDB1C5 /* CCPUOnRandomObserver.h */; }; 507B3F521C31BDD30067B53E /* CCSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570277180BCC900088DEC7 /* CCSprite.h */; }; 507B3F531C31BDD30067B53E /* DetourNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F901B04825B00E47F5F /* DetourNode.h */; }; 507B3F541C31BDD30067B53E /* CCSpriteBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570279180BCC900088DEC7 /* CCSpriteBatchNode.h */; }; - 507B3F551C31BDD30067B53E /* CCArmatureDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5957180E930E00EF57C3 /* CCArmatureDataManager.h */; }; 507B3F561C31BDD30067B53E /* CCSpriteFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57027B180BCC900088DEC7 /* CCSpriteFrame.h */; }; - 507B3F571C31BDD30067B53E /* UIText.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0C18CF08D100240AA3 /* UIText.h */; }; - 507B3F591C31BDD30067B53E /* CCPhysics3DShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */; }; - 507B3F5A1C31BDD30067B53E /* CCPUScriptLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BD1AA80A6500DDB1C5 /* CCPUScriptLexer.h */; }; 507B3F5B1C31BDD30067B53E /* CCEventListenerKeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDE91925AB6E00A911A9 /* CCEventListenerKeyboard.h */; }; - 507B3F5C1C31BDD30067B53E /* CCBSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D05180E26E600808F54 /* CCBSequence.h */; }; 507B3F5E1C31BDD30067B53E /* CCSpriteFrameCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57027D180BCC900088DEC7 /* CCSpriteFrameCache.h */; }; 507B3F5F1C31BDD30067B53E /* CCAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57028F180BCCAB0088DEC7 /* CCAnimation.h */; }; - 507B3F621C31BDD30067B53E /* CCPUInterParticleCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13B1AA80A6500DDB1C5 /* CCPUInterParticleCollider.h */; }; 507B3F631C31BDD30067B53E /* CCTexture2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7E1925AB4100A911A9 /* CCTexture2D.h */; }; - 507B3F661C31BDD30067B53E /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E719AAD2F700C27E9E /* CCAnimate3D.h */; }; 507B3F671C31BDD30067B53E /* CCConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDCB1925AB6E00A911A9 /* CCConfiguration.h */; }; - 507B3F681C31BDD30067B53E /* CCParticle3DEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F31A8CA82E00643ABF /* CCParticle3DEmitter.h */; }; 507B3F691C31BDD30067B53E /* CCAnimationCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570291180BCCAB0088DEC7 /* CCAnimationCache.h */; }; - 507B3F6B1C31BDD30067B53E /* CCPUFlockCenteringAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12B1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h */; }; 507B3F6E1C31BDD30067B53E /* CCTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE061925AB6E00A911A9 /* CCTouch.h */; }; - 507B3F6F1C31BDD30067B53E /* UILayoutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FD18CF08D000240AA3 /* UILayoutParameter.h */; }; - 507B3F701C31BDD30067B53E /* CCMenuItemImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D19180E26E600808F54 /* CCMenuItemImageLoader.h */; }; - 507B3F721C31BDD30067B53E /* CCBoneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306641B60B583001E6D43 /* CCBoneNode.h */; }; - 507B3F731C31BDD30067B53E /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F71AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h */; }; - 507B3F761C31BDD30067B53E /* CCNodeLoaderLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D22180E26E600808F54 /* CCNodeLoaderLibrary.h */; }; - 507B3F791C31BDD30067B53E /* UITextView+CCUITextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2980F0201BA9A5550059E678 /* UITextView+CCUITextInput.h */; }; 507B3F7A1C31BDD30067B53E /* CCEventListenerMouse.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDEB1925AB6E00A911A9 /* CCEventListenerMouse.h */; }; - 507B3F7B1C31BDD30067B53E /* CCAllocatorMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03421A3B51AA00825BB5 /* CCAllocatorMutex.h */; }; 507B3F7D1C31BDD30067B53E /* CCTextFieldTTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702C7180BCE370088DEC7 /* CCTextFieldTTF.h */; }; 507B3F7E1C31BDD30067B53E /* CCTileMapAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702E1180BCE750088DEC7 /* CCTileMapAtlas.h */; }; - 507B3F7F1C31BDD30067B53E /* CCSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5979180E930E00EF57C3 /* CCSkin.h */; }; 507B3F811C31BDD30067B53E /* DetourObstacleAvoidance.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */; }; 507B3F831C31BDD30067B53E /* CCTMXLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702E3180BCE750088DEC7 /* CCTMXLayer.h */; }; 507B3F841C31BDD30067B53E /* CCAutoPolygon.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20731AE7BF8600C31518 /* CCAutoPolygon.h */; }; - 507B3F861C31BDD30067B53E /* CCBFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */; }; - 507B3F881C31BDD30067B53E /* CCActionTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4C6194B19E400E608AF /* CCActionTimeline.h */; }; - 507B3F891C31BDD30067B53E /* CCPhysics3DDebugDrawer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */; }; 507B3F8B1C31BDD30067B53E /* ccShader_Label.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0C191D591000CE6051 /* ccShader_Label.vert */; }; 507B3F8C1C31BDD30067B53E /* CCTMXObjectGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702E5180BCE750088DEC7 /* CCTMXObjectGroup.h */; }; 507B3F8D1C31BDD30067B53E /* CCTMXTiledMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702E7180BCE750088DEC7 /* CCTMXTiledMap.h */; }; - 507B3F8E1C31BDD30067B53E /* CCEventAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */; }; 507B3F8F1C31BDD30067B53E /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; - 507B3F911C31BDD30067B53E /* HttpConnection-winrt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5070031A1B69735200E83DDD /* HttpConnection-winrt.h */; }; 507B3F921C31BDD30067B53E /* CCTMXXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702E9180BCE750088DEC7 /* CCTMXXMLParser.h */; }; - 507B3F931C31BDD30067B53E /* CCPURender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AB1AA80A6500DDB1C5 /* CCPURender.h */; }; - 507B3F941C31BDD30067B53E /* CCPUPlaneColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19D1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h */; }; - 507B3F961C31BDD30067B53E /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 2958244A19873D8E00F9746D /* UIScale9Sprite.h */; }; - 507B3F971C31BDD30067B53E /* CCBAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */; }; - 507B3F991C31BDD30067B53E /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; 507B3F9B1C31BDD30067B53E /* CCParallaxNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5702FF180BCE890088DEC7 /* CCParallaxNode.h */; }; 507B3F9C1C31BDD30067B53E /* CCAutoreleasePool.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDC61925AB6E00A911A9 /* CCAutoreleasePool.h */; }; - 507B3F9D1C31BDD30067B53E /* CCPhysics3DWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */; }; 507B3F9E1C31BDD30067B53E /* CCPass.h in Headers */ = {isa = PBXBuildFile; fileRef = 501216931AC47393009A4BEA /* CCPass.h */; }; 507B3F9F1C31BDD30067B53E /* CCComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570309180BCF190088DEC7 /* CCComponent.h */; }; - 507B3FA01C31BDD30067B53E /* CCPUBoxCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E91AA80A6500DDB1C5 /* CCPUBoxCollider.h */; }; - 507B3FA21C31BDD30067B53E /* CCSkeletonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306661B60B583001E6D43 /* CCSkeletonNode.h */; }; - 507B3FA41C31BDD30067B53E /* CCBKeyframe.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */; }; - 507B3FA51C31BDD30067B53E /* CCLayerGradientLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D15180E26E600808F54 /* CCLayerGradientLoader.h */; }; - 507B3FA71C31BDD30067B53E /* CCPUOnPositionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17B1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h */; }; 507B3FA91C31BDD30067B53E /* CCComponentContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57030B180BCF190088DEC7 /* CCComponentContainer.h */; }; 507B3FAB1C31BDD30067B53E /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6D51BA81577005076C7 /* CCTextureCube.h */; }; - 507B3FAD1C31BDD30067B53E /* CCPULineEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14D1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h */; }; 507B3FAE1C31BDD30067B53E /* edtaa3func.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A087AE71860400400196EF5 /* edtaa3func.h */; }; - 507B3FAF1C31BDD30067B53E /* CCPUParticleFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18D1AA80A6500DDB1C5 /* CCPUParticleFollower.h */; }; - 507B3FB11C31BDD30067B53E /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE91807A56F005B8026 /* CocosDenshion.h */; }; - 507B3FB31C31BDD30067B53E /* UIScrollViewBar.h in Headers */ = {isa = PBXBuildFile; fileRef = B5668D7C1B3838E4003CBD5E /* UIScrollViewBar.h */; }; - 507B3FB41C31BDD30067B53E /* CCColliderDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595F180E930E00EF57C3 /* CCColliderDetector.h */; }; - 507B3FB61C31BDD30067B53E /* CCAllocatorStrategyFixedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03441A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h */; }; - 507B3FB71C31BDD30067B53E /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; }; - 507B3FB81C31BDD30067B53E /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE61807A56F005B8026 /* CDConfig.h */; }; 507B3FBB1C31BDD30067B53E /* tinyxml2.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A57034A180BD09B0088DEC7 /* tinyxml2.h */; }; - 507B3FBC1C31BDD30067B53E /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; 507B3FBE1C31BDD30067B53E /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570351180BD0B00088DEC7 /* ioapi.h */; }; 507B3FC01C31BDD30067B53E /* Mat4.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD241925AB0000A911A9 /* Mat4.h */; }; - 507B3FC11C31BDD30067B53E /* CCPUPathFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1971AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h */; }; - 507B3FC41C31BDD30067B53E /* CCPhysicsSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */; }; 507B3FC51C31BDD30067B53E /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5367180E3374000584C8 /* SocketIO.h */; }; - 507B3FC61C31BDD30067B53E /* CCPUOnEmissionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16D1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h */; }; - 507B3FC71C31BDD30067B53E /* CCPUParticleSystem3DTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1931AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h */; }; 507B3FC81C31BDD30067B53E /* DetourAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F841B04825B00E47F5F /* DetourAlloc.h */; }; - 507B3FCA1C31BDD30067B53E /* CCPUBaseForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DD1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h */; }; - 507B3FCB1C31BDD30067B53E /* CCSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68118F57BE800EFE3A6 /* CCSet.h */; }; - 507B3FCC1C31BDD30067B53E /* CCPUSphereColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D51AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.h */; }; 507B3FCD1C31BDD30067B53E /* utlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1C1925AB6F00A911A9 /* utlist.h */; }; 507B3FCE1C31BDD30067B53E /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A570353180BD0B00088DEC7 /* unzip.h */; }; - 507B3FD11C31BDD30067B53E /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D32F18E174130051CA34 /* UIHBox.h */; }; 507B3FD31C31BDD30067B53E /* CCProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 505385001B01887A00793096 /* CCProperties.h */; }; 507B3FD51C31BDD30067B53E /* ccShader_Label_normal.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0E191D591000CE6051 /* ccShader_Label_normal.frag */; }; - 507B3FD91C31BDD30067B53E /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE180019AAD2F700C27E9E /* CCSkeleton3D.h */; }; 507B3FDA1C31BDD30067B53E /* Quaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD2B1925AB0000A911A9 /* Quaternion.h */; }; 507B3FDB1C31BDD30067B53E /* CCTechnique.h in Headers */ = {isa = PBXBuildFile; fileRef = 501216991AC473A3009A4BEA /* CCTechnique.h */; }; - 507B3FDD1C31BDD30067B53E /* ScrollViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8018C72017004AD434 /* ScrollViewReader.h */; }; - 507B3FDE1C31BDD30067B53E /* CCES2Renderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */; }; - 507B3FDF1C31BDD30067B53E /* CCPUTextureRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E11AA80A6500DDB1C5 /* CCPUTextureRotator.h */; }; - 507B3FE01C31BDD30067B53E /* CCPUOnPositionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1791AA80A6500DDB1C5 /* CCPUOnPositionObserver.h */; }; 507B3FE31C31BDD30067B53E /* CCEventListenerFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDE71925AB6E00A911A9 /* CCEventListenerFocus.h */; }; 507B3FE41C31BDD30067B53E /* ccShader_PositionColor.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA09191D591000CE6051 /* ccShader_PositionColor.frag */; }; - 507B3FE61C31BDD30067B53E /* Sprite3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CD51A98F30500C30D34 /* Sprite3DReader.h */; }; 507B3FE71C31BDD30067B53E /* ccConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDC91925AB6E00A911A9 /* ccConfig.h */; }; 507B3FE81C31BDD30067B53E /* DetourPathCorridor.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */; }; - 507B3FE91C31BDD30067B53E /* CCInputDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5973180E930E00EF57C3 /* CCInputDelegate.h */; }; 507B3FEB1C31BDD30067B53E /* RecastDump.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F811B04825B00E47F5F /* RecastDump.h */; }; 507B3FEC1C31BDD30067B53E /* CCRenderCommandPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD781925AB4100A911A9 /* CCRenderCommandPool.h */; }; - 507B3FEE1C31BDD30067B53E /* CCPUScaleVelocityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B91AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h */; }; - 507B3FF01C31BDD30067B53E /* CCPUOnVelocityObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18B1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h */; }; 507B3FF11C31BDD30067B53E /* ccShader_PositionColor.vert in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA08191D591000CE6051 /* ccShader_PositionColor.vert */; }; - 507B3FF21C31BDD30067B53E /* CCPUSlaveEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CD1AA80A6500DDB1C5 /* CCPUSlaveEmitter.h */; }; 507B3FF31C31BDD30067B53E /* CCImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF281926664700A911A9 /* CCImage.h */; }; - 507B3FF41C31BDD30067B53E /* CCPUForceFieldAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12F1AA80A6500DDB1C5 /* CCPUForceFieldAffector.h */; }; - 507B3FF81C31BDD30067B53E /* SpriteReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384431A25915C002C4610 /* SpriteReader.h */; }; 507B3FF91C31BDD30067B53E /* CCNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF81925AB6E00A911A9 /* CCNS.h */; }; - 507B3FFA1C31BDD30067B53E /* CCPUMeshSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1551AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h */; }; - 507B3FFC1C31BDD30067B53E /* CCPUCircleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F11AA80A6500DDB1C5 /* CCPUCircleEmitter.h */; }; 507B3FFD1C31BDD30067B53E /* CCScriptSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE041925AB6E00A911A9 /* CCScriptSupport.h */; }; 507B3FFF1C31BDD30067B53E /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C02E0618E91123004B7456 /* xxhash.h */; }; 507B40011C31BDD30067B53E /* ccShader_Label_df_glow.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */; }; 507B40031C31BDD30067B53E /* CCGL-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D91926736A00CD74DD /* CCGL-ios.h */; }; - 507B40041C31BDD30067B53E /* CCPUSphereSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D71AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.h */; }; 507B40061C31BDD30067B53E /* CCData.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDCF1925AB6E00A911A9 /* CCData.h */; }; 507B400A1C31BDD30067B53E /* CCIMEDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */; }; - 507B400F1C31BDD30067B53E /* CCPUOnQuotaObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17F1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h */; }; 507B40101C31BDD30067B53E /* etc1.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE151925AB6F00A911A9 /* etc1.h */; }; - 507B40121C31BDD30067B53E /* CCRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7A1925AB4100A911A9 /* CCRenderer.h */; }; 507B40141C31BDD30067B53E /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; 507B40151C31BDD30067B53E /* CCEventListenerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176641960F89B00DE83F5 /* CCEventListenerController.h */; }; - 507B40161C31BDD30067B53E /* CCBatchCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD651925AB4100A911A9 /* CCBatchCommand.h */; }; - 507B40171C31BDD30067B53E /* CCMenuItemLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D1B180E26E600808F54 /* CCMenuItemLoader.h */; }; 507B40191C31BDD30067B53E /* CCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD51925AB6E00A911A9 /* CCEvent.h */; }; 507B401A1C31BDD30067B53E /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; }; 507B401C1C31BDD30067B53E /* CCNinePatchImageParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */; }; 507B401D1C31BDD30067B53E /* CCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176561960F89B00DE83F5 /* CCController.h */; }; - 507B401F1C31BDD30067B53E /* ComAudioReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384191A2590D2002C4610 /* ComAudioReader.h */; }; 507B40201C31BDD30067B53E /* CCGameController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176651960F89B00DE83F5 /* CCGameController.h */; }; - 507B40221C31BDD30067B53E /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8F18C72017004AD434 /* TextReader.h */; }; 507B40231C31BDD30067B53E /* CCEventListenerAcceleration.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDE31925AB6E00A911A9 /* CCEventListenerAcceleration.h */; }; - 507B40241C31BDD30067B53E /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E519AAD2F700C27E9E /* CCAABB.h */; }; 507B40251C31BDD30067B53E /* CCGLProgramCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD6B1925AB4100A911A9 /* CCGLProgramCache.h */; }; 507B40271C31BDD30067B53E /* CCProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFC1925AB6E00A911A9 /* CCProfiling.h */; }; - 507B40281C31BDD30067B53E /* TextAtlasReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8618C72017004AD434 /* TextAtlasReader.h */; }; - 507B40291C31BDD30067B53E /* CCScale9SpriteLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D27180E26E600808F54 /* CCScale9SpriteLoader.h */; }; - 507B402A1C31BDD30067B53E /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F619AAD2F700C27E9E /* CCMeshSkin.h */; }; - 507B402B1C31BDD30067B53E /* CCPUBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E51AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h */; }; - 507B402C1C31BDD30067B53E /* CCPUOnTimeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1851AA80A6500DDB1C5 /* CCPUOnTimeObserver.h */; }; - 507B402E1C31BDD30067B53E /* UISlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA0A18CF08D100240AA3 /* UISlider.h */; }; 507B402F1C31BDD30067B53E /* CCApplication-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */; }; - 507B40311C31BDD30067B53E /* CCPUTechniqueTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DB1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.h */; }; - 507B40321C31BDD30067B53E /* UITextBMFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1018CF08D100240AA3 /* UITextBMFont.h */; }; 507B40341C31BDD30067B53E /* CCGLProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD691925AB4100A911A9 /* CCGLProgram.h */; }; - 507B40351C31BDD30067B53E /* CSLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2D419E66581002D7CE7 /* CSLoader.h */; }; 507B40361C31BDD30067B53E /* CCApplicationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */; }; 507B40371C31BDD30067B53E /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; - 507B40391C31BDD30067B53E /* CCAllocatorStrategyPool.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03461A3B51AA00825BB5 /* CCAllocatorStrategyPool.h */; }; - 507B403A1C31BDD30067B53E /* CCTimeLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 0634A4CE194B19E400E608AF /* CCTimeLine.h */; }; - 507B403B1C31BDD30067B53E /* UILayoutComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 38B8E2E019E671D2002D7CE7 /* UILayoutComponent.h */; }; - 507B403D1C31BDD30067B53E /* CCPUGravityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1391AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h */; }; 507B403E1C31BDD30067B53E /* MathUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD271925AB0000A911A9 /* MathUtil.h */; }; - 507B403F1C31BDD30067B53E /* CCInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67F18F57BE800EFE3A6 /* CCInteger.h */; }; - 507B40401C31BDD30067B53E /* CCSkybox.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B871AC3AFAC00043997 /* CCSkybox.h */; }; - 507B40411C31BDD30067B53E /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168651807AF4E005B8026 /* CCTableViewCell.h */; }; - 507B40421C31BDD30067B53E /* CCPUTranslateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E51AA80A6500DDB1C5 /* CCPUTranslateManager.h */; }; - 507B40431C31BDD30067B53E /* ListViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7718C72017004AD434 /* ListViewReader.h */; }; 507B40441C31BDD30067B53E /* CCVertexAttribBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */; }; 507B40461C31BDD30067B53E /* ccUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE101925AB6F00A911A9 /* ccUtils.h */; }; - 507B40471C31BDD30067B53E /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17FC19AAD2F700C27E9E /* CCObjLoader.h */; }; - 507B40481C31BDD30067B53E /* CCNodeLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D20180E26E600808F54 /* CCNodeLoader.h */; }; 507B40491C31BDD30067B53E /* CCEventTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF11925AB6E00A911A9 /* CCEventTouch.h */; }; - 507B404A1C31BDD30067B53E /* CCPUAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D11AA80A6500DDB1C5 /* CCPUAffectorTranslator.h */; }; 507B404B1C31BDD30067B53E /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; }; - 507B404C1C31BDD30067B53E /* CCPURibbonTrailRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B11AA80A6500DDB1C5 /* CCPURibbonTrailRender.h */; }; 507B404D1C31BDD30067B53E /* CCTextureAtlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD801925AB4100A911A9 /* CCTextureAtlas.h */; }; 507B404E1C31BDD30067B53E /* DetourCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F871B04825B00E47F5F /* DetourCommon.h */; }; - 507B404F1C31BDD30067B53E /* CCPhysics3DComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */; }; - 507B40501C31BDD30067B53E /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17F219AAD2F700C27E9E /* CCBundleReader.h */; }; - 507B40511C31BDD30067B53E /* Node3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 182C5CB11A95964700C30D34 /* Node3DReader.h */; }; 507B40521C31BDD30067B53E /* CCEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDDB1925AB6E00A911A9 /* CCEventDispatcher.h */; }; 507B40531C31BDD30067B53E /* CCTweenFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 2986667918B1B079000E39CA /* CCTweenFunction.h */; }; - 507B40541C31BDD30067B53E /* TriggerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 06CAAABD186AD63B0012A414 /* TriggerBase.h */; }; - 507B40571C31BDD30067B53E /* CCPUSlaveBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CB1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.h */; }; - 507B40581C31BDD30067B53E /* CCControlSaturationBrightnessPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168411807AF4E005B8026 /* CCControlSaturationBrightnessPicker.h */; }; - 507B405A1C31BDD30067B53E /* CCPUDoFreezeEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1091AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h */; }; 507B405B1C31BDD30067B53E /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD319BFAECF00EF68ED /* CCGL.h */; }; - 507B405C1C31BDD30067B53E /* CCArmatureAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5955180E930E00EF57C3 /* CCArmatureAnimation.h */; }; 507B405E1C31BDD30067B53E /* CCVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */; }; 507B405F1C31BDD30067B53E /* Vec3.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD331925AB0000A911A9 /* Vec3.h */; }; 507B40601C31BDD30067B53E /* CCEventType.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF21925AB6E00A911A9 /* CCEventType.h */; }; - 507B40631C31BDD30067B53E /* CCComRender.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5967180E930E00EF57C3 /* CCComRender.h */; }; - 507B40641C31BDD30067B53E /* CCPUGeometryRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1331AA80A6500DDB1C5 /* CCPUGeometryRotator.h */; }; - 507B40651C31BDD30067B53E /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF584D180E40B9000584C8 /* LocalStorage.h */; }; 507B40661C31BDD30067B53E /* AudioCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CB246F19D9C5A100687767 /* AudioCache.h */; }; - 507B40691C31BDD30067B53E /* CCBone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C595D180E930E00EF57C3 /* CCBone.h */; }; - 507B406A1C31BDD30067B53E /* CCAllocatorStrategyDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03431A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h */; }; 507B406B1C31BDD30067B53E /* CCVertex.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD221925AB0000A911A9 /* CCVertex.h */; }; - 507B406F1C31BDD30067B53E /* CCPUOnCollisionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1651AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h */; }; - 507B40731C31BDD30067B53E /* CCParticle3DRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */; }; 507B40741C31BDD30067B53E /* DetourTileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */; }; - 507B40751C31BDD30067B53E /* CCProcessBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5975180E930E00EF57C3 /* CCProcessBase.h */; }; - 507B40761C31BDD30067B53E /* CCArmatureDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5959180E930E00EF57C3 /* CCArmatureDefine.h */; }; - 507B40791C31BDD30067B53E /* CSParseBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 382384021A259005002C4610 /* CSParseBinary_generated.h */; }; - 507B407C1C31BDD30067B53E /* CCDisplayFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596F180E930E00EF57C3 /* CCDisplayFactory.h */; }; - 507B407D1C31BDD30067B53E /* CCGLBufferedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9DCA03180E6955007A3AD4 /* CCGLBufferedNode.h */; }; - 507B407E1C31BDD30067B53E /* CCString.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C68318F57BE800EFE3A6 /* CCString.h */; }; 507B407F1C31BDD30067B53E /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; }; - 507B40821C31BDD30067B53E /* CCComAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5963180E930E00EF57C3 /* CCComAudio.h */; }; - 507B40831C31BDD30067B53E /* CCDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67C18F57BE800EFE3A6 /* CCDictionary.h */; }; - 507B40841C31BDD30067B53E /* CCPUOnClearObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1631AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h */; }; 507B40851C31BDD30067B53E /* ccShader_PositionTexture.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA05191D591000CE6051 /* ccShader_PositionTexture.frag */; }; 507B40861C31BDD30067B53E /* CCFastTMXTiledMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA984195A675C007B4522 /* CCFastTMXTiledMap.h */; }; 507B40881C31BDD30067B53E /* ccTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE081925AB6E00A911A9 /* ccTypes.h */; }; - 507B408A1C31BDD30067B53E /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE41807A56F005B8026 /* CDAudioManager.h */; }; - 507B408C1C31BDD30067B53E /* Light3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C261F271BE7528900707478 /* Light3DReader.h */; }; - 507B408D1C31BDD30067B53E /* CCPUPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1991AA80A6500DDB1C5 /* CCPUPlane.h */; }; - 507B40901C31BDD30067B53E /* CCControlStepper.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168451807AF4E005B8026 /* CCControlStepper.h */; }; 507B40911C31BDD30067B53E /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDC41925AB6E00A911A9 /* base64.h */; }; - 507B40941C31BDD30067B53E /* CCPhysicsDebugNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */; }; - 507B40951C31BDD30067B53E /* CCControlSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168431807AF4E005B8026 /* CCControlSlider.h */; }; - 507B40991C31BDD30067B53E /* CCPUBaseCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D71AA80A6500DDB1C5 /* CCPUBaseCollider.h */; }; - 507B409A1C31BDD30067B53E /* CCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67718F57BE800EFE3A6 /* CCArray.h */; }; - 507B409B1C31BDD30067B53E /* CCPUScriptTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C11AA80A6500DDB1C5 /* CCPUScriptTranslator.h */; }; - 507B409C1C31BDD30067B53E /* CCNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C6A318F58F7500EFE3A6 /* CCNotificationCenter.h */; }; 507B409D1C31BDD30067B53E /* ZipUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1E1925AB6F00A911A9 /* ZipUtils.h */; }; 507B409E1C31BDD30067B53E /* CCTextureCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD821925AB4100A911A9 /* CCTextureCache.h */; }; 507B409F1C31BDD30067B53E /* CCVertexIndexBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */; }; - 507B40A01C31BDD30067B53E /* CCPULineEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14B1AA80A6500DDB1C5 /* CCPULineEmitter.h */; }; 507B40A11C31BDD30067B53E /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; }; - 507B40A21C31BDD30067B53E /* CCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2C1926664700A911A9 /* CCThread.h */; }; - 507B40A31C31BDD30067B53E /* UITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1218CF08D100240AA3 /* UITextField.h */; }; - 507B40A41C31BDD30067B53E /* CCDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67D18F57BE800EFE3A6 /* CCDouble.h */; }; - 507B40A51C31BDD30067B53E /* CCPUColorAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FB1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h */; }; 507B40A71C31BDD30067B53E /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE11807A56F005B8026 /* Export.h */; }; - 507B40AB1C31BDD30067B53E /* CCSpriteFrameCacheHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597B180E930E00EF57C3 /* CCSpriteFrameCacheHelper.h */; }; 507B40AC1C31BDD30067B53E /* atitc.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDC21925AB6E00A911A9 /* atitc.h */; }; - 507B40AD1C31BDD30067B53E /* CCPUSimpleSpline.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C31AA80A6500DDB1C5 /* CCPUSimpleSpline.h */; }; - 507B40B01C31BDD30067B53E /* CCPUOnExpireObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1751AA80A6500DDB1C5 /* CCPUOnExpireObserver.h */; }; - 507B40B11C31BDD30067B53E /* CCActionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C594F180E930E00EF57C3 /* CCActionNode.h */; }; - 507B40B31C31BDD30067B53E /* CCPhysics3DObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */; }; - 507B40B41C31BDD30067B53E /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306741B60B5B2001E6D43 /* SkeletonNodeReader.h */; }; 507B40B61C31BDD30067B53E /* TGAlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1A1925AB6F00A911A9 /* TGAlib.h */; }; - 507B40B71C31BDD30067B53E /* CCPUEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11D1AA80A6500DDB1C5 /* CCPUEmitter.h */; }; - 507B40BA1C31BDD30067B53E /* UIPageViewIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A738951BB0051F00BAAEF8 /* UIPageViewIndicator.h */; }; - 507B40BB1C31BDD30067B53E /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */; }; - 507B40BC1C31BDD30067B53E /* CCDatas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C596B180E930E00EF57C3 /* CCDatas.h */; }; - 507B40BD1C31BDD30067B53E /* CCBReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D02180E26E600808F54 /* CCBReader.h */; }; - 507B40BE1C31BDD30067B53E /* CCNodeLoaderListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D23180E26E600808F54 /* CCNodeLoaderListener.h */; }; - 507B40BF1C31BDD30067B53E /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */; }; - 507B40C01C31BDD30067B53E /* CCPUOnQuotaObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17D1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h */; }; - 507B40C11C31BDD30067B53E /* CCNavMeshAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C21B18492D006762CB /* CCNavMeshAgent.h */; }; - 507B40C21C31BDD30067B53E /* CCPUScaleVelocityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B71AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.h */; }; - 507B40C31C31BDD30067B53E /* CCPUSphere.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D11AA80A6500DDB1C5 /* CCPUSphere.h */; }; - 507B40C41C31BDD30067B53E /* CCParticle3DAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */; }; - 507B40C51C31BDD30067B53E /* CCPURendererTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AD1AA80A6500DDB1C5 /* CCPURendererTranslator.h */; }; 507B40C61C31BDD30067B53E /* CCMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012169F1AC473AD009A4BEA /* CCMaterial.h */; }; - 507B40C71C31BDD30067B53E /* CCPUBaseColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D91AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h */; }; - 507B40C81C31BDD30067B53E /* CCDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A01C67A18F57BE800EFE3A6 /* CCDeprecated.h */; }; - 507B40C91C31BDD30067B53E /* CCPULinearForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1471AA80A6500DDB1C5 /* CCPULinearForceAffector.h */; }; - 507B40CA1C31BDD30067B53E /* ParticleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3823842E1A259112002C4610 /* ParticleReader.h */; }; - 507B40CC1C31BDD30067B53E /* CCPUDynamicAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1191AA80A6500DDB1C5 /* CCPUDynamicAttribute.h */; }; - 507B40CE1C31BDD30067B53E /* CCESRenderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */; }; - 507B40CF1C31BDD30067B53E /* CCPUObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15F1AA80A6500DDB1C5 /* CCPUObserverTranslator.h */; }; 507B40D01C31BDD30067B53E /* CCEventFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDDD1925AB6E00A911A9 /* CCEventFocus.h */; }; - 507B40D11C31BDD30067B53E /* CCTransformHelp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C597F180E930E00EF57C3 /* CCTransformHelp.h */; }; - 507B40D31C31BDD30067B53E /* CCPUEmitterManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11F1AA80A6500DDB1C5 /* CCPUEmitterManager.h */; }; - 507B40D51C31BDD30067B53E /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; - 507B40D61C31BDD30067B53E /* CCLabelBMFontLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D0F180E26E600808F54 /* CCLabelBMFontLoader.h */; }; 507B40D71C31BDD30067B53E /* CCCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF211926664700A911A9 /* CCCommon.h */; }; 507B40D81C31BDD30067B53E /* CCCameraBackgroundBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */; }; - 507B40D91C31BDD30067B53E /* LoadingBarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB7A18C72017004AD434 /* LoadingBarReader.h */; }; 507B40DA1C31BDD30067B53E /* sweep_context.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB20861AE7C57D00C31518 /* sweep_context.h */; }; 507B40DB1C31BDD30067B53E /* CCEventKeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDDF1925AB6E00A911A9 /* CCEventKeyboard.h */; }; - 507B40DC1C31BDD30067B53E /* CCPUBeamRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DF1AA80A6500DDB1C5 /* CCPUBeamRender.h */; }; - 507B40DE1C31BDD30067B53E /* CCPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61251A3FFE3D0038DE01 /* CCPlane.h */; }; - 507B40DF1C31BDD30067B53E /* CCPUOnEmissionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16F1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h */; }; - 507B40E01C31BDD30067B53E /* CCPUTextureAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DD1AA80A6500DDB1C5 /* CCPUTextureAnimator.h */; }; 507B40E11C31BDD30067B53E /* CCSAXParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2A1926664700A911A9 /* CCSAXParser.h */; }; 507B40E31C31BDD30067B53E /* OpenGL_Internal-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DF1926736A00CD74DD /* OpenGL_Internal-ios.h */; }; - 507B40E51C31BDD30067B53E /* WidgetCallBackHandlerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 38ACD1FB1A27111900C3093D /* WidgetCallBackHandlerProtocol.h */; }; 507B40E81C31BDD30067B53E /* CCRenderCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD771925AB4100A911A9 /* CCRenderCommand.h */; }; - 507B40EB1C31BDD30067B53E /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168361807AF4E005B8026 /* CCControl.h */; }; - 507B40EC1C31BDD30067B53E /* CCArmature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8C5953180E930E00EF57C3 /* CCArmature.h */; }; 507B40ED1C31BDD30067B53E /* CCAsyncTaskPool.h in Headers */ = {isa = PBXBuildFile; fileRef = B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */; }; - 507B40EE1C31BDD30067B53E /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; }; - 507B40EF1C31BDD30067B53E /* UIImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9F718CF08D000240AA3 /* UIImageView.h */; }; - 507B40F11C31BDD30067B53E /* CCPUBillboardChain.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E71AA80A6500DDB1C5 /* CCPUBillboardChain.h */; }; 507B40F21C31BDD30067B53E /* CCEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDE11925AB6E00A911A9 /* CCEventListener.h */; }; - 507B40F31C31BDD30067B53E /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */; }; 507B40F61C31BDD30067B53E /* CCUserDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE0A1925AB6E00A911A9 /* CCUserDefault.h */; }; - 507B40F71C31BDD30067B53E /* ButtonReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB6B18C72017004AD434 /* ButtonReader.h */; }; 507B40F91C31BDD30067B53E /* CCIDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */; }; 50864C8B1C7BC1B000B3BAB1 /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864C6D1C7BC1B000B3BAB1 /* chipmunk.h */; }; 50864C8C1C7BC1B000B3BAB1 /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864C6D1C7BC1B000B3BAB1 /* chipmunk.h */; }; @@ -3148,9 +1528,6 @@ 50864CE21C7BC1B100B3BAB1 /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864C8A1C7BC1B000B3BAB1 /* cpVect.h */; }; 50864CE31C7BC1B100B3BAB1 /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864C8A1C7BC1B000B3BAB1 /* cpVect.h */; }; 50864CE41C7BC1B100B3BAB1 /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864C8A1C7BC1B000B3BAB1 /* cpVect.h */; }; - 50864CEA1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864CE61C7BC90A00B3BAB1 /* cpCompat62.h */; }; - 50864CEB1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864CE61C7BC90A00B3BAB1 /* cpCompat62.h */; }; - 50864CEC1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */ = {isa = PBXBuildFile; fileRef = 50864CE61C7BC90A00B3BAB1 /* cpCompat62.h */; }; 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; @@ -3196,10 +1573,6 @@ 50ABBD611925AB0000A911A9 /* Vec4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD351925AB0000A911A9 /* Vec4.cpp */; }; 50ABBD621925AB0000A911A9 /* Vec4.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD361925AB0000A911A9 /* Vec4.h */; }; 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD361925AB0000A911A9 /* Vec4.h */; }; - 50ABBD831925AB4100A911A9 /* CCBatchCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD641925AB4100A911A9 /* CCBatchCommand.cpp */; }; - 50ABBD841925AB4100A911A9 /* CCBatchCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD641925AB4100A911A9 /* CCBatchCommand.cpp */; }; - 50ABBD851925AB4100A911A9 /* CCBatchCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD651925AB4100A911A9 /* CCBatchCommand.h */; }; - 50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD651925AB4100A911A9 /* CCBatchCommand.h */; }; 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD661925AB4100A911A9 /* CCCustomCommand.cpp */; }; 50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD661925AB4100A911A9 /* CCCustomCommand.cpp */; }; 50ABBD891925AB4100A911A9 /* CCCustomCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD671925AB4100A911A9 /* CCCustomCommand.h */; }; @@ -3234,10 +1607,6 @@ 50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD771925AB4100A911A9 /* CCRenderCommand.h */; }; 50ABBDAB1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD781925AB4100A911A9 /* CCRenderCommandPool.h */; }; 50ABBDAC1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD781925AB4100A911A9 /* CCRenderCommandPool.h */; }; - 50ABBDAD1925AB4100A911A9 /* CCRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD791925AB4100A911A9 /* CCRenderer.cpp */; }; - 50ABBDAE1925AB4100A911A9 /* CCRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD791925AB4100A911A9 /* CCRenderer.cpp */; }; - 50ABBDAF1925AB4100A911A9 /* CCRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7A1925AB4100A911A9 /* CCRenderer.h */; }; - 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7A1925AB4100A911A9 /* CCRenderer.h */; }; 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD7B1925AB4100A911A9 /* ccShaders.cpp */; }; 50ABBDB21925AB4100A911A9 /* ccShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD7B1925AB4100A911A9 /* ccShaders.cpp */; }; 50ABBDB31925AB4100A911A9 /* ccShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD7C1925AB4100A911A9 /* ccShaders.h */; }; @@ -3284,10 +1653,6 @@ 50ABBE3A1925AB6F00A911A9 /* CCData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDCE1925AB6E00A911A9 /* CCData.cpp */; }; 50ABBE3B1925AB6F00A911A9 /* CCData.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDCF1925AB6E00A911A9 /* CCData.h */; }; 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDCF1925AB6E00A911A9 /* CCData.h */; }; - 50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD01925AB6E00A911A9 /* CCDataVisitor.cpp */; }; - 50ABBE3E1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD01925AB6E00A911A9 /* CCDataVisitor.cpp */; }; - 50ABBE3F1925AB6F00A911A9 /* CCDataVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD11925AB6E00A911A9 /* CCDataVisitor.h */; }; - 50ABBE401925AB6F00A911A9 /* CCDataVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD11925AB6E00A911A9 /* CCDataVisitor.h */; }; 50ABBE411925AB6F00A911A9 /* CCDirector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD21925AB6E00A911A9 /* CCDirector.cpp */; }; 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDD21925AB6E00A911A9 /* CCDirector.cpp */; }; 50ABBE431925AB6F00A911A9 /* CCDirector.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDD31925AB6E00A911A9 /* CCDirector.h */; }; @@ -3446,8 +1811,6 @@ 50ABC0021926664800A911A9 /* CCLock-apple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */; }; 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock-apple.h */; }; 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock-apple.h */; }; - 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */; }; - 50ABC0061926664800A911A9 /* CCThread-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */; }; 50ABC0071926664800A911A9 /* CCApplicationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */; }; 50ABC0081926664800A911A9 /* CCApplicationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */; }; 50ABC0091926664800A911A9 /* CCCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF211926664700A911A9 /* CCCommon.h */; }; @@ -3470,12 +1833,6 @@ 50ABC01A1926664800A911A9 /* CCSAXParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF291926664700A911A9 /* CCSAXParser.cpp */; }; 50ABC01B1926664800A911A9 /* CCSAXParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2A1926664700A911A9 /* CCSAXParser.h */; }; 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2A1926664700A911A9 /* CCSAXParser.h */; }; - 50ABC01D1926664800A911A9 /* CCThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2B1926664700A911A9 /* CCThread.cpp */; }; - 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2B1926664700A911A9 /* CCThread.cpp */; }; - 50ABC01F1926664800A911A9 /* CCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2C1926664700A911A9 /* CCThread.h */; }; - 50ABC0201926664800A911A9 /* CCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2C1926664700A911A9 /* CCThread.h */; }; - 50ABC0211926664800A911A9 /* CCGLViewImpl-desktop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */; }; - 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */; }; 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */; }; 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF501926664700A911A9 /* CCApplication-mac.mm */; }; 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF511926664700A911A9 /* CCCommon-mac.mm */; }; @@ -3497,21 +1854,6 @@ 50CB248019D9C5A100687767 /* AudioPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50CB247419D9C5A100687767 /* AudioPlayer.mm */; }; 50CE4D1F1D243DD8003D2FB9 /* glfw3.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CE4D1D1D243DD8003D2FB9 /* glfw3.h */; }; 50CE4D201D243DD8003D2FB9 /* glfw3native.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CE4D1E1D243DD8003D2FB9 /* glfw3native.h */; }; - 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; - 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */; }; - 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */; }; - 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */; }; - 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */; }; - 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */; }; - 50F965511CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50F9654E1CD0360000ADE813 /* CCVRGenericRenderer.cpp */; }; - 50F965521CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50F9654E1CD0360000ADE813 /* CCVRGenericRenderer.cpp */; }; - 50F965531CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50F9654E1CD0360000ADE813 /* CCVRGenericRenderer.cpp */; }; - 50F965541CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F9654F1CD0360000ADE813 /* CCVRGenericRenderer.h */; }; - 50F965551CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F9654F1CD0360000ADE813 /* CCVRGenericRenderer.h */; }; - 50F965561CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F9654F1CD0360000ADE813 /* CCVRGenericRenderer.h */; }; - 50F965571CD0360000ADE813 /* CCVRProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F965501CD0360000ADE813 /* CCVRProtocol.h */; }; - 50F965581CD0360000ADE813 /* CCVRProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F965501CD0360000ADE813 /* CCVRProtocol.h */; }; - 50F965591CD0360000ADE813 /* CCVRProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F965501CD0360000ADE813 /* CCVRProtocol.h */; }; 50FC3F9E1D74C0A3001C936A /* CCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E61781C1966A5A300DE83F5 /* CCController.cpp */; }; 50FC3F9F1D74C0E5001C936A /* CCController-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176551960F89B00DE83F5 /* CCController-apple.mm */; }; 50FC3FA21D74C1A1001C936A /* CCEventController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176611960F89B00DE83F5 /* CCEventController.cpp */; }; @@ -3524,38 +1866,13 @@ 52B47A321A5349A3004E4C60 /* HttpCookie.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B47A2D1A5349A3004E4C60 /* HttpCookie.h */; }; 53E23A171E78B082009DD732 /* CCDevice-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 294D7D931D0E67B4002CE7B7 /* CCDevice-apple.h */; }; 53E23A181E78B085009DD732 /* CCDevice-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 294D7D921D0E67B4002CE7B7 /* CCDevice-apple.mm */; }; - 5E9F61261A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61221A3FFE3D0038DE01 /* CCFrustum.cpp */; }; - 5E9F61271A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61221A3FFE3D0038DE01 /* CCFrustum.cpp */; }; - 5E9F61281A3FFE3D0038DE01 /* CCFrustum.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61231A3FFE3D0038DE01 /* CCFrustum.h */; }; - 5E9F61291A3FFE3D0038DE01 /* CCFrustum.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61231A3FFE3D0038DE01 /* CCFrustum.h */; }; - 5E9F612A1A3FFE3D0038DE01 /* CCPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61241A3FFE3D0038DE01 /* CCPlane.cpp */; }; - 5E9F612B1A3FFE3D0038DE01 /* CCPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E9F61241A3FFE3D0038DE01 /* CCPlane.cpp */; }; - 5E9F612C1A3FFE3D0038DE01 /* CCPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61251A3FFE3D0038DE01 /* CCPlane.h */; }; - 5E9F612D1A3FFE3D0038DE01 /* CCPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9F61251A3FFE3D0038DE01 /* CCPlane.h */; }; 826294331AAF001C00CB7CF7 /* HttpAsynConnection-apple.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2A1A5349A3004E4C60 /* HttpAsynConnection-apple.m */; }; 826294341AAF003E00CB7CF7 /* HttpClient-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2B1A5349A3004E4C60 /* HttpClient-apple.mm */; }; 826294351AAF004C00CB7CF7 /* HttpCookie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B47A2C1A5349A3004E4C60 /* HttpCookie.cpp */; }; 8525E3A21B291E42008EE815 /* clipper.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 8525E3A11B291E42008EE815 /* clipper.hpp */; }; 8525E3A31B291E42008EE815 /* clipper.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 8525E3A11B291E42008EE815 /* clipper.hpp */; }; - 85505F041B60E3AB003F2CD4 /* CCBoneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306631B60B583001E6D43 /* CCBoneNode.cpp */; }; - 85505F051B60E3B2003F2CD4 /* CCBoneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306641B60B583001E6D43 /* CCBoneNode.h */; }; - 85505F061B60E3B6003F2CD4 /* CCSkeletonNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */; }; - 85505F071B60E3BA003F2CD4 /* CCSkeletonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306661B60B583001E6D43 /* CCSkeletonNode.h */; }; - 85505F081B60E3BD003F2CD4 /* CCSkinNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306671B60B583001E6D43 /* CCSkinNode.cpp */; }; - 85505F091B60E3C1003F2CD4 /* CCSkinNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306681B60B583001E6D43 /* CCSkinNode.h */; }; - 85505F0A1B60E3CE003F2CD4 /* BoneNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306701B60B5B2001E6D43 /* BoneNodeReader.cpp */; }; - 85505F0B1B60E3D1003F2CD4 /* BoneNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306711B60B5B2001E6D43 /* BoneNodeReader.h */; }; - 85505F0C1B60E3D5003F2CD4 /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306721B60B5B2001E6D43 /* CSBoneBinary_generated.h */; }; - 85505F0D1B60E3D8003F2CD4 /* SkeletonNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306731B60B5B2001E6D43 /* SkeletonNodeReader.cpp */; }; - 85505F0E1B60E3DB003F2CD4 /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306741B60B5B2001E6D43 /* SkeletonNodeReader.h */; }; 85B3743A1B204B9400C488D6 /* clipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85B374381B204B9400C488D6 /* clipper.cpp */; }; 85B3743B1B204B9400C488D6 /* clipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85B374381B204B9400C488D6 /* clipper.cpp */; }; - 94A6DF051C7303FD0094AEF7 /* LocalizationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A6DF031C7303FD0094AEF7 /* LocalizationManager.cpp */; }; - 94A6DF061C7303FD0094AEF7 /* LocalizationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 94A6DF041C7303FD0094AEF7 /* LocalizationManager.h */; }; - 94A6DF071C73040D0094AEF7 /* LocalizationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A6DF031C7303FD0094AEF7 /* LocalizationManager.cpp */; }; - 94A6DF081C73040E0094AEF7 /* LocalizationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A6DF031C7303FD0094AEF7 /* LocalizationManager.cpp */; }; - 94A6DF091C7304120094AEF7 /* LocalizationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 94A6DF041C7303FD0094AEF7 /* LocalizationManager.h */; }; - 94A6DF0A1C7304120094AEF7 /* LocalizationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 94A6DF041C7303FD0094AEF7 /* LocalizationManager.h */; }; A045F6D61BA81577005076C7 /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6D41BA81577005076C7 /* CCTextureCube.cpp */; }; A045F6D71BA81577005076C7 /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6D41BA81577005076C7 /* CCTextureCube.cpp */; }; A045F6D81BA81577005076C7 /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6D51BA81577005076C7 /* CCTextureCube.h */; }; @@ -3564,10 +1881,6 @@ A045F6DD1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */; }; A045F6DE1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */; }; A045F6DF1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */; }; - A045F6EF1BA81821005076C7 /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */; }; - A045F6F01BA81821005076C7 /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */; }; - A045F6F11BA81821005076C7 /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6EE1BA81821005076C7 /* GameNode3DReader.h */; }; - A045F6F21BA81821005076C7 /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6EE1BA81821005076C7 /* GameNode3DReader.h */; }; A0534A651B872FFD006B03E5 /* CCDownloader-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */; }; A0534A661B872FFD006B03E5 /* CCDownloader-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */; }; A0534A671B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */; }; @@ -3577,11 +1890,6 @@ A05DCF9D1B90584E00EE040B /* CCDownloader-curl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A05DCF9B1B90584E00EE040B /* CCDownloader-curl.cpp */; }; A05DCF9E1B90584E00EE040B /* CCDownloader-curl.h in Headers */ = {isa = PBXBuildFile; fileRef = A05DCF9C1B90584E00EE040B /* CCDownloader-curl.h */; }; A07A4CAF1783777C0073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551A342158F2AB200E66CFE /* Foundation.framework */; }; - A0E749F71BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */; }; - A0E749F81BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */; }; - A0E749F91BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */ = {isa = PBXBuildFile; fileRef = A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */; }; - A0E749FA1BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */ = {isa = PBXBuildFile; fileRef = A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */; }; - B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; }; B217703C1977ECB4009EE11B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B217703B1977ECB4009EE11B /* IOKit.framework */; }; B21770401977ECE6009EE11B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B217703F1977ECE6009EE11B /* OpenGL.framework */; }; B21770421977ECF8009EE11B /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770411977ECF8009EE11B /* ApplicationServices.framework */; }; @@ -3591,10 +1899,6 @@ B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; }; B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */; }; B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */; }; - B240C5E91B09DFB000137F50 /* CCFrameBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */; }; - B240C5EA1B09DFB000137F50 /* CCFrameBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */; }; - B240C5EB1B09DFB000137F50 /* CCFrameBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */; }; - B240C5EC1B09DFB000137F50 /* CCFrameBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */; }; B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */; }; B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */; }; B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA982195A675C007B4522 /* CCFastTMXLayer.h */; }; @@ -3603,12 +1907,6 @@ B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA983195A675C007B4522 /* CCFastTMXTiledMap.cpp */; }; B24AA98B195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA984195A675C007B4522 /* CCFastTMXTiledMap.h */; }; B24AA98C195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA984195A675C007B4522 /* CCFastTMXTiledMap.h */; }; - B257B44E1989D5E800D9A687 /* CCPrimitive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B44C1989D5E800D9A687 /* CCPrimitive.cpp */; }; - B257B44F1989D5E800D9A687 /* CCPrimitive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B44C1989D5E800D9A687 /* CCPrimitive.cpp */; }; - B257B4501989D5E800D9A687 /* CCPrimitive.h in Headers */ = {isa = PBXBuildFile; fileRef = B257B44D1989D5E800D9A687 /* CCPrimitive.h */; }; - B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */ = {isa = PBXBuildFile; fileRef = B257B44D1989D5E800D9A687 /* CCPrimitive.h */; }; - B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; }; - B257B461198A353E00D9A687 /* CCPrimitiveCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B257B45F198A353E00D9A687 /* CCPrimitiveCommand.h */; }; B276EF5F1988D1D500CD400F /* CCVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */; }; B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */ = {isa = PBXBuildFile; fileRef = B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */; }; B276EF611988D1D500CD400F /* CCVertexIndexData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */; }; @@ -3621,695 +1919,10 @@ B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; }; B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; - B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */; }; - B5668D7D1B3838E4003CBD5E /* UIScrollViewBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5668D7B1B3838E4003CBD5E /* UIScrollViewBar.cpp */; }; - B5668D7E1B3838E4003CBD5E /* UIScrollViewBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5668D7B1B3838E4003CBD5E /* UIScrollViewBar.cpp */; }; - B5668D7F1B3838E4003CBD5E /* UIScrollViewBar.h in Headers */ = {isa = PBXBuildFile; fileRef = B5668D7C1B3838E4003CBD5E /* UIScrollViewBar.h */; }; - B5668D801B3838E4003CBD5E /* UIScrollViewBar.h in Headers */ = {isa = PBXBuildFile; fileRef = B5668D7C1B3838E4003CBD5E /* UIScrollViewBar.h */; }; - B5A738961BB0051F00BAAEF8 /* UIPageViewIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5A738941BB0051F00BAAEF8 /* UIPageViewIndicator.cpp */; }; - B5A738971BB0051F00BAAEF8 /* UIPageViewIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5A738941BB0051F00BAAEF8 /* UIPageViewIndicator.cpp */; }; - B5A738981BB0051F00BAAEF8 /* UIPageViewIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A738951BB0051F00BAAEF8 /* UIPageViewIndicator.h */; }; - B5A738991BB0051F00BAAEF8 /* UIPageViewIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A738951BB0051F00BAAEF8 /* UIPageViewIndicator.h */; }; - B5CE6DBE1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DBC1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp */; }; - B5CE6DBF1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DBC1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp */; }; - B5CE6DC01B3BF2B1002B0419 /* UIAbstractCheckButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DBD1B3BF2B1002B0419 /* UIAbstractCheckButton.h */; }; - B5CE6DC11B3BF2B1002B0419 /* UIAbstractCheckButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DBD1B3BF2B1002B0419 /* UIAbstractCheckButton.h */; }; - B5CE6DC81B3C05BA002B0419 /* UIRadioButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DC61B3C05BA002B0419 /* UIRadioButton.cpp */; }; - B5CE6DC91B3C05BA002B0419 /* UIRadioButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5CE6DC61B3C05BA002B0419 /* UIRadioButton.cpp */; }; - B5CE6DCA1B3C05BA002B0419 /* UIRadioButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DC71B3C05BA002B0419 /* UIRadioButton.h */; }; - B5CE6DCB1B3C05BA002B0419 /* UIRadioButton.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE6DC71B3C05BA002B0419 /* UIRadioButton.h */; }; - B603F1A81AC8EA0900A9579C /* CCTerrain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */; }; - B603F1A91AC8EA0900A9579C /* CCTerrain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */; }; - B603F1AA1AC8EA0900A9579C /* CCTerrain.h in Headers */ = {isa = PBXBuildFile; fileRef = B603F1A71AC8EA0900A9579C /* CCTerrain.h */; }; - B603F1AB1AC8EA0900A9579C /* CCTerrain.h in Headers */ = {isa = PBXBuildFile; fileRef = B603F1A71AC8EA0900A9579C /* CCTerrain.h */; }; - B60C5BD419AC68B10056FBDE /* CCBillBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */; }; - B60C5BD519AC68B10056FBDE /* CCBillBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */; }; - B60C5BD619AC68B10056FBDE /* CCBillBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = B60C5BD319AC68B10056FBDE /* CCBillBoard.h */; }; - B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = B60C5BD319AC68B10056FBDE /* CCBillBoard.h */; }; B63990CC1A490AFE00B07923 /* CCAsyncTaskPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */; }; B63990CD1A490AFE00B07923 /* CCAsyncTaskPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */; }; B63990CE1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */ = {isa = PBXBuildFile; fileRef = B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */; }; B63990CF1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */ = {isa = PBXBuildFile; fileRef = B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */; }; - B665E1F21AA80A6500DDB1C5 /* CCPUAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */; }; - B665E1F31AA80A6500DDB1C5 /* CCPUAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */; }; - B665E1F41AA80A6500DDB1C5 /* CCPUAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */; }; - B665E1F51AA80A6500DDB1C5 /* CCPUAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */; }; - B665E1F61AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */; }; - B665E1F71AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */; }; - B665E1F81AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CF1AA80A6500DDB1C5 /* CCPUAffectorManager.h */; }; - B665E1F91AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0CF1AA80A6500DDB1C5 /* CCPUAffectorManager.h */; }; - B665E1FA1AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D01AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp */; }; - B665E1FB1AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D01AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp */; }; - B665E1FC1AA80A6500DDB1C5 /* CCPUAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D11AA80A6500DDB1C5 /* CCPUAffectorTranslator.h */; }; - B665E1FD1AA80A6500DDB1C5 /* CCPUAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D11AA80A6500DDB1C5 /* CCPUAffectorTranslator.h */; }; - B665E1FE1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D21AA80A6500DDB1C5 /* CCPUAlignAffector.cpp */; }; - B665E1FF1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D21AA80A6500DDB1C5 /* CCPUAlignAffector.cpp */; }; - B665E2001AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D31AA80A6500DDB1C5 /* CCPUAlignAffector.h */; }; - B665E2011AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D31AA80A6500DDB1C5 /* CCPUAlignAffector.h */; }; - B665E2021AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D41AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp */; }; - B665E2031AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D41AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp */; }; - B665E2041AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D51AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h */; }; - B665E2051AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D51AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h */; }; - B665E2061AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D61AA80A6500DDB1C5 /* CCPUBaseCollider.cpp */; }; - B665E2071AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D61AA80A6500DDB1C5 /* CCPUBaseCollider.cpp */; }; - B665E2081AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D71AA80A6500DDB1C5 /* CCPUBaseCollider.h */; }; - B665E2091AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D71AA80A6500DDB1C5 /* CCPUBaseCollider.h */; }; - B665E20A1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D81AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp */; }; - B665E20B1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0D81AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp */; }; - B665E20C1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D91AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h */; }; - B665E20D1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0D91AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h */; }; - B665E20E1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DA1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp */; }; - B665E20F1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DA1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp */; }; - B665E2101AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DB1AA80A6500DDB1C5 /* CCPUBaseForceAffector.h */; }; - B665E2111AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DB1AA80A6500DDB1C5 /* CCPUBaseForceAffector.h */; }; - B665E2121AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DC1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp */; }; - B665E2131AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DC1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp */; }; - B665E2141AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DD1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h */; }; - B665E2151AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DD1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h */; }; - B665E2161AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DE1AA80A6500DDB1C5 /* CCPUBeamRender.cpp */; }; - B665E2171AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0DE1AA80A6500DDB1C5 /* CCPUBeamRender.cpp */; }; - B665E2181AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DF1AA80A6500DDB1C5 /* CCPUBeamRender.h */; }; - B665E2191AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0DF1AA80A6500DDB1C5 /* CCPUBeamRender.h */; }; - B665E21A1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E01AA80A6500DDB1C5 /* CCPUBehaviour.cpp */; }; - B665E21B1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E01AA80A6500DDB1C5 /* CCPUBehaviour.cpp */; }; - B665E21C1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E11AA80A6500DDB1C5 /* CCPUBehaviour.h */; }; - B665E21D1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E11AA80A6500DDB1C5 /* CCPUBehaviour.h */; }; - B665E21E1AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E21AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp */; }; - B665E21F1AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E21AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp */; }; - B665E2201AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E31AA80A6500DDB1C5 /* CCPUBehaviourManager.h */; }; - B665E2211AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E31AA80A6500DDB1C5 /* CCPUBehaviourManager.h */; }; - B665E2221AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E41AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp */; }; - B665E2231AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E41AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp */; }; - B665E2241AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E51AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h */; }; - B665E2251AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E51AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h */; }; - B665E2261AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E61AA80A6500DDB1C5 /* CCPUBillboardChain.cpp */; }; - B665E2271AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E61AA80A6500DDB1C5 /* CCPUBillboardChain.cpp */; }; - B665E2281AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E71AA80A6500DDB1C5 /* CCPUBillboardChain.h */; }; - B665E2291AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E71AA80A6500DDB1C5 /* CCPUBillboardChain.h */; }; - B665E22A1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E81AA80A6500DDB1C5 /* CCPUBoxCollider.cpp */; }; - B665E22B1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0E81AA80A6500DDB1C5 /* CCPUBoxCollider.cpp */; }; - B665E22C1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E91AA80A6500DDB1C5 /* CCPUBoxCollider.h */; }; - B665E22D1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0E91AA80A6500DDB1C5 /* CCPUBoxCollider.h */; }; - B665E22E1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EA1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp */; }; - B665E22F1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EA1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp */; }; - B665E2301AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EB1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h */; }; - B665E2311AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EB1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h */; }; - B665E2321AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EC1AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp */; }; - B665E2331AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EC1AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp */; }; - B665E2341AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0ED1AA80A6500DDB1C5 /* CCPUBoxEmitter.h */; }; - B665E2351AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0ED1AA80A6500DDB1C5 /* CCPUBoxEmitter.h */; }; - B665E2361AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EE1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp */; }; - B665E2371AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0EE1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp */; }; - B665E2381AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EF1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h */; }; - B665E2391AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0EF1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h */; }; - B665E23A1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F01AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp */; }; - B665E23B1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F01AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp */; }; - B665E23C1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F11AA80A6500DDB1C5 /* CCPUCircleEmitter.h */; }; - B665E23D1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F11AA80A6500DDB1C5 /* CCPUCircleEmitter.h */; }; - B665E23E1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F21AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp */; }; - B665E23F1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F21AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp */; }; - B665E2401AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F31AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h */; }; - B665E2411AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F31AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h */; }; - B665E2421AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F41AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp */; }; - B665E2431AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F41AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp */; }; - B665E2441AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F51AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h */; }; - B665E2451AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F51AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h */; }; - B665E2461AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F61AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp */; }; - B665E2471AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F61AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp */; }; - B665E2481AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F71AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h */; }; - B665E2491AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F71AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h */; }; - B665E24A1AA80A6500DDB1C5 /* CCPUColorAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F81AA80A6500DDB1C5 /* CCPUColorAffector.cpp */; }; - B665E24B1AA80A6500DDB1C5 /* CCPUColorAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0F81AA80A6500DDB1C5 /* CCPUColorAffector.cpp */; }; - B665E24C1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F91AA80A6500DDB1C5 /* CCPUColorAffector.h */; }; - B665E24D1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0F91AA80A6500DDB1C5 /* CCPUColorAffector.h */; }; - B665E24E1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FA1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp */; }; - B665E24F1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FA1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp */; }; - B665E2501AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FB1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h */; }; - B665E2511AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FB1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h */; }; - B665E2521AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FC1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp */; }; - B665E2531AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FC1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp */; }; - B665E2541AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FD1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h */; }; - B665E2551AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FD1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h */; }; - B665E2561AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FE1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp */; }; - B665E2571AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E0FE1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp */; }; - B665E2581AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FF1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h */; }; - B665E2591AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E0FF1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h */; }; - B665E25A1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1001AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp */; }; - B665E25B1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1001AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp */; }; - B665E25C1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1011AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h */; }; - B665E25D1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1011AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h */; }; - B665E25E1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1021AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp */; }; - B665E25F1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1021AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp */; }; - B665E2601AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1031AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h */; }; - B665E2611AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1031AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h */; }; - B665E2621AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1041AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp */; }; - B665E2631AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1041AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp */; }; - B665E2641AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1051AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h */; }; - B665E2651AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1051AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h */; }; - B665E2661AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1061AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp */; }; - B665E2671AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1061AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp */; }; - B665E2681AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1071AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h */; }; - B665E2691AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1071AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h */; }; - B665E26A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1081AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp */; }; - B665E26B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1081AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp */; }; - B665E26C1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1091AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h */; }; - B665E26D1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1091AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h */; }; - B665E26E1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp */; }; - B665E26F1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp */; }; - B665E2701AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h */; }; - B665E2711AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h */; }; - B665E2721AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10C1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp */; }; - B665E2731AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10C1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp */; }; - B665E2741AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10D1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h */; }; - B665E2751AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10D1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h */; }; - B665E2761AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10E1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp */; }; - B665E2771AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E10E1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp */; }; - B665E2781AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10F1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h */; }; - B665E2791AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E10F1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h */; }; - B665E27A1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1101AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp */; }; - B665E27B1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1101AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp */; }; - B665E27C1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1111AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h */; }; - B665E27D1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1111AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h */; }; - B665E27E1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1121AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp */; }; - B665E27F1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1121AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp */; }; - B665E2801AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1131AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h */; }; - B665E2811AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1131AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h */; }; - B665E2821AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1141AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp */; }; - B665E2831AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1141AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp */; }; - B665E2841AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1151AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h */; }; - B665E2851AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1151AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h */; }; - B665E2861AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1161AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp */; }; - B665E2871AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1161AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp */; }; - B665E2881AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1171AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h */; }; - B665E2891AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1171AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h */; }; - B665E28A1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1181AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp */; }; - B665E28B1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1181AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp */; }; - B665E28C1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1191AA80A6500DDB1C5 /* CCPUDynamicAttribute.h */; }; - B665E28D1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1191AA80A6500DDB1C5 /* CCPUDynamicAttribute.h */; }; - B665E28E1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11A1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp */; }; - B665E28F1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11A1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp */; }; - B665E2901AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11B1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h */; }; - B665E2911AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11B1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h */; }; - B665E2921AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11C1AA80A6500DDB1C5 /* CCPUEmitter.cpp */; }; - B665E2931AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11C1AA80A6500DDB1C5 /* CCPUEmitter.cpp */; }; - B665E2941AA80A6500DDB1C5 /* CCPUEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11D1AA80A6500DDB1C5 /* CCPUEmitter.h */; }; - B665E2951AA80A6500DDB1C5 /* CCPUEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11D1AA80A6500DDB1C5 /* CCPUEmitter.h */; }; - B665E2961AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11E1AA80A6500DDB1C5 /* CCPUEmitterManager.cpp */; }; - B665E2971AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E11E1AA80A6500DDB1C5 /* CCPUEmitterManager.cpp */; }; - B665E2981AA80A6500DDB1C5 /* CCPUEmitterManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11F1AA80A6500DDB1C5 /* CCPUEmitterManager.h */; }; - B665E2991AA80A6500DDB1C5 /* CCPUEmitterManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E11F1AA80A6500DDB1C5 /* CCPUEmitterManager.h */; }; - B665E29A1AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1201AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp */; }; - B665E29B1AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1201AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp */; }; - B665E29C1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1211AA80A6500DDB1C5 /* CCPUEmitterTranslator.h */; }; - B665E29D1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1211AA80A6500DDB1C5 /* CCPUEmitterTranslator.h */; }; - B665E29E1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1221AA80A6500DDB1C5 /* CCPUEventHandler.cpp */; }; - B665E29F1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1221AA80A6500DDB1C5 /* CCPUEventHandler.cpp */; }; - B665E2A01AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1231AA80A6500DDB1C5 /* CCPUEventHandler.h */; }; - B665E2A11AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1231AA80A6500DDB1C5 /* CCPUEventHandler.h */; }; - B665E2A21AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1241AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp */; }; - B665E2A31AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1241AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp */; }; - B665E2A41AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1251AA80A6500DDB1C5 /* CCPUEventHandlerManager.h */; }; - B665E2A51AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1251AA80A6500DDB1C5 /* CCPUEventHandlerManager.h */; }; - B665E2A61AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1261AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp */; }; - B665E2A71AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1261AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp */; }; - B665E2A81AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1271AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h */; }; - B665E2A91AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1271AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h */; }; - B665E2AA1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1281AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp */; }; - B665E2AB1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1281AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp */; }; - B665E2AC1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1291AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h */; }; - B665E2AD1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1291AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h */; }; - B665E2AE1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12A1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp */; }; - B665E2AF1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12A1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp */; }; - B665E2B01AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12B1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h */; }; - B665E2B11AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12B1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h */; }; - B665E2B21AA80A6500DDB1C5 /* CCPUForceField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12C1AA80A6500DDB1C5 /* CCPUForceField.cpp */; }; - B665E2B31AA80A6500DDB1C5 /* CCPUForceField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12C1AA80A6500DDB1C5 /* CCPUForceField.cpp */; }; - B665E2B41AA80A6500DDB1C5 /* CCPUForceField.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12D1AA80A6500DDB1C5 /* CCPUForceField.h */; }; - B665E2B51AA80A6500DDB1C5 /* CCPUForceField.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12D1AA80A6500DDB1C5 /* CCPUForceField.h */; }; - B665E2B61AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12E1AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp */; }; - B665E2B71AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E12E1AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp */; }; - B665E2B81AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12F1AA80A6500DDB1C5 /* CCPUForceFieldAffector.h */; }; - B665E2B91AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E12F1AA80A6500DDB1C5 /* CCPUForceFieldAffector.h */; }; - B665E2BA1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1301AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp */; }; - B665E2BB1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1301AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp */; }; - B665E2BC1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1311AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h */; }; - B665E2BD1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1311AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h */; }; - B665E2BE1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1321AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp */; }; - B665E2BF1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1321AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp */; }; - B665E2C01AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1331AA80A6500DDB1C5 /* CCPUGeometryRotator.h */; }; - B665E2C11AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1331AA80A6500DDB1C5 /* CCPUGeometryRotator.h */; }; - B665E2C21AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1341AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp */; }; - B665E2C31AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1341AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp */; }; - B665E2C41AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1351AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h */; }; - B665E2C51AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1351AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h */; }; - B665E2C61AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1361AA80A6500DDB1C5 /* CCPUGravityAffector.cpp */; }; - B665E2C71AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1361AA80A6500DDB1C5 /* CCPUGravityAffector.cpp */; }; - B665E2C81AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1371AA80A6500DDB1C5 /* CCPUGravityAffector.h */; }; - B665E2C91AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1371AA80A6500DDB1C5 /* CCPUGravityAffector.h */; }; - B665E2CA1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1381AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp */; }; - B665E2CB1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1381AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp */; }; - B665E2CC1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1391AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h */; }; - B665E2CD1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1391AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h */; }; - B665E2CE1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13A1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp */; }; - B665E2CF1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13A1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp */; }; - B665E2D01AA80A6500DDB1C5 /* CCPUInterParticleCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13B1AA80A6500DDB1C5 /* CCPUInterParticleCollider.h */; }; - B665E2D11AA80A6500DDB1C5 /* CCPUInterParticleCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13B1AA80A6500DDB1C5 /* CCPUInterParticleCollider.h */; }; - B665E2D21AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13C1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp */; }; - B665E2D31AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13C1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp */; }; - B665E2D41AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13D1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h */; }; - B665E2D51AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13D1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h */; }; - B665E2D61AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13E1AA80A6500DDB1C5 /* CCPUJetAffector.cpp */; }; - B665E2D71AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E13E1AA80A6500DDB1C5 /* CCPUJetAffector.cpp */; }; - B665E2D81AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13F1AA80A6500DDB1C5 /* CCPUJetAffector.h */; }; - B665E2D91AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E13F1AA80A6500DDB1C5 /* CCPUJetAffector.h */; }; - B665E2DA1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1401AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp */; }; - B665E2DB1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1401AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp */; }; - B665E2DC1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1411AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h */; }; - B665E2DD1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1411AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h */; }; - B665E2DE1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1421AA80A6500DDB1C5 /* CCPULineAffector.cpp */; }; - B665E2DF1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1421AA80A6500DDB1C5 /* CCPULineAffector.cpp */; }; - B665E2E01AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1431AA80A6500DDB1C5 /* CCPULineAffector.h */; }; - B665E2E11AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1431AA80A6500DDB1C5 /* CCPULineAffector.h */; }; - B665E2E21AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1441AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp */; }; - B665E2E31AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1441AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp */; }; - B665E2E41AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1451AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h */; }; - B665E2E51AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1451AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h */; }; - B665E2E61AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1461AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp */; }; - B665E2E71AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1461AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp */; }; - B665E2E81AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1471AA80A6500DDB1C5 /* CCPULinearForceAffector.h */; }; - B665E2E91AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1471AA80A6500DDB1C5 /* CCPULinearForceAffector.h */; }; - B665E2EA1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1481AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp */; }; - B665E2EB1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1481AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp */; }; - B665E2EC1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1491AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h */; }; - B665E2ED1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1491AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h */; }; - B665E2EE1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14A1AA80A6500DDB1C5 /* CCPULineEmitter.cpp */; }; - B665E2EF1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14A1AA80A6500DDB1C5 /* CCPULineEmitter.cpp */; }; - B665E2F01AA80A6500DDB1C5 /* CCPULineEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14B1AA80A6500DDB1C5 /* CCPULineEmitter.h */; }; - B665E2F11AA80A6500DDB1C5 /* CCPULineEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14B1AA80A6500DDB1C5 /* CCPULineEmitter.h */; }; - B665E2F21AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14C1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp */; }; - B665E2F31AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14C1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp */; }; - B665E2F41AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14D1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h */; }; - B665E2F51AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14D1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h */; }; - B665E2F61AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14E1AA80A6500DDB1C5 /* CCPUListener.cpp */; }; - B665E2F71AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E14E1AA80A6500DDB1C5 /* CCPUListener.cpp */; }; - B665E2F81AA80A6500DDB1C5 /* CCPUListener.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14F1AA80A6500DDB1C5 /* CCPUListener.h */; }; - B665E2F91AA80A6500DDB1C5 /* CCPUListener.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E14F1AA80A6500DDB1C5 /* CCPUListener.h */; }; - B665E2FA1AA80A6500DDB1C5 /* CCPUMaterialManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1501AA80A6500DDB1C5 /* CCPUMaterialManager.cpp */; }; - B665E2FB1AA80A6500DDB1C5 /* CCPUMaterialManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1501AA80A6500DDB1C5 /* CCPUMaterialManager.cpp */; }; - B665E2FC1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1511AA80A6500DDB1C5 /* CCPUMaterialManager.h */; }; - B665E2FD1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1511AA80A6500DDB1C5 /* CCPUMaterialManager.h */; }; - B665E2FE1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1521AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp */; }; - B665E2FF1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1521AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp */; }; - B665E3001AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1531AA80A6500DDB1C5 /* CCPUMaterialTranslator.h */; }; - B665E3011AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1531AA80A6500DDB1C5 /* CCPUMaterialTranslator.h */; }; - B665E3021AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1541AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp */; }; - B665E3031AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1541AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp */; }; - B665E3041AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1551AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h */; }; - B665E3051AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1551AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h */; }; - B665E3061AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1561AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp */; }; - B665E3071AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1561AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp */; }; - B665E3081AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1571AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h */; }; - B665E3091AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1571AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h */; }; - B665E30A1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1581AA80A6500DDB1C5 /* CCPUNoise.cpp */; }; - B665E30B1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1581AA80A6500DDB1C5 /* CCPUNoise.cpp */; }; - B665E30C1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1591AA80A6500DDB1C5 /* CCPUNoise.h */; }; - B665E30D1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1591AA80A6500DDB1C5 /* CCPUNoise.h */; }; - B665E30E1AA80A6500DDB1C5 /* CCPUObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15A1AA80A6500DDB1C5 /* CCPUObserver.cpp */; }; - B665E30F1AA80A6500DDB1C5 /* CCPUObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15A1AA80A6500DDB1C5 /* CCPUObserver.cpp */; }; - B665E3101AA80A6500DDB1C5 /* CCPUObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15B1AA80A6500DDB1C5 /* CCPUObserver.h */; }; - B665E3111AA80A6500DDB1C5 /* CCPUObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15B1AA80A6500DDB1C5 /* CCPUObserver.h */; }; - B665E3121AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15C1AA80A6500DDB1C5 /* CCPUObserverManager.cpp */; }; - B665E3131AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15C1AA80A6500DDB1C5 /* CCPUObserverManager.cpp */; }; - B665E3141AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15D1AA80A6500DDB1C5 /* CCPUObserverManager.h */; }; - B665E3151AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15D1AA80A6500DDB1C5 /* CCPUObserverManager.h */; }; - B665E3161AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15E1AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp */; }; - B665E3171AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E15E1AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp */; }; - B665E3181AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15F1AA80A6500DDB1C5 /* CCPUObserverTranslator.h */; }; - B665E3191AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E15F1AA80A6500DDB1C5 /* CCPUObserverTranslator.h */; }; - B665E31A1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1601AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp */; }; - B665E31B1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1601AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp */; }; - B665E31C1AA80A6500DDB1C5 /* CCPUOnClearObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1611AA80A6500DDB1C5 /* CCPUOnClearObserver.h */; }; - B665E31D1AA80A6500DDB1C5 /* CCPUOnClearObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1611AA80A6500DDB1C5 /* CCPUOnClearObserver.h */; }; - B665E31E1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1621AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp */; }; - B665E31F1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1621AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp */; }; - B665E3201AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1631AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h */; }; - B665E3211AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1631AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h */; }; - B665E3221AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1641AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp */; }; - B665E3231AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1641AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp */; }; - B665E3241AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1651AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h */; }; - B665E3251AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1651AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h */; }; - B665E3261AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1661AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp */; }; - B665E3271AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1661AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp */; }; - B665E3281AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1671AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h */; }; - B665E3291AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1671AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h */; }; - B665E32A1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1681AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp */; }; - B665E32B1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1681AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp */; }; - B665E32C1AA80A6500DDB1C5 /* CCPUOnCountObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1691AA80A6500DDB1C5 /* CCPUOnCountObserver.h */; }; - B665E32D1AA80A6500DDB1C5 /* CCPUOnCountObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1691AA80A6500DDB1C5 /* CCPUOnCountObserver.h */; }; - B665E32E1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16A1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp */; }; - B665E32F1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16A1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp */; }; - B665E3301AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16B1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h */; }; - B665E3311AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16B1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h */; }; - B665E3321AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16C1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp */; }; - B665E3331AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16C1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp */; }; - B665E3341AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16D1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h */; }; - B665E3351AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16D1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h */; }; - B665E3361AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16E1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp */; }; - B665E3371AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E16E1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp */; }; - B665E3381AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16F1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h */; }; - B665E3391AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E16F1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h */; }; - B665E33A1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1701AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp */; }; - B665E33B1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1701AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp */; }; - B665E33C1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1711AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h */; }; - B665E33D1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1711AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h */; }; - B665E33E1AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1721AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp */; }; - B665E33F1AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1721AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp */; }; - B665E3401AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1731AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h */; }; - B665E3411AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1731AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h */; }; - B665E3421AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1741AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp */; }; - B665E3431AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1741AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp */; }; - B665E3441AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1751AA80A6500DDB1C5 /* CCPUOnExpireObserver.h */; }; - B665E3451AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1751AA80A6500DDB1C5 /* CCPUOnExpireObserver.h */; }; - B665E3461AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1761AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp */; }; - B665E3471AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1761AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp */; }; - B665E3481AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1771AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h */; }; - B665E3491AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1771AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h */; }; - B665E34A1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1781AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp */; }; - B665E34B1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1781AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp */; }; - B665E34C1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1791AA80A6500DDB1C5 /* CCPUOnPositionObserver.h */; }; - B665E34D1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1791AA80A6500DDB1C5 /* CCPUOnPositionObserver.h */; }; - B665E34E1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17A1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp */; }; - B665E34F1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17A1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp */; }; - B665E3501AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17B1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h */; }; - B665E3511AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17B1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h */; }; - B665E3521AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17C1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp */; }; - B665E3531AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17C1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp */; }; - B665E3541AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17D1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h */; }; - B665E3551AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17D1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h */; }; - B665E3561AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17E1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp */; }; - B665E3571AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E17E1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp */; }; - B665E3581AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17F1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h */; }; - B665E3591AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E17F1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h */; }; - B665E35A1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1801AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp */; }; - B665E35B1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1801AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp */; }; - B665E35C1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1811AA80A6500DDB1C5 /* CCPUOnRandomObserver.h */; }; - B665E35D1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1811AA80A6500DDB1C5 /* CCPUOnRandomObserver.h */; }; - B665E35E1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1821AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp */; }; - B665E35F1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1821AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp */; }; - B665E3601AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1831AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h */; }; - B665E3611AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1831AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h */; }; - B665E3621AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1841AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp */; }; - B665E3631AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1841AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp */; }; - B665E3641AA80A6500DDB1C5 /* CCPUOnTimeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1851AA80A6500DDB1C5 /* CCPUOnTimeObserver.h */; }; - B665E3651AA80A6500DDB1C5 /* CCPUOnTimeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1851AA80A6500DDB1C5 /* CCPUOnTimeObserver.h */; }; - B665E3661AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1861AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp */; }; - B665E3671AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1861AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp */; }; - B665E3681AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1871AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h */; }; - B665E3691AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1871AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h */; }; - B665E36A1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1881AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp */; }; - B665E36B1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1881AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp */; }; - B665E36C1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1891AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h */; }; - B665E36D1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1891AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h */; }; - B665E36E1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18A1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp */; }; - B665E36F1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18A1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp */; }; - B665E3701AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18B1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h */; }; - B665E3711AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18B1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h */; }; - B665E3721AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18C1AA80A6500DDB1C5 /* CCPUParticleFollower.cpp */; }; - B665E3731AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18C1AA80A6500DDB1C5 /* CCPUParticleFollower.cpp */; }; - B665E3741AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18D1AA80A6500DDB1C5 /* CCPUParticleFollower.h */; }; - B665E3751AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18D1AA80A6500DDB1C5 /* CCPUParticleFollower.h */; }; - B665E3761AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18E1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp */; }; - B665E3771AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E18E1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp */; }; - B665E3781AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18F1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h */; }; - B665E3791AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E18F1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h */; }; - B665E37A1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1901AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp */; }; - B665E37B1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1901AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp */; }; - B665E37C1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1911AA80A6500DDB1C5 /* CCPUParticleSystem3D.h */; }; - B665E37D1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1911AA80A6500DDB1C5 /* CCPUParticleSystem3D.h */; }; - B665E37E1AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1921AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp */; }; - B665E37F1AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1921AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp */; }; - B665E3801AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1931AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h */; }; - B665E3811AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1931AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h */; }; - B665E3821AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1941AA80A6500DDB1C5 /* CCPUPathFollower.cpp */; }; - B665E3831AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1941AA80A6500DDB1C5 /* CCPUPathFollower.cpp */; }; - B665E3841AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1951AA80A6500DDB1C5 /* CCPUPathFollower.h */; }; - B665E3851AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1951AA80A6500DDB1C5 /* CCPUPathFollower.h */; }; - B665E3861AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1961AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp */; }; - B665E3871AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1961AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp */; }; - B665E3881AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1971AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h */; }; - B665E3891AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1971AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h */; }; - B665E38A1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1981AA80A6500DDB1C5 /* CCPUPlane.cpp */; }; - B665E38B1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1981AA80A6500DDB1C5 /* CCPUPlane.cpp */; }; - B665E38C1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1991AA80A6500DDB1C5 /* CCPUPlane.h */; }; - B665E38D1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1991AA80A6500DDB1C5 /* CCPUPlane.h */; }; - B665E38E1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19A1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp */; }; - B665E38F1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19A1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp */; }; - B665E3901AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19B1AA80A6500DDB1C5 /* CCPUPlaneCollider.h */; }; - B665E3911AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19B1AA80A6500DDB1C5 /* CCPUPlaneCollider.h */; }; - B665E3921AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19C1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp */; }; - B665E3931AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19C1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp */; }; - B665E3941AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19D1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h */; }; - B665E3951AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19D1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h */; }; - B665E3961AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19E1AA80A6500DDB1C5 /* CCPUPointEmitter.cpp */; }; - B665E3971AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E19E1AA80A6500DDB1C5 /* CCPUPointEmitter.cpp */; }; - B665E3981AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19F1AA80A6500DDB1C5 /* CCPUPointEmitter.h */; }; - B665E3991AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E19F1AA80A6500DDB1C5 /* CCPUPointEmitter.h */; }; - B665E39A1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A01AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp */; }; - B665E39B1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A01AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp */; }; - B665E39C1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A11AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h */; }; - B665E39D1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A11AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h */; }; - B665E39E1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A21AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp */; }; - B665E39F1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A21AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp */; }; - B665E3A01AA80A6500DDB1C5 /* CCPUPositionEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A31AA80A6500DDB1C5 /* CCPUPositionEmitter.h */; }; - B665E3A11AA80A6500DDB1C5 /* CCPUPositionEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A31AA80A6500DDB1C5 /* CCPUPositionEmitter.h */; }; - B665E3A21AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp */; }; - B665E3A31AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp */; }; - B665E3A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h */; }; - B665E3A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h */; }; - B665E3A61AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A61AA80A6500DDB1C5 /* CCPURandomiser.cpp */; }; - B665E3A71AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A61AA80A6500DDB1C5 /* CCPURandomiser.cpp */; }; - B665E3A81AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A71AA80A6500DDB1C5 /* CCPURandomiser.h */; }; - B665E3A91AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A71AA80A6500DDB1C5 /* CCPURandomiser.h */; }; - B665E3AA1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A81AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp */; }; - B665E3AB1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1A81AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp */; }; - B665E3AC1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A91AA80A6500DDB1C5 /* CCPURandomiserTranslator.h */; }; - B665E3AD1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1A91AA80A6500DDB1C5 /* CCPURandomiserTranslator.h */; }; - B665E3AE1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AA1AA80A6500DDB1C5 /* CCPURender.cpp */; }; - B665E3AF1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AA1AA80A6500DDB1C5 /* CCPURender.cpp */; }; - B665E3B01AA80A6500DDB1C5 /* CCPURender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AB1AA80A6500DDB1C5 /* CCPURender.h */; }; - B665E3B11AA80A6500DDB1C5 /* CCPURender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AB1AA80A6500DDB1C5 /* CCPURender.h */; }; - B665E3B21AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AC1AA80A6500DDB1C5 /* CCPURendererTranslator.cpp */; }; - B665E3B31AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AC1AA80A6500DDB1C5 /* CCPURendererTranslator.cpp */; }; - B665E3B41AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AD1AA80A6500DDB1C5 /* CCPURendererTranslator.h */; }; - B665E3B51AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AD1AA80A6500DDB1C5 /* CCPURendererTranslator.h */; }; - B665E3B61AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AE1AA80A6500DDB1C5 /* CCPURibbonTrail.cpp */; }; - B665E3B71AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1AE1AA80A6500DDB1C5 /* CCPURibbonTrail.cpp */; }; - B665E3B81AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AF1AA80A6500DDB1C5 /* CCPURibbonTrail.h */; }; - B665E3B91AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1AF1AA80A6500DDB1C5 /* CCPURibbonTrail.h */; }; - B665E3BA1AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B01AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp */; }; - B665E3BB1AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B01AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp */; }; - B665E3BC1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B11AA80A6500DDB1C5 /* CCPURibbonTrailRender.h */; }; - B665E3BD1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B11AA80A6500DDB1C5 /* CCPURibbonTrailRender.h */; }; - B665E3BE1AA80A6500DDB1C5 /* CCPUScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B21AA80A6500DDB1C5 /* CCPUScaleAffector.cpp */; }; - B665E3BF1AA80A6500DDB1C5 /* CCPUScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B21AA80A6500DDB1C5 /* CCPUScaleAffector.cpp */; }; - B665E3C01AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B31AA80A6500DDB1C5 /* CCPUScaleAffector.h */; }; - B665E3C11AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B31AA80A6500DDB1C5 /* CCPUScaleAffector.h */; }; - B665E3C21AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B41AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.cpp */; }; - B665E3C31AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B41AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.cpp */; }; - B665E3C41AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B51AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.h */; }; - B665E3C51AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B51AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.h */; }; - B665E3C61AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B61AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.cpp */; }; - B665E3C71AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B61AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.cpp */; }; - B665E3C81AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B71AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.h */; }; - B665E3C91AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B71AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.h */; }; - B665E3CA1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B81AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp */; }; - B665E3CB1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1B81AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp */; }; - B665E3CC1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B91AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h */; }; - B665E3CD1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1B91AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h */; }; - B665E3CE1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BA1AA80A6500DDB1C5 /* CCPUScriptCompiler.cpp */; }; - B665E3CF1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BA1AA80A6500DDB1C5 /* CCPUScriptCompiler.cpp */; }; - B665E3D01AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BB1AA80A6500DDB1C5 /* CCPUScriptCompiler.h */; }; - B665E3D11AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BB1AA80A6500DDB1C5 /* CCPUScriptCompiler.h */; }; - B665E3D21AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BC1AA80A6500DDB1C5 /* CCPUScriptLexer.cpp */; }; - B665E3D31AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BC1AA80A6500DDB1C5 /* CCPUScriptLexer.cpp */; }; - B665E3D41AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BD1AA80A6500DDB1C5 /* CCPUScriptLexer.h */; }; - B665E3D51AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BD1AA80A6500DDB1C5 /* CCPUScriptLexer.h */; }; - B665E3D61AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BE1AA80A6500DDB1C5 /* CCPUScriptParser.cpp */; }; - B665E3D71AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1BE1AA80A6500DDB1C5 /* CCPUScriptParser.cpp */; }; - B665E3D81AA80A6600DDB1C5 /* CCPUScriptParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BF1AA80A6500DDB1C5 /* CCPUScriptParser.h */; }; - B665E3D91AA80A6600DDB1C5 /* CCPUScriptParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1BF1AA80A6500DDB1C5 /* CCPUScriptParser.h */; }; - B665E3DA1AA80A6600DDB1C5 /* CCPUScriptTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C01AA80A6500DDB1C5 /* CCPUScriptTranslator.cpp */; }; - B665E3DB1AA80A6600DDB1C5 /* CCPUScriptTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C01AA80A6500DDB1C5 /* CCPUScriptTranslator.cpp */; }; - B665E3DC1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C11AA80A6500DDB1C5 /* CCPUScriptTranslator.h */; }; - B665E3DD1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C11AA80A6500DDB1C5 /* CCPUScriptTranslator.h */; }; - B665E3DE1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C21AA80A6500DDB1C5 /* CCPUSimpleSpline.cpp */; }; - B665E3DF1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C21AA80A6500DDB1C5 /* CCPUSimpleSpline.cpp */; }; - B665E3E01AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C31AA80A6500DDB1C5 /* CCPUSimpleSpline.h */; }; - B665E3E11AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C31AA80A6500DDB1C5 /* CCPUSimpleSpline.h */; }; - B665E3E21AA80A6600DDB1C5 /* CCPUSineForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C41AA80A6500DDB1C5 /* CCPUSineForceAffector.cpp */; }; - B665E3E31AA80A6600DDB1C5 /* CCPUSineForceAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C41AA80A6500DDB1C5 /* CCPUSineForceAffector.cpp */; }; - B665E3E41AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C51AA80A6500DDB1C5 /* CCPUSineForceAffector.h */; }; - B665E3E51AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C51AA80A6500DDB1C5 /* CCPUSineForceAffector.h */; }; - B665E3E61AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C61AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.cpp */; }; - B665E3E71AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C61AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.cpp */; }; - B665E3E81AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C71AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.h */; }; - B665E3E91AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C71AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.h */; }; - B665E3EA1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C81AA80A6500DDB1C5 /* CCPUSlaveBehaviour.cpp */; }; - B665E3EB1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1C81AA80A6500DDB1C5 /* CCPUSlaveBehaviour.cpp */; }; - B665E3EC1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C91AA80A6500DDB1C5 /* CCPUSlaveBehaviour.h */; }; - B665E3ED1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1C91AA80A6500DDB1C5 /* CCPUSlaveBehaviour.h */; }; - B665E3EE1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CA1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp */; }; - B665E3EF1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CA1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp */; }; - B665E3F01AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CB1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.h */; }; - B665E3F11AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CB1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.h */; }; - B665E3F21AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CC1AA80A6500DDB1C5 /* CCPUSlaveEmitter.cpp */; }; - B665E3F31AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CC1AA80A6500DDB1C5 /* CCPUSlaveEmitter.cpp */; }; - B665E3F41AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CD1AA80A6500DDB1C5 /* CCPUSlaveEmitter.h */; }; - B665E3F51AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CD1AA80A6500DDB1C5 /* CCPUSlaveEmitter.h */; }; - B665E3F61AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CE1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.cpp */; }; - B665E3F71AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1CE1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.cpp */; }; - B665E3F81AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CF1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.h */; }; - B665E3F91AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1CF1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.h */; }; - B665E3FA1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D01AA80A6500DDB1C5 /* CCPUSphere.cpp */; }; - B665E3FB1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D01AA80A6500DDB1C5 /* CCPUSphere.cpp */; }; - B665E3FC1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D11AA80A6500DDB1C5 /* CCPUSphere.h */; }; - B665E3FD1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D11AA80A6500DDB1C5 /* CCPUSphere.h */; }; - B665E3FE1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D21AA80A6500DDB1C5 /* CCPUSphereCollider.cpp */; }; - B665E3FF1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D21AA80A6500DDB1C5 /* CCPUSphereCollider.cpp */; }; - B665E4001AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D31AA80A6500DDB1C5 /* CCPUSphereCollider.h */; }; - B665E4011AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D31AA80A6500DDB1C5 /* CCPUSphereCollider.h */; }; - B665E4021AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D41AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.cpp */; }; - B665E4031AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D41AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.cpp */; }; - B665E4041AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D51AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.h */; }; - B665E4051AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D51AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.h */; }; - B665E4061AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D61AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.cpp */; }; - B665E4071AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D61AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.cpp */; }; - B665E4081AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D71AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.h */; }; - B665E4091AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D71AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.h */; }; - B665E40A1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D81AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp */; }; - B665E40B1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1D81AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp */; }; - B665E40C1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D91AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h */; }; - B665E40D1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1D91AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h */; }; - B665E40E1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DA1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.cpp */; }; - B665E40F1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DA1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.cpp */; }; - B665E4101AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DB1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.h */; }; - B665E4111AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DB1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.h */; }; - B665E4121AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DC1AA80A6500DDB1C5 /* CCPUTextureAnimator.cpp */; }; - B665E4131AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DC1AA80A6500DDB1C5 /* CCPUTextureAnimator.cpp */; }; - B665E4141AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DD1AA80A6500DDB1C5 /* CCPUTextureAnimator.h */; }; - B665E4151AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DD1AA80A6500DDB1C5 /* CCPUTextureAnimator.h */; }; - B665E4161AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DE1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.cpp */; }; - B665E4171AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1DE1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.cpp */; }; - B665E4181AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DF1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.h */; }; - B665E4191AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1DF1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.h */; }; - B665E41A1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E01AA80A6500DDB1C5 /* CCPUTextureRotator.cpp */; }; - B665E41B1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E01AA80A6500DDB1C5 /* CCPUTextureRotator.cpp */; }; - B665E41C1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E11AA80A6500DDB1C5 /* CCPUTextureRotator.h */; }; - B665E41D1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E11AA80A6500DDB1C5 /* CCPUTextureRotator.h */; }; - B665E41E1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E21AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.cpp */; }; - B665E41F1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E21AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.cpp */; }; - B665E4201AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E31AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.h */; }; - B665E4211AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E31AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.h */; }; - B665E4221AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E41AA80A6500DDB1C5 /* CCPUTranslateManager.cpp */; }; - B665E4231AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E41AA80A6500DDB1C5 /* CCPUTranslateManager.cpp */; }; - B665E4241AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E51AA80A6500DDB1C5 /* CCPUTranslateManager.h */; }; - B665E4251AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E51AA80A6500DDB1C5 /* CCPUTranslateManager.h */; }; - B665E4261AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E61AA80A6500DDB1C5 /* CCPUUtil.cpp */; }; - B665E4271AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E61AA80A6500DDB1C5 /* CCPUUtil.cpp */; }; - B665E4281AA80A6600DDB1C5 /* CCPUUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E71AA80A6500DDB1C5 /* CCPUUtil.h */; }; - B665E4291AA80A6600DDB1C5 /* CCPUUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E71AA80A6500DDB1C5 /* CCPUUtil.h */; }; - B665E42A1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E81AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.cpp */; }; - B665E42B1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1E81AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.cpp */; }; - B665E42C1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E91AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.h */; }; - B665E42D1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1E91AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.h */; }; - B665E42E1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EA1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp */; }; - B665E42F1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EA1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp */; }; - B665E4301AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EB1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h */; }; - B665E4311AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EB1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h */; }; - B665E4321AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EC1AA80A6500DDB1C5 /* CCPUVertexEmitter.cpp */; }; - B665E4331AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EC1AA80A6500DDB1C5 /* CCPUVertexEmitter.cpp */; }; - B665E4341AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1ED1AA80A6500DDB1C5 /* CCPUVertexEmitter.h */; }; - B665E4351AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1ED1AA80A6500DDB1C5 /* CCPUVertexEmitter.h */; }; - B665E4361AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EE1AA80A6500DDB1C5 /* CCPUVortexAffector.cpp */; }; - B665E4371AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1EE1AA80A6500DDB1C5 /* CCPUVortexAffector.cpp */; }; - B665E4381AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */; }; - B665E4391AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */; }; - B665E43A1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */; }; - B665E43B1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */; }; - B665E43C1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */; }; - B665E43D1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */; }; - B677B0C91B18492D006762CB /* CCNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0BF1B18492D006762CB /* CCNavMesh.cpp */; }; - B677B0CA1B18492D006762CB /* CCNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0BF1B18492D006762CB /* CCNavMesh.cpp */; }; - B677B0CB1B18492D006762CB /* CCNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C01B18492D006762CB /* CCNavMesh.h */; }; - B677B0CC1B18492D006762CB /* CCNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C01B18492D006762CB /* CCNavMesh.h */; }; - B677B0CD1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */; }; - B677B0CE1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */; }; - B677B0CF1B18492D006762CB /* CCNavMeshAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C21B18492D006762CB /* CCNavMeshAgent.h */; }; - B677B0D01B18492D006762CB /* CCNavMeshAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C21B18492D006762CB /* CCNavMeshAgent.h */; }; - B677B0D11B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */; }; - B677B0D21B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */; }; - B677B0D31B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */; }; - B677B0D41B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */; }; - B677B0D51B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */; }; - B677B0D61B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */; }; - B677B0D71B18492D006762CB /* CCNavMeshObstacle.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */; }; - B677B0D81B18492D006762CB /* CCNavMeshObstacle.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */; }; - B677B0D91B18492D006762CB /* CCNavMeshUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */; }; - B677B0DA1B18492D006762CB /* CCNavMeshUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */; }; - B677B0DB1B18492D006762CB /* CCNavMeshUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C81B18492D006762CB /* CCNavMeshUtils.h */; }; - B677B0DC1B18492D006762CB /* CCNavMeshUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C81B18492D006762CB /* CCNavMeshUtils.h */; }; - B68778F81A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */; }; - B68778F91A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */; }; - B68778FA1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */; }; - B68778FB1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */; }; - B68778FC1A8CA82E00643ABF /* CCParticle3DEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F21A8CA82E00643ABF /* CCParticle3DEmitter.cpp */; }; - B68778FD1A8CA82E00643ABF /* CCParticle3DEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F21A8CA82E00643ABF /* CCParticle3DEmitter.cpp */; }; - B68778FE1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F31A8CA82E00643ABF /* CCParticle3DEmitter.h */; }; - B68778FF1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F31A8CA82E00643ABF /* CCParticle3DEmitter.h */; }; - B68779001A8CA82E00643ABF /* CCParticle3DRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F41A8CA82E00643ABF /* CCParticle3DRender.cpp */; }; - B68779011A8CA82E00643ABF /* CCParticle3DRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F41A8CA82E00643ABF /* CCParticle3DRender.cpp */; }; - B68779021A8CA82E00643ABF /* CCParticle3DRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */; }; - B68779031A8CA82E00643ABF /* CCParticle3DRender.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */; }; - B68779041A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */; }; - B68779051A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */; }; - B68779061A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */; }; - B68779071A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */; }; - B6CAAFE21AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */; }; - B6CAAFE31AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */; }; - B6CAAFE41AF9A9E100B9B856 /* CCPhysics3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */; }; - B6CAAFE51AF9A9E100B9B856 /* CCPhysics3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */; }; - B6CAAFE61AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */; }; - B6CAAFE71AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */; }; - B6CAAFE81AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */; }; - B6CAAFE91AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */; }; - B6CAAFEA1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */; }; - B6CAAFEB1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */; }; - B6CAAFEC1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */; }; - B6CAAFED1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */; }; - B6CAAFEE1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */; }; - B6CAAFEF1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */; }; - B6CAAFF01AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */; }; - B6CAAFF11AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */; }; - B6CAAFF21AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */; }; - B6CAAFF31AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */; }; - B6CAAFF41AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */; }; - B6CAAFF51AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */; }; - B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */; }; - B6CAAFF71AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */; }; - B6CAAFF81AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */; }; - B6CAAFF91AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */; }; - B6CAAFFA1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */; }; - B6CAAFFB1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */; }; - B6CAAFFC1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */; }; - B6CAAFFD1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */; }; - B6CAAFFE1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */; }; - B6CAAFFF1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */; }; - B6CAB0001AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */; }; - B6CAB0011AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */; }; - B6D38B8A1AC3AFAC00043997 /* CCSkybox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */; }; - B6D38B8B1AC3AFAC00043997 /* CCSkybox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */; }; - B6D38B8C1AC3AFAC00043997 /* CCSkybox.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B871AC3AFAC00043997 /* CCSkybox.h */; }; - B6D38B8D1AC3AFAC00043997 /* CCSkybox.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B871AC3AFAC00043997 /* CCSkybox.h */; }; B6DD2FA71B04825B00E47F5F /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */; }; B6DD2FA81B04825B00E47F5F /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */; }; B6DD2FA91B04825B00E47F5F /* DebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */; }; @@ -4395,54 +2008,6 @@ BA6249A81E77D2850096291C /* tinydir.h in Headers */ = {isa = PBXBuildFile; fileRef = BA6249A71E77D2850096291C /* tinydir.h */; }; BA6249A91E77D2850096291C /* tinydir.h in Headers */ = {isa = PBXBuildFile; fileRef = BA6249A71E77D2850096291C /* tinydir.h */; }; BA6249AA1E77D2850096291C /* tinydir.h in Headers */ = {isa = PBXBuildFile; fileRef = BA6249A71E77D2850096291C /* tinydir.h */; }; - C50306691B60B583001E6D43 /* CCBoneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306631B60B583001E6D43 /* CCBoneNode.cpp */; }; - C503066A1B60B583001E6D43 /* CCBoneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306641B60B583001E6D43 /* CCBoneNode.h */; }; - C503066B1B60B583001E6D43 /* CCSkeletonNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */; }; - C503066C1B60B583001E6D43 /* CCSkeletonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306661B60B583001E6D43 /* CCSkeletonNode.h */; }; - C503066D1B60B583001E6D43 /* CCSkinNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306671B60B583001E6D43 /* CCSkinNode.cpp */; }; - C503066E1B60B583001E6D43 /* CCSkinNode.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306681B60B583001E6D43 /* CCSkinNode.h */; }; - C50306751B60B5B2001E6D43 /* BoneNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306701B60B5B2001E6D43 /* BoneNodeReader.cpp */; }; - C50306761B60B5B2001E6D43 /* BoneNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306711B60B5B2001E6D43 /* BoneNodeReader.h */; }; - C50306771B60B5B2001E6D43 /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306721B60B5B2001E6D43 /* CSBoneBinary_generated.h */; }; - C50306781B60B5B2001E6D43 /* SkeletonNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50306731B60B5B2001E6D43 /* SkeletonNodeReader.cpp */; }; - C50306791B60B5B2001E6D43 /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C50306741B60B5B2001E6D43 /* SkeletonNodeReader.h */; }; - C5F516121C8216660013B695 /* UITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516101C8216660013B695 /* UITabControl.cpp */; }; - C5F516131C8216660013B695 /* UITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516111C8216660013B695 /* UITabControl.h */; }; - C5F516181C8216C60013B695 /* CSTabControl_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516151C8216C60013B695 /* CSTabControl_generated.h */; }; - C5F516191C8216C60013B695 /* TabControlReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516161C8216C60013B695 /* TabControlReader.cpp */; }; - C5F5161A1C8216C60013B695 /* TabControlReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516171C8216C60013B695 /* TabControlReader.h */; }; - C5F5161D1C822D400013B695 /* TabControlReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516161C8216C60013B695 /* TabControlReader.cpp */; }; - C5F5161E1C822D5B0013B695 /* TabControlReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516171C8216C60013B695 /* TabControlReader.h */; }; - C5F5161F1C822D6D0013B695 /* UITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516101C8216660013B695 /* UITabControl.cpp */; }; - C5F516201C822D900013B695 /* UITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516111C8216660013B695 /* UITabControl.h */; }; - C5F516211C822DED0013B695 /* UITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516101C8216660013B695 /* UITabControl.cpp */; }; - C5F516221C822E060013B695 /* TabControlReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5F516161C8216C60013B695 /* TabControlReader.cpp */; }; - C5F516231C822E190013B695 /* UITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516111C8216660013B695 /* UITabControl.h */; }; - C5F516251C822E470013B695 /* TabControlReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C5F516171C8216C60013B695 /* TabControlReader.h */; }; - D0FD03491A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */; }; - D0FD034A1A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */; }; - D0FD034B1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */; }; - D0FD034C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */; }; - D0FD034D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */; }; - D0FD034E1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */; }; - D0FD034F1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033E1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp */; }; - D0FD03501A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033E1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp */; }; - D0FD03511A3B51AA00825BB5 /* CCAllocatorGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033F1A3B51AA00825BB5 /* CCAllocatorGlobal.h */; }; - D0FD03521A3B51AA00825BB5 /* CCAllocatorGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033F1A3B51AA00825BB5 /* CCAllocatorGlobal.h */; }; - D0FD03531A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD03401A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp */; }; - D0FD03541A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD03401A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp */; }; - D0FD03551A3B51AA00825BB5 /* CCAllocatorMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03411A3B51AA00825BB5 /* CCAllocatorMacros.h */; }; - D0FD03561A3B51AA00825BB5 /* CCAllocatorMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03411A3B51AA00825BB5 /* CCAllocatorMacros.h */; }; - D0FD03571A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03421A3B51AA00825BB5 /* CCAllocatorMutex.h */; }; - D0FD03581A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03421A3B51AA00825BB5 /* CCAllocatorMutex.h */; }; - D0FD03591A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03431A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h */; }; - D0FD035A1A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03431A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h */; }; - D0FD035B1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03441A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h */; }; - D0FD035C1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03441A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h */; }; - D0FD035D1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03451A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h */; }; - D0FD035E1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03451A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h */; }; - D0FD035F1A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03461A3B51AA00825BB5 /* CCAllocatorStrategyPool.h */; }; - D0FD03601A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD03461A3B51AA00825BB5 /* CCAllocatorStrategyPool.h */; }; DA8C62A219E52C6400000516 /* ioapi_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA8C62A019E52C6400000516 /* ioapi_mem.cpp */; }; DA8C62A319E52C6400000516 /* ioapi_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA8C62A019E52C6400000516 /* ioapi_mem.cpp */; }; DA8C62A419E52C6400000516 /* ioapi_mem.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8C62A119E52C6400000516 /* ioapi_mem.h */; }; @@ -4451,80 +2016,440 @@ DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */; }; DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */; }; DABC9FAC19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */; }; + ED150A9221E631DA00EFE7F7 /* ProgramCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED150A9021E631D900EFE7F7 /* ProgramCache.cpp */; }; + ED150A9321E631DA00EFE7F7 /* ProgramCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED150A9021E631D900EFE7F7 /* ProgramCache.cpp */; }; + ED150A9421E631DA00EFE7F7 /* ProgramCache.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9121E631D900EFE7F7 /* ProgramCache.h */; }; + ED150A9521E631DA00EFE7F7 /* ProgramCache.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9121E631D900EFE7F7 /* ProgramCache.h */; }; + ED150A9721E6320100EFE7F7 /* Program.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9621E6320100EFE7F7 /* Program.h */; }; + ED150A9821E6320100EFE7F7 /* Program.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9621E6320100EFE7F7 /* Program.h */; }; + ED150A9B21E635AB00EFE7F7 /* ProgramMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED150A9921E635AA00EFE7F7 /* ProgramMTL.mm */; }; + ED150A9C21E635AB00EFE7F7 /* ProgramMTL.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED150A9921E635AA00EFE7F7 /* ProgramMTL.mm */; }; + ED150A9D21E635AB00EFE7F7 /* ProgramMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9A21E635AB00EFE7F7 /* ProgramMTL.h */; }; + ED150A9E21E635AB00EFE7F7 /* ProgramMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = ED150A9A21E635AB00EFE7F7 /* ProgramMTL.h */; }; + ED28C223219E629B0078D854 /* RenderPipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1EF219E629B0078D854 /* RenderPipeline.h */; }; + ED28C224219E629B0078D854 /* RenderPipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1EF219E629B0078D854 /* RenderPipeline.h */; }; + ED28C225219E629B0078D854 /* DepthStencilState.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F0219E629B0078D854 /* DepthStencilState.h */; }; + ED28C226219E629B0078D854 /* DepthStencilState.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F0219E629B0078D854 /* DepthStencilState.h */; }; + ED28C227219E629B0078D854 /* RenderPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F1219E629B0078D854 /* RenderPipelineDescriptor.h */; }; + ED28C228219E629B0078D854 /* RenderPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F1219E629B0078D854 /* RenderPipelineDescriptor.h */; }; + ED28C229219E629B0078D854 /* Device.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F2219E629B0078D854 /* Device.h */; }; + ED28C22A219E629B0078D854 /* Device.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F2219E629B0078D854 /* Device.h */; }; + ED28C22B219E629B0078D854 /* VertexLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F3219E629B0078D854 /* VertexLayout.cpp */; }; + ED28C22C219E629B0078D854 /* VertexLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F3219E629B0078D854 /* VertexLayout.cpp */; }; + ED28C22D219E629B0078D854 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F4219E629B0078D854 /* Types.h */; }; + ED28C22E219E629B0078D854 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F4219E629B0078D854 /* Types.h */; }; + ED28C22F219E629B0078D854 /* Backend.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F5219E629B0078D854 /* Backend.h */; }; + ED28C230219E629B0078D854 /* Backend.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1F5219E629B0078D854 /* Backend.h */; }; + ED28C235219E629B0078D854 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F8219E629B0078D854 /* Texture.cpp */; }; + ED28C236219E629B0078D854 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F8219E629B0078D854 /* Texture.cpp */; }; + ED28C237219E629B0078D854 /* Device.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F9219E629B0078D854 /* Device.cpp */; }; + ED28C238219E629B0078D854 /* Device.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1F9219E629B0078D854 /* Device.cpp */; }; + ED28C23B219E629B0078D854 /* RenderPassDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FB219E629B0078D854 /* RenderPassDescriptor.h */; }; + ED28C23C219E629B0078D854 /* RenderPassDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FB219E629B0078D854 /* RenderPassDescriptor.h */; }; + ED28C23D219E629B0078D854 /* CommandBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FC219E629B0078D854 /* CommandBuffer.h */; }; + ED28C23E219E629C0078D854 /* CommandBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FC219E629B0078D854 /* CommandBuffer.h */; }; + ED28C23F219E629C0078D854 /* ShaderModule.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FD219E629B0078D854 /* ShaderModule.h */; }; + ED28C240219E629C0078D854 /* ShaderModule.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C1FD219E629B0078D854 /* ShaderModule.h */; }; + ED28C241219E629C0078D854 /* BlendState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1FE219E629B0078D854 /* BlendState.cpp */; }; + ED28C242219E629C0078D854 /* BlendState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1FE219E629B0078D854 /* BlendState.cpp */; }; + ED28C243219E629C0078D854 /* ShaderModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1FF219E629B0078D854 /* ShaderModule.cpp */; }; + ED28C244219E629C0078D854 /* ShaderModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C1FF219E629B0078D854 /* ShaderModule.cpp */; }; + ED28C245219E629C0078D854 /* BlendState.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C200219E629B0078D854 /* BlendState.h */; }; + ED28C246219E629C0078D854 /* BlendState.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C200219E629B0078D854 /* BlendState.h */; }; + ED28C247219E629C0078D854 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C201219E629B0078D854 /* Buffer.h */; }; + ED28C248219E629C0078D854 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C201219E629B0078D854 /* Buffer.h */; }; + ED28C249219E629C0078D854 /* Macros.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C202219E629B0078D854 /* Macros.h */; }; + ED28C24A219E629C0078D854 /* Macros.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C202219E629B0078D854 /* Macros.h */; }; + ED28C24B219E629C0078D854 /* DepthStencilState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C203219E629B0078D854 /* DepthStencilState.cpp */; }; + ED28C24C219E629C0078D854 /* DepthStencilState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C203219E629B0078D854 /* DepthStencilState.cpp */; }; + ED28C24F219E629C0078D854 /* Texture.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C205219E629B0078D854 /* Texture.h */; }; + ED28C250219E629C0078D854 /* Texture.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C205219E629B0078D854 /* Texture.h */; }; + ED28C253219E629C0078D854 /* VertexLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C207219E629B0078D854 /* VertexLayout.h */; }; + ED28C254219E629C0078D854 /* VertexLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ED28C207219E629B0078D854 /* VertexLayout.h */; }; + ED28C27F219E629C0078D854 /* CommandBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C21E219E629B0078D854 /* CommandBuffer.cpp */; }; + ED28C280219E629C0078D854 /* CommandBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED28C21E219E629B0078D854 /* CommandBuffer.cpp */; }; ED682BBA213F5FC7001BF6CB /* libuv_a.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED682BB9213F5FC6001BF6CB /* libuv_a.a */; }; ED682BC1213F63CB001BF6CB /* libuv_a.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED682BC0213F63CB001BF6CB /* libuv_a.a */; }; ED682BC3213F6C7A001BF6CB /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED682BC2213F6C7A001BF6CB /* libwebsockets.a */; }; ED682BC5213F6CBF001BF6CB /* libuv_a.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED682BC4213F6CBE001BF6CB /* libuv_a.a */; }; - ED74D7691A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */; }; - ED74D76A1A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */; }; + ED75D42021E3030E0052B87E /* ccConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = ED75D41F21E3030E0052B87E /* ccConstants.h */; }; + ED75D42121E303160052B87E /* ccConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = ED75D41F21E3030E0052B87E /* ccConstants.h */; }; + ED75D42221E303160052B87E /* ccConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = ED75D41F21E3030E0052B87E /* ccConstants.h */; }; + ED93A75921EDBCBA00170050 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED93A75821EDBCBA00170050 /* Program.cpp */; }; + ED93A75A21EDBCBA00170050 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED93A75821EDBCBA00170050 /* Program.cpp */; }; ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; }; ED9C6A9718599AD8000A5232 /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; }; + EDAF7C6F21F1797000E070B2 /* CCTextureUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = EDAF7C6D21F1796F00E070B2 /* CCTextureUtils.h */; }; + EDAF7C7021F1797000E070B2 /* CCTextureUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = EDAF7C6D21F1796F00E070B2 /* CCTextureUtils.h */; }; + EDAF7C7121F1797000E070B2 /* CCTextureUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDAF7C6E21F1797000E070B2 /* CCTextureUtils.cpp */; }; + EDAF7C7221F1797000E070B2 /* CCTextureUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDAF7C6E21F1797000E070B2 /* CCTextureUtils.cpp */; }; + EDC78BD821CA19FB00E1863C /* CCComAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E021CA19FA00E1863C /* CCComAudio.cpp */; }; + EDC78BD921CA19FB00E1863C /* CCComAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E021CA19FA00E1863C /* CCComAudio.cpp */; }; + EDC78BDA21CA19FB00E1863C /* CCProcessBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E121CA19FA00E1863C /* CCProcessBase.h */; }; + EDC78BDB21CA19FB00E1863C /* CCProcessBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E121CA19FA00E1863C /* CCProcessBase.h */; }; + EDC78BDC21CA19FB00E1863C /* TriggerMng.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E221CA19FA00E1863C /* TriggerMng.h */; }; + EDC78BDD21CA19FB00E1863C /* TriggerMng.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E221CA19FA00E1863C /* TriggerMng.h */; }; + EDC78BDE21CA19FB00E1863C /* CCDatas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E321CA19FA00E1863C /* CCDatas.cpp */; }; + EDC78BDF21CA19FB00E1863C /* CCDatas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E321CA19FA00E1863C /* CCDatas.cpp */; }; + EDC78BE021CA19FB00E1863C /* CCProcessBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E421CA19FA00E1863C /* CCProcessBase.cpp */; }; + EDC78BE121CA19FB00E1863C /* CCProcessBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E421CA19FA00E1863C /* CCProcessBase.cpp */; }; + EDC78BE221CA19FB00E1863C /* CCDataReaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E521CA19FA00E1863C /* CCDataReaderHelper.h */; }; + EDC78BE321CA19FB00E1863C /* CCDataReaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E521CA19FA00E1863C /* CCDataReaderHelper.h */; }; + EDC78BE421CA19FB00E1863C /* CCComRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E621CA19FA00E1863C /* CCComRender.cpp */; }; + EDC78BE521CA19FB00E1863C /* CCComRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E621CA19FA00E1863C /* CCComRender.cpp */; }; + EDC78BE621CA19FB00E1863C /* CCComController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E721CA19FA00E1863C /* CCComController.cpp */; }; + EDC78BE721CA19FB00E1863C /* CCComController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E721CA19FA00E1863C /* CCComController.cpp */; }; + EDC78BE821CA19FB00E1863C /* CCSSceneReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E821CA19FA00E1863C /* CCSSceneReader.cpp */; }; + EDC78BE921CA19FB00E1863C /* CCSSceneReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789E821CA19FA00E1863C /* CCSSceneReader.cpp */; }; + EDC78BEA21CA19FB00E1863C /* CCDisplayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E921CA19FA00E1863C /* CCDisplayManager.h */; }; + EDC78BEB21CA19FB00E1863C /* CCDisplayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789E921CA19FA00E1863C /* CCDisplayManager.h */; }; + EDC78BEC21CA19FB00E1863C /* CCComAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EA21CA19FA00E1863C /* CCComAttribute.h */; }; + EDC78BED21CA19FB00E1863C /* CCComAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EA21CA19FA00E1863C /* CCComAttribute.h */; }; + EDC78BEE21CA19FB00E1863C /* CocoStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789EB21CA19FA00E1863C /* CocoStudio.cpp */; }; + EDC78BEF21CA19FB00E1863C /* CocoStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789EB21CA19FA00E1863C /* CocoStudio.cpp */; }; + EDC78BF021CA19FB00E1863C /* CCInputDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789EC21CA19FA00E1863C /* CCInputDelegate.cpp */; }; + EDC78BF121CA19FB00E1863C /* CCInputDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789EC21CA19FA00E1863C /* CCInputDelegate.cpp */; }; + EDC78BF221CA19FB00E1863C /* CCArmatureDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789ED21CA19FA00E1863C /* CCArmatureDefine.h */; }; + EDC78BF321CA19FB00E1863C /* CCArmatureDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789ED21CA19FA00E1863C /* CCArmatureDefine.h */; }; + EDC78BF421CA19FB00E1863C /* CCUtilMath.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EE21CA19FA00E1863C /* CCUtilMath.h */; }; + EDC78BF521CA19FB00E1863C /* CCUtilMath.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EE21CA19FA00E1863C /* CCUtilMath.h */; }; + EDC78BF621CA19FB00E1863C /* CCInputDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EF21CA19FA00E1863C /* CCInputDelegate.h */; }; + EDC78BF721CA19FB00E1863C /* CCInputDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789EF21CA19FA00E1863C /* CCInputDelegate.h */; }; + EDC78BF821CA19FB00E1863C /* CCDecorativeDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F021CA19FA00E1863C /* CCDecorativeDisplay.h */; }; + EDC78BF921CA19FB00E1863C /* CCDecorativeDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F021CA19FA00E1863C /* CCDecorativeDisplay.h */; }; + EDC78BFA21CA19FB00E1863C /* TriggerObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F121CA19FA00E1863C /* TriggerObj.cpp */; }; + EDC78BFB21CA19FB00E1863C /* TriggerObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F121CA19FA00E1863C /* TriggerObj.cpp */; }; + EDC78BFC21CA19FB00E1863C /* CCActionManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F421CA19FA00E1863C /* CCActionManagerEx.h */; }; + EDC78BFD21CA19FB00E1863C /* CCActionManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F421CA19FA00E1863C /* CCActionManagerEx.h */; }; + EDC78BFE21CA19FB00E1863C /* CocosStudioExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F521CA19FA00E1863C /* CocosStudioExtension.cpp */; }; + EDC78BFF21CA19FB00E1863C /* CocosStudioExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F521CA19FA00E1863C /* CocosStudioExtension.cpp */; }; + EDC78C0021CA19FB00E1863C /* CCTimelineMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F721CA19FA00E1863C /* CCTimelineMacro.h */; }; + EDC78C0121CA19FB00E1863C /* CCTimelineMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F721CA19FA00E1863C /* CCTimelineMacro.h */; }; + EDC78C0221CA19FB00E1863C /* CCBoneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F821CA19FA00E1863C /* CCBoneNode.cpp */; }; + EDC78C0321CA19FB00E1863C /* CCBoneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789F821CA19FA00E1863C /* CCBoneNode.cpp */; }; + EDC78C0421CA19FB00E1863C /* CCSkeletonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F921CA19FA00E1863C /* CCSkeletonNode.h */; }; + EDC78C0521CA19FB00E1863C /* CCSkeletonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789F921CA19FA00E1863C /* CCSkeletonNode.h */; }; + EDC78C0621CA19FB00E1863C /* CCFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FA21CA19FA00E1863C /* CCFrame.h */; }; + EDC78C0721CA19FB00E1863C /* CCFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FA21CA19FA00E1863C /* CCFrame.h */; }; + EDC78C0821CA19FB00E1863C /* CCActionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FB21CA19FA00E1863C /* CCActionTimeline.cpp */; }; + EDC78C0921CA19FB00E1863C /* CCActionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FB21CA19FA00E1863C /* CCActionTimeline.cpp */; }; + EDC78C0A21CA19FB00E1863C /* CCActionTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FC21CA19FA00E1863C /* CCActionTimeline.h */; }; + EDC78C0B21CA19FB00E1863C /* CCActionTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FC21CA19FA00E1863C /* CCActionTimeline.h */; }; + EDC78C0C21CA19FB00E1863C /* CCFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FD21CA19FA00E1863C /* CCFrame.cpp */; }; + EDC78C0D21CA19FB00E1863C /* CCFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FD21CA19FA00E1863C /* CCFrame.cpp */; }; + EDC78C0E21CA19FB00E1863C /* CSLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FE21CA19FA00E1863C /* CSLoader.cpp */; }; + EDC78C0F21CA19FB00E1863C /* CSLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC789FE21CA19FA00E1863C /* CSLoader.cpp */; }; + EDC78C1021CA19FB00E1863C /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FF21CA19FA00E1863C /* CCActionTimelineNode.h */; }; + EDC78C1121CA19FB00E1863C /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC789FF21CA19FA00E1863C /* CCActionTimelineNode.h */; }; + EDC78C1221CA19FB00E1863C /* CCBoneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0021CA19FA00E1863C /* CCBoneNode.h */; }; + EDC78C1321CA19FB00E1863C /* CCBoneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0021CA19FA00E1863C /* CCBoneNode.h */; }; + EDC78C1421CA19FB00E1863C /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0121CA19FA00E1863C /* CCActionTimelineNode.cpp */; }; + EDC78C1521CA19FB00E1863C /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0121CA19FA00E1863C /* CCActionTimelineNode.cpp */; }; + EDC78C1621CA19FB00E1863C /* CCTimeLine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0221CA19FA00E1863C /* CCTimeLine.h */; }; + EDC78C1721CA19FB00E1863C /* CCTimeLine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0221CA19FA00E1863C /* CCTimeLine.h */; }; + EDC78C1821CA19FB00E1863C /* CCActionTimelineCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0321CA19FA00E1863C /* CCActionTimelineCache.cpp */; }; + EDC78C1921CA19FB00E1863C /* CCActionTimelineCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0321CA19FA00E1863C /* CCActionTimelineCache.cpp */; }; + EDC78C1A21CA19FB00E1863C /* CSLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0421CA19FA00E1863C /* CSLoader.h */; }; + EDC78C1B21CA19FB00E1863C /* CSLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0421CA19FA00E1863C /* CSLoader.h */; }; + EDC78C1C21CA19FB00E1863C /* CCActionTimelineCache.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0521CA19FA00E1863C /* CCActionTimelineCache.h */; }; + EDC78C1D21CA19FB00E1863C /* CCActionTimelineCache.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0521CA19FA00E1863C /* CCActionTimelineCache.h */; }; + EDC78C1E21CA19FB00E1863C /* CCTimeLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0621CA19FA00E1863C /* CCTimeLine.cpp */; }; + EDC78C1F21CA19FB00E1863C /* CCTimeLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0621CA19FA00E1863C /* CCTimeLine.cpp */; }; + EDC78C2021CA19FB00E1863C /* CCSkinNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0721CA19FA00E1863C /* CCSkinNode.cpp */; }; + EDC78C2121CA19FB00E1863C /* CCSkinNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0721CA19FA00E1863C /* CCSkinNode.cpp */; }; + EDC78C2221CA19FB00E1863C /* CCSkeletonNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0821CA19FA00E1863C /* CCSkeletonNode.cpp */; }; + EDC78C2321CA19FB00E1863C /* CCSkeletonNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0821CA19FA00E1863C /* CCSkeletonNode.cpp */; }; + EDC78C2421CA19FB00E1863C /* CCSkinNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0921CA19FA00E1863C /* CCSkinNode.h */; }; + EDC78C2521CA19FB00E1863C /* CCSkinNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0921CA19FA00E1863C /* CCSkinNode.h */; }; + EDC78C2621CA19FB00E1863C /* TriggerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0A21CA19FA00E1863C /* TriggerBase.cpp */; }; + EDC78C2721CA19FB00E1863C /* TriggerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0A21CA19FA00E1863C /* TriggerBase.cpp */; }; + EDC78C2821CA19FB00E1863C /* CCDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0B21CA19FA00E1863C /* CCDisplayManager.cpp */; }; + EDC78C2921CA19FB00E1863C /* CCDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0B21CA19FA00E1863C /* CCDisplayManager.cpp */; }; + EDC78C2A21CA19FB00E1863C /* CocosStudioExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0C21CA19FA00E1863C /* CocosStudioExtension.h */; }; + EDC78C2B21CA19FB00E1863C /* CocosStudioExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0C21CA19FA00E1863C /* CocosStudioExtension.h */; }; + EDC78C2C21CA19FB00E1863C /* CCActionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0D21CA19FA00E1863C /* CCActionNode.cpp */; }; + EDC78C2D21CA19FB00E1863C /* CCActionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0D21CA19FA00E1863C /* CCActionNode.cpp */; }; + EDC78C2E21CA19FB00E1863C /* CCTransformHelp.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0E21CA19FA00E1863C /* CCTransformHelp.h */; }; + EDC78C2F21CA19FB00E1863C /* CCTransformHelp.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A0E21CA19FA00E1863C /* CCTransformHelp.h */; }; + EDC78C3021CA19FB00E1863C /* CCUtilMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0F21CA19FA00E1863C /* CCUtilMath.cpp */; }; + EDC78C3121CA19FB00E1863C /* CCUtilMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A0F21CA19FA00E1863C /* CCUtilMath.cpp */; }; + EDC78C3221CA19FB00E1863C /* CocoStudio.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1021CA19FA00E1863C /* CocoStudio.h */; }; + EDC78C3321CA19FB00E1863C /* CocoStudio.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1021CA19FA00E1863C /* CocoStudio.h */; }; + EDC78C3421CA19FB00E1863C /* CCBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1121CA19FA00E1863C /* CCBatchNode.h */; }; + EDC78C3521CA19FB00E1863C /* CCBatchNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1121CA19FA00E1863C /* CCBatchNode.h */; }; + EDC78C3621CA19FB00E1863C /* CCArmatureDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1221CA19FA00E1863C /* CCArmatureDataManager.cpp */; }; + EDC78C3721CA19FB00E1863C /* CCArmatureDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1221CA19FA00E1863C /* CCArmatureDataManager.cpp */; }; + EDC78C3821CA19FB00E1863C /* CCDecorativeDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1321CA19FA00E1863C /* CCDecorativeDisplay.cpp */; }; + EDC78C3921CA19FB00E1863C /* CCDecorativeDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1321CA19FA00E1863C /* CCDecorativeDisplay.cpp */; }; + EDC78C3A21CA19FB00E1863C /* CCActionFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1421CA19FA00E1863C /* CCActionFrame.h */; }; + EDC78C3B21CA19FB00E1863C /* CCActionFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1421CA19FA00E1863C /* CCActionFrame.h */; }; + EDC78C3C21CA19FB00E1863C /* FlatBuffersSerialize.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1521CA19FA00E1863C /* FlatBuffersSerialize.h */; }; + EDC78C3D21CA19FB00E1863C /* FlatBuffersSerialize.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1521CA19FA00E1863C /* FlatBuffersSerialize.h */; }; + EDC78C3E21CA19FB00E1863C /* LocalizationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1621CA19FA00E1863C /* LocalizationManager.cpp */; }; + EDC78C3F21CA19FB00E1863C /* LocalizationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1621CA19FA00E1863C /* LocalizationManager.cpp */; }; + EDC78C4021CA19FB00E1863C /* CCActionFrameEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1721CA19FA00E1863C /* CCActionFrameEasing.cpp */; }; + EDC78C4121CA19FB00E1863C /* CCActionFrameEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1721CA19FA00E1863C /* CCActionFrameEasing.cpp */; }; + EDC78C4221CA19FB00E1863C /* FlatBuffersSerialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1821CA19FA00E1863C /* FlatBuffersSerialize.cpp */; }; + EDC78C4321CA19FB00E1863C /* FlatBuffersSerialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1821CA19FA00E1863C /* FlatBuffersSerialize.cpp */; }; + EDC78C4421CA19FB00E1863C /* CCTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1921CA19FA00E1863C /* CCTween.cpp */; }; + EDC78C4521CA19FB00E1863C /* CCTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1921CA19FA00E1863C /* CCTween.cpp */; }; + EDC78C4621CA19FB00E1863C /* CCComExtensionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1A21CA19FA00E1863C /* CCComExtensionData.cpp */; }; + EDC78C4721CA19FB00E1863C /* CCComExtensionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1A21CA19FA00E1863C /* CCComExtensionData.cpp */; }; + EDC78C4821CA19FB00E1863C /* CCArmatureAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1B21CA19FA00E1863C /* CCArmatureAnimation.cpp */; }; + EDC78C4921CA19FB00E1863C /* CCArmatureAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A1B21CA19FA00E1863C /* CCArmatureAnimation.cpp */; }; + EDC78C4A21CA19FB00E1863C /* CCComRender.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1C21CA19FA00E1863C /* CCComRender.h */; }; + EDC78C4B21CA19FB00E1863C /* CCComRender.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1C21CA19FA00E1863C /* CCComRender.h */; }; + EDC78C4C21CA19FB00E1863C /* CSLanguageDataBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1D21CA19FA00E1863C /* CSLanguageDataBinary_generated.h */; }; + EDC78C4D21CA19FB00E1863C /* CSLanguageDataBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1D21CA19FA00E1863C /* CSLanguageDataBinary_generated.h */; }; + EDC78C4E21CA19FB00E1863C /* CCSpriteFrameCacheHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1E21CA19FA00E1863C /* CCSpriteFrameCacheHelper.h */; }; + EDC78C4F21CA19FB00E1863C /* CCSpriteFrameCacheHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1E21CA19FA00E1863C /* CCSpriteFrameCacheHelper.h */; }; + EDC78C5021CA19FB00E1863C /* CCBone.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1F21CA19FA00E1863C /* CCBone.h */; }; + EDC78C5121CA19FB00E1863C /* CCBone.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A1F21CA19FA00E1863C /* CCBone.h */; }; + EDC78C5221CA19FB00E1863C /* CocoLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2021CA19FA00E1863C /* CocoLoader.cpp */; }; + EDC78C5321CA19FB00E1863C /* CocoLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2021CA19FA00E1863C /* CocoLoader.cpp */; }; + EDC78C5421CA19FB00E1863C /* CocosStudioExport.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2121CA19FA00E1863C /* CocosStudioExport.h */; }; + EDC78C5521CA19FB00E1863C /* CocosStudioExport.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2121CA19FA00E1863C /* CocosStudioExport.h */; }; + EDC78C5621CA19FB00E1863C /* CCArmatureAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2221CA19FA00E1863C /* CCArmatureAnimation.h */; }; + EDC78C5721CA19FB00E1863C /* CCArmatureAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2221CA19FA00E1863C /* CCArmatureAnimation.h */; }; + EDC78C5821CA19FC00E1863C /* CCActionFrameEasing.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2321CA19FA00E1863C /* CCActionFrameEasing.h */; }; + EDC78C5921CA19FC00E1863C /* CCActionFrameEasing.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2321CA19FA00E1863C /* CCActionFrameEasing.h */; }; + EDC78C5A21CA19FC00E1863C /* CCActionManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2421CA19FA00E1863C /* CCActionManagerEx.cpp */; }; + EDC78C5B21CA19FC00E1863C /* CCActionManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2421CA19FA00E1863C /* CCActionManagerEx.cpp */; }; + EDC78C5C21CA19FC00E1863C /* CCTween.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2521CA19FA00E1863C /* CCTween.h */; }; + EDC78C5D21CA19FC00E1863C /* CCTween.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2521CA19FA00E1863C /* CCTween.h */; }; + EDC78C5E21CA19FC00E1863C /* CCTransformHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2621CA19FA00E1863C /* CCTransformHelp.cpp */; }; + EDC78C5F21CA19FC00E1863C /* CCTransformHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2621CA19FA00E1863C /* CCTransformHelp.cpp */; }; + EDC78C6021CA19FC00E1863C /* CCActionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2721CA19FA00E1863C /* CCActionNode.h */; }; + EDC78C6121CA19FC00E1863C /* CCActionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2721CA19FA00E1863C /* CCActionNode.h */; }; + EDC78C6221CA19FC00E1863C /* CCDataReaderHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2821CA19FA00E1863C /* CCDataReaderHelper.cpp */; }; + EDC78C6321CA19FC00E1863C /* CCDataReaderHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2821CA19FA00E1863C /* CCDataReaderHelper.cpp */; }; + EDC78C6421CA19FC00E1863C /* CSParse3DBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2921CA19FA00E1863C /* CSParse3DBinary_generated.h */; }; + EDC78C6521CA19FC00E1863C /* CSParse3DBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2921CA19FA00E1863C /* CSParse3DBinary_generated.h */; }; + EDC78C6621CA19FC00E1863C /* DictionaryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2A21CA19FA00E1863C /* DictionaryHelper.h */; }; + EDC78C6721CA19FC00E1863C /* DictionaryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2A21CA19FA00E1863C /* DictionaryHelper.h */; }; + EDC78C6821CA19FC00E1863C /* DictionaryHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2B21CA19FA00E1863C /* DictionaryHelper.cpp */; }; + EDC78C6921CA19FC00E1863C /* DictionaryHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2B21CA19FA00E1863C /* DictionaryHelper.cpp */; }; + EDC78C6A21CA19FC00E1863C /* CSParseBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2C21CA19FA00E1863C /* CSParseBinary_generated.h */; }; + EDC78C6B21CA19FC00E1863C /* CSParseBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2C21CA19FA00E1863C /* CSParseBinary_generated.h */; }; + EDC78C6C21CA19FC00E1863C /* CCDisplayFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2D21CA19FA00E1863C /* CCDisplayFactory.cpp */; }; + EDC78C6D21CA19FC00E1863C /* CCDisplayFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2D21CA19FA00E1863C /* CCDisplayFactory.cpp */; }; + EDC78C6E21CA19FC00E1863C /* CCComBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2E21CA19FA00E1863C /* CCComBase.h */; }; + EDC78C6F21CA19FC00E1863C /* CCComBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A2E21CA19FA00E1863C /* CCComBase.h */; }; + EDC78C7021CA19FC00E1863C /* CCSGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2F21CA19FA00E1863C /* CCSGUIReader.cpp */; }; + EDC78C7121CA19FC00E1863C /* CCSGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A2F21CA19FA00E1863C /* CCSGUIReader.cpp */; }; + EDC78C7221CA19FC00E1863C /* WidgetCallBackHandlerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3021CA19FA00E1863C /* WidgetCallBackHandlerProtocol.h */; }; + EDC78C7321CA19FC00E1863C /* WidgetCallBackHandlerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3021CA19FA00E1863C /* WidgetCallBackHandlerProtocol.h */; }; + EDC78C7421CA19FC00E1863C /* CCBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3121CA19FA00E1863C /* CCBatchNode.cpp */; }; + EDC78C7521CA19FC00E1863C /* CCBatchNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3121CA19FA00E1863C /* CCBatchNode.cpp */; }; + EDC78C7621CA19FC00E1863C /* ArmatureNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3421CA19FA00E1863C /* ArmatureNodeReader.h */; }; + EDC78C7721CA19FC00E1863C /* ArmatureNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3421CA19FA00E1863C /* ArmatureNodeReader.h */; }; + EDC78C7821CA19FC00E1863C /* CSArmatureNode_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3521CA19FA00E1863C /* CSArmatureNode_generated.h */; }; + EDC78C7921CA19FC00E1863C /* CSArmatureNode_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3521CA19FA00E1863C /* CSArmatureNode_generated.h */; }; + EDC78C7A21CA19FC00E1863C /* ArmatureNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3621CA19FA00E1863C /* ArmatureNodeReader.cpp */; }; + EDC78C7B21CA19FC00E1863C /* ArmatureNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3621CA19FA00E1863C /* ArmatureNodeReader.cpp */; }; + EDC78C7C21CA19FC00E1863C /* ProjectNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3821CA19FA00E1863C /* ProjectNodeReader.cpp */; }; + EDC78C7D21CA19FC00E1863C /* ProjectNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3821CA19FA00E1863C /* ProjectNodeReader.cpp */; }; + EDC78C7E21CA19FC00E1863C /* ProjectNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3921CA19FA00E1863C /* ProjectNodeReader.h */; }; + EDC78C7F21CA19FC00E1863C /* ProjectNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3921CA19FA00E1863C /* ProjectNodeReader.h */; }; + EDC78C8021CA19FC00E1863C /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3B21CA19FA00E1863C /* GameNode3DReader.h */; }; + EDC78C8121CA19FC00E1863C /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3B21CA19FA00E1863C /* GameNode3DReader.h */; }; + EDC78C8221CA19FC00E1863C /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3C21CA19FA00E1863C /* GameNode3DReader.cpp */; }; + EDC78C8321CA19FC00E1863C /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3C21CA19FA00E1863C /* GameNode3DReader.cpp */; }; + EDC78C8421CA19FC00E1863C /* ListViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3E21CA19FA00E1863C /* ListViewReader.cpp */; }; + EDC78C8521CA19FC00E1863C /* ListViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A3E21CA19FA00E1863C /* ListViewReader.cpp */; }; + EDC78C8621CA19FC00E1863C /* ListViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3F21CA19FA00E1863C /* ListViewReader.h */; }; + EDC78C8721CA19FC00E1863C /* ListViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A3F21CA19FA00E1863C /* ListViewReader.h */; }; + EDC78C8821CA19FC00E1863C /* GameMapReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4121CA19FA00E1863C /* GameMapReader.cpp */; }; + EDC78C8921CA19FC00E1863C /* GameMapReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4121CA19FA00E1863C /* GameMapReader.cpp */; }; + EDC78C8A21CA19FC00E1863C /* GameMapReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4221CA19FA00E1863C /* GameMapReader.h */; }; + EDC78C8B21CA19FC00E1863C /* GameMapReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4221CA19FA00E1863C /* GameMapReader.h */; }; + EDC78C8C21CA19FC00E1863C /* UserCameraReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4421CA19FA00E1863C /* UserCameraReader.cpp */; }; + EDC78C8D21CA19FC00E1863C /* UserCameraReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4421CA19FA00E1863C /* UserCameraReader.cpp */; }; + EDC78C8E21CA19FC00E1863C /* UserCameraReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4521CA19FA00E1863C /* UserCameraReader.h */; }; + EDC78C8F21CA19FC00E1863C /* UserCameraReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4521CA19FA00E1863C /* UserCameraReader.h */; }; + EDC78C9021CA19FC00E1863C /* LoadingBarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4721CA19FA00E1863C /* LoadingBarReader.cpp */; }; + EDC78C9121CA19FC00E1863C /* LoadingBarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4721CA19FA00E1863C /* LoadingBarReader.cpp */; }; + EDC78C9221CA19FC00E1863C /* LoadingBarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4821CA19FA00E1863C /* LoadingBarReader.h */; }; + EDC78C9321CA19FC00E1863C /* LoadingBarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4821CA19FA00E1863C /* LoadingBarReader.h */; }; + EDC78C9421CA19FC00E1863C /* SpriteReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4A21CA19FA00E1863C /* SpriteReader.cpp */; }; + EDC78C9521CA19FC00E1863C /* SpriteReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4A21CA19FA00E1863C /* SpriteReader.cpp */; }; + EDC78C9621CA19FC00E1863C /* SpriteReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4B21CA19FA00E1863C /* SpriteReader.h */; }; + EDC78C9721CA19FC00E1863C /* SpriteReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4B21CA19FA00E1863C /* SpriteReader.h */; }; + EDC78C9821CA19FC00E1863C /* TextAtlasReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4D21CA19FA00E1863C /* TextAtlasReader.h */; }; + EDC78C9921CA19FC00E1863C /* TextAtlasReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A4D21CA19FA00E1863C /* TextAtlasReader.h */; }; + EDC78C9A21CA19FC00E1863C /* TextAtlasReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4E21CA19FA00E1863C /* TextAtlasReader.cpp */; }; + EDC78C9B21CA19FC00E1863C /* TextAtlasReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A4E21CA19FA00E1863C /* TextAtlasReader.cpp */; }; + EDC78C9C21CA19FC00E1863C /* Node3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5021CA19FA00E1863C /* Node3DReader.h */; }; + EDC78C9D21CA19FC00E1863C /* Node3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5021CA19FA00E1863C /* Node3DReader.h */; }; + EDC78C9E21CA19FC00E1863C /* Node3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5121CA19FA00E1863C /* Node3DReader.cpp */; }; + EDC78C9F21CA19FC00E1863C /* Node3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5121CA19FA00E1863C /* Node3DReader.cpp */; }; + EDC78CA021CA19FC00E1863C /* WidgetReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5221CA19FA00E1863C /* WidgetReaderProtocol.h */; }; + EDC78CA121CA19FC00E1863C /* WidgetReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5221CA19FA00E1863C /* WidgetReaderProtocol.h */; }; + EDC78CA221CA19FC00E1863C /* ButtonReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5421CA19FA00E1863C /* ButtonReader.cpp */; }; + EDC78CA321CA19FC00E1863C /* ButtonReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5421CA19FA00E1863C /* ButtonReader.cpp */; }; + EDC78CA421CA19FC00E1863C /* ButtonReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5521CA19FA00E1863C /* ButtonReader.h */; }; + EDC78CA521CA19FC00E1863C /* ButtonReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5521CA19FA00E1863C /* ButtonReader.h */; }; + EDC78CA621CA19FC00E1863C /* Light3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5721CA19FA00E1863C /* Light3DReader.cpp */; }; + EDC78CA721CA19FC00E1863C /* Light3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5721CA19FA00E1863C /* Light3DReader.cpp */; }; + EDC78CA821CA19FC00E1863C /* Light3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5821CA19FA00E1863C /* Light3DReader.h */; }; + EDC78CA921CA19FC00E1863C /* Light3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5821CA19FA00E1863C /* Light3DReader.h */; }; + EDC78CAA21CA19FC00E1863C /* TabControlReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5A21CA19FA00E1863C /* TabControlReader.h */; }; + EDC78CAB21CA19FC00E1863C /* TabControlReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5A21CA19FA00E1863C /* TabControlReader.h */; }; + EDC78CAC21CA19FC00E1863C /* CSTabControl_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5B21CA19FA00E1863C /* CSTabControl_generated.h */; }; + EDC78CAD21CA19FC00E1863C /* CSTabControl_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5B21CA19FA00E1863C /* CSTabControl_generated.h */; }; + EDC78CAE21CA19FC00E1863C /* TabControlReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5C21CA19FA00E1863C /* TabControlReader.cpp */; }; + EDC78CAF21CA19FC00E1863C /* TabControlReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5C21CA19FA00E1863C /* TabControlReader.cpp */; }; + EDC78CB021CA19FC00E1863C /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5E21CA19FA00E1863C /* TextReader.cpp */; }; + EDC78CB121CA19FC00E1863C /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A5E21CA19FA00E1863C /* TextReader.cpp */; }; + EDC78CB221CA19FC00E1863C /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5F21CA19FA00E1863C /* TextReader.h */; }; + EDC78CB321CA19FC00E1863C /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A5F21CA19FA00E1863C /* TextReader.h */; }; + EDC78CB421CA19FC00E1863C /* WidgetReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6021CA19FA00E1863C /* WidgetReader.h */; }; + EDC78CB521CA19FC00E1863C /* WidgetReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6021CA19FA00E1863C /* WidgetReader.h */; }; + EDC78CB621CA19FC00E1863C /* PageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6221CA19FA00E1863C /* PageViewReader.cpp */; }; + EDC78CB721CA19FC00E1863C /* PageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6221CA19FA00E1863C /* PageViewReader.cpp */; }; + EDC78CB821CA19FC00E1863C /* PageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6321CA19FA00E1863C /* PageViewReader.h */; }; + EDC78CB921CA19FC00E1863C /* PageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6321CA19FA00E1863C /* PageViewReader.h */; }; + EDC78CBA21CA19FC00E1863C /* NodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6521CA19FA00E1863C /* NodeReader.cpp */; }; + EDC78CBB21CA19FC00E1863C /* NodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6521CA19FA00E1863C /* NodeReader.cpp */; }; + EDC78CBC21CA19FC00E1863C /* NodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6621CA19FA00E1863C /* NodeReader.h */; }; + EDC78CBD21CA19FC00E1863C /* NodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6621CA19FA00E1863C /* NodeReader.h */; }; + EDC78CBE21CA19FC00E1863C /* WidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6721CA19FA00E1863C /* WidgetReader.cpp */; }; + EDC78CBF21CA19FC00E1863C /* WidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6721CA19FA00E1863C /* WidgetReader.cpp */; }; + EDC78CC021CA19FC00E1863C /* ImageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6921CA19FA00E1863C /* ImageViewReader.h */; }; + EDC78CC121CA19FC00E1863C /* ImageViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6921CA19FA00E1863C /* ImageViewReader.h */; }; + EDC78CC221CA19FC00E1863C /* ImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6A21CA19FA00E1863C /* ImageViewReader.cpp */; }; + EDC78CC321CA19FC00E1863C /* ImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6A21CA19FA00E1863C /* ImageViewReader.cpp */; }; + EDC78CC421CA19FC00E1863C /* LayoutReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6C21CA19FA00E1863C /* LayoutReader.h */; }; + EDC78CC521CA19FC00E1863C /* LayoutReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A6C21CA19FA00E1863C /* LayoutReader.h */; }; + EDC78CC621CA19FC00E1863C /* LayoutReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6D21CA19FA00E1863C /* LayoutReader.cpp */; }; + EDC78CC721CA19FC00E1863C /* LayoutReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6D21CA19FA00E1863C /* LayoutReader.cpp */; }; + EDC78CC821CA19FC00E1863C /* SingleNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6F21CA19FA00E1863C /* SingleNodeReader.cpp */; }; + EDC78CC921CA19FC00E1863C /* SingleNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A6F21CA19FA00E1863C /* SingleNodeReader.cpp */; }; + EDC78CCA21CA19FC00E1863C /* SingleNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7021CA19FA00E1863C /* SingleNodeReader.h */; }; + EDC78CCB21CA19FC00E1863C /* SingleNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7021CA19FA00E1863C /* SingleNodeReader.h */; }; + EDC78CCC21CA19FC00E1863C /* NodeReaderDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7121CA19FA00E1863C /* NodeReaderDefine.h */; }; + EDC78CCD21CA19FC00E1863C /* NodeReaderDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7121CA19FA00E1863C /* NodeReaderDefine.h */; }; + EDC78CCE21CA19FC00E1863C /* TextBMFontReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7321CA19FA00E1863C /* TextBMFontReader.h */; }; + EDC78CCF21CA19FC00E1863C /* TextBMFontReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7321CA19FA00E1863C /* TextBMFontReader.h */; }; + EDC78CD021CA19FC00E1863C /* TextBMFontReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7421CA19FA00E1863C /* TextBMFontReader.cpp */; }; + EDC78CD121CA19FC00E1863C /* TextBMFontReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7421CA19FA00E1863C /* TextBMFontReader.cpp */; }; + EDC78CD221CA19FC00E1863C /* CheckBoxReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7621CA19FA00E1863C /* CheckBoxReader.cpp */; }; + EDC78CD321CA19FC00E1863C /* CheckBoxReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7621CA19FA00E1863C /* CheckBoxReader.cpp */; }; + EDC78CD421CA19FC00E1863C /* CheckBoxReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7721CA19FA00E1863C /* CheckBoxReader.h */; }; + EDC78CD521CA19FC00E1863C /* CheckBoxReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7721CA19FA00E1863C /* CheckBoxReader.h */; }; + EDC78CD621CA19FC00E1863C /* Sprite3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7921CA19FA00E1863C /* Sprite3DReader.h */; }; + EDC78CD721CA19FC00E1863C /* Sprite3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7921CA19FA00E1863C /* Sprite3DReader.h */; }; + EDC78CD821CA19FC00E1863C /* Sprite3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7A21CA19FA00E1863C /* Sprite3DReader.cpp */; }; + EDC78CD921CA19FC00E1863C /* Sprite3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7A21CA19FA00E1863C /* Sprite3DReader.cpp */; }; + EDC78CDA21CA19FC00E1863C /* SliderReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7C21CA19FA00E1863C /* SliderReader.cpp */; }; + EDC78CDB21CA19FC00E1863C /* SliderReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7C21CA19FA00E1863C /* SliderReader.cpp */; }; + EDC78CDC21CA19FC00E1863C /* SliderReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7D21CA19FA00E1863C /* SliderReader.h */; }; + EDC78CDD21CA19FC00E1863C /* SliderReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A7D21CA19FA00E1863C /* SliderReader.h */; }; + EDC78CDE21CA19FC00E1863C /* ComAudioReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7F21CA19FA00E1863C /* ComAudioReader.cpp */; }; + EDC78CDF21CA19FC00E1863C /* ComAudioReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A7F21CA19FA00E1863C /* ComAudioReader.cpp */; }; + EDC78CE021CA19FC00E1863C /* ComAudioReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8021CA19FA00E1863C /* ComAudioReader.h */; }; + EDC78CE121CA19FC00E1863C /* ComAudioReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8021CA19FA00E1863C /* ComAudioReader.h */; }; + EDC78CE221CA19FC00E1863C /* NodeReaderDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8121CA19FA00E1863C /* NodeReaderDefine.cpp */; }; + EDC78CE321CA19FC00E1863C /* NodeReaderDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8121CA19FA00E1863C /* NodeReaderDefine.cpp */; }; + EDC78CE421CA19FC00E1863C /* ParticleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8321CA19FA00E1863C /* ParticleReader.cpp */; }; + EDC78CE521CA19FC00E1863C /* ParticleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8321CA19FA00E1863C /* ParticleReader.cpp */; }; + EDC78CE621CA19FC00E1863C /* ParticleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8421CA19FA00E1863C /* ParticleReader.h */; }; + EDC78CE721CA19FC00E1863C /* ParticleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8421CA19FA00E1863C /* ParticleReader.h */; }; + EDC78CE821CA19FC00E1863C /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8521CA19FA00E1863C /* NodeReaderProtocol.cpp */; }; + EDC78CE921CA19FC00E1863C /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8521CA19FA00E1863C /* NodeReaderProtocol.cpp */; }; + EDC78CEA21CA19FC00E1863C /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8721CA19FA00E1863C /* Particle3DReader.h */; }; + EDC78CEB21CA19FC00E1863C /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8721CA19FA00E1863C /* Particle3DReader.h */; }; + EDC78CEC21CA19FC00E1863C /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */; }; + EDC78CED21CA19FC00E1863C /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */; }; + EDC78CEE21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */; }; + EDC78CEF21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */; }; + EDC78CF021CA19FC00E1863C /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8B21CA19FA00E1863C /* SkeletonNodeReader.h */; }; + EDC78CF121CA19FC00E1863C /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8B21CA19FA00E1863C /* SkeletonNodeReader.h */; }; + EDC78CF221CA19FC00E1863C /* BoneNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8C21CA19FA00E1863C /* BoneNodeReader.cpp */; }; + EDC78CF321CA19FC00E1863C /* BoneNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8C21CA19FA00E1863C /* BoneNodeReader.cpp */; }; + EDC78CF421CA19FC00E1863C /* BoneNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8D21CA19FA00E1863C /* BoneNodeReader.h */; }; + EDC78CF521CA19FC00E1863C /* BoneNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8D21CA19FA00E1863C /* BoneNodeReader.h */; }; + EDC78CF621CA19FC00E1863C /* SkeletonNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8E21CA19FA00E1863C /* SkeletonNodeReader.cpp */; }; + EDC78CF721CA19FC00E1863C /* SkeletonNodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8E21CA19FA00E1863C /* SkeletonNodeReader.cpp */; }; + EDC78CF821CA19FC00E1863C /* ScrollViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9021CA19FA00E1863C /* ScrollViewReader.h */; }; + EDC78CF921CA19FC00E1863C /* ScrollViewReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9021CA19FA00E1863C /* ScrollViewReader.h */; }; + EDC78CFA21CA19FC00E1863C /* ScrollViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9121CA19FA00E1863C /* ScrollViewReader.cpp */; }; + EDC78CFB21CA19FC00E1863C /* ScrollViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9121CA19FA00E1863C /* ScrollViewReader.cpp */; }; + EDC78CFC21CA19FC00E1863C /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9321CA19FA00E1863C /* TextFieldReader.h */; }; + EDC78CFD21CA19FC00E1863C /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9321CA19FA00E1863C /* TextFieldReader.h */; }; + EDC78CFE21CA19FC00E1863C /* TextFieldReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9421CA19FA00E1863C /* TextFieldReader.cpp */; }; + EDC78CFF21CA19FC00E1863C /* TextFieldReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9421CA19FA00E1863C /* TextFieldReader.cpp */; }; + EDC78D0021CA19FC00E1863C /* NodeReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9521CA19FA00E1863C /* NodeReaderProtocol.h */; }; + EDC78D0121CA19FC00E1863C /* NodeReaderProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9521CA19FA00E1863C /* NodeReaderProtocol.h */; }; + EDC78D0221CA19FC00E1863C /* CCComAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9621CA19FA00E1863C /* CCComAudio.h */; }; + EDC78D0321CA19FC00E1863C /* CCComAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9621CA19FA00E1863C /* CCComAudio.h */; }; + EDC78D0421CA19FC00E1863C /* CCDisplayFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9721CA19FA00E1863C /* CCDisplayFactory.h */; }; + EDC78D0521CA19FC00E1863C /* CCDisplayFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A9721CA19FA00E1863C /* CCDisplayFactory.h */; }; + EDC78D0621CA19FC00E1863C /* CCBone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9821CA19FA00E1863C /* CCBone.cpp */; }; + EDC78D0721CA19FC00E1863C /* CCBone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9821CA19FA00E1863C /* CCBone.cpp */; }; + EDC78D0821CA19FC00E1863C /* WidgetCallBackHandlerProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9921CA19FA00E1863C /* WidgetCallBackHandlerProtocol.cpp */; }; + EDC78D0921CA19FC00E1863C /* WidgetCallBackHandlerProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A9921CA19FA00E1863C /* WidgetCallBackHandlerProtocol.cpp */; }; + EDC78D0A21CA19FC00E1863C /* CCArmatureDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA121CA19FA00E1863C /* CCArmatureDefine.cpp */; }; + EDC78D0B21CA19FC00E1863C /* CCArmatureDefine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA121CA19FA00E1863C /* CCArmatureDefine.cpp */; }; + EDC78D0C21CA19FC00E1863C /* CCActionFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA221CA19FA00E1863C /* CCActionFrame.cpp */; }; + EDC78D0D21CA19FC00E1863C /* CCActionFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA221CA19FA00E1863C /* CCActionFrame.cpp */; }; + EDC78D0E21CA19FC00E1863C /* CCArmature.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA321CA19FA00E1863C /* CCArmature.h */; }; + EDC78D0F21CA19FC00E1863C /* CCArmature.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA321CA19FA00E1863C /* CCArmature.h */; }; + EDC78D1021CA19FC00E1863C /* CCColliderDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA421CA19FA00E1863C /* CCColliderDetector.cpp */; }; + EDC78D1121CA19FC00E1863C /* CCColliderDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AA421CA19FA00E1863C /* CCColliderDetector.cpp */; }; + EDC78D1221CA19FC00E1863C /* CCArmatureDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA521CA19FA00E1863C /* CCArmatureDataManager.h */; }; + EDC78D1321CA19FC00E1863C /* CCArmatureDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA521CA19FA00E1863C /* CCArmatureDataManager.h */; }; + EDC78D1421CA19FC00E1863C /* CCDatas.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA621CA19FA00E1863C /* CCDatas.h */; }; + EDC78D1521CA19FC00E1863C /* CCDatas.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA621CA19FA00E1863C /* CCDatas.h */; }; + EDC78D1621CA19FC00E1863C /* CCComExtensionData.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA721CA19FA00E1863C /* CCComExtensionData.h */; }; + EDC78D1721CA19FC00E1863C /* CCComExtensionData.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA721CA19FA00E1863C /* CCComExtensionData.h */; }; + EDC78D1821CA19FC00E1863C /* CCComController.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA821CA19FA00E1863C /* CCComController.h */; }; + EDC78D1921CA19FC00E1863C /* CCComController.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA821CA19FA00E1863C /* CCComController.h */; }; + EDC78D1A21CA19FC00E1863C /* TriggerObj.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA921CA19FA00E1863C /* TriggerObj.h */; }; + EDC78D1B21CA19FC00E1863C /* TriggerObj.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AA921CA19FA00E1863C /* TriggerObj.h */; }; + EDC78D1C21CA19FC00E1863C /* CocoLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAA21CA19FA00E1863C /* CocoLoader.h */; }; + EDC78D1D21CA19FC00E1863C /* CocoLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAA21CA19FA00E1863C /* CocoLoader.h */; }; + EDC78D1E21CA19FC00E1863C /* TriggerMng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AAB21CA19FA00E1863C /* TriggerMng.cpp */; }; + EDC78D1F21CA19FC00E1863C /* TriggerMng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AAB21CA19FA00E1863C /* TriggerMng.cpp */; }; + EDC78D2021CA19FC00E1863C /* CCSpriteFrameCacheHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AAC21CA19FA00E1863C /* CCSpriteFrameCacheHelper.cpp */; }; + EDC78D2121CA19FC00E1863C /* CCSpriteFrameCacheHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AAC21CA19FA00E1863C /* CCSpriteFrameCacheHelper.cpp */; }; + EDC78D2221CA19FC00E1863C /* CCColliderDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAD21CA19FA00E1863C /* CCColliderDetector.h */; }; + EDC78D2321CA19FC00E1863C /* CCColliderDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAD21CA19FA00E1863C /* CCColliderDetector.h */; }; + EDC78D2421CA19FC00E1863C /* LocalizationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAE21CA19FA00E1863C /* LocalizationManager.h */; }; + EDC78D2521CA19FC00E1863C /* LocalizationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAE21CA19FA00E1863C /* LocalizationManager.h */; }; + EDC78D2621CA19FC00E1863C /* CCActionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAF21CA19FA00E1863C /* CCActionObject.h */; }; + EDC78D2721CA19FC00E1863C /* CCActionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AAF21CA19FA00E1863C /* CCActionObject.h */; }; + EDC78D2821CA19FC00E1863C /* TriggerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB021CA19FA00E1863C /* TriggerBase.h */; }; + EDC78D2921CA19FC00E1863C /* TriggerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB021CA19FA00E1863C /* TriggerBase.h */; }; + EDC78D2A21CA19FC00E1863C /* CCSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB121CA19FA00E1863C /* CCSkin.cpp */; }; + EDC78D2B21CA19FC00E1863C /* CCSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB121CA19FA00E1863C /* CCSkin.cpp */; }; + EDC78D2C21CA19FC00E1863C /* CCSSceneReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB221CA19FA00E1863C /* CCSSceneReader.h */; }; + EDC78D2D21CA19FC00E1863C /* CCSSceneReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB221CA19FA00E1863C /* CCSSceneReader.h */; }; + EDC78D2E21CA19FC00E1863C /* CCSGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB321CA19FA00E1863C /* CCSGUIReader.h */; }; + EDC78D2F21CA19FC00E1863C /* CCSGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB321CA19FA00E1863C /* CCSGUIReader.h */; }; + EDC78D3021CA19FC00E1863C /* CCComAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB421CA19FA00E1863C /* CCComAttribute.cpp */; }; + EDC78D3121CA19FC00E1863C /* CCComAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB421CA19FA00E1863C /* CCComAttribute.cpp */; }; + EDC78D3221CA19FC00E1863C /* CCArmature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB521CA19FA00E1863C /* CCArmature.cpp */; }; + EDC78D3321CA19FC00E1863C /* CCArmature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB521CA19FA00E1863C /* CCArmature.cpp */; }; + EDC78D3421CA19FC00E1863C /* CCActionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB621CA19FA00E1863C /* CCActionObject.cpp */; }; + EDC78D3521CA19FC00E1863C /* CCActionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78AB621CA19FA00E1863C /* CCActionObject.cpp */; }; + EDC78D3621CA19FC00E1863C /* CCSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB721CA19FA00E1863C /* CCSkin.h */; }; + EDC78D3721CA19FC00E1863C /* CCSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78AB721CA19FA00E1863C /* CCSkin.h */; }; + EDE6457121F017220063F6E4 /* ProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDE6456D21F017210063F6E4 /* ProgramState.cpp */; }; + EDE6457221F017220063F6E4 /* ProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDE6456D21F017210063F6E4 /* ProgramState.cpp */; }; + EDE6457321F017220063F6E4 /* ShaderCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDE6456E21F017210063F6E4 /* ShaderCache.cpp */; }; + EDE6457421F017220063F6E4 /* ShaderCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDE6456E21F017210063F6E4 /* ShaderCache.cpp */; }; + EDE6457521F017220063F6E4 /* ProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE6456F21F017210063F6E4 /* ProgramState.h */; }; + EDE6457621F017220063F6E4 /* ProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE6456F21F017210063F6E4 /* ProgramState.h */; }; + EDE6457721F017220063F6E4 /* ShaderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE6457021F017210063F6E4 /* ShaderCache.h */; }; + EDE6457821F017220063F6E4 /* ShaderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE6457021F017210063F6E4 /* ShaderCache.h */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimeline.cpp; sourceTree = ""; }; - 0634A4C6194B19E400E608AF /* CCActionTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimeline.h; sourceTree = ""; }; - 0634A4C7194B19E400E608AF /* CCActionTimelineCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimelineCache.cpp; sourceTree = ""; }; - 0634A4C8194B19E400E608AF /* CCActionTimelineCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimelineCache.h; sourceTree = ""; }; - 0634A4C9194B19E400E608AF /* CCFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFrame.cpp; sourceTree = ""; }; - 0634A4CA194B19E400E608AF /* CCFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFrame.h; sourceTree = ""; }; - 0634A4CD194B19E400E608AF /* CCTimeLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTimeLine.cpp; sourceTree = ""; }; - 0634A4CE194B19E400E608AF /* CCTimeLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTimeLine.h; sourceTree = ""; }; - 0634A4CF194B19E400E608AF /* CCTimelineMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTimelineMacro.h; sourceTree = ""; }; - 06CAAABC186AD63B0012A414 /* TriggerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerBase.cpp; sourceTree = ""; }; - 06CAAABD186AD63B0012A414 /* TriggerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerBase.h; sourceTree = ""; }; - 06CAAABE186AD63B0012A414 /* TriggerMng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerMng.cpp; sourceTree = ""; }; - 06CAAABF186AD63B0012A414 /* TriggerMng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerMng.h; sourceTree = ""; }; - 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerObj.cpp; sourceTree = ""; }; - 06CAAAC1186AD63B0012A414 /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = ""; }; - 0C261F261BE7528900707478 /* Light3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Light3DReader.cpp; sourceTree = ""; }; - 0C261F271BE7528900707478 /* Light3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Light3DReader.h; sourceTree = ""; }; 1551A33F158F2AB200E66CFE /* libcocos2d Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2d Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1551A342158F2AB200E66CFE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAABB.cpp; sourceTree = ""; }; - 15AE17E519AAD2F700C27E9E /* CCAABB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAABB.h; sourceTree = ""; }; - 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAnimate3D.cpp; sourceTree = ""; }; - 15AE17E719AAD2F700C27E9E /* CCAnimate3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAnimate3D.h; sourceTree = ""; }; - 15AE17E819AAD2F700C27E9E /* CCAnimation3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAnimation3D.cpp; sourceTree = ""; }; - 15AE17E919AAD2F700C27E9E /* CCAnimation3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAnimation3D.h; sourceTree = ""; }; - 15AE17EA19AAD2F700C27E9E /* CCAnimationCurve.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAnimationCurve.h; sourceTree = ""; }; - 15AE17EB19AAD2F700C27E9E /* CCAnimationCurve.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CCAnimationCurve.inl; sourceTree = ""; }; - 15AE17EC19AAD2F700C27E9E /* CCAttachNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAttachNode.cpp; sourceTree = ""; }; - 15AE17ED19AAD2F700C27E9E /* CCAttachNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAttachNode.h; sourceTree = ""; }; - 15AE17EE19AAD2F700C27E9E /* CCBundle3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBundle3D.cpp; sourceTree = ""; }; - 15AE17EF19AAD2F700C27E9E /* CCBundle3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBundle3D.h; sourceTree = ""; }; - 15AE17F019AAD2F700C27E9E /* CCBundle3DData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBundle3DData.h; sourceTree = ""; }; - 15AE17F119AAD2F700C27E9E /* CCBundleReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBundleReader.cpp; sourceTree = ""; }; - 15AE17F219AAD2F700C27E9E /* CCBundleReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBundleReader.h; sourceTree = ""; }; - 15AE17F319AAD2F700C27E9E /* CCMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMesh.cpp; sourceTree = ""; }; - 15AE17F419AAD2F700C27E9E /* CCMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMesh.h; sourceTree = ""; }; - 15AE17F519AAD2F700C27E9E /* CCMeshSkin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshSkin.cpp; sourceTree = ""; }; - 15AE17F619AAD2F700C27E9E /* CCMeshSkin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMeshSkin.h; sourceTree = ""; }; - 15AE17F719AAD2F700C27E9E /* CCMeshVertexIndexData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshVertexIndexData.cpp; sourceTree = ""; }; - 15AE17F819AAD2F700C27E9E /* CCMeshVertexIndexData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMeshVertexIndexData.h; sourceTree = ""; }; - 15AE17F919AAD2F700C27E9E /* CCOBB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCOBB.cpp; sourceTree = ""; }; - 15AE17FA19AAD2F700C27E9E /* CCOBB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCOBB.h; sourceTree = ""; }; - 15AE17FB19AAD2F700C27E9E /* CCObjLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCObjLoader.cpp; sourceTree = ""; }; - 15AE17FC19AAD2F700C27E9E /* CCObjLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCObjLoader.h; sourceTree = ""; }; - 15AE17FD19AAD2F700C27E9E /* CCRay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRay.cpp; sourceTree = ""; }; - 15AE17FE19AAD2F700C27E9E /* CCRay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRay.h; sourceTree = ""; }; - 15AE17FF19AAD2F700C27E9E /* CCSkeleton3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkeleton3D.cpp; sourceTree = ""; }; - 15AE180019AAD2F700C27E9E /* CCSkeleton3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkeleton3D.h; sourceTree = ""; }; - 15AE180119AAD2F700C27E9E /* CCSprite3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSprite3D.cpp; sourceTree = ""; }; - 15AE180219AAD2F700C27E9E /* CCSprite3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSprite3D.h; sourceTree = ""; }; - 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSprite3DMaterial.cpp; sourceTree = ""; }; - 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSprite3DMaterial.h; sourceTree = ""; }; - 15AE180519AAD2F700C27E9E /* cocos3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocos3d.h; sourceTree = ""; }; - 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsManagerEx.cpp; sourceTree = ""; }; - 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsManagerEx.h; sourceTree = ""; }; - 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEventAssetsManagerEx.cpp; sourceTree = ""; }; - 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEventAssetsManagerEx.h; sourceTree = ""; }; - 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEventListenerAssetsManagerEx.cpp; sourceTree = ""; }; - 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEventListenerAssetsManagerEx.h; sourceTree = ""; }; - 15B3707619EE414C00ABE682 /* Manifest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Manifest.cpp; sourceTree = ""; }; - 15B3707719EE414C00ABE682 /* Manifest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Manifest.h; sourceTree = ""; }; 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCProtectedNode.cpp; sourceTree = ""; }; 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCProtectedNode.h; sourceTree = ""; }; 15FB20721AE7BF8600C31518 /* CCAutoPolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAutoPolygon.cpp; sourceTree = ""; }; @@ -4541,31 +2466,6 @@ 15FB20841AE7C57D00C31518 /* sweep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sweep.h; sourceTree = ""; }; 15FB20851AE7C57D00C31518 /* sweep_context.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sweep_context.cc; sourceTree = ""; }; 15FB20861AE7C57D00C31518 /* sweep_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sweep_context.h; sourceTree = ""; }; - 182C5CAD1A95961600C30D34 /* CSParse3DBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSParse3DBinary_generated.h; sourceTree = ""; }; - 182C5CB01A95964700C30D34 /* Node3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node3DReader.cpp; path = Node3DReader/Node3DReader.cpp; sourceTree = ""; }; - 182C5CB11A95964700C30D34 /* Node3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node3DReader.h; path = Node3DReader/Node3DReader.h; sourceTree = ""; }; - 182C5CD41A98F30500C30D34 /* Sprite3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sprite3DReader.cpp; path = Sprite3DReader/Sprite3DReader.cpp; sourceTree = ""; }; - 182C5CD51A98F30500C30D34 /* Sprite3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sprite3DReader.h; path = Sprite3DReader/Sprite3DReader.h; sourceTree = ""; }; - 182C5CE31A9D725400C30D34 /* UserCameraReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserCameraReader.cpp; path = UserCameraReader/UserCameraReader.cpp; sourceTree = ""; }; - 182C5CE41A9D725400C30D34 /* UserCameraReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserCameraReader.h; path = UserCameraReader/UserCameraReader.h; sourceTree = ""; }; - 18956BB01A9DFBFD006E9155 /* Particle3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Particle3DReader.cpp; path = Particle3DReader/Particle3DReader.cpp; sourceTree = ""; }; - 18956BB11A9DFBFD006E9155 /* Particle3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Particle3DReader.h; path = Particle3DReader/Particle3DReader.h; sourceTree = ""; }; - 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = ""; }; - 1A01C67718F57BE800EFE3A6 /* CCArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArray.h; sourceTree = ""; }; - 1A01C67818F57BE800EFE3A6 /* CCBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBool.h; sourceTree = ""; }; - 1A01C67918F57BE800EFE3A6 /* CCDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDeprecated.cpp; sourceTree = ""; }; - 1A01C67A18F57BE800EFE3A6 /* CCDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDeprecated.h; sourceTree = ""; }; - 1A01C67B18F57BE800EFE3A6 /* CCDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDictionary.cpp; sourceTree = ""; }; - 1A01C67C18F57BE800EFE3A6 /* CCDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDictionary.h; sourceTree = ""; }; - 1A01C67D18F57BE800EFE3A6 /* CCDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDouble.h; sourceTree = ""; }; - 1A01C67E18F57BE800EFE3A6 /* CCFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFloat.h; sourceTree = ""; }; - 1A01C67F18F57BE800EFE3A6 /* CCInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInteger.h; sourceTree = ""; }; - 1A01C68018F57BE800EFE3A6 /* CCSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSet.cpp; sourceTree = ""; }; - 1A01C68118F57BE800EFE3A6 /* CCSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSet.h; sourceTree = ""; }; - 1A01C68218F57BE800EFE3A6 /* CCString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCString.cpp; sourceTree = ""; }; - 1A01C68318F57BE800EFE3A6 /* CCString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCString.h; sourceTree = ""; }; - 1A01C6A218F58F7500EFE3A6 /* CCNotificationCenter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNotificationCenter.cpp; sourceTree = ""; }; - 1A01C6A318F58F7500EFE3A6 /* CCNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNotificationCenter.h; sourceTree = ""; }; 1A087AE61860400400196EF5 /* edtaa3func.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = edtaa3func.cpp; sourceTree = ""; }; 1A087AE71860400400196EF5 /* edtaa3func.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edtaa3func.h; sourceTree = ""; }; 1A1645AE191B726C008C7C7F /* ConvertUTF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ConvertUTF.c; sourceTree = ""; }; @@ -4641,12 +2541,8 @@ 1A570097180BC5C10088DEC7 /* CCAtlasNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAtlasNode.h; sourceTree = ""; }; 1A57009C180BC5D20088DEC7 /* CCNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNode.cpp; sourceTree = ""; }; 1A57009D180BC5D20088DEC7 /* CCNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNode.h; sourceTree = ""; }; - 1A57010A180BC8ED0088DEC7 /* CCDrawingPrimitives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDrawingPrimitives.cpp; sourceTree = ""; }; - 1A57010B180BC8EE0088DEC7 /* CCDrawingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDrawingPrimitives.h; sourceTree = ""; }; 1A57010C180BC8EE0088DEC7 /* CCDrawNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCDrawNode.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 1A57010D180BC8EE0088DEC7 /* CCDrawNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDrawNode.h; sourceTree = ""; }; - 1A570117180BC90D0088DEC7 /* CCGrabber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGrabber.cpp; sourceTree = ""; }; - 1A570118180BC90D0088DEC7 /* CCGrabber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGrabber.h; sourceTree = ""; }; 1A570119180BC90D0088DEC7 /* CCGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGrid.cpp; sourceTree = ""; }; 1A57011A180BC90D0088DEC7 /* CCGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGrid.h; sourceTree = ""; }; 1A570182180BCB590088DEC7 /* CCFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFont.cpp; sourceTree = ""; }; @@ -4663,12 +2559,8 @@ 1A570191180BCB590088DEC7 /* CCLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabel.h; sourceTree = ""; }; 1A570192180BCB590088DEC7 /* CCLabelAtlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelAtlas.cpp; sourceTree = ""; }; 1A570193180BCB590088DEC7 /* CCLabelAtlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelAtlas.h; sourceTree = ""; }; - 1A570194180BCB590088DEC7 /* CCLabelBMFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelBMFont.cpp; sourceTree = ""; }; - 1A570195180BCB590088DEC7 /* CCLabelBMFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelBMFont.h; sourceTree = ""; }; 1A570197180BCB590088DEC7 /* CCLabelTextFormatter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelTextFormatter.cpp; sourceTree = ""; }; 1A570198180BCB590088DEC7 /* CCLabelTextFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelTextFormatter.h; sourceTree = ""; }; - 1A570199180BCB590088DEC7 /* CCLabelTTF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelTTF.cpp; sourceTree = ""; }; - 1A57019A180BCB590088DEC7 /* CCLabelTTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelTTF.h; sourceTree = ""; }; 1A5701D4180BCB8C0088DEC7 /* CCLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCLayer.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 1A5701D5180BCB8C0088DEC7 /* CCLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayer.h; sourceTree = ""; }; 1A5701D6180BCB8C0088DEC7 /* CCScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScene.cpp; sourceTree = ""; }; @@ -4748,75 +2640,8 @@ 1A57052D180BD3280088DEC7 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetype.a; sourceTree = ""; }; 1A57FFF7180BC5160088DEC7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = CHANGELOG; path = ../CHANGELOG; sourceTree = ""; }; 1A5FB7C31DF012D900C918C1 /* AudioMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioMacros.h; sourceTree = ""; }; - 1A8C5948180E930E00EF57C3 /* CCActionFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionFrame.cpp; sourceTree = ""; }; - 1A8C5949180E930E00EF57C3 /* CCActionFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionFrame.h; sourceTree = ""; }; - 1A8C594A180E930E00EF57C3 /* CCActionFrameEasing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionFrameEasing.cpp; sourceTree = ""; }; - 1A8C594B180E930E00EF57C3 /* CCActionFrameEasing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionFrameEasing.h; sourceTree = ""; }; - 1A8C594C180E930E00EF57C3 /* CCActionManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionManagerEx.cpp; sourceTree = ""; }; - 1A8C594D180E930E00EF57C3 /* CCActionManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionManagerEx.h; sourceTree = ""; }; - 1A8C594E180E930E00EF57C3 /* CCActionNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionNode.cpp; sourceTree = ""; }; - 1A8C594F180E930E00EF57C3 /* CCActionNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionNode.h; sourceTree = ""; }; - 1A8C5950180E930E00EF57C3 /* CCActionObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionObject.cpp; sourceTree = ""; }; - 1A8C5951180E930E00EF57C3 /* CCActionObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionObject.h; sourceTree = ""; }; - 1A8C5952180E930E00EF57C3 /* CCArmature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmature.cpp; sourceTree = ""; }; - 1A8C5953180E930E00EF57C3 /* CCArmature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmature.h; sourceTree = ""; }; - 1A8C5954180E930E00EF57C3 /* CCArmatureAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureAnimation.cpp; sourceTree = ""; }; - 1A8C5955180E930E00EF57C3 /* CCArmatureAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureAnimation.h; sourceTree = ""; }; - 1A8C5956180E930E00EF57C3 /* CCArmatureDataManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureDataManager.cpp; sourceTree = ""; }; - 1A8C5957180E930E00EF57C3 /* CCArmatureDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureDataManager.h; sourceTree = ""; }; - 1A8C5958180E930E00EF57C3 /* CCArmatureDefine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureDefine.cpp; sourceTree = ""; }; - 1A8C5959180E930E00EF57C3 /* CCArmatureDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureDefine.h; sourceTree = ""; }; - 1A8C595A180E930E00EF57C3 /* CCBatchNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCBatchNode.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 1A8C595B180E930E00EF57C3 /* CCBatchNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBatchNode.h; sourceTree = ""; }; - 1A8C595C180E930E00EF57C3 /* CCBone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBone.cpp; sourceTree = ""; }; - 1A8C595D180E930E00EF57C3 /* CCBone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBone.h; sourceTree = ""; }; - 1A8C595E180E930E00EF57C3 /* CCColliderDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCColliderDetector.cpp; sourceTree = ""; }; - 1A8C595F180E930E00EF57C3 /* CCColliderDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCColliderDetector.h; sourceTree = ""; }; - 1A8C5960180E930E00EF57C3 /* CCComAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComAttribute.cpp; sourceTree = ""; }; - 1A8C5961180E930E00EF57C3 /* CCComAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComAttribute.h; sourceTree = ""; }; - 1A8C5962180E930E00EF57C3 /* CCComAudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComAudio.cpp; sourceTree = ""; }; - 1A8C5963180E930E00EF57C3 /* CCComAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComAudio.h; sourceTree = ""; }; - 1A8C5964180E930E00EF57C3 /* CCComController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComController.cpp; sourceTree = ""; }; - 1A8C5965180E930E00EF57C3 /* CCComController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComController.h; sourceTree = ""; }; - 1A8C5966180E930E00EF57C3 /* CCComRender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComRender.cpp; sourceTree = ""; }; - 1A8C5967180E930E00EF57C3 /* CCComRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComRender.h; sourceTree = ""; }; - 1A8C5968180E930E00EF57C3 /* CCDataReaderHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDataReaderHelper.cpp; sourceTree = ""; }; - 1A8C5969180E930E00EF57C3 /* CCDataReaderHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDataReaderHelper.h; sourceTree = ""; }; - 1A8C596A180E930E00EF57C3 /* CCDatas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDatas.cpp; sourceTree = ""; }; - 1A8C596B180E930E00EF57C3 /* CCDatas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDatas.h; sourceTree = ""; }; - 1A8C596C180E930E00EF57C3 /* CCDecorativeDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDecorativeDisplay.cpp; sourceTree = ""; }; - 1A8C596D180E930E00EF57C3 /* CCDecorativeDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDecorativeDisplay.h; sourceTree = ""; }; - 1A8C596E180E930E00EF57C3 /* CCDisplayFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDisplayFactory.cpp; sourceTree = ""; }; - 1A8C596F180E930E00EF57C3 /* CCDisplayFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDisplayFactory.h; sourceTree = ""; }; - 1A8C5970180E930E00EF57C3 /* CCDisplayManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDisplayManager.cpp; sourceTree = ""; }; - 1A8C5971180E930E00EF57C3 /* CCDisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDisplayManager.h; sourceTree = ""; }; - 1A8C5972180E930E00EF57C3 /* CCInputDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCInputDelegate.cpp; sourceTree = ""; }; - 1A8C5973180E930E00EF57C3 /* CCInputDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInputDelegate.h; sourceTree = ""; }; - 1A8C5974180E930E00EF57C3 /* CCProcessBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCProcessBase.cpp; sourceTree = ""; }; - 1A8C5975180E930E00EF57C3 /* CCProcessBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCProcessBase.h; sourceTree = ""; }; - 1A8C5976180E930E00EF57C3 /* CCSGUIReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSGUIReader.cpp; sourceTree = ""; }; - 1A8C5977180E930E00EF57C3 /* CCSGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSGUIReader.h; sourceTree = ""; }; - 1A8C5978180E930E00EF57C3 /* CCSkin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCSkin.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 1A8C5979180E930E00EF57C3 /* CCSkin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkin.h; sourceTree = ""; }; - 1A8C597A180E930E00EF57C3 /* CCSpriteFrameCacheHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteFrameCacheHelper.cpp; sourceTree = ""; }; - 1A8C597B180E930E00EF57C3 /* CCSpriteFrameCacheHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteFrameCacheHelper.h; sourceTree = ""; }; - 1A8C597C180E930E00EF57C3 /* CCSSceneReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSSceneReader.cpp; sourceTree = ""; }; - 1A8C597D180E930E00EF57C3 /* CCSSceneReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSSceneReader.h; sourceTree = ""; }; - 1A8C597E180E930E00EF57C3 /* CCTransformHelp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTransformHelp.cpp; sourceTree = ""; }; - 1A8C597F180E930E00EF57C3 /* CCTransformHelp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTransformHelp.h; sourceTree = ""; }; - 1A8C5980180E930E00EF57C3 /* CCTween.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTween.cpp; sourceTree = ""; }; - 1A8C5981180E930E00EF57C3 /* CCTween.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTween.h; sourceTree = ""; }; - 1A8C5984180E930E00EF57C3 /* CCUtilMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCUtilMath.cpp; sourceTree = ""; }; - 1A8C5985180E930E00EF57C3 /* CCUtilMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUtilMath.h; sourceTree = ""; }; - 1A8C5986180E930E00EF57C3 /* CocoStudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoStudio.h; sourceTree = ""; }; - 1A8C5989180E930E00EF57C3 /* DictionaryHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictionaryHelper.cpp; sourceTree = ""; }; - 1A8C598A180E930E00EF57C3 /* DictionaryHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictionaryHelper.h; sourceTree = ""; }; 1A97ABFC1A1D962A0076D9CC /* MathUtilNeon64.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MathUtilNeon64.inl; sourceTree = ""; }; 1A97ABFD1A1D962A0076D9CC /* MathUtilSSE.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MathUtilSSE.inl; sourceTree = ""; }; - 1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGLBufferedNode.cpp; sourceTree = ""; }; - 1A9DCA03180E6955007A3AD4 /* CCGLBufferedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGLBufferedNode.h; sourceTree = ""; }; - 1AAF5351180E3060000584C8 /* AssetsManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsManager.cpp; sourceTree = ""; }; - 1AAF5352180E3060000584C8 /* AssetsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsManager.h; sourceTree = ""; }; 1AAF5363180E3374000584C8 /* HttpClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpClient.h; sourceTree = ""; }; 1AAF5364180E3374000584C8 /* HttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpRequest.h; sourceTree = ""; }; 1AAF5365180E3374000584C8 /* HttpResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpResponse.h; sourceTree = ""; }; @@ -4827,156 +2652,22 @@ 1AAF5384180E35A3000584C8 /* libwebsockets.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libwebsockets.a; sourceTree = ""; }; 1AAF5387180E35AC000584C8 /* libwebsockets.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libwebsockets.a; sourceTree = ""; }; 1AAF541C180E3B6A000584C8 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcurl.a; sourceTree = ""; }; - 1AAF584B180E40B9000584C8 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; - 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = ""; }; - 1AAF584D180E40B9000584C8 /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = ""; }; 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFontCharMap.cpp; sourceTree = ""; }; 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFontCharMap.h; sourceTree = ""; }; 1AC026991914068200FA920D /* ConvertUTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvertUTF.h; sourceTree = ""; }; - 1AD71CFA180E26E600808F54 /* CCBAnimationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBAnimationManager.cpp; sourceTree = ""; }; - 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBAnimationManager.h; sourceTree = ""; }; - 1AD71CFC180E26E600808F54 /* CCBFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBFileLoader.cpp; sourceTree = ""; }; - 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBFileLoader.h; sourceTree = ""; }; - 1AD71CFE180E26E600808F54 /* CCBKeyframe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBKeyframe.cpp; sourceTree = ""; }; - 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBKeyframe.h; sourceTree = ""; }; - 1AD71D00180E26E600808F54 /* CCBMemberVariableAssigner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBMemberVariableAssigner.h; sourceTree = ""; }; - 1AD71D01180E26E600808F54 /* CCBReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBReader.cpp; sourceTree = ""; }; - 1AD71D02180E26E600808F54 /* CCBReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBReader.h; sourceTree = ""; }; - 1AD71D03180E26E600808F54 /* CCBSelectorResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSelectorResolver.h; sourceTree = ""; }; - 1AD71D04180E26E600808F54 /* CCBSequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequence.cpp; sourceTree = ""; }; - 1AD71D05180E26E600808F54 /* CCBSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequence.h; sourceTree = ""; }; - 1AD71D06180E26E600808F54 /* CCBSequenceProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequenceProperty.cpp; sourceTree = ""; }; - 1AD71D07180E26E600808F54 /* CCBSequenceProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequenceProperty.h; sourceTree = ""; }; - 1AD71D0A180E26E600808F54 /* CCControlButtonLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButtonLoader.cpp; sourceTree = ""; }; - 1AD71D0B180E26E600808F54 /* CCControlButtonLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButtonLoader.h; sourceTree = ""; }; - 1AD71D0C180E26E600808F54 /* CCControlLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlLoader.cpp; sourceTree = ""; }; - 1AD71D0D180E26E600808F54 /* CCControlLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlLoader.h; sourceTree = ""; }; - 1AD71D0E180E26E600808F54 /* CCLabelBMFontLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelBMFontLoader.cpp; sourceTree = ""; }; - 1AD71D0F180E26E600808F54 /* CCLabelBMFontLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelBMFontLoader.h; sourceTree = ""; }; - 1AD71D10180E26E600808F54 /* CCLabelTTFLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelTTFLoader.cpp; sourceTree = ""; }; - 1AD71D11180E26E600808F54 /* CCLabelTTFLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelTTFLoader.h; sourceTree = ""; }; - 1AD71D12180E26E600808F54 /* CCLayerColorLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerColorLoader.cpp; sourceTree = ""; }; - 1AD71D13180E26E600808F54 /* CCLayerColorLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerColorLoader.h; sourceTree = ""; }; - 1AD71D14180E26E600808F54 /* CCLayerGradientLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerGradientLoader.cpp; sourceTree = ""; }; - 1AD71D15180E26E600808F54 /* CCLayerGradientLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerGradientLoader.h; sourceTree = ""; }; - 1AD71D16180E26E600808F54 /* CCLayerLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerLoader.cpp; sourceTree = ""; }; - 1AD71D17180E26E600808F54 /* CCLayerLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerLoader.h; sourceTree = ""; }; - 1AD71D18180E26E600808F54 /* CCMenuItemImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemImageLoader.cpp; sourceTree = ""; }; - 1AD71D19180E26E600808F54 /* CCMenuItemImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemImageLoader.h; sourceTree = ""; }; - 1AD71D1A180E26E600808F54 /* CCMenuItemLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemLoader.cpp; sourceTree = ""; }; - 1AD71D1B180E26E600808F54 /* CCMenuItemLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemLoader.h; sourceTree = ""; }; - 1AD71D1C180E26E600808F54 /* CCMenuLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuLoader.h; sourceTree = ""; }; - 1AD71D1D180E26E600808F54 /* CCNode+CCBRelativePositioning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCNode+CCBRelativePositioning.cpp"; sourceTree = ""; }; - 1AD71D1E180E26E600808F54 /* CCNode+CCBRelativePositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCNode+CCBRelativePositioning.h"; sourceTree = ""; }; - 1AD71D1F180E26E600808F54 /* CCNodeLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoader.cpp; sourceTree = ""; }; - 1AD71D20180E26E600808F54 /* CCNodeLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoader.h; sourceTree = ""; }; - 1AD71D21180E26E600808F54 /* CCNodeLoaderLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoaderLibrary.cpp; sourceTree = ""; }; - 1AD71D22180E26E600808F54 /* CCNodeLoaderLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderLibrary.h; sourceTree = ""; }; - 1AD71D23180E26E600808F54 /* CCNodeLoaderListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderListener.h; sourceTree = ""; }; - 1AD71D24180E26E600808F54 /* CCParticleSystemQuadLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCParticleSystemQuadLoader.cpp; sourceTree = ""; }; - 1AD71D25180E26E600808F54 /* CCParticleSystemQuadLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCParticleSystemQuadLoader.h; sourceTree = ""; }; - 1AD71D26180E26E600808F54 /* CCScale9SpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9SpriteLoader.cpp; sourceTree = ""; }; - 1AD71D27180E26E600808F54 /* CCScale9SpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScale9SpriteLoader.h; sourceTree = ""; }; - 1AD71D28180E26E600808F54 /* CCScrollViewLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollViewLoader.cpp; sourceTree = ""; }; - 1AD71D29180E26E600808F54 /* CCScrollViewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollViewLoader.h; sourceTree = ""; }; - 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteLoader.cpp; sourceTree = ""; }; - 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteLoader.h; sourceTree = ""; }; - 1AD71D2C180E26E600808F54 /* CocosBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosBuilder.h; sourceTree = ""; }; - 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsDebugNode.cpp; sourceTree = ""; }; - 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; - 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; - 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; 29031E0619BFE8D400EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/mac/libchipmunk.a; sourceTree = ""; }; 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/ios/libchipmunk.a; sourceTree = ""; }; 2905E9CC1ACD3D8C00092DD2 /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = ../external/zlib/prebuilt/mac/libz.a; sourceTree = ""; }; - 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUI.cpp; sourceTree = ""; }; - 2905F9EA18CF08D000240AA3 /* CocosGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUI.h; sourceTree = ""; }; - 2905F9EB18CF08D000240AA3 /* GUIDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDefine.h; sourceTree = ""; }; - 2905F9F018CF08D000240AA3 /* UIButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButton.cpp; sourceTree = ""; }; - 2905F9F118CF08D000240AA3 /* UIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButton.h; sourceTree = ""; }; - 2905F9F218CF08D000240AA3 /* UICheckBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBox.cpp; sourceTree = ""; }; - 2905F9F318CF08D000240AA3 /* UICheckBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBox.h; sourceTree = ""; }; - 2905F9F418CF08D000240AA3 /* UIHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIHelper.cpp; sourceTree = ""; }; - 2905F9F518CF08D000240AA3 /* UIHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHelper.h; sourceTree = ""; }; - 2905F9F618CF08D000240AA3 /* UIImageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageView.cpp; sourceTree = ""; }; - 2905F9F718CF08D000240AA3 /* UIImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageView.h; sourceTree = ""; }; - 2905F9F818CF08D000240AA3 /* UILayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayout.cpp; sourceTree = ""; }; - 2905F9F918CF08D000240AA3 /* UILayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayout.h; sourceTree = ""; }; - 2905F9FC18CF08D000240AA3 /* UILayoutParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutParameter.cpp; sourceTree = ""; }; - 2905F9FD18CF08D000240AA3 /* UILayoutParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutParameter.h; sourceTree = ""; }; - 2905F9FE18CF08D000240AA3 /* UIListView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListView.cpp; sourceTree = ""; }; - 2905F9FF18CF08D000240AA3 /* UIListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListView.h; sourceTree = ""; }; - 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBar.cpp; sourceTree = ""; }; - 2905FA0118CF08D000240AA3 /* UILoadingBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBar.h; sourceTree = ""; }; - 2905FA0218CF08D000240AA3 /* UIPageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageView.cpp; sourceTree = ""; }; - 2905FA0318CF08D000240AA3 /* UIPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageView.h; sourceTree = ""; }; - 2905FA0418CF08D000240AA3 /* UIRichText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRichText.cpp; sourceTree = ""; }; - 2905FA0518CF08D000240AA3 /* UIRichText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRichText.h; sourceTree = ""; }; - 2905FA0718CF08D000240AA3 /* UIScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollView.cpp; sourceTree = ""; }; - 2905FA0818CF08D000240AA3 /* UIScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollView.h; sourceTree = ""; }; - 2905FA0918CF08D000240AA3 /* UISlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISlider.cpp; sourceTree = ""; }; - 2905FA0A18CF08D100240AA3 /* UISlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISlider.h; sourceTree = ""; }; - 2905FA0B18CF08D100240AA3 /* UIText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIText.cpp; sourceTree = ""; }; - 2905FA0C18CF08D100240AA3 /* UIText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIText.h; sourceTree = ""; }; - 2905FA0D18CF08D100240AA3 /* UITextAtlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlas.cpp; sourceTree = ""; }; - 2905FA0E18CF08D100240AA3 /* UITextAtlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlas.h; sourceTree = ""; }; - 2905FA0F18CF08D100240AA3 /* UITextBMFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFont.cpp; sourceTree = ""; }; - 2905FA1018CF08D100240AA3 /* UITextBMFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFont.h; sourceTree = ""; }; - 2905FA1118CF08D100240AA3 /* UITextField.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextField.cpp; sourceTree = ""; }; - 2905FA1218CF08D100240AA3 /* UITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextField.h; sourceTree = ""; }; - 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; - 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; - 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNinePatchImageParser.h; path = ../base/CCNinePatchImageParser.h; sourceTree = ""; }; 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNinePatchImageParser.cpp; path = ../base/CCNinePatchImageParser.cpp; sourceTree = ""; }; - 291A09221C5F06A60068C1D2 /* CCUIEditBoxMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIEditBoxMac.h; sourceTree = ""; }; - 291A09231C5F06A60068C1D2 /* CCUIEditBoxMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIEditBoxMac.mm; sourceTree = ""; }; - 292DB12F19B4574100A80320 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; - 292DB13019B4574100A80320 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; - 292DB13119B4574100A80320 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; - 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-android.cpp"; sourceTree = ""; }; - 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-android.h"; sourceTree = ""; }; - 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-ios.h"; sourceTree = ""; }; - 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-ios.mm"; sourceTree = ""; }; - 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-mac.h"; sourceTree = ""; }; - 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-mac.mm"; sourceTree = ""; }; - 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-stub.cpp"; sourceTree = ""; }; - 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionDeprecated.cpp; sourceTree = ""; }; - 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionDeprecated.h; sourceTree = ""; }; 292F1A5B1A5151CE00E479F8 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrypto.a; sourceTree = ""; }; 292F1A5C1A5151CE00E479F8 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libssl.a; sourceTree = ""; }; 292F1A601A52447100E479F8 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../external/curl/prebuilt/mac/libcrypto.a; sourceTree = ""; }; 292F1A611A52447100E479F8 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../external/curl/prebuilt/mac/libcurl.a; sourceTree = ""; }; 292F1A661A524F2700E479F8 /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = usr/lib/libssl.dylib; sourceTree = SDKROOT; }; 292F1A6A1A5250F700E479F8 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../external/curl/prebuilt/mac/libssl.a; sourceTree = ""; }; - 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; - 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; - 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebViewImpl-ios.h"; sourceTree = ""; }; - 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIWebViewImpl-ios.mm"; sourceTree = ""; }; 294D7D921D0E67B4002CE7B7 /* CCDevice-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDevice-apple.mm"; sourceTree = ""; }; 294D7D931D0E67B4002CE7B7 /* CCDevice-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDevice-apple.h"; sourceTree = ""; }; - 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; - 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; - 2962D5E71C61CBF9004821A3 /* CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextInput.h; sourceTree = ""; }; - 2962D5ED1C61CF3F004821A3 /* CCUISingleLineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUISingleLineTextField.h; sourceTree = ""; }; - 2962D5EE1C61CF3F004821A3 /* CCUISingleLineTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUISingleLineTextField.m; sourceTree = ""; }; - 2962D5F51C61DBBF004821A3 /* CCUIPasswordTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIPasswordTextField.h; sourceTree = ""; }; - 2962D5F61C61DBBF004821A3 /* CCUIPasswordTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUIPasswordTextField.m; sourceTree = ""; }; - 2962D5FD1C61DF1A004821A3 /* CCUIMultilineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIMultilineTextField.h; sourceTree = ""; }; - 2962D5FE1C61DF1A004821A3 /* CCUIMultilineTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUIMultilineTextField.m; sourceTree = ""; }; - 2962D6011C61F02E004821A3 /* CCUITextFieldFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextFieldFormatter.h; sourceTree = ""; }; - 2962D6021C61F02E004821A3 /* CCUITextFieldFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUITextFieldFormatter.m; sourceTree = ""; }; - 2980F0171BA9A5550059E678 /* CCUIEditBoxIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIEditBoxIOS.h; sourceTree = ""; }; - 2980F0181BA9A5550059E678 /* CCUIEditBoxIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIEditBoxIOS.mm; sourceTree = ""; }; - 2980F0191BA9A5550059E678 /* CCUIMultilineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIMultilineTextField.h; sourceTree = ""; }; - 2980F01A1BA9A5550059E678 /* CCUIMultilineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIMultilineTextField.mm; sourceTree = ""; }; - 2980F01B1BA9A5550059E678 /* CCUISingleLineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUISingleLineTextField.h; sourceTree = ""; }; - 2980F01C1BA9A5550059E678 /* CCUISingleLineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUISingleLineTextField.mm; sourceTree = ""; }; - 2980F01D1BA9A5550059E678 /* CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextInput.h; sourceTree = ""; }; - 2980F01E1BA9A5550059E678 /* UITextField+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextField+CCUITextInput.h"; sourceTree = ""; }; - 2980F01F1BA9A5550059E678 /* UITextField+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextField+CCUITextInput.mm"; sourceTree = ""; }; - 2980F0201BA9A5550059E678 /* UITextView+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+CCUITextInput.h"; sourceTree = ""; }; - 2980F0211BA9A5550059E678 /* UITextView+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextView+CCUITextInput.mm"; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; 2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = ""; }; 298C75D31C0465D0006BAE63 /* CCStencilStateManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCStencilStateManager.cpp; path = ../base/CCStencilStateManager.cpp; sourceTree = ""; }; @@ -4984,50 +2675,7 @@ 299754F3193EC95400A54AC3 /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFactory.h; path = ../base/ObjectFactory.h; sourceTree = ""; }; 299CF1F919A434BC00C378C1 /* ccRandom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccRandom.cpp; path = ../base/ccRandom.cpp; sourceTree = ""; }; 299CF1FA19A434BC00C378C1 /* ccRandom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccRandom.h; path = ../base/ccRandom.h; sourceTree = ""; }; - 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIDeprecated.cpp; sourceTree = ""; }; - 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutManager.cpp; sourceTree = ""; }; - 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutManager.h; sourceTree = ""; }; - 29DA08F01C63351600F4052B /* UIEditBoxImpl-linux.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-linux.cpp"; sourceTree = ""; }; - 29DA08F11C63351600F4052B /* UIEditBoxImpl-linux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-linux.h"; sourceTree = ""; }; - 29DA08F21C63351600F4052B /* UIEditBoxImpl-winrt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-winrt.cpp"; sourceTree = ""; }; - 29DA08F31C63351600F4052B /* UIEditBoxImpl-winrt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-winrt.h"; sourceTree = ""; }; 29DC5A1C1CFFE5C000CF2930 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; - 29E99D1C1957BA7000046604 /* CocoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoLoader.cpp; sourceTree = ""; }; - 29E99D1D1957BA7000046604 /* CocoLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoLoader.h; sourceTree = ""; }; - 373B910718787C0B00198F86 /* CCComBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComBase.h; sourceTree = ""; }; - 382384021A259005002C4610 /* CSParseBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSParseBinary_generated.h; sourceTree = ""; }; - 382384051A25900F002C4610 /* FlatBuffersSerialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlatBuffersSerialize.cpp; sourceTree = ""; }; - 382384061A25900F002C4610 /* FlatBuffersSerialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlatBuffersSerialize.h; sourceTree = ""; }; - 3823840B1A259092002C4610 /* NodeReaderDefine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReaderDefine.cpp; sourceTree = ""; }; - 3823840C1A259092002C4610 /* NodeReaderDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReaderDefine.h; sourceTree = ""; }; - 3823840D1A259092002C4610 /* NodeReaderProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReaderProtocol.cpp; sourceTree = ""; }; - 3823840E1A259092002C4610 /* NodeReaderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReaderProtocol.h; sourceTree = ""; }; - 382384181A2590D2002C4610 /* ComAudioReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComAudioReader.cpp; sourceTree = ""; }; - 382384191A2590D2002C4610 /* ComAudioReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComAudioReader.h; sourceTree = ""; }; - 3823841F1A2590DA002C4610 /* GameMapReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameMapReader.cpp; sourceTree = ""; }; - 382384201A2590DA002C4610 /* GameMapReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMapReader.h; sourceTree = ""; }; - 382384261A2590F9002C4610 /* NodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReader.cpp; sourceTree = ""; }; - 382384271A2590F9002C4610 /* NodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReader.h; sourceTree = ""; }; - 3823842D1A259112002C4610 /* ParticleReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleReader.cpp; sourceTree = ""; }; - 3823842E1A259112002C4610 /* ParticleReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleReader.h; sourceTree = ""; }; - 382384341A259126002C4610 /* ProjectNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectNodeReader.cpp; sourceTree = ""; }; - 382384351A259126002C4610 /* ProjectNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectNodeReader.h; sourceTree = ""; }; - 3823843B1A259140002C4610 /* SingleNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleNodeReader.cpp; sourceTree = ""; }; - 3823843C1A259140002C4610 /* SingleNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleNodeReader.h; sourceTree = ""; }; - 382384421A25915C002C4610 /* SpriteReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteReader.cpp; sourceTree = ""; }; - 382384431A25915C002C4610 /* SpriteReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteReader.h; sourceTree = ""; }; - 38ACD1FA1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetCallBackHandlerProtocol.cpp; sourceTree = ""; }; - 38ACD1FB1A27111900C3093D /* WidgetCallBackHandlerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetCallBackHandlerProtocol.h; sourceTree = ""; }; - 38B8E2D319E66581002D7CE7 /* CSLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSLoader.cpp; sourceTree = ""; }; - 38B8E2D419E66581002D7CE7 /* CSLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSLoader.h; sourceTree = ""; }; - 38B8E2DF19E671D2002D7CE7 /* UILayoutComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutComponent.cpp; sourceTree = ""; }; - 38B8E2E019E671D2002D7CE7 /* UILayoutComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutComponent.h; sourceTree = ""; }; - 38D9629C1ACA9721007C6FAF /* CocoStudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoStudio.cpp; sourceTree = ""; }; - 38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArmatureNodeReader.cpp; sourceTree = ""; }; - 38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArmatureNodeReader.h; sourceTree = ""; }; - 38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSArmatureNode_generated.h; sourceTree = ""; }; - 3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMotionStreak3D.cpp; sourceTree = ""; }; - 3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMotionStreak3D.h; sourceTree = ""; }; 3E2BDADD19C030ED0055CDCD /* AudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioEngine.h; sourceTree = ""; }; 3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioEngine.cpp; sourceTree = ""; }; 3E6176551960F89B00DE83F5 /* CCController-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "CCController-apple.mm"; path = "../base/CCController-apple.mm"; sourceTree = ""; }; @@ -5038,20 +2686,175 @@ 3E6176641960F89B00DE83F5 /* CCEventListenerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEventListenerController.h; path = ../base/CCEventListenerController.h; sourceTree = ""; }; 3E6176651960F89B00DE83F5 /* CCGameController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCGameController.h; path = ../base/CCGameController.h; sourceTree = ""; }; 3E61781C1966A5A300DE83F5 /* CCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCController.cpp; path = ../base/CCController.cpp; sourceTree = ""; }; - 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoPlayer.h; sourceTree = ""; }; - 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIVideoPlayer-ios.mm"; sourceTree = ""; }; 3EACC99C19F5014D00EB3C5E /* CCCamera.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCamera.cpp; sourceTree = ""; }; 3EACC99D19F5014D00EB3C5E /* CCCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCamera.h; sourceTree = ""; }; 3EACC99E19F5014D00EB3C5E /* CCLight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLight.cpp; sourceTree = ""; }; 3EACC99F19F5014D00EB3C5E /* CCLight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLight.h; sourceTree = ""; }; - 43015DBD1B60DF4000E75161 /* CCComExtensionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComExtensionData.cpp; sourceTree = ""; }; - 43015DBE1B60DF4000E75161 /* CCComExtensionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComExtensionData.h; sourceTree = ""; }; + 40FE103021F070640061C04F /* CCControlHuePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlHuePicker.h; sourceTree = ""; }; + 40FE103121F070640061C04F /* CCControlUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlUtils.cpp; sourceTree = ""; }; + 40FE103221F070640061C04F /* CCControlColourPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlColourPicker.cpp; sourceTree = ""; }; + 40FE103321F070640061C04F /* CCControlSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSwitch.cpp; sourceTree = ""; }; + 40FE103421F070640061C04F /* CCControlUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlUtils.h; sourceTree = ""; }; + 40FE103521F070640061C04F /* CCInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCInvocation.cpp; sourceTree = ""; }; + 40FE103621F070640061C04F /* CCControlStepper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlStepper.cpp; sourceTree = ""; }; + 40FE103721F070640061C04F /* CCControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; }; + 40FE103821F070640061C04F /* CCControlButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; }; + 40FE103921F070640061C04F /* CCControlPotentiometer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlPotentiometer.cpp; sourceTree = ""; }; + 40FE103A21F070640061C04F /* CCControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; }; + 40FE103B21F070640061C04F /* CCControlExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlExtensions.h; sourceTree = ""; }; + 40FE103C21F070640061C04F /* CCControlHuePicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlHuePicker.cpp; sourceTree = ""; }; + 40FE103D21F070640061C04F /* CCControlColourPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlColourPicker.h; sourceTree = ""; }; + 40FE103E21F070640061C04F /* CCControlSaturationBrightnessPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSaturationBrightnessPicker.cpp; sourceTree = ""; }; + 40FE103F21F070640061C04F /* CCControlButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButton.h; sourceTree = ""; }; + 40FE104021F070640061C04F /* CCInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; + 40FE104121F070640061C04F /* CCControlSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSlider.h; sourceTree = ""; }; + 40FE104221F070640061C04F /* CCControlStepper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlStepper.h; sourceTree = ""; }; + 40FE104321F070640061C04F /* CCControlSlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSlider.cpp; sourceTree = ""; }; + 40FE104421F070640061C04F /* CCControlSaturationBrightnessPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSaturationBrightnessPicker.h; sourceTree = ""; }; + 40FE104521F070640061C04F /* CCControlPotentiometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlPotentiometer.h; sourceTree = ""; }; + 40FE104621F070640061C04F /* CCControlSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSwitch.h; sourceTree = ""; }; + 460D4CD121A5666E0075726E /* CCRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderer.h; sourceTree = ""; }; + 460D4CD221A5666E0075726E /* CCRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRenderer.cpp; sourceTree = ""; }; + 460D4CF421ABD0C60075726E /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utils.h; sourceTree = ""; }; + 460D4CF521ABD0C60075726E /* DeviceMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMTL.h; sourceTree = ""; }; + 460D4CF621ABD0C60075726E /* Utils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Utils.mm; sourceTree = ""; }; + 460D4CF721ABD0C60075726E /* BufferMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BufferMTL.mm; sourceTree = ""; }; + 460D4CF821ABD0C60075726E /* ShaderModuleMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderModuleMTL.h; sourceTree = ""; }; + 460D4CF921ABD0C60075726E /* BlendStateMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlendStateMTL.mm; sourceTree = ""; }; + 460D4CFA21ABD0C60075726E /* DepthStencilStateMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DepthStencilStateMTL.mm; sourceTree = ""; }; + 460D4CFB21ABD0C60075726E /* BlendStateMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlendStateMTL.h; sourceTree = ""; }; + 460D4CFC21ABD0C60075726E /* DepthStencilStateMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DepthStencilStateMTL.h; sourceTree = ""; }; + 460D4CFD21ABD0C60075726E /* ShaderModuleMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ShaderModuleMTL.mm; sourceTree = ""; }; + 460D4CFE21ABD0C60075726E /* BufferMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BufferMTL.h; sourceTree = ""; }; + 460D4CFF21ABD0C60075726E /* CommandBufferMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandBufferMTL.h; sourceTree = ""; }; + 460D4D0021ABD0C60075726E /* DeviceMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceMTL.mm; sourceTree = ""; }; + 460D4D0121ABD0C60075726E /* TextureMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextureMTL.mm; sourceTree = ""; }; + 460D4D0221ABD0C60075726E /* TextureMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureMTL.h; sourceTree = ""; }; + 460D4D0421ABD0C60075726E /* CommandBufferMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CommandBufferMTL.mm; sourceTree = ""; }; + 460D4D0521ABD0C60075726E /* RenderPipelineMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderPipelineMTL.h; sourceTree = ""; }; + 460D4D0721ABD0C60075726E /* RenderPipelineMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderPipelineMTL.mm; sourceTree = ""; }; + 461C204C21A5304A00F3BD47 /* CCPipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPipelineDescriptor.h; sourceTree = ""; }; + 461FE08321C34EEB00E5378F /* CCEnumClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEnumClass.h; path = ../base/CCEnumClass.h; sourceTree = ""; }; + 461FE08E21CA129B00E5378F /* CCCallbackCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCallbackCommand.cpp; sourceTree = ""; }; + 461FE08F21CA129B00E5378F /* CCCallbackCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCallbackCommand.h; sourceTree = ""; }; 46270FA21E1CC6A100AAA098 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../external/openssl/prebuilt/mac/libcrypto.a; sourceTree = ""; }; 46270FA31E1CC6A100AAA098 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../external/openssl/prebuilt/mac/libssl.a; sourceTree = ""; }; 46270FA61E1CC84500AAA098 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../external/openssl/prebuilt/ios/libcrypto.a; sourceTree = ""; }; 46270FA71E1CC84500AAA098 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../external/openssl/prebuilt/ios/libssl.a; sourceTree = ""; }; + 462CBDD821D46525005712AB /* libglsl_optimizer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libglsl_optimizer.a; path = "../external/glsl-optimizer/prebuilt/ios/libglsl_optimizer.a"; sourceTree = ""; }; + 462CBDD921D46525005712AB /* libmesa.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmesa.a; path = "../external/glsl-optimizer/prebuilt/ios/libmesa.a"; sourceTree = ""; }; + 462CBDDA21D46525005712AB /* libglcpp-library.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libglcpp-library.a"; path = "../external/glsl-optimizer/prebuilt/ios/libglcpp-library.a"; sourceTree = ""; }; + 4631CA9121AFD9F90000D408 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; + 4631CA9221AFD9F90000D408 /* UIRadioButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRadioButton.h; sourceTree = ""; }; + 4631CA9421AFD9F90000D408 /* UIVideoPlayer-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIVideoPlayer-ios.mm"; sourceTree = ""; }; + 4631CA9521AFD9F90000D408 /* UITextAtlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlas.h; sourceTree = ""; }; + 4631CA9621AFD9F90000D408 /* UIVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoPlayer.h; sourceTree = ""; }; + 4631CA9821AFD9F90000D408 /* UILayoutComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutComponent.h; sourceTree = ""; }; + 4631CA9921AFD9F90000D408 /* UIButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButton.cpp; sourceTree = ""; }; + 4631CA9A21AFD9F90000D408 /* UIPageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageView.cpp; sourceTree = ""; }; + 4631CA9C21AFD9F90000D408 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + 4631CA9D21AFD9F90000D408 /* UITabControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITabControl.h; sourceTree = ""; }; + 4631CA9E21AFD9F90000D408 /* UIVBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVBox.cpp; sourceTree = ""; }; + 4631CA9F21AFD9F90000D408 /* UIAbstractCheckButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIAbstractCheckButton.cpp; sourceTree = ""; }; + 4631CAA021AFD9F90000D408 /* UICheckBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBox.cpp; sourceTree = ""; }; + 4631CAA121AFD9F90000D408 /* UITextAtlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlas.cpp; sourceTree = ""; }; + 4631CAA221AFD9F90000D408 /* UIVideoPlayer-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIVideoPlayer-android.cpp"; sourceTree = ""; }; + 4631CAA321AFD9F90000D408 /* UIScrollViewBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewBar.h; sourceTree = ""; }; + 4631CAA421AFD9F90000D408 /* UIText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIText.cpp; sourceTree = ""; }; + 4631CAA621AFD9F90000D408 /* UIEditBoxImpl-common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-common.cpp"; sourceTree = ""; }; + 4631CAA721AFD9F90000D408 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; + 4631CAAB21AFD9F90000D408 /* UIEditBoxImpl-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-mac.mm"; sourceTree = ""; }; + 4631CAAD21AFD9F90000D408 /* UIEditBoxImpl-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-mac.h"; sourceTree = ""; }; + 4631CAAF21AFD9F90000D408 /* UIEditBoxImpl-stub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-stub.cpp"; sourceTree = ""; }; + 4631CAB221AFD9F90000D408 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; + 4631CAB421AFD9F90000D408 /* CCUIEditBoxIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIEditBoxIOS.h; sourceTree = ""; }; + 4631CAB521AFD9F90000D408 /* CCUIEditBoxIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIEditBoxIOS.mm; sourceTree = ""; }; + 4631CAB621AFD9F90000D408 /* CCUIMultilineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIMultilineTextField.h; sourceTree = ""; }; + 4631CAB721AFD9F90000D408 /* UITextView+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextView+CCUITextInput.mm"; sourceTree = ""; }; + 4631CAB821AFD9F90000D408 /* CCUISingleLineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUISingleLineTextField.mm; sourceTree = ""; }; + 4631CAB921AFD9F90000D408 /* CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextInput.h; sourceTree = ""; }; + 4631CABA21AFD9F90000D408 /* UITextView+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+CCUITextInput.h"; sourceTree = ""; }; + 4631CABB21AFD9F90000D408 /* CCUIMultilineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIMultilineTextField.mm; sourceTree = ""; }; + 4631CABC21AFD9F90000D408 /* UITextField+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextField+CCUITextInput.mm"; sourceTree = ""; }; + 4631CABD21AFD9F90000D408 /* UITextField+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextField+CCUITextInput.h"; sourceTree = ""; }; + 4631CABE21AFD9F90000D408 /* CCUISingleLineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUISingleLineTextField.h; sourceTree = ""; }; + 4631CAC021AFD9F90000D408 /* CCUITextFieldFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUITextFieldFormatter.m; sourceTree = ""; }; + 4631CAC121AFD9F90000D408 /* CCUIPasswordTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIPasswordTextField.h; sourceTree = ""; }; + 4631CAC221AFD9F90000D408 /* CCUISingleLineTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUISingleLineTextField.m; sourceTree = ""; }; + 4631CAC321AFD9F90000D408 /* CCUIMultilineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIMultilineTextField.h; sourceTree = ""; }; + 4631CAC421AFD9F90000D408 /* CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextInput.h; sourceTree = ""; }; + 4631CAC521AFD9F90000D408 /* CCUIEditBoxMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIEditBoxMac.mm; sourceTree = ""; }; + 4631CAC621AFD9F90000D408 /* CCUIEditBoxMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIEditBoxMac.h; sourceTree = ""; }; + 4631CAC721AFD9F90000D408 /* CCUISingleLineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUISingleLineTextField.h; sourceTree = ""; }; + 4631CAC821AFD9F90000D408 /* CCUITextFieldFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextFieldFormatter.h; sourceTree = ""; }; + 4631CAC921AFD9F90000D408 /* CCUIPasswordTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUIPasswordTextField.m; sourceTree = ""; }; + 4631CACA21AFD9F90000D408 /* CCUIMultilineTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUIMultilineTextField.m; sourceTree = ""; }; + 4631CACB21AFD9F90000D408 /* UIEditBoxImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-ios.mm"; sourceTree = ""; }; + 4631CACC21AFD9F90000D408 /* UIEditBoxImpl-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-common.h"; sourceTree = ""; }; + 4631CACE21AFD9F90000D408 /* UIEditBoxImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-ios.h"; sourceTree = ""; }; + 4631CACF21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-win32.cpp"; sourceTree = ""; }; + 4631CAD121AFD9F90000D408 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; + 4631CAD321AFD9F90000D408 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; + 4631CAD421AFD9F90000D408 /* CocosGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUI.cpp; sourceTree = ""; }; + 4631CAD521AFD9F90000D408 /* UILayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayout.cpp; sourceTree = ""; }; + 4631CAD621AFD9F90000D408 /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; + 4631CAD921AFD9F90000D408 /* UIHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIHelper.cpp; sourceTree = ""; }; + 4631CADA21AFD9F90000D408 /* UITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextField.h; sourceTree = ""; }; + 4631CADB21AFD9F90000D408 /* UIPageViewIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewIndicator.cpp; sourceTree = ""; }; + 4631CADC21AFD9F90000D408 /* UIRadioButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRadioButton.cpp; sourceTree = ""; }; + 4631CADE21AFD9F90000D408 /* UIScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollView.h; sourceTree = ""; }; + 4631CADF21AFD9F90000D408 /* UIRelativeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRelativeBox.h; sourceTree = ""; }; + 4631CAE021AFD9F90000D408 /* UIHBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIHBox.cpp; sourceTree = ""; }; + 4631CAE121AFD9F90000D408 /* UIListView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListView.cpp; sourceTree = ""; }; + 4631CAE221AFD9F90000D408 /* UITextBMFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFont.h; sourceTree = ""; }; + 4631CAE421AFD9F90000D408 /* UIHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHelper.h; sourceTree = ""; }; + 4631CAE521AFD9F90000D408 /* UICheckBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBox.h; sourceTree = ""; }; + 4631CAE621AFD9F90000D408 /* GUIDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDefine.h; sourceTree = ""; }; + 4631CAE721AFD9F90000D408 /* UIImageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageView.cpp; sourceTree = ""; }; + 4631CAE821AFD9F90000D408 /* UIListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListView.h; sourceTree = ""; }; + 4631CAE921AFD9F90000D408 /* UIVBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVBox.h; sourceTree = ""; }; + 4631CAEA21AFD9F90000D408 /* UITextBMFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFont.cpp; sourceTree = ""; }; + 4631CAEB21AFD9F90000D408 /* UITabControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITabControl.cpp; sourceTree = ""; }; + 4631CAEC21AFD9F90000D408 /* GUIExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIExport.h; sourceTree = ""; }; + 4631CAED21AFD9F90000D408 /* UIText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIText.h; sourceTree = ""; }; + 4631CAEE21AFD9F90000D408 /* UILayoutManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutManager.cpp; sourceTree = ""; }; + 4631CAEF21AFD9F90000D408 /* UITextField.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextField.cpp; sourceTree = ""; }; + 4631CAF021AFD9F90000D408 /* UILayoutComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutComponent.cpp; sourceTree = ""; }; + 4631CAF121AFD9F90000D408 /* UIScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollView.cpp; sourceTree = ""; }; + 4631CAF221AFD9F90000D408 /* UIImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageView.h; sourceTree = ""; }; + 4631CAF321AFD9F90000D408 /* UILayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutManager.h; sourceTree = ""; }; + 4631CAF521AFD9F90000D408 /* UIPageViewIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewIndicator.h; sourceTree = ""; }; + 4631CAF621AFD9F90000D408 /* UIScrollViewBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewBar.cpp; sourceTree = ""; }; + 4631CAF721AFD9F90000D408 /* UILoadingBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBar.h; sourceTree = ""; }; + 4631CAF821AFD9F90000D408 /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; + 4631CAF921AFD9F90000D408 /* UIRichText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRichText.cpp; sourceTree = ""; }; + 4631CAFA21AFD9F90000D408 /* UIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButton.h; sourceTree = ""; }; + 4631CAFC21AFD9F90000D408 /* UIAbstractCheckButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAbstractCheckButton.h; sourceTree = ""; }; + 4631CAFD21AFD9F90000D408 /* UILoadingBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBar.cpp; sourceTree = ""; }; + 4631CAFE21AFD9F90000D408 /* UILayoutParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutParameter.h; sourceTree = ""; }; + 4631CAFF21AFD9F90000D408 /* UILayoutParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutParameter.cpp; sourceTree = ""; }; + 4631CB0121AFD9F90000D408 /* UISlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISlider.cpp; sourceTree = ""; }; + 4631CB0221AFD9F90000D408 /* UIRelativeBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRelativeBox.cpp; sourceTree = ""; }; + 4631CB0321AFD9F90000D408 /* UILayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayout.h; sourceTree = ""; }; + 4631CB0521AFD9F90000D408 /* CocosGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUI.h; sourceTree = ""; }; + 4631CB0921AFD9F90000D408 /* UIPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageView.h; sourceTree = ""; }; + 4631CB0A21AFD9F90000D408 /* UISlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISlider.h; sourceTree = ""; }; + 4631CB0B21AFD9F90000D408 /* UIHBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHBox.h; sourceTree = ""; }; + 4631CB0C21AFD9F90000D408 /* UIRichText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRichText.h; sourceTree = ""; }; 464AD6E3197EBB1400E502D8 /* pvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pvr.cpp; path = ../base/pvr.cpp; sourceTree = ""; }; 464AD6E4197EBB1400E502D8 /* pvr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pvr.h; path = ../base/pvr.h; sourceTree = ""; }; + 46535CC621ABD351005B5370 /* libmesa.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmesa.a; path = "../external/glsl-optimzer/libmesa.a"; sourceTree = ""; }; + 46535CC721ABD352005B5370 /* libglsl_optimizer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libglsl_optimizer.a; path = "../external/glsl-optimzer/libglsl_optimizer.a"; sourceTree = ""; }; + 46535CC821ABD352005B5370 /* libglcpp-library.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libglcpp-library.a"; path = "../external/glsl-optimzer/libglcpp-library.a"; sourceTree = ""; }; + 46535CCC21ABD4AB005B5370 /* libmesa.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmesa.a; path = "../external/glsl-optimizer/libmesa.a"; sourceTree = ""; }; + 46535CCD21ABD4AB005B5370 /* libglsl_optimizer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libglsl_optimizer.a; path = "../external/glsl-optimizer/libglsl_optimizer.a"; sourceTree = ""; }; + 46535CCE21ABD4AB005B5370 /* libglcpp-library.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libglcpp-library.a"; path = "../external/glsl-optimizer/libglcpp-library.a"; sourceTree = ""; }; + 46535CD221ABD559005B5370 /* libglcpp-library.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libglcpp-library.a"; path = "../external/glsl-optimizer/prebuilt/mac/libglcpp-library.a"; sourceTree = ""; }; + 46535CD321ABD559005B5370 /* libmesa.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmesa.a; path = "../external/glsl-optimizer/prebuilt/mac/libmesa.a"; sourceTree = ""; }; + 46535CD421ABD559005B5370 /* libglsl_optimizer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libglsl_optimizer.a; path = "../external/glsl-optimizer/prebuilt/mac/libglsl_optimizer.a"; sourceTree = ""; }; + 46535CD821ABD63B005B5370 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; + 46535CDC21ABE8C0005B5370 /* CCGLViewImpl-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGLViewImpl-mac.h"; sourceTree = ""; }; + 46535CDD21ABE8C0005B5370 /* CCGLViewImpl-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCGLViewImpl-mac.mm"; sourceTree = ""; }; 466F05201EF7659300B80080 /* libBulletCollision.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBulletCollision.a; path = ../external/bullet/prebuilt/ios/libBulletCollision.a; sourceTree = ""; }; 466F05211EF7659300B80080 /* libBulletDynamics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBulletDynamics.a; path = ../external/bullet/prebuilt/ios/libBulletDynamics.a; sourceTree = ""; }; 466F05221EF7659300B80080 /* libBulletMultiThreaded.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBulletMultiThreaded.a; path = ../external/bullet/prebuilt/ios/libBulletMultiThreaded.a; sourceTree = ""; }; @@ -5075,97 +2878,50 @@ 46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = ""; }; 46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = ""; }; 46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; - 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; }; - 46A15FE41807A56F005B8026 /* CDAudioManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; - 46A15FE51807A56F005B8026 /* CDAudioManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; }; - 46A15FE61807A56F005B8026 /* CDConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; }; - 46A15FE71807A56F005B8026 /* CDOpenALSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; }; - 46A15FE81807A56F005B8026 /* CDOpenALSupport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; }; - 46A15FE91807A56F005B8026 /* CocosDenshion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; }; - 46A15FEA1807A56F005B8026 /* CocosDenshion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; }; - 46A15FEB1807A56F005B8026 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; - 46A15FEC1807A56F005B8026 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; - 46A15FED1807A56F005B8026 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; - 46A15FF41807A56F005B8026 /* CDAudioManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; - 46A15FF51807A56F005B8026 /* CDAudioManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; }; - 46A15FF61807A56F005B8026 /* CDConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; }; - 46A15FF71807A56F005B8026 /* CDOpenALSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; }; - 46A15FF81807A56F005B8026 /* CDOpenALSupport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; }; - 46A15FF91807A56F005B8026 /* CDXMacOSXSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDXMacOSXSupport.h; sourceTree = ""; }; - 46A15FFA1807A56F005B8026 /* CDXMacOSXSupport.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CDXMacOSXSupport.mm; sourceTree = ""; }; - 46A15FFB1807A56F005B8026 /* CocosDenshion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; }; - 46A15FFC1807A56F005B8026 /* CocosDenshion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; }; - 46A15FFD1807A56F005B8026 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; - 46A15FFE1807A56F005B8026 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; - 46A15FFF1807A56F005B8026 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; - 46A167D21807AF4D005B8026 /* cocos-ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "cocos-ext.h"; sourceTree = ""; }; - 46A168321807AF4E005B8026 /* ExtensionMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtensionMacros.h; sourceTree = ""; }; - 46A168351807AF4E005B8026 /* CCControl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; }; - 46A168361807AF4E005B8026 /* CCControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; }; - 46A168371807AF4E005B8026 /* CCControlButton.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; }; - 46A168381807AF4E005B8026 /* CCControlButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlButton.h; sourceTree = ""; }; - 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlColourPicker.cpp; sourceTree = ""; }; - 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlColourPicker.h; sourceTree = ""; }; - 46A1683B1807AF4E005B8026 /* CCControlExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlExtensions.h; sourceTree = ""; }; - 46A1683C1807AF4E005B8026 /* CCControlHuePicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlHuePicker.cpp; sourceTree = ""; }; - 46A1683D1807AF4E005B8026 /* CCControlHuePicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlHuePicker.h; sourceTree = ""; }; - 46A1683E1807AF4E005B8026 /* CCControlPotentiometer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlPotentiometer.cpp; sourceTree = ""; }; - 46A1683F1807AF4E005B8026 /* CCControlPotentiometer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlPotentiometer.h; sourceTree = ""; }; - 46A168401807AF4E005B8026 /* CCControlSaturationBrightnessPicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSaturationBrightnessPicker.cpp; sourceTree = ""; }; - 46A168411807AF4E005B8026 /* CCControlSaturationBrightnessPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlSaturationBrightnessPicker.h; sourceTree = ""; }; - 46A168421807AF4E005B8026 /* CCControlSlider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSlider.cpp; sourceTree = ""; }; - 46A168431807AF4E005B8026 /* CCControlSlider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlSlider.h; sourceTree = ""; }; - 46A168441807AF4E005B8026 /* CCControlStepper.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlStepper.cpp; sourceTree = ""; }; - 46A168451807AF4E005B8026 /* CCControlStepper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlStepper.h; sourceTree = ""; }; - 46A168461807AF4E005B8026 /* CCControlSwitch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSwitch.cpp; sourceTree = ""; }; - 46A168471807AF4E005B8026 /* CCControlSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlSwitch.h; sourceTree = ""; }; - 46A168481807AF4E005B8026 /* CCControlUtils.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlUtils.cpp; sourceTree = ""; }; - 46A168491807AF4E005B8026 /* CCControlUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlUtils.h; sourceTree = ""; }; - 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCInvocation.cpp; sourceTree = ""; }; - 46A1684B1807AF4E005B8026 /* CCInvocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; - 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCScrollView.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 46A1685F1807AF4E005B8026 /* CCScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; - 46A168621807AF4E005B8026 /* CCTableView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; - 46A168631807AF4E005B8026 /* CCTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = ""; }; - 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = ""; }; - 46A168651807AF4E005B8026 /* CCTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = ""; }; - 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsBody.cpp; sourceTree = ""; }; - 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsBody.h; sourceTree = ""; }; - 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContact.cpp; sourceTree = ""; }; - 46A170711807CE7A005B8026 /* CCPhysicsContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsContact.h; sourceTree = ""; }; - 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsJoint.cpp; sourceTree = ""; }; - 46A170731807CE7A005B8026 /* CCPhysicsJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsJoint.h; sourceTree = ""; }; - 46A170751807CE7A005B8026 /* CCPhysicsShape.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsShape.cpp; sourceTree = ""; }; - 46A170761807CE7A005B8026 /* CCPhysicsShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsShape.h; sourceTree = ""; }; - 46A170771807CE7A005B8026 /* CCPhysicsWorld.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsWorld.cpp; sourceTree = ""; }; - 46A170781807CE7A005B8026 /* CCPhysicsWorld.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorld.h; sourceTree = ""; }; + 46AF3A0021F1877100D5AFCD /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + 46AF3A0121F1877100D5AFCD /* CCPhysicsWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsWorld.cpp; sourceTree = ""; }; + 46AF3A0221F1877100D5AFCD /* CCPhysicsBody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsBody.cpp; sourceTree = ""; }; + 46AF3A0321F1877100D5AFCD /* CCPhysicsShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsShape.cpp; sourceTree = ""; }; + 46AF3A0421F1877100D5AFCD /* CCPhysicsContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsContact.h; sourceTree = ""; }; + 46AF3A0521F1877100D5AFCD /* CCPhysicsWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorld.h; sourceTree = ""; }; + 46AF3A0621F1877100D5AFCD /* CCPhysicsContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContact.cpp; sourceTree = ""; }; + 46AF3A0721F1877100D5AFCD /* CCPhysicsBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsBody.h; sourceTree = ""; }; + 46AF3A0821F1877100D5AFCD /* cpCompat62.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpCompat62.h; sourceTree = ""; }; + 46AF3A0921F1877100D5AFCD /* CCPhysicsShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsShape.h; sourceTree = ""; }; + 46AF3A0A21F1877100D5AFCD /* CCPhysicsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsHelper.h; sourceTree = ""; }; + 46AF3A0B21F1877100D5AFCD /* CCPhysicsJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsJoint.h; sourceTree = ""; }; + 46AF3A0C21F1877100D5AFCD /* CCPhysicsJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsJoint.cpp; sourceTree = ""; }; + 46BD387221D35727002BD50F /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; + 46BD387421D35750002BD50F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + 46BD387621D35867002BD50F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; }; 46BDE4A71FA32D3400104C05 /* libbox2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbox2d.a; path = ../external/Box2D/prebuilt/mac/libbox2d.a; sourceTree = ""; }; 46BDE4A91FA3316A00104C05 /* libbox2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbox2d.a; path = ../external/Box2D/prebuilt/ios/libbox2d.a; sourceTree = ""; }; - 46BDE4B11FA86C7F00104C05 /* Array.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Array.c; sourceTree = ""; }; - 46BDE4B21FA86C7F00104C05 /* Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Array.h; sourceTree = ""; }; - 46BDE4B31FA86C7F00104C05 /* ClippingAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ClippingAttachment.c; sourceTree = ""; }; - 46BDE4B41FA86C7F00104C05 /* ClippingAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClippingAttachment.h; sourceTree = ""; }; - 46BDE4B51FA86C7F00104C05 /* Color.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Color.c; sourceTree = ""; }; - 46BDE4B61FA86C7F00104C05 /* Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Color.h; sourceTree = ""; }; - 46BDE4B71FA86C7F00104C05 /* dll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dll.h; sourceTree = ""; }; - 46BDE4B81FA86C7F00104C05 /* PointAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PointAttachment.c; sourceTree = ""; }; - 46BDE4B91FA86C7F00104C05 /* PointAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PointAttachment.h; sourceTree = ""; }; - 46BDE4BA1FA86C7F00104C05 /* SkeletonClipping.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonClipping.c; sourceTree = ""; }; - 46BDE4BB1FA86C7F00104C05 /* SkeletonClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonClipping.h; sourceTree = ""; }; - 46BDE4BC1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonTwoColorBatch.cpp; sourceTree = ""; }; - 46BDE4BD1FA86C7F00104C05 /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonTwoColorBatch.h; sourceTree = ""; }; - 46BDE4BE1FA86C7F00104C05 /* Triangulator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Triangulator.c; sourceTree = ""; }; - 46BDE4BF1FA86C7F00104C05 /* Triangulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Triangulator.h; sourceTree = ""; }; - 46BDE4C01FA86C7F00104C05 /* VertexEffect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VertexEffect.c; sourceTree = ""; }; - 46BDE4C11FA86C7F00104C05 /* VertexEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexEffect.h; sourceTree = ""; }; 46C02E0518E91123004B7456 /* xxhash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xxhash.c; sourceTree = ""; }; 46C02E0618E91123004B7456 /* xxhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xxhash.h; sourceTree = ""; }; + 46D3D45921DE014500EF5E75 /* BufferManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = BufferManager.mm; sourceTree = ""; }; + 46D3D45A21DE014500EF5E75 /* BufferManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BufferManager.h; sourceTree = ""; }; + 46D3D48921E6E8F700EF5E75 /* SimpleAudioEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleAudioEngine.cpp; sourceTree = ""; }; + 46E21B4521B900C900430A43 /* StringUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringUtils.cpp; sourceTree = ""; }; + 46E21B4621B900C900430A43 /* StringUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringUtils.h; sourceTree = ""; }; 46E7207B1ECAC75C0034BEC7 /* ccShader_ETC1AS_PositionTextureColor.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_ETC1AS_PositionTextureColor.frag; sourceTree = ""; }; 46E7207C1ECAC75C0034BEC7 /* ccShader_ETC1AS_PositionTextureGray.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_ETC1AS_PositionTextureGray.frag; sourceTree = ""; }; 46E7207E1ECAC75C0034BEC7 /* ccShader_Position.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_Position.vert; sourceTree = ""; }; 46E7207F1ECACB750034BEC7 /* ccShader_LayerRadialGradient.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_LayerRadialGradient.frag; sourceTree = ""; }; - 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimelineNode.cpp; sourceTree = ""; }; - 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimelineNode.h; sourceTree = ""; }; + 46F9B31221AFE64B009DF858 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + 46F9B31321AFE64B009DF858 /* ExtensionMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionMacros.h; sourceTree = ""; }; + 46F9B45421AFE64B009DF858 /* cocos-ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cocos-ext.h"; sourceTree = ""; }; + 46F9B47021AFE64C009DF858 /* CCTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = ""; }; + 46F9B47121AFE64C009DF858 /* CCTableView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; + 46F9B47321AFE64C009DF858 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = ""; }; + 46F9B47421AFE64C009DF858 /* CCTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = ""; }; + 46F9B47521AFE64C009DF858 /* ExtensionExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionExport.h; sourceTree = ""; }; + 46F9B72E21AFE7BF009DF858 /* CCScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; + 46F9B72F21AFE7C0009DF858 /* CCScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollView.cpp; sourceTree = ""; }; + 46F9B73721B0CB44009DF858 /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; + 46F9B73A21B0CB44009DF858 /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; + 46F9B73B21B0CB44009DF858 /* UIWebView-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebView-inl.h"; sourceTree = ""; }; + 46F9B73D21B0CB44009DF858 /* UIWebViewImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebViewImpl-ios.h"; sourceTree = ""; }; + 46F9B74021B0CB44009DF858 /* UIWebViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIWebViewImpl-ios.mm"; sourceTree = ""; }; 5012168C1AC47380009A4BEA /* CCRenderState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRenderState.cpp; sourceTree = ""; }; 5012168D1AC47380009A4BEA /* CCRenderState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderState.h; sourceTree = ""; }; 501216921AC47393009A4BEA /* CCPass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPass.cpp; sourceTree = ""; }; @@ -5174,88 +2930,8 @@ 501216991AC473A3009A4BEA /* CCTechnique.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTechnique.h; sourceTree = ""; }; 5012169E1AC473AD009A4BEA /* CCMaterial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMaterial.cpp; sourceTree = ""; }; 5012169F1AC473AD009A4BEA /* CCMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMaterial.h; sourceTree = ""; }; - 5020A1051D49912500E80C72 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Animation.c; sourceTree = ""; }; - 5020A1061D49912500E80C72 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Animation.h; sourceTree = ""; }; - 5020A1071D49912500E80C72 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AnimationState.c; sourceTree = ""; }; - 5020A1081D49912500E80C72 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationState.h; sourceTree = ""; }; - 5020A1091D49912500E80C72 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AnimationStateData.c; sourceTree = ""; }; - 5020A10A1D49912500E80C72 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationStateData.h; sourceTree = ""; }; - 5020A10B1D49912500E80C72 /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Atlas.c; sourceTree = ""; }; - 5020A10C1D49912500E80C72 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 5020A10D1D49912500E80C72 /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AtlasAttachmentLoader.c; sourceTree = ""; }; - 5020A10E1D49912500E80C72 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasAttachmentLoader.h; sourceTree = ""; }; - 5020A10F1D49912500E80C72 /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Attachment.c; sourceTree = ""; }; - 5020A1101D49912500E80C72 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attachment.h; sourceTree = ""; }; - 5020A1111D49912500E80C72 /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AttachmentLoader.c; sourceTree = ""; }; - 5020A1121D49912500E80C72 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentLoader.h; sourceTree = ""; }; - 5020A1131D49912500E80C72 /* AttachmentVertices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttachmentVertices.cpp; sourceTree = ""; }; - 5020A1141D49912500E80C72 /* AttachmentVertices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentVertices.h; sourceTree = ""; }; - 5020A1151D49912500E80C72 /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Bone.c; sourceTree = ""; }; - 5020A1161D49912500E80C72 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bone.h; sourceTree = ""; }; - 5020A1171D49912500E80C72 /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BoneData.c; sourceTree = ""; }; - 5020A1181D49912500E80C72 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoneData.h; sourceTree = ""; }; - 5020A1191D49912500E80C72 /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BoundingBoxAttachment.c; sourceTree = ""; }; - 5020A11A1D49912500E80C72 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundingBoxAttachment.h; sourceTree = ""; }; - 5020A11B1D49912500E80C72 /* Cocos2dAttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cocos2dAttachmentLoader.cpp; sourceTree = ""; }; - 5020A11C1D49912500E80C72 /* Cocos2dAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cocos2dAttachmentLoader.h; sourceTree = ""; }; - 5020A11D1D49912500E80C72 /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Event.c; sourceTree = ""; }; - 5020A11E1D49912500E80C72 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; - 5020A11F1D49912500E80C72 /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = EventData.c; sourceTree = ""; }; - 5020A1201D49912500E80C72 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventData.h; sourceTree = ""; }; - 5020A1211D49912500E80C72 /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = extension.c; sourceTree = ""; }; - 5020A1221D49912500E80C72 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extension.h; sourceTree = ""; }; - 5020A1231D49912500E80C72 /* IkConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IkConstraint.c; sourceTree = ""; }; - 5020A1241D49912500E80C72 /* IkConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraint.h; sourceTree = ""; }; - 5020A1251D49912500E80C72 /* IkConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IkConstraintData.c; sourceTree = ""; }; - 5020A1261D49912500E80C72 /* IkConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraintData.h; sourceTree = ""; }; - 5020A1271D49912500E80C72 /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Json.c; sourceTree = ""; }; - 5020A1281D49912500E80C72 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Json.h; sourceTree = ""; }; - 5020A1291D49912500E80C72 /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MeshAttachment.c; sourceTree = ""; }; - 5020A12A1D49912500E80C72 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeshAttachment.h; sourceTree = ""; }; - 5020A12B1D49912500E80C72 /* PathAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PathAttachment.c; sourceTree = ""; }; - 5020A12C1D49912500E80C72 /* PathAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathAttachment.h; sourceTree = ""; }; - 5020A12D1D49912500E80C72 /* PathConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PathConstraint.c; sourceTree = ""; }; - 5020A12E1D49912500E80C72 /* PathConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraint.h; sourceTree = ""; }; - 5020A12F1D49912500E80C72 /* PathConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PathConstraintData.c; sourceTree = ""; }; - 5020A1301D49912500E80C72 /* PathConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraintData.h; sourceTree = ""; }; - 5020A1311D49912500E80C72 /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RegionAttachment.c; sourceTree = ""; }; - 5020A1321D49912500E80C72 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegionAttachment.h; sourceTree = ""; }; - 5020A1331D49912500E80C72 /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Skeleton.c; sourceTree = ""; }; - 5020A1341D49912500E80C72 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skeleton.h; sourceTree = ""; }; - 5020A1351D49912500E80C72 /* SkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonAnimation.cpp; sourceTree = ""; }; - 5020A1361D49912500E80C72 /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonAnimation.h; sourceTree = ""; }; - 5020A1371D49912500E80C72 /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonBatch.cpp; sourceTree = ""; }; - 5020A1381D49912500E80C72 /* SkeletonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBatch.h; sourceTree = ""; }; - 5020A1391D49912500E80C72 /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonBounds.c; sourceTree = ""; }; - 5020A13A1D49912500E80C72 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBounds.h; sourceTree = ""; }; - 5020A13B1D49912500E80C72 /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonData.c; sourceTree = ""; }; - 5020A13C1D49912500E80C72 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonData.h; sourceTree = ""; }; - 5020A13D1D49912500E80C72 /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonJson.c; sourceTree = ""; }; - 5020A13E1D49912500E80C72 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonJson.h; sourceTree = ""; }; - 5020A13F1D49912500E80C72 /* SkeletonRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRenderer.cpp; sourceTree = ""; }; - 5020A1401D49912500E80C72 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonRenderer.h; sourceTree = ""; }; - 5020A1411D49912500E80C72 /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Skin.c; sourceTree = ""; }; - 5020A1421D49912500E80C72 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skin.h; sourceTree = ""; }; - 5020A1431D49912500E80C72 /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Slot.c; sourceTree = ""; }; - 5020A1441D49912500E80C72 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slot.h; sourceTree = ""; }; - 5020A1451D49912500E80C72 /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SlotData.c; sourceTree = ""; }; - 5020A1461D49912500E80C72 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotData.h; sourceTree = ""; }; - 5020A1471D49912500E80C72 /* spine-cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "spine-cocos2dx.cpp"; sourceTree = ""; }; - 5020A1481D49912500E80C72 /* spine-cocos2dx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "spine-cocos2dx.h"; sourceTree = ""; }; - 5020A1491D49912500E80C72 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spine.h; sourceTree = ""; }; - 5020A14A1D49912500E80C72 /* TransformConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TransformConstraint.c; sourceTree = ""; }; - 5020A14B1D49912500E80C72 /* TransformConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformConstraint.h; sourceTree = ""; }; - 5020A14C1D49912500E80C72 /* TransformConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TransformConstraintData.c; sourceTree = ""; }; - 5020A14D1D49912500E80C72 /* TransformConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformConstraintData.h; sourceTree = ""; }; - 5020A14E1D49912500E80C72 /* VertexAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VertexAttachment.c; sourceTree = ""; }; - 5020A14F1D49912500E80C72 /* VertexAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexAttachment.h; sourceTree = ""; }; 50272538190BF1B900AAF4ED /* cocos2d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cocos2d.h; path = ../cocos/cocos2d.h; sourceTree = ""; }; 50272539190BF1B900AAF4ED /* cocos2d.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cocos2d.cpp; path = ../cocos/cocos2d.cpp; sourceTree = ""; }; - 502AF9771D0711B8006AF256 /* CCVRGenericHeadTracker.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = CCVRGenericHeadTracker.cpp; sourceTree = ""; }; - 5030C03E1CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVRGenericHeadTracker.h; sourceTree = ""; }; - 503341961D9DC7B400770EC7 /* kvec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = kvec.h; sourceTree = ""; }; - 503341971D9DC7B400770EC7 /* SkeletonBinary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonBinary.c; sourceTree = ""; }; - 503341981D9DC7B400770EC7 /* SkeletonBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBinary.h; sourceTree = ""; }; 5034C9FB191D591000CE6051 /* ccShader_PositionTextureColorAlphaTest.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColorAlphaTest.frag; sourceTree = ""; }; 5034CA00191D591000CE6051 /* ccShader_PositionTextureA8Color.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureA8Color.vert; sourceTree = ""; }; 5034CA01191D591000CE6051 /* ccShader_PositionTextureA8Color.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureA8Color.frag; sourceTree = ""; }; @@ -5278,10 +2954,6 @@ 5034CA61191D91CF00CE6051 /* ccShader_PositionTextureColor.frag */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor.frag; sourceTree = ""; }; 5034CA62191D91CF00CE6051 /* ccShader_PositionTextureColor_noMVP.vert */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor_noMVP.vert; sourceTree = ""; }; 5034CA63191D91CF00CE6051 /* ccShader_PositionTextureColor_noMVP.frag */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor_noMVP.frag; sourceTree = ""; }; - 503D4F611CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVRDistortionMesh.cpp; sourceTree = ""; }; - 503D4F621CE29D4E0054A2D1 /* CCVRDistortionMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVRDistortionMesh.h; sourceTree = ""; }; - 503D4F691CE2BDBE0054A2D1 /* CCVRDistortion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVRDistortion.cpp; sourceTree = ""; }; - 503D4F6A1CE2BDBE0054A2D1 /* CCVRDistortion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVRDistortion.h; sourceTree = ""; }; 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCApplication-ios.h"; sourceTree = ""; }; 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCApplication-ios.mm"; sourceTree = ""; }; 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCCommon-ios.mm"; sourceTree = ""; }; @@ -5290,9 +2962,6 @@ 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDirectorCaller-ios.mm"; sourceTree = ""; }; 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCEAGLView-ios.h"; sourceTree = ""; }; 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCEAGLView-ios.mm"; sourceTree = ""; }; - 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCES2Renderer-ios.h"; sourceTree = ""; }; - 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CCES2Renderer-ios.m"; sourceTree = ""; }; - 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCESRenderer-ios.h"; sourceTree = ""; }; 503DD8D91926736A00CD74DD /* CCGL-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGL-ios.h"; sourceTree = ""; }; 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGLViewImpl-ios.h"; sourceTree = ""; }; 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCGLViewImpl-ios.mm"; sourceTree = ""; }; @@ -5310,16 +2979,11 @@ 50643BD319BFAECF00EF68ED /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; 50643BD719BFAF4400EF68ED /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; 50643BD819BFAF4400EF68ED /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; - 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "LocalStorage-android.cpp"; sourceTree = ""; }; 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformConfig.h; sourceTree = ""; }; 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformMacros.h; sourceTree = ""; }; 50693C5C1B6BF2AE005C5820 /* CCDownloader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDownloader.cpp; sourceTree = ""; }; 50693C5D1B6BF2AE005C5820 /* CCDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDownloader.h; sourceTree = ""; }; - 507003161B69735200E83DDD /* HttpClient-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "HttpClient-android.cpp"; sourceTree = ""; }; - 507003171B69735200E83DDD /* HttpClient-winrt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "HttpClient-winrt.cpp"; sourceTree = ""; }; 507003181B69735200E83DDD /* HttpClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpClient.cpp; sourceTree = ""; }; - 507003191B69735200E83DDD /* HttpConnection-winrt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "HttpConnection-winrt.cpp"; sourceTree = ""; }; - 5070031A1B69735200E83DDD /* HttpConnection-winrt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HttpConnection-winrt.h"; sourceTree = ""; }; 507B40FD1C31BDD30067B53E /* libcocos2d tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2d tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 50864C6D1C7BC1B000B3BAB1 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; }; 50864C6E1C7BC1B000B3BAB1 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; }; @@ -5351,7 +3015,6 @@ 50864C881C7BC1B000B3BAB1 /* cpSpatialIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSpatialIndex.h; sourceTree = ""; }; 50864C891C7BC1B000B3BAB1 /* cpTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpTransform.h; sourceTree = ""; }; 50864C8A1C7BC1B000B3BAB1 /* cpVect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = ""; }; - 50864CE61C7BC90A00B3BAB1 /* cpCompat62.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpCompat62.h; sourceTree = ""; }; 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = ""; }; 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAffineTransform.cpp; sourceTree = ""; }; 50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAffineTransform.h; sourceTree = ""; }; @@ -5382,8 +3045,6 @@ 50ABBD351925AB0000A911A9 /* Vec4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vec4.cpp; sourceTree = ""; }; 50ABBD361925AB0000A911A9 /* Vec4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vec4.h; sourceTree = ""; }; 50ABBD371925AB0000A911A9 /* Vec4.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Vec4.inl; sourceTree = ""; }; - 50ABBD641925AB4100A911A9 /* CCBatchCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBatchCommand.cpp; sourceTree = ""; }; - 50ABBD651925AB4100A911A9 /* CCBatchCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBatchCommand.h; sourceTree = ""; }; 50ABBD661925AB4100A911A9 /* CCCustomCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCustomCommand.cpp; sourceTree = ""; }; 50ABBD671925AB4100A911A9 /* CCCustomCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCustomCommand.h; sourceTree = ""; }; 50ABBD681925AB4100A911A9 /* CCGLProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGLProgram.cpp; sourceTree = ""; }; @@ -5401,8 +3062,6 @@ 50ABBD761925AB4100A911A9 /* CCRenderCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRenderCommand.cpp; sourceTree = ""; }; 50ABBD771925AB4100A911A9 /* CCRenderCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderCommand.h; sourceTree = ""; }; 50ABBD781925AB4100A911A9 /* CCRenderCommandPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderCommandPool.h; sourceTree = ""; }; - 50ABBD791925AB4100A911A9 /* CCRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRenderer.cpp; sourceTree = ""; }; - 50ABBD7A1925AB4100A911A9 /* CCRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderer.h; sourceTree = ""; }; 50ABBD7B1925AB4100A911A9 /* ccShaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ccShaders.cpp; sourceTree = ""; }; 50ABBD7C1925AB4100A911A9 /* ccShaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ccShaders.h; sourceTree = ""; }; 50ABBD7D1925AB4100A911A9 /* CCTexture2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTexture2D.cpp; sourceTree = ""; }; @@ -5426,8 +3085,6 @@ 50ABBDCD1925AB6E00A911A9 /* CCConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCConsole.h; path = ../base/CCConsole.h; sourceTree = ""; }; 50ABBDCE1925AB6E00A911A9 /* CCData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCData.cpp; path = ../base/CCData.cpp; sourceTree = ""; }; 50ABBDCF1925AB6E00A911A9 /* CCData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCData.h; path = ../base/CCData.h; sourceTree = ""; }; - 50ABBDD01925AB6E00A911A9 /* CCDataVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCDataVisitor.cpp; path = ../base/CCDataVisitor.cpp; sourceTree = ""; }; - 50ABBDD11925AB6E00A911A9 /* CCDataVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCDataVisitor.h; path = ../base/CCDataVisitor.h; sourceTree = ""; }; 50ABBDD21925AB6E00A911A9 /* CCDirector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCDirector.cpp; path = ../base/CCDirector.cpp; sourceTree = ""; }; 50ABBDD31925AB6E00A911A9 /* CCDirector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCDirector.h; path = ../base/CCDirector.h; sourceTree = ""; }; 50ABBDD41925AB6E00A911A9 /* CCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCEvent.cpp; path = ../base/CCEvent.cpp; sourceTree = ""; }; @@ -5507,7 +3164,6 @@ 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCFileUtils-apple.mm"; sourceTree = ""; }; 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCLock-apple.cpp"; sourceTree = ""; }; 50ABBF1E1926664700A911A9 /* CCLock-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCLock-apple.h"; sourceTree = ""; }; - 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCThread-apple.mm"; sourceTree = ""; }; 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplicationProtocol.h; sourceTree = ""; }; 50ABBF211926664700A911A9 /* CCCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCommon.h; sourceTree = ""; }; 50ABBF221926664700A911A9 /* CCDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDevice.h; sourceTree = ""; }; @@ -5519,10 +3175,6 @@ 50ABBF281926664700A911A9 /* CCImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCImage.h; sourceTree = ""; }; 50ABBF291926664700A911A9 /* CCSAXParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSAXParser.cpp; sourceTree = ""; }; 50ABBF2A1926664700A911A9 /* CCSAXParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSAXParser.h; sourceTree = ""; }; - 50ABBF2B1926664700A911A9 /* CCThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCThread.cpp; sourceTree = ""; }; - 50ABBF2C1926664700A911A9 /* CCThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCThread.h; sourceTree = ""; }; - 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCGLViewImpl-desktop.cpp"; sourceTree = ""; }; - 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGLViewImpl-desktop.h"; sourceTree = ""; }; 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCApplication-mac.h"; sourceTree = ""; }; 50ABBF501926664700A911A9 /* CCApplication-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCApplication-mac.mm"; sourceTree = ""; }; 50ABBF511926664700A911A9 /* CCCommon-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCCommon-mac.mm"; sourceTree = ""; }; @@ -5539,73 +3191,23 @@ 50CE4D1D1D243DD8003D2FB9 /* glfw3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glfw3.h; sourceTree = ""; }; 50CE4D1E1D243DD8003D2FB9 /* glfw3native.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glfw3native.h; sourceTree = ""; }; 50DC5180187B817900A9C23F /* RELEASE_NOTES.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = RELEASE_NOTES.md; path = ../docs/RELEASE_NOTES.md; sourceTree = ""; }; - 50E6D32E18E174130051CA34 /* UIHBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIHBox.cpp; sourceTree = ""; }; - 50E6D32F18E174130051CA34 /* UIHBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHBox.h; sourceTree = ""; }; - 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRelativeBox.cpp; sourceTree = ""; }; - 50E6D33118E174130051CA34 /* UIRelativeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRelativeBox.h; sourceTree = ""; }; - 50E6D33218E174130051CA34 /* UIVBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVBox.cpp; sourceTree = ""; }; - 50E6D33318E174130051CA34 /* UIVBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVBox.h; sourceTree = ""; }; - 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-win32.h"; sourceTree = ""; }; - 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-win32.cpp"; sourceTree = ""; }; - 50F9654E1CD0360000ADE813 /* CCVRGenericRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVRGenericRenderer.cpp; sourceTree = ""; }; - 50F9654F1CD0360000ADE813 /* CCVRGenericRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVRGenericRenderer.h; sourceTree = ""; }; - 50F965501CD0360000ADE813 /* CCVRProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVRProtocol.h; sourceTree = ""; }; - 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonReader.cpp; sourceTree = ""; }; - 50FCEB6B18C72017004AD434 /* ButtonReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonReader.h; sourceTree = ""; }; - 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckBoxReader.cpp; sourceTree = ""; }; - 50FCEB6E18C72017004AD434 /* CheckBoxReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckBoxReader.h; sourceTree = ""; }; - 50FCEB7018C72017004AD434 /* ImageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageViewReader.cpp; sourceTree = ""; }; - 50FCEB7118C72017004AD434 /* ImageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageViewReader.h; sourceTree = ""; }; - 50FCEB7318C72017004AD434 /* LayoutReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutReader.cpp; sourceTree = ""; }; - 50FCEB7418C72017004AD434 /* LayoutReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutReader.h; sourceTree = ""; }; - 50FCEB7618C72017004AD434 /* ListViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListViewReader.cpp; sourceTree = ""; }; - 50FCEB7718C72017004AD434 /* ListViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListViewReader.h; sourceTree = ""; }; - 50FCEB7918C72017004AD434 /* LoadingBarReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadingBarReader.cpp; sourceTree = ""; }; - 50FCEB7A18C72017004AD434 /* LoadingBarReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingBarReader.h; sourceTree = ""; }; - 50FCEB7C18C72017004AD434 /* PageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageViewReader.cpp; sourceTree = ""; }; - 50FCEB7D18C72017004AD434 /* PageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageViewReader.h; sourceTree = ""; }; - 50FCEB7F18C72017004AD434 /* ScrollViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollViewReader.cpp; sourceTree = ""; }; - 50FCEB8018C72017004AD434 /* ScrollViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewReader.h; sourceTree = ""; }; - 50FCEB8218C72017004AD434 /* SliderReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SliderReader.cpp; sourceTree = ""; }; - 50FCEB8318C72017004AD434 /* SliderReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderReader.h; sourceTree = ""; }; - 50FCEB8518C72017004AD434 /* TextAtlasReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextAtlasReader.cpp; sourceTree = ""; }; - 50FCEB8618C72017004AD434 /* TextAtlasReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextAtlasReader.h; sourceTree = ""; }; - 50FCEB8818C72017004AD434 /* TextBMFontReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBMFontReader.cpp; sourceTree = ""; }; - 50FCEB8918C72017004AD434 /* TextBMFontReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBMFontReader.h; sourceTree = ""; }; - 50FCEB8B18C72017004AD434 /* TextFieldReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextFieldReader.cpp; sourceTree = ""; }; - 50FCEB8C18C72017004AD434 /* TextFieldReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextFieldReader.h; sourceTree = ""; }; - 50FCEB8E18C72017004AD434 /* TextReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextReader.cpp; sourceTree = ""; }; - 50FCEB8F18C72017004AD434 /* TextReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextReader.h; sourceTree = ""; }; - 50FCEB9018C72017004AD434 /* WidgetReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetReader.cpp; sourceTree = ""; }; - 50FCEB9118C72017004AD434 /* WidgetReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetReader.h; sourceTree = ""; }; - 50FCEB9218C72017004AD434 /* WidgetReaderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetReaderProtocol.h; sourceTree = ""; }; 52B47A291A5349A3004E4C60 /* HttpAsynConnection-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HttpAsynConnection-apple.h"; sourceTree = ""; }; 52B47A2A1A5349A3004E4C60 /* HttpAsynConnection-apple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HttpAsynConnection-apple.m"; sourceTree = ""; }; 52B47A2B1A5349A3004E4C60 /* HttpClient-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "HttpClient-apple.mm"; sourceTree = ""; }; 52B47A2C1A5349A3004E4C60 /* HttpCookie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpCookie.cpp; sourceTree = ""; }; 52B47A2D1A5349A3004E4C60 /* HttpCookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpCookie.h; sourceTree = ""; }; - 5E9F61221A3FFE3D0038DE01 /* CCFrustum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFrustum.cpp; sourceTree = ""; }; - 5E9F61231A3FFE3D0038DE01 /* CCFrustum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFrustum.h; sourceTree = ""; }; - 5E9F61241A3FFE3D0038DE01 /* CCPlane.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPlane.cpp; sourceTree = ""; }; - 5E9F61251A3FFE3D0038DE01 /* CCPlane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlane.h; sourceTree = ""; }; 8525E3A11B291E42008EE815 /* clipper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = clipper.hpp; sourceTree = ""; }; 85B374381B204B9400C488D6 /* clipper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clipper.cpp; sourceTree = ""; }; - 94A6DF031C7303FD0094AEF7 /* LocalizationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalizationManager.cpp; sourceTree = ""; }; - 94A6DF041C7303FD0094AEF7 /* LocalizationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizationManager.h; sourceTree = ""; }; A045F6D41BA81577005076C7 /* CCTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTextureCube.cpp; sourceTree = ""; }; A045F6D51BA81577005076C7 /* CCTextureCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTextureCube.h; sourceTree = ""; }; A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCameraBackgroundBrush.cpp; sourceTree = ""; }; A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCameraBackgroundBrush.h; sourceTree = ""; }; - A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameNode3DReader.cpp; sourceTree = ""; }; - A045F6EE1BA81821005076C7 /* GameNode3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameNode3DReader.h; sourceTree = ""; }; A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDownloader-apple.h"; sourceTree = ""; }; A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDownloader-apple.mm"; sourceTree = ""; }; A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIDownloaderImpl.h; sourceTree = ""; }; A05DCF9B1B90584E00EE040B /* CCDownloader-curl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCDownloader-curl.cpp"; sourceTree = ""; }; A05DCF9C1B90584E00EE040B /* CCDownloader-curl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDownloader-curl.h"; sourceTree = ""; }; A07A4D641783777C0073F6A7 /* libcocos2d iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2d iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-common.cpp"; sourceTree = ""; }; - A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-common.h"; sourceTree = ""; }; B20564AA1A6E5744001C1B6E /* ccShader_PositionColorTextureAsPointsize.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionColorTextureAsPointsize.vert; sourceTree = ""; }; B217703B1977ECB4009EE11B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; B217703D1977ECC1009EE11B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; @@ -5618,18 +3220,12 @@ B217704C1977ED8B009EE11B /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTrianglesCommand.cpp; sourceTree = ""; }; B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTrianglesCommand.h; sourceTree = ""; }; - B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFrameBuffer.cpp; sourceTree = ""; }; - B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFrameBuffer.h; sourceTree = ""; }; B241A6E21AFB0BE700C5623C /* ccShader_CameraClear.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_CameraClear.frag; sourceTree = ""; }; B241A6E31AFB0BE700C5623C /* ccShader_CameraClear.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_CameraClear.vert; sourceTree = ""; }; B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFastTMXLayer.cpp; sourceTree = ""; }; B24AA982195A675C007B4522 /* CCFastTMXLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFastTMXLayer.h; sourceTree = ""; }; B24AA983195A675C007B4522 /* CCFastTMXTiledMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFastTMXTiledMap.cpp; sourceTree = ""; }; B24AA984195A675C007B4522 /* CCFastTMXTiledMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFastTMXTiledMap.h; sourceTree = ""; }; - B257B44C1989D5E800D9A687 /* CCPrimitive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPrimitive.cpp; sourceTree = ""; }; - B257B44D1989D5E800D9A687 /* CCPrimitive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPrimitive.h; sourceTree = ""; }; - B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPrimitiveCommand.cpp; sourceTree = ""; }; - B257B45F198A353E00D9A687 /* CCPrimitiveCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPrimitiveCommand.h; sourceTree = ""; }; B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexIndexData.h; sourceTree = ""; }; B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexIndexData.cpp; sourceTree = ""; }; B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexIndexBuffer.h; sourceTree = ""; }; @@ -5639,355 +3235,13 @@ B29594B11926D5D9003EEF37 /* ccShader_3D_PositionTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionTex.vert; sourceTree = ""; }; B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshCommand.cpp; sourceTree = ""; }; B29594B31926D5EC003EEF37 /* CCMeshCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMeshCommand.h; sourceTree = ""; }; - B5668D7B1B3838E4003CBD5E /* UIScrollViewBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewBar.cpp; sourceTree = ""; }; - B5668D7C1B3838E4003CBD5E /* UIScrollViewBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewBar.h; sourceTree = ""; }; - B5A738941BB0051F00BAAEF8 /* UIPageViewIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewIndicator.cpp; sourceTree = ""; }; - B5A738951BB0051F00BAAEF8 /* UIPageViewIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewIndicator.h; sourceTree = ""; }; - B5CE6DBC1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIAbstractCheckButton.cpp; sourceTree = ""; }; - B5CE6DBD1B3BF2B1002B0419 /* UIAbstractCheckButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAbstractCheckButton.h; sourceTree = ""; }; - B5CE6DC61B3C05BA002B0419 /* UIRadioButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRadioButton.cpp; sourceTree = ""; }; - B5CE6DC71B3C05BA002B0419 /* UIRadioButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRadioButton.h; sourceTree = ""; }; - B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTerrain.cpp; sourceTree = ""; }; - B603F1A71AC8EA0900A9579C /* CCTerrain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTerrain.h; sourceTree = ""; }; B603F1B11AC8F1FD00A9579C /* ccShader_3D_Terrain.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Terrain.frag; sourceTree = ""; }; B603F1B21AC8F1FD00A9579C /* ccShader_3D_Terrain.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Terrain.vert; sourceTree = ""; }; - B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBillBoard.cpp; sourceTree = ""; }; - B60C5BD319AC68B10056FBDE /* CCBillBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBillBoard.h; sourceTree = ""; }; B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCAsyncTaskPool.cpp; path = ../base/CCAsyncTaskPool.cpp; sourceTree = ""; }; B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCAsyncTaskPool.h; path = ../base/CCAsyncTaskPool.h; sourceTree = ""; }; - B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAffector.cpp; path = Particle3D/PU/CCPUAffector.cpp; sourceTree = ""; }; - B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAffector.h; path = Particle3D/PU/CCPUAffector.h; sourceTree = ""; }; - B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAffectorManager.cpp; path = Particle3D/PU/CCPUAffectorManager.cpp; sourceTree = ""; }; - B665E0CF1AA80A6500DDB1C5 /* CCPUAffectorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAffectorManager.h; path = Particle3D/PU/CCPUAffectorManager.h; sourceTree = ""; }; - B665E0D01AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAffectorTranslator.cpp; path = Particle3D/PU/CCPUAffectorTranslator.cpp; sourceTree = ""; }; - B665E0D11AA80A6500DDB1C5 /* CCPUAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAffectorTranslator.h; path = Particle3D/PU/CCPUAffectorTranslator.h; sourceTree = ""; }; - B665E0D21AA80A6500DDB1C5 /* CCPUAlignAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAlignAffector.cpp; path = Particle3D/PU/CCPUAlignAffector.cpp; sourceTree = ""; }; - B665E0D31AA80A6500DDB1C5 /* CCPUAlignAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAlignAffector.h; path = Particle3D/PU/CCPUAlignAffector.h; sourceTree = ""; }; - B665E0D41AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAlignAffectorTranslator.cpp; path = Particle3D/PU/CCPUAlignAffectorTranslator.cpp; sourceTree = ""; }; - B665E0D51AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAlignAffectorTranslator.h; path = Particle3D/PU/CCPUAlignAffectorTranslator.h; sourceTree = ""; }; - B665E0D61AA80A6500DDB1C5 /* CCPUBaseCollider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBaseCollider.cpp; path = Particle3D/PU/CCPUBaseCollider.cpp; sourceTree = ""; }; - B665E0D71AA80A6500DDB1C5 /* CCPUBaseCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBaseCollider.h; path = Particle3D/PU/CCPUBaseCollider.h; sourceTree = ""; }; - B665E0D81AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBaseColliderTranslator.cpp; path = Particle3D/PU/CCPUBaseColliderTranslator.cpp; sourceTree = ""; }; - B665E0D91AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBaseColliderTranslator.h; path = Particle3D/PU/CCPUBaseColliderTranslator.h; sourceTree = ""; }; - B665E0DA1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBaseForceAffector.cpp; path = Particle3D/PU/CCPUBaseForceAffector.cpp; sourceTree = ""; }; - B665E0DB1AA80A6500DDB1C5 /* CCPUBaseForceAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBaseForceAffector.h; path = Particle3D/PU/CCPUBaseForceAffector.h; sourceTree = ""; }; - B665E0DC1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBaseForceAffectorTranslator.cpp; path = Particle3D/PU/CCPUBaseForceAffectorTranslator.cpp; sourceTree = ""; }; - B665E0DD1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBaseForceAffectorTranslator.h; path = Particle3D/PU/CCPUBaseForceAffectorTranslator.h; sourceTree = ""; }; - B665E0DE1AA80A6500DDB1C5 /* CCPUBeamRender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBeamRender.cpp; path = Particle3D/PU/CCPUBeamRender.cpp; sourceTree = ""; }; - B665E0DF1AA80A6500DDB1C5 /* CCPUBeamRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBeamRender.h; path = Particle3D/PU/CCPUBeamRender.h; sourceTree = ""; }; - B665E0E01AA80A6500DDB1C5 /* CCPUBehaviour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBehaviour.cpp; path = Particle3D/PU/CCPUBehaviour.cpp; sourceTree = ""; }; - B665E0E11AA80A6500DDB1C5 /* CCPUBehaviour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBehaviour.h; path = Particle3D/PU/CCPUBehaviour.h; sourceTree = ""; }; - B665E0E21AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBehaviourManager.cpp; path = Particle3D/PU/CCPUBehaviourManager.cpp; sourceTree = ""; }; - B665E0E31AA80A6500DDB1C5 /* CCPUBehaviourManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBehaviourManager.h; path = Particle3D/PU/CCPUBehaviourManager.h; sourceTree = ""; }; - B665E0E41AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBehaviourTranslator.cpp; path = Particle3D/PU/CCPUBehaviourTranslator.cpp; sourceTree = ""; }; - B665E0E51AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBehaviourTranslator.h; path = Particle3D/PU/CCPUBehaviourTranslator.h; sourceTree = ""; }; - B665E0E61AA80A6500DDB1C5 /* CCPUBillboardChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBillboardChain.cpp; path = Particle3D/PU/CCPUBillboardChain.cpp; sourceTree = ""; }; - B665E0E71AA80A6500DDB1C5 /* CCPUBillboardChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBillboardChain.h; path = Particle3D/PU/CCPUBillboardChain.h; sourceTree = ""; }; - B665E0E81AA80A6500DDB1C5 /* CCPUBoxCollider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBoxCollider.cpp; path = Particle3D/PU/CCPUBoxCollider.cpp; sourceTree = ""; }; - B665E0E91AA80A6500DDB1C5 /* CCPUBoxCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBoxCollider.h; path = Particle3D/PU/CCPUBoxCollider.h; sourceTree = ""; }; - B665E0EA1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBoxColliderTranslator.cpp; path = Particle3D/PU/CCPUBoxColliderTranslator.cpp; sourceTree = ""; }; - B665E0EB1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBoxColliderTranslator.h; path = Particle3D/PU/CCPUBoxColliderTranslator.h; sourceTree = ""; }; - B665E0EC1AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBoxEmitter.cpp; path = Particle3D/PU/CCPUBoxEmitter.cpp; sourceTree = ""; }; - B665E0ED1AA80A6500DDB1C5 /* CCPUBoxEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBoxEmitter.h; path = Particle3D/PU/CCPUBoxEmitter.h; sourceTree = ""; }; - B665E0EE1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUBoxEmitterTranslator.cpp; path = Particle3D/PU/CCPUBoxEmitterTranslator.cpp; sourceTree = ""; }; - B665E0EF1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUBoxEmitterTranslator.h; path = Particle3D/PU/CCPUBoxEmitterTranslator.h; sourceTree = ""; }; - B665E0F01AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUCircleEmitter.cpp; path = Particle3D/PU/CCPUCircleEmitter.cpp; sourceTree = ""; }; - B665E0F11AA80A6500DDB1C5 /* CCPUCircleEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUCircleEmitter.h; path = Particle3D/PU/CCPUCircleEmitter.h; sourceTree = ""; }; - B665E0F21AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUCircleEmitterTranslator.cpp; path = Particle3D/PU/CCPUCircleEmitterTranslator.cpp; sourceTree = ""; }; - B665E0F31AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUCircleEmitterTranslator.h; path = Particle3D/PU/CCPUCircleEmitterTranslator.h; sourceTree = ""; }; - B665E0F41AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUCollisionAvoidanceAffector.cpp; path = Particle3D/PU/CCPUCollisionAvoidanceAffector.cpp; sourceTree = ""; }; - B665E0F51AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUCollisionAvoidanceAffector.h; path = Particle3D/PU/CCPUCollisionAvoidanceAffector.h; sourceTree = ""; }; - B665E0F61AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUCollisionAvoidanceAffectorTranslator.cpp; path = Particle3D/PU/CCPUCollisionAvoidanceAffectorTranslator.cpp; sourceTree = ""; }; - B665E0F71AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUCollisionAvoidanceAffectorTranslator.h; path = Particle3D/PU/CCPUCollisionAvoidanceAffectorTranslator.h; sourceTree = ""; }; - B665E0F81AA80A6500DDB1C5 /* CCPUColorAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUColorAffector.cpp; path = Particle3D/PU/CCPUColorAffector.cpp; sourceTree = ""; }; - B665E0F91AA80A6500DDB1C5 /* CCPUColorAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUColorAffector.h; path = Particle3D/PU/CCPUColorAffector.h; sourceTree = ""; }; - B665E0FA1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUColorAffectorTranslator.cpp; path = Particle3D/PU/CCPUColorAffectorTranslator.cpp; sourceTree = ""; }; - B665E0FB1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUColorAffectorTranslator.h; path = Particle3D/PU/CCPUColorAffectorTranslator.h; sourceTree = ""; }; - B665E0FC1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoAffectorEventHandler.cpp; path = Particle3D/PU/CCPUDoAffectorEventHandler.cpp; sourceTree = ""; }; - B665E0FD1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoAffectorEventHandler.h; path = Particle3D/PU/CCPUDoAffectorEventHandler.h; sourceTree = ""; }; - B665E0FE1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoAffectorEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoAffectorEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E0FF1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoAffectorEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoAffectorEventHandlerTranslator.h; sourceTree = ""; }; - B665E1001AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoEnableComponentEventHandler.cpp; path = Particle3D/PU/CCPUDoEnableComponentEventHandler.cpp; sourceTree = ""; }; - B665E1011AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoEnableComponentEventHandler.h; path = Particle3D/PU/CCPUDoEnableComponentEventHandler.h; sourceTree = ""; }; - B665E1021AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoEnableComponentEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoEnableComponentEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E1031AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoEnableComponentEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoEnableComponentEventHandlerTranslator.h; sourceTree = ""; }; - B665E1041AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoExpireEventHandler.cpp; path = Particle3D/PU/CCPUDoExpireEventHandler.cpp; sourceTree = ""; }; - B665E1051AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoExpireEventHandler.h; path = Particle3D/PU/CCPUDoExpireEventHandler.h; sourceTree = ""; }; - B665E1061AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoExpireEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoExpireEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E1071AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoExpireEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoExpireEventHandlerTranslator.h; sourceTree = ""; }; - B665E1081AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoFreezeEventHandler.cpp; path = Particle3D/PU/CCPUDoFreezeEventHandler.cpp; sourceTree = ""; }; - B665E1091AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoFreezeEventHandler.h; path = Particle3D/PU/CCPUDoFreezeEventHandler.h; sourceTree = ""; }; - B665E10A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoFreezeEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoFreezeEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E10B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoFreezeEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoFreezeEventHandlerTranslator.h; sourceTree = ""; }; - B665E10C1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoPlacementParticleEventHandler.cpp; path = Particle3D/PU/CCPUDoPlacementParticleEventHandler.cpp; sourceTree = ""; }; - B665E10D1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoPlacementParticleEventHandler.h; path = Particle3D/PU/CCPUDoPlacementParticleEventHandler.h; sourceTree = ""; }; - B665E10E1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoPlacementParticleEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoPlacementParticleEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E10F1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoPlacementParticleEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoPlacementParticleEventHandlerTranslator.h; sourceTree = ""; }; - B665E1101AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoScaleEventHandler.cpp; path = Particle3D/PU/CCPUDoScaleEventHandler.cpp; sourceTree = ""; }; - B665E1111AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoScaleEventHandler.h; path = Particle3D/PU/CCPUDoScaleEventHandler.h; sourceTree = ""; }; - B665E1121AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoScaleEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoScaleEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E1131AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoScaleEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoScaleEventHandlerTranslator.h; sourceTree = ""; }; - B665E1141AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoStopSystemEventHandler.cpp; path = Particle3D/PU/CCPUDoStopSystemEventHandler.cpp; sourceTree = ""; }; - B665E1151AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoStopSystemEventHandler.h; path = Particle3D/PU/CCPUDoStopSystemEventHandler.h; sourceTree = ""; }; - B665E1161AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDoStopSystemEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUDoStopSystemEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E1171AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDoStopSystemEventHandlerTranslator.h; path = Particle3D/PU/CCPUDoStopSystemEventHandlerTranslator.h; sourceTree = ""; }; - B665E1181AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDynamicAttribute.cpp; path = Particle3D/PU/CCPUDynamicAttribute.cpp; sourceTree = ""; }; - B665E1191AA80A6500DDB1C5 /* CCPUDynamicAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDynamicAttribute.h; path = Particle3D/PU/CCPUDynamicAttribute.h; sourceTree = ""; }; - B665E11A1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUDynamicAttributeTranslator.cpp; path = Particle3D/PU/CCPUDynamicAttributeTranslator.cpp; sourceTree = ""; }; - B665E11B1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUDynamicAttributeTranslator.h; path = Particle3D/PU/CCPUDynamicAttributeTranslator.h; sourceTree = ""; }; - B665E11C1AA80A6500DDB1C5 /* CCPUEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEmitter.cpp; path = Particle3D/PU/CCPUEmitter.cpp; sourceTree = ""; }; - B665E11D1AA80A6500DDB1C5 /* CCPUEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEmitter.h; path = Particle3D/PU/CCPUEmitter.h; sourceTree = ""; }; - B665E11E1AA80A6500DDB1C5 /* CCPUEmitterManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEmitterManager.cpp; path = Particle3D/PU/CCPUEmitterManager.cpp; sourceTree = ""; }; - B665E11F1AA80A6500DDB1C5 /* CCPUEmitterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEmitterManager.h; path = Particle3D/PU/CCPUEmitterManager.h; sourceTree = ""; }; - B665E1201AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEmitterTranslator.cpp; path = Particle3D/PU/CCPUEmitterTranslator.cpp; sourceTree = ""; }; - B665E1211AA80A6500DDB1C5 /* CCPUEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEmitterTranslator.h; path = Particle3D/PU/CCPUEmitterTranslator.h; sourceTree = ""; }; - B665E1221AA80A6500DDB1C5 /* CCPUEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEventHandler.cpp; path = Particle3D/PU/CCPUEventHandler.cpp; sourceTree = ""; }; - B665E1231AA80A6500DDB1C5 /* CCPUEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEventHandler.h; path = Particle3D/PU/CCPUEventHandler.h; sourceTree = ""; }; - B665E1241AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEventHandlerManager.cpp; path = Particle3D/PU/CCPUEventHandlerManager.cpp; sourceTree = ""; }; - B665E1251AA80A6500DDB1C5 /* CCPUEventHandlerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEventHandlerManager.h; path = Particle3D/PU/CCPUEventHandlerManager.h; sourceTree = ""; }; - B665E1261AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUEventHandlerTranslator.cpp; path = Particle3D/PU/CCPUEventHandlerTranslator.cpp; sourceTree = ""; }; - B665E1271AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUEventHandlerTranslator.h; path = Particle3D/PU/CCPUEventHandlerTranslator.h; sourceTree = ""; }; - B665E1281AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUFlockCenteringAffector.cpp; path = Particle3D/PU/CCPUFlockCenteringAffector.cpp; sourceTree = ""; }; - B665E1291AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUFlockCenteringAffector.h; path = Particle3D/PU/CCPUFlockCenteringAffector.h; sourceTree = ""; }; - B665E12A1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUFlockCenteringAffectorTranslator.cpp; path = Particle3D/PU/CCPUFlockCenteringAffectorTranslator.cpp; sourceTree = ""; }; - B665E12B1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUFlockCenteringAffectorTranslator.h; path = Particle3D/PU/CCPUFlockCenteringAffectorTranslator.h; sourceTree = ""; }; - B665E12C1AA80A6500DDB1C5 /* CCPUForceField.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUForceField.cpp; path = Particle3D/PU/CCPUForceField.cpp; sourceTree = ""; }; - B665E12D1AA80A6500DDB1C5 /* CCPUForceField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUForceField.h; path = Particle3D/PU/CCPUForceField.h; sourceTree = ""; }; - B665E12E1AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUForceFieldAffector.cpp; path = Particle3D/PU/CCPUForceFieldAffector.cpp; sourceTree = ""; }; - B665E12F1AA80A6500DDB1C5 /* CCPUForceFieldAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUForceFieldAffector.h; path = Particle3D/PU/CCPUForceFieldAffector.h; sourceTree = ""; }; - B665E1301AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUForceFieldAffectorTranslator.cpp; path = Particle3D/PU/CCPUForceFieldAffectorTranslator.cpp; sourceTree = ""; }; - B665E1311AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUForceFieldAffectorTranslator.h; path = Particle3D/PU/CCPUForceFieldAffectorTranslator.h; sourceTree = ""; }; - B665E1321AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUGeometryRotator.cpp; path = Particle3D/PU/CCPUGeometryRotator.cpp; sourceTree = ""; }; - B665E1331AA80A6500DDB1C5 /* CCPUGeometryRotator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUGeometryRotator.h; path = Particle3D/PU/CCPUGeometryRotator.h; sourceTree = ""; }; - B665E1341AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUGeometryRotatorTranslator.cpp; path = Particle3D/PU/CCPUGeometryRotatorTranslator.cpp; sourceTree = ""; }; - B665E1351AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUGeometryRotatorTranslator.h; path = Particle3D/PU/CCPUGeometryRotatorTranslator.h; sourceTree = ""; }; - B665E1361AA80A6500DDB1C5 /* CCPUGravityAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUGravityAffector.cpp; path = Particle3D/PU/CCPUGravityAffector.cpp; sourceTree = ""; }; - B665E1371AA80A6500DDB1C5 /* CCPUGravityAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUGravityAffector.h; path = Particle3D/PU/CCPUGravityAffector.h; sourceTree = ""; }; - B665E1381AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUGravityAffectorTranslator.cpp; path = Particle3D/PU/CCPUGravityAffectorTranslator.cpp; sourceTree = ""; }; - B665E1391AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUGravityAffectorTranslator.h; path = Particle3D/PU/CCPUGravityAffectorTranslator.h; sourceTree = ""; }; - B665E13A1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUInterParticleCollider.cpp; path = Particle3D/PU/CCPUInterParticleCollider.cpp; sourceTree = ""; }; - B665E13B1AA80A6500DDB1C5 /* CCPUInterParticleCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUInterParticleCollider.h; path = Particle3D/PU/CCPUInterParticleCollider.h; sourceTree = ""; }; - B665E13C1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUInterParticleColliderTranslator.cpp; path = Particle3D/PU/CCPUInterParticleColliderTranslator.cpp; sourceTree = ""; }; - B665E13D1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUInterParticleColliderTranslator.h; path = Particle3D/PU/CCPUInterParticleColliderTranslator.h; sourceTree = ""; }; - B665E13E1AA80A6500DDB1C5 /* CCPUJetAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUJetAffector.cpp; path = Particle3D/PU/CCPUJetAffector.cpp; sourceTree = ""; }; - B665E13F1AA80A6500DDB1C5 /* CCPUJetAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUJetAffector.h; path = Particle3D/PU/CCPUJetAffector.h; sourceTree = ""; }; - B665E1401AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUJetAffectorTranslator.cpp; path = Particle3D/PU/CCPUJetAffectorTranslator.cpp; sourceTree = ""; }; - B665E1411AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUJetAffectorTranslator.h; path = Particle3D/PU/CCPUJetAffectorTranslator.h; sourceTree = ""; }; - B665E1421AA80A6500DDB1C5 /* CCPULineAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULineAffector.cpp; path = Particle3D/PU/CCPULineAffector.cpp; sourceTree = ""; }; - B665E1431AA80A6500DDB1C5 /* CCPULineAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULineAffector.h; path = Particle3D/PU/CCPULineAffector.h; sourceTree = ""; }; - B665E1441AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULineAffectorTranslator.cpp; path = Particle3D/PU/CCPULineAffectorTranslator.cpp; sourceTree = ""; }; - B665E1451AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULineAffectorTranslator.h; path = Particle3D/PU/CCPULineAffectorTranslator.h; sourceTree = ""; }; - B665E1461AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULinearForceAffector.cpp; path = Particle3D/PU/CCPULinearForceAffector.cpp; sourceTree = ""; }; - B665E1471AA80A6500DDB1C5 /* CCPULinearForceAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULinearForceAffector.h; path = Particle3D/PU/CCPULinearForceAffector.h; sourceTree = ""; }; - B665E1481AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULinearForceAffectorTranslator.cpp; path = Particle3D/PU/CCPULinearForceAffectorTranslator.cpp; sourceTree = ""; }; - B665E1491AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULinearForceAffectorTranslator.h; path = Particle3D/PU/CCPULinearForceAffectorTranslator.h; sourceTree = ""; }; - B665E14A1AA80A6500DDB1C5 /* CCPULineEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULineEmitter.cpp; path = Particle3D/PU/CCPULineEmitter.cpp; sourceTree = ""; }; - B665E14B1AA80A6500DDB1C5 /* CCPULineEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULineEmitter.h; path = Particle3D/PU/CCPULineEmitter.h; sourceTree = ""; }; - B665E14C1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPULineEmitterTranslator.cpp; path = Particle3D/PU/CCPULineEmitterTranslator.cpp; sourceTree = ""; }; - B665E14D1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPULineEmitterTranslator.h; path = Particle3D/PU/CCPULineEmitterTranslator.h; sourceTree = ""; }; - B665E14E1AA80A6500DDB1C5 /* CCPUListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUListener.cpp; path = Particle3D/PU/CCPUListener.cpp; sourceTree = ""; }; - B665E14F1AA80A6500DDB1C5 /* CCPUListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUListener.h; path = Particle3D/PU/CCPUListener.h; sourceTree = ""; }; - B665E1501AA80A6500DDB1C5 /* CCPUMaterialManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUMaterialManager.cpp; path = Particle3D/PU/CCPUMaterialManager.cpp; sourceTree = ""; }; - B665E1511AA80A6500DDB1C5 /* CCPUMaterialManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUMaterialManager.h; path = Particle3D/PU/CCPUMaterialManager.h; sourceTree = ""; }; - B665E1521AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUMaterialTranslator.cpp; path = Particle3D/PU/CCPUMaterialTranslator.cpp; sourceTree = ""; }; - B665E1531AA80A6500DDB1C5 /* CCPUMaterialTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUMaterialTranslator.h; path = Particle3D/PU/CCPUMaterialTranslator.h; sourceTree = ""; }; - B665E1541AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUMeshSurfaceEmitter.cpp; path = Particle3D/PU/CCPUMeshSurfaceEmitter.cpp; sourceTree = ""; }; - B665E1551AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUMeshSurfaceEmitter.h; path = Particle3D/PU/CCPUMeshSurfaceEmitter.h; sourceTree = ""; }; - B665E1561AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUMeshSurfaceEmitterTranslator.cpp; path = Particle3D/PU/CCPUMeshSurfaceEmitterTranslator.cpp; sourceTree = ""; }; - B665E1571AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUMeshSurfaceEmitterTranslator.h; path = Particle3D/PU/CCPUMeshSurfaceEmitterTranslator.h; sourceTree = ""; }; - B665E1581AA80A6500DDB1C5 /* CCPUNoise.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUNoise.cpp; path = Particle3D/PU/CCPUNoise.cpp; sourceTree = ""; }; - B665E1591AA80A6500DDB1C5 /* CCPUNoise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUNoise.h; path = Particle3D/PU/CCPUNoise.h; sourceTree = ""; }; - B665E15A1AA80A6500DDB1C5 /* CCPUObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUObserver.cpp; path = Particle3D/PU/CCPUObserver.cpp; sourceTree = ""; }; - B665E15B1AA80A6500DDB1C5 /* CCPUObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUObserver.h; path = Particle3D/PU/CCPUObserver.h; sourceTree = ""; }; - B665E15C1AA80A6500DDB1C5 /* CCPUObserverManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUObserverManager.cpp; path = Particle3D/PU/CCPUObserverManager.cpp; sourceTree = ""; }; - B665E15D1AA80A6500DDB1C5 /* CCPUObserverManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUObserverManager.h; path = Particle3D/PU/CCPUObserverManager.h; sourceTree = ""; }; - B665E15E1AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUObserverTranslator.cpp; path = Particle3D/PU/CCPUObserverTranslator.cpp; sourceTree = ""; }; - B665E15F1AA80A6500DDB1C5 /* CCPUObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUObserverTranslator.h; path = Particle3D/PU/CCPUObserverTranslator.h; sourceTree = ""; }; - B665E1601AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnClearObserver.cpp; path = Particle3D/PU/CCPUOnClearObserver.cpp; sourceTree = ""; }; - B665E1611AA80A6500DDB1C5 /* CCPUOnClearObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnClearObserver.h; path = Particle3D/PU/CCPUOnClearObserver.h; sourceTree = ""; }; - B665E1621AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnClearObserverTranslator.cpp; path = Particle3D/PU/CCPUOnClearObserverTranslator.cpp; sourceTree = ""; }; - B665E1631AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnClearObserverTranslator.h; path = Particle3D/PU/CCPUOnClearObserverTranslator.h; sourceTree = ""; }; - B665E1641AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnCollisionObserver.cpp; path = Particle3D/PU/CCPUOnCollisionObserver.cpp; sourceTree = ""; }; - B665E1651AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnCollisionObserver.h; path = Particle3D/PU/CCPUOnCollisionObserver.h; sourceTree = ""; }; - B665E1661AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnCollisionObserverTranslator.cpp; path = Particle3D/PU/CCPUOnCollisionObserverTranslator.cpp; sourceTree = ""; }; - B665E1671AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnCollisionObserverTranslator.h; path = Particle3D/PU/CCPUOnCollisionObserverTranslator.h; sourceTree = ""; }; - B665E1681AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnCountObserver.cpp; path = Particle3D/PU/CCPUOnCountObserver.cpp; sourceTree = ""; }; - B665E1691AA80A6500DDB1C5 /* CCPUOnCountObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnCountObserver.h; path = Particle3D/PU/CCPUOnCountObserver.h; sourceTree = ""; }; - B665E16A1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnCountObserverTranslator.cpp; path = Particle3D/PU/CCPUOnCountObserverTranslator.cpp; sourceTree = ""; }; - B665E16B1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnCountObserverTranslator.h; path = Particle3D/PU/CCPUOnCountObserverTranslator.h; sourceTree = ""; }; - B665E16C1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnEmissionObserver.cpp; path = Particle3D/PU/CCPUOnEmissionObserver.cpp; sourceTree = ""; }; - B665E16D1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnEmissionObserver.h; path = Particle3D/PU/CCPUOnEmissionObserver.h; sourceTree = ""; }; - B665E16E1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnEmissionObserverTranslator.cpp; path = Particle3D/PU/CCPUOnEmissionObserverTranslator.cpp; sourceTree = ""; }; - B665E16F1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnEmissionObserverTranslator.h; path = Particle3D/PU/CCPUOnEmissionObserverTranslator.h; sourceTree = ""; }; - B665E1701AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnEventFlagObserver.cpp; path = Particle3D/PU/CCPUOnEventFlagObserver.cpp; sourceTree = ""; }; - B665E1711AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnEventFlagObserver.h; path = Particle3D/PU/CCPUOnEventFlagObserver.h; sourceTree = ""; }; - B665E1721AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnEventFlagObserverTranslator.cpp; path = Particle3D/PU/CCPUOnEventFlagObserverTranslator.cpp; sourceTree = ""; }; - B665E1731AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnEventFlagObserverTranslator.h; path = Particle3D/PU/CCPUOnEventFlagObserverTranslator.h; sourceTree = ""; }; - B665E1741AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnExpireObserver.cpp; path = Particle3D/PU/CCPUOnExpireObserver.cpp; sourceTree = ""; }; - B665E1751AA80A6500DDB1C5 /* CCPUOnExpireObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnExpireObserver.h; path = Particle3D/PU/CCPUOnExpireObserver.h; sourceTree = ""; }; - B665E1761AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnExpireObserverTranslator.cpp; path = Particle3D/PU/CCPUOnExpireObserverTranslator.cpp; sourceTree = ""; }; - B665E1771AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnExpireObserverTranslator.h; path = Particle3D/PU/CCPUOnExpireObserverTranslator.h; sourceTree = ""; }; - B665E1781AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnPositionObserver.cpp; path = Particle3D/PU/CCPUOnPositionObserver.cpp; sourceTree = ""; }; - B665E1791AA80A6500DDB1C5 /* CCPUOnPositionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnPositionObserver.h; path = Particle3D/PU/CCPUOnPositionObserver.h; sourceTree = ""; }; - B665E17A1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnPositionObserverTranslator.cpp; path = Particle3D/PU/CCPUOnPositionObserverTranslator.cpp; sourceTree = ""; }; - B665E17B1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnPositionObserverTranslator.h; path = Particle3D/PU/CCPUOnPositionObserverTranslator.h; sourceTree = ""; }; - B665E17C1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnQuotaObserver.cpp; path = Particle3D/PU/CCPUOnQuotaObserver.cpp; sourceTree = ""; }; - B665E17D1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnQuotaObserver.h; path = Particle3D/PU/CCPUOnQuotaObserver.h; sourceTree = ""; }; - B665E17E1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnQuotaObserverTranslator.cpp; path = Particle3D/PU/CCPUOnQuotaObserverTranslator.cpp; sourceTree = ""; }; - B665E17F1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnQuotaObserverTranslator.h; path = Particle3D/PU/CCPUOnQuotaObserverTranslator.h; sourceTree = ""; }; - B665E1801AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnRandomObserver.cpp; path = Particle3D/PU/CCPUOnRandomObserver.cpp; sourceTree = ""; }; - B665E1811AA80A6500DDB1C5 /* CCPUOnRandomObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnRandomObserver.h; path = Particle3D/PU/CCPUOnRandomObserver.h; sourceTree = ""; }; - B665E1821AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnRandomObserverTranslator.cpp; path = Particle3D/PU/CCPUOnRandomObserverTranslator.cpp; sourceTree = ""; }; - B665E1831AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnRandomObserverTranslator.h; path = Particle3D/PU/CCPUOnRandomObserverTranslator.h; sourceTree = ""; }; - B665E1841AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnTimeObserver.cpp; path = Particle3D/PU/CCPUOnTimeObserver.cpp; sourceTree = ""; }; - B665E1851AA80A6500DDB1C5 /* CCPUOnTimeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnTimeObserver.h; path = Particle3D/PU/CCPUOnTimeObserver.h; sourceTree = ""; }; - B665E1861AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnTimeObserverTranslator.cpp; path = Particle3D/PU/CCPUOnTimeObserverTranslator.cpp; sourceTree = ""; }; - B665E1871AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnTimeObserverTranslator.h; path = Particle3D/PU/CCPUOnTimeObserverTranslator.h; sourceTree = ""; }; - B665E1881AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnVelocityObserver.cpp; path = Particle3D/PU/CCPUOnVelocityObserver.cpp; sourceTree = ""; }; - B665E1891AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnVelocityObserver.h; path = Particle3D/PU/CCPUOnVelocityObserver.h; sourceTree = ""; }; - B665E18A1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUOnVelocityObserverTranslator.cpp; path = Particle3D/PU/CCPUOnVelocityObserverTranslator.cpp; sourceTree = ""; }; - B665E18B1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUOnVelocityObserverTranslator.h; path = Particle3D/PU/CCPUOnVelocityObserverTranslator.h; sourceTree = ""; }; - B665E18C1AA80A6500DDB1C5 /* CCPUParticleFollower.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUParticleFollower.cpp; path = Particle3D/PU/CCPUParticleFollower.cpp; sourceTree = ""; }; - B665E18D1AA80A6500DDB1C5 /* CCPUParticleFollower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUParticleFollower.h; path = Particle3D/PU/CCPUParticleFollower.h; sourceTree = ""; }; - B665E18E1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUParticleFollowerTranslator.cpp; path = Particle3D/PU/CCPUParticleFollowerTranslator.cpp; sourceTree = ""; }; - B665E18F1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUParticleFollowerTranslator.h; path = Particle3D/PU/CCPUParticleFollowerTranslator.h; sourceTree = ""; }; - B665E1901AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUParticleSystem3D.cpp; path = Particle3D/PU/CCPUParticleSystem3D.cpp; sourceTree = ""; }; - B665E1911AA80A6500DDB1C5 /* CCPUParticleSystem3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUParticleSystem3D.h; path = Particle3D/PU/CCPUParticleSystem3D.h; sourceTree = ""; }; - B665E1921AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUParticleSystem3DTranslator.cpp; path = Particle3D/PU/CCPUParticleSystem3DTranslator.cpp; sourceTree = ""; }; - B665E1931AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUParticleSystem3DTranslator.h; path = Particle3D/PU/CCPUParticleSystem3DTranslator.h; sourceTree = ""; }; - B665E1941AA80A6500DDB1C5 /* CCPUPathFollower.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPathFollower.cpp; path = Particle3D/PU/CCPUPathFollower.cpp; sourceTree = ""; }; - B665E1951AA80A6500DDB1C5 /* CCPUPathFollower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPathFollower.h; path = Particle3D/PU/CCPUPathFollower.h; sourceTree = ""; }; - B665E1961AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPathFollowerTranslator.cpp; path = Particle3D/PU/CCPUPathFollowerTranslator.cpp; sourceTree = ""; }; - B665E1971AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPathFollowerTranslator.h; path = Particle3D/PU/CCPUPathFollowerTranslator.h; sourceTree = ""; }; - B665E1981AA80A6500DDB1C5 /* CCPUPlane.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPlane.cpp; path = Particle3D/PU/CCPUPlane.cpp; sourceTree = ""; }; - B665E1991AA80A6500DDB1C5 /* CCPUPlane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPlane.h; path = Particle3D/PU/CCPUPlane.h; sourceTree = ""; }; - B665E19A1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPlaneCollider.cpp; path = Particle3D/PU/CCPUPlaneCollider.cpp; sourceTree = ""; }; - B665E19B1AA80A6500DDB1C5 /* CCPUPlaneCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPlaneCollider.h; path = Particle3D/PU/CCPUPlaneCollider.h; sourceTree = ""; }; - B665E19C1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPlaneColliderTranslator.cpp; path = Particle3D/PU/CCPUPlaneColliderTranslator.cpp; sourceTree = ""; }; - B665E19D1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPlaneColliderTranslator.h; path = Particle3D/PU/CCPUPlaneColliderTranslator.h; sourceTree = ""; }; - B665E19E1AA80A6500DDB1C5 /* CCPUPointEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPointEmitter.cpp; path = Particle3D/PU/CCPUPointEmitter.cpp; sourceTree = ""; }; - B665E19F1AA80A6500DDB1C5 /* CCPUPointEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPointEmitter.h; path = Particle3D/PU/CCPUPointEmitter.h; sourceTree = ""; }; - B665E1A01AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPointEmitterTranslator.cpp; path = Particle3D/PU/CCPUPointEmitterTranslator.cpp; sourceTree = ""; }; - B665E1A11AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPointEmitterTranslator.h; path = Particle3D/PU/CCPUPointEmitterTranslator.h; sourceTree = ""; }; - B665E1A21AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPositionEmitter.cpp; path = Particle3D/PU/CCPUPositionEmitter.cpp; sourceTree = ""; }; - B665E1A31AA80A6500DDB1C5 /* CCPUPositionEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPositionEmitter.h; path = Particle3D/PU/CCPUPositionEmitter.h; sourceTree = ""; }; - B665E1A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUPositionEmitterTranslator.cpp; path = Particle3D/PU/CCPUPositionEmitterTranslator.cpp; sourceTree = ""; }; - B665E1A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUPositionEmitterTranslator.h; path = Particle3D/PU/CCPUPositionEmitterTranslator.h; sourceTree = ""; }; - B665E1A61AA80A6500DDB1C5 /* CCPURandomiser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURandomiser.cpp; path = Particle3D/PU/CCPURandomiser.cpp; sourceTree = ""; }; - B665E1A71AA80A6500DDB1C5 /* CCPURandomiser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURandomiser.h; path = Particle3D/PU/CCPURandomiser.h; sourceTree = ""; }; - B665E1A81AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURandomiserTranslator.cpp; path = Particle3D/PU/CCPURandomiserTranslator.cpp; sourceTree = ""; }; - B665E1A91AA80A6500DDB1C5 /* CCPURandomiserTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURandomiserTranslator.h; path = Particle3D/PU/CCPURandomiserTranslator.h; sourceTree = ""; }; - B665E1AA1AA80A6500DDB1C5 /* CCPURender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURender.cpp; path = Particle3D/PU/CCPURender.cpp; sourceTree = ""; }; - B665E1AB1AA80A6500DDB1C5 /* CCPURender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURender.h; path = Particle3D/PU/CCPURender.h; sourceTree = ""; }; - B665E1AC1AA80A6500DDB1C5 /* CCPURendererTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURendererTranslator.cpp; path = Particle3D/PU/CCPURendererTranslator.cpp; sourceTree = ""; }; - B665E1AD1AA80A6500DDB1C5 /* CCPURendererTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURendererTranslator.h; path = Particle3D/PU/CCPURendererTranslator.h; sourceTree = ""; }; - B665E1AE1AA80A6500DDB1C5 /* CCPURibbonTrail.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURibbonTrail.cpp; path = Particle3D/PU/CCPURibbonTrail.cpp; sourceTree = ""; }; - B665E1AF1AA80A6500DDB1C5 /* CCPURibbonTrail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURibbonTrail.h; path = Particle3D/PU/CCPURibbonTrail.h; sourceTree = ""; }; - B665E1B01AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPURibbonTrailRender.cpp; path = Particle3D/PU/CCPURibbonTrailRender.cpp; sourceTree = ""; }; - B665E1B11AA80A6500DDB1C5 /* CCPURibbonTrailRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPURibbonTrailRender.h; path = Particle3D/PU/CCPURibbonTrailRender.h; sourceTree = ""; }; - B665E1B21AA80A6500DDB1C5 /* CCPUScaleAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScaleAffector.cpp; path = Particle3D/PU/CCPUScaleAffector.cpp; sourceTree = ""; }; - B665E1B31AA80A6500DDB1C5 /* CCPUScaleAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScaleAffector.h; path = Particle3D/PU/CCPUScaleAffector.h; sourceTree = ""; }; - B665E1B41AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScaleAffectorTranslator.cpp; path = Particle3D/PU/CCPUScaleAffectorTranslator.cpp; sourceTree = ""; }; - B665E1B51AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScaleAffectorTranslator.h; path = Particle3D/PU/CCPUScaleAffectorTranslator.h; sourceTree = ""; }; - B665E1B61AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScaleVelocityAffector.cpp; path = Particle3D/PU/CCPUScaleVelocityAffector.cpp; sourceTree = ""; }; - B665E1B71AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScaleVelocityAffector.h; path = Particle3D/PU/CCPUScaleVelocityAffector.h; sourceTree = ""; }; - B665E1B81AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScaleVelocityAffectorTranslator.cpp; path = Particle3D/PU/CCPUScaleVelocityAffectorTranslator.cpp; sourceTree = ""; }; - B665E1B91AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScaleVelocityAffectorTranslator.h; path = Particle3D/PU/CCPUScaleVelocityAffectorTranslator.h; sourceTree = ""; }; - B665E1BA1AA80A6500DDB1C5 /* CCPUScriptCompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScriptCompiler.cpp; path = Particle3D/PU/CCPUScriptCompiler.cpp; sourceTree = ""; }; - B665E1BB1AA80A6500DDB1C5 /* CCPUScriptCompiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScriptCompiler.h; path = Particle3D/PU/CCPUScriptCompiler.h; sourceTree = ""; }; - B665E1BC1AA80A6500DDB1C5 /* CCPUScriptLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScriptLexer.cpp; path = Particle3D/PU/CCPUScriptLexer.cpp; sourceTree = ""; }; - B665E1BD1AA80A6500DDB1C5 /* CCPUScriptLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScriptLexer.h; path = Particle3D/PU/CCPUScriptLexer.h; sourceTree = ""; }; - B665E1BE1AA80A6500DDB1C5 /* CCPUScriptParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScriptParser.cpp; path = Particle3D/PU/CCPUScriptParser.cpp; sourceTree = ""; }; - B665E1BF1AA80A6500DDB1C5 /* CCPUScriptParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScriptParser.h; path = Particle3D/PU/CCPUScriptParser.h; sourceTree = ""; }; - B665E1C01AA80A6500DDB1C5 /* CCPUScriptTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUScriptTranslator.cpp; path = Particle3D/PU/CCPUScriptTranslator.cpp; sourceTree = ""; }; - B665E1C11AA80A6500DDB1C5 /* CCPUScriptTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUScriptTranslator.h; path = Particle3D/PU/CCPUScriptTranslator.h; sourceTree = ""; }; - B665E1C21AA80A6500DDB1C5 /* CCPUSimpleSpline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSimpleSpline.cpp; path = Particle3D/PU/CCPUSimpleSpline.cpp; sourceTree = ""; }; - B665E1C31AA80A6500DDB1C5 /* CCPUSimpleSpline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSimpleSpline.h; path = Particle3D/PU/CCPUSimpleSpline.h; sourceTree = ""; }; - B665E1C41AA80A6500DDB1C5 /* CCPUSineForceAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSineForceAffector.cpp; path = Particle3D/PU/CCPUSineForceAffector.cpp; sourceTree = ""; }; - B665E1C51AA80A6500DDB1C5 /* CCPUSineForceAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSineForceAffector.h; path = Particle3D/PU/CCPUSineForceAffector.h; sourceTree = ""; }; - B665E1C61AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSineForceAffectorTranslator.cpp; path = Particle3D/PU/CCPUSineForceAffectorTranslator.cpp; sourceTree = ""; }; - B665E1C71AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSineForceAffectorTranslator.h; path = Particle3D/PU/CCPUSineForceAffectorTranslator.h; sourceTree = ""; }; - B665E1C81AA80A6500DDB1C5 /* CCPUSlaveBehaviour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSlaveBehaviour.cpp; path = Particle3D/PU/CCPUSlaveBehaviour.cpp; sourceTree = ""; }; - B665E1C91AA80A6500DDB1C5 /* CCPUSlaveBehaviour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSlaveBehaviour.h; path = Particle3D/PU/CCPUSlaveBehaviour.h; sourceTree = ""; }; - B665E1CA1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSlaveBehaviourTranslator.cpp; path = Particle3D/PU/CCPUSlaveBehaviourTranslator.cpp; sourceTree = ""; }; - B665E1CB1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSlaveBehaviourTranslator.h; path = Particle3D/PU/CCPUSlaveBehaviourTranslator.h; sourceTree = ""; }; - B665E1CC1AA80A6500DDB1C5 /* CCPUSlaveEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSlaveEmitter.cpp; path = Particle3D/PU/CCPUSlaveEmitter.cpp; sourceTree = ""; }; - B665E1CD1AA80A6500DDB1C5 /* CCPUSlaveEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSlaveEmitter.h; path = Particle3D/PU/CCPUSlaveEmitter.h; sourceTree = ""; }; - B665E1CE1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSlaveEmitterTranslator.cpp; path = Particle3D/PU/CCPUSlaveEmitterTranslator.cpp; sourceTree = ""; }; - B665E1CF1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSlaveEmitterTranslator.h; path = Particle3D/PU/CCPUSlaveEmitterTranslator.h; sourceTree = ""; }; - B665E1D01AA80A6500DDB1C5 /* CCPUSphere.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSphere.cpp; path = Particle3D/PU/CCPUSphere.cpp; sourceTree = ""; }; - B665E1D11AA80A6500DDB1C5 /* CCPUSphere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSphere.h; path = Particle3D/PU/CCPUSphere.h; sourceTree = ""; }; - B665E1D21AA80A6500DDB1C5 /* CCPUSphereCollider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSphereCollider.cpp; path = Particle3D/PU/CCPUSphereCollider.cpp; sourceTree = ""; }; - B665E1D31AA80A6500DDB1C5 /* CCPUSphereCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSphereCollider.h; path = Particle3D/PU/CCPUSphereCollider.h; sourceTree = ""; }; - B665E1D41AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSphereColliderTranslator.cpp; path = Particle3D/PU/CCPUSphereColliderTranslator.cpp; sourceTree = ""; }; - B665E1D51AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSphereColliderTranslator.h; path = Particle3D/PU/CCPUSphereColliderTranslator.h; sourceTree = ""; }; - B665E1D61AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSphereSurfaceEmitter.cpp; path = Particle3D/PU/CCPUSphereSurfaceEmitter.cpp; sourceTree = ""; }; - B665E1D71AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSphereSurfaceEmitter.h; path = Particle3D/PU/CCPUSphereSurfaceEmitter.h; sourceTree = ""; }; - B665E1D81AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUSphereSurfaceEmitterTranslator.cpp; path = Particle3D/PU/CCPUSphereSurfaceEmitterTranslator.cpp; sourceTree = ""; }; - B665E1D91AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUSphereSurfaceEmitterTranslator.h; path = Particle3D/PU/CCPUSphereSurfaceEmitterTranslator.h; sourceTree = ""; }; - B665E1DA1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTechniqueTranslator.cpp; path = Particle3D/PU/CCPUTechniqueTranslator.cpp; sourceTree = ""; }; - B665E1DB1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTechniqueTranslator.h; path = Particle3D/PU/CCPUTechniqueTranslator.h; sourceTree = ""; }; - B665E1DC1AA80A6500DDB1C5 /* CCPUTextureAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTextureAnimator.cpp; path = Particle3D/PU/CCPUTextureAnimator.cpp; sourceTree = ""; }; - B665E1DD1AA80A6500DDB1C5 /* CCPUTextureAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTextureAnimator.h; path = Particle3D/PU/CCPUTextureAnimator.h; sourceTree = ""; }; - B665E1DE1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTextureAnimatorTranslator.cpp; path = Particle3D/PU/CCPUTextureAnimatorTranslator.cpp; sourceTree = ""; }; - B665E1DF1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTextureAnimatorTranslator.h; path = Particle3D/PU/CCPUTextureAnimatorTranslator.h; sourceTree = ""; }; - B665E1E01AA80A6500DDB1C5 /* CCPUTextureRotator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTextureRotator.cpp; path = Particle3D/PU/CCPUTextureRotator.cpp; sourceTree = ""; }; - B665E1E11AA80A6500DDB1C5 /* CCPUTextureRotator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTextureRotator.h; path = Particle3D/PU/CCPUTextureRotator.h; sourceTree = ""; }; - B665E1E21AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTextureRotatorTranslator.cpp; path = Particle3D/PU/CCPUTextureRotatorTranslator.cpp; sourceTree = ""; }; - B665E1E31AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTextureRotatorTranslator.h; path = Particle3D/PU/CCPUTextureRotatorTranslator.h; sourceTree = ""; }; - B665E1E41AA80A6500DDB1C5 /* CCPUTranslateManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUTranslateManager.cpp; path = Particle3D/PU/CCPUTranslateManager.cpp; sourceTree = ""; }; - B665E1E51AA80A6500DDB1C5 /* CCPUTranslateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUTranslateManager.h; path = Particle3D/PU/CCPUTranslateManager.h; sourceTree = ""; }; - B665E1E61AA80A6500DDB1C5 /* CCPUUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUUtil.cpp; path = Particle3D/PU/CCPUUtil.cpp; sourceTree = ""; }; - B665E1E71AA80A6500DDB1C5 /* CCPUUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUUtil.h; path = Particle3D/PU/CCPUUtil.h; sourceTree = ""; }; - B665E1E81AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVelocityMatchingAffector.cpp; path = Particle3D/PU/CCPUVelocityMatchingAffector.cpp; sourceTree = ""; }; - B665E1E91AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVelocityMatchingAffector.h; path = Particle3D/PU/CCPUVelocityMatchingAffector.h; sourceTree = ""; }; - B665E1EA1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVelocityMatchingAffectorTranslator.cpp; path = Particle3D/PU/CCPUVelocityMatchingAffectorTranslator.cpp; sourceTree = ""; }; - B665E1EB1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVelocityMatchingAffectorTranslator.h; path = Particle3D/PU/CCPUVelocityMatchingAffectorTranslator.h; sourceTree = ""; }; - B665E1EC1AA80A6500DDB1C5 /* CCPUVertexEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVertexEmitter.cpp; path = Particle3D/PU/CCPUVertexEmitter.cpp; sourceTree = ""; }; - B665E1ED1AA80A6500DDB1C5 /* CCPUVertexEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVertexEmitter.h; path = Particle3D/PU/CCPUVertexEmitter.h; sourceTree = ""; }; - B665E1EE1AA80A6500DDB1C5 /* CCPUVortexAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVortexAffector.cpp; path = Particle3D/PU/CCPUVortexAffector.cpp; sourceTree = ""; }; - B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVortexAffector.h; path = Particle3D/PU/CCPUVortexAffector.h; sourceTree = ""; }; - B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVortexAffectorTranslator.cpp; path = Particle3D/PU/CCPUVortexAffectorTranslator.cpp; sourceTree = ""; }; - B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVortexAffectorTranslator.h; path = Particle3D/PU/CCPUVortexAffectorTranslator.h; sourceTree = ""; }; - B677B0BF1B18492D006762CB /* CCNavMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMesh.cpp; path = ../cocos/navmesh/CCNavMesh.cpp; sourceTree = ""; }; - B677B0C01B18492D006762CB /* CCNavMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMesh.h; path = ../cocos/navmesh/CCNavMesh.h; sourceTree = ""; }; - B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshAgent.cpp; path = ../cocos/navmesh/CCNavMeshAgent.cpp; sourceTree = ""; }; - B677B0C21B18492D006762CB /* CCNavMeshAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshAgent.h; path = ../cocos/navmesh/CCNavMeshAgent.h; sourceTree = ""; }; - B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshDebugDraw.cpp; path = ../cocos/navmesh/CCNavMeshDebugDraw.cpp; sourceTree = ""; }; - B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshDebugDraw.h; path = ../cocos/navmesh/CCNavMeshDebugDraw.h; sourceTree = ""; }; - B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshObstacle.cpp; path = ../cocos/navmesh/CCNavMeshObstacle.cpp; sourceTree = ""; }; - B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshObstacle.h; path = ../cocos/navmesh/CCNavMeshObstacle.h; sourceTree = ""; }; - B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshUtils.cpp; path = ../cocos/navmesh/CCNavMeshUtils.cpp; sourceTree = ""; }; - B677B0C81B18492D006762CB /* CCNavMeshUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshUtils.h; path = ../cocos/navmesh/CCNavMeshUtils.h; sourceTree = ""; }; B67C624319D4186F00F11FC6 /* ccShader_3D_ColorNormal.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorNormal.frag; sourceTree = ""; }; B67C624419D4186F00F11FC6 /* ccShader_3D_ColorNormalTex.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorNormalTex.frag; sourceTree = ""; }; B67C624519D4186F00F11FC6 /* ccShader_3D_PositionNormalTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionNormalTex.vert; sourceTree = ""; }; - B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCParticle3DAffector.cpp; path = Particle3D/CCParticle3DAffector.cpp; sourceTree = ""; }; - B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticle3DAffector.h; path = Particle3D/CCParticle3DAffector.h; sourceTree = ""; }; - B68778F21A8CA82E00643ABF /* CCParticle3DEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCParticle3DEmitter.cpp; path = Particle3D/CCParticle3DEmitter.cpp; sourceTree = ""; }; - B68778F31A8CA82E00643ABF /* CCParticle3DEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticle3DEmitter.h; path = Particle3D/CCParticle3DEmitter.h; sourceTree = ""; }; - B68778F41A8CA82E00643ABF /* CCParticle3DRender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCParticle3DRender.cpp; path = Particle3D/CCParticle3DRender.cpp; sourceTree = ""; }; - B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticle3DRender.h; path = Particle3D/CCParticle3DRender.h; sourceTree = ""; }; - B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCParticleSystem3D.cpp; path = Particle3D/CCParticleSystem3D.cpp; sourceTree = ""; }; - B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticleSystem3D.h; path = Particle3D/CCParticleSystem3D.h; sourceTree = ""; }; - B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3D.cpp; path = ../cocos/physics3d/CCPhysics3D.cpp; sourceTree = ""; }; - B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3D.h; path = ../cocos/physics3d/CCPhysics3D.h; sourceTree = ""; }; - B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DComponent.cpp; path = ../cocos/physics3d/CCPhysics3DComponent.cpp; sourceTree = ""; }; - B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DComponent.h; path = ../cocos/physics3d/CCPhysics3DComponent.h; sourceTree = ""; }; - B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DConstraint.cpp; path = ../cocos/physics3d/CCPhysics3DConstraint.cpp; sourceTree = ""; }; - B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DConstraint.h; path = ../cocos/physics3d/CCPhysics3DConstraint.h; sourceTree = ""; }; - B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DDebugDrawer.cpp; path = ../cocos/physics3d/CCPhysics3DDebugDrawer.cpp; sourceTree = ""; }; - B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DDebugDrawer.h; path = ../cocos/physics3d/CCPhysics3DDebugDrawer.h; sourceTree = ""; }; - B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DObject.cpp; path = ../cocos/physics3d/CCPhysics3DObject.cpp; sourceTree = ""; }; - B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DObject.h; path = ../cocos/physics3d/CCPhysics3DObject.h; sourceTree = ""; }; - B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DShape.cpp; path = ../cocos/physics3d/CCPhysics3DShape.cpp; sourceTree = ""; }; - B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DShape.h; path = ../cocos/physics3d/CCPhysics3DShape.h; sourceTree = ""; }; - B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DWorld.cpp; path = ../cocos/physics3d/CCPhysics3DWorld.cpp; sourceTree = ""; }; - B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DWorld.h; path = ../cocos/physics3d/CCPhysics3DWorld.h; sourceTree = ""; }; - B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsSprite3D.cpp; path = ../cocos/physics3d/CCPhysicsSprite3D.cpp; sourceTree = ""; }; - B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsSprite3D.h; path = ../cocos/physics3d/CCPhysicsSprite3D.h; sourceTree = ""; }; - B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkybox.cpp; sourceTree = ""; }; - B6D38B871AC3AFAC00043997 /* CCSkybox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkybox.h; sourceTree = ""; }; B6D38B941AC3B45600043997 /* ccShader_3D_Particle.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Particle.frag; sourceTree = ""; }; B6D38B951AC3B45600043997 /* ccShader_3D_Particle.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Particle.vert; sourceTree = ""; }; B6D38B961AC3B45600043997 /* ccShader_3D_Skybox.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Skybox.frag; sourceTree = ""; }; @@ -6036,45 +3290,248 @@ BA6249A51E77D2850096291C /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; BA6249A61E77D2850096291C /* package.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = package.json; sourceTree = ""; }; BA6249A71E77D2850096291C /* tinydir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinydir.h; sourceTree = ""; }; - C50306631B60B583001E6D43 /* CCBoneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBoneNode.cpp; sourceTree = ""; }; - C50306641B60B583001E6D43 /* CCBoneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBoneNode.h; sourceTree = ""; }; - C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkeletonNode.cpp; sourceTree = ""; }; - C50306661B60B583001E6D43 /* CCSkeletonNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkeletonNode.h; sourceTree = ""; }; - C50306671B60B583001E6D43 /* CCSkinNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkinNode.cpp; sourceTree = ""; }; - C50306681B60B583001E6D43 /* CCSkinNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkinNode.h; sourceTree = ""; }; - C50306701B60B5B2001E6D43 /* BoneNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoneNodeReader.cpp; path = SkeletonReader/BoneNodeReader.cpp; sourceTree = ""; }; - C50306711B60B5B2001E6D43 /* BoneNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoneNodeReader.h; path = SkeletonReader/BoneNodeReader.h; sourceTree = ""; }; - C50306721B60B5B2001E6D43 /* CSBoneBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSBoneBinary_generated.h; path = SkeletonReader/CSBoneBinary_generated.h; sourceTree = ""; }; - C50306731B60B5B2001E6D43 /* SkeletonNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonNodeReader.cpp; path = SkeletonReader/SkeletonNodeReader.cpp; sourceTree = ""; }; - C50306741B60B5B2001E6D43 /* SkeletonNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonNodeReader.h; path = SkeletonReader/SkeletonNodeReader.h; sourceTree = ""; }; - C5F516101C8216660013B695 /* UITabControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITabControl.cpp; sourceTree = ""; }; - C5F516111C8216660013B695 /* UITabControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITabControl.h; sourceTree = ""; }; - C5F516151C8216C60013B695 /* CSTabControl_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSTabControl_generated.h; path = TabControlReader/CSTabControl_generated.h; sourceTree = ""; }; - C5F516161C8216C60013B695 /* TabControlReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TabControlReader.cpp; path = TabControlReader/TabControlReader.cpp; sourceTree = ""; }; - C5F516171C8216C60013B695 /* TabControlReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TabControlReader.h; path = TabControlReader/TabControlReader.h; sourceTree = ""; }; - D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorBase.h; sourceTree = ""; }; - D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAllocatorDiagnostics.cpp; sourceTree = ""; }; - D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorDiagnostics.h; sourceTree = ""; }; - D0FD033E1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAllocatorGlobal.cpp; sourceTree = ""; }; - D0FD033F1A3B51AA00825BB5 /* CCAllocatorGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorGlobal.h; sourceTree = ""; }; - D0FD03401A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAllocatorGlobalNewDelete.cpp; sourceTree = ""; }; - D0FD03411A3B51AA00825BB5 /* CCAllocatorMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorMacros.h; sourceTree = ""; }; - D0FD03421A3B51AA00825BB5 /* CCAllocatorMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorMutex.h; sourceTree = ""; }; - D0FD03431A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorStrategyDefault.h; sourceTree = ""; }; - D0FD03441A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorStrategyFixedBlock.h; sourceTree = ""; }; - D0FD03451A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorStrategyGlobalSmallBlock.h; sourceTree = ""; }; - D0FD03461A3B51AA00825BB5 /* CCAllocatorStrategyPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorStrategyPool.h; sourceTree = ""; }; DA8C62A019E52C6400000516 /* ioapi_mem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ioapi_mem.cpp; sourceTree = ""; }; DA8C62A119E52C6400000516 /* ioapi_mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi_mem.h; sourceTree = ""; }; DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCClippingRectangleNode.cpp; sourceTree = ""; }; DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCClippingRectangleNode.h; sourceTree = ""; }; + ED150A9021E631D900EFE7F7 /* ProgramCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramCache.cpp; sourceTree = ""; }; + ED150A9121E631D900EFE7F7 /* ProgramCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramCache.h; sourceTree = ""; }; + ED150A9621E6320100EFE7F7 /* Program.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Program.h; sourceTree = ""; }; + ED150A9921E635AA00EFE7F7 /* ProgramMTL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProgramMTL.mm; sourceTree = ""; }; + ED150A9A21E635AB00EFE7F7 /* ProgramMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramMTL.h; sourceTree = ""; }; + ED28C1EF219E629B0078D854 /* RenderPipeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderPipeline.h; sourceTree = ""; }; + ED28C1F0219E629B0078D854 /* DepthStencilState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DepthStencilState.h; sourceTree = ""; }; + ED28C1F1219E629B0078D854 /* RenderPipelineDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderPipelineDescriptor.h; sourceTree = ""; }; + ED28C1F2219E629B0078D854 /* Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Device.h; sourceTree = ""; }; + ED28C1F3219E629B0078D854 /* VertexLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VertexLayout.cpp; sourceTree = ""; }; + ED28C1F4219E629B0078D854 /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = ""; }; + ED28C1F5219E629B0078D854 /* Backend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Backend.h; sourceTree = ""; }; + ED28C1F8219E629B0078D854 /* Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Texture.cpp; sourceTree = ""; }; + ED28C1F9219E629B0078D854 /* Device.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Device.cpp; sourceTree = ""; }; + ED28C1FB219E629B0078D854 /* RenderPassDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderPassDescriptor.h; sourceTree = ""; }; + ED28C1FC219E629B0078D854 /* CommandBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandBuffer.h; sourceTree = ""; }; + ED28C1FD219E629B0078D854 /* ShaderModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderModule.h; sourceTree = ""; }; + ED28C1FE219E629B0078D854 /* BlendState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlendState.cpp; sourceTree = ""; }; + ED28C1FF219E629B0078D854 /* ShaderModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderModule.cpp; sourceTree = ""; }; + ED28C200219E629B0078D854 /* BlendState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlendState.h; sourceTree = ""; }; + ED28C201219E629B0078D854 /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = ""; }; + ED28C202219E629B0078D854 /* Macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Macros.h; sourceTree = ""; }; + ED28C203219E629B0078D854 /* DepthStencilState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DepthStencilState.cpp; sourceTree = ""; }; + ED28C205219E629B0078D854 /* Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Texture.h; sourceTree = ""; }; + ED28C207219E629B0078D854 /* VertexLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexLayout.h; sourceTree = ""; }; + ED28C21E219E629B0078D854 /* CommandBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandBuffer.cpp; sourceTree = ""; }; + ED5C8CBC21C0B3C100F280A7 /* label_distanceFieldGlow.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = label_distanceFieldGlow.frag; sourceTree = ""; }; + ED5C8CBD21C0B5B700F280A7 /* positionColor.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionColor.frag; sourceTree = ""; }; + ED5C8CBE21C0B5B800F280A7 /* positionColor.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionColor.vert; sourceTree = ""; }; + ED5C8CBF21C0BB3200F280A7 /* positionColorTextureAsPointsize.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionColorTextureAsPointsize.vert; sourceTree = ""; }; + ED5C8CC021C0BB3200F280A7 /* positionColorLengthTexture.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionColorLengthTexture.frag; sourceTree = ""; }; + ED5C8CC121C0BB3300F280A7 /* positionColorLengthTexture.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionColorLengthTexture.vert; sourceTree = ""; }; ED682BB9213F5FC6001BF6CB /* libuv_a.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv_a.a; path = ../external/uv/prebuilt/mac/libuv_a.a; sourceTree = ""; }; ED682BC0213F63CB001BF6CB /* libuv_a.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv_a.a; path = ../external/uv/prebuilt/ios/libuv_a.a; sourceTree = ""; }; ED682BC2213F6C7A001BF6CB /* libwebsockets.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebsockets.a; path = ../external/websockets/prebuilt/tvos/libwebsockets.a; sourceTree = ""; }; ED682BC4213F6CBE001BF6CB /* libuv_a.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv_a.a; path = ../external/uv/prebuilt/tvos/libuv_a.a; sourceTree = ""; }; - ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsHelper.h; sourceTree = ""; }; + ED75D41F21E3030E0052B87E /* ccConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccConstants.h; path = ../base/ccConstants.h; sourceTree = ""; }; + ED93A75821EDBCBA00170050 /* Program.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Program.cpp; sourceTree = ""; }; ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCNodeGrid.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeGrid.h; sourceTree = ""; }; + EDAF7C6D21F1796F00E070B2 /* CCTextureUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCTextureUtils.h; path = ../CCTextureUtils.h; sourceTree = ""; }; + EDAF7C6E21F1797000E070B2 /* CCTextureUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCTextureUtils.cpp; path = ../CCTextureUtils.cpp; sourceTree = ""; }; + EDC789E021CA19FA00E1863C /* CCComAudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComAudio.cpp; sourceTree = ""; }; + EDC789E121CA19FA00E1863C /* CCProcessBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCProcessBase.h; sourceTree = ""; }; + EDC789E221CA19FA00E1863C /* TriggerMng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerMng.h; sourceTree = ""; }; + EDC789E321CA19FA00E1863C /* CCDatas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDatas.cpp; sourceTree = ""; }; + EDC789E421CA19FA00E1863C /* CCProcessBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCProcessBase.cpp; sourceTree = ""; }; + EDC789E521CA19FA00E1863C /* CCDataReaderHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDataReaderHelper.h; sourceTree = ""; }; + EDC789E621CA19FA00E1863C /* CCComRender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComRender.cpp; sourceTree = ""; }; + EDC789E721CA19FA00E1863C /* CCComController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComController.cpp; sourceTree = ""; }; + EDC789E821CA19FA00E1863C /* CCSSceneReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSSceneReader.cpp; sourceTree = ""; }; + EDC789E921CA19FA00E1863C /* CCDisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDisplayManager.h; sourceTree = ""; }; + EDC789EA21CA19FA00E1863C /* CCComAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComAttribute.h; sourceTree = ""; }; + EDC789EB21CA19FA00E1863C /* CocoStudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoStudio.cpp; sourceTree = ""; }; + EDC789EC21CA19FA00E1863C /* CCInputDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCInputDelegate.cpp; sourceTree = ""; }; + EDC789ED21CA19FA00E1863C /* CCArmatureDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureDefine.h; sourceTree = ""; }; + EDC789EE21CA19FA00E1863C /* CCUtilMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUtilMath.h; sourceTree = ""; }; + EDC789EF21CA19FA00E1863C /* CCInputDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInputDelegate.h; sourceTree = ""; }; + EDC789F021CA19FA00E1863C /* CCDecorativeDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDecorativeDisplay.h; sourceTree = ""; }; + EDC789F121CA19FA00E1863C /* TriggerObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerObj.cpp; sourceTree = ""; }; + EDC789F221CA19FA00E1863C /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; + EDC789F321CA19FA00E1863C /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + EDC789F421CA19FA00E1863C /* CCActionManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionManagerEx.h; sourceTree = ""; }; + EDC789F521CA19FA00E1863C /* CocosStudioExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosStudioExtension.cpp; sourceTree = ""; }; + EDC789F721CA19FA00E1863C /* CCTimelineMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTimelineMacro.h; sourceTree = ""; }; + EDC789F821CA19FA00E1863C /* CCBoneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBoneNode.cpp; sourceTree = ""; }; + EDC789F921CA19FA00E1863C /* CCSkeletonNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkeletonNode.h; sourceTree = ""; }; + EDC789FA21CA19FA00E1863C /* CCFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFrame.h; sourceTree = ""; }; + EDC789FB21CA19FA00E1863C /* CCActionTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimeline.cpp; sourceTree = ""; }; + EDC789FC21CA19FA00E1863C /* CCActionTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimeline.h; sourceTree = ""; }; + EDC789FD21CA19FA00E1863C /* CCFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFrame.cpp; sourceTree = ""; }; + EDC789FE21CA19FA00E1863C /* CSLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSLoader.cpp; sourceTree = ""; }; + EDC789FF21CA19FA00E1863C /* CCActionTimelineNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimelineNode.h; sourceTree = ""; }; + EDC78A0021CA19FA00E1863C /* CCBoneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBoneNode.h; sourceTree = ""; }; + EDC78A0121CA19FA00E1863C /* CCActionTimelineNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimelineNode.cpp; sourceTree = ""; }; + EDC78A0221CA19FA00E1863C /* CCTimeLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTimeLine.h; sourceTree = ""; }; + EDC78A0321CA19FA00E1863C /* CCActionTimelineCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimelineCache.cpp; sourceTree = ""; }; + EDC78A0421CA19FA00E1863C /* CSLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSLoader.h; sourceTree = ""; }; + EDC78A0521CA19FA00E1863C /* CCActionTimelineCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimelineCache.h; sourceTree = ""; }; + EDC78A0621CA19FA00E1863C /* CCTimeLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTimeLine.cpp; sourceTree = ""; }; + EDC78A0721CA19FA00E1863C /* CCSkinNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkinNode.cpp; sourceTree = ""; }; + EDC78A0821CA19FA00E1863C /* CCSkeletonNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkeletonNode.cpp; sourceTree = ""; }; + EDC78A0921CA19FA00E1863C /* CCSkinNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkinNode.h; sourceTree = ""; }; + EDC78A0A21CA19FA00E1863C /* TriggerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerBase.cpp; sourceTree = ""; }; + EDC78A0B21CA19FA00E1863C /* CCDisplayManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDisplayManager.cpp; sourceTree = ""; }; + EDC78A0C21CA19FA00E1863C /* CocosStudioExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosStudioExtension.h; sourceTree = ""; }; + EDC78A0D21CA19FA00E1863C /* CCActionNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionNode.cpp; sourceTree = ""; }; + EDC78A0E21CA19FA00E1863C /* CCTransformHelp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTransformHelp.h; sourceTree = ""; }; + EDC78A0F21CA19FA00E1863C /* CCUtilMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCUtilMath.cpp; sourceTree = ""; }; + EDC78A1021CA19FA00E1863C /* CocoStudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoStudio.h; sourceTree = ""; }; + EDC78A1121CA19FA00E1863C /* CCBatchNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBatchNode.h; sourceTree = ""; }; + EDC78A1221CA19FA00E1863C /* CCArmatureDataManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureDataManager.cpp; sourceTree = ""; }; + EDC78A1321CA19FA00E1863C /* CCDecorativeDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDecorativeDisplay.cpp; sourceTree = ""; }; + EDC78A1421CA19FA00E1863C /* CCActionFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionFrame.h; sourceTree = ""; }; + EDC78A1521CA19FA00E1863C /* FlatBuffersSerialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlatBuffersSerialize.h; sourceTree = ""; }; + EDC78A1621CA19FA00E1863C /* LocalizationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalizationManager.cpp; sourceTree = ""; }; + EDC78A1721CA19FA00E1863C /* CCActionFrameEasing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionFrameEasing.cpp; sourceTree = ""; }; + EDC78A1821CA19FA00E1863C /* FlatBuffersSerialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlatBuffersSerialize.cpp; sourceTree = ""; }; + EDC78A1921CA19FA00E1863C /* CCTween.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTween.cpp; sourceTree = ""; }; + EDC78A1A21CA19FA00E1863C /* CCComExtensionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComExtensionData.cpp; sourceTree = ""; }; + EDC78A1B21CA19FA00E1863C /* CCArmatureAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureAnimation.cpp; sourceTree = ""; }; + EDC78A1C21CA19FA00E1863C /* CCComRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComRender.h; sourceTree = ""; }; + EDC78A1D21CA19FA00E1863C /* CSLanguageDataBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSLanguageDataBinary_generated.h; sourceTree = ""; }; + EDC78A1E21CA19FA00E1863C /* CCSpriteFrameCacheHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteFrameCacheHelper.h; sourceTree = ""; }; + EDC78A1F21CA19FA00E1863C /* CCBone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBone.h; sourceTree = ""; }; + EDC78A2021CA19FA00E1863C /* CocoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoLoader.cpp; sourceTree = ""; }; + EDC78A2121CA19FA00E1863C /* CocosStudioExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosStudioExport.h; sourceTree = ""; }; + EDC78A2221CA19FA00E1863C /* CCArmatureAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureAnimation.h; sourceTree = ""; }; + EDC78A2321CA19FA00E1863C /* CCActionFrameEasing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionFrameEasing.h; sourceTree = ""; }; + EDC78A2421CA19FA00E1863C /* CCActionManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionManagerEx.cpp; sourceTree = ""; }; + EDC78A2521CA19FA00E1863C /* CCTween.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTween.h; sourceTree = ""; }; + EDC78A2621CA19FA00E1863C /* CCTransformHelp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTransformHelp.cpp; sourceTree = ""; }; + EDC78A2721CA19FA00E1863C /* CCActionNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionNode.h; sourceTree = ""; }; + EDC78A2821CA19FA00E1863C /* CCDataReaderHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDataReaderHelper.cpp; sourceTree = ""; }; + EDC78A2921CA19FA00E1863C /* CSParse3DBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSParse3DBinary_generated.h; sourceTree = ""; }; + EDC78A2A21CA19FA00E1863C /* DictionaryHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictionaryHelper.h; sourceTree = ""; }; + EDC78A2B21CA19FA00E1863C /* DictionaryHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictionaryHelper.cpp; sourceTree = ""; }; + EDC78A2C21CA19FA00E1863C /* CSParseBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSParseBinary_generated.h; sourceTree = ""; }; + EDC78A2D21CA19FA00E1863C /* CCDisplayFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDisplayFactory.cpp; sourceTree = ""; }; + EDC78A2E21CA19FA00E1863C /* CCComBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComBase.h; sourceTree = ""; }; + EDC78A2F21CA19FA00E1863C /* CCSGUIReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSGUIReader.cpp; sourceTree = ""; }; + EDC78A3021CA19FA00E1863C /* WidgetCallBackHandlerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetCallBackHandlerProtocol.h; sourceTree = ""; }; + EDC78A3121CA19FA00E1863C /* CCBatchNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBatchNode.cpp; sourceTree = ""; }; + EDC78A3421CA19FA00E1863C /* ArmatureNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArmatureNodeReader.h; sourceTree = ""; }; + EDC78A3521CA19FA00E1863C /* CSArmatureNode_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSArmatureNode_generated.h; sourceTree = ""; }; + EDC78A3621CA19FA00E1863C /* ArmatureNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArmatureNodeReader.cpp; sourceTree = ""; }; + EDC78A3821CA19FA00E1863C /* ProjectNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectNodeReader.cpp; sourceTree = ""; }; + EDC78A3921CA19FA00E1863C /* ProjectNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectNodeReader.h; sourceTree = ""; }; + EDC78A3B21CA19FA00E1863C /* GameNode3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameNode3DReader.h; sourceTree = ""; }; + EDC78A3C21CA19FA00E1863C /* GameNode3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameNode3DReader.cpp; sourceTree = ""; }; + EDC78A3E21CA19FA00E1863C /* ListViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListViewReader.cpp; sourceTree = ""; }; + EDC78A3F21CA19FA00E1863C /* ListViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListViewReader.h; sourceTree = ""; }; + EDC78A4121CA19FA00E1863C /* GameMapReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameMapReader.cpp; sourceTree = ""; }; + EDC78A4221CA19FA00E1863C /* GameMapReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMapReader.h; sourceTree = ""; }; + EDC78A4421CA19FA00E1863C /* UserCameraReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserCameraReader.cpp; sourceTree = ""; }; + EDC78A4521CA19FA00E1863C /* UserCameraReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserCameraReader.h; sourceTree = ""; }; + EDC78A4721CA19FA00E1863C /* LoadingBarReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadingBarReader.cpp; sourceTree = ""; }; + EDC78A4821CA19FA00E1863C /* LoadingBarReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingBarReader.h; sourceTree = ""; }; + EDC78A4A21CA19FA00E1863C /* SpriteReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteReader.cpp; sourceTree = ""; }; + EDC78A4B21CA19FA00E1863C /* SpriteReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteReader.h; sourceTree = ""; }; + EDC78A4D21CA19FA00E1863C /* TextAtlasReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextAtlasReader.h; sourceTree = ""; }; + EDC78A4E21CA19FA00E1863C /* TextAtlasReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextAtlasReader.cpp; sourceTree = ""; }; + EDC78A5021CA19FA00E1863C /* Node3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node3DReader.h; sourceTree = ""; }; + EDC78A5121CA19FA00E1863C /* Node3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Node3DReader.cpp; sourceTree = ""; }; + EDC78A5221CA19FA00E1863C /* WidgetReaderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetReaderProtocol.h; sourceTree = ""; }; + EDC78A5421CA19FA00E1863C /* ButtonReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonReader.cpp; sourceTree = ""; }; + EDC78A5521CA19FA00E1863C /* ButtonReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonReader.h; sourceTree = ""; }; + EDC78A5721CA19FA00E1863C /* Light3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Light3DReader.cpp; sourceTree = ""; }; + EDC78A5821CA19FA00E1863C /* Light3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Light3DReader.h; sourceTree = ""; }; + EDC78A5A21CA19FA00E1863C /* TabControlReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabControlReader.h; sourceTree = ""; }; + EDC78A5B21CA19FA00E1863C /* CSTabControl_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSTabControl_generated.h; sourceTree = ""; }; + EDC78A5C21CA19FA00E1863C /* TabControlReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TabControlReader.cpp; sourceTree = ""; }; + EDC78A5E21CA19FA00E1863C /* TextReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextReader.cpp; sourceTree = ""; }; + EDC78A5F21CA19FA00E1863C /* TextReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextReader.h; sourceTree = ""; }; + EDC78A6021CA19FA00E1863C /* WidgetReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetReader.h; sourceTree = ""; }; + EDC78A6221CA19FA00E1863C /* PageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageViewReader.cpp; sourceTree = ""; }; + EDC78A6321CA19FA00E1863C /* PageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageViewReader.h; sourceTree = ""; }; + EDC78A6521CA19FA00E1863C /* NodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReader.cpp; sourceTree = ""; }; + EDC78A6621CA19FA00E1863C /* NodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReader.h; sourceTree = ""; }; + EDC78A6721CA19FA00E1863C /* WidgetReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetReader.cpp; sourceTree = ""; }; + EDC78A6921CA19FA00E1863C /* ImageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageViewReader.h; sourceTree = ""; }; + EDC78A6A21CA19FA00E1863C /* ImageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageViewReader.cpp; sourceTree = ""; }; + EDC78A6C21CA19FA00E1863C /* LayoutReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutReader.h; sourceTree = ""; }; + EDC78A6D21CA19FA00E1863C /* LayoutReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutReader.cpp; sourceTree = ""; }; + EDC78A6F21CA19FA00E1863C /* SingleNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleNodeReader.cpp; sourceTree = ""; }; + EDC78A7021CA19FA00E1863C /* SingleNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleNodeReader.h; sourceTree = ""; }; + EDC78A7121CA19FA00E1863C /* NodeReaderDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReaderDefine.h; sourceTree = ""; }; + EDC78A7321CA19FA00E1863C /* TextBMFontReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBMFontReader.h; sourceTree = ""; }; + EDC78A7421CA19FA00E1863C /* TextBMFontReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBMFontReader.cpp; sourceTree = ""; }; + EDC78A7621CA19FA00E1863C /* CheckBoxReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckBoxReader.cpp; sourceTree = ""; }; + EDC78A7721CA19FA00E1863C /* CheckBoxReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckBoxReader.h; sourceTree = ""; }; + EDC78A7921CA19FA00E1863C /* Sprite3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sprite3DReader.h; sourceTree = ""; }; + EDC78A7A21CA19FA00E1863C /* Sprite3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sprite3DReader.cpp; sourceTree = ""; }; + EDC78A7C21CA19FA00E1863C /* SliderReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SliderReader.cpp; sourceTree = ""; }; + EDC78A7D21CA19FA00E1863C /* SliderReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderReader.h; sourceTree = ""; }; + EDC78A7F21CA19FA00E1863C /* ComAudioReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComAudioReader.cpp; sourceTree = ""; }; + EDC78A8021CA19FA00E1863C /* ComAudioReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComAudioReader.h; sourceTree = ""; }; + EDC78A8121CA19FA00E1863C /* NodeReaderDefine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReaderDefine.cpp; sourceTree = ""; }; + EDC78A8321CA19FA00E1863C /* ParticleReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleReader.cpp; sourceTree = ""; }; + EDC78A8421CA19FA00E1863C /* ParticleReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleReader.h; sourceTree = ""; }; + EDC78A8521CA19FA00E1863C /* NodeReaderProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeReaderProtocol.cpp; sourceTree = ""; }; + EDC78A8721CA19FA00E1863C /* Particle3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Particle3DReader.h; sourceTree = ""; }; + EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Particle3DReader.cpp; sourceTree = ""; }; + EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSBoneBinary_generated.h; sourceTree = ""; }; + EDC78A8B21CA19FA00E1863C /* SkeletonNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonNodeReader.h; sourceTree = ""; }; + EDC78A8C21CA19FA00E1863C /* BoneNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoneNodeReader.cpp; sourceTree = ""; }; + EDC78A8D21CA19FA00E1863C /* BoneNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoneNodeReader.h; sourceTree = ""; }; + EDC78A8E21CA19FA00E1863C /* SkeletonNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonNodeReader.cpp; sourceTree = ""; }; + EDC78A9021CA19FA00E1863C /* ScrollViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewReader.h; sourceTree = ""; }; + EDC78A9121CA19FA00E1863C /* ScrollViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollViewReader.cpp; sourceTree = ""; }; + EDC78A9321CA19FA00E1863C /* TextFieldReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextFieldReader.h; sourceTree = ""; }; + EDC78A9421CA19FA00E1863C /* TextFieldReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextFieldReader.cpp; sourceTree = ""; }; + EDC78A9521CA19FA00E1863C /* NodeReaderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeReaderProtocol.h; sourceTree = ""; }; + EDC78A9621CA19FA00E1863C /* CCComAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComAudio.h; sourceTree = ""; }; + EDC78A9721CA19FA00E1863C /* CCDisplayFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDisplayFactory.h; sourceTree = ""; }; + EDC78A9821CA19FA00E1863C /* CCBone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBone.cpp; sourceTree = ""; }; + EDC78A9921CA19FA00E1863C /* WidgetCallBackHandlerProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetCallBackHandlerProtocol.cpp; sourceTree = ""; }; + EDC78A9B21CA19FA00E1863C /* CSLanguageDataBinary.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSLanguageDataBinary.fbs; sourceTree = ""; }; + EDC78A9C21CA19FA00E1863C /* CSParseBinary.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSParseBinary.fbs; sourceTree = ""; }; + EDC78A9D21CA19FA00E1863C /* CSParse3DBinary.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSParse3DBinary.fbs; sourceTree = ""; }; + EDC78A9E21CA19FA00E1863C /* CSBoneBinary.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSBoneBinary.fbs; sourceTree = ""; }; + EDC78A9F21CA19FA00E1863C /* CSArmatureNode.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSArmatureNode.fbs; sourceTree = ""; }; + EDC78AA021CA19FA00E1863C /* CSTabControl.fbs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSTabControl.fbs; sourceTree = ""; }; + EDC78AA121CA19FA00E1863C /* CCArmatureDefine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmatureDefine.cpp; sourceTree = ""; }; + EDC78AA221CA19FA00E1863C /* CCActionFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionFrame.cpp; sourceTree = ""; }; + EDC78AA321CA19FA00E1863C /* CCArmature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmature.h; sourceTree = ""; }; + EDC78AA421CA19FA00E1863C /* CCColliderDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCColliderDetector.cpp; sourceTree = ""; }; + EDC78AA521CA19FA00E1863C /* CCArmatureDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArmatureDataManager.h; sourceTree = ""; }; + EDC78AA621CA19FA00E1863C /* CCDatas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDatas.h; sourceTree = ""; }; + EDC78AA721CA19FA00E1863C /* CCComExtensionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComExtensionData.h; sourceTree = ""; }; + EDC78AA821CA19FA00E1863C /* CCComController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComController.h; sourceTree = ""; }; + EDC78AA921CA19FA00E1863C /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = ""; }; + EDC78AAA21CA19FA00E1863C /* CocoLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoLoader.h; sourceTree = ""; }; + EDC78AAB21CA19FA00E1863C /* TriggerMng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerMng.cpp; sourceTree = ""; }; + EDC78AAC21CA19FA00E1863C /* CCSpriteFrameCacheHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteFrameCacheHelper.cpp; sourceTree = ""; }; + EDC78AAD21CA19FA00E1863C /* CCColliderDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCColliderDetector.h; sourceTree = ""; }; + EDC78AAE21CA19FA00E1863C /* LocalizationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizationManager.h; sourceTree = ""; }; + EDC78AAF21CA19FA00E1863C /* CCActionObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionObject.h; sourceTree = ""; }; + EDC78AB021CA19FA00E1863C /* TriggerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerBase.h; sourceTree = ""; }; + EDC78AB121CA19FA00E1863C /* CCSkin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkin.cpp; sourceTree = ""; }; + EDC78AB221CA19FA00E1863C /* CCSSceneReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSSceneReader.h; sourceTree = ""; }; + EDC78AB321CA19FA00E1863C /* CCSGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSGUIReader.h; sourceTree = ""; }; + EDC78AB421CA19FA00E1863C /* CCComAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComAttribute.cpp; sourceTree = ""; }; + EDC78AB521CA19FA00E1863C /* CCArmature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArmature.cpp; sourceTree = ""; }; + EDC78AB621CA19FA00E1863C /* CCActionObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionObject.cpp; sourceTree = ""; }; + EDC78AB721CA19FA00E1863C /* CCSkin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkin.h; sourceTree = ""; }; + EDC78D8621CA253000E1863C /* ui_Gray.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ui_Gray.frag; sourceTree = ""; }; + EDDDA78321B0E1C2008926F0 /* label_distanceNormal.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = label_distanceNormal.frag; sourceTree = ""; }; + EDDDA78421B11B0C008926F0 /* label_outline.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = label_outline.frag; sourceTree = ""; }; + EDE6456D21F017210063F6E4 /* ProgramState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramState.cpp; sourceTree = ""; }; + EDE6456E21F017210063F6E4 /* ShaderCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderCache.cpp; sourceTree = ""; }; + EDE6456F21F017210063F6E4 /* ProgramState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramState.h; sourceTree = ""; }; + EDE6457021F017210063F6E4 /* ShaderCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderCache.h; sourceTree = ""; }; + EDE856F921CB4B2400AC4C04 /* etc1_Gray.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = etc1_Gray.frag; sourceTree = ""; }; + EDE856FA21CB4B2400AC4C04 /* etc1.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = etc1.frag; sourceTree = ""; }; + EDF9D8A521AE9677004374AB /* positionTextureColor.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionTextureColor.frag; sourceTree = ""; }; + EDF9D8A621AE9678004374AB /* positionTextureColor.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = positionTextureColor.vert; sourceTree = ""; }; + EDF9D8A921AF92C5004374AB /* label_normal.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = label_normal.frag; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -6082,6 +3539,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 46535CD921ABD63B005B5370 /* Metal.framework in Frameworks */, + 46535CD521ABD559005B5370 /* libglcpp-library.a in Frameworks */, + 46535CD621ABD559005B5370 /* libmesa.a in Frameworks */, + 46535CD721ABD559005B5370 /* libglsl_optimizer.a in Frameworks */, ED682BBA213F5FC7001BF6CB /* libuv_a.a in Frameworks */, 46BDE4A81FA32D3400104C05 /* libbox2d.a in Frameworks */, 46270FA41E1CC6A200AAA098 /* libcrypto.a in Frameworks */, @@ -6130,6 +3591,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 462CBDDB21D46525005712AB /* libglsl_optimizer.a in Frameworks */, + 462CBDDC21D46525005712AB /* libmesa.a in Frameworks */, + 462CBDDD21D46525005712AB /* libglcpp-library.a in Frameworks */, ED682BC1213F63CB001BF6CB /* libuv_a.a in Frameworks */, 46BDE4AA1FA3316A00104C05 /* libbox2d.a in Frameworks */, 466F05251EF7659300B80080 /* libBulletCollision.a in Frameworks */, @@ -6153,36 +3617,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0634A4C4194B19E400E608AF /* ActionTimeline */ = { - isa = PBXGroup; - children = ( - C50306621B60B56C001E6D43 /* Skeleton */, - 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */, - 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */, - 38B8E2D319E66581002D7CE7 /* CSLoader.cpp */, - 38B8E2D419E66581002D7CE7 /* CSLoader.h */, - 0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */, - 0634A4C6194B19E400E608AF /* CCActionTimeline.h */, - 0634A4C7194B19E400E608AF /* CCActionTimelineCache.cpp */, - 0634A4C8194B19E400E608AF /* CCActionTimelineCache.h */, - 0634A4C9194B19E400E608AF /* CCFrame.cpp */, - 0634A4CA194B19E400E608AF /* CCFrame.h */, - 0634A4CD194B19E400E608AF /* CCTimeLine.cpp */, - 0634A4CE194B19E400E608AF /* CCTimeLine.h */, - 0634A4CF194B19E400E608AF /* CCTimelineMacro.h */, - ); - path = ActionTimeline; - sourceTree = ""; - }; - 0C261F251BE7528900707478 /* Light3DReader */ = { - isa = PBXGroup; - children = ( - 0C261F261BE7528900707478 /* Light3DReader.cpp */, - 0C261F271BE7528900707478 /* Light3DReader.h */, - ); - path = Light3DReader; - sourceTree = ""; - }; 1551A334158F2AB200E66CFE = { isa = PBXGroup; children = ( @@ -6192,26 +3626,20 @@ 50272538190BF1B900AAF4ED /* cocos2d.h */, 46A15FCE1807A544005B8026 /* README.md */, 50DC5180187B817900A9C23F /* RELEASE_NOTES.md */, + 46AF39FF21F1877100D5AFCD /* physics */, + EDC7894321CA19FA00E1863C /* editor-support */, 46A169A11807B037005B8026 /* 2d */, - B29594B81926D61F003EEF37 /* 3d */, 46A15FD01807A56F005B8026 /* audio */, 1A5700A2180BC5E60088DEC7 /* base */, - 1A01C67518F57BE800EFE3A6 /* deprecated */, - 1AD71CF7180E26E600808F54 /* editor-support */, - 46A167981807AF4D005B8026 /* extensions */, 1A57033E180BD0490088DEC7 /* external */, 1551A341158F2AB200E66CFE /* Frameworks */, 46A170851807CE87005B8026 /* math */, - B6DD2F351B04805400E47F5F /* navmesh */, 1AAF5360180E3374000584C8 /* network */, - 46A170611807CE7A005B8026 /* physics */, - B6CAAFD11AF9A98E00B9B856 /* physics3d */, 50ABBEDB1926664700A911A9 /* platform */, 1551A340158F2AB200E66CFE /* Products */, + 46F9B31021AFE64B009DF858 /* extensions */, + 4631CA9021AFD9F90000D408 /* ui */, 500DC89819105D41007B91BF /* renderer */, - 1AAF5849180E40B8000584C8 /* storage */, - 50F9654D1CD0360000ADE813 /* vr */, - 2905F9E618CF08D000240AA3 /* ui */, ); sourceTree = ""; usesTabs = 0; @@ -6229,6 +3657,22 @@ 1551A341158F2AB200E66CFE /* Frameworks */ = { isa = PBXGroup; children = ( + 462CBDDA21D46525005712AB /* libglcpp-library.a */, + 462CBDD821D46525005712AB /* libglsl_optimizer.a */, + 462CBDD921D46525005712AB /* libmesa.a */, + 46BD387621D35867002BD50F /* OpenGLES.framework */, + 46BD387421D35750002BD50F /* QuartzCore.framework */, + 46535CD821ABD63B005B5370 /* Metal.framework */, + 46BD387221D35727002BD50F /* Metal.framework */, + 46535CC821ABD352005B5370 /* libglcpp-library.a */, + 46535CCE21ABD4AB005B5370 /* libglcpp-library.a */, + 46535CC721ABD352005B5370 /* libglsl_optimizer.a */, + 46535CCD21ABD4AB005B5370 /* libglsl_optimizer.a */, + 46535CD421ABD559005B5370 /* libglsl_optimizer.a */, + 46535CC621ABD351005B5370 /* libmesa.a */, + 46535CCC21ABD4AB005B5370 /* libmesa.a */, + 46535CD221ABD559005B5370 /* libglcpp-library.a */, + 46535CD321ABD559005B5370 /* libmesa.a */, ED682BC4213F6CBE001BF6CB /* libuv_a.a */, ED682BC2213F6C7A001BF6CB /* libwebsockets.a */, ED682BB9213F5FC6001BF6CB /* libuv_a.a */, @@ -6297,66 +3741,6 @@ path = sweep; sourceTree = ""; }; - 182C5CAF1A95961E00C30D34 /* Node3DReader */ = { - isa = PBXGroup; - children = ( - 182C5CB01A95964700C30D34 /* Node3DReader.cpp */, - 182C5CB11A95964700C30D34 /* Node3DReader.h */, - ); - name = Node3DReader; - sourceTree = ""; - }; - 182C5CD31A98F2F400C30D34 /* Sprite3DReader */ = { - isa = PBXGroup; - children = ( - 182C5CD41A98F30500C30D34 /* Sprite3DReader.cpp */, - 182C5CD51A98F30500C30D34 /* Sprite3DReader.h */, - ); - name = Sprite3DReader; - sourceTree = ""; - }; - 182C5CE21A9D70C000C30D34 /* UserCameraReader */ = { - isa = PBXGroup; - children = ( - 182C5CE31A9D725400C30D34 /* UserCameraReader.cpp */, - 182C5CE41A9D725400C30D34 /* UserCameraReader.h */, - ); - name = UserCameraReader; - sourceTree = ""; - }; - 18956BAF1A9DFBEC006E9155 /* Particle3DReader */ = { - isa = PBXGroup; - children = ( - 18956BB01A9DFBFD006E9155 /* Particle3DReader.cpp */, - 18956BB11A9DFBFD006E9155 /* Particle3DReader.h */, - ); - name = Particle3DReader; - sourceTree = ""; - }; - 1A01C67518F57BE800EFE3A6 /* deprecated */ = { - isa = PBXGroup; - children = ( - 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */, - 1A01C67718F57BE800EFE3A6 /* CCArray.h */, - 1A01C67818F57BE800EFE3A6 /* CCBool.h */, - 1A01C67918F57BE800EFE3A6 /* CCDeprecated.cpp */, - 1A01C67A18F57BE800EFE3A6 /* CCDeprecated.h */, - 1A01C67B18F57BE800EFE3A6 /* CCDictionary.cpp */, - 1A01C67C18F57BE800EFE3A6 /* CCDictionary.h */, - 1A01C67D18F57BE800EFE3A6 /* CCDouble.h */, - 1A01C67E18F57BE800EFE3A6 /* CCFloat.h */, - 1A01C67F18F57BE800EFE3A6 /* CCInteger.h */, - 1A01C6A218F58F7500EFE3A6 /* CCNotificationCenter.cpp */, - 1A01C6A318F58F7500EFE3A6 /* CCNotificationCenter.h */, - 1A01C68018F57BE800EFE3A6 /* CCSet.cpp */, - 1A01C68118F57BE800EFE3A6 /* CCSet.h */, - 1A01C68218F57BE800EFE3A6 /* CCString.cpp */, - 1A01C68318F57BE800EFE3A6 /* CCString.h */, - ); - name = deprecated; - path = ../cocos/deprecated; - sourceTree = ""; - }; 1A087AE51860400400196EF5 /* edtaa3func */ = { isa = PBXGroup; children = ( @@ -6456,13 +3840,14 @@ 1A5700A2180BC5E60088DEC7 /* base */ = { isa = PBXGroup; children = ( + ED75D41F21E3030E0052B87E /* ccConstants.h */, + 461FE08321C34EEB00E5378F /* CCEnumClass.h */, 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */, 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */, 505385001B01887A00793096 /* CCProperties.h */, 505385011B01887A00793096 /* CCProperties.cpp */, B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */, B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */, - D0FD03391A3B51AA00825BB5 /* allocator */, 299CF1F919A434BC00C378C1 /* ccRandom.cpp */, 299CF1FA19A434BC00C378C1 /* ccRandom.h */, 464AD6E3197EBB1400E502D8 /* pvr.cpp */, @@ -6492,8 +3877,6 @@ 50ABBDCD1925AB6E00A911A9 /* CCConsole.h */, 50ABBDCE1925AB6E00A911A9 /* CCData.cpp */, 50ABBDCF1925AB6E00A911A9 /* CCData.h */, - 50ABBDD01925AB6E00A911A9 /* CCDataVisitor.cpp */, - 50ABBDD11925AB6E00A911A9 /* CCDataVisitor.h */, 50ABBDD21925AB6E00A911A9 /* CCDirector.cpp */, 50ABBDD31925AB6E00A911A9 /* CCDirector.h */, 50ABBDD41925AB6E00A911A9 /* CCEvent.cpp */, @@ -6582,8 +3965,6 @@ 1A570109180BC8DC0088DEC7 /* draw-nodes */ = { isa = PBXGroup; children = ( - 1A57010A180BC8ED0088DEC7 /* CCDrawingPrimitives.cpp */, - 1A57010B180BC8EE0088DEC7 /* CCDrawingPrimitives.h */, 1A57010C180BC8EE0088DEC7 /* CCDrawNode.cpp */, 1A57010D180BC8EE0088DEC7 /* CCDrawNode.h */, ); @@ -6593,8 +3974,6 @@ 1A570116180BC8FE0088DEC7 /* effects */ = { isa = PBXGroup; children = ( - 1A570117180BC90D0088DEC7 /* CCGrabber.cpp */, - 1A570118180BC90D0088DEC7 /* CCGrabber.h */, 1A570119180BC90D0088DEC7 /* CCGrid.cpp */, 1A57011A180BC90D0088DEC7 /* CCGrid.h */, ); @@ -6620,12 +3999,8 @@ 1A570191180BCB590088DEC7 /* CCLabel.h */, 1A570192180BCB590088DEC7 /* CCLabelAtlas.cpp */, 1A570193180BCB590088DEC7 /* CCLabelAtlas.h */, - 1A570194180BCB590088DEC7 /* CCLabelBMFont.cpp */, - 1A570195180BCB590088DEC7 /* CCLabelBMFont.h */, 1A570197180BCB590088DEC7 /* CCLabelTextFormatter.cpp */, 1A570198180BCB590088DEC7 /* CCLabelTextFormatter.h */, - 1A570199180BCB590088DEC7 /* CCLabelTTF.cpp */, - 1A57019A180BCB590088DEC7 /* CCLabelTTF.h */, ); name = "label-nodes"; sourceTree = ""; @@ -7001,115 +4376,6 @@ path = ../external/freetype2/prebuilt/ios; sourceTree = ""; }; - 1A8C5946180E930E00EF57C3 /* cocostudio */ = { - isa = PBXGroup; - children = ( - 94A6DF031C7303FD0094AEF7 /* LocalizationManager.cpp */, - 94A6DF041C7303FD0094AEF7 /* LocalizationManager.h */, - 382384021A259005002C4610 /* CSParseBinary_generated.h */, - 182C5CAD1A95961600C30D34 /* CSParse3DBinary_generated.h */, - 382384051A25900F002C4610 /* FlatBuffersSerialize.cpp */, - 382384061A25900F002C4610 /* FlatBuffersSerialize.h */, - 38ACD1FA1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp */, - 38ACD1FB1A27111900C3093D /* WidgetCallBackHandlerProtocol.h */, - 29E99D1C1957BA7000046604 /* CocoLoader.cpp */, - 29E99D1D1957BA7000046604 /* CocoLoader.h */, - 0634A4C4194B19E400E608AF /* ActionTimeline */, - 50FCEB6818C72017004AD434 /* WidgetReader */, - 06CAAAC1186AD63B0012A414 /* TriggerObj.h */, - 06CAAABC186AD63B0012A414 /* TriggerBase.cpp */, - 06CAAABD186AD63B0012A414 /* TriggerBase.h */, - 06CAAABE186AD63B0012A414 /* TriggerMng.cpp */, - 06CAAABF186AD63B0012A414 /* TriggerMng.h */, - 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */, - 1A8C5948180E930E00EF57C3 /* CCActionFrame.cpp */, - 1A8C5949180E930E00EF57C3 /* CCActionFrame.h */, - 1A8C594A180E930E00EF57C3 /* CCActionFrameEasing.cpp */, - 1A8C594B180E930E00EF57C3 /* CCActionFrameEasing.h */, - 1A8C594C180E930E00EF57C3 /* CCActionManagerEx.cpp */, - 1A8C594D180E930E00EF57C3 /* CCActionManagerEx.h */, - 1A8C594E180E930E00EF57C3 /* CCActionNode.cpp */, - 1A8C594F180E930E00EF57C3 /* CCActionNode.h */, - 1A8C5950180E930E00EF57C3 /* CCActionObject.cpp */, - 1A8C5951180E930E00EF57C3 /* CCActionObject.h */, - 1A8C5952180E930E00EF57C3 /* CCArmature.cpp */, - 1A8C5953180E930E00EF57C3 /* CCArmature.h */, - 1A8C5954180E930E00EF57C3 /* CCArmatureAnimation.cpp */, - 1A8C5955180E930E00EF57C3 /* CCArmatureAnimation.h */, - 1A8C5956180E930E00EF57C3 /* CCArmatureDataManager.cpp */, - 1A8C5957180E930E00EF57C3 /* CCArmatureDataManager.h */, - 1A8C5958180E930E00EF57C3 /* CCArmatureDefine.cpp */, - 1A8C5959180E930E00EF57C3 /* CCArmatureDefine.h */, - 1A8C595A180E930E00EF57C3 /* CCBatchNode.cpp */, - 1A8C595B180E930E00EF57C3 /* CCBatchNode.h */, - 1A8C595C180E930E00EF57C3 /* CCBone.cpp */, - 1A8C595D180E930E00EF57C3 /* CCBone.h */, - 1A8C595E180E930E00EF57C3 /* CCColliderDetector.cpp */, - 1A8C595F180E930E00EF57C3 /* CCColliderDetector.h */, - 373B910718787C0B00198F86 /* CCComBase.h */, - 1A8C5960180E930E00EF57C3 /* CCComAttribute.cpp */, - 1A8C5961180E930E00EF57C3 /* CCComAttribute.h */, - 1A8C5962180E930E00EF57C3 /* CCComAudio.cpp */, - 1A8C5963180E930E00EF57C3 /* CCComAudio.h */, - 1A8C5964180E930E00EF57C3 /* CCComController.cpp */, - 1A8C5965180E930E00EF57C3 /* CCComController.h */, - 1A8C5966180E930E00EF57C3 /* CCComRender.cpp */, - 1A8C5967180E930E00EF57C3 /* CCComRender.h */, - 43015DBD1B60DF4000E75161 /* CCComExtensionData.cpp */, - 43015DBE1B60DF4000E75161 /* CCComExtensionData.h */, - 1A8C5968180E930E00EF57C3 /* CCDataReaderHelper.cpp */, - 1A8C5969180E930E00EF57C3 /* CCDataReaderHelper.h */, - 1A8C596A180E930E00EF57C3 /* CCDatas.cpp */, - 1A8C596B180E930E00EF57C3 /* CCDatas.h */, - 1A8C596C180E930E00EF57C3 /* CCDecorativeDisplay.cpp */, - 1A8C596D180E930E00EF57C3 /* CCDecorativeDisplay.h */, - 1A8C596E180E930E00EF57C3 /* CCDisplayFactory.cpp */, - 1A8C596F180E930E00EF57C3 /* CCDisplayFactory.h */, - 1A8C5970180E930E00EF57C3 /* CCDisplayManager.cpp */, - 1A8C5971180E930E00EF57C3 /* CCDisplayManager.h */, - 1A8C5972180E930E00EF57C3 /* CCInputDelegate.cpp */, - 1A8C5973180E930E00EF57C3 /* CCInputDelegate.h */, - 1A8C5974180E930E00EF57C3 /* CCProcessBase.cpp */, - 1A8C5975180E930E00EF57C3 /* CCProcessBase.h */, - 1A8C5976180E930E00EF57C3 /* CCSGUIReader.cpp */, - 1A8C5977180E930E00EF57C3 /* CCSGUIReader.h */, - 1A8C5978180E930E00EF57C3 /* CCSkin.cpp */, - 1A8C5979180E930E00EF57C3 /* CCSkin.h */, - 1A8C597A180E930E00EF57C3 /* CCSpriteFrameCacheHelper.cpp */, - 1A8C597B180E930E00EF57C3 /* CCSpriteFrameCacheHelper.h */, - 1A8C597C180E930E00EF57C3 /* CCSSceneReader.cpp */, - 1A8C597D180E930E00EF57C3 /* CCSSceneReader.h */, - 1A8C597E180E930E00EF57C3 /* CCTransformHelp.cpp */, - 1A8C597F180E930E00EF57C3 /* CCTransformHelp.h */, - 1A8C5980180E930E00EF57C3 /* CCTween.cpp */, - 1A8C5981180E930E00EF57C3 /* CCTween.h */, - 1A8C5984180E930E00EF57C3 /* CCUtilMath.cpp */, - 1A8C5985180E930E00EF57C3 /* CCUtilMath.h */, - 1A8C5986180E930E00EF57C3 /* CocoStudio.h */, - 38D9629C1ACA9721007C6FAF /* CocoStudio.cpp */, - 1A8C5989180E930E00EF57C3 /* DictionaryHelper.cpp */, - 1A8C598A180E930E00EF57C3 /* DictionaryHelper.h */, - ); - path = cocostudio; - sourceTree = ""; - }; - 1AAF5350180E305F000584C8 /* assets-manager */ = { - isa = PBXGroup; - children = ( - 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */, - 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */, - 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */, - 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */, - 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */, - 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */, - 15B3707619EE414C00ABE682 /* Manifest.cpp */, - 15B3707719EE414C00ABE682 /* Manifest.h */, - 1AAF5351180E3060000584C8 /* AssetsManager.cpp */, - 1AAF5352180E3060000584C8 /* AssetsManager.h */, - ); - path = "assets-manager"; - sourceTree = ""; - }; 1AAF5360180E3374000584C8 /* network */ = { isa = PBXGroup; children = ( @@ -7187,26 +4453,6 @@ path = ../external/curl/prebuilt/ios; sourceTree = ""; }; - 1AAF5849180E40B8000584C8 /* storage */ = { - isa = PBXGroup; - children = ( - 1AAF584A180E40B9000584C8 /* local-storage */, - ); - name = storage; - path = ../cocos/storage; - sourceTree = ""; - }; - 1AAF584A180E40B9000584C8 /* local-storage */ = { - isa = PBXGroup; - children = ( - 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */, - 1AAF584B180E40B9000584C8 /* Android.mk */, - 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */, - 1AAF584D180E40B9000584C8 /* LocalStorage.h */, - ); - path = "local-storage"; - sourceTree = ""; - }; 1AC026971914068200FA920D /* ConvertUTF */ = { isa = PBXGroup; children = ( @@ -7218,186 +4464,6 @@ path = ../external/ConvertUTF; sourceTree = ""; }; - 1AD71CF7180E26E600808F54 /* editor-support */ = { - isa = PBXGroup; - children = ( - 1AD71CF8180E26E600808F54 /* cocosbuilder */, - 1A8C5946180E930E00EF57C3 /* cocostudio */, - 1AD71D7C180E26E600808F54 /* spine */, - ); - name = "editor-support"; - path = "../cocos/editor-support"; - sourceTree = ""; - }; - 1AD71CF8180E26E600808F54 /* cocosbuilder */ = { - isa = PBXGroup; - children = ( - 1AD71CFA180E26E600808F54 /* CCBAnimationManager.cpp */, - 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */, - 1AD71CFC180E26E600808F54 /* CCBFileLoader.cpp */, - 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */, - 1AD71CFE180E26E600808F54 /* CCBKeyframe.cpp */, - 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */, - 1AD71D00180E26E600808F54 /* CCBMemberVariableAssigner.h */, - 1AD71D01180E26E600808F54 /* CCBReader.cpp */, - 1AD71D02180E26E600808F54 /* CCBReader.h */, - 1AD71D03180E26E600808F54 /* CCBSelectorResolver.h */, - 1AD71D04180E26E600808F54 /* CCBSequence.cpp */, - 1AD71D05180E26E600808F54 /* CCBSequence.h */, - 1AD71D06180E26E600808F54 /* CCBSequenceProperty.cpp */, - 1AD71D07180E26E600808F54 /* CCBSequenceProperty.h */, - 1AD71D0A180E26E600808F54 /* CCControlButtonLoader.cpp */, - 1AD71D0B180E26E600808F54 /* CCControlButtonLoader.h */, - 1AD71D0C180E26E600808F54 /* CCControlLoader.cpp */, - 1AD71D0D180E26E600808F54 /* CCControlLoader.h */, - 1AD71D0E180E26E600808F54 /* CCLabelBMFontLoader.cpp */, - 1AD71D0F180E26E600808F54 /* CCLabelBMFontLoader.h */, - 1AD71D10180E26E600808F54 /* CCLabelTTFLoader.cpp */, - 1AD71D11180E26E600808F54 /* CCLabelTTFLoader.h */, - 1AD71D12180E26E600808F54 /* CCLayerColorLoader.cpp */, - 1AD71D13180E26E600808F54 /* CCLayerColorLoader.h */, - 1AD71D14180E26E600808F54 /* CCLayerGradientLoader.cpp */, - 1AD71D15180E26E600808F54 /* CCLayerGradientLoader.h */, - 1AD71D16180E26E600808F54 /* CCLayerLoader.cpp */, - 1AD71D17180E26E600808F54 /* CCLayerLoader.h */, - 1AD71D18180E26E600808F54 /* CCMenuItemImageLoader.cpp */, - 1AD71D19180E26E600808F54 /* CCMenuItemImageLoader.h */, - 1AD71D1A180E26E600808F54 /* CCMenuItemLoader.cpp */, - 1AD71D1B180E26E600808F54 /* CCMenuItemLoader.h */, - 1AD71D1C180E26E600808F54 /* CCMenuLoader.h */, - 1AD71D1D180E26E600808F54 /* CCNode+CCBRelativePositioning.cpp */, - 1AD71D1E180E26E600808F54 /* CCNode+CCBRelativePositioning.h */, - 1AD71D1F180E26E600808F54 /* CCNodeLoader.cpp */, - 1AD71D20180E26E600808F54 /* CCNodeLoader.h */, - 1AD71D21180E26E600808F54 /* CCNodeLoaderLibrary.cpp */, - 1AD71D22180E26E600808F54 /* CCNodeLoaderLibrary.h */, - 1AD71D23180E26E600808F54 /* CCNodeLoaderListener.h */, - 1AD71D24180E26E600808F54 /* CCParticleSystemQuadLoader.cpp */, - 1AD71D25180E26E600808F54 /* CCParticleSystemQuadLoader.h */, - 1AD71D26180E26E600808F54 /* CCScale9SpriteLoader.cpp */, - 1AD71D27180E26E600808F54 /* CCScale9SpriteLoader.h */, - 1AD71D28180E26E600808F54 /* CCScrollViewLoader.cpp */, - 1AD71D29180E26E600808F54 /* CCScrollViewLoader.h */, - 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */, - 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */, - 1AD71D2C180E26E600808F54 /* CocosBuilder.h */, - ); - path = cocosbuilder; - sourceTree = ""; - }; - 1AD71D7C180E26E600808F54 /* spine */ = { - isa = PBXGroup; - children = ( - 46BDE4B11FA86C7F00104C05 /* Array.c */, - 46BDE4B21FA86C7F00104C05 /* Array.h */, - 46BDE4B31FA86C7F00104C05 /* ClippingAttachment.c */, - 46BDE4B41FA86C7F00104C05 /* ClippingAttachment.h */, - 46BDE4B51FA86C7F00104C05 /* Color.c */, - 46BDE4B61FA86C7F00104C05 /* Color.h */, - 46BDE4B71FA86C7F00104C05 /* dll.h */, - 46BDE4B81FA86C7F00104C05 /* PointAttachment.c */, - 46BDE4B91FA86C7F00104C05 /* PointAttachment.h */, - 46BDE4BA1FA86C7F00104C05 /* SkeletonClipping.c */, - 46BDE4BB1FA86C7F00104C05 /* SkeletonClipping.h */, - 46BDE4BC1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp */, - 46BDE4BD1FA86C7F00104C05 /* SkeletonTwoColorBatch.h */, - 46BDE4BE1FA86C7F00104C05 /* Triangulator.c */, - 46BDE4BF1FA86C7F00104C05 /* Triangulator.h */, - 46BDE4C01FA86C7F00104C05 /* VertexEffect.c */, - 46BDE4C11FA86C7F00104C05 /* VertexEffect.h */, - 503341961D9DC7B400770EC7 /* kvec.h */, - 503341971D9DC7B400770EC7 /* SkeletonBinary.c */, - 503341981D9DC7B400770EC7 /* SkeletonBinary.h */, - 5020A1051D49912500E80C72 /* Animation.c */, - 5020A1061D49912500E80C72 /* Animation.h */, - 5020A1071D49912500E80C72 /* AnimationState.c */, - 5020A1081D49912500E80C72 /* AnimationState.h */, - 5020A1091D49912500E80C72 /* AnimationStateData.c */, - 5020A10A1D49912500E80C72 /* AnimationStateData.h */, - 5020A10B1D49912500E80C72 /* Atlas.c */, - 5020A10C1D49912500E80C72 /* Atlas.h */, - 5020A10D1D49912500E80C72 /* AtlasAttachmentLoader.c */, - 5020A10E1D49912500E80C72 /* AtlasAttachmentLoader.h */, - 5020A10F1D49912500E80C72 /* Attachment.c */, - 5020A1101D49912500E80C72 /* Attachment.h */, - 5020A1111D49912500E80C72 /* AttachmentLoader.c */, - 5020A1121D49912500E80C72 /* AttachmentLoader.h */, - 5020A1131D49912500E80C72 /* AttachmentVertices.cpp */, - 5020A1141D49912500E80C72 /* AttachmentVertices.h */, - 5020A1151D49912500E80C72 /* Bone.c */, - 5020A1161D49912500E80C72 /* Bone.h */, - 5020A1171D49912500E80C72 /* BoneData.c */, - 5020A1181D49912500E80C72 /* BoneData.h */, - 5020A1191D49912500E80C72 /* BoundingBoxAttachment.c */, - 5020A11A1D49912500E80C72 /* BoundingBoxAttachment.h */, - 5020A11B1D49912500E80C72 /* Cocos2dAttachmentLoader.cpp */, - 5020A11C1D49912500E80C72 /* Cocos2dAttachmentLoader.h */, - 5020A11D1D49912500E80C72 /* Event.c */, - 5020A11E1D49912500E80C72 /* Event.h */, - 5020A11F1D49912500E80C72 /* EventData.c */, - 5020A1201D49912500E80C72 /* EventData.h */, - 5020A1211D49912500E80C72 /* extension.c */, - 5020A1221D49912500E80C72 /* extension.h */, - 5020A1231D49912500E80C72 /* IkConstraint.c */, - 5020A1241D49912500E80C72 /* IkConstraint.h */, - 5020A1251D49912500E80C72 /* IkConstraintData.c */, - 5020A1261D49912500E80C72 /* IkConstraintData.h */, - 5020A1271D49912500E80C72 /* Json.c */, - 5020A1281D49912500E80C72 /* Json.h */, - 5020A1291D49912500E80C72 /* MeshAttachment.c */, - 5020A12A1D49912500E80C72 /* MeshAttachment.h */, - 5020A12B1D49912500E80C72 /* PathAttachment.c */, - 5020A12C1D49912500E80C72 /* PathAttachment.h */, - 5020A12D1D49912500E80C72 /* PathConstraint.c */, - 5020A12E1D49912500E80C72 /* PathConstraint.h */, - 5020A12F1D49912500E80C72 /* PathConstraintData.c */, - 5020A1301D49912500E80C72 /* PathConstraintData.h */, - 5020A1311D49912500E80C72 /* RegionAttachment.c */, - 5020A1321D49912500E80C72 /* RegionAttachment.h */, - 5020A1331D49912500E80C72 /* Skeleton.c */, - 5020A1341D49912500E80C72 /* Skeleton.h */, - 5020A1351D49912500E80C72 /* SkeletonAnimation.cpp */, - 5020A1361D49912500E80C72 /* SkeletonAnimation.h */, - 5020A1371D49912500E80C72 /* SkeletonBatch.cpp */, - 5020A1381D49912500E80C72 /* SkeletonBatch.h */, - 5020A1391D49912500E80C72 /* SkeletonBounds.c */, - 5020A13A1D49912500E80C72 /* SkeletonBounds.h */, - 5020A13B1D49912500E80C72 /* SkeletonData.c */, - 5020A13C1D49912500E80C72 /* SkeletonData.h */, - 5020A13D1D49912500E80C72 /* SkeletonJson.c */, - 5020A13E1D49912500E80C72 /* SkeletonJson.h */, - 5020A13F1D49912500E80C72 /* SkeletonRenderer.cpp */, - 5020A1401D49912500E80C72 /* SkeletonRenderer.h */, - 5020A1411D49912500E80C72 /* Skin.c */, - 5020A1421D49912500E80C72 /* Skin.h */, - 5020A1431D49912500E80C72 /* Slot.c */, - 5020A1441D49912500E80C72 /* Slot.h */, - 5020A1451D49912500E80C72 /* SlotData.c */, - 5020A1461D49912500E80C72 /* SlotData.h */, - 5020A1471D49912500E80C72 /* spine-cocos2dx.cpp */, - 5020A1481D49912500E80C72 /* spine-cocos2dx.h */, - 5020A1491D49912500E80C72 /* spine.h */, - 5020A14A1D49912500E80C72 /* TransformConstraint.c */, - 5020A14B1D49912500E80C72 /* TransformConstraint.h */, - 5020A14C1D49912500E80C72 /* TransformConstraintData.c */, - 5020A14D1D49912500E80C72 /* TransformConstraintData.h */, - 5020A14E1D49912500E80C72 /* VertexAttachment.c */, - 5020A14F1D49912500E80C72 /* VertexAttachment.h */, - ); - path = spine; - sourceTree = ""; - }; - 1AD71EEB180E27CF00808F54 /* physics-nodes */ = { - isa = PBXGroup; - children = ( - 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */, - 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */, - 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */, - 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */, - ); - path = "physics-nodes"; - sourceTree = ""; - }; 1AD71EF8180E28C400808F54 /* json */ = { isa = PBXGroup; children = ( @@ -7444,65 +4510,6 @@ name = mac; sourceTree = ""; }; - 2905F9E618CF08D000240AA3 /* ui */ = { - isa = PBXGroup; - children = ( - 29CB8F531929D67D00C841D6 /* widgets */, - 29CB8F521929D65500C841D6 /* experimental */, - 29CB8F511929D64500C841D6 /* base */, - 29CB8F501929D63600C841D6 /* layout */, - 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */, - 2905F9EA18CF08D000240AA3 /* CocosGUI.h */, - ); - name = ui; - path = ../cocos/ui; - sourceTree = ""; - }; - 291A091F1C5F06530068C1D2 /* Mac */ = { - isa = PBXGroup; - children = ( - 291A09221C5F06A60068C1D2 /* CCUIEditBoxMac.h */, - 291A09231C5F06A60068C1D2 /* CCUIEditBoxMac.mm */, - 2962D5FD1C61DF1A004821A3 /* CCUIMultilineTextField.h */, - 2962D5FE1C61DF1A004821A3 /* CCUIMultilineTextField.m */, - 2962D5ED1C61CF3F004821A3 /* CCUISingleLineTextField.h */, - 2962D5EE1C61CF3F004821A3 /* CCUISingleLineTextField.m */, - 2962D5F51C61DBBF004821A3 /* CCUIPasswordTextField.h */, - 2962D5F61C61DBBF004821A3 /* CCUIPasswordTextField.m */, - 2962D5E71C61CBF9004821A3 /* CCUITextInput.h */, - 2962D6011C61F02E004821A3 /* CCUITextFieldFormatter.h */, - 2962D6021C61F02E004821A3 /* CCUITextFieldFormatter.m */, - ); - path = Mac; - sourceTree = ""; - }; - 292DB12E19B4574100A80320 /* UIEditBox */ = { - isa = PBXGroup; - children = ( - 291A091F1C5F06530068C1D2 /* Mac */, - 2980F0161BA9A5550059E678 /* iOS */, - A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */, - A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */, - 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */, - 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */, - 292DB12F19B4574100A80320 /* UIEditBox.cpp */, - 292DB13019B4574100A80320 /* UIEditBox.h */, - 292DB13119B4574100A80320 /* UIEditBoxImpl.h */, - 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */, - 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */, - 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */, - 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */, - 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */, - 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */, - 29DA08F01C63351600F4052B /* UIEditBoxImpl-linux.cpp */, - 29DA08F11C63351600F4052B /* UIEditBoxImpl-linux.h */, - 29DA08F21C63351600F4052B /* UIEditBoxImpl-winrt.cpp */, - 29DA08F31C63351600F4052B /* UIEditBoxImpl-winrt.h */, - 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */, - ); - path = UIEditBox; - sourceTree = ""; - }; 292F1A5F1A52446100E479F8 /* mac */ = { isa = PBXGroup; children = ( @@ -7513,118 +4520,6 @@ name = mac; sourceTree = ""; }; - 2980F0161BA9A5550059E678 /* iOS */ = { - isa = PBXGroup; - children = ( - 2980F0171BA9A5550059E678 /* CCUIEditBoxIOS.h */, - 2980F0181BA9A5550059E678 /* CCUIEditBoxIOS.mm */, - 2980F0191BA9A5550059E678 /* CCUIMultilineTextField.h */, - 2980F01A1BA9A5550059E678 /* CCUIMultilineTextField.mm */, - 2980F01B1BA9A5550059E678 /* CCUISingleLineTextField.h */, - 2980F01C1BA9A5550059E678 /* CCUISingleLineTextField.mm */, - 2980F01D1BA9A5550059E678 /* CCUITextInput.h */, - 2980F01E1BA9A5550059E678 /* UITextField+CCUITextInput.h */, - 2980F01F1BA9A5550059E678 /* UITextField+CCUITextInput.mm */, - 2980F0201BA9A5550059E678 /* UITextView+CCUITextInput.h */, - 2980F0211BA9A5550059E678 /* UITextView+CCUITextInput.mm */, - ); - path = iOS; - sourceTree = ""; - }; - 29CB8F501929D63600C841D6 /* layout */ = { - isa = PBXGroup; - children = ( - 50E6D32E18E174130051CA34 /* UIHBox.cpp */, - 50E6D32F18E174130051CA34 /* UIHBox.h */, - 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */, - 50E6D33118E174130051CA34 /* UIRelativeBox.h */, - 50E6D33218E174130051CA34 /* UIVBox.cpp */, - 50E6D33318E174130051CA34 /* UIVBox.h */, - 2905F9F818CF08D000240AA3 /* UILayout.cpp */, - 2905F9F918CF08D000240AA3 /* UILayout.h */, - 2905F9FC18CF08D000240AA3 /* UILayoutParameter.cpp */, - 2905F9FD18CF08D000240AA3 /* UILayoutParameter.h */, - 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */, - 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */, - ); - name = layout; - sourceTree = ""; - }; - 29CB8F511929D64500C841D6 /* base */ = { - isa = PBXGroup; - children = ( - 38B8E2DF19E671D2002D7CE7 /* UILayoutComponent.cpp */, - 38B8E2E019E671D2002D7CE7 /* UILayoutComponent.h */, - 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */, - 2958244A19873D8E00F9746D /* UIScale9Sprite.h */, - 29080DEB191B82CE0066F8DF /* UIDeprecated.h */, - 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */, - 2905FA1318CF08D100240AA3 /* UIWidget.cpp */, - 2905FA1418CF08D100240AA3 /* UIWidget.h */, - 2905F9F418CF08D000240AA3 /* UIHelper.cpp */, - 2905F9F518CF08D000240AA3 /* UIHelper.h */, - 2905F9EB18CF08D000240AA3 /* GUIDefine.h */, - ); - name = base; - sourceTree = ""; - }; - 29CB8F521929D65500C841D6 /* experimental */ = { - isa = PBXGroup; - children = ( - 29394CEC19B01DBA00D2DE1A /* UIWebView.h */, - 29394CED19B01DBA00D2DE1A /* UIWebView.mm */, - 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */, - 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */, - 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, - 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */, - ); - name = experimental; - sourceTree = ""; - }; - 29CB8F531929D67D00C841D6 /* widgets */ = { - isa = PBXGroup; - children = ( - C5F516101C8216660013B695 /* UITabControl.cpp */, - C5F516111C8216660013B695 /* UITabControl.h */, - 292DB12E19B4574100A80320 /* UIEditBox */, - 2905F9FE18CF08D000240AA3 /* UIListView.cpp */, - 2905F9FF18CF08D000240AA3 /* UIListView.h */, - 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */, - 2905FA0118CF08D000240AA3 /* UILoadingBar.h */, - 2905FA0218CF08D000240AA3 /* UIPageView.cpp */, - 2905FA0318CF08D000240AA3 /* UIPageView.h */, - B5A738941BB0051F00BAAEF8 /* UIPageViewIndicator.cpp */, - B5A738951BB0051F00BAAEF8 /* UIPageViewIndicator.h */, - 2905FA0418CF08D000240AA3 /* UIRichText.cpp */, - 2905FA0518CF08D000240AA3 /* UIRichText.h */, - 2905FA0718CF08D000240AA3 /* UIScrollView.cpp */, - 2905FA0818CF08D000240AA3 /* UIScrollView.h */, - B5668D7B1B3838E4003CBD5E /* UIScrollViewBar.cpp */, - B5668D7C1B3838E4003CBD5E /* UIScrollViewBar.h */, - 2905FA0918CF08D000240AA3 /* UISlider.cpp */, - 2905FA0A18CF08D100240AA3 /* UISlider.h */, - 2905FA0B18CF08D100240AA3 /* UIText.cpp */, - 2905FA0C18CF08D100240AA3 /* UIText.h */, - 2905FA0D18CF08D100240AA3 /* UITextAtlas.cpp */, - 2905FA0E18CF08D100240AA3 /* UITextAtlas.h */, - 2905FA0F18CF08D100240AA3 /* UITextBMFont.cpp */, - 2905FA1018CF08D100240AA3 /* UITextBMFont.h */, - 2905FA1118CF08D100240AA3 /* UITextField.cpp */, - 2905FA1218CF08D100240AA3 /* UITextField.h */, - 2905F9F018CF08D000240AA3 /* UIButton.cpp */, - 2905F9F118CF08D000240AA3 /* UIButton.h */, - B5CE6DBC1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp */, - B5CE6DBD1B3BF2B1002B0419 /* UIAbstractCheckButton.h */, - 2905F9F218CF08D000240AA3 /* UICheckBox.cpp */, - 2905F9F318CF08D000240AA3 /* UICheckBox.h */, - B5CE6DC61B3C05BA002B0419 /* UIRadioButton.cpp */, - B5CE6DC71B3C05BA002B0419 /* UIRadioButton.h */, - 2905F9F618CF08D000240AA3 /* UIImageView.cpp */, - 2905F9F718CF08D000240AA3 /* UIImageView.h */, - ); - name = widgets; - sourceTree = ""; - }; 382383E11A258FA7002C4610 /* flatbuffers */ = { isa = PBXGroup; children = ( @@ -7643,77 +4538,214 @@ path = ../external/flatbuffers; sourceTree = ""; }; - 382384171A2590D2002C4610 /* ComAudioReader */ = { - isa = PBXGroup; - children = ( - 382384181A2590D2002C4610 /* ComAudioReader.cpp */, - 382384191A2590D2002C4610 /* ComAudioReader.h */, - ); - path = ComAudioReader; - sourceTree = ""; - }; - 3823841E1A2590DA002C4610 /* GameMapReader */ = { - isa = PBXGroup; - children = ( - 3823841F1A2590DA002C4610 /* GameMapReader.cpp */, - 382384201A2590DA002C4610 /* GameMapReader.h */, - ); - path = GameMapReader; - sourceTree = ""; - }; - 382384251A2590F9002C4610 /* NodeReader */ = { - isa = PBXGroup; - children = ( - 382384261A2590F9002C4610 /* NodeReader.cpp */, - 382384271A2590F9002C4610 /* NodeReader.h */, - ); - path = NodeReader; - sourceTree = ""; - }; - 3823842C1A259112002C4610 /* ParticleReader */ = { - isa = PBXGroup; - children = ( - 3823842D1A259112002C4610 /* ParticleReader.cpp */, - 3823842E1A259112002C4610 /* ParticleReader.h */, + 40FE102F21F070640061C04F /* CCControlExtension */ = { + isa = PBXGroup; + children = ( + 40FE103021F070640061C04F /* CCControlHuePicker.h */, + 40FE103121F070640061C04F /* CCControlUtils.cpp */, + 40FE103221F070640061C04F /* CCControlColourPicker.cpp */, + 40FE103321F070640061C04F /* CCControlSwitch.cpp */, + 40FE103421F070640061C04F /* CCControlUtils.h */, + 40FE103521F070640061C04F /* CCInvocation.cpp */, + 40FE103621F070640061C04F /* CCControlStepper.cpp */, + 40FE103721F070640061C04F /* CCControl.cpp */, + 40FE103821F070640061C04F /* CCControlButton.cpp */, + 40FE103921F070640061C04F /* CCControlPotentiometer.cpp */, + 40FE103A21F070640061C04F /* CCControl.h */, + 40FE103B21F070640061C04F /* CCControlExtensions.h */, + 40FE103C21F070640061C04F /* CCControlHuePicker.cpp */, + 40FE103D21F070640061C04F /* CCControlColourPicker.h */, + 40FE103E21F070640061C04F /* CCControlSaturationBrightnessPicker.cpp */, + 40FE103F21F070640061C04F /* CCControlButton.h */, + 40FE104021F070640061C04F /* CCInvocation.h */, + 40FE104121F070640061C04F /* CCControlSlider.h */, + 40FE104221F070640061C04F /* CCControlStepper.h */, + 40FE104321F070640061C04F /* CCControlSlider.cpp */, + 40FE104421F070640061C04F /* CCControlSaturationBrightnessPicker.h */, + 40FE104521F070640061C04F /* CCControlPotentiometer.h */, + 40FE104621F070640061C04F /* CCControlSwitch.h */, ); - path = ParticleReader; + path = CCControlExtension; sourceTree = ""; }; - 382384331A259126002C4610 /* ProjectNodeReader */ = { - isa = PBXGroup; - children = ( - 382384341A259126002C4610 /* ProjectNodeReader.cpp */, - 382384351A259126002C4610 /* ProjectNodeReader.h */, + 460D4CC821A545420075726E /* shaders */ = { + isa = PBXGroup; + children = ( + EDE856F921CB4B2400AC4C04 /* etc1_Gray.frag */, + EDE856FA21CB4B2400AC4C04 /* etc1.frag */, + EDC78D8621CA253000E1863C /* ui_Gray.frag */, + ED5C8CBC21C0B3C100F280A7 /* label_distanceFieldGlow.frag */, + EDDDA78421B11B0C008926F0 /* label_outline.frag */, + EDDDA78321B0E1C2008926F0 /* label_distanceNormal.frag */, + EDF9D8A921AF92C5004374AB /* label_normal.frag */, + EDF9D8A521AE9677004374AB /* positionTextureColor.frag */, + EDF9D8A621AE9678004374AB /* positionTextureColor.vert */, + ED5C8CBD21C0B5B700F280A7 /* positionColor.frag */, + ED5C8CBE21C0B5B800F280A7 /* positionColor.vert */, + ED5C8CC021C0BB3200F280A7 /* positionColorLengthTexture.frag */, + ED5C8CC121C0BB3300F280A7 /* positionColorLengthTexture.vert */, + ED5C8CBF21C0BB3200F280A7 /* positionColorTextureAsPointsize.vert */, + ); + path = shaders; + sourceTree = ""; + }; + 460D4CF321ABD0C60075726E /* metal */ = { + isa = PBXGroup; + children = ( + ED150A9A21E635AB00EFE7F7 /* ProgramMTL.h */, + ED150A9921E635AA00EFE7F7 /* ProgramMTL.mm */, + 460D4CFB21ABD0C60075726E /* BlendStateMTL.h */, + 460D4CF921ABD0C60075726E /* BlendStateMTL.mm */, + 460D4CFE21ABD0C60075726E /* BufferMTL.h */, + 460D4CF721ABD0C60075726E /* BufferMTL.mm */, + 460D4CFF21ABD0C60075726E /* CommandBufferMTL.h */, + 460D4D0421ABD0C60075726E /* CommandBufferMTL.mm */, + 460D4CFC21ABD0C60075726E /* DepthStencilStateMTL.h */, + 460D4CFA21ABD0C60075726E /* DepthStencilStateMTL.mm */, + 460D4CF521ABD0C60075726E /* DeviceMTL.h */, + 460D4D0021ABD0C60075726E /* DeviceMTL.mm */, + 460D4D0521ABD0C60075726E /* RenderPipelineMTL.h */, + 460D4D0721ABD0C60075726E /* RenderPipelineMTL.mm */, + 460D4CF821ABD0C60075726E /* ShaderModuleMTL.h */, + 460D4CFD21ABD0C60075726E /* ShaderModuleMTL.mm */, + 460D4D0221ABD0C60075726E /* TextureMTL.h */, + 460D4D0121ABD0C60075726E /* TextureMTL.mm */, + 460D4CF421ABD0C60075726E /* Utils.h */, + 460D4CF621ABD0C60075726E /* Utils.mm */, + 46D3D45921DE014500EF5E75 /* BufferManager.mm */, + 46D3D45A21DE014500EF5E75 /* BufferManager.h */, + ); + path = metal; + sourceTree = ""; + }; + 4631CA9021AFD9F90000D408 /* ui */ = { + isa = PBXGroup; + children = ( + 4631CA9121AFD9F90000D408 /* UIWidget.cpp */, + 4631CA9221AFD9F90000D408 /* UIRadioButton.h */, + 4631CA9421AFD9F90000D408 /* UIVideoPlayer-ios.mm */, + 4631CA9521AFD9F90000D408 /* UITextAtlas.h */, + 4631CA9621AFD9F90000D408 /* UIVideoPlayer.h */, + 4631CA9821AFD9F90000D408 /* UILayoutComponent.h */, + 4631CA9921AFD9F90000D408 /* UIButton.cpp */, + 4631CA9A21AFD9F90000D408 /* UIPageView.cpp */, + 4631CA9C21AFD9F90000D408 /* CMakeLists.txt */, + 4631CA9D21AFD9F90000D408 /* UITabControl.h */, + 4631CA9E21AFD9F90000D408 /* UIVBox.cpp */, + 4631CA9F21AFD9F90000D408 /* UIAbstractCheckButton.cpp */, + 4631CAA021AFD9F90000D408 /* UICheckBox.cpp */, + 4631CAA121AFD9F90000D408 /* UITextAtlas.cpp */, + 4631CAA221AFD9F90000D408 /* UIVideoPlayer-android.cpp */, + 4631CAA321AFD9F90000D408 /* UIScrollViewBar.h */, + 4631CAA421AFD9F90000D408 /* UIText.cpp */, + 46F9B73621B0CB44009DF858 /* UIWebView */, + 4631CAA521AFD9F90000D408 /* UIEditBox */, + 4631CAD321AFD9F90000D408 /* UIWidget.h */, + 4631CAD421AFD9F90000D408 /* CocosGUI.cpp */, + 4631CAD521AFD9F90000D408 /* UILayout.cpp */, + 4631CAD621AFD9F90000D408 /* UIScale9Sprite.cpp */, + 4631CAD921AFD9F90000D408 /* UIHelper.cpp */, + 4631CADA21AFD9F90000D408 /* UITextField.h */, + 4631CADB21AFD9F90000D408 /* UIPageViewIndicator.cpp */, + 4631CADC21AFD9F90000D408 /* UIRadioButton.cpp */, + 4631CADE21AFD9F90000D408 /* UIScrollView.h */, + 4631CADF21AFD9F90000D408 /* UIRelativeBox.h */, + 4631CAE021AFD9F90000D408 /* UIHBox.cpp */, + 4631CAE121AFD9F90000D408 /* UIListView.cpp */, + 4631CAE221AFD9F90000D408 /* UITextBMFont.h */, + 4631CAE421AFD9F90000D408 /* UIHelper.h */, + 4631CAE521AFD9F90000D408 /* UICheckBox.h */, + 4631CAE621AFD9F90000D408 /* GUIDefine.h */, + 4631CAE721AFD9F90000D408 /* UIImageView.cpp */, + 4631CAE821AFD9F90000D408 /* UIListView.h */, + 4631CAE921AFD9F90000D408 /* UIVBox.h */, + 4631CAEA21AFD9F90000D408 /* UITextBMFont.cpp */, + 4631CAEB21AFD9F90000D408 /* UITabControl.cpp */, + 4631CAEC21AFD9F90000D408 /* GUIExport.h */, + 4631CAED21AFD9F90000D408 /* UIText.h */, + 4631CAEE21AFD9F90000D408 /* UILayoutManager.cpp */, + 4631CAEF21AFD9F90000D408 /* UITextField.cpp */, + 4631CAF021AFD9F90000D408 /* UILayoutComponent.cpp */, + 4631CAF121AFD9F90000D408 /* UIScrollView.cpp */, + 4631CAF221AFD9F90000D408 /* UIImageView.h */, + 4631CAF321AFD9F90000D408 /* UILayoutManager.h */, + 4631CAF521AFD9F90000D408 /* UIPageViewIndicator.h */, + 4631CAF621AFD9F90000D408 /* UIScrollViewBar.cpp */, + 4631CAF721AFD9F90000D408 /* UILoadingBar.h */, + 4631CAF821AFD9F90000D408 /* UIScale9Sprite.h */, + 4631CAF921AFD9F90000D408 /* UIRichText.cpp */, + 4631CAFA21AFD9F90000D408 /* UIButton.h */, + 4631CAFC21AFD9F90000D408 /* UIAbstractCheckButton.h */, + 4631CAFD21AFD9F90000D408 /* UILoadingBar.cpp */, + 4631CAFE21AFD9F90000D408 /* UILayoutParameter.h */, + 4631CAFF21AFD9F90000D408 /* UILayoutParameter.cpp */, + 4631CB0121AFD9F90000D408 /* UISlider.cpp */, + 4631CB0221AFD9F90000D408 /* UIRelativeBox.cpp */, + 4631CB0321AFD9F90000D408 /* UILayout.h */, + 4631CB0521AFD9F90000D408 /* CocosGUI.h */, + 4631CB0921AFD9F90000D408 /* UIPageView.h */, + 4631CB0A21AFD9F90000D408 /* UISlider.h */, + 4631CB0B21AFD9F90000D408 /* UIHBox.h */, + 4631CB0C21AFD9F90000D408 /* UIRichText.h */, ); - path = ProjectNodeReader; + name = ui; + path = ../cocos/ui; sourceTree = ""; }; - 3823843A1A259140002C4610 /* SingleNodeReader */ = { + 4631CAA521AFD9F90000D408 /* UIEditBox */ = { isa = PBXGroup; children = ( - 3823843B1A259140002C4610 /* SingleNodeReader.cpp */, - 3823843C1A259140002C4610 /* SingleNodeReader.h */, + 4631CAA621AFD9F90000D408 /* UIEditBoxImpl-common.cpp */, + 4631CAA721AFD9F90000D408 /* UIEditBox.h */, + 4631CAAB21AFD9F90000D408 /* UIEditBoxImpl-mac.mm */, + 4631CAAD21AFD9F90000D408 /* UIEditBoxImpl-mac.h */, + 4631CAAF21AFD9F90000D408 /* UIEditBoxImpl-stub.cpp */, + 4631CAB221AFD9F90000D408 /* UIEditBox.cpp */, + 4631CAB321AFD9F90000D408 /* iOS */, + 4631CABF21AFD9F90000D408 /* Mac */, + 4631CACB21AFD9F90000D408 /* UIEditBoxImpl-ios.mm */, + 4631CACC21AFD9F90000D408 /* UIEditBoxImpl-common.h */, + 4631CACE21AFD9F90000D408 /* UIEditBoxImpl-ios.h */, + 4631CACF21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp */, + 4631CAD121AFD9F90000D408 /* UIEditBoxImpl.h */, ); - path = SingleNodeReader; + path = UIEditBox; sourceTree = ""; }; - 382384411A25915C002C4610 /* SpriteReader */ = { + 4631CAB321AFD9F90000D408 /* iOS */ = { isa = PBXGroup; children = ( - 382384421A25915C002C4610 /* SpriteReader.cpp */, - 382384431A25915C002C4610 /* SpriteReader.h */, + 4631CAB421AFD9F90000D408 /* CCUIEditBoxIOS.h */, + 4631CAB521AFD9F90000D408 /* CCUIEditBoxIOS.mm */, + 4631CAB621AFD9F90000D408 /* CCUIMultilineTextField.h */, + 4631CAB721AFD9F90000D408 /* UITextView+CCUITextInput.mm */, + 4631CAB821AFD9F90000D408 /* CCUISingleLineTextField.mm */, + 4631CAB921AFD9F90000D408 /* CCUITextInput.h */, + 4631CABA21AFD9F90000D408 /* UITextView+CCUITextInput.h */, + 4631CABB21AFD9F90000D408 /* CCUIMultilineTextField.mm */, + 4631CABC21AFD9F90000D408 /* UITextField+CCUITextInput.mm */, + 4631CABD21AFD9F90000D408 /* UITextField+CCUITextInput.h */, + 4631CABE21AFD9F90000D408 /* CCUISingleLineTextField.h */, ); - path = SpriteReader; + path = iOS; sourceTree = ""; }; - 38F5263A1A48363B000DB7F7 /* ArmatureNodeReader */ = { + 4631CABF21AFD9F90000D408 /* Mac */ = { isa = PBXGroup; children = ( - 38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */, - 38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */, - 38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */, + 4631CAC021AFD9F90000D408 /* CCUITextFieldFormatter.m */, + 4631CAC121AFD9F90000D408 /* CCUIPasswordTextField.h */, + 4631CAC221AFD9F90000D408 /* CCUISingleLineTextField.m */, + 4631CAC321AFD9F90000D408 /* CCUIMultilineTextField.h */, + 4631CAC421AFD9F90000D408 /* CCUITextInput.h */, + 4631CAC521AFD9F90000D408 /* CCUIEditBoxMac.mm */, + 4631CAC621AFD9F90000D408 /* CCUIEditBoxMac.h */, + 4631CAC721AFD9F90000D408 /* CCUISingleLineTextField.h */, + 4631CAC821AFD9F90000D408 /* CCUITextFieldFormatter.h */, + 4631CAC921AFD9F90000D408 /* CCUIPasswordTextField.m */, + 4631CACA21AFD9F90000D408 /* CCUIMultilineTextField.m */, ); - path = ArmatureNodeReader; + path = Mac; sourceTree = ""; }; 468A19731EF3BA3C00ECA675 /* mac */ = { @@ -7731,11 +4763,10 @@ 46A15FD01807A56F005B8026 /* audio */ = { isa = PBXGroup; children = ( + 46D3D48921E6E8F700EF5E75 /* SimpleAudioEngine.cpp */, 3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */, 46A15FE01807A56F005B8026 /* include */, 50CB246E19D9C5A100687767 /* apple */, - 46A15FE31807A56F005B8026 /* ios */, - 46A15FF31807A56F005B8026 /* mac */, ); name = audio; path = ../cocos/audio; @@ -7746,115 +4777,10 @@ children = ( 3E2BDADD19C030ED0055CDCD /* AudioEngine.h */, 46A15FE11807A56F005B8026 /* Export.h */, - 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */, ); path = include; sourceTree = ""; }; - 46A15FE31807A56F005B8026 /* ios */ = { - isa = PBXGroup; - children = ( - 46A15FE41807A56F005B8026 /* CDAudioManager.h */, - 46A15FE51807A56F005B8026 /* CDAudioManager.m */, - 46A15FE61807A56F005B8026 /* CDConfig.h */, - 46A15FE71807A56F005B8026 /* CDOpenALSupport.h */, - 46A15FE81807A56F005B8026 /* CDOpenALSupport.m */, - 46A15FE91807A56F005B8026 /* CocosDenshion.h */, - 46A15FEA1807A56F005B8026 /* CocosDenshion.m */, - 46A15FEB1807A56F005B8026 /* SimpleAudioEngine.mm */, - 46A15FEC1807A56F005B8026 /* SimpleAudioEngine_objc.h */, - 46A15FED1807A56F005B8026 /* SimpleAudioEngine_objc.m */, - ); - path = ios; - sourceTree = ""; - }; - 46A15FF31807A56F005B8026 /* mac */ = { - isa = PBXGroup; - children = ( - 46A15FF41807A56F005B8026 /* CDAudioManager.h */, - 46A15FF51807A56F005B8026 /* CDAudioManager.m */, - 46A15FF61807A56F005B8026 /* CDConfig.h */, - 46A15FF71807A56F005B8026 /* CDOpenALSupport.h */, - 46A15FF81807A56F005B8026 /* CDOpenALSupport.m */, - 46A15FF91807A56F005B8026 /* CDXMacOSXSupport.h */, - 46A15FFA1807A56F005B8026 /* CDXMacOSXSupport.mm */, - 46A15FFB1807A56F005B8026 /* CocosDenshion.h */, - 46A15FFC1807A56F005B8026 /* CocosDenshion.m */, - 46A15FFD1807A56F005B8026 /* SimpleAudioEngine.mm */, - 46A15FFE1807A56F005B8026 /* SimpleAudioEngine_objc.h */, - 46A15FFF1807A56F005B8026 /* SimpleAudioEngine_objc.m */, - ); - path = mac; - sourceTree = ""; - }; - 46A167981807AF4D005B8026 /* extensions */ = { - isa = PBXGroup; - children = ( - B6C0BF4D1A6F733D00BCF15A /* Particle3D */, - 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */, - 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */, - 46A167D21807AF4D005B8026 /* cocos-ext.h */, - 46A168321807AF4E005B8026 /* ExtensionMacros.h */, - 1AAF5350180E305F000584C8 /* assets-manager */, - 46A168331807AF4E005B8026 /* GUI */, - 1AD71EEB180E27CF00808F54 /* physics-nodes */, - ); - name = extensions; - path = ../extensions; - sourceTree = ""; - }; - 46A168331807AF4E005B8026 /* GUI */ = { - isa = PBXGroup; - children = ( - 46A168341807AF4E005B8026 /* CCControlExtension */, - 46A1685D1807AF4E005B8026 /* CCScrollView */, - ); - path = GUI; - sourceTree = ""; - }; - 46A168341807AF4E005B8026 /* CCControlExtension */ = { - isa = PBXGroup; - children = ( - 46A168351807AF4E005B8026 /* CCControl.cpp */, - 46A168361807AF4E005B8026 /* CCControl.h */, - 46A168371807AF4E005B8026 /* CCControlButton.cpp */, - 46A168381807AF4E005B8026 /* CCControlButton.h */, - 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */, - 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */, - 46A1683B1807AF4E005B8026 /* CCControlExtensions.h */, - 46A1683C1807AF4E005B8026 /* CCControlHuePicker.cpp */, - 46A1683D1807AF4E005B8026 /* CCControlHuePicker.h */, - 46A1683E1807AF4E005B8026 /* CCControlPotentiometer.cpp */, - 46A1683F1807AF4E005B8026 /* CCControlPotentiometer.h */, - 46A168401807AF4E005B8026 /* CCControlSaturationBrightnessPicker.cpp */, - 46A168411807AF4E005B8026 /* CCControlSaturationBrightnessPicker.h */, - 46A168421807AF4E005B8026 /* CCControlSlider.cpp */, - 46A168431807AF4E005B8026 /* CCControlSlider.h */, - 46A168441807AF4E005B8026 /* CCControlStepper.cpp */, - 46A168451807AF4E005B8026 /* CCControlStepper.h */, - 46A168461807AF4E005B8026 /* CCControlSwitch.cpp */, - 46A168471807AF4E005B8026 /* CCControlSwitch.h */, - 46A168481807AF4E005B8026 /* CCControlUtils.cpp */, - 46A168491807AF4E005B8026 /* CCControlUtils.h */, - 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */, - 46A1684B1807AF4E005B8026 /* CCInvocation.h */, - ); - path = CCControlExtension; - sourceTree = ""; - }; - 46A1685D1807AF4E005B8026 /* CCScrollView */ = { - isa = PBXGroup; - children = ( - 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */, - 46A1685F1807AF4E005B8026 /* CCScrollView.h */, - 46A168621807AF4E005B8026 /* CCTableView.cpp */, - 46A168631807AF4E005B8026 /* CCTableView.h */, - 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */, - 46A168651807AF4E005B8026 /* CCTableViewCell.h */, - ); - path = CCScrollView; - sourceTree = ""; - }; 46A1693A1807AFD6005B8026 /* chipmunk */ = { isa = PBXGroup; children = ( @@ -7875,8 +4801,6 @@ A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */, 3EACC99E19F5014D00EB3C5E /* CCLight.cpp */, 3EACC99F19F5014D00EB3C5E /* CCLight.h */, - 1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */, - 1A9DCA03180E6955007A3AD4 /* CCGLBufferedNode.h */, 1A570046180BC59A0088DEC7 /* actions */, 1A570095180BC5B00088DEC7 /* base-nodes */, 1A570109180BC8DC0088DEC7 /* draw-nodes */, @@ -7895,26 +4819,6 @@ path = ../cocos/2d; sourceTree = ""; }; - 46A170611807CE7A005B8026 /* physics */ = { - isa = PBXGroup; - children = ( - 50864CE61C7BC90A00B3BAB1 /* cpCompat62.h */, - ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */, - 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */, - 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */, - 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */, - 46A170711807CE7A005B8026 /* CCPhysicsContact.h */, - 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */, - 46A170731807CE7A005B8026 /* CCPhysicsJoint.h */, - 46A170751807CE7A005B8026 /* CCPhysicsShape.cpp */, - 46A170761807CE7A005B8026 /* CCPhysicsShape.h */, - 46A170771807CE7A005B8026 /* CCPhysicsWorld.cpp */, - 46A170781807CE7A005B8026 /* CCPhysicsWorld.h */, - ); - name = physics; - path = ../cocos/physics; - sourceTree = ""; - }; 46A170851807CE87005B8026 /* math */ = { isa = PBXGroup; children = ( @@ -7954,6 +4858,27 @@ path = ../cocos/math; sourceTree = ""; }; + 46AF39FF21F1877100D5AFCD /* physics */ = { + isa = PBXGroup; + children = ( + 46AF3A0021F1877100D5AFCD /* CMakeLists.txt */, + 46AF3A0121F1877100D5AFCD /* CCPhysicsWorld.cpp */, + 46AF3A0221F1877100D5AFCD /* CCPhysicsBody.cpp */, + 46AF3A0321F1877100D5AFCD /* CCPhysicsShape.cpp */, + 46AF3A0421F1877100D5AFCD /* CCPhysicsContact.h */, + 46AF3A0521F1877100D5AFCD /* CCPhysicsWorld.h */, + 46AF3A0621F1877100D5AFCD /* CCPhysicsContact.cpp */, + 46AF3A0721F1877100D5AFCD /* CCPhysicsBody.h */, + 46AF3A0821F1877100D5AFCD /* cpCompat62.h */, + 46AF3A0921F1877100D5AFCD /* CCPhysicsShape.h */, + 46AF3A0A21F1877100D5AFCD /* CCPhysicsHelper.h */, + 46AF3A0B21F1877100D5AFCD /* CCPhysicsJoint.h */, + 46AF3A0C21F1877100D5AFCD /* CCPhysicsJoint.cpp */, + ); + name = physics; + path = ../cocos/physics; + sourceTree = ""; + }; 46C02E0418E91123004B7456 /* xxhash */ = { isa = PBXGroup; children = ( @@ -7964,20 +4889,65 @@ path = ../external/xxhash; sourceTree = ""; }; + 46F9B31021AFE64B009DF858 /* extensions */ = { + isa = PBXGroup; + children = ( + 46F9B31221AFE64B009DF858 /* CMakeLists.txt */, + 46F9B31321AFE64B009DF858 /* ExtensionMacros.h */, + 46F9B45421AFE64B009DF858 /* cocos-ext.h */, + 46F9B45521AFE64B009DF858 /* GUI */, + 46F9B47521AFE64C009DF858 /* ExtensionExport.h */, + ); + name = extensions; + path = ../extensions; + sourceTree = ""; + }; + 46F9B45521AFE64B009DF858 /* GUI */ = { + isa = PBXGroup; + children = ( + 40FE102F21F070640061C04F /* CCControlExtension */, + 46F9B46E21AFE64C009DF858 /* CCScrollView */, + ); + path = GUI; + sourceTree = ""; + }; + 46F9B46E21AFE64C009DF858 /* CCScrollView */ = { + isa = PBXGroup; + children = ( + 46F9B72F21AFE7C0009DF858 /* CCScrollView.cpp */, + 46F9B72E21AFE7BF009DF858 /* CCScrollView.h */, + 46F9B47021AFE64C009DF858 /* CCTableViewCell.h */, + 46F9B47121AFE64C009DF858 /* CCTableView.cpp */, + 46F9B47321AFE64C009DF858 /* CCTableViewCell.cpp */, + 46F9B47421AFE64C009DF858 /* CCTableView.h */, + ); + path = CCScrollView; + sourceTree = ""; + }; + 46F9B73621B0CB44009DF858 /* UIWebView */ = { + isa = PBXGroup; + children = ( + 46F9B73721B0CB44009DF858 /* UIWebView.h */, + 46F9B73A21B0CB44009DF858 /* UIWebView.mm */, + 46F9B73B21B0CB44009DF858 /* UIWebView-inl.h */, + 46F9B73D21B0CB44009DF858 /* UIWebViewImpl-ios.h */, + 46F9B74021B0CB44009DF858 /* UIWebViewImpl-ios.mm */, + ); + path = UIWebView; + sourceTree = ""; + }; 500DC89819105D41007B91BF /* renderer */ = { isa = PBXGroup; children = ( - 5034CA5D191D591900CE6051 /* shaders */, + 460D4CC821A545420075726E /* shaders */, + ED28C1EC219E629B0078D854 /* backend */, + 5034CA5D191D591900CE6051 /* shaders-old */, A045F6D41BA81577005076C7 /* CCTextureCube.cpp */, A045F6D51BA81577005076C7 /* CCTextureCube.h */, - B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */, - B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */, B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */, B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */, B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */, B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */, - 50ABBD641925AB4100A911A9 /* CCBatchCommand.cpp */, - 50ABBD651925AB4100A911A9 /* CCBatchCommand.h */, 50ABBD661925AB4100A911A9 /* CCCustomCommand.cpp */, 50ABBD671925AB4100A911A9 /* CCCustomCommand.h */, 50ABBD681925AB4100A911A9 /* CCGLProgram.cpp */, @@ -7999,8 +4969,8 @@ 50ABBD761925AB4100A911A9 /* CCRenderCommand.cpp */, 50ABBD771925AB4100A911A9 /* CCRenderCommand.h */, 50ABBD781925AB4100A911A9 /* CCRenderCommandPool.h */, - 50ABBD791925AB4100A911A9 /* CCRenderer.cpp */, - 50ABBD7A1925AB4100A911A9 /* CCRenderer.h */, + 460D4CD221A5666E0075726E /* CCRenderer.cpp */, + 460D4CD121A5666E0075726E /* CCRenderer.h */, 50ABBD7B1925AB4100A911A9 /* ccShaders.cpp */, 50ABBD7C1925AB4100A911A9 /* ccShaders.h */, 50ABBD7D1925AB4100A911A9 /* CCTexture2D.cpp */, @@ -8009,10 +4979,6 @@ 50ABBD801925AB4100A911A9 /* CCTextureAtlas.h */, 50ABBD811925AB4100A911A9 /* CCTextureCache.cpp */, 50ABBD821925AB4100A911A9 /* CCTextureCache.h */, - B257B44C1989D5E800D9A687 /* CCPrimitive.cpp */, - B257B44D1989D5E800D9A687 /* CCPrimitive.h */, - B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */, - B257B45F198A353E00D9A687 /* CCPrimitiveCommand.h */, 5012168C1AC47380009A4BEA /* CCRenderState.cpp */, 5012168D1AC47380009A4BEA /* CCRenderState.h */, 501216921AC47393009A4BEA /* CCPass.cpp */, @@ -8023,14 +4989,17 @@ 5012169F1AC473AD009A4BEA /* CCMaterial.h */, 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */, 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */, + 461C204C21A5304A00F3BD47 /* CCPipelineDescriptor.h */, ); name = renderer; path = ../cocos/renderer; sourceTree = ""; }; - 5034CA5D191D591900CE6051 /* shaders */ = { + 5034CA5D191D591900CE6051 /* shaders-old */ = { isa = PBXGroup; children = ( + 461FE08E21CA129B00E5378F /* CCCallbackCommand.cpp */, + 461FE08F21CA129B00E5378F /* CCCallbackCommand.h */, 46E7207F1ECACB750034BEC7 /* ccShader_LayerRadialGradient.frag */, 46E7207B1ECAC75C0034BEC7 /* ccShader_ETC1AS_PositionTextureColor.frag */, 46E7207C1ECAC75C0034BEC7 /* ccShader_ETC1AS_PositionTextureGray.frag */, @@ -8073,7 +5042,7 @@ 5034CA0F191D591000CE6051 /* ccShader_Label_df.frag */, 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */, ); - name = shaders; + name = "shaders-old"; sourceTree = ""; }; 503DD8CD1926736A00CD74DD /* ios */ = { @@ -8087,9 +5056,6 @@ 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */, 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */, 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */, - 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */, - 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */, - 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */, 503DD8D91926736A00CD74DD /* CCGL-ios.h */, 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */, 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */, @@ -8119,12 +5085,8 @@ isa = PBXGroup; children = ( 52B47A2B1A5349A3004E4C60 /* HttpClient-apple.mm */, - 507003161B69735200E83DDD /* HttpClient-android.cpp */, - 507003171B69735200E83DDD /* HttpClient-winrt.cpp */, 507003181B69735200E83DDD /* HttpClient.cpp */, 1AAF5363180E3374000584C8 /* HttpClient.h */, - 507003191B69735200E83DDD /* HttpConnection-winrt.cpp */, - 5070031A1B69735200E83DDD /* HttpConnection-winrt.h */, 52B47A291A5349A3004E4C60 /* HttpAsynConnection-apple.h */, 52B47A2A1A5349A3004E4C60 /* HttpAsynConnection-apple.m */, 52B47A2C1A5349A3004E4C60 /* HttpCookie.cpp */, @@ -8195,7 +5157,6 @@ isa = PBXGroup; children = ( 503DD8CD1926736A00CD74DD /* ios */, - 50ABBF2D1926664700A911A9 /* desktop */, 50ABBF4E1926664700A911A9 /* mac */, 50ABBF1A1926664700A911A9 /* apple */, 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */, @@ -8215,8 +5176,6 @@ 50ABBF281926664700A911A9 /* CCImage.h */, 50ABBF291926664700A911A9 /* CCSAXParser.cpp */, 50ABBF2A1926664700A911A9 /* CCSAXParser.h */, - 50ABBF2B1926664700A911A9 /* CCThread.cpp */, - 50ABBF2C1926664700A911A9 /* CCThread.h */, ); name = platform; path = ../cocos/platform; @@ -8229,25 +5188,17 @@ 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */, 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */, 50ABBF1E1926664700A911A9 /* CCLock-apple.h */, - 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */, 294D7D921D0E67B4002CE7B7 /* CCDevice-apple.mm */, 294D7D931D0E67B4002CE7B7 /* CCDevice-apple.h */, ); path = apple; sourceTree = ""; }; - 50ABBF2D1926664700A911A9 /* desktop */ = { - isa = PBXGroup; - children = ( - 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */, - 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */, - ); - path = desktop; - sourceTree = ""; - }; 50ABBF4E1926664700A911A9 /* mac */ = { isa = PBXGroup; children = ( + 46535CDC21ABE8C0005B5370 /* CCGLViewImpl-mac.h */, + 46535CDD21ABE8C0005B5370 /* CCGLViewImpl-mac.mm */, 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */, 50ABBF501926664700A911A9 /* CCApplication-mac.mm */, 50ABBF511926664700A911A9 /* CCCommon-mac.mm */, @@ -8285,778 +5236,623 @@ path = ../external/glfw3/include/mac; sourceTree = ""; }; - 50F9654D1CD0360000ADE813 /* vr */ = { - isa = PBXGroup; - children = ( - 502AF9771D0711B8006AF256 /* CCVRGenericHeadTracker.cpp */, - 50F9654E1CD0360000ADE813 /* CCVRGenericRenderer.cpp */, - 50F9654F1CD0360000ADE813 /* CCVRGenericRenderer.h */, - 50F965501CD0360000ADE813 /* CCVRProtocol.h */, - 503D4F611CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp */, - 503D4F621CE29D4E0054A2D1 /* CCVRDistortionMesh.h */, - 503D4F691CE2BDBE0054A2D1 /* CCVRDistortion.cpp */, - 503D4F6A1CE2BDBE0054A2D1 /* CCVRDistortion.h */, - 5030C03E1CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h */, - ); - name = vr; - path = ../cocos/vr; - sourceTree = ""; - }; - 50FCEB6818C72017004AD434 /* WidgetReader */ = { - isa = PBXGroup; - children = ( - C5F516141C8216AB0013B695 /* TabControlReader */, - 0C261F251BE7528900707478 /* Light3DReader */, - A045F6EC1BA81821005076C7 /* GameNode3DReader */, - C503066F1B60B590001E6D43 /* SkeletonReader */, - 18956BAF1A9DFBEC006E9155 /* Particle3DReader */, - 182C5CE21A9D70C000C30D34 /* UserCameraReader */, - 182C5CD31A98F2F400C30D34 /* Sprite3DReader */, - 182C5CAF1A95961E00C30D34 /* Node3DReader */, - 38F5263A1A48363B000DB7F7 /* ArmatureNodeReader */, - 382384251A2590F9002C4610 /* NodeReader */, - 3823843A1A259140002C4610 /* SingleNodeReader */, - 382384411A25915C002C4610 /* SpriteReader */, - 3823842C1A259112002C4610 /* ParticleReader */, - 3823841E1A2590DA002C4610 /* GameMapReader */, - 382384331A259126002C4610 /* ProjectNodeReader */, - 382384171A2590D2002C4610 /* ComAudioReader */, - 50FCEB6918C72017004AD434 /* ButtonReader */, - 50FCEB6C18C72017004AD434 /* CheckBoxReader */, - 50FCEB6F18C72017004AD434 /* ImageViewReader */, - 50FCEB7218C72017004AD434 /* LayoutReader */, - 50FCEB7518C72017004AD434 /* ListViewReader */, - 50FCEB7818C72017004AD434 /* LoadingBarReader */, - 50FCEB7B18C72017004AD434 /* PageViewReader */, - 50FCEB7E18C72017004AD434 /* ScrollViewReader */, - 50FCEB8118C72017004AD434 /* SliderReader */, - 50FCEB8418C72017004AD434 /* TextAtlasReader */, - 50FCEB8718C72017004AD434 /* TextBMFontReader */, - 50FCEB8A18C72017004AD434 /* TextFieldReader */, - 50FCEB8D18C72017004AD434 /* TextReader */, - 50FCEB9018C72017004AD434 /* WidgetReader.cpp */, - 50FCEB9118C72017004AD434 /* WidgetReader.h */, - 50FCEB9218C72017004AD434 /* WidgetReaderProtocol.h */, - 3823840D1A259092002C4610 /* NodeReaderProtocol.cpp */, - 3823840E1A259092002C4610 /* NodeReaderProtocol.h */, - 3823840B1A259092002C4610 /* NodeReaderDefine.cpp */, - 3823840C1A259092002C4610 /* NodeReaderDefine.h */, + 68B39B391B1C5C670084F72C /* clipper */ = { + isa = PBXGroup; + children = ( + 8525E3A11B291E42008EE815 /* clipper.hpp */, + 85B374381B204B9400C488D6 /* clipper.cpp */, ); - path = WidgetReader; + name = clipper; + path = ../external/clipper; sourceTree = ""; }; - 50FCEB6918C72017004AD434 /* ButtonReader */ = { + B6CAB0021AF9A9EE00B9B856 /* bullet */ = { isa = PBXGroup; children = ( - 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */, - 50FCEB6B18C72017004AD434 /* ButtonReader.h */, + 468A19731EF3BA3C00ECA675 /* mac */, ); - path = ButtonReader; + name = bullet; sourceTree = ""; }; - 50FCEB6C18C72017004AD434 /* CheckBoxReader */ = { + B6DD2F731B04820C00E47F5F /* recast */ = { isa = PBXGroup; children = ( - 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */, - 50FCEB6E18C72017004AD434 /* CheckBoxReader.h */, + B6DD2F791B04825B00E47F5F /* DebugUtils */, + B6DD2F821B04825B00E47F5F /* Detour */, + B6DD2F921B04825B00E47F5F /* DetourCrowd */, + B6DD2F9F1B04825B00E47F5F /* DetourTileCache */, + B6DD2FA41B04825B00E47F5F /* fastlz */, ); - path = CheckBoxReader; + name = recast; sourceTree = ""; }; - 50FCEB6F18C72017004AD434 /* ImageViewReader */ = { + B6DD2F791B04825B00E47F5F /* DebugUtils */ = { isa = PBXGroup; children = ( - 50FCEB7018C72017004AD434 /* ImageViewReader.cpp */, - 50FCEB7118C72017004AD434 /* ImageViewReader.h */, + B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */, + B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */, + B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */, + B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */, + B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */, + B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */, + B6DD2F801B04825B00E47F5F /* RecastDump.cpp */, + B6DD2F811B04825B00E47F5F /* RecastDump.h */, ); - path = ImageViewReader; + name = DebugUtils; + path = ../external/recast/DebugUtils; sourceTree = ""; }; - 50FCEB7218C72017004AD434 /* LayoutReader */ = { + B6DD2F821B04825B00E47F5F /* Detour */ = { isa = PBXGroup; children = ( - 50FCEB7318C72017004AD434 /* LayoutReader.cpp */, - 50FCEB7418C72017004AD434 /* LayoutReader.h */, + B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */, + B6DD2F841B04825B00E47F5F /* DetourAlloc.h */, + B6DD2F851B04825B00E47F5F /* DetourAssert.h */, + B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */, + B6DD2F871B04825B00E47F5F /* DetourCommon.h */, + B6DD2F881B04825B00E47F5F /* DetourMath.h */, + B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */, + B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */, + B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */, + B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */, + B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */, + B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */, + B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */, + B6DD2F901B04825B00E47F5F /* DetourNode.h */, + B6DD2F911B04825B00E47F5F /* DetourStatus.h */, ); - path = LayoutReader; + name = Detour; + path = ../external/recast/Detour; + sourceTree = ""; + }; + B6DD2F921B04825B00E47F5F /* DetourCrowd */ = { + isa = PBXGroup; + children = ( + B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */, + B6DD2F941B04825B00E47F5F /* DetourCrowd.h */, + B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */, + B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */, + B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */, + B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */, + B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */, + B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */, + B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */, + B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */, + B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */, + B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */, + ); + name = DetourCrowd; + path = ../external/recast/DetourCrowd; + sourceTree = ""; + }; + B6DD2F9F1B04825B00E47F5F /* DetourTileCache */ = { + isa = PBXGroup; + children = ( + B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */, + B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */, + B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */, + B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */, + ); + name = DetourTileCache; + path = ../external/recast/DetourTileCache; + sourceTree = ""; + }; + B6DD2FA41B04825B00E47F5F /* fastlz */ = { + isa = PBXGroup; + children = ( + B6DD2FA51B04825B00E47F5F /* fastlz.c */, + B6DD2FA61B04825B00E47F5F /* fastlz.h */, + ); + name = fastlz; + path = ../external/recast/fastlz; + sourceTree = ""; + }; + BA6249A41E77D2850096291C /* tinydir */ = { + isa = PBXGroup; + children = ( + BA6249A51E77D2850096291C /* COPYING */, + BA6249A61E77D2850096291C /* package.json */, + BA6249A71E77D2850096291C /* tinydir.h */, + ); + name = tinydir; + path = ../external/tinydir; + sourceTree = ""; + }; + ED28C1EC219E629B0078D854 /* backend */ = { + isa = PBXGroup; + children = ( + EDAF7C6E21F1797000E070B2 /* CCTextureUtils.cpp */, + EDAF7C6D21F1796F00E070B2 /* CCTextureUtils.h */, + EDE6456D21F017210063F6E4 /* ProgramState.cpp */, + EDE6456F21F017210063F6E4 /* ProgramState.h */, + EDE6456E21F017210063F6E4 /* ShaderCache.cpp */, + EDE6457021F017210063F6E4 /* ShaderCache.h */, + ED150A9621E6320100EFE7F7 /* Program.h */, + ED93A75821EDBCBA00170050 /* Program.cpp */, + ED150A9021E631D900EFE7F7 /* ProgramCache.cpp */, + ED150A9121E631D900EFE7F7 /* ProgramCache.h */, + 46E21B4521B900C900430A43 /* StringUtils.cpp */, + 46E21B4621B900C900430A43 /* StringUtils.h */, + ED28C1F5219E629B0078D854 /* Backend.h */, + ED28C1FE219E629B0078D854 /* BlendState.cpp */, + ED28C200219E629B0078D854 /* BlendState.h */, + ED28C201219E629B0078D854 /* Buffer.h */, + ED28C21E219E629B0078D854 /* CommandBuffer.cpp */, + ED28C1FC219E629B0078D854 /* CommandBuffer.h */, + ED28C203219E629B0078D854 /* DepthStencilState.cpp */, + ED28C1F0219E629B0078D854 /* DepthStencilState.h */, + ED28C1F9219E629B0078D854 /* Device.cpp */, + ED28C1F2219E629B0078D854 /* Device.h */, + ED28C202219E629B0078D854 /* Macros.h */, + 460D4CF321ABD0C60075726E /* metal */, + ED28C1FB219E629B0078D854 /* RenderPassDescriptor.h */, + ED28C1EF219E629B0078D854 /* RenderPipeline.h */, + ED28C1F1219E629B0078D854 /* RenderPipelineDescriptor.h */, + ED28C1FF219E629B0078D854 /* ShaderModule.cpp */, + ED28C1FD219E629B0078D854 /* ShaderModule.h */, + ED28C1F8219E629B0078D854 /* Texture.cpp */, + ED28C205219E629B0078D854 /* Texture.h */, + ED28C1F4219E629B0078D854 /* Types.h */, + ED28C1F3219E629B0078D854 /* VertexLayout.cpp */, + ED28C207219E629B0078D854 /* VertexLayout.h */, + ); + path = backend; + sourceTree = ""; + }; + EDC7894321CA19FA00E1863C /* editor-support */ = { + isa = PBXGroup; + children = ( + EDC789DF21CA19FA00E1863C /* cocostudio */, + ); + name = "editor-support"; + path = "../cocos/editor-support"; sourceTree = ""; }; - 50FCEB7518C72017004AD434 /* ListViewReader */ = { + EDC789DF21CA19FA00E1863C /* cocostudio */ = { + isa = PBXGroup; + children = ( + EDC789E021CA19FA00E1863C /* CCComAudio.cpp */, + EDC789E121CA19FA00E1863C /* CCProcessBase.h */, + EDC789E221CA19FA00E1863C /* TriggerMng.h */, + EDC789E321CA19FA00E1863C /* CCDatas.cpp */, + EDC789E421CA19FA00E1863C /* CCProcessBase.cpp */, + EDC789E521CA19FA00E1863C /* CCDataReaderHelper.h */, + EDC789E621CA19FA00E1863C /* CCComRender.cpp */, + EDC789E721CA19FA00E1863C /* CCComController.cpp */, + EDC789E821CA19FA00E1863C /* CCSSceneReader.cpp */, + EDC789E921CA19FA00E1863C /* CCDisplayManager.h */, + EDC789EA21CA19FA00E1863C /* CCComAttribute.h */, + EDC789EB21CA19FA00E1863C /* CocoStudio.cpp */, + EDC789EC21CA19FA00E1863C /* CCInputDelegate.cpp */, + EDC789ED21CA19FA00E1863C /* CCArmatureDefine.h */, + EDC789EE21CA19FA00E1863C /* CCUtilMath.h */, + EDC789EF21CA19FA00E1863C /* CCInputDelegate.h */, + EDC789F021CA19FA00E1863C /* CCDecorativeDisplay.h */, + EDC789F121CA19FA00E1863C /* TriggerObj.cpp */, + EDC789F221CA19FA00E1863C /* Android.mk */, + EDC789F321CA19FA00E1863C /* CMakeLists.txt */, + EDC789F421CA19FA00E1863C /* CCActionManagerEx.h */, + EDC789F521CA19FA00E1863C /* CocosStudioExtension.cpp */, + EDC789F621CA19FA00E1863C /* ActionTimeline */, + EDC78A0A21CA19FA00E1863C /* TriggerBase.cpp */, + EDC78A0B21CA19FA00E1863C /* CCDisplayManager.cpp */, + EDC78A0C21CA19FA00E1863C /* CocosStudioExtension.h */, + EDC78A0D21CA19FA00E1863C /* CCActionNode.cpp */, + EDC78A0E21CA19FA00E1863C /* CCTransformHelp.h */, + EDC78A0F21CA19FA00E1863C /* CCUtilMath.cpp */, + EDC78A1021CA19FA00E1863C /* CocoStudio.h */, + EDC78A1121CA19FA00E1863C /* CCBatchNode.h */, + EDC78A1221CA19FA00E1863C /* CCArmatureDataManager.cpp */, + EDC78A1321CA19FA00E1863C /* CCDecorativeDisplay.cpp */, + EDC78A1421CA19FA00E1863C /* CCActionFrame.h */, + EDC78A1521CA19FA00E1863C /* FlatBuffersSerialize.h */, + EDC78A1621CA19FA00E1863C /* LocalizationManager.cpp */, + EDC78A1721CA19FA00E1863C /* CCActionFrameEasing.cpp */, + EDC78A1821CA19FA00E1863C /* FlatBuffersSerialize.cpp */, + EDC78A1921CA19FA00E1863C /* CCTween.cpp */, + EDC78A1A21CA19FA00E1863C /* CCComExtensionData.cpp */, + EDC78A1B21CA19FA00E1863C /* CCArmatureAnimation.cpp */, + EDC78A1C21CA19FA00E1863C /* CCComRender.h */, + EDC78A1D21CA19FA00E1863C /* CSLanguageDataBinary_generated.h */, + EDC78A1E21CA19FA00E1863C /* CCSpriteFrameCacheHelper.h */, + EDC78A1F21CA19FA00E1863C /* CCBone.h */, + EDC78A2021CA19FA00E1863C /* CocoLoader.cpp */, + EDC78A2121CA19FA00E1863C /* CocosStudioExport.h */, + EDC78A2221CA19FA00E1863C /* CCArmatureAnimation.h */, + EDC78A2321CA19FA00E1863C /* CCActionFrameEasing.h */, + EDC78A2421CA19FA00E1863C /* CCActionManagerEx.cpp */, + EDC78A2521CA19FA00E1863C /* CCTween.h */, + EDC78A2621CA19FA00E1863C /* CCTransformHelp.cpp */, + EDC78A2721CA19FA00E1863C /* CCActionNode.h */, + EDC78A2821CA19FA00E1863C /* CCDataReaderHelper.cpp */, + EDC78A2921CA19FA00E1863C /* CSParse3DBinary_generated.h */, + EDC78A2A21CA19FA00E1863C /* DictionaryHelper.h */, + EDC78A2B21CA19FA00E1863C /* DictionaryHelper.cpp */, + EDC78A2C21CA19FA00E1863C /* CSParseBinary_generated.h */, + EDC78A2D21CA19FA00E1863C /* CCDisplayFactory.cpp */, + EDC78A2E21CA19FA00E1863C /* CCComBase.h */, + EDC78A2F21CA19FA00E1863C /* CCSGUIReader.cpp */, + EDC78A3021CA19FA00E1863C /* WidgetCallBackHandlerProtocol.h */, + EDC78A3121CA19FA00E1863C /* CCBatchNode.cpp */, + EDC78A3221CA19FA00E1863C /* WidgetReader */, + EDC78A9621CA19FA00E1863C /* CCComAudio.h */, + EDC78A9721CA19FA00E1863C /* CCDisplayFactory.h */, + EDC78A9821CA19FA00E1863C /* CCBone.cpp */, + EDC78A9921CA19FA00E1863C /* WidgetCallBackHandlerProtocol.cpp */, + EDC78A9A21CA19FA00E1863C /* fbs-files */, + EDC78AA121CA19FA00E1863C /* CCArmatureDefine.cpp */, + EDC78AA221CA19FA00E1863C /* CCActionFrame.cpp */, + EDC78AA321CA19FA00E1863C /* CCArmature.h */, + EDC78AA421CA19FA00E1863C /* CCColliderDetector.cpp */, + EDC78AA521CA19FA00E1863C /* CCArmatureDataManager.h */, + EDC78AA621CA19FA00E1863C /* CCDatas.h */, + EDC78AA721CA19FA00E1863C /* CCComExtensionData.h */, + EDC78AA821CA19FA00E1863C /* CCComController.h */, + EDC78AA921CA19FA00E1863C /* TriggerObj.h */, + EDC78AAA21CA19FA00E1863C /* CocoLoader.h */, + EDC78AAB21CA19FA00E1863C /* TriggerMng.cpp */, + EDC78AAC21CA19FA00E1863C /* CCSpriteFrameCacheHelper.cpp */, + EDC78AAD21CA19FA00E1863C /* CCColliderDetector.h */, + EDC78AAE21CA19FA00E1863C /* LocalizationManager.h */, + EDC78AAF21CA19FA00E1863C /* CCActionObject.h */, + EDC78AB021CA19FA00E1863C /* TriggerBase.h */, + EDC78AB121CA19FA00E1863C /* CCSkin.cpp */, + EDC78AB221CA19FA00E1863C /* CCSSceneReader.h */, + EDC78AB321CA19FA00E1863C /* CCSGUIReader.h */, + EDC78AB421CA19FA00E1863C /* CCComAttribute.cpp */, + EDC78AB521CA19FA00E1863C /* CCArmature.cpp */, + EDC78AB621CA19FA00E1863C /* CCActionObject.cpp */, + EDC78AB721CA19FA00E1863C /* CCSkin.h */, + ); + path = cocostudio; + sourceTree = ""; + }; + EDC789F621CA19FA00E1863C /* ActionTimeline */ = { + isa = PBXGroup; + children = ( + EDC789F721CA19FA00E1863C /* CCTimelineMacro.h */, + EDC789F821CA19FA00E1863C /* CCBoneNode.cpp */, + EDC789F921CA19FA00E1863C /* CCSkeletonNode.h */, + EDC789FA21CA19FA00E1863C /* CCFrame.h */, + EDC789FB21CA19FA00E1863C /* CCActionTimeline.cpp */, + EDC789FC21CA19FA00E1863C /* CCActionTimeline.h */, + EDC789FD21CA19FA00E1863C /* CCFrame.cpp */, + EDC789FE21CA19FA00E1863C /* CSLoader.cpp */, + EDC789FF21CA19FA00E1863C /* CCActionTimelineNode.h */, + EDC78A0021CA19FA00E1863C /* CCBoneNode.h */, + EDC78A0121CA19FA00E1863C /* CCActionTimelineNode.cpp */, + EDC78A0221CA19FA00E1863C /* CCTimeLine.h */, + EDC78A0321CA19FA00E1863C /* CCActionTimelineCache.cpp */, + EDC78A0421CA19FA00E1863C /* CSLoader.h */, + EDC78A0521CA19FA00E1863C /* CCActionTimelineCache.h */, + EDC78A0621CA19FA00E1863C /* CCTimeLine.cpp */, + EDC78A0721CA19FA00E1863C /* CCSkinNode.cpp */, + EDC78A0821CA19FA00E1863C /* CCSkeletonNode.cpp */, + EDC78A0921CA19FA00E1863C /* CCSkinNode.h */, + ); + path = ActionTimeline; + sourceTree = ""; + }; + EDC78A3221CA19FA00E1863C /* WidgetReader */ = { + isa = PBXGroup; + children = ( + EDC78A3321CA19FA00E1863C /* ArmatureNodeReader */, + EDC78A3721CA19FA00E1863C /* ProjectNodeReader */, + EDC78A3A21CA19FA00E1863C /* GameNode3DReader */, + EDC78A3D21CA19FA00E1863C /* ListViewReader */, + EDC78A4021CA19FA00E1863C /* GameMapReader */, + EDC78A4321CA19FA00E1863C /* UserCameraReader */, + EDC78A4621CA19FA00E1863C /* LoadingBarReader */, + EDC78A4921CA19FA00E1863C /* SpriteReader */, + EDC78A4C21CA19FA00E1863C /* TextAtlasReader */, + EDC78A4F21CA19FA00E1863C /* Node3DReader */, + EDC78A5221CA19FA00E1863C /* WidgetReaderProtocol.h */, + EDC78A5321CA19FA00E1863C /* ButtonReader */, + EDC78A5621CA19FA00E1863C /* Light3DReader */, + EDC78A5921CA19FA00E1863C /* TabControlReader */, + EDC78A5D21CA19FA00E1863C /* TextReader */, + EDC78A6021CA19FA00E1863C /* WidgetReader.h */, + EDC78A6121CA19FA00E1863C /* PageViewReader */, + EDC78A6421CA19FA00E1863C /* NodeReader */, + EDC78A6721CA19FA00E1863C /* WidgetReader.cpp */, + EDC78A6821CA19FA00E1863C /* ImageViewReader */, + EDC78A6B21CA19FA00E1863C /* LayoutReader */, + EDC78A6E21CA19FA00E1863C /* SingleNodeReader */, + EDC78A7121CA19FA00E1863C /* NodeReaderDefine.h */, + EDC78A7221CA19FA00E1863C /* TextBMFontReader */, + EDC78A7521CA19FA00E1863C /* CheckBoxReader */, + EDC78A7821CA19FA00E1863C /* Sprite3DReader */, + EDC78A7B21CA19FA00E1863C /* SliderReader */, + EDC78A7E21CA19FA00E1863C /* ComAudioReader */, + EDC78A8121CA19FA00E1863C /* NodeReaderDefine.cpp */, + EDC78A8221CA19FA00E1863C /* ParticleReader */, + EDC78A8521CA19FA00E1863C /* NodeReaderProtocol.cpp */, + EDC78A8621CA19FA00E1863C /* Particle3DReader */, + EDC78A8921CA19FA00E1863C /* SkeletonReader */, + EDC78A8F21CA19FA00E1863C /* ScrollViewReader */, + EDC78A9221CA19FA00E1863C /* TextFieldReader */, + EDC78A9521CA19FA00E1863C /* NodeReaderProtocol.h */, + ); + path = WidgetReader; + sourceTree = ""; + }; + EDC78A3321CA19FA00E1863C /* ArmatureNodeReader */ = { isa = PBXGroup; children = ( - 50FCEB7618C72017004AD434 /* ListViewReader.cpp */, - 50FCEB7718C72017004AD434 /* ListViewReader.h */, + EDC78A3421CA19FA00E1863C /* ArmatureNodeReader.h */, + EDC78A3521CA19FA00E1863C /* CSArmatureNode_generated.h */, + EDC78A3621CA19FA00E1863C /* ArmatureNodeReader.cpp */, + ); + path = ArmatureNodeReader; + sourceTree = ""; + }; + EDC78A3721CA19FA00E1863C /* ProjectNodeReader */ = { + isa = PBXGroup; + children = ( + EDC78A3821CA19FA00E1863C /* ProjectNodeReader.cpp */, + EDC78A3921CA19FA00E1863C /* ProjectNodeReader.h */, + ); + path = ProjectNodeReader; + sourceTree = ""; + }; + EDC78A3A21CA19FA00E1863C /* GameNode3DReader */ = { + isa = PBXGroup; + children = ( + EDC78A3B21CA19FA00E1863C /* GameNode3DReader.h */, + EDC78A3C21CA19FA00E1863C /* GameNode3DReader.cpp */, + ); + path = GameNode3DReader; + sourceTree = ""; + }; + EDC78A3D21CA19FA00E1863C /* ListViewReader */ = { + isa = PBXGroup; + children = ( + EDC78A3E21CA19FA00E1863C /* ListViewReader.cpp */, + EDC78A3F21CA19FA00E1863C /* ListViewReader.h */, ); path = ListViewReader; sourceTree = ""; }; - 50FCEB7818C72017004AD434 /* LoadingBarReader */ = { + EDC78A4021CA19FA00E1863C /* GameMapReader */ = { isa = PBXGroup; children = ( - 50FCEB7918C72017004AD434 /* LoadingBarReader.cpp */, - 50FCEB7A18C72017004AD434 /* LoadingBarReader.h */, + EDC78A4121CA19FA00E1863C /* GameMapReader.cpp */, + EDC78A4221CA19FA00E1863C /* GameMapReader.h */, ); - path = LoadingBarReader; + path = GameMapReader; sourceTree = ""; }; - 50FCEB7B18C72017004AD434 /* PageViewReader */ = { + EDC78A4321CA19FA00E1863C /* UserCameraReader */ = { isa = PBXGroup; children = ( - 50FCEB7C18C72017004AD434 /* PageViewReader.cpp */, - 50FCEB7D18C72017004AD434 /* PageViewReader.h */, + EDC78A4421CA19FA00E1863C /* UserCameraReader.cpp */, + EDC78A4521CA19FA00E1863C /* UserCameraReader.h */, ); - path = PageViewReader; + path = UserCameraReader; sourceTree = ""; }; - 50FCEB7E18C72017004AD434 /* ScrollViewReader */ = { + EDC78A4621CA19FA00E1863C /* LoadingBarReader */ = { isa = PBXGroup; children = ( - 50FCEB7F18C72017004AD434 /* ScrollViewReader.cpp */, - 50FCEB8018C72017004AD434 /* ScrollViewReader.h */, + EDC78A4721CA19FA00E1863C /* LoadingBarReader.cpp */, + EDC78A4821CA19FA00E1863C /* LoadingBarReader.h */, ); - path = ScrollViewReader; + path = LoadingBarReader; sourceTree = ""; }; - 50FCEB8118C72017004AD434 /* SliderReader */ = { + EDC78A4921CA19FA00E1863C /* SpriteReader */ = { isa = PBXGroup; children = ( - 50FCEB8218C72017004AD434 /* SliderReader.cpp */, - 50FCEB8318C72017004AD434 /* SliderReader.h */, + EDC78A4A21CA19FA00E1863C /* SpriteReader.cpp */, + EDC78A4B21CA19FA00E1863C /* SpriteReader.h */, ); - path = SliderReader; + path = SpriteReader; sourceTree = ""; }; - 50FCEB8418C72017004AD434 /* TextAtlasReader */ = { + EDC78A4C21CA19FA00E1863C /* TextAtlasReader */ = { isa = PBXGroup; children = ( - 50FCEB8518C72017004AD434 /* TextAtlasReader.cpp */, - 50FCEB8618C72017004AD434 /* TextAtlasReader.h */, + EDC78A4D21CA19FA00E1863C /* TextAtlasReader.h */, + EDC78A4E21CA19FA00E1863C /* TextAtlasReader.cpp */, ); path = TextAtlasReader; sourceTree = ""; }; - 50FCEB8718C72017004AD434 /* TextBMFontReader */ = { + EDC78A4F21CA19FA00E1863C /* Node3DReader */ = { isa = PBXGroup; children = ( - 50FCEB8818C72017004AD434 /* TextBMFontReader.cpp */, - 50FCEB8918C72017004AD434 /* TextBMFontReader.h */, + EDC78A5021CA19FA00E1863C /* Node3DReader.h */, + EDC78A5121CA19FA00E1863C /* Node3DReader.cpp */, ); - path = TextBMFontReader; + path = Node3DReader; sourceTree = ""; }; - 50FCEB8A18C72017004AD434 /* TextFieldReader */ = { + EDC78A5321CA19FA00E1863C /* ButtonReader */ = { isa = PBXGroup; children = ( - 50FCEB8B18C72017004AD434 /* TextFieldReader.cpp */, - 50FCEB8C18C72017004AD434 /* TextFieldReader.h */, + EDC78A5421CA19FA00E1863C /* ButtonReader.cpp */, + EDC78A5521CA19FA00E1863C /* ButtonReader.h */, ); - path = TextFieldReader; + path = ButtonReader; sourceTree = ""; }; - 50FCEB8D18C72017004AD434 /* TextReader */ = { + EDC78A5621CA19FA00E1863C /* Light3DReader */ = { isa = PBXGroup; children = ( - 50FCEB8E18C72017004AD434 /* TextReader.cpp */, - 50FCEB8F18C72017004AD434 /* TextReader.h */, + EDC78A5721CA19FA00E1863C /* Light3DReader.cpp */, + EDC78A5821CA19FA00E1863C /* Light3DReader.h */, + ); + path = Light3DReader; + sourceTree = ""; + }; + EDC78A5921CA19FA00E1863C /* TabControlReader */ = { + isa = PBXGroup; + children = ( + EDC78A5A21CA19FA00E1863C /* TabControlReader.h */, + EDC78A5B21CA19FA00E1863C /* CSTabControl_generated.h */, + EDC78A5C21CA19FA00E1863C /* TabControlReader.cpp */, + ); + path = TabControlReader; + sourceTree = ""; + }; + EDC78A5D21CA19FA00E1863C /* TextReader */ = { + isa = PBXGroup; + children = ( + EDC78A5E21CA19FA00E1863C /* TextReader.cpp */, + EDC78A5F21CA19FA00E1863C /* TextReader.h */, ); path = TextReader; sourceTree = ""; }; - 68B39B391B1C5C670084F72C /* clipper */ = { + EDC78A6121CA19FA00E1863C /* PageViewReader */ = { isa = PBXGroup; children = ( - 8525E3A11B291E42008EE815 /* clipper.hpp */, - 85B374381B204B9400C488D6 /* clipper.cpp */, + EDC78A6221CA19FA00E1863C /* PageViewReader.cpp */, + EDC78A6321CA19FA00E1863C /* PageViewReader.h */, ); - name = clipper; - path = ../external/clipper; + path = PageViewReader; sourceTree = ""; }; - A045F6EC1BA81821005076C7 /* GameNode3DReader */ = { + EDC78A6421CA19FA00E1863C /* NodeReader */ = { isa = PBXGroup; children = ( - A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */, - A045F6EE1BA81821005076C7 /* GameNode3DReader.h */, + EDC78A6521CA19FA00E1863C /* NodeReader.cpp */, + EDC78A6621CA19FA00E1863C /* NodeReader.h */, ); - path = GameNode3DReader; + path = NodeReader; sourceTree = ""; }; - B29594B81926D61F003EEF37 /* 3d */ = { - isa = PBXGroup; - children = ( - 3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */, - 3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */, - B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */, - B603F1A71AC8EA0900A9579C /* CCTerrain.h */, - B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */, - B6D38B871AC3AFAC00043997 /* CCSkybox.h */, - 5E9F61221A3FFE3D0038DE01 /* CCFrustum.cpp */, - 5E9F61231A3FFE3D0038DE01 /* CCFrustum.h */, - 5E9F61241A3FFE3D0038DE01 /* CCPlane.cpp */, - 5E9F61251A3FFE3D0038DE01 /* CCPlane.h */, - B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */, - B60C5BD319AC68B10056FBDE /* CCBillBoard.h */, - 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */, - 15AE17E519AAD2F700C27E9E /* CCAABB.h */, - 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */, - 15AE17E719AAD2F700C27E9E /* CCAnimate3D.h */, - 15AE17E819AAD2F700C27E9E /* CCAnimation3D.cpp */, - 15AE17E919AAD2F700C27E9E /* CCAnimation3D.h */, - 15AE17EA19AAD2F700C27E9E /* CCAnimationCurve.h */, - 15AE17EB19AAD2F700C27E9E /* CCAnimationCurve.inl */, - 15AE17EC19AAD2F700C27E9E /* CCAttachNode.cpp */, - 15AE17ED19AAD2F700C27E9E /* CCAttachNode.h */, - 15AE17EE19AAD2F700C27E9E /* CCBundle3D.cpp */, - 15AE17EF19AAD2F700C27E9E /* CCBundle3D.h */, - 15AE17F019AAD2F700C27E9E /* CCBundle3DData.h */, - 15AE17F119AAD2F700C27E9E /* CCBundleReader.cpp */, - 15AE17F219AAD2F700C27E9E /* CCBundleReader.h */, - 15AE17F319AAD2F700C27E9E /* CCMesh.cpp */, - 15AE17F419AAD2F700C27E9E /* CCMesh.h */, - 15AE17F519AAD2F700C27E9E /* CCMeshSkin.cpp */, - 15AE17F619AAD2F700C27E9E /* CCMeshSkin.h */, - 15AE17F719AAD2F700C27E9E /* CCMeshVertexIndexData.cpp */, - 15AE17F819AAD2F700C27E9E /* CCMeshVertexIndexData.h */, - 15AE17F919AAD2F700C27E9E /* CCOBB.cpp */, - 15AE17FA19AAD2F700C27E9E /* CCOBB.h */, - 15AE17FB19AAD2F700C27E9E /* CCObjLoader.cpp */, - 15AE17FC19AAD2F700C27E9E /* CCObjLoader.h */, - 15AE17FD19AAD2F700C27E9E /* CCRay.cpp */, - 15AE17FE19AAD2F700C27E9E /* CCRay.h */, - 15AE17FF19AAD2F700C27E9E /* CCSkeleton3D.cpp */, - 15AE180019AAD2F700C27E9E /* CCSkeleton3D.h */, - 15AE180119AAD2F700C27E9E /* CCSprite3D.cpp */, - 15AE180219AAD2F700C27E9E /* CCSprite3D.h */, - 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */, - 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */, - 15AE180519AAD2F700C27E9E /* cocos3d.h */, - ); - name = 3d; - path = ../cocos/3d; - sourceTree = ""; - }; - B6C0BF4D1A6F733D00BCF15A /* Particle3D */ = { - isa = PBXGroup; - children = ( - B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */, - B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */, - B68778F21A8CA82E00643ABF /* CCParticle3DEmitter.cpp */, - B68778F31A8CA82E00643ABF /* CCParticle3DEmitter.h */, - B68778F41A8CA82E00643ABF /* CCParticle3DRender.cpp */, - B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */, - B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */, - B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */, - B6C0BF661A6F746800BCF15A /* ParticleUniverse */, - ); - name = Particle3D; - sourceTree = ""; - }; - B6C0BF661A6F746800BCF15A /* ParticleUniverse */ = { - isa = PBXGroup; - children = ( - B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */, - B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */, - B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */, - B665E0CF1AA80A6500DDB1C5 /* CCPUAffectorManager.h */, - B665E0D01AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp */, - B665E0D11AA80A6500DDB1C5 /* CCPUAffectorTranslator.h */, - B665E0D21AA80A6500DDB1C5 /* CCPUAlignAffector.cpp */, - B665E0D31AA80A6500DDB1C5 /* CCPUAlignAffector.h */, - B665E0D41AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp */, - B665E0D51AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h */, - B665E0D61AA80A6500DDB1C5 /* CCPUBaseCollider.cpp */, - B665E0D71AA80A6500DDB1C5 /* CCPUBaseCollider.h */, - B665E0D81AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp */, - B665E0D91AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h */, - B665E0DA1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp */, - B665E0DB1AA80A6500DDB1C5 /* CCPUBaseForceAffector.h */, - B665E0DC1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp */, - B665E0DD1AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h */, - B665E0DE1AA80A6500DDB1C5 /* CCPUBeamRender.cpp */, - B665E0DF1AA80A6500DDB1C5 /* CCPUBeamRender.h */, - B665E0E01AA80A6500DDB1C5 /* CCPUBehaviour.cpp */, - B665E0E11AA80A6500DDB1C5 /* CCPUBehaviour.h */, - B665E0E21AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp */, - B665E0E31AA80A6500DDB1C5 /* CCPUBehaviourManager.h */, - B665E0E41AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp */, - B665E0E51AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h */, - B665E0E61AA80A6500DDB1C5 /* CCPUBillboardChain.cpp */, - B665E0E71AA80A6500DDB1C5 /* CCPUBillboardChain.h */, - B665E0E81AA80A6500DDB1C5 /* CCPUBoxCollider.cpp */, - B665E0E91AA80A6500DDB1C5 /* CCPUBoxCollider.h */, - B665E0EA1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp */, - B665E0EB1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h */, - B665E0EC1AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp */, - B665E0ED1AA80A6500DDB1C5 /* CCPUBoxEmitter.h */, - B665E0EE1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp */, - B665E0EF1AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h */, - B665E0F01AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp */, - B665E0F11AA80A6500DDB1C5 /* CCPUCircleEmitter.h */, - B665E0F21AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp */, - B665E0F31AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h */, - B665E0F41AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp */, - B665E0F51AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h */, - B665E0F61AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp */, - B665E0F71AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h */, - B665E0F81AA80A6500DDB1C5 /* CCPUColorAffector.cpp */, - B665E0F91AA80A6500DDB1C5 /* CCPUColorAffector.h */, - B665E0FA1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp */, - B665E0FB1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h */, - B665E0FC1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp */, - B665E0FD1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h */, - B665E0FE1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp */, - B665E0FF1AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h */, - B665E1001AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp */, - B665E1011AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h */, - B665E1021AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp */, - B665E1031AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h */, - B665E1041AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp */, - B665E1051AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h */, - B665E1061AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp */, - B665E1071AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h */, - B665E1081AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp */, - B665E1091AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h */, - B665E10A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp */, - B665E10B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h */, - B665E10C1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp */, - B665E10D1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h */, - B665E10E1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp */, - B665E10F1AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h */, - B665E1101AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp */, - B665E1111AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h */, - B665E1121AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp */, - B665E1131AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h */, - B665E1141AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp */, - B665E1151AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h */, - B665E1161AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp */, - B665E1171AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h */, - B665E1181AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp */, - B665E1191AA80A6500DDB1C5 /* CCPUDynamicAttribute.h */, - B665E11A1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp */, - B665E11B1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h */, - B665E11C1AA80A6500DDB1C5 /* CCPUEmitter.cpp */, - B665E11D1AA80A6500DDB1C5 /* CCPUEmitter.h */, - B665E11E1AA80A6500DDB1C5 /* CCPUEmitterManager.cpp */, - B665E11F1AA80A6500DDB1C5 /* CCPUEmitterManager.h */, - B665E1201AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp */, - B665E1211AA80A6500DDB1C5 /* CCPUEmitterTranslator.h */, - B665E1221AA80A6500DDB1C5 /* CCPUEventHandler.cpp */, - B665E1231AA80A6500DDB1C5 /* CCPUEventHandler.h */, - B665E1241AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp */, - B665E1251AA80A6500DDB1C5 /* CCPUEventHandlerManager.h */, - B665E1261AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp */, - B665E1271AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h */, - B665E1281AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp */, - B665E1291AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h */, - B665E12A1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp */, - B665E12B1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h */, - B665E12C1AA80A6500DDB1C5 /* CCPUForceField.cpp */, - B665E12D1AA80A6500DDB1C5 /* CCPUForceField.h */, - B665E12E1AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp */, - B665E12F1AA80A6500DDB1C5 /* CCPUForceFieldAffector.h */, - B665E1301AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp */, - B665E1311AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h */, - B665E1321AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp */, - B665E1331AA80A6500DDB1C5 /* CCPUGeometryRotator.h */, - B665E1341AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp */, - B665E1351AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h */, - B665E1361AA80A6500DDB1C5 /* CCPUGravityAffector.cpp */, - B665E1371AA80A6500DDB1C5 /* CCPUGravityAffector.h */, - B665E1381AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp */, - B665E1391AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h */, - B665E13A1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp */, - B665E13B1AA80A6500DDB1C5 /* CCPUInterParticleCollider.h */, - B665E13C1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp */, - B665E13D1AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h */, - B665E13E1AA80A6500DDB1C5 /* CCPUJetAffector.cpp */, - B665E13F1AA80A6500DDB1C5 /* CCPUJetAffector.h */, - B665E1401AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp */, - B665E1411AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h */, - B665E1421AA80A6500DDB1C5 /* CCPULineAffector.cpp */, - B665E1431AA80A6500DDB1C5 /* CCPULineAffector.h */, - B665E1441AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp */, - B665E1451AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h */, - B665E1461AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp */, - B665E1471AA80A6500DDB1C5 /* CCPULinearForceAffector.h */, - B665E1481AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp */, - B665E1491AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h */, - B665E14A1AA80A6500DDB1C5 /* CCPULineEmitter.cpp */, - B665E14B1AA80A6500DDB1C5 /* CCPULineEmitter.h */, - B665E14C1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp */, - B665E14D1AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h */, - B665E14E1AA80A6500DDB1C5 /* CCPUListener.cpp */, - B665E14F1AA80A6500DDB1C5 /* CCPUListener.h */, - B665E1501AA80A6500DDB1C5 /* CCPUMaterialManager.cpp */, - B665E1511AA80A6500DDB1C5 /* CCPUMaterialManager.h */, - B665E1521AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp */, - B665E1531AA80A6500DDB1C5 /* CCPUMaterialTranslator.h */, - B665E1541AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp */, - B665E1551AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h */, - B665E1561AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp */, - B665E1571AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h */, - B665E1581AA80A6500DDB1C5 /* CCPUNoise.cpp */, - B665E1591AA80A6500DDB1C5 /* CCPUNoise.h */, - B665E15A1AA80A6500DDB1C5 /* CCPUObserver.cpp */, - B665E15B1AA80A6500DDB1C5 /* CCPUObserver.h */, - B665E15C1AA80A6500DDB1C5 /* CCPUObserverManager.cpp */, - B665E15D1AA80A6500DDB1C5 /* CCPUObserverManager.h */, - B665E15E1AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp */, - B665E15F1AA80A6500DDB1C5 /* CCPUObserverTranslator.h */, - B665E1601AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp */, - B665E1611AA80A6500DDB1C5 /* CCPUOnClearObserver.h */, - B665E1621AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp */, - B665E1631AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h */, - B665E1641AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp */, - B665E1651AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h */, - B665E1661AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp */, - B665E1671AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h */, - B665E1681AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp */, - B665E1691AA80A6500DDB1C5 /* CCPUOnCountObserver.h */, - B665E16A1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp */, - B665E16B1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h */, - B665E16C1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp */, - B665E16D1AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h */, - B665E16E1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp */, - B665E16F1AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h */, - B665E1701AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp */, - B665E1711AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h */, - B665E1721AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp */, - B665E1731AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h */, - B665E1741AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp */, - B665E1751AA80A6500DDB1C5 /* CCPUOnExpireObserver.h */, - B665E1761AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp */, - B665E1771AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h */, - B665E1781AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp */, - B665E1791AA80A6500DDB1C5 /* CCPUOnPositionObserver.h */, - B665E17A1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp */, - B665E17B1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h */, - B665E17C1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp */, - B665E17D1AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h */, - B665E17E1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp */, - B665E17F1AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h */, - B665E1801AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp */, - B665E1811AA80A6500DDB1C5 /* CCPUOnRandomObserver.h */, - B665E1821AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp */, - B665E1831AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h */, - B665E1841AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp */, - B665E1851AA80A6500DDB1C5 /* CCPUOnTimeObserver.h */, - B665E1861AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp */, - B665E1871AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h */, - B665E1881AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp */, - B665E1891AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h */, - B665E18A1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp */, - B665E18B1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h */, - B665E18C1AA80A6500DDB1C5 /* CCPUParticleFollower.cpp */, - B665E18D1AA80A6500DDB1C5 /* CCPUParticleFollower.h */, - B665E18E1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp */, - B665E18F1AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h */, - B665E1901AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp */, - B665E1911AA80A6500DDB1C5 /* CCPUParticleSystem3D.h */, - B665E1921AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp */, - B665E1931AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h */, - B665E1941AA80A6500DDB1C5 /* CCPUPathFollower.cpp */, - B665E1951AA80A6500DDB1C5 /* CCPUPathFollower.h */, - B665E1961AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp */, - B665E1971AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h */, - B665E1981AA80A6500DDB1C5 /* CCPUPlane.cpp */, - B665E1991AA80A6500DDB1C5 /* CCPUPlane.h */, - B665E19A1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp */, - B665E19B1AA80A6500DDB1C5 /* CCPUPlaneCollider.h */, - B665E19C1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp */, - B665E19D1AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h */, - B665E19E1AA80A6500DDB1C5 /* CCPUPointEmitter.cpp */, - B665E19F1AA80A6500DDB1C5 /* CCPUPointEmitter.h */, - B665E1A01AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp */, - B665E1A11AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h */, - B665E1A21AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp */, - B665E1A31AA80A6500DDB1C5 /* CCPUPositionEmitter.h */, - B665E1A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp */, - B665E1A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h */, - B665E1A61AA80A6500DDB1C5 /* CCPURandomiser.cpp */, - B665E1A71AA80A6500DDB1C5 /* CCPURandomiser.h */, - B665E1A81AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp */, - B665E1A91AA80A6500DDB1C5 /* CCPURandomiserTranslator.h */, - B665E1AA1AA80A6500DDB1C5 /* CCPURender.cpp */, - B665E1AB1AA80A6500DDB1C5 /* CCPURender.h */, - B665E1AC1AA80A6500DDB1C5 /* CCPURendererTranslator.cpp */, - B665E1AD1AA80A6500DDB1C5 /* CCPURendererTranslator.h */, - B665E1AE1AA80A6500DDB1C5 /* CCPURibbonTrail.cpp */, - B665E1AF1AA80A6500DDB1C5 /* CCPURibbonTrail.h */, - B665E1B01AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp */, - B665E1B11AA80A6500DDB1C5 /* CCPURibbonTrailRender.h */, - B665E1B21AA80A6500DDB1C5 /* CCPUScaleAffector.cpp */, - B665E1B31AA80A6500DDB1C5 /* CCPUScaleAffector.h */, - B665E1B41AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.cpp */, - B665E1B51AA80A6500DDB1C5 /* CCPUScaleAffectorTranslator.h */, - B665E1B61AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.cpp */, - B665E1B71AA80A6500DDB1C5 /* CCPUScaleVelocityAffector.h */, - B665E1B81AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp */, - B665E1B91AA80A6500DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h */, - B665E1BA1AA80A6500DDB1C5 /* CCPUScriptCompiler.cpp */, - B665E1BB1AA80A6500DDB1C5 /* CCPUScriptCompiler.h */, - B665E1BC1AA80A6500DDB1C5 /* CCPUScriptLexer.cpp */, - B665E1BD1AA80A6500DDB1C5 /* CCPUScriptLexer.h */, - B665E1BE1AA80A6500DDB1C5 /* CCPUScriptParser.cpp */, - B665E1BF1AA80A6500DDB1C5 /* CCPUScriptParser.h */, - B665E1C01AA80A6500DDB1C5 /* CCPUScriptTranslator.cpp */, - B665E1C11AA80A6500DDB1C5 /* CCPUScriptTranslator.h */, - B665E1C21AA80A6500DDB1C5 /* CCPUSimpleSpline.cpp */, - B665E1C31AA80A6500DDB1C5 /* CCPUSimpleSpline.h */, - B665E1C41AA80A6500DDB1C5 /* CCPUSineForceAffector.cpp */, - B665E1C51AA80A6500DDB1C5 /* CCPUSineForceAffector.h */, - B665E1C61AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.cpp */, - B665E1C71AA80A6500DDB1C5 /* CCPUSineForceAffectorTranslator.h */, - B665E1C81AA80A6500DDB1C5 /* CCPUSlaveBehaviour.cpp */, - B665E1C91AA80A6500DDB1C5 /* CCPUSlaveBehaviour.h */, - B665E1CA1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp */, - B665E1CB1AA80A6500DDB1C5 /* CCPUSlaveBehaviourTranslator.h */, - B665E1CC1AA80A6500DDB1C5 /* CCPUSlaveEmitter.cpp */, - B665E1CD1AA80A6500DDB1C5 /* CCPUSlaveEmitter.h */, - B665E1CE1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.cpp */, - B665E1CF1AA80A6500DDB1C5 /* CCPUSlaveEmitterTranslator.h */, - B665E1D01AA80A6500DDB1C5 /* CCPUSphere.cpp */, - B665E1D11AA80A6500DDB1C5 /* CCPUSphere.h */, - B665E1D21AA80A6500DDB1C5 /* CCPUSphereCollider.cpp */, - B665E1D31AA80A6500DDB1C5 /* CCPUSphereCollider.h */, - B665E1D41AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.cpp */, - B665E1D51AA80A6500DDB1C5 /* CCPUSphereColliderTranslator.h */, - B665E1D61AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.cpp */, - B665E1D71AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitter.h */, - B665E1D81AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp */, - B665E1D91AA80A6500DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h */, - B665E1DA1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.cpp */, - B665E1DB1AA80A6500DDB1C5 /* CCPUTechniqueTranslator.h */, - B665E1DC1AA80A6500DDB1C5 /* CCPUTextureAnimator.cpp */, - B665E1DD1AA80A6500DDB1C5 /* CCPUTextureAnimator.h */, - B665E1DE1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.cpp */, - B665E1DF1AA80A6500DDB1C5 /* CCPUTextureAnimatorTranslator.h */, - B665E1E01AA80A6500DDB1C5 /* CCPUTextureRotator.cpp */, - B665E1E11AA80A6500DDB1C5 /* CCPUTextureRotator.h */, - B665E1E21AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.cpp */, - B665E1E31AA80A6500DDB1C5 /* CCPUTextureRotatorTranslator.h */, - B665E1E41AA80A6500DDB1C5 /* CCPUTranslateManager.cpp */, - B665E1E51AA80A6500DDB1C5 /* CCPUTranslateManager.h */, - B665E1E61AA80A6500DDB1C5 /* CCPUUtil.cpp */, - B665E1E71AA80A6500DDB1C5 /* CCPUUtil.h */, - B665E1E81AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.cpp */, - B665E1E91AA80A6500DDB1C5 /* CCPUVelocityMatchingAffector.h */, - B665E1EA1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp */, - B665E1EB1AA80A6500DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h */, - B665E1EC1AA80A6500DDB1C5 /* CCPUVertexEmitter.cpp */, - B665E1ED1AA80A6500DDB1C5 /* CCPUVertexEmitter.h */, - B665E1EE1AA80A6500DDB1C5 /* CCPUVortexAffector.cpp */, - B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */, - B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */, - B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */, - ); - name = ParticleUniverse; - sourceTree = ""; - }; - B6CAAFD11AF9A98E00B9B856 /* physics3d */ = { - isa = PBXGroup; - children = ( - B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */, - B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */, - B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */, - B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */, - B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */, - B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */, - B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */, - B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */, - B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */, - B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */, - B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */, - B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */, - B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */, - B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */, - B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */, - B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */, - ); - name = physics3d; + EDC78A6821CA19FA00E1863C /* ImageViewReader */ = { + isa = PBXGroup; + children = ( + EDC78A6921CA19FA00E1863C /* ImageViewReader.h */, + EDC78A6A21CA19FA00E1863C /* ImageViewReader.cpp */, + ); + path = ImageViewReader; sourceTree = ""; }; - B6CAB0021AF9A9EE00B9B856 /* bullet */ = { + EDC78A6B21CA19FA00E1863C /* LayoutReader */ = { isa = PBXGroup; children = ( - 468A19731EF3BA3C00ECA675 /* mac */, + EDC78A6C21CA19FA00E1863C /* LayoutReader.h */, + EDC78A6D21CA19FA00E1863C /* LayoutReader.cpp */, ); - name = bullet; + path = LayoutReader; sourceTree = ""; }; - B6DD2F351B04805400E47F5F /* navmesh */ = { + EDC78A6E21CA19FA00E1863C /* SingleNodeReader */ = { isa = PBXGroup; children = ( - B677B0BF1B18492D006762CB /* CCNavMesh.cpp */, - B677B0C01B18492D006762CB /* CCNavMesh.h */, - B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */, - B677B0C21B18492D006762CB /* CCNavMeshAgent.h */, - B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */, - B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */, - B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */, - B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */, - B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */, - B677B0C81B18492D006762CB /* CCNavMeshUtils.h */, + EDC78A6F21CA19FA00E1863C /* SingleNodeReader.cpp */, + EDC78A7021CA19FA00E1863C /* SingleNodeReader.h */, ); - name = navmesh; + path = SingleNodeReader; sourceTree = ""; }; - B6DD2F731B04820C00E47F5F /* recast */ = { + EDC78A7221CA19FA00E1863C /* TextBMFontReader */ = { isa = PBXGroup; children = ( - B6DD2F791B04825B00E47F5F /* DebugUtils */, - B6DD2F821B04825B00E47F5F /* Detour */, - B6DD2F921B04825B00E47F5F /* DetourCrowd */, - B6DD2F9F1B04825B00E47F5F /* DetourTileCache */, - B6DD2FA41B04825B00E47F5F /* fastlz */, + EDC78A7321CA19FA00E1863C /* TextBMFontReader.h */, + EDC78A7421CA19FA00E1863C /* TextBMFontReader.cpp */, ); - name = recast; + path = TextBMFontReader; sourceTree = ""; }; - B6DD2F791B04825B00E47F5F /* DebugUtils */ = { + EDC78A7521CA19FA00E1863C /* CheckBoxReader */ = { isa = PBXGroup; children = ( - B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */, - B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */, - B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */, - B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */, - B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */, - B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */, - B6DD2F801B04825B00E47F5F /* RecastDump.cpp */, - B6DD2F811B04825B00E47F5F /* RecastDump.h */, + EDC78A7621CA19FA00E1863C /* CheckBoxReader.cpp */, + EDC78A7721CA19FA00E1863C /* CheckBoxReader.h */, ); - name = DebugUtils; - path = ../external/recast/DebugUtils; + path = CheckBoxReader; sourceTree = ""; }; - B6DD2F821B04825B00E47F5F /* Detour */ = { + EDC78A7821CA19FA00E1863C /* Sprite3DReader */ = { isa = PBXGroup; children = ( - B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */, - B6DD2F841B04825B00E47F5F /* DetourAlloc.h */, - B6DD2F851B04825B00E47F5F /* DetourAssert.h */, - B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */, - B6DD2F871B04825B00E47F5F /* DetourCommon.h */, - B6DD2F881B04825B00E47F5F /* DetourMath.h */, - B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */, - B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */, - B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */, - B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */, - B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */, - B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */, - B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */, - B6DD2F901B04825B00E47F5F /* DetourNode.h */, - B6DD2F911B04825B00E47F5F /* DetourStatus.h */, + EDC78A7921CA19FA00E1863C /* Sprite3DReader.h */, + EDC78A7A21CA19FA00E1863C /* Sprite3DReader.cpp */, ); - name = Detour; - path = ../external/recast/Detour; + path = Sprite3DReader; sourceTree = ""; }; - B6DD2F921B04825B00E47F5F /* DetourCrowd */ = { + EDC78A7B21CA19FA00E1863C /* SliderReader */ = { isa = PBXGroup; children = ( - B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */, - B6DD2F941B04825B00E47F5F /* DetourCrowd.h */, - B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */, - B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */, - B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */, - B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */, - B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */, - B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */, - B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */, - B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */, - B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */, - B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */, + EDC78A7C21CA19FA00E1863C /* SliderReader.cpp */, + EDC78A7D21CA19FA00E1863C /* SliderReader.h */, ); - name = DetourCrowd; - path = ../external/recast/DetourCrowd; + path = SliderReader; sourceTree = ""; }; - B6DD2F9F1B04825B00E47F5F /* DetourTileCache */ = { + EDC78A7E21CA19FA00E1863C /* ComAudioReader */ = { isa = PBXGroup; children = ( - B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */, - B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */, - B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */, - B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */, + EDC78A7F21CA19FA00E1863C /* ComAudioReader.cpp */, + EDC78A8021CA19FA00E1863C /* ComAudioReader.h */, ); - name = DetourTileCache; - path = ../external/recast/DetourTileCache; + path = ComAudioReader; sourceTree = ""; }; - B6DD2FA41B04825B00E47F5F /* fastlz */ = { + EDC78A8221CA19FA00E1863C /* ParticleReader */ = { isa = PBXGroup; children = ( - B6DD2FA51B04825B00E47F5F /* fastlz.c */, - B6DD2FA61B04825B00E47F5F /* fastlz.h */, + EDC78A8321CA19FA00E1863C /* ParticleReader.cpp */, + EDC78A8421CA19FA00E1863C /* ParticleReader.h */, ); - name = fastlz; - path = ../external/recast/fastlz; + path = ParticleReader; sourceTree = ""; }; - BA6249A41E77D2850096291C /* tinydir */ = { + EDC78A8621CA19FA00E1863C /* Particle3DReader */ = { isa = PBXGroup; children = ( - BA6249A51E77D2850096291C /* COPYING */, - BA6249A61E77D2850096291C /* package.json */, - BA6249A71E77D2850096291C /* tinydir.h */, + EDC78A8721CA19FA00E1863C /* Particle3DReader.h */, + EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */, ); - name = tinydir; - path = ../external/tinydir; + path = Particle3DReader; sourceTree = ""; }; - C50306621B60B56C001E6D43 /* Skeleton */ = { + EDC78A8921CA19FA00E1863C /* SkeletonReader */ = { isa = PBXGroup; children = ( - C50306631B60B583001E6D43 /* CCBoneNode.cpp */, - C50306641B60B583001E6D43 /* CCBoneNode.h */, - C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */, - C50306661B60B583001E6D43 /* CCSkeletonNode.h */, - C50306671B60B583001E6D43 /* CCSkinNode.cpp */, - C50306681B60B583001E6D43 /* CCSkinNode.h */, + EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */, + EDC78A8B21CA19FA00E1863C /* SkeletonNodeReader.h */, + EDC78A8C21CA19FA00E1863C /* BoneNodeReader.cpp */, + EDC78A8D21CA19FA00E1863C /* BoneNodeReader.h */, + EDC78A8E21CA19FA00E1863C /* SkeletonNodeReader.cpp */, ); - name = Skeleton; + path = SkeletonReader; sourceTree = ""; }; - C503066F1B60B590001E6D43 /* SkeletonReader */ = { + EDC78A8F21CA19FA00E1863C /* ScrollViewReader */ = { isa = PBXGroup; children = ( - C50306701B60B5B2001E6D43 /* BoneNodeReader.cpp */, - C50306711B60B5B2001E6D43 /* BoneNodeReader.h */, - C50306721B60B5B2001E6D43 /* CSBoneBinary_generated.h */, - C50306731B60B5B2001E6D43 /* SkeletonNodeReader.cpp */, - C50306741B60B5B2001E6D43 /* SkeletonNodeReader.h */, + EDC78A9021CA19FA00E1863C /* ScrollViewReader.h */, + EDC78A9121CA19FA00E1863C /* ScrollViewReader.cpp */, ); - name = SkeletonReader; + path = ScrollViewReader; sourceTree = ""; }; - C5F516141C8216AB0013B695 /* TabControlReader */ = { + EDC78A9221CA19FA00E1863C /* TextFieldReader */ = { isa = PBXGroup; children = ( - C5F516151C8216C60013B695 /* CSTabControl_generated.h */, - C5F516161C8216C60013B695 /* TabControlReader.cpp */, - C5F516171C8216C60013B695 /* TabControlReader.h */, + EDC78A9321CA19FA00E1863C /* TextFieldReader.h */, + EDC78A9421CA19FA00E1863C /* TextFieldReader.cpp */, ); - name = TabControlReader; + path = TextFieldReader; sourceTree = ""; }; - D0FD03391A3B51AA00825BB5 /* allocator */ = { + EDC78A9A21CA19FA00E1863C /* fbs-files */ = { isa = PBXGroup; children = ( - D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */, - D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */, - D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */, - D0FD033E1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp */, - D0FD033F1A3B51AA00825BB5 /* CCAllocatorGlobal.h */, - D0FD03401A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp */, - D0FD03411A3B51AA00825BB5 /* CCAllocatorMacros.h */, - D0FD03421A3B51AA00825BB5 /* CCAllocatorMutex.h */, - D0FD03431A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h */, - D0FD03441A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h */, - D0FD03451A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h */, - D0FD03461A3B51AA00825BB5 /* CCAllocatorStrategyPool.h */, + EDC78A9B21CA19FA00E1863C /* CSLanguageDataBinary.fbs */, + EDC78A9C21CA19FA00E1863C /* CSParseBinary.fbs */, + EDC78A9D21CA19FA00E1863C /* CSParse3DBinary.fbs */, + EDC78A9E21CA19FA00E1863C /* CSBoneBinary.fbs */, + EDC78A9F21CA19FA00E1863C /* CSArmatureNode.fbs */, + EDC78AA021CA19FA00E1863C /* CSTabControl.fbs */, ); - name = allocator; - path = ../base/allocator; + path = "fbs-files"; sourceTree = ""; }; /* End PBXGroup section */ @@ -9067,810 +5863,527 @@ buildActionMask = 2147483647; files = ( 50ABBE9B1925AB6F00A911A9 /* CCRef.h in Headers */, + EDC78CCC21CA19FC00E1863C /* NodeReaderDefine.h in Headers */, 50ABBE851925AB6F00A911A9 /* ccFPSImages.h in Headers */, - B665E2701AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, - B665E25C1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */, - 38B8E2E319E671D2002D7CE7 /* UILayoutComponent.h in Headers */, - B6D38B8C1AC3AFAC00043997 /* CCSkybox.h in Headers */, 5034CA39191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, - 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, - D0FD03591A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */, - B665E2901AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */, + ED28C24F219E629C0078D854 /* Texture.h in Headers */, + 460D4D0F21ABD0C60075726E /* BlendStateMTL.h in Headers */, 50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */, + EDC78CC021CA19FC00E1863C /* ImageViewReader.h in Headers */, + 40FE105221F070640061C04F /* CCControlExtensions.h in Headers */, 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */, 50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */, - 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, - 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */, - B665E2E41AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */, - 5020A2281D49912500E80C72 /* TransformConstraintData.h in Headers */, - B665E2781AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */, - 15AE18EB19AAD35000C27E9E /* CCActionNode.h in Headers */, - B665E2501AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */, - B665E3901AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */, - 15AE18FC19AAD35000C27E9E /* CCComBase.h in Headers */, + EDC78D1C21CA19FC00E1863C /* CocoLoader.h in Headers */, 1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */, - 15AE1B5219AADA9900C27E9E /* UIPageView.h in Headers */, + EDC78CF421CA19FC00E1863C /* BoneNodeReader.h in Headers */, 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */, 5034CA3F191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 50CE4D201D243DD8003D2FB9 /* glfw3native.h in Headers */, 1A40D1151E8E56C7002E363A /* encodings.h in Headers */, - B665E4381AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */, 50ABBD461925AB0000A911A9 /* CCVertex.h in Headers */, B63990CE1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */, - B6CAAFF81AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */, - B665E2201AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */, - 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */, 50864CDF1C7BC1B100B3BAB1 /* cpTransform.h in Headers */, - B665E28C1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */, - 5020A1711D49912500E80C72 /* Attachment.h in Headers */, - B665E3941AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h in Headers */, - 5020A1C51D49912500E80C72 /* PathAttachment.h in Headers */, - 46A170E71807CECA005B8026 /* CCPhysicsBody.h in Headers */, - 0C261F2A1BE7528900707478 /* Light3DReader.h in Headers */, - B665E22C1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */, + EDC78D1A21CA19FC00E1863C /* TriggerObj.h in Headers */, + EDC78D0221CA19FC00E1863C /* CCComAudio.h in Headers */, 1A4C3ABA1E9B7A45001972CC /* CCStencilStateManager.h in Headers */, - B665E4101AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */, - 38F526401A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */, - B665E2E81AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */, - 15AE1B6F19AADA9900C27E9E /* GUIDefine.h in Headers */, - 15AE18DD19AAD35000C27E9E /* CocoLoader.h in Headers */, - 46A170EB1807CECA005B8026 /* CCPhysicsJoint.h in Headers */, - D0FD03511A3B51AA00825BB5 /* CCAllocatorGlobal.h in Headers */, - 15AE191E19AAD35000C27E9E /* CCTween.h in Headers */, - 15AE184619AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, - B68779061A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */, 50ABBD3E1925AB0000A911A9 /* CCGeometry.h in Headers */, + EDC78C7221CA19FC00E1863C /* WidgetCallBackHandlerProtocol.h in Headers */, B6DD2FD11B04825B00E47F5F /* DetourNode.h in Headers */, - 15AE18F719AAD35000C27E9E /* CCBatchNode.h in Headers */, - 15AE181419AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, - 5020A22E1D49912500E80C72 /* VertexAttachment.h in Headers */, 50ABBE631925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */, - B665E4281AA80A6600DDB1C5 /* CCPUUtil.h in Headers */, + EDC78BEA21CA19FB00E1863C /* CCDisplayManager.h in Headers */, 1A40D1631E8E56C7002E363A /* rapidjson.h in Headers */, - B665E2601AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 1A40D14E1E8E56C7002E363A /* memorybuffer.h in Headers */, - 15AE1C1419AAE2C600C27E9E /* CCPhysicsSprite.h in Headers */, B6DD2FE71B04825B00E47F5F /* DetourPathQueue.h in Headers */, + 460D4CD321A5666E0075726E /* CCRenderer.h in Headers */, + ED28C22F219E629B0078D854 /* Backend.h in Headers */, B6DD2FBB1B04825B00E47F5F /* DetourAssert.h in Headers */, - 46A170EE1807CECA005B8026 /* CCPhysicsShape.h in Headers */, - B665E1FC1AA80A6500DDB1C5 /* CCPUAffectorTranslator.h in Headers */, + EDC78CCE21CA19FC00E1863C /* TextBMFontReader.h in Headers */, 50864CBB1C7BC1B000B3BAB1 /* cpPinJoint.h in Headers */, 50ABBED31925AB6F00A911A9 /* uthash.h in Headers */, - 46A170E91807CECA005B8026 /* CCPhysicsContact.h in Headers */, - 15AE191419AAD35000C27E9E /* CCSGUIReader.h in Headers */, - 15AE196D19AAD35700C27E9E /* CCActionTimeline.h in Headers */, + 46F9B6F021AFE64C009DF858 /* cocos-ext.h in Headers */, 3E2F27A719CFBFE400E7C490 /* AudioEngine.h in Headers */, - 15AE183A19AAD2F700C27E9E /* CCRay.h in Headers */, - 5020A1D11D49912500E80C72 /* PathConstraintData.h in Headers */, - 15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, + ED28C229219E629B0078D854 /* Device.h in Headers */, 15FB20761AE7BF8600C31518 /* CCAutoPolygon.h in Headers */, - B665E2C41AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */, - 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */, - 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */, - 5020A16B1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */, + 40FE105921F070640061C04F /* CCControlStepper.h in Headers */, 1A40D1331E8E56C7002E363A /* itoa.h in Headers */, DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */, - 5020A2131D49912500E80C72 /* SlotData.h in Headers */, - B68778FE1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */, + 46AF3A1F21F1877100D5AFCD /* CCPhysicsHelper.h in Headers */, + EDC78C1C21CA19FB00E1863C /* CCActionTimelineCache.h in Headers */, 50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */, 1A40D1421E8E56C7002E363A /* strfunc.h in Headers */, B276EF631988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, - 5020A20D1D49912500E80C72 /* Slot.h in Headers */, + 4631CBAB21AFD9FA0000D408 /* UICheckBox.h in Headers */, 50ABBE871925AB6F00A911A9 /* ccMacros.h in Headers */, - B665E32C1AA80A6500DDB1C5 /* CCPUOnCountObserver.h in Headers */, - 3E2A09C41BAA91B70086B878 /* CCMotionStreak3D.h in Headers */, - 15B3708A19EE414C00ABE682 /* Manifest.h in Headers */, 50ABBE731925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, 1A570063180BC5A10088DEC7 /* CCAction.h in Headers */, 1A570067180BC5A10088DEC7 /* CCActionCamera.h in Headers */, - 15AE187B19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, - B665E2841AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */, - C503066C1B60B583001E6D43 /* CCSkeletonNode.h in Headers */, - B665E3E01AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */, + EDC78D2E21CA19FC00E1863C /* CCSGUIReader.h in Headers */, B6DD2FAD1B04825B00E47F5F /* DetourDebugDraw.h in Headers */, - B665E42C1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */, - B665E3B41AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */, - B6CAAFF01AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */, + 40FE104B21F070640061C04F /* CCControlUtils.h in Headers */, 1A57006B180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, - B665E3BC1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, - B677B0CB1B18492D006762CB /* CCNavMesh.h in Headers */, - B665E2A81AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */, - 4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */, - B665E27C1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */, 1A57006F180BC5A10088DEC7 /* CCActionEase.h in Headers */, - B665E29C1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */, - 15AE1BD719AAE01E00C27E9E /* CCControlSlider.h in Headers */, - 15AE1BE519AAE01E00C27E9E /* CCTableView.h in Headers */, - B603F1AA1AC8EA0900A9579C /* CCTerrain.h in Headers */, - 15AE1BD319AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */, - 15AE1B6E19AADA9900C27E9E /* UIHelper.h in Headers */, B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, B6DD2FB11B04825B00E47F5F /* RecastDebugDraw.h in Headers */, - 46BDE4C31FA86C7F00104C05 /* Array.h in Headers */, - B665E2D41AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, - 15AE187F19AAD33D00C27E9E /* CCBKeyframe.h in Headers */, - B665E2B41AA80A6500DDB1C5 /* CCPUForceField.h in Headers */, 1A570073180BC5A10088DEC7 /* CCActionGrid.h in Headers */, + 46F9B72221AFE64D009DF858 /* CCTableViewCell.h in Headers */, 294D7D961D0E67B4002CE7B7 /* CCDevice-apple.h in Headers */, - 94A6DF061C7303FD0094AEF7 /* LocalizationManager.h in Headers */, - 15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */, - C50306771B60B5B2001E6D43 /* CSBoneBinary_generated.h in Headers */, + EDC78C1621CA19FB00E1863C /* CCTimeLine.h in Headers */, + 4631CBB921AFD9FA0000D408 /* GUIExport.h in Headers */, + EDC78CF821CA19FC00E1863C /* ScrollViewReader.h in Headers */, 5034CA3B191D591100CE6051 /* ccShader_PositionColor.vert in Headers */, - B665E3101AA80A6500DDB1C5 /* CCPUObserver.h in Headers */, 1A5FB7C41DF012D900C918C1 /* AudioMacros.h in Headers */, + ED28C223219E629B0078D854 /* RenderPipeline.h in Headers */, 1A570077180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 1A57007B180BC5A10088DEC7 /* CCActionInstant.h in Headers */, - 15AE182A19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, B276EF5F1988D1D500CD400F /* CCVertexIndexData.h in Headers */, - 5020A1DD1D49912500E80C72 /* Skeleton.h in Headers */, + 46AF3A1B21F1877100D5AFCD /* cpCompat62.h in Headers */, 50864CA31C7BC1B000B3BAB1 /* cpBody.h in Headers */, 1A57007F180BC5A10088DEC7 /* CCActionInterval.h in Headers */, B6DD2FDB1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */, - 503D4F661CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */, - B677B0DB1B18492D006762CB /* CCNavMeshUtils.h in Headers */, 1A40D1121E8E56C7002E363A /* encodedstream.h in Headers */, - B6CAAFE41AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, - B665E3301AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */, - 15AE188719AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, - B665E2D01AA80A6500DDB1C5 /* CCPUInterParticleCollider.h in Headers */, - 5020A1FB1D49912500E80C72 /* SkeletonJson.h in Headers */, - 1A01C69A18F57BE800EFE3A6 /* CCSet.h in Headers */, - 182C5CB31A95964700C30D34 /* Node3DReader.h in Headers */, - 5020A1E91D49912500E80C72 /* SkeletonBatch.h in Headers */, 1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */, 1A40D1211E8E56C7002E363A /* filewritestream.h in Headers */, 1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 50ABBD911925AB4100A911A9 /* CCGLProgramCache.h in Headers */, - 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */, - 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */, - 15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */, ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */, - 2962D5F71C61DBBF004821A3 /* CCUIPasswordTextField.h in Headers */, - 15AE18A719AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, + 460D4D0921ABD0C60075726E /* DeviceMTL.h in Headers */, 15FB20891AE7C57D00C31518 /* shapes.h in Headers */, - 15AE184819AAD2F700C27E9E /* cocos3d.h in Headers */, + 4631CB6921AFD9F90000D408 /* CCUITextInput.h in Headers */, 50ABBEC31925AB6F00A911A9 /* CCVector.h in Headers */, 1A57008B180BC5A10088DEC7 /* CCActionProgressTimer.h in Headers */, - B665E2EC1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */, - 382384151A259092002C4610 /* NodeReaderProtocol.h in Headers */, - B665E2DC1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */, - 382384111A259092002C4610 /* NodeReaderDefine.h in Headers */, 50ABBD8D1925AB4100A911A9 /* CCGLProgram.h in Headers */, - 5020A1A71D49912500E80C72 /* extension.h in Headers */, 50ABBEA11925AB6F00A911A9 /* CCScheduler.h in Headers */, - 15AE1B6219AADA9900C27E9E /* UIButton.h in Headers */, 50ABBDB71925AB4100A911A9 /* CCTexture2D.h in Headers */, - C5F516181C8216C60013B695 /* CSTabControl_generated.h in Headers */, + 4631CB9D21AFD9FA0000D408 /* UIScrollView.h in Headers */, + 4631CBB321AFD9FA0000D408 /* UIVBox.h in Headers */, 50ABBE811925AB6F00A911A9 /* CCEventType.h in Headers */, - B665E2B81AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */, + 46F9B72C21AFE64D009DF858 /* ExtensionExport.h in Headers */, + EDC78D1621CA19FC00E1863C /* CCComExtensionData.h in Headers */, + 4631CBCF21AFD9FA0000D408 /* UILoadingBar.h in Headers */, 1A57008F180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */, - 15AE19A319AAD39600C27E9E /* TextBMFontReader.h in Headers */, - B665E4041AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.h in Headers */, - 15AE191219AAD35000C27E9E /* CCProcessBase.h in Headers */, + EDC78C6421CA19FC00E1863C /* CSParse3DBinary_generated.h in Headers */, 15AE1BB619AADFEF00C27E9E /* SocketIO.h in Headers */, - B665E2F41AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */, + EDC78CEA21CA19FC00E1863C /* Particle3DReader.h in Headers */, B6DD2FB91B04825B00E47F5F /* DetourAlloc.h in Headers */, + EDC78D2821CA19FC00E1863C /* TriggerBase.h in Headers */, B6DD2FF71B04825B00E47F5F /* fastlz.h in Headers */, - B665E2D81AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */, - 5020A1651D49912500E80C72 /* Atlas.h in Headers */, 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, - 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, - B665E3C01AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */, - B665E2401AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, - D0FD035B1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */, - 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, - B665E3281AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */, 1A40D10C1E8E56C7002E363A /* document-wrapper.h in Headers */, - 5020A1591D49912500E80C72 /* AnimationState.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, 50ABC0671926664800A911A9 /* CCPlatformDefine-mac.h in Headers */, - B665E40C1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */, - 15AE189A19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, + 46AF3A2121F1877100D5AFCD /* CCPhysicsJoint.h in Headers */, 46C02E0918E91123004B7456 /* xxhash.h in Headers */, - 5020A1891D49912500E80C72 /* BoneData.h in Headers */, 1A40D16F1E8E56C7002E363A /* stringbuffer.h in Headers */, - 1A570110180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, + EDC78C9221CA19FC00E1863C /* LoadingBarReader.h in Headers */, + 461FE08421C34EEB00E5378F /* CCEnumClass.h in Headers */, 50CB247D19D9C5A100687767 /* AudioPlayer.h in Headers */, + 4631CBAD21AFD9FA0000D408 /* GUIDefine.h in Headers */, 50864CA01C7BC1B000B3BAB1 /* cpBB.h in Headers */, 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, - B665E3141AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */, - B665E2E01AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */, - 15B3707A19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, - 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, 50864CBE1C7BC1B000B3BAB1 /* cpPivotJoint.h in Headers */, - B665E2F01AA80A6500DDB1C5 /* CCPULineEmitter.h in Headers */, - 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */, - 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */, - B665E3C81AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */, - B665E3781AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h in Headers */, - 15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */, + 4631CB6321AFD9F90000D408 /* CCUIPasswordTextField.h in Headers */, + EDC78D0421CA19FC00E1863C /* CCDisplayFactory.h in Headers */, 1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */, 50864C9A1C7BC1B000B3BAB1 /* cpCompat62.h in Headers */, + EDC78C0021CA19FB00E1863C /* CCTimelineMacro.h in Headers */, 468A14E01EF223B600ECA675 /* flatbuffers.h in Headers */, 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 1A40D1601E8E56C7002E363A /* prettywriter.h in Headers */, 1A40D1481E8E56C7002E363A /* swap.h in Headers */, - B665E2141AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */, + 460D4D1021ABD0C60075726E /* DepthStencilStateMTL.h in Headers */, + EDC78C1221CA19FB00E1863C /* CCBoneNode.h in Headers */, 50864CC11C7BC1B000B3BAB1 /* cpPolyline.h in Headers */, 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */, 50ABBED11925AB6F00A911A9 /* TGAlib.h in Headers */, 1A57019F180BCB590088DEC7 /* CCFont.h in Headers */, DA8C62A419E52C6400000516 /* ioapi_mem.h in Headers */, + EDC78BDA21CA19FB00E1863C /* CCProcessBase.h in Headers */, 1A5701A3180BCB590088DEC7 /* CCFontAtlas.h in Headers */, - 15AE18E919AAD35000C27E9E /* CCActionManagerEx.h in Headers */, - 1A01C68618F57BE800EFE3A6 /* CCArray.h in Headers */, + 4631CB3F21AFD9F90000D408 /* UIEditBoxImpl-mac.h in Headers */, 1A5701A7180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, - 50864CEA1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */, - B68779021A8CA82E00643ABF /* CCParticle3DRender.h in Headers */, - 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */, - B665E2681AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */, + EDC78CC421CA19FC00E1863C /* LayoutReader.h in Headers */, + EDC78C0621CA19FB00E1863C /* CCFrame.h in Headers */, 15FB208B1AE7C57D00C31518 /* utils.h in Headers */, + 40FE105B21F070640061C04F /* CCControlSaturationBrightnessPicker.h in Headers */, + EDC78C8E21CA19FC00E1863C /* UserCameraReader.h in Headers */, + EDC78CE621CA19FC00E1863C /* ParticleReader.h in Headers */, 50864C971C7BC1B000B3BAB1 /* chipmunk_unsafe.h in Headers */, B6DD2FB51B04825B00E47F5F /* RecastDump.h in Headers */, 1A40D10F1E8E56C7002E363A /* document.h in Headers */, - 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 1A5701B3180BCB590088DEC7 /* CCFontFNT.h in Headers */, - 38F526421A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */, + EDC78C6A21CA19FC00E1863C /* CSParseBinary_generated.h in Headers */, + 461C204F21A5304A00F3BD47 /* CCPipelineDescriptor.h in Headers */, + 4631CBB121AFD9FA0000D408 /* UIListView.h in Headers */, + 4631CB7121AFD9F90000D408 /* CCUITextFieldFormatter.h in Headers */, 1A40D1451E8E56C7002E363A /* strtod.h in Headers */, - 15AE1BD919AAE01E00C27E9E /* CCControlStepper.h in Headers */, - 291A09241C5F06A60068C1D2 /* CCUIEditBoxMac.h in Headers */, - 15AE192119AAD35000C27E9E /* CocoStudio.h in Headers */, 50864CB21C7BC1B000B3BAB1 /* cpGrooveJoint.h in Headers */, - 15AE18A119AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, + EDC78CBC21CA19FC00E1863C /* NodeReader.h in Headers */, 5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, - 15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */, - 15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, - 5E9F61281A3FFE3D0038DE01 /* CCFrustum.h in Headers */, B6DD2FE31B04825B00E47F5F /* DetourPathCorridor.h in Headers */, - 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, - 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */, - 15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, - 15AE186419AAD31D00C27E9E /* CDConfig.h in Headers */, 15AE1BB819AADFEF00C27E9E /* WebSocket.h in Headers */, - B665E3B81AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */, 1A5701B7180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, - B665E20C1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h in Headers */, - D0FD03551A3B51AA00825BB5 /* CCAllocatorMacros.h in Headers */, - 3823842A1A2590F9002C4610 /* NodeReader.h in Headers */, 1A5701BB180BCB5A0088DEC7 /* CCLabel.h in Headers */, - D0FD035D1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */, - 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */, - 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */, - B665E4201AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */, - 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */, 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, A045F6DE1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */, + 4631CB6D21AFD9F90000D408 /* CCUIEditBoxMac.h in Headers */, + 4631CB6F21AFD9F90000D408 /* CCUISingleLineTextField.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, + 46AF3A1321F1877100D5AFCD /* CCPhysicsContact.h in Headers */, 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */, BA6249A81E77D2850096291C /* tinydir.h in Headers */, - 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, 1A2B22B01E6E54D6001D5EC9 /* Uri.h in Headers */, - B6CAAFFC1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */, 468A14FB1EF223B700ECA675 /* util.h in Headers */, + 4631CB7921AFD9F90000D408 /* UIEditBoxImpl-common.h in Headers */, + EDC78CB821CA19FC00E1863C /* PageViewReader.h in Headers */, 50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */, 50864CAC1C7BC1B000B3BAB1 /* cpDampedSpring.h in Headers */, - 15AE197519AAD35700C27E9E /* CCTimeLine.h in Headers */, 1A5701C9180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, + EDC78BE221CA19FB00E1863C /* CCDataReaderHelper.h in Headers */, 5034CA37191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */, - 15AE1B6419AADA9900C27E9E /* UICheckBox.h in Headers */, - 1A5701CD180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */, + EDC78CD421CA19FC00E1863C /* CheckBoxReader.h in Headers */, + 4631CB2121AFD9F90000D408 /* UITabControl.h in Headers */, 1A5701E0180BCB8C0088DEC7 /* CCLayer.h in Headers */, 1A5701E4180BCB8C0088DEC7 /* CCScene.h in Headers */, - B665E3D81AA80A6600DDB1C5 /* CCPUScriptParser.h in Headers */, - 382384091A25900F002C4610 /* FlatBuffersSerialize.h in Headers */, - 15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */, - 15AE198D19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, - 50F965541CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */, - 1A01C68818F57BE800EFE3A6 /* CCBool.h in Headers */, - B665E2741AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */, - 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */, + EDC78BF821CA19FB00E1863C /* CCDecorativeDisplay.h in Headers */, 50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */, + EDC78CAA21CA19FC00E1863C /* TabControlReader.h in Headers */, + 4631CBF121AFD9FA0000D408 /* UIHBox.h in Headers */, 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */, - 15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */, - 15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, - 15AE1B5E19AADA9900C27E9E /* UITextBMFont.h in Headers */, 50CE4D1F1D243DD8003D2FB9 /* glfw3.h in Headers */, - B665E3601AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */, - 15AE18E719AAD35000C27E9E /* CCActionFrameEasing.h in Headers */, 1A5701E8180BCB8C0088DEC7 /* CCTransition.h in Headers */, 1A5701EC180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, - B665E35C1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */, - 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, 1A5701F0180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, + 4631CBDD21AFD9FA0000D408 /* UILayoutParameter.h in Headers */, 50864CD61C7BC1B100B3BAB1 /* cpSlideJoint.h in Headers */, + EDC78D0E21CA19FC00E1863C /* CCArmature.h in Headers */, 1A5701F9180BCBAD0088DEC7 /* CCMenu.h in Headers */, - 5020A18F1D49912500E80C72 /* BoundingBoxAttachment.h in Headers */, - 5020A1CB1D49912500E80C72 /* PathConstraint.h in Headers */, - C50306791B60B5B2001E6D43 /* SkeletonNodeReader.h in Headers */, - B665E3001AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */, - B665E33C1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */, - 5020A1D71D49912500E80C72 /* RegionAttachment.h in Headers */, 50ABBD401925AB0000A911A9 /* CCMath.h in Headers */, - ED74D7691A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */, - B665E3F01AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */, + EDC78D1821CA19FC00E1863C /* CCComController.h in Headers */, 1A5701FD180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, 1A570204180BCBD40088DEC7 /* CCClippingNode.h in Headers */, - 2962D5EF1C61CF3F004821A3 /* CCUISingleLineTextField.h in Headers */, - 2962D5FF1C61DF1A004821A3 /* CCUIMultilineTextField.h in Headers */, - 182C5CE71A9D725400C30D34 /* UserCameraReader.h in Headers */, - 38B8E2D719E66581002D7CE7 /* CSLoader.h in Headers */, + EDC78C8021CA19FC00E1863C /* GameNode3DReader.h in Headers */, 50643BE419BFCF1800EF68ED /* CCPlatformMacros.h in Headers */, + EDC78CB421CA19FC00E1863C /* WidgetReader.h in Headers */, + EDE6457721F017220063F6E4 /* ShaderCache.h in Headers */, 1A40D12A1E8E56C7002E363A /* diyfp.h in Headers */, - B665E3081AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, - 15AE184219AAD2F700C27E9E /* CCSprite3D.h in Headers */, - B665E3181AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */, B6DD2FC91B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */, - B665E3201AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */, - B665E2A01AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */, - 15AE18A019AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, - B665E3B01AA80A6500DDB1C5 /* CCPURender.h in Headers */, - 1A01C6A618F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, - 5020A15F1D49912500E80C72 /* AnimationStateData.h in Headers */, - B665E3A81AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */, + 46AF3A1921F1877100D5AFCD /* CCPhysicsBody.h in Headers */, 1A57020A180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, + EDC78D1421CA19FC00E1863C /* CCDatas.h in Headers */, 1A570212180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, 1A570216180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, - 1A01C69618F57BE800EFE3A6 /* CCInteger.h in Headers */, - B665E3F41AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */, 1A40D11B1E8E56C7002E363A /* error.h in Headers */, - 15AE1B6919AADA9900C27E9E /* UIDeprecated.h in Headers */, 1A570223180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, - B5A738981BB0051F00BAAEF8 /* UIPageViewIndicator.h in Headers */, - 15AE1BD519AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, - 15AE186919AAD31D00C27E9E /* CocosDenshion.h in Headers */, - B665E3841AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */, - B665E3F81AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */, + 460D4D0821ABD0C60075726E /* Utils.h in Headers */, 50ABBD891925AB4100A911A9 /* CCCustomCommand.h in Headers */, 5034CA43191D591100CE6051 /* ccShader_Label.vert in Headers */, - 15AE189719AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, - B665E2001AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */, - 15AE189319AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, - 15AE18EF19AAD35000C27E9E /* CCArmature.h in Headers */, - B665E3981AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */, - 46BDE4C81FA86C7F00104C05 /* dll.h in Headers */, - 15AE19A719AAD39600C27E9E /* TextReader.h in Headers */, 1A570227180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, + EDC78C9C21CA19FC00E1863C /* Node3DReader.h in Headers */, 1A57022B180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, - 15AE190E19AAD35000C27E9E /* CCDisplayManager.h in Headers */, - 29DA08F51C63351600F4052B /* UIEditBoxImpl-linux.h in Headers */, 1A40D1241E8E56C7002E363A /* fwd.h in Headers */, - B677B0D71B18492D006762CB /* CCNavMeshObstacle.h in Headers */, - 15AE199B19AAD39600C27E9E /* PageViewReader.h in Headers */, - B665E2A41AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */, - B665E43C1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */, - 15AE191C19AAD35000C27E9E /* CCTransformHelp.h in Headers */, 5034CA2F191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */, - 29DA08F71C63351600F4052B /* UIEditBoxImpl-winrt.h in Headers */, - B665E4241AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */, 468A14F81EF223B700ECA675 /* idl.h in Headers */, - 15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */, + 4631CB1B21AFD9F90000D408 /* UILayoutComponent.h in Headers */, + EDC78BDC21CA19FB00E1863C /* TriggerMng.h in Headers */, 1A40D15D1E8E56C7002E363A /* pointer.h in Headers */, - B665E3381AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */, + 460D4D1621ABD0C60075726E /* TextureMTL.h in Headers */, + EDC78C8A21CA19FC00E1863C /* GameMapReader.h in Headers */, 50ABBE951925AB6F00A911A9 /* CCProfiling.h in Headers */, - B665E2301AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h in Headers */, 5034CA4B191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, 50ABBE4F1925AB6F00A911A9 /* CCEventCustom.h in Headers */, + EDC78C2421CA19FB00E1863C /* CCSkinNode.h in Headers */, 50ABBD521925AB0000A911A9 /* Quaternion.h in Headers */, + 4631CB1721AFD9F90000D408 /* UIVideoPlayer.h in Headers */, 50864C9D1C7BC1B000B3BAB1 /* cpArbiter.h in Headers */, - 15AE186219AAD31D00C27E9E /* CDAudioManager.h in Headers */, - 15AE18F119AAD35000C27E9E /* CCArmatureAnimation.h in Headers */, + 4631CBC721AFD9FA0000D408 /* UILayoutManager.h in Headers */, + EDC78CA021CA19FC00E1863C /* WidgetReaderProtocol.h in Headers */, + EDC78D2C21CA19FC00E1863C /* CCSSceneReader.h in Headers */, 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 50864C8B1C7BC1B000B3BAB1 /* chipmunk.h in Headers */, - B665E37C1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */, - 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, 15FB20951AE7C57D00C31518 /* cdt.h in Headers */, - B665E3541AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */, B6DD2FDF1B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */, + ED150A9721E6320100EFE7F7 /* Program.h in Headers */, 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, - 382384031A259005002C4610 /* CSParseBinary_generated.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, - 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, A045F6D81BA81577005076C7 /* CCTextureCube.h in Headers */, B6DD2FC11B04825B00E47F5F /* DetourMath.h in Headers */, 50CB247919D9C5A100687767 /* AudioEngine-inl.h in Headers */, - 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, - B6CAB0001AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */, + EDAF7C6F21F1797000E070B2 /* CCTextureUtils.h in Headers */, 50ABBD561925AB0000A911A9 /* TransformUtils.h in Headers */, 299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */, - 38ACD1FE1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */, 50ABBD991925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, - B665E41C1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */, 5034CA3D191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, 1A40D11E1E8E56C7002E363A /* filereadstream.h in Headers */, + 40FE105121F070640061C04F /* CCControl.h in Headers */, A0534A6A1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */, - 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */, 50864CC71C7BC1B100B3BAB1 /* cpRatchetJoint.h in Headers */, 1A570280180BCC900088DEC7 /* CCSprite.h in Headers */, 1A40D14B1E8E56C7002E363A /* istreamwrapper.h in Headers */, - 5020A2221D49912500E80C72 /* TransformConstraint.h in Headers */, - 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, - B665E3FC1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */, - 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */, - 5020A1F51D49912500E80C72 /* SkeletonData.h in Headers */, 1A570284180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, B6DD2FD71B04825B00E47F5F /* DetourCrowd.h in Headers */, 5034CA2B191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, - B665E2041AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */, - 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, - 382384461A25915C002C4610 /* SpriteReader.h in Headers */, - B665E2481AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */, 1A570288180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, - B665E3AC1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */, 1A40D13F1E8E56C7002E363A /* stack.h in Headers */, - B665E2CC1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */, - 15AE189519AAD33D00C27E9E /* CCLayerLoader.h in Headers */, 1A57028C180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, - B6CAAFEC1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */, - 2962D6031C61F02E004821A3 /* CCUITextFieldFormatter.h in Headers */, - C503066E1B60B583001E6D43 /* CCSkinNode.h in Headers */, 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */, 1A41ABC61DF00D1500B5584C /* AudioDecoder.h in Headers */, - B665E3041AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */, - 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */, - B665E21C1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */, 15AE184A19AAD30500C27E9E /* Export.h in Headers */, - B665E3501AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */, - B68778FA1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */, - 15AE1BA019AADFDF00C27E9E /* UILayout.h in Headers */, - B677B0CF1B18492D006762CB /* CCNavMeshAgent.h in Headers */, + EDC78D3621CA19FC00E1863C /* CCSkin.h in Headers */, + EDC78CE021CA19FC00E1863C /* ComAudioReader.h in Headers */, + 46F9B47621AFE64C009DF858 /* ExtensionMacros.h in Headers */, + EDC78D2621CA19FC00E1863C /* CCActionObject.h in Headers */, + 4631CB8721AFD9F90000D408 /* UIWidget.h in Headers */, 1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */, - B665E4081AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */, 50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */, + 40FE105721F070640061C04F /* CCInvocation.h in Headers */, 1A570298180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, 1A40D1661E8E56C7002E363A /* reader.h in Headers */, - B665E4181AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */, - B665E2C81AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */, - 46BDE4CA1FA86C7F00104C05 /* PointAttachment.h in Headers */, 501216A21AC473AD009A4BEA /* CCMaterial.h in Headers */, 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */, - B240C5EB1B09DFB000137F50 /* CCFrameBuffer.h in Headers */, - 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */, - B665E3481AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */, - 5020A17D1D49912500E80C72 /* AttachmentVertices.h in Headers */, - 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */, - 15AE18AA19AAD33D00C27E9E /* CocosBuilder.h in Headers */, + EDC78CF021CA19FC00E1863C /* SkeletonNodeReader.h in Headers */, 50ABC0071926664800A911A9 /* CCApplicationProtocol.h in Headers */, - B665E2181AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */, - B665E2081AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */, - C5F5161A1C8216C60013B695 /* TabControlReader.h in Headers */, - 15AE199719AAD39600C27E9E /* ListViewReader.h in Headers */, - B665E3441AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */, + EDC78CAC21CA19FC00E1863C /* CSTabControl_generated.h in Headers */, 50ABBD4E1925AB0000A911A9 /* MathUtil.h in Headers */, 1A40D1271E8E56C7002E363A /* biginteger.h in Headers */, - 5020A1531D49912500E80C72 /* Animation.h in Headers */, 50864CD91C7BC1B100B3BAB1 /* cpSpace.h in Headers */, - 15AE1BC219AADFFB00C27E9E /* ExtensionMacros.h in Headers */, - B5668D7F1B3838E4003CBD5E /* UIScrollViewBar.h in Headers */, - B665E4001AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */, - 15AE1BDF19AAE01E00C27E9E /* CCInvocation.h in Headers */, + EDC78C3C21CA19FB00E1863C /* FlatBuffersSerialize.h in Headers */, + ED28C249219E629C0078D854 /* Macros.h in Headers */, 50ABBE431925AB6F00A911A9 /* CCDirector.h in Headers */, - 15AE181819AAD2F700C27E9E /* CCAttachNode.h in Headers */, 1A12775B18DFCC540005F345 /* CCTweenFunction.h in Headers */, - 5020A2191D49912500E80C72 /* spine-cocos2dx.h in Headers */, 1A5702CA180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, + 4631CBA521AFD9FA0000D408 /* UITextBMFont.h in Headers */, 15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */, 1A40D1361E8E56C7002E363A /* meta.h in Headers */, - 5020A1951D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */, 1A5702EC180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, - 15AE18E019AAD35000C27E9E /* TriggerBase.h in Headers */, - 15AE187D19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, - 15AE181219AAD2F700C27E9E /* CCAnimation3D.h in Headers */, - 182C5CD81A98F30500C30D34 /* Sprite3DReader.h in Headers */, + 4631CB9F21AFD9FA0000D408 /* UIRelativeBox.h in Headers */, 1A5702F0180BCE750088DEC7 /* CCTMXLayer.h in Headers */, + EDC78C7821CA19FC00E1863C /* CSArmatureNode_generated.h in Headers */, + ED150A9D21E635AB00EFE7F7 /* ProgramMTL.h in Headers */, 501216961AC47393009A4BEA /* CCPass.h in Headers */, - 5020A1AD1D49912500E80C72 /* IkConstraint.h in Headers */, + 4631CBF321AFD9FA0000D408 /* UIRichText.h in Headers */, 50ABC01B1926664800A911A9 /* CCSAXParser.h in Headers */, + 460D4D1921ABD0C60075726E /* RenderPipelineMTL.h in Headers */, 50ABBED51925AB6F00A911A9 /* utlist.h in Headers */, 1A5702F4180BCE750088DEC7 /* CCTMXObjectGroup.h in Headers */, - 43015DC11B60DF4000E75161 /* CCComExtensionData.h in Headers */, - 50ABBDAF1925AB4100A911A9 /* CCRenderer.h in Headers */, - B665E30C1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */, - 15AE181E19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 1A5702F8180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */, - 503D4F6E1CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */, - B665E2801AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */, 5034CA21191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, - D0FD03491A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */, + 4631CBEF21AFD9FA0000D408 /* UISlider.h in Headers */, + 4631CB8321AFD9F90000D408 /* UIEditBoxImpl.h in Headers */, 1A40D1301E8E56C7002E363A /* ieee754.h in Headers */, - B665E2B01AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */, - 382384381A259126002C4610 /* ProjectNodeReader.h in Headers */, + EDC78C3A21CA19FB00E1863C /* CCActionFrame.h in Headers */, + EDC78C3221CA19FB00E1863C /* CocoStudio.h in Headers */, 15FB20991AE7C57D00C31518 /* sweep.h in Headers */, - A045F6F11BA81821005076C7 /* GameNode3DReader.h in Headers */, - B665E3C41AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */, - 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, - B665E4301AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, + 40FE104721F070640061C04F /* CCControlHuePicker.h in Headers */, 50864CA91C7BC1B000B3BAB1 /* cpDampedRotarySpring.h in Headers */, - 5030C0421CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */, - 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, + ED28C23F219E629C0078D854 /* ShaderModule.h in Headers */, 50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */, 50864C911C7BC1B000B3BAB1 /* chipmunk_private.h in Headers */, - B665E24C1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */, - 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */, - 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */, - B6CAAFE81AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */, - 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */, 1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, - 15AE1B6019AADA9900C27E9E /* UITextField.h in Headers */, - 15AE190619AAD35000C27E9E /* CCDataReaderHelper.h in Headers */, - 15AE1B5619AADA9900C27E9E /* UIScrollView.h in Headers */, 50ABBDBB1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, 15FB20911AE7C57D00C31518 /* advancing_front.h in Headers */, 1A570302180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE4B1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, 1A57030E180BCF190088DEC7 /* CCComponent.h in Headers */, 50FC3FA81D74C2A1001C936A /* CCEventListenerController.h in Headers */, - B665E2AC1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */, - 5020A19B1D49912500E80C72 /* Event.h in Headers */, 1A570312180BCF190088DEC7 /* CCComponentContainer.h in Headers */, - 15AE1B7119AADA9900C27E9E /* CocosGUI.h in Headers */, - B665E2381AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */, - B665E39C1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */, - 50ABBD851925AB4100A911A9 /* CCBatchCommand.h in Headers */, - C5F516131C8216660013B695 /* UITabControl.h in Headers */, - B665E3E81AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */, - 15AE191619AAD35000C27E9E /* CCSkin.h in Headers */, 50ABC0651926664800A911A9 /* CCGL-mac.h in Headers */, + 4631CBC521AFD9FA0000D408 /* UIImageView.h in Headers */, 50643BD419BFAECF00EF68ED /* CCGL.h in Headers */, - 15AE190C19AAD35000C27E9E /* CCDisplayFactory.h in Headers */, + 4631CB1521AFD9F90000D408 /* UITextAtlas.h in Headers */, 50864CA61C7BC1B000B3BAB1 /* cpConstraint.h in Headers */, - 5033419F1D9DC7B400770EC7 /* SkeletonBinary.h in Headers */, - B5CE6DCA1B3C05BA002B0419 /* UIRadioButton.h in Headers */, - 15AE199119AAD37200C27E9E /* ImageViewReader.h in Headers */, - 15AE18FE19AAD35000C27E9E /* CCComAttribute.h in Headers */, - B665E38C1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */, - B665E3801AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */, - 5020A1BF1D49912500E80C72 /* MeshAttachment.h in Headers */, 50ABBD621925AB0000A911A9 /* Vec4.h in Headers */, - B60C5BD619AC68B10056FBDE /* CCBillBoard.h in Headers */, 50864CD01C7BC1B100B3BAB1 /* cpShape.h in Headers */, - 15AE1BA419AADFDF00C27E9E /* UILayoutManager.h in Headers */, - 2962D5E81C61CBF9004821A3 /* CCUITextInput.h in Headers */, - 1A01C69418F57BE800EFE3A6 /* CCFloat.h in Headers */, - 46BDE4D01FA86C7F00104C05 /* Triangulator.h in Headers */, 50864CB81C7BC1B000B3BAB1 /* cpMarch.h in Headers */, + ED28C253219E629C0078D854 /* VertexLayout.h in Headers */, 1A57034D180BD09B0088DEC7 /* tinyxml2.h in Headers */, - 15AE18F519AAD35000C27E9E /* CCArmatureDefine.h in Headers */, - 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */, + EDC78C4E21CA19FB00E1863C /* CCSpriteFrameCacheHelper.h in Headers */, + EDC78BF421CA19FB00E1863C /* CCUtilMath.h in Headers */, 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, - 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, - 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */, 50ABBE331925AB6F00A911A9 /* CCConfiguration.h in Headers */, - 5020A21C1D49912500E80C72 /* spine.h in Headers */, - B665E2101AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */, - 15AE199519AAD39600C27E9E /* LayoutReader.h in Headers */, - 46BDE4CE1FA86C7F00104C05 /* SkeletonTwoColorBatch.h in Headers */, - 15AE183219AAD2F700C27E9E /* CCOBB.h in Headers */, - 15AE1BE319AAE01E00C27E9E /* CCScrollView.h in Headers */, - B665E2941AA80A6500DDB1C5 /* CCPUEmitter.h in Headers */, + EDC78C7621CA19FC00E1863C /* ArmatureNodeReader.h in Headers */, + EDC78D2221CA19FC00E1863C /* CCColliderDetector.h in Headers */, + EDC78C0421CA19FB00E1863C /* CCSkeletonNode.h in Headers */, 8525E3A21B291E42008EE815 /* clipper.hpp in Headers */, + 461FE09221CA129B00E5378F /* CCCallbackCommand.h in Headers */, + ED28C22D219E629B0078D854 /* Types.h in Headers */, 15FB209D1AE7C57D00C31518 /* sweep_context.h in Headers */, 50CB247519D9C5A100687767 /* AudioCache.h in Headers */, - 3823841C1A2590D2002C4610 /* ComAudioReader.h in Headers */, 1A40D1691E8E56C7002E363A /* schema.h in Headers */, - 50ABC01F1926664800A911A9 /* CCThread.h in Headers */, 5053850E1B02819E00793096 /* CCVertexAttribBinding.h in Headers */, - B665E4141AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */, + 460D4D1221ABD0C60075726E /* BufferMTL.h in Headers */, 1A57035A180BD0B00088DEC7 /* unzip.h in Headers */, - 15AE188B19AAD33D00C27E9E /* CCControlLoader.h in Headers */, + EDC78C1021CA19FB00E1863C /* CCActionTimelineNode.h in Headers */, B6DD2FA91B04825B00E47F5F /* DebugDraw.h in Headers */, + EDC78C9621CA19FC00E1863C /* SpriteReader.h in Headers */, 15FB208D1AE7C57D00C31518 /* poly2tri.h in Headers */, - 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */, + 4631CBD521AFD9FA0000D408 /* UIButton.h in Headers */, 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, - 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, 50864CCD1C7BC1B100B3BAB1 /* cpRotaryLimitJoint.h in Headers */, - C503066A1B60B583001E6D43 /* CCBoneNode.h in Headers */, - 382384311A259112002C4610 /* ParticleReader.h in Headers */, B6DD2FBF1B04825B00E47F5F /* DetourCommon.h in Headers */, - B665E3D01AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */, + EDC78C5021CA19FB00E1863C /* CCBone.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */, B6DD2FF31B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */, - 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */, 50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, - 18956BB41A9DFBFD006E9155 /* Particle3DReader.h in Headers */, + EDC78CEE21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */, + 4631CBBB21AFD9FA0000D408 /* UIText.h in Headers */, 50ABBE9D1925AB6F00A911A9 /* CCRefPtr.h in Headers */, - 15AE198319AAD36400C27E9E /* WidgetReader.h in Headers */, - B257B461198A353E00D9A687 /* CCPrimitiveCommand.h in Headers */, 5034CA31191D591100CE6051 /* ccShader_PositionTexture_uColor.vert in Headers */, - 15AE189E19AAD33D00C27E9E /* CCNodeLoader.h in Headers */, - B665E1F81AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */, 50ABBE7B1925AB6F00A911A9 /* CCEventMouse.h in Headers */, 1A40D1511E8E56C7002E363A /* memorystream.h in Headers */, 503DD8F91926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, - 15AE1B6619AADA9900C27E9E /* UIImageView.h in Headers */, + 46F9B72A21AFE64D009DF858 /* CCTableView.h in Headers */, + EDC78BFC21CA19FB00E1863C /* CCActionManagerEx.h in Headers */, + EDC78CA421CA19FC00E1863C /* ButtonReader.h in Headers */, 15AE1BB419AADFEF00C27E9E /* HttpResponse.h in Headers */, - B665E3641AA80A6500DDB1C5 /* CCPUOnTimeObserver.h in Headers */, 50ABBE291925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, 299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */, - 15AE18F319AAD35000C27E9E /* CCArmatureDataManager.h in Headers */, 505385021B01887A00793096 /* CCProperties.h in Headers */, - B665E2C01AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */, 50ABBE471925AB6F00A911A9 /* CCEvent.h in Headers */, 5012169C1AC473A3009A4BEA /* CCTechnique.h in Headers */, - 15AE1B9E19AADFDF00C27E9E /* UIVBox.h in Headers */, - 15AE192319AAD35000C27E9E /* DictionaryHelper.h in Headers */, - B665E3D41AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */, - B257B4501989D5E800D9A687 /* CCPrimitive.h in Headers */, + 4631CB7D21AFD9F90000D408 /* UIEditBoxImpl-ios.h in Headers */, + 46F9B73021AFE7C0009DF858 /* CCScrollView.h in Headers */, + EDC78C2E21CA19FB00E1863C /* CCTransformHelp.h in Headers */, 50864CB51C7BC1B000B3BAB1 /* cpHastySpace.h in Headers */, - 15B3707E19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */, + EDC78C6E21CA19FC00E1863C /* CCComBase.h in Headers */, + 40FE105D21F070640061C04F /* CCControlSwitch.h in Headers */, 50ABBE6B1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, - B6CAAFF41AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */, + 40FE105821F070640061C04F /* CCControlSlider.h in Headers */, + EDC78BF621CA19FB00E1863C /* CCInputDelegate.h in Headers */, 50ABBDA51925AB4100A911A9 /* CCQuadCommand.h in Headers */, - 15AE1BCF19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, 50643BD919BFAF4400EF68ED /* CCApplication.h in Headers */, - 46BDE4CC1FA86C7F00104C05 /* SkeletonClipping.h in Headers */, - B665E3581AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */, - 5020A2071D49912500E80C72 /* Skin.h in Headers */, - B665E3DC1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */, - 15AE183619AAD2F700C27E9E /* CCObjLoader.h in Headers */, - 15AE1BE719AAE01E00C27E9E /* CCTableViewCell.h in Headers */, - B665E2341AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */, - B665E3EC1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */, 50ABBD3A1925AB0000A911A9 /* CCAffineTransform.h in Headers */, - 15AE186C19AAD31D00C27E9E /* SimpleAudioEngine_objc.h in Headers */, + EDC78CB221CA19FC00E1863C /* TextReader.h in Headers */, + 4631CB6721AFD9F90000D408 /* CCUIMultilineTextField.h in Headers */, 15AE1BB319AADFEF00C27E9E /* HttpRequest.h in Headers */, - 3823843F1A259140002C4610 /* SingleNodeReader.h in Headers */, 50ABBE571925AB6F00A911A9 /* CCEventFocus.h in Headers */, - 1A01C69218F57BE800EFE3A6 /* CCDouble.h in Headers */, - 15AE18F919AAD35000C27E9E /* CCBone.h in Headers */, + EDC78BF221CA19FB00E1863C /* CCArmatureDefine.h in Headers */, + EDC78C3421CA19FB00E1863C /* CCBatchNode.h in Headers */, 50ABBE251925AB6F00A911A9 /* base64.h in Headers */, - 15AE1B9C19AADFDF00C27E9E /* UIRelativeBox.h in Headers */, - B665E3341AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */, + 4631CBEB21AFD9FA0000D408 /* CocosGUI.h in Headers */, + EDC78C9821CA19FC00E1863C /* TextAtlasReader.h in Headers */, + 40FE105621F070640061C04F /* CCControlButton.h in Headers */, + 460D4D0C21ABD0C60075726E /* ShaderModuleMTL.h in Headers */, A05DCF9E1B90584E00EE040B /* CCDownloader-curl.h in Headers */, - B665E2881AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, - B665E2441AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */, - B665E2281AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */, - 5020A1B91D49912500E80C72 /* Json.h in Headers */, + EDC78C4A21CA19FB00E1863C /* CCComRender.h in Headers */, B6DD2FD31B04825B00E47F5F /* DetourStatus.h in Headers */, - 15AE18A919AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, 50693C601B6BF2AE005C5820 /* CCDownloader.h in Headers */, - B677B0D31B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */, - 15AE198419AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, + ED28C247219E629C0078D854 /* Buffer.h in Headers */, + ED28C23B219E629B0078D854 /* RenderPassDescriptor.h in Headers */, + EDC78C2A21CA19FB00E1863C /* CocosStudioExtension.h in Headers */, + EDC78C1A21CA19FB00E1863C /* CSLoader.h in Headers */, + EDC78C4C21CA19FB00E1863C /* CSLanguageDataBinary_generated.h in Headers */, 50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */, - 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */, 503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, 3EACC9A619F5014D00EB3C5E /* CCLight.h in Headers */, 50ABBD5A1925AB0000A911A9 /* Vec2.h in Headers */, - B665E2581AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */, 1A40D15A1E8E56C7002E363A /* ostreamwrapper.h in Headers */, - B665E2F81AA80A6500DDB1C5 /* CCPUListener.h in Headers */, 1A40D12D1E8E56C7002E363A /* dtoa.h in Headers */, - 15AE1BDB19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */, - 15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 1A40D16C1E8E56C7002E363A /* stream.h in Headers */, + EDC78C5821CA19FC00E1863C /* CCActionFrameEasing.h in Headers */, + ED75D42021E3030E0052B87E /* ccConstants.h in Headers */, + 4631CBD121AFD9FA0000D408 /* UIScale9Sprite.h in Headers */, 50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */, - C50306761B60B5B2001E6D43 /* BoneNodeReader.h in Headers */, A0534A651B872FFD006B03E5 /* CCDownloader-apple.h in Headers */, - 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */, 1A40D0DF1E8E4C76002E363A /* md5.h in Headers */, - 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */, - 382384231A2590DA002C4610 /* GameMapReader.h in Headers */, - B665E3681AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h in Headers */, - B665E3E41AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */, - 15AE188D19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, - B665E3701AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h in Headers */, 50864CDC1C7BC1B100B3BAB1 /* cpSpatialIndex.h in Headers */, - 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */, - 15B3708219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, - B665E23C1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */, - 5020A1771D49912500E80C72 /* AttachmentLoader.h in Headers */, - B665E36C1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */, - B665E26C1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h in Headers */, - 5E9F612C1A3FFE3D0038DE01 /* CCPlane.h in Headers */, + EDC78BEC21CA19FB00E1863C /* CCComAttribute.h in Headers */, + 4631CBE721AFD9FA0000D408 /* UILayout.h in Headers */, + 46535CDE21ABE8C0005B5370 /* CCGLViewImpl-mac.h in Headers */, + EDC78C5621CA19FB00E1863C /* CCArmatureAnimation.h in Headers */, + EDC78C5421CA19FB00E1863C /* CocosStudioExport.h in Headers */, + EDC78C6621CA19FC00E1863C /* DictionaryHelper.h in Headers */, + 4631CB0F21AFD9F90000D408 /* UIRadioButton.h in Headers */, + 40FE105421F070640061C04F /* CCControlColourPicker.h in Headers */, + 460D4D1321ABD0C60075726E /* CommandBufferMTL.h in Headers */, 5034CA41191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, + EDC78CCA21CA19FC00E1863C /* SingleNodeReader.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, - B665E1F41AA80A6500DDB1C5 /* CCPUAffector.h in Headers */, + 46AF3A1D21F1877100D5AFCD /* CCPhysicsShape.h in Headers */, + EDC78D1221CA19FC00E1863C /* CCArmatureDataManager.h in Headers */, + 4631CBED21AFD9FA0000D408 /* UIPageView.h in Headers */, + 46D3D45D21DE014500EF5E75 /* BufferManager.h in Headers */, 1A40D1391E8E56C7002E363A /* pow10.h in Headers */, - 1A01C69E18F57BE800EFE3A6 /* CCString.h in Headers */, 50ABC00F1926664800A911A9 /* CCFileUtils.h in Headers */, - 503341991D9DC7B400770EC7 /* kvec.h in Headers */, - B665E2981AA80A6500DDB1C5 /* CCPUEmitterManager.h in Headers */, - 182C5CAE1A95961600C30D34 /* CSParse3DBinary_generated.h in Headers */, - B665E2BC1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h in Headers */, - 15AE1B5419AADA9900C27E9E /* UIRichText.h in Headers */, - B665E31C1AA80A6500DDB1C5 /* CCPUOnClearObserver.h in Headers */, 50ABBE3B1925AB6F00A911A9 /* CCData.h in Headers */, 1A40D1721E8E56C7002E363A /* writer.h in Headers */, - B665E3A41AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h in Headers */, - 50ABBE3F1925AB6F00A911A9 /* CCDataVisitor.h in Headers */, - 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */, - B665E2641AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */, + EDC78C0A21CA19FB00E1863C /* CCActionTimeline.h in Headers */, 1A40D1091E8E56C6002E363A /* allocators.h in Headers */, + EDC78D2421CA19FC00E1863C /* LocalizationManager.h in Headers */, 50864CE21C7BC1B100B3BAB1 /* cpVect.h in Headers */, - B665E3241AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */, 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */, - 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, + EDC78C6021CA19FC00E1863C /* CCActionNode.h in Headers */, 50864CCA1C7BC1B100B3BAB1 /* cpRobust.h in Headers */, - B665E2241AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */, 50864C8E1C7BC1B000B3BAB1 /* chipmunk_ffi.h in Headers */, - 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, - B665E3881AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h in Headers */, - B665E2541AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */, 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, - 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, - B665E3CC1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */, + EDC78CFC21CA19FC00E1863C /* TextFieldReader.h in Headers */, 50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */, - 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */, - A0E749F91BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */, - 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, - 1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, + 4631CB2D21AFD9F90000D408 /* UIScrollViewBar.h in Headers */, 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */, + ED28C227219E629B0078D854 /* RenderPipelineDescriptor.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, - 46BDE4C71FA86C7F00104C05 /* Color.h in Headers */, + ED28C225219E629B0078D854 /* DepthStencilState.h in Headers */, + 40FE105C21F070640061C04F /* CCControlPotentiometer.h in Headers */, 50ABBD5E1925AB0000A911A9 /* Vec3.h in Headers */, - 15AE188919AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, - 15AE189119AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, 50ABBE211925AB6F00A911A9 /* atitc.h in Headers */, - 15AE19A519AAD39600C27E9E /* TextFieldReader.h in Headers */, - B665E3401AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */, 291901431B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */, B24AA98B195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, - B665E3A01AA80A6500DDB1C5 /* CCPUPositionEmitter.h in Headers */, B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */, + ED28C23D219E629B0078D854 /* CommandBuffer.h in Headers */, + EDC78D0021CA19FC00E1863C /* NodeReaderProtocol.h in Headers */, 50ABBE371925AB6F00A911A9 /* CCConsole.h in Headers */, 50ABC00B1926664800A911A9 /* CCDevice.h in Headers */, + 46E21B4921B900C900430A43 /* StringUtils.h in Headers */, + 46AF3A1521F1877100D5AFCD /* CCPhysicsWorld.h in Headers */, + EDC78CD621CA19FC00E1863C /* Sprite3DReader.h in Headers */, 50ABC0131926664800A911A9 /* CCGLView.h in Headers */, - 15AE189C19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */, - 15AE190A19AAD35000C27E9E /* CCDecorativeDisplay.h in Headers */, 50ABBDB31925AB4100A911A9 /* ccShaders.h in Headers */, + EDE6457521F017220063F6E4 /* ProgramState.h in Headers */, + EDC78C5C21CA19FC00E1863C /* CCTween.h in Headers */, + EDC78CDC21CA19FC00E1863C /* SliderReader.h in Headers */, 50ABBDAB1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, + 4631CBCB21AFD9FA0000D408 /* UIPageViewIndicator.h in Headers */, 5034CA45191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, - D0FD035F1A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */, 50864CD31C7BC1B100B3BAB1 /* cpSimpleMotor.h in Headers */, - B665E3741AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */, 50ABBEB11925AB6F00A911A9 /* CCUserDefault.h in Headers */, - D0FD034D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */, - 50F965571CD0360000ADE813 /* CCVRProtocol.h in Headers */, 50ABBEC71925AB6F00A911A9 /* etc1.h in Headers */, - B665E2FC1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */, - 15AE1BC619AAE00000C27E9E /* AssetsManager.h in Headers */, + EDC78C8621CA19FC00E1863C /* ListViewReader.h in Headers */, 50ABBEA91925AB6F00A911A9 /* CCTouch.h in Headers */, 50864CC41C7BC1B100B3BAB1 /* cpPolyShape.h in Headers */, + EDC78C7E21CA19FC00E1863C /* ProjectNodeReader.h in Headers */, + 4631CB9521AFD9FA0000D408 /* UITextField.h in Headers */, + 4631CBA921AFD9FA0000D408 /* UIHelper.h in Headers */, 50ABBE971925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABC0691926664800A911A9 /* CCStdC-mac.h in Headers */, - 5020A1A11D49912500E80C72 /* EventData.h in Headers */, - B665E34C1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */, - 5020A2011D49912500E80C72 /* SkeletonRenderer.h in Headers */, + 4631CB3321AFD9F90000D408 /* UIEditBox.h in Headers */, 501216901AC47380009A4BEA /* CCRenderState.h in Headers */, - 46BDE4D21FA86C7F00104C05 /* VertexEffect.h in Headers */, - 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */, - 5020A1831D49912500E80C72 /* Bone.h in Headers */, 1A40D1181E8E56C7002E363A /* en.h in Headers */, - 15AE190219AAD35000C27E9E /* CCComController.h in Headers */, - 15AE18DE19AAD35000C27E9E /* TriggerObj.h in Headers */, - 15AE183E19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, - 507003231B69735300E83DDD /* HttpConnection-winrt.h in Headers */, 3EACC9A219F5014D00EB3C5E /* CCCamera.h in Headers */, + ED150A9421E631DA00EFE7F7 /* ProgramCache.h in Headers */, 50864CAF1C7BC1B000B3BAB1 /* cpGearJoint.h in Headers */, B6DD2FEF1B04825B00E47F5F /* DetourTileCache.h in Headers */, 1A40D13C1E8E56C7002E363A /* regex.h in Headers */, 50ABBECD1925AB6F00A911A9 /* s3tc.h in Headers */, - 15AE1BD119AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, - B5CE6DC01B3BF2B1002B0419 /* UIAbstractCheckButton.h in Headers */, - 5020A1E31D49912500E80C72 /* SkeletonAnimation.h in Headers */, - D0FD03571A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */, 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, - B665E4341AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, B6DD2FEB1B04825B00E47F5F /* DetourProximityGrid.h in Headers */, - 5020A1EF1D49912500E80C72 /* SkeletonBounds.h in Headers */, B6DD2FC51B04825B00E47F5F /* DetourNavMesh.h in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, B6DD2FCD1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */, - 46BDE4C51FA86C7F00104C05 /* ClippingAttachment.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, - 5020A1B31D49912500E80C72 /* IkConstraintData.h in Headers */, 50ABC0091926664800A911A9 /* CCCommon.h in Headers */, 50ABBE531925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, + EDC78CA821CA19FC00E1863C /* Light3DReader.h in Headers */, 50864C941C7BC1B000B3BAB1 /* chipmunk_types.h in Headers */, + ED28C245219E629C0078D854 /* BlendState.h in Headers */, 464AD6E7197EBB1400E502D8 /* pvr.h in Headers */, + 4631CBD921AFD9FA0000D408 /* UIAbstractCheckButton.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9878,810 +6391,334 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C5F516251C822E470013B695 /* TabControlReader.h in Headers */, - C5F516231C822E190013B695 /* UITabControl.h in Headers */, 507B3D121C31BDD30067B53E /* CCStdC-ios.h in Headers */, - 507B3D141C31BDD30067B53E /* CCUITextInput.h in Headers */, - 507B3D161C31BDD30067B53E /* CCPUPathFollower.h in Headers */, - 507B3D171C31BDD30067B53E /* UITextField+CCUITextInput.h in Headers */, - 507B3D181C31BDD30067B53E /* CCPhysicsContact.h in Headers */, 507B3D1C1C31BDD30067B53E /* CCCamera.h in Headers */, - 507B3D1F1C31BDD30067B53E /* CCPULinearForceAffectorTranslator.h in Headers */, 1A40D16B1E8E56C7002E363A /* schema.h in Headers */, 507B3D211C31BDD30067B53E /* CCGroupCommand.h in Headers */, - 507B3D221C31BDD30067B53E /* CCLayerColorLoader.h in Headers */, 507B3D231C31BDD30067B53E /* CCApplication.h in Headers */, - 507B3D251C31BDD30067B53E /* CCAnimationCurve.h in Headers */, - 507B3D271C31BDD30067B53E /* CCPUTextureAnimatorTranslator.h in Headers */, 507B3D281C31BDD30067B53E /* CCPlatformDefine-ios.h in Headers */, - 507B3D291C31BDD30067B53E /* CocoStudio.h in Headers */, - 507B3D2A1C31BDD30067B53E /* CCPhysicsShape.h in Headers */, - 507B3D2B1C31BDD30067B53E /* CCOBB.h in Headers */, - 507B3D2D1C31BDD30067B53E /* CCPUOnEventFlagObserver.h in Headers */, - 507B3D2E1C31BDD30067B53E /* CCBMemberVariableAssigner.h in Headers */, - 507B3D301C31BDD30067B53E /* CCPUParticleFollowerTranslator.h in Headers */, - 507B3D311C31BDD30067B53E /* UIEditBox.h in Headers */, 507B3D321C31BDD30067B53E /* CCAffineTransform.h in Headers */, 507B3D331C31BDD30067B53E /* ccShader_PositionColorLengthTexture.vert in Headers */, - 507B3D341C31BDD30067B53E /* UITextAtlas.h in Headers */, 1A40D10B1E8E56C6002E363A /* allocators.h in Headers */, 507B3D361C31BDD30067B53E /* utils.h in Headers */, - 507B3D371C31BDD30067B53E /* CCPUForceField.h in Headers */, - 507B3D391C31BDD30067B53E /* CCPUJetAffector.h in Headers */, - 507B3D3A1C31BDD30067B53E /* CCEventListenerAssetsManagerEx.h in Headers */, 1A40D1291E8E56C7002E363A /* biginteger.h in Headers */, - 507B3D3C1C31BDD30067B53E /* CCAllocatorGlobal.h in Headers */, - 94A6DF0A1C7304120094AEF7 /* LocalizationManager.h in Headers */, - 507B3D3F1C31BDD30067B53E /* CCPUScriptCompiler.h in Headers */, - 507B3D401C31BDD30067B53E /* CCPURibbonTrail.h in Headers */, 1A40D1231E8E56C7002E363A /* filewritestream.h in Headers */, 507B3D411C31BDD30067B53E /* CCEventMouse.h in Headers */, - 507B3D431C31BDD30067B53E /* CCPhysicsJoint.h in Headers */, - 507B3D441C31BDD30067B53E /* CCPUScriptParser.h in Headers */, 53E23A171E78B082009DD732 /* CCDevice-apple.h in Headers */, - 507B3D451C31BDD30067B53E /* CCPUVortexAffectorTranslator.h in Headers */, 507B3D461C31BDD30067B53E /* poly2tri.h in Headers */, - 507B3D481C31BDD30067B53E /* CCPhysicsBody.h in Headers */, 507B3D491C31BDD30067B53E /* CCRef.h in Headers */, - 507B3D4B1C31BDD30067B53E /* ExtensionDeprecated.h in Headers */, 507B3D4C1C31BDD30067B53E /* CCGLProgramState.h in Headers */, - 507B3D4D1C31BDD30067B53E /* CCPhysicsWorld.h in Headers */, 507B3D4E1C31BDD30067B53E /* ccShaders.h in Headers */, - 507B3D4F1C31BDD30067B53E /* SliderReader.h in Headers */, - 507B3D501C31BDD30067B53E /* UIRichText.h in Headers */, - 507B3D511C31BDD30067B53E /* CCPUScaleAffector.h in Headers */, - 507B3D551C31BDD30067B53E /* UIEditBoxImpl-common.h in Headers */, 507B3D571C31BDD30067B53E /* ccFPSImages.h in Headers */, - 507B3D5A1C31BDD30067B53E /* TriggerObj.h in Headers */, - 507B3D5B1C31BDD30067B53E /* CCPULineAffectorTranslator.h in Headers */, 507B3D5C1C31BDD30067B53E /* ccCArray.h in Headers */, - 507B3D5E1C31BDD30067B53E /* AssetsManagerEx.h in Headers */, - 507B3D5F1C31BDD30067B53E /* CCPUSineForceAffectorTranslator.h in Headers */, - 46BDE4E41FA87D5300104C05 /* Array.h in Headers */, - 507B3D631C31BDD30067B53E /* UIWidget.h in Headers */, - 507B3D651C31BDD30067B53E /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 507B3D661C31BDD30067B53E /* CCLock-apple.h in Headers */, 1A40D10E1E8E56C7002E363A /* document-wrapper.h in Headers */, - 507B3D681C31BDD30067B53E /* SingleNodeReader.h in Headers */, 1A40D15F1E8E56C7002E363A /* pointer.h in Headers */, - 507B3D691C31BDD30067B53E /* CCPUDoPlacementParticleEventHandler.h in Headers */, - 50F965561CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */, - 507B3D6D1C31BDD30067B53E /* CCPUOnVelocityObserver.h in Headers */, - 507B3D6F1C31BDD30067B53E /* CCPhysicsHelper.h in Headers */, 507B3D701C31BDD30067B53E /* ccShader_Position_uColor.vert in Headers */, 507B3D711C31BDD30067B53E /* DetourStatus.h in Headers */, 1A40D13B1E8E56C7002E363A /* pow10.h in Headers */, - 507B3D721C31BDD30067B53E /* UIRadioButton.h in Headers */, - 507B3D731C31BDD30067B53E /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, - 507B3D741C31BDD30067B53E /* CCSprite3DMaterial.h in Headers */, 1A40D16E1E8E56C7002E363A /* stream.h in Headers */, 50864CD21C7BC1B100B3BAB1 /* cpShape.h in Headers */, 507B3D751C31BDD30067B53E /* DetourMath.h in Headers */, - 507B3D771C31BDD30067B53E /* CCControlUtils.h in Headers */, - 507B3D781C31BDD30067B53E /* CCActionObject.h in Headers */, - 5020A1731D49912500E80C72 /* Attachment.h in Headers */, - 507B3D7A1C31BDD30067B53E /* CCPUGravityAffector.h in Headers */, - 507B3D7B1C31BDD30067B53E /* CCActionTimelineCache.h in Headers */, - 507B3D7D1C31BDD30067B53E /* TextFieldReader.h in Headers */, - 507B3D7E1C31BDD30067B53E /* CCAnimation3D.h in Headers */, 507B3D7F1C31BDD30067B53E /* CCValue.h in Headers */, - 507B3D801C31BDD30067B53E /* CCUIMultilineTextField.h in Headers */, 507B3D821C31BDD30067B53E /* firePngData.h in Headers */, - 507B3D831C31BDD30067B53E /* CCPrimitive.h in Headers */, 1A40D1321E8E56C7002E363A /* ieee754.h in Headers */, 507B3D841C31BDD30067B53E /* CCPlatformConfig.h in Headers */, - 507B3D851C31BDD30067B53E /* CCPUDoScaleEventHandler.h in Headers */, 507B3D861C31BDD30067B53E /* DetourPathQueue.h in Headers */, - 507B3D881C31BDD30067B53E /* CCNavMeshObstacle.h in Headers */, - 507B3D891C31BDD30067B53E /* CCBundle3DData.h in Headers */, - 507B3D8A1C31BDD30067B53E /* CCActionManagerEx.h in Headers */, - 507B3D8B1C31BDD30067B53E /* CDOpenALSupport.h in Headers */, - 507B3D8C1C31BDD30067B53E /* CCDataVisitor.h in Headers */, - 507B3D8E1C31BDD30067B53E /* TextBMFontReader.h in Headers */, - 5020A1AF1D49912500E80C72 /* IkConstraint.h in Headers */, 507B3D8F1C31BDD30067B53E /* CCAction.h in Headers */, - 507B3D921C31BDD30067B53E /* UIRelativeBox.h in Headers */, 507B3D931C31BDD30067B53E /* CCGLViewImpl-ios.h in Headers */, - 507B3D941C31BDD30067B53E /* CCScrollViewLoader.h in Headers */, - 507B3D961C31BDD30067B53E /* CocosBuilder.h in Headers */, - 507B3D971C31BDD30067B53E /* GameNode3DReader.h in Headers */, - 507B3D991C31BDD30067B53E /* CCPUAffector.h in Headers */, 507B3D9C1C31BDD30067B53E /* ccUTF8.h in Headers */, 507B3DA01C31BDD30067B53E /* CCPlatformDefine.h in Headers */, 507B3DA11C31BDD30067B53E /* DetourNavMeshQuery.h in Headers */, 507B3DA21C31BDD30067B53E /* CCActionCamera.h in Headers */, - 507B3DA51C31BDD30067B53E /* CCControlLoader.h in Headers */, - 507B3DA61C31BDD30067B53E /* CCLabelTTFLoader.h in Headers */, 1A40D14D1E8E56C7002E363A /* istreamwrapper.h in Headers */, 507B3DA71C31BDD30067B53E /* CCActionCatmullRom.h in Headers */, - 507B3DA81C31BDD30067B53E /* CCSGUIReader.h in Headers */, 507B3DA91C31BDD30067B53E /* ccShader_PositionColorLengthTexture.frag in Headers */, 1A40D1171E8E56C7002E363A /* encodings.h in Headers */, - 507B3DAA1C31BDD30067B53E /* CCAllocatorDiagnostics.h in Headers */, - 507B3DAB1C31BDD30067B53E /* CCPUEventHandlerManager.h in Headers */, 50864CC01C7BC1B000B3BAB1 /* cpPivotJoint.h in Headers */, 50864CE41C7BC1B100B3BAB1 /* cpVect.h in Headers */, 507B3DAD1C31BDD30067B53E /* CCClippingRectangleNode.h in Headers */, - 507B3DAE1C31BDD30067B53E /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, - 507B3DB01C31BDD30067B53E /* CCPUScaleAffectorTranslator.h in Headers */, 507B3DB11C31BDD30067B53E /* fastlz.h in Headers */, - 507B3DB21C31BDD30067B53E /* CCPUVertexEmitter.h in Headers */, - 507B3DB31C31BDD30067B53E /* CCPUCollisionAvoidanceAffector.h in Headers */, 1A5FB7C61DF012D900C918C1 /* AudioMacros.h in Headers */, - 5020A1C71D49912500E80C72 /* PathAttachment.h in Headers */, 507B3DB51C31BDD30067B53E /* CCVector.h in Headers */, 507B3DB61C31BDD30067B53E /* CCEventCustom.h in Headers */, - 507B3DB81C31BDD30067B53E /* CCPUOnCountObserverTranslator.h in Headers */, 507B3DB91C31BDD30067B53E /* CCDownloader-apple.h in Headers */, - 507B3DBA1C31BDD30067B53E /* CCFrameBuffer.h in Headers */, - 507B3DBC1C31BDD30067B53E /* CCPUAlignAffectorTranslator.h in Headers */, 507B3DBD1C31BDD30067B53E /* CCActionEase.h in Headers */, 507B3DBE1C31BDD30067B53E /* CCActionGrid.h in Headers */, - 507B3DBF1C31BDD30067B53E /* CCComController.h in Headers */, 1A40D1531E8E56C7002E363A /* memorystream.h in Headers */, - 507B3DC01C31BDD30067B53E /* NodeReaderProtocol.h in Headers */, 507B3DC11C31BDD30067B53E /* ccShader_Label_outline.frag in Headers */, - 5020A1FD1D49912500E80C72 /* SkeletonJson.h in Headers */, 507B3DC21C31BDD30067B53E /* CCActionGrid3D.h in Headers */, 507B3DC31C31BDD30067B53E /* Vec4.h in Headers */, - 507B3DC41C31BDD30067B53E /* CCPURandomiser.h in Headers */, - 507B3DC51C31BDD30067B53E /* PageViewReader.h in Headers */, - 507B3DC71C31BDD30067B53E /* CCMotionStreak3D.h in Headers */, - 507B3DCC1C31BDD30067B53E /* CCBool.h in Headers */, - 507B3DCD1C31BDD30067B53E /* CCPUDoStopSystemEventHandler.h in Headers */, 1A40D12F1E8E56C7002E363A /* dtoa.h in Headers */, - 507B3DCE1C31BDD30067B53E /* CSParse3DBinary_generated.h in Headers */, - 507B3DCF1C31BDD30067B53E /* CCSprite3D.h in Headers */, 507B3DD01C31BDD30067B53E /* AudioPlayer.h in Headers */, 507B3DD11C31BDD30067B53E /* CCActionInstant.h in Headers */, 507B3DD21C31BDD30067B53E /* CCEventController.h in Headers */, - 507B3DD31C31BDD30067B53E /* CCNode+CCBRelativePositioning.h in Headers */, - 507B3DD41C31BDD30067B53E /* NodeReaderDefine.h in Headers */, 507B3DD51C31BDD30067B53E /* CCEventListenerTouch.h in Headers */, 507B3DD61C31BDD30067B53E /* WebSocket.h in Headers */, - 507B3DD81C31BDD30067B53E /* CCPUMaterialManager.h in Headers */, - 507B3DD91C31BDD30067B53E /* FlatBuffersSerialize.h in Headers */, 50864CAB1C7BC1B000B3BAB1 /* cpDampedRotarySpring.h in Headers */, 507B3DDB1C31BDD30067B53E /* CCActionInterval.h in Headers */, - 507B3DDC1C31BDD30067B53E /* CCPUEventHandler.h in Headers */, 1A40D1261E8E56C7002E363A /* fwd.h in Headers */, - 507B3DDD1C31BDD30067B53E /* CCActionFrame.h in Headers */, - 507B3DDE1C31BDD30067B53E /* CCActionFrameEasing.h in Headers */, 507B3DDF1C31BDD30067B53E /* CCActionManager.h in Headers */, 50864C931C7BC1B000B3BAB1 /* chipmunk_private.h in Headers */, - 507B3DE01C31BDD30067B53E /* CCPUObserverManager.h in Headers */, - 507B3DE11C31BDD30067B53E /* CCLayerLoader.h in Headers */, - 507B3DE41C31BDD30067B53E /* CCPUGeometryRotatorTranslator.h in Headers */, 507B3DE91C31BDD30067B53E /* CCGLView.h in Headers */, 507B3DEB1C31BDD30067B53E /* CCActionPageTurn3D.h in Headers */, - 5020A1671D49912500E80C72 /* Atlas.h in Headers */, - 5020A1D91D49912500E80C72 /* RegionAttachment.h in Headers */, - 507B3DEC1C31BDD30067B53E /* UIHelper.h in Headers */, - 507B3DED1C31BDD30067B53E /* CCNavMeshUtils.h in Headers */, - 507B3DEF1C31BDD30067B53E /* CCPUBaseForceAffector.h in Headers */, - 507B3DF01C31BDD30067B53E /* CCPUNoise.h in Headers */, - 507B3DF11C31BDD30067B53E /* CocosGUI.h in Headers */, 507B3DF21C31BDD30067B53E /* CCActionProgressTimer.h in Headers */, - 507B3DF41C31BDD30067B53E /* CCPUBehaviour.h in Headers */, 507B3DF51C31BDD30067B53E /* CCActionTiledGrid.h in Headers */, - 507B3DF61C31BDD30067B53E /* CCPUEventHandlerTranslator.h in Headers */, 507B3DF81C31BDD30067B53E /* ioapi_mem.h in Headers */, 507B3DFA1C31BDD30067B53E /* CCActionTween.h in Headers */, 507B3DFB1C31BDD30067B53E /* CCAtlasNode.h in Headers */, - 5020A18B1D49912500E80C72 /* BoneData.h in Headers */, - 507B3DFC1C31BDD30067B53E /* cocos3d.h in Headers */, 507B3DFD1C31BDD30067B53E /* CCNode.h in Headers */, - 507B3DFE1C31BDD30067B53E /* CCAttachNode.h in Headers */, - 507B3E001C31BDD30067B53E /* UIEditBoxImpl-mac.h in Headers */, - 507B3E011C31BDD30067B53E /* CCControlHuePicker.h in Headers */, - 507B3E021C31BDD30067B53E /* CCPUOnRandomObserverTranslator.h in Headers */, - 507B3E031C31BDD30067B53E /* CCPUObserver.h in Headers */, - 5020A21B1D49912500E80C72 /* spine-cocos2dx.h in Headers */, - 507B3E041C31BDD30067B53E /* CCBSequenceProperty.h in Headers */, - 507B3E051C31BDD30067B53E /* CCPUBoxColliderTranslator.h in Headers */, - 507B3E061C31BDD30067B53E /* BoneNodeReader.h in Headers */, - 5020A1F11D49912500E80C72 /* SkeletonBounds.h in Headers */, 1A40D1471E8E56C7002E363A /* strtod.h in Headers */, 507B3E081C31BDD30067B53E /* CCDirectorCaller-ios.h in Headers */, 50864CDE1C7BC1B100B3BAB1 /* cpSpatialIndex.h in Headers */, - 507B3E091C31BDD30067B53E /* CCTimelineMacro.h in Headers */, - 507B3E0C1C31BDD30067B53E /* CCPUColorAffector.h in Headers */, 50864CC61C7BC1B100B3BAB1 /* cpPolyShape.h in Headers */, - 507B3E0E1C31BDD30067B53E /* UIPageView.h in Headers */, 507B3E0F1C31BDD30067B53E /* CCCustomCommand.h in Headers */, - 507B3E101C31BDD30067B53E /* CSBoneBinary_generated.h in Headers */, 507B3E111C31BDD30067B53E /* ObjectFactory.h in Headers */, 507B3E121C31BDD30067B53E /* advancing_front.h in Headers */, 507B3E131C31BDD30067B53E /* ccMacros.h in Headers */, - 507B3E141C31BDD30067B53E /* CCPUPointEmitter.h in Headers */, 507B3E161C31BDD30067B53E /* CCFileUtils.h in Headers */, - 507B3E181C31BDD30067B53E /* LayoutReader.h in Headers */, - 5020A15B1D49912500E80C72 /* AnimationState.h in Headers */, - 507B3E191C31BDD30067B53E /* CCPUEmitterTranslator.h in Headers */, - 507B3E1A1C31BDD30067B53E /* UIScrollView.h in Headers */, 507B3E1B1C31BDD30067B53E /* ccShader_PositionTexture.vert in Headers */, - 507B3E1C1C31BDD30067B53E /* ProjectNodeReader.h in Headers */, 50864CB71C7BC1B000B3BAB1 /* cpHastySpace.h in Headers */, 468A14E21EF223B700ECA675 /* flatbuffers.h in Headers */, - 5020A1C11D49912500E80C72 /* MeshAttachment.h in Headers */, - 5020A2151D49912500E80C72 /* SlotData.h in Headers */, - 507B3E1D1C31BDD30067B53E /* CCDrawingPrimitives.h in Headers */, 507B3E1F1C31BDD30067B53E /* CCConsole.h in Headers */, 507B3E211C31BDD30067B53E /* CCMap.h in Headers */, - 507B3E221C31BDD30067B53E /* CCPUOnCountObserver.h in Headers */, 507B3E231C31BDD30067B53E /* CCEAGLView-ios.h in Headers */, 507B3E241C31BDD30067B53E /* CCEventAcceleration.h in Headers */, - 507B3E251C31BDD30067B53E /* CCPUListener.h in Headers */, 507B3E271C31BDD30067B53E /* TransformUtils.h in Headers */, - 507B3E281C31BDD30067B53E /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, 507B3E291C31BDD30067B53E /* CCDrawNode.h in Headers */, - 507B3E2A1C31BDD30067B53E /* CCNavMeshDebugDraw.h in Headers */, - 507B3E2C1C31BDD30067B53E /* CCGrabber.h in Headers */, 507B3E2F1C31BDD30067B53E /* CCGrid.h in Headers */, 507B3E321C31BDD30067B53E /* ccShader_PositionTextureA8Color.frag in Headers */, - 5020A22A1D49912500E80C72 /* TransformConstraintData.h in Headers */, - 507B3E351C31BDD30067B53E /* UIWebViewImpl-ios.h in Headers */, 507B3E361C31BDD30067B53E /* Vec2.h in Headers */, - 507B3E371C31BDD30067B53E /* CCComExtensionData.h in Headers */, - 507B3E381C31BDD30067B53E /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */, 507B3E391C31BDD30067B53E /* CCMath.h in Headers */, 507B3E3A1C31BDD30067B53E /* CCFont.h in Headers */, 50864CCF1C7BC1B100B3BAB1 /* cpRotaryLimitJoint.h in Headers */, - 507B3E3D1C31BDD30067B53E /* UIEditBoxImpl-ios.h in Headers */, 507B3E401C31BDD30067B53E /* AudioEngine.h in Headers */, - 507B3E411C31BDD30067B53E /* CCPUMaterialTranslator.h in Headers */, 507B3E421C31BDD30067B53E /* CCGLProgramStateCache.h in Headers */, - 507B3E431C31BDD30067B53E /* CCBundle3D.h in Headers */, - 507B3E441C31BDD30067B53E /* CocoLoader.h in Headers */, 507B3E451C31BDD30067B53E /* HttpRequest.h in Headers */, - 507B3E471C31BDD30067B53E /* CCPUForceFieldAffectorTranslator.h in Headers */, - 507B3E481C31BDD30067B53E /* CCBillBoard.h in Headers */, - 5030C0441CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */, 507B3E491C31BDD30067B53E /* CCTrianglesCommand.h in Headers */, - 507B3E4A1C31BDD30067B53E /* CCPUDynamicAttributeTranslator.h in Headers */, - 507B3E4C1C31BDD30067B53E /* UIEditBoxImpl-win32.h in Headers */, - 507B3E4E1C31BDD30067B53E /* CCPUOnExpireObserverTranslator.h in Headers */, 507B3E4F1C31BDD30067B53E /* CCGeometry.h in Headers */, 1A40D1741E8E56C7002E363A /* writer.h in Headers */, - 507B3E511C31BDD30067B53E /* CCPUOnCollisionObserverTranslator.h in Headers */, - 507B3E531C31BDD30067B53E /* CCAllocatorBase.h in Headers */, 507B3E571C31BDD30067B53E /* CCFileUtils-apple.h in Headers */, 507B3E591C31BDD30067B53E /* CCFontAtlas.h in Headers */, - 507B3E5B1C31BDD30067B53E /* CCScrollView.h in Headers */, 50864CBA1C7BC1B000B3BAB1 /* cpMarch.h in Headers */, 507B3E5C1C31BDD30067B53E /* CCFontAtlasCache.h in Headers */, - 507B3E5D1C31BDD30067B53E /* CCPUSineForceAffector.h in Headers */, - 5020A21E1D49912500E80C72 /* spine.h in Headers */, - 507B3E5E1C31BDD30067B53E /* UserCameraReader.h in Headers */, - 5020A1E51D49912500E80C72 /* SkeletonAnimation.h in Headers */, - 5020A1BB1D49912500E80C72 /* Json.h in Headers */, 507B3E601C31BDD30067B53E /* RecastDebugDraw.h in Headers */, 507B3E631C31BDD30067B53E /* CCFontFNT.h in Headers */, 507B3E641C31BDD30067B53E /* DetourAssert.h in Headers */, - 507B3E651C31BDD30067B53E /* CCParticleSystemQuadLoader.h in Headers */, - 507B3E661C31BDD30067B53E /* CCPUOnEventFlagObserverTranslator.h in Headers */, 468A14FD1EF223B700ECA675 /* util.h in Headers */, BA6249AA1E77D2850096291C /* tinydir.h in Headers */, 50864CAE1C7BC1B000B3BAB1 /* cpDampedSpring.h in Headers */, 507B3E691C31BDD30067B53E /* DetourTileCacheBuilder.h in Headers */, - 507B3E6B1C31BDD30067B53E /* NodeReader.h in Headers */, 507B3E6D1C31BDD30067B53E /* CCFontFreeType.h in Headers */, - 507B3E6E1C31BDD30067B53E /* CCMesh.h in Headers */, - 507B3E701C31BDD30067B53E /* ImageViewReader.h in Headers */, 1A40D1411E8E56C7002E363A /* stack.h in Headers */, - 507B3E711C31BDD30067B53E /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */, - 507B3E731C31BDD30067B53E /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, - 507B3E741C31BDD30067B53E /* CCMenuLoader.h in Headers */, - 507B3E751C31BDD30067B53E /* CCPUSphereCollider.h in Headers */, 507B3E771C31BDD30067B53E /* DetourNavMesh.h in Headers */, 507B3E781C31BDD30067B53E /* CCLabel.h in Headers */, - 507B3E791C31BDD30067B53E /* CCPUInterParticleColliderTranslator.h in Headers */, 507B3E7A1C31BDD30067B53E /* CCLabelAtlas.h in Headers */, 507B3E7C1C31BDD30067B53E /* CCEventListenerCustom.h in Headers */, - 507B3E7D1C31BDD30067B53E /* CCPUFlockCenteringAffector.h in Headers */, - 507B3E7E1C31BDD30067B53E /* DictionaryHelper.h in Headers */, 50864CC91C7BC1B100B3BAB1 /* cpRatchetJoint.h in Headers */, 50864C9F1C7BC1B000B3BAB1 /* cpArbiter.h in Headers */, 507B3E801C31BDD30067B53E /* clipper.hpp in Headers */, - 507B3E821C31BDD30067B53E /* CCPUCircleEmitterTranslator.h in Headers */, 50864C901C7BC1B000B3BAB1 /* chipmunk_ffi.h in Headers */, 507B3E881C31BDD30067B53E /* HttpClient.h in Headers */, 507B3E8A1C31BDD30067B53E /* DetourNavMeshBuilder.h in Headers */, - 507B3E8B1C31BDD30067B53E /* UIEditBoxImpl-android.h in Headers */, - 507B3E8D1C31BDD30067B53E /* CCPUJetAffectorTranslator.h in Headers */, - 507B3E8E1C31BDD30067B53E /* GUIDefine.h in Headers */, 507B3E8F1C31BDD30067B53E /* CCDownloader.h in Headers */, - 5020A1CD1D49912500E80C72 /* PathConstraint.h in Headers */, - 507B3E911C31BDD30067B53E /* CCRay.h in Headers */, 507B3E921C31BDD30067B53E /* ccShader_Position_uColor.frag in Headers */, - 507B3E931C31BDD30067B53E /* CCLabelBMFont.h in Headers */, - 507B3E951C31BDD30067B53E /* CCBatchNode.h in Headers */, - 507B3E961C31BDD30067B53E /* CCPUParticleSystem3D.h in Headers */, - 507B3E971C31BDD30067B53E /* CCPUDoEnableComponentEventHandler.h in Headers */, - 507B3E991C31BDD30067B53E /* CCPUPointEmitterTranslator.h in Headers */, - 507B3E9B1C31BDD30067B53E /* CCPhysicsSprite.h in Headers */, - 507B3E9C1C31BDD30067B53E /* AssetsManager.h in Headers */, - 507B3E9D1C31BDD30067B53E /* CCPULineAffector.h in Headers */, 507B3EA01C31BDD30067B53E /* HttpAsynConnection-apple.h in Headers */, 507B3EA21C31BDD30067B53E /* HttpResponse.h in Headers */, - 507B3EA31C31BDD30067B53E /* SimpleAudioEngine_objc.h in Headers */, 507B3EA41C31BDD30067B53E /* CCQuadCommand.h in Headers */, - 507B3EA51C31BDD30067B53E /* UILayoutManager.h in Headers */, 507B3EA71C31BDD30067B53E /* CCRefPtr.h in Headers */, - 507B3EA81C31BDD30067B53E /* CCSpriteLoader.h in Headers */, - 507B3EAA1C31BDD30067B53E /* CCSSceneReader.h in Headers */, - 507B3EAB1C31BDD30067B53E /* CCFloat.h in Headers */, - 507B3EAC1C31BDD30067B53E /* CCPUAlignAffector.h in Headers */, 507B3EAD1C31BDD30067B53E /* DetourProximityGrid.h in Headers */, 507B3EAF1C31BDD30067B53E /* CCLabelTextFormatter.h in Headers */, 507B3EB41C31BDD30067B53E /* CCStdC.h in Headers */, 507B3EB51C31BDD30067B53E /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 50864CE11C7BC1B100B3BAB1 /* cpTransform.h in Headers */, - 507B3EB61C31BDD30067B53E /* UIDeprecated.h in Headers */, 507B3EB81C31BDD30067B53E /* s3tc.h in Headers */, 507B3EB91C31BDD30067B53E /* CCPlatformMacros.h in Headers */, - 507B3EBA1C31BDD30067B53E /* CCControlSwitch.h in Headers */, - 507B3EBB1C31BDD30067B53E /* CCMeshVertexIndexData.h in Headers */, - 507B3EBC1C31BDD30067B53E /* UIVBox.h in Headers */, 507B3EBD1C31BDD30067B53E /* CCLight.h in Headers */, - 507B3EBE1C31BDD30067B53E /* CCFrustum.h in Headers */, - 507B3EBF1C31BDD30067B53E /* CCPUPositionEmitter.h in Headers */, - 507B3EC01C31BDD30067B53E /* CCDataReaderHelper.h in Headers */, - 507B3EC11C31BDD30067B53E /* CCPUDoExpireEventHandlerTranslator.h in Headers */, - 507B3EC21C31BDD30067B53E /* CCSkinNode.h in Headers */, - 5020A1A91D49912500E80C72 /* extension.h in Headers */, - 507B3EC41C31BDD30067B53E /* CCAllocatorMacros.h in Headers */, - 507B3EC51C31BDD30067B53E /* CCPUVelocityMatchingAffector.h in Headers */, - 507B3EC61C31BDD30067B53E /* CCLabelTTF.h in Headers */, - 507B3EC81C31BDD30067B53E /* CCPUTextureRotatorTranslator.h in Headers */, 507B3EC91C31BDD30067B53E /* CCRenderState.h in Headers */, 507B3ECB1C31BDD30067B53E /* CCLayer.h in Headers */, 1A40D11A1E8E56C7002E363A /* en.h in Headers */, - 507B3ECF1C31BDD30067B53E /* CCPUOnTimeObserverTranslator.h in Headers */, - 507B3ED01C31BDD30067B53E /* CCControlExtensions.h in Headers */, 507B3ED11C31BDD30067B53E /* CCScene.h in Headers */, - 46BDE4EA1FA87D5D00104C05 /* dll.h in Headers */, 507B3ED31C31BDD30067B53E /* CCTransition.h in Headers */, - 507B3ED41C31BDD30067B53E /* CheckBoxReader.h in Headers */, - 507B3ED51C31BDD30067B53E /* UIAbstractCheckButton.h in Headers */, - 507B3ED61C31BDD30067B53E /* CCPUPlaneCollider.h in Headers */, 507B3ED71C31BDD30067B53E /* DetourDebugDraw.h in Headers */, - 507B3ED91C31BDD30067B53E /* Particle3DReader.h in Headers */, 507B3EDA1C31BDD30067B53E /* DetourCrowd.h in Headers */, - 507B3EDC1C31BDD30067B53E /* CCPUSlaveEmitterTranslator.h in Headers */, - 507B3EDD1C31BDD30067B53E /* CCPUDoAffectorEventHandler.h in Headers */, 507B3EDF1C31BDD30067B53E /* uthash.h in Headers */, - 507B3EE01C31BDD30067B53E /* CCPURandomiserTranslator.h in Headers */, 507B3EE21C31BDD30067B53E /* CCTransitionPageTurn.h in Headers */, 507B3EE31C31BDD30067B53E /* CCTransitionProgress.h in Headers */, 507B3EE61C31BDD30067B53E /* CCMenu.h in Headers */, 468A14FA1EF223B700ECA675 /* idl.h in Headers */, 1A40D15C1E8E56C7002E363A /* ostreamwrapper.h in Headers */, - 507B3EE71C31BDD30067B53E /* CCControlButtonLoader.h in Headers */, 507B3EE81C31BDD30067B53E /* CCMenuItem.h in Headers */, 507B3EE91C31BDD30067B53E /* CCDevice.h in Headers */, 50864C9C1C7BC1B000B3BAB1 /* cpCompat62.h in Headers */, 507B3EEA1C31BDD30067B53E /* CCClippingNode.h in Headers */, - 507B3EEC1C31BDD30067B53E /* UICheckBox.h in Headers */, 507B3EEE1C31BDD30067B53E /* ccShader_PositionTexture_uColor.frag in Headers */, 1A40D1141E8E56C7002E363A /* encodedstream.h in Headers */, - 5020A1D31D49912500E80C72 /* PathConstraintData.h in Headers */, - 507B3EEF1C31BDD30067B53E /* CCPUSphereSurfaceEmitterTranslator.h in Headers */, - 507B3EF21C31BDD30067B53E /* CCFrame.h in Headers */, - 507B3EF31C31BDD30067B53E /* CCPUOnClearObserver.h in Headers */, - 5020A1911D49912500E80C72 /* BoundingBoxAttachment.h in Headers */, - 507B3EF51C31BDD30067B53E /* CCTableView.h in Headers */, - 507B3EF61C31BDD30067B53E /* CCPUPositionEmitterTranslator.h in Headers */, - 507B3EF71C31BDD30067B53E /* CCParticleSystem3D.h in Headers */, - 507B3EF81C31BDD30067B53E /* CCPUDoExpireEventHandler.h in Headers */, 507B3EF91C31BDD30067B53E /* shapes.h in Headers */, 507B3EFA1C31BDD30067B53E /* CCScheduler.h in Headers */, 507B3EFC1C31BDD30067B53E /* CCMotionStreak.h in Headers */, - 507B3EFD1C31BDD30067B53E /* CCPUBehaviourManager.h in Headers */, - 507B3EFE1C31BDD30067B53E /* CCDecorativeDisplay.h in Headers */, 507B3EFF1C31BDD30067B53E /* DebugDraw.h in Headers */, - 507B3F001C31BDD30067B53E /* CCTween.h in Headers */, - 507B3F011C31BDD30067B53E /* CCComAttribute.h in Headers */, - 507B3F031C31BDD30067B53E /* CCPhysics3D.h in Headers */, 50864C8D1C7BC1B000B3BAB1 /* chipmunk.h in Headers */, - 5020A1EB1D49912500E80C72 /* SkeletonBatch.h in Headers */, - 507B3F051C31BDD30067B53E /* GameMapReader.h in Headers */, 507B3F061C31BDD30067B53E /* DetourLocalBoundary.h in Headers */, - 507B3F091C31BDD30067B53E /* CCPUBoxEmitterTranslator.h in Headers */, - 507B3F0A1C31BDD30067B53E /* Manifest.h in Headers */, 507B3F0B1C31BDD30067B53E /* sweep.h in Headers */, 507B3F0C1C31BDD30067B53E /* CCProgressTimer.h in Headers */, - 507B3F0D1C31BDD30067B53E /* CSArmatureNode_generated.h in Headers */, 507B3F0E1C31BDD30067B53E /* CCRenderTexture.h in Headers */, - 507B3F0F1C31BDD30067B53E /* CCTerrain.h in Headers */, - 507B3F121C31BDD30067B53E /* WidgetReaderProtocol.h in Headers */, 1A40D1651E8E56C7002E363A /* rapidjson.h in Headers */, - 507B3F131C31BDD30067B53E /* CCPUSlaveBehaviour.h in Headers */, - 507B3F151C31BDD30067B53E /* WidgetReader.h in Headers */, 507B3F161C31BDD30067B53E /* CCParticleBatchNode.h in Headers */, 507B3F181C31BDD30067B53E /* cdt.h in Headers */, - 507B3F1B1C31BDD30067B53E /* CCNavMesh.h in Headers */, - 507B3F1C1C31BDD30067B53E /* CCPUDoScaleEventHandlerTranslator.h in Headers */, - 507B3F1D1C31BDD30067B53E /* CCUtilMath.h in Headers */, 507B3F1F1C31BDD30067B53E /* CCIMEDelegate.h in Headers */, - 507B3F201C31BDD30067B53E /* CCPhysics3DConstraint.h in Headers */, 507B3F211C31BDD30067B53E /* CCParticleExamples.h in Headers */, 50864CA51C7BC1B000B3BAB1 /* cpBody.h in Headers */, - 507B3F221C31BDD30067B53E /* CCPUVortexAffector.h in Headers */, 507B3F231C31BDD30067B53E /* CCParticleSystem.h in Headers */, 1A40D14A1E8E56C7002E363A /* swap.h in Headers */, - 507B3F251C31BDD30067B53E /* CCPUUtil.h in Headers */, - 507B3F261C31BDD30067B53E /* UILayout.h in Headers */, 507B3F271C31BDD30067B53E /* CCParticleSystemQuad.h in Headers */, - 507B3F291C31BDD30067B53E /* UIWebView.h in Headers */, - 507B3F2A1C31BDD30067B53E /* CCUISingleLineTextField.h in Headers */, 1A40D11D1E8E56C7002E363A /* error.h in Headers */, - 507B3F2C1C31BDD30067B53E /* CCBSelectorResolver.h in Headers */, 507B3F2D1C31BDD30067B53E /* CCFastTMXLayer.h in Headers */, - 507B3F2F1C31BDD30067B53E /* UIListView.h in Headers */, 50864CA21C7BC1B000B3BAB1 /* cpBB.h in Headers */, 1A41ABC81DF00D1500B5584C /* AudioDecoder.h in Headers */, - 507B3F301C31BDD30067B53E /* TriggerMng.h in Headers */, 507B3F311C31BDD30067B53E /* ccShader_PositionTextureA8Color.vert in Headers */, 507B3F331C31BDD30067B53E /* CCProtocols.h in Headers */, 507B3F351C31BDD30067B53E /* AudioEngine-inl.h in Headers */, 507B3F361C31BDD30067B53E /* HttpCookie.h in Headers */, 507B3F371C31BDD30067B53E /* CCMathBase.h in Headers */, 507B3F381C31BDD30067B53E /* CCProtectedNode.h in Headers */, - 507B3F3A1C31BDD30067B53E /* CCComBase.h in Headers */, - 507B3F3C1C31BDD30067B53E /* CCDisplayManager.h in Headers */, - 507B3F3D1C31BDD30067B53E /* UIButton.h in Headers */, - 507B3F3E1C31BDD30067B53E /* ArmatureNodeReader.h in Headers */, 507B3F401C31BDD30067B53E /* CCDirector.h in Headers */, - 46BDE4EC1FA87D6200104C05 /* PointAttachment.h in Headers */, 507B3F421C31BDD30067B53E /* ccShader_Label_df.frag in Headers */, - 507B3F471C31BDD30067B53E /* CCPUDoAffectorEventHandlerTranslator.h in Headers */, - 507B3F481C31BDD30067B53E /* CCPUAffectorManager.h in Headers */, 50864CA81C7BC1B000B3BAB1 /* cpConstraint.h in Headers */, - 507B3F491C31BDD30067B53E /* CCUIEditBoxIOS.h in Headers */, - 507B3F4A1C31BDD30067B53E /* CCPUBoxEmitter.h in Headers */, - 507B3F4D1C31BDD30067B53E /* UILoadingBar.h in Headers */, - 507B3F4E1C31BDD30067B53E /* CCControlPotentiometer.h in Headers */, - 507B3F4F1C31BDD30067B53E /* CCControlButton.h in Headers */, - 507B3F511C31BDD30067B53E /* CCPUOnRandomObserver.h in Headers */, - 5020A19D1D49912500E80C72 /* Event.h in Headers */, 507B3F521C31BDD30067B53E /* CCSprite.h in Headers */, - 5020A16D1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */, - 5020A1DF1D49912500E80C72 /* Skeleton.h in Headers */, 507B3F531C31BDD30067B53E /* DetourNode.h in Headers */, 507B3F541C31BDD30067B53E /* CCSpriteBatchNode.h in Headers */, - 507B3F551C31BDD30067B53E /* CCArmatureDataManager.h in Headers */, 507B3F561C31BDD30067B53E /* CCSpriteFrame.h in Headers */, - 507B3F571C31BDD30067B53E /* UIText.h in Headers */, - 507B3F591C31BDD30067B53E /* CCPhysics3DShape.h in Headers */, 50864CB41C7BC1B000B3BAB1 /* cpGrooveJoint.h in Headers */, - 507B3F5A1C31BDD30067B53E /* CCPUScriptLexer.h in Headers */, 507B3F5B1C31BDD30067B53E /* CCEventListenerKeyboard.h in Headers */, - 507B3F5C1C31BDD30067B53E /* CCBSequence.h in Headers */, 507B3F5E1C31BDD30067B53E /* CCSpriteFrameCache.h in Headers */, 507B3F5F1C31BDD30067B53E /* CCAnimation.h in Headers */, - 507B3F621C31BDD30067B53E /* CCPUInterParticleCollider.h in Headers */, 507B3F631C31BDD30067B53E /* CCTexture2D.h in Headers */, - 507B3F661C31BDD30067B53E /* CCAnimate3D.h in Headers */, 507B3F671C31BDD30067B53E /* CCConfiguration.h in Headers */, - 507B3F681C31BDD30067B53E /* CCParticle3DEmitter.h in Headers */, 507B3F691C31BDD30067B53E /* CCAnimationCache.h in Headers */, - 507B3F6B1C31BDD30067B53E /* CCPUFlockCenteringAffectorTranslator.h in Headers */, 50864CC31C7BC1B100B3BAB1 /* cpPolyline.h in Headers */, 507B3F6E1C31BDD30067B53E /* CCTouch.h in Headers */, - 507B3F6F1C31BDD30067B53E /* UILayoutParameter.h in Headers */, - 507B3F701C31BDD30067B53E /* CCMenuItemImageLoader.h in Headers */, - 507B3F721C31BDD30067B53E /* CCBoneNode.h in Headers */, - 507B3F731C31BDD30067B53E /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */, - 507B3F761C31BDD30067B53E /* CCNodeLoaderLibrary.h in Headers */, + ED75D42221E303160052B87E /* ccConstants.h in Headers */, 50864C961C7BC1B000B3BAB1 /* chipmunk_types.h in Headers */, - 507B3F791C31BDD30067B53E /* UITextView+CCUITextInput.h in Headers */, 507B3F7A1C31BDD30067B53E /* CCEventListenerMouse.h in Headers */, 1A40D13E1E8E56C7002E363A /* regex.h in Headers */, - 507B3F7B1C31BDD30067B53E /* CCAllocatorMutex.h in Headers */, 507B3F7D1C31BDD30067B53E /* CCTextFieldTTF.h in Headers */, 507B3F7E1C31BDD30067B53E /* CCTileMapAtlas.h in Headers */, - 507B3F7F1C31BDD30067B53E /* CCSkin.h in Headers */, 507B3F811C31BDD30067B53E /* DetourObstacleAvoidance.h in Headers */, 507B3F831C31BDD30067B53E /* CCTMXLayer.h in Headers */, 507B3F841C31BDD30067B53E /* CCAutoPolygon.h in Headers */, - 507B3F861C31BDD30067B53E /* CCBFileLoader.h in Headers */, - 507B3F881C31BDD30067B53E /* CCActionTimeline.h in Headers */, - 507B3F891C31BDD30067B53E /* CCPhysics3DDebugDrawer.h in Headers */, 507B3F8B1C31BDD30067B53E /* ccShader_Label.vert in Headers */, 507B3F8C1C31BDD30067B53E /* CCTMXObjectGroup.h in Headers */, 507B3F8D1C31BDD30067B53E /* CCTMXTiledMap.h in Headers */, - 507B3F8E1C31BDD30067B53E /* CCEventAssetsManagerEx.h in Headers */, 507B3F8F1C31BDD30067B53E /* ConvertUTF.h in Headers */, - 507B3F911C31BDD30067B53E /* HttpConnection-winrt.h in Headers */, 507B3F921C31BDD30067B53E /* CCTMXXMLParser.h in Headers */, - 507B3F931C31BDD30067B53E /* CCPURender.h in Headers */, - 507B3F941C31BDD30067B53E /* CCPUPlaneColliderTranslator.h in Headers */, - 5020A2031D49912500E80C72 /* SkeletonRenderer.h in Headers */, - 507B3F961C31BDD30067B53E /* UIScale9Sprite.h in Headers */, - 507B3F971C31BDD30067B53E /* CCBAnimationManager.h in Headers */, - 507B3F991C31BDD30067B53E /* UIEditBoxImpl.h in Headers */, 507B3F9B1C31BDD30067B53E /* CCParallaxNode.h in Headers */, 507B3F9C1C31BDD30067B53E /* CCAutoreleasePool.h in Headers */, - 507B3F9D1C31BDD30067B53E /* CCPhysics3DWorld.h in Headers */, 507B3F9E1C31BDD30067B53E /* CCPass.h in Headers */, 507B3F9F1C31BDD30067B53E /* CCComponent.h in Headers */, - 507B3FA01C31BDD30067B53E /* CCPUBoxCollider.h in Headers */, - 507B3FA21C31BDD30067B53E /* CCSkeletonNode.h in Headers */, - 507B3FA41C31BDD30067B53E /* CCBKeyframe.h in Headers */, - 507B3FA51C31BDD30067B53E /* CCLayerGradientLoader.h in Headers */, - 507B3FA71C31BDD30067B53E /* CCPUOnPositionObserverTranslator.h in Headers */, 507B3FA91C31BDD30067B53E /* CCComponentContainer.h in Headers */, 507B3FAB1C31BDD30067B53E /* CCTextureCube.h in Headers */, - 507B3FAD1C31BDD30067B53E /* CCPULineEmitterTranslator.h in Headers */, 507B3FAE1C31BDD30067B53E /* edtaa3func.h in Headers */, - 507B3FAF1C31BDD30067B53E /* CCPUParticleFollower.h in Headers */, - 507B3FB11C31BDD30067B53E /* CocosDenshion.h in Headers */, - 507B3FB31C31BDD30067B53E /* UIScrollViewBar.h in Headers */, - 507B3FB41C31BDD30067B53E /* CCColliderDetector.h in Headers */, - 507B3FB61C31BDD30067B53E /* CCAllocatorStrategyFixedBlock.h in Headers */, - 507B3FB71C31BDD30067B53E /* ExtensionMacros.h in Headers */, - 507B3FB81C31BDD30067B53E /* CDConfig.h in Headers */, 507B3FBB1C31BDD30067B53E /* tinyxml2.h in Headers */, - 507B3FBC1C31BDD30067B53E /* CCInvocation.h in Headers */, 507B3FBE1C31BDD30067B53E /* ioapi.h in Headers */, 507B3FC01C31BDD30067B53E /* Mat4.h in Headers */, - 507B3FC11C31BDD30067B53E /* CCPUPathFollowerTranslator.h in Headers */, 1A40D1441E8E56C7002E363A /* strfunc.h in Headers */, - 507B3FC41C31BDD30067B53E /* CCPhysicsSprite3D.h in Headers */, 507B3FC51C31BDD30067B53E /* SocketIO.h in Headers */, - 507B3FC61C31BDD30067B53E /* CCPUOnEmissionObserver.h in Headers */, - 46BDE4E01FA87D4D00104C05 /* ClippingAttachment.h in Headers */, - 507B3FC71C31BDD30067B53E /* CCPUParticleSystem3DTranslator.h in Headers */, 507B3FC81C31BDD30067B53E /* DetourAlloc.h in Headers */, - 507B3FCA1C31BDD30067B53E /* CCPUBaseForceAffectorTranslator.h in Headers */, - 507B3FCB1C31BDD30067B53E /* CCSet.h in Headers */, - 503341A11D9DC7B400770EC7 /* SkeletonBinary.h in Headers */, - 507B3FCC1C31BDD30067B53E /* CCPUSphereColliderTranslator.h in Headers */, 50864CBD1C7BC1B000B3BAB1 /* cpPinJoint.h in Headers */, - 46BDE4F21FA87D6F00104C05 /* Triangulator.h in Headers */, 507B3FCD1C31BDD30067B53E /* utlist.h in Headers */, 507B3FCE1C31BDD30067B53E /* unzip.h in Headers */, - 507B3FD11C31BDD30067B53E /* UIHBox.h in Headers */, 507B3FD31C31BDD30067B53E /* CCProperties.h in Headers */, 507B3FD51C31BDD30067B53E /* ccShader_Label_normal.frag in Headers */, - 507B3FD91C31BDD30067B53E /* CCSkeleton3D.h in Headers */, 507B3FDA1C31BDD30067B53E /* Quaternion.h in Headers */, 507B3FDB1C31BDD30067B53E /* CCTechnique.h in Headers */, 1A40D1621E8E56C7002E363A /* prettywriter.h in Headers */, - 507B3FDD1C31BDD30067B53E /* ScrollViewReader.h in Headers */, - 507B3FDE1C31BDD30067B53E /* CCES2Renderer-ios.h in Headers */, - 46BDE4F01FA87D6B00104C05 /* SkeletonTwoColorBatch.h in Headers */, - 507B3FDF1C31BDD30067B53E /* CCPUTextureRotator.h in Headers */, - 507B3FE01C31BDD30067B53E /* CCPUOnPositionObserver.h in Headers */, 507B3FE31C31BDD30067B53E /* CCEventListenerFocus.h in Headers */, 507B3FE41C31BDD30067B53E /* ccShader_PositionColor.frag in Headers */, - 507B3FE61C31BDD30067B53E /* Sprite3DReader.h in Headers */, 507B3FE71C31BDD30067B53E /* ccConfig.h in Headers */, 507B3FE81C31BDD30067B53E /* DetourPathCorridor.h in Headers */, - 507B3FE91C31BDD30067B53E /* CCInputDelegate.h in Headers */, 507B3FEB1C31BDD30067B53E /* RecastDump.h in Headers */, 507B3FEC1C31BDD30067B53E /* CCRenderCommandPool.h in Headers */, - 507B3FEE1C31BDD30067B53E /* CCPUScaleVelocityAffectorTranslator.h in Headers */, - 507B3FF01C31BDD30067B53E /* CCPUOnVelocityObserverTranslator.h in Headers */, 507B3FF11C31BDD30067B53E /* ccShader_PositionColor.vert in Headers */, - 507B3FF21C31BDD30067B53E /* CCPUSlaveEmitter.h in Headers */, 507B3FF31C31BDD30067B53E /* CCImage.h in Headers */, - 507B3FF41C31BDD30067B53E /* CCPUForceFieldAffector.h in Headers */, - 507B3FF81C31BDD30067B53E /* SpriteReader.h in Headers */, 507B3FF91C31BDD30067B53E /* CCNS.h in Headers */, - 507B3FFA1C31BDD30067B53E /* CCPUMeshSurfaceEmitter.h in Headers */, - 507B3FFC1C31BDD30067B53E /* CCPUCircleEmitter.h in Headers */, 1A40D1501E8E56C7002E363A /* memorybuffer.h in Headers */, 507B3FFD1C31BDD30067B53E /* CCScriptSupport.h in Headers */, 507B3FFF1C31BDD30067B53E /* xxhash.h in Headers */, 507B40011C31BDD30067B53E /* ccShader_Label_df_glow.frag in Headers */, 507B40031C31BDD30067B53E /* CCGL-ios.h in Headers */, - 507B40041C31BDD30067B53E /* CCPUSphereSurfaceEmitter.h in Headers */, 507B40061C31BDD30067B53E /* CCData.h in Headers */, 1A40D1681E8E56C7002E363A /* reader.h in Headers */, 507B400A1C31BDD30067B53E /* CCIMEDispatcher.h in Headers */, - 507B400F1C31BDD30067B53E /* CCPUOnQuotaObserverTranslator.h in Headers */, 507B40101C31BDD30067B53E /* etc1.h in Headers */, - 507B40121C31BDD30067B53E /* CCRenderer.h in Headers */, 507B40141C31BDD30067B53E /* CCMeshCommand.h in Headers */, 507B40151C31BDD30067B53E /* CCEventListenerController.h in Headers */, - 507B40161C31BDD30067B53E /* CCBatchCommand.h in Headers */, - 507B40171C31BDD30067B53E /* CCMenuItemLoader.h in Headers */, - 5020A1611D49912500E80C72 /* AnimationStateData.h in Headers */, 507B40191C31BDD30067B53E /* CCEvent.h in Headers */, 507B401A1C31BDD30067B53E /* cocos2d.h in Headers */, 507B401C1C31BDD30067B53E /* CCNinePatchImageParser.h in Headers */, 507B401D1C31BDD30067B53E /* CCController.h in Headers */, - 503D4F701CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */, - 507B401F1C31BDD30067B53E /* ComAudioReader.h in Headers */, 507B40201C31BDD30067B53E /* CCGameController.h in Headers */, - 507B40221C31BDD30067B53E /* TextReader.h in Headers */, 507B40231C31BDD30067B53E /* CCEventListenerAcceleration.h in Headers */, - 507B40241C31BDD30067B53E /* CCAABB.h in Headers */, 507B40251C31BDD30067B53E /* CCGLProgramCache.h in Headers */, 50864CCC1C7BC1B100B3BAB1 /* cpRobust.h in Headers */, 507B40271C31BDD30067B53E /* CCProfiling.h in Headers */, - 507B40281C31BDD30067B53E /* TextAtlasReader.h in Headers */, - 507B40291C31BDD30067B53E /* CCScale9SpriteLoader.h in Headers */, - 507B402A1C31BDD30067B53E /* CCMeshSkin.h in Headers */, - 507B402B1C31BDD30067B53E /* CCPUBehaviourTranslator.h in Headers */, - 507B402C1C31BDD30067B53E /* CCPUOnTimeObserver.h in Headers */, - 5020A1A31D49912500E80C72 /* EventData.h in Headers */, - 507B402E1C31BDD30067B53E /* UISlider.h in Headers */, 507B402F1C31BDD30067B53E /* CCApplication-ios.h in Headers */, - 507B40311C31BDD30067B53E /* CCPUTechniqueTranslator.h in Headers */, - 46BDE4EE1FA87D6700104C05 /* SkeletonClipping.h in Headers */, - 507B40321C31BDD30067B53E /* UITextBMFont.h in Headers */, 507B40341C31BDD30067B53E /* CCGLProgram.h in Headers */, - 507B40351C31BDD30067B53E /* CSLoader.h in Headers */, - 5020A2241D49912500E80C72 /* TransformConstraint.h in Headers */, 507B40361C31BDD30067B53E /* CCApplicationProtocol.h in Headers */, 507B40371C31BDD30067B53E /* CCFontCharMap.h in Headers */, 1A40D1111E8E56C7002E363A /* document.h in Headers */, - 507B40391C31BDD30067B53E /* CCAllocatorStrategyPool.h in Headers */, - 507B403A1C31BDD30067B53E /* CCTimeLine.h in Headers */, - 507B403B1C31BDD30067B53E /* UILayoutComponent.h in Headers */, 1A40D1711E8E56C7002E363A /* stringbuffer.h in Headers */, - 5020A1971D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */, - 50F965591CD0360000ADE813 /* CCVRProtocol.h in Headers */, - 507B403D1C31BDD30067B53E /* CCPUGravityAffectorTranslator.h in Headers */, 507B403E1C31BDD30067B53E /* MathUtil.h in Headers */, - 507B403F1C31BDD30067B53E /* CCInteger.h in Headers */, - 507B40401C31BDD30067B53E /* CCSkybox.h in Headers */, - 507B40411C31BDD30067B53E /* CCTableViewCell.h in Headers */, - 507B40421C31BDD30067B53E /* CCPUTranslateManager.h in Headers */, - 507B40431C31BDD30067B53E /* ListViewReader.h in Headers */, 1A40D0E11E8E4C76002E363A /* md5.h in Headers */, 507B40441C31BDD30067B53E /* CCVertexAttribBinding.h in Headers */, 507B40461C31BDD30067B53E /* ccUtils.h in Headers */, - 507B40471C31BDD30067B53E /* CCObjLoader.h in Headers */, - 507B40481C31BDD30067B53E /* CCNodeLoader.h in Headers */, 507B40491C31BDD30067B53E /* CCEventTouch.h in Headers */, - 5020A1851D49912500E80C72 /* Bone.h in Headers */, - 507B404A1C31BDD30067B53E /* CCPUAffectorTranslator.h in Headers */, 507B404B1C31BDD30067B53E /* ccRandom.h in Headers */, - 507B404C1C31BDD30067B53E /* CCPURibbonTrailRender.h in Headers */, 507B404D1C31BDD30067B53E /* CCTextureAtlas.h in Headers */, 507B404E1C31BDD30067B53E /* DetourCommon.h in Headers */, - 507B404F1C31BDD30067B53E /* CCPhysics3DComponent.h in Headers */, - 507B40501C31BDD30067B53E /* CCBundleReader.h in Headers */, - 507B40511C31BDD30067B53E /* Node3DReader.h in Headers */, 507B40521C31BDD30067B53E /* CCEventDispatcher.h in Headers */, - 5020A1F71D49912500E80C72 /* SkeletonData.h in Headers */, 507B40531C31BDD30067B53E /* CCTweenFunction.h in Headers */, - 507B40541C31BDD30067B53E /* TriggerBase.h in Headers */, - 507B40571C31BDD30067B53E /* CCPUSlaveBehaviourTranslator.h in Headers */, - 507B40581C31BDD30067B53E /* CCControlSaturationBrightnessPicker.h in Headers */, - 507B405A1C31BDD30067B53E /* CCPUDoFreezeEventHandler.h in Headers */, 507B405B1C31BDD30067B53E /* CCGL.h in Headers */, - 507B405C1C31BDD30067B53E /* CCArmatureAnimation.h in Headers */, - 503D4F681CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */, 507B405E1C31BDD30067B53E /* CCVertexIndexData.h in Headers */, 507B405F1C31BDD30067B53E /* Vec3.h in Headers */, 507B40601C31BDD30067B53E /* CCEventType.h in Headers */, - 507B40631C31BDD30067B53E /* CCComRender.h in Headers */, - 507B40641C31BDD30067B53E /* CCPUGeometryRotator.h in Headers */, - 507B40651C31BDD30067B53E /* LocalStorage.h in Headers */, 507B40661C31BDD30067B53E /* AudioCache.h in Headers */, - 507B40691C31BDD30067B53E /* CCBone.h in Headers */, - 507B406A1C31BDD30067B53E /* CCAllocatorStrategyDefault.h in Headers */, 507B406B1C31BDD30067B53E /* CCVertex.h in Headers */, 50864CB11C7BC1B000B3BAB1 /* cpGearJoint.h in Headers */, - 507B406F1C31BDD30067B53E /* CCPUOnCollisionObserver.h in Headers */, - 507B40731C31BDD30067B53E /* CCParticle3DRender.h in Headers */, 507B40741C31BDD30067B53E /* DetourTileCache.h in Headers */, - 507B40751C31BDD30067B53E /* CCProcessBase.h in Headers */, - 507B40761C31BDD30067B53E /* CCArmatureDefine.h in Headers */, - 507B40791C31BDD30067B53E /* CSParseBinary_generated.h in Headers */, - 507B407C1C31BDD30067B53E /* CCDisplayFactory.h in Headers */, - 507B407D1C31BDD30067B53E /* CCGLBufferedNode.h in Headers */, - 5020A20F1D49912500E80C72 /* Slot.h in Headers */, - 507B407E1C31BDD30067B53E /* CCString.h in Headers */, 507B407F1C31BDD30067B53E /* pvr.h in Headers */, - 507B40821C31BDD30067B53E /* CCComAudio.h in Headers */, - 507B40831C31BDD30067B53E /* CCDictionary.h in Headers */, - 507B40841C31BDD30067B53E /* CCPUOnClearObserverTranslator.h in Headers */, - 5033419B1D9DC7B400770EC7 /* kvec.h in Headers */, 507B40851C31BDD30067B53E /* ccShader_PositionTexture.frag in Headers */, 507B40861C31BDD30067B53E /* CCFastTMXTiledMap.h in Headers */, 50864CDB1C7BC1B100B3BAB1 /* cpSpace.h in Headers */, 1A40D1381E8E56C7002E363A /* meta.h in Headers */, 507B40881C31BDD30067B53E /* ccTypes.h in Headers */, - 507B408A1C31BDD30067B53E /* CDAudioManager.h in Headers */, - 5020A1B51D49912500E80C72 /* IkConstraintData.h in Headers */, 1A40D1351E8E56C7002E363A /* itoa.h in Headers */, - 507B408C1C31BDD30067B53E /* Light3DReader.h in Headers */, 50864C991C7BC1B000B3BAB1 /* chipmunk_unsafe.h in Headers */, - 507B408D1C31BDD30067B53E /* CCPUPlane.h in Headers */, - 507B40901C31BDD30067B53E /* CCControlStepper.h in Headers */, 507B40911C31BDD30067B53E /* base64.h in Headers */, - 5020A2091D49912500E80C72 /* Skin.h in Headers */, - 507B40941C31BDD30067B53E /* CCPhysicsDebugNode.h in Headers */, - 507B40951C31BDD30067B53E /* CCControlSlider.h in Headers */, - 507B40991C31BDD30067B53E /* CCPUBaseCollider.h in Headers */, - 507B409A1C31BDD30067B53E /* CCArray.h in Headers */, - 507B409B1C31BDD30067B53E /* CCPUScriptTranslator.h in Headers */, - 507B409C1C31BDD30067B53E /* CCNotificationCenter.h in Headers */, - 5020A1791D49912500E80C72 /* AttachmentLoader.h in Headers */, 507B409D1C31BDD30067B53E /* ZipUtils.h in Headers */, 507B409E1C31BDD30067B53E /* CCTextureCache.h in Headers */, 507B409F1C31BDD30067B53E /* CCVertexIndexBuffer.h in Headers */, 1A40D1201E8E56C7002E363A /* filereadstream.h in Headers */, - 507B40A01C31BDD30067B53E /* CCPULineEmitter.h in Headers */, 507B40A11C31BDD30067B53E /* CCNodeGrid.h in Headers */, - 507B40A21C31BDD30067B53E /* CCThread.h in Headers */, - 5020A17F1D49912500E80C72 /* AttachmentVertices.h in Headers */, - 507B40A31C31BDD30067B53E /* UITextField.h in Headers */, - 507B40A41C31BDD30067B53E /* CCDouble.h in Headers */, - 46BDE4E81FA87D5B00104C05 /* Color.h in Headers */, - 507B40A51C31BDD30067B53E /* CCPUColorAffectorTranslator.h in Headers */, 507B40A71C31BDD30067B53E /* Export.h in Headers */, - 507B40AB1C31BDD30067B53E /* CCSpriteFrameCacheHelper.h in Headers */, 507B40AC1C31BDD30067B53E /* atitc.h in Headers */, - 507B40AD1C31BDD30067B53E /* CCPUSimpleSpline.h in Headers */, - 507B40B01C31BDD30067B53E /* CCPUOnExpireObserver.h in Headers */, - 507B40B11C31BDD30067B53E /* CCActionNode.h in Headers */, - 507B40B31C31BDD30067B53E /* CCPhysics3DObject.h in Headers */, - 507B40B41C31BDD30067B53E /* SkeletonNodeReader.h in Headers */, 507B40B61C31BDD30067B53E /* TGAlib.h in Headers */, - 507B40B71C31BDD30067B53E /* CCPUEmitter.h in Headers */, - 507B40BA1C31BDD30067B53E /* UIPageViewIndicator.h in Headers */, - 507B40BB1C31BDD30067B53E /* CCControlColourPicker.h in Headers */, - 507B40BC1C31BDD30067B53E /* CCDatas.h in Headers */, - 50864CEC1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */, - 507B40BD1C31BDD30067B53E /* CCBReader.h in Headers */, - 507B40BE1C31BDD30067B53E /* CCNodeLoaderListener.h in Headers */, 1A2B22B61E6E5829001D5EC9 /* Uri.h in Headers */, - 507B40BF1C31BDD30067B53E /* SimpleAudioEngine.h in Headers */, - 507B40C01C31BDD30067B53E /* CCPUOnQuotaObserver.h in Headers */, - 507B40C11C31BDD30067B53E /* CCNavMeshAgent.h in Headers */, - 507B40C21C31BDD30067B53E /* CCPUScaleVelocityAffector.h in Headers */, - 507B40C31C31BDD30067B53E /* CCPUSphere.h in Headers */, - 507B40C41C31BDD30067B53E /* CCParticle3DAffector.h in Headers */, 1A40D12C1E8E56C7002E363A /* diyfp.h in Headers */, - 507B40C51C31BDD30067B53E /* CCPURendererTranslator.h in Headers */, 507B40C61C31BDD30067B53E /* CCMaterial.h in Headers */, - 507B40C71C31BDD30067B53E /* CCPUBaseColliderTranslator.h in Headers */, 50864CD81C7BC1B100B3BAB1 /* cpSlideJoint.h in Headers */, - 507B40C81C31BDD30067B53E /* CCDeprecated.h in Headers */, - 507B40C91C31BDD30067B53E /* CCPULinearForceAffector.h in Headers */, - 507B40CA1C31BDD30067B53E /* ParticleReader.h in Headers */, - 507B40CC1C31BDD30067B53E /* CCPUDynamicAttribute.h in Headers */, - 507B40CE1C31BDD30067B53E /* CCESRenderer-ios.h in Headers */, - 507B40CF1C31BDD30067B53E /* CCPUObserverTranslator.h in Headers */, - 46BDE4F41FA87D7500104C05 /* VertexEffect.h in Headers */, 507B40D01C31BDD30067B53E /* CCEventFocus.h in Headers */, - 507B40D11C31BDD30067B53E /* CCTransformHelp.h in Headers */, - 507B40D31C31BDD30067B53E /* CCPUEmitterManager.h in Headers */, - 507B40D51C31BDD30067B53E /* UIVideoPlayer.h in Headers */, - 507B40D61C31BDD30067B53E /* CCLabelBMFontLoader.h in Headers */, 507B40D71C31BDD30067B53E /* CCCommon.h in Headers */, 507B40D81C31BDD30067B53E /* CCCameraBackgroundBrush.h in Headers */, - 507B40D91C31BDD30067B53E /* LoadingBarReader.h in Headers */, 507B40DA1C31BDD30067B53E /* sweep_context.h in Headers */, 507B40DB1C31BDD30067B53E /* CCEventKeyboard.h in Headers */, - 507B40DC1C31BDD30067B53E /* CCPUBeamRender.h in Headers */, - 507B40DE1C31BDD30067B53E /* CCPlane.h in Headers */, - 507B40DF1C31BDD30067B53E /* CCPUOnEmissionObserverTranslator.h in Headers */, - 507B40E01C31BDD30067B53E /* CCPUTextureAnimator.h in Headers */, 507B40E11C31BDD30067B53E /* CCSAXParser.h in Headers */, 507B40E31C31BDD30067B53E /* OpenGL_Internal-ios.h in Headers */, - 5020A2301D49912500E80C72 /* VertexAttachment.h in Headers */, - 507B40E51C31BDD30067B53E /* WidgetCallBackHandlerProtocol.h in Headers */, 507B40E81C31BDD30067B53E /* CCRenderCommand.h in Headers */, - 507B40EB1C31BDD30067B53E /* CCControl.h in Headers */, - 507B40EC1C31BDD30067B53E /* CCArmature.h in Headers */, 507B40ED1C31BDD30067B53E /* CCAsyncTaskPool.h in Headers */, - 507B40EE1C31BDD30067B53E /* cocos-ext.h in Headers */, - 5020A1551D49912500E80C72 /* Animation.h in Headers */, 50864CD51C7BC1B100B3BAB1 /* cpSimpleMotor.h in Headers */, - 507B40EF1C31BDD30067B53E /* UIImageView.h in Headers */, - 507B40F11C31BDD30067B53E /* CCPUBillboardChain.h in Headers */, 507B40F21C31BDD30067B53E /* CCEventListener.h in Headers */, - 507B40F31C31BDD30067B53E /* CCActionTimelineNode.h in Headers */, 507B40F61C31BDD30067B53E /* CCUserDefault.h in Headers */, - 507B40F71C31BDD30067B53E /* ButtonReader.h in Headers */, 507B40F91C31BDD30067B53E /* CCIDownloaderImpl.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -10690,810 +6727,533 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C5F516201C822D900013B695 /* UITabControl.h in Headers */, - C5F5161E1C822D5B0013B695 /* TabControlReader.h in Headers */, + EDC78CC521CA19FC00E1863C /* LayoutReader.h in Headers */, 503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */, - 2980F0281BA9A5550059E678 /* CCUITextInput.h in Headers */, - B665E3851AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */, - 2980F0291BA9A5550059E678 /* UITextField+CCUITextInput.h in Headers */, - 46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */, 3EACC9A319F5014D00EB3C5E /* CCCamera.h in Headers */, - B665E2ED1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */, + 46AF3A2221F1877100D5AFCD /* CCPhysicsJoint.h in Headers */, + EDC78D1921CA19FC00E1863C /* CCComController.h in Headers */, 1A40D16A1E8E56C7002E363A /* schema.h in Headers */, + EDC78D0521CA19FC00E1863C /* CCDisplayFactory.h in Headers */, 50ABBDA21925AB4100A911A9 /* CCGroupCommand.h in Headers */, - 15AE18C219AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */, - 15AE181519AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, - B665E4191AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */, - 5020A1F61D49912500E80C72 /* SkeletonData.h in Headers */, + EDC78C6B21CA19FC00E1863C /* CSParseBinary_generated.h in Headers */, 503DD8EF1926736A00CD74DD /* CCPlatformDefine-ios.h in Headers */, - 15AE196919AAD35100C27E9E /* CocoStudio.h in Headers */, - 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, - 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, - B665E33D1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */, - 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - B665E3791AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h in Headers */, - 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 5034CA38191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */, 1A40D10A1E8E56C6002E363A /* allocators.h in Headers */, - 15AE1B8119AADA9A00C27E9E /* UITextAtlas.h in Headers */, 15FB208C1AE7C57D00C31518 /* utils.h in Headers */, - B665E2B51AA80A6500DDB1C5 /* CCPUForceField.h in Headers */, - B665E2D91AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */, - 15B3708319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, + 46F9B72321AFE64D009DF858 /* CCTableViewCell.h in Headers */, 1A40D1281E8E56C7002E363A /* biginteger.h in Headers */, - D0FD03521A3B51AA00825BB5 /* CCAllocatorGlobal.h in Headers */, - 94A6DF091C7304120094AEF7 /* LocalizationManager.h in Headers */, - B665E3D11AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */, 1A40D1221E8E56C7002E363A /* filewritestream.h in Headers */, - B665E3B91AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */, 50ABBE7C1925AB6F00A911A9 /* CCEventMouse.h in Headers */, - 46A171011807CECB005B8026 /* CCPhysicsJoint.h in Headers */, - B665E3D91AA80A6600DDB1C5 /* CCPUScriptParser.h in Headers */, - B665E43D1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */, 15FB208E1AE7C57D00C31518 /* poly2tri.h in Headers */, - 46A170FD1807CECB005B8026 /* CCPhysicsBody.h in Headers */, + EDC78C1121CA19FB00E1863C /* CCActionTimelineNode.h in Headers */, 50ABBE9C1925AB6F00A911A9 /* CCRef.h in Headers */, - 292DB16219B461CA00A80320 /* ExtensionDeprecated.h in Headers */, + EDC78CB521CA19FC00E1863C /* WidgetReader.h in Headers */, 50ABBD961925AB4100A911A9 /* CCGLProgramState.h in Headers */, - 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */, + EDC78BEB21CA19FB00E1863C /* CCDisplayManager.h in Headers */, + 460D4CD421A5666E0075726E /* CCRenderer.h in Headers */, 50ABBDB41925AB4100A911A9 /* ccShaders.h in Headers */, - 15AE19B319AAD39700C27E9E /* SliderReader.h in Headers */, - 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */, - B665E3C11AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */, - 5020A2081D49912500E80C72 /* Skin.h in Headers */, - A0E749FA1BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */, + ED75D42121E303160052B87E /* ccConstants.h in Headers */, 50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */, - 15AE192619AAD35100C27E9E /* TriggerObj.h in Headers */, - B665E2E51AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */, 50ABBE2E1925AB6F00A911A9 /* ccCArray.h in Headers */, - 15B3707B19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, - 46BDE4E31FA87D5300104C05 /* Array.h in Headers */, - B665E3E91AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */, - 15AE1B9119AADA9A00C27E9E /* UIWidget.h in Headers */, - B665E2611AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 1A40D10D1E8E56C7002E363A /* document-wrapper.h in Headers */, 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */, + EDC78CE121CA19FC00E1863C /* ComAudioReader.h in Headers */, + 4631CB1021AFD9F90000D408 /* UIRadioButton.h in Headers */, 1A40D15E1E8E56C7002E363A /* pointer.h in Headers */, - 382384401A259140002C4610 /* SingleNodeReader.h in Headers */, - B665E2751AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */, - 50F965551CD0360000ADE813 /* CCVRGenericRenderer.h in Headers */, - B665E36D1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */, - ED74D76A1A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */, + 4631CBEE21AFD9FA0000D408 /* UIPageView.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 1A40D13A1E8E56C7002E363A /* pow10.h in Headers */, B6DD2FD41B04825B00E47F5F /* DetourStatus.h in Headers */, - B5CE6DCB1B3C05BA002B0419 /* UIRadioButton.h in Headers */, - B665E2891AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, + EDC78C8B21CA19FC00E1863C /* GameMapReader.h in Headers */, + ED28C240219E629C0078D854 /* ShaderModule.h in Headers */, 1A40D16D1E8E56C7002E363A /* stream.h in Headers */, - 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, 50864CD11C7BC1B100B3BAB1 /* cpShape.h in Headers */, + EDC78C4B21CA19FB00E1863C /* CCComRender.h in Headers */, B6DD2FC21B04825B00E47F5F /* DetourMath.h in Headers */, - 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */, - 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */, - B665E2C91AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */, - 15AE197A19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, - 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */, - 15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */, 50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */, - 2980F0241BA9A5550059E678 /* CCUIMultilineTextField.h in Headers */, 50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */, - B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, + 46F9B47721AFE64C009DF858 /* ExtensionMacros.h in Headers */, 1A40D1311E8E56C7002E363A /* ieee754.h in Headers */, 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, - B665E27D1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */, + 4631CBD021AFD9FA0000D408 /* UILoadingBar.h in Headers */, + EDC78C5921CA19FC00E1863C /* CCActionFrameEasing.h in Headers */, + EDC78CDD21CA19FC00E1863C /* SliderReader.h in Headers */, + EDC78CA921CA19FC00E1863C /* Light3DReader.h in Headers */, B6DD2FE81B04825B00E47F5F /* DetourPathQueue.h in Headers */, - B677B0D81B18492D006762CB /* CCNavMeshObstacle.h in Headers */, - 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, - 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, - 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, - 50ABBE401925AB6F00A911A9 /* CCDataVisitor.h in Headers */, - 15AE19B719AAD39700C27E9E /* TextBMFontReader.h in Headers */, + EDC78D0321CA19FC00E1863C /* CCComAudio.h in Headers */, 1A570064180BC5A10088DEC7 /* CCAction.h in Headers */, - 5020A1A81D49912500E80C72 /* extension.h in Headers */, - 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */, + EDC78CFD21CA19FC00E1863C /* TextFieldReader.h in Headers */, + 4631CBB221AFD9FA0000D408 /* UIListView.h in Headers */, 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */, - 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, - 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */, - A045F6F21BA81821005076C7 /* GameNode3DReader.h in Headers */, - 5020A1EA1D49912500E80C72 /* SkeletonBatch.h in Headers */, - B665E1F51AA80A6500DDB1C5 /* CCPUAffector.h in Headers */, 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */, + EDC78C7321CA19FC00E1863C /* WidgetCallBackHandlerProtocol.h in Headers */, B6DD2FCE1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, - 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, 1A40D14C1E8E56C7002E363A /* istreamwrapper.h in Headers */, - 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, + 4631CBC821AFD9FA0000D408 /* UILayoutManager.h in Headers */, + EDC78C1D21CA19FB00E1863C /* CCActionTimelineCache.h in Headers */, 1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, - 15AE195C19AAD35100C27E9E /* CCSGUIReader.h in Headers */, + EDC78C6F21CA19FC00E1863C /* CCComBase.h in Headers */, + EDC78CA121CA19FC00E1863C /* WidgetReaderProtocol.h in Headers */, + 4631CB6021AFD9F90000D408 /* CCUISingleLineTextField.h in Headers */, 1A40D1161E8E56C7002E363A /* encodings.h in Headers */, 5034CA3A191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, - D0FD034E1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */, - B665E2A51AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */, - 5020A2231D49912500E80C72 /* TransformConstraint.h in Headers */, + EDC78C1321CA19FB00E1863C /* CCBoneNode.h in Headers */, 50864CBF1C7BC1B000B3BAB1 /* cpPivotJoint.h in Headers */, - 5020A1721D49912500E80C72 /* Attachment.h in Headers */, 50864CE31C7BC1B100B3BAB1 /* cpVect.h in Headers */, DABC9FAC19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */, - B665E4311AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, - B665E3C51AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */, B6DD2FF81B04825B00E47F5F /* fastlz.h in Headers */, - B665E4351AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, - 5020A22F1D49912500E80C72 /* VertexAttachment.h in Headers */, - B665E2451AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */, + 4631CB2221AFD9F90000D408 /* UITabControl.h in Headers */, 50ABBEC41925AB6F00A911A9 /* CCVector.h in Headers */, + EDC78BED21CA19FB00E1863C /* CCComAttribute.h in Headers */, + EDC78C9921CA19FC00E1863C /* TextAtlasReader.h in Headers */, + 46D3D45E21DE014500EF5E75 /* BufferManager.h in Headers */, + 46AF3A2021F1877100D5AFCD /* CCPhysicsHelper.h in Headers */, 50ABBE501925AB6F00A911A9 /* CCEventCustom.h in Headers */, - B665E3311AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */, A0534A661B872FFD006B03E5 /* CCDownloader-apple.h in Headers */, - B240C5EC1B09DFB000137F50 /* CCFrameBuffer.h in Headers */, - B665E2051AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */, + EDC78CB921CA19FC00E1863C /* PageViewReader.h in Headers */, 1A570070180BC5A10088DEC7 /* CCActionEase.h in Headers */, 1A40D1521E8E56C7002E363A /* memorystream.h in Headers */, 1A570074180BC5A10088DEC7 /* CCActionGrid.h in Headers */, - 15AE194A19AAD35100C27E9E /* CCComController.h in Headers */, - 382384161A259092002C4610 /* NodeReaderProtocol.h in Headers */, 5034CA46191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, 1A570078180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */, - 5020A1CC1D49912500E80C72 /* PathConstraint.h in Headers */, - B665E3A91AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */, - 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */, - 3E2A09C51BAA91B70086B878 /* CCMotionStreak3D.h in Headers */, 1A40D12E1E8E56C7002E363A /* dtoa.h in Headers */, - 1A01C68918F57BE800EFE3A6 /* CCBool.h in Headers */, - B665E2851AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */, - 182C5CB61A95965500C30D34 /* CSParse3DBinary_generated.h in Headers */, - 15AE184319AAD2F700C27E9E /* CCSprite3D.h in Headers */, + 46AF3A1421F1877100D5AFCD /* CCPhysicsContact.h in Headers */, 50CB247E19D9C5A100687767 /* AudioPlayer.h in Headers */, + EDC78CB321CA19FC00E1863C /* TextReader.h in Headers */, 1A57007C180BC5A10088DEC7 /* CCActionInstant.h in Headers */, + 40FE106F21F073BF0061C04F /* CCControlSlider.h in Headers */, + EDC78C7721CA19FC00E1863C /* ArmatureNodeReader.h in Headers */, 3E6176751960F89B00DE83F5 /* CCEventController.h in Headers */, - 15AE18CD19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */, - 382384121A259092002C4610 /* NodeReaderDefine.h in Headers */, + EDC78C6121CA19FC00E1863C /* CCActionNode.h in Headers */, + EDC78CCD21CA19FC00E1863C /* NodeReaderDefine.h in Headers */, + 40FE106B21F073BF0061C04F /* CCControlColourPicker.h in Headers */, 50ABBE781925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, + EDC78C1721CA19FB00E1863C /* CCTimeLine.h in Headers */, 15AE1BC019AADFF000C27E9E /* WebSocket.h in Headers */, - B665E2FD1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */, - 3823840A1A25900F002C4610 /* FlatBuffersSerialize.h in Headers */, + EDC78C4D21CA19FB00E1863C /* CSLanguageDataBinary_generated.h in Headers */, 50864CAA1C7BC1B000B3BAB1 /* cpDampedRotarySpring.h in Headers */, + 4631CB1621AFD9F90000D408 /* UITextAtlas.h in Headers */, + 46F9B72B21AFE64D009DF858 /* CCTableView.h in Headers */, + 46BD388021D35A5B002BD50F /* DepthStencilStateMTL.h in Headers */, 1A40D1251E8E56C7002E363A /* fwd.h in Headers */, 1A570080180BC5A10088DEC7 /* CCActionInterval.h in Headers */, - B665E2A11AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */, - 15AE192D19AAD35100C27E9E /* CCActionFrame.h in Headers */, - 15AE192F19AAD35100C27E9E /* CCActionFrameEasing.h in Headers */, 1A570084180BC5A10088DEC7 /* CCActionManager.h in Headers */, 50864C921C7BC1B000B3BAB1 /* chipmunk_private.h in Headers */, - B665E3151AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */, - 15AE18C619AAD33D00C27E9E /* CCLayerLoader.h in Headers */, - B665E2C51AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */, + 4631CB3421AFD9F90000D408 /* UIEditBox.h in Headers */, + EDC78C8F21CA19FC00E1863C /* UserCameraReader.h in Headers */, + EDC78CC121CA19FC00E1863C /* ImageViewReader.h in Headers */, 50ABC0141926664800A911A9 /* CCGLView.h in Headers */, + EDC78CF121CA19FC00E1863C /* SkeletonNodeReader.h in Headers */, 1A570088180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, - 15AE1B9319AADA9A00C27E9E /* UIHelper.h in Headers */, - B677B0DC1B18492D006762CB /* CCNavMeshUtils.h in Headers */, - B665E2111AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */, - B665E30D1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */, - 15AE1B9619AADA9A00C27E9E /* CocosGUI.h in Headers */, 1A57008C180BC5A10088DEC7 /* CCActionProgressTimer.h in Headers */, - B665E21D1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */, 1A570090180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */, - B665E2A91AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */, DA8C62A519E52C6400000516 /* ioapi_mem.h in Headers */, 1A570094180BC5A10088DEC7 /* CCActionTween.h in Headers */, 1A57009B180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, - 15AE184919AAD2F700C27E9E /* cocos3d.h in Headers */, 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */, - 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */, - 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, - 5020A2291D49912500E80C72 /* TransformConstraintData.h in Headers */, - 15AE1BF019AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, - B665E3611AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */, - B665E3111AA80A6500DDB1C5 /* CCPUObserver.h in Headers */, - 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, - B665E2311AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h in Headers */, - 85505F0B1B60E3D1003F2CD4 /* BoneNodeReader.h in Headers */, 503DD8E41926736A00CD74DD /* CCDirectorCaller-ios.h in Headers */, 50864CDD1C7BC1B100B3BAB1 /* cpSpatialIndex.h in Headers */, 1A40D1461E8E56C7002E363A /* strtod.h in Headers */, - 15AE198119AAD35700C27E9E /* CCTimelineMacro.h in Headers */, - B665E24D1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */, + 46F9B72D21AFE64D009DF858 /* ExtensionExport.h in Headers */, 50864CC51C7BC1B100B3BAB1 /* cpPolyShape.h in Headers */, - 15AE1B7719AADA9A00C27E9E /* UIPageView.h in Headers */, + EDC78D3721CA19FC00E1863C /* CCSkin.h in Headers */, 50ABBD8A1925AB4100A911A9 /* CCCustomCommand.h in Headers */, - 85505F0C1B60E3D5003F2CD4 /* CSBoneBinary_generated.h in Headers */, - 5020A19C1D49912500E80C72 /* Event.h in Headers */, + EDC78C3321CA19FB00E1863C /* CocoStudio.h in Headers */, 299754F7193EC95400A54AC3 /* ObjectFactory.h in Headers */, + 4631CBF021AFD9FA0000D408 /* UISlider.h in Headers */, 15FB20921AE7C57D00C31518 /* advancing_front.h in Headers */, 50ABBE881925AB6F00A911A9 /* ccMacros.h in Headers */, - B665E3991AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */, 50ABC0101926664800A911A9 /* CCFileUtils.h in Headers */, - 15AE19A919AAD39700C27E9E /* LayoutReader.h in Headers */, - B665E29D1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */, - 15AE1B7B19AADA9A00C27E9E /* UIScrollView.h in Headers */, - 5020A1D81D49912500E80C72 /* RegionAttachment.h in Headers */, 5034CA30191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */, - 382384391A259126002C4610 /* ProjectNodeReader.h in Headers */, 50864CB61C7BC1B000B3BAB1 /* cpHastySpace.h in Headers */, - 1A570111180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, + 4631CBA621AFD9FA0000D408 /* UITextBMFont.h in Headers */, 468A14E11EF223B700ECA675 /* flatbuffers.h in Headers */, + ED28C23E219E629C0078D854 /* CommandBuffer.h in Headers */, 50ABBE381925AB6F00A911A9 /* CCConsole.h in Headers */, + 4631CBD221AFD9FA0000D408 /* UIScale9Sprite.h in Headers */, + 46F9B6F121AFE64C009DF858 /* cocos-ext.h in Headers */, + 40FE106D21F073BF0061C04F /* CCControlButton.h in Headers */, + 46BD388A21D35A68002BD50F /* Utils.h in Headers */, 50ABBE8A1925AB6F00A911A9 /* CCMap.h in Headers */, - B665E32D1AA80A6500DDB1C5 /* CCPUOnCountObserver.h in Headers */, 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */, 50ABBE4C1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, - 5020A1661D49912500E80C72 /* Atlas.h in Headers */, - B665E2F91AA80A6500DDB1C5 /* CCPUListener.h in Headers */, + EDC78BDD21CA19FB00E1863C /* TriggerMng.h in Headers */, 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, - B665E2711AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, + EDC78BF521CA19FB00E1863C /* CCUtilMath.h in Headers */, + 4631CB8421AFD9F90000D408 /* UIEditBoxImpl.h in Headers */, 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, - B677B0D41B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */, - 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */, 1A570122180BC90D0088DEC7 /* CCGrid.h in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, - 29394CF519B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, - 43015DC21B60DF4000E75161 /* CCComExtensionData.h in Headers */, - D0FD035E1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, + 40FE106821F073BF0061C04F /* CCControl.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, - 5020A1D21D49912500E80C72 /* PathConstraintData.h in Headers */, 50864CCE1C7BC1B100B3BAB1 /* cpRotaryLimitJoint.h in Headers */, - 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, - 5020A2141D49912500E80C72 /* SlotData.h in Headers */, - 5020A1FC1D49912500E80C72 /* SkeletonJson.h in Headers */, 3E2BDADE19C030ED0055CDCD /* AudioEngine.h in Headers */, - B665E3011AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */, 50ABBD9A1925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, - 15AE181D19AAD2F700C27E9E /* CCBundle3D.h in Headers */, - 15AE192519AAD35100C27E9E /* CocoLoader.h in Headers */, 15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */, - B665E2BD1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.h in Headers */, - B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */, - 5030C0431CE6DF8B00C5D3E7 /* CCVRGenericHeadTracker.h in Headers */, B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, - B665E2911AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */, - 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, - 5020A1F01D49912500E80C72 /* SkeletonBounds.h in Headers */, - B665E3491AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */, 50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */, 1A40D1731E8E56C7002E363A /* writer.h in Headers */, - B665E3291AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */, - D0FD034A1A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */, 50ABBFFE1926664800A911A9 /* CCFileUtils-apple.h in Headers */, + EDC78CCB21CA19FC00E1863C /* SingleNodeReader.h in Headers */, + EDC78CBD21CA19FC00E1863C /* NodeReader.h in Headers */, + EDC78CCF21CA19FC00E1863C /* TextBMFontReader.h in Headers */, + 4631CB5621AFD9F90000D408 /* CCUITextInput.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, - 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */, + EDC78CD521CA19FC00E1863C /* CheckBoxReader.h in Headers */, + 4631CB9621AFD9FA0000D408 /* UITextField.h in Headers */, 50864CB91C7BC1B000B3BAB1 /* cpMarch.h in Headers */, 1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, - B665E3E51AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */, - 182C5CE81A9D725400C30D34 /* UserCameraReader.h in Headers */, - 5020A1DE1D49912500E80C72 /* Skeleton.h in Headers */, B6DD2FB21B04825B00E47F5F /* RecastDebugDraw.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, B6DD2FBC1B04825B00E47F5F /* DetourAssert.h in Headers */, - 15AE18D419AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, - B665E3411AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */, + ED28C22E219E629B0078D854 /* Types.h in Headers */, 50864CAD1C7BC1B000B3BAB1 /* cpDampedSpring.h in Headers */, 468A14FC1EF223B700ECA675 /* util.h in Headers */, B6DD2FF41B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */, - 3823842B1A2590F9002C4610 /* NodeReader.h in Headers */, + 40FE106E21F073BF0061C04F /* CCInvocation.h in Headers */, 1A5701B8180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, - 15AE182719AAD2F700C27E9E /* CCMesh.h in Headers */, - 15AE199319AAD37300C27E9E /* ImageViewReader.h in Headers */, - B665E2791AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */, 1A40D1401E8E56C7002E363A /* stack.h in Headers */, - B665E3091AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, - 15AE18CB19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, - B665E4011AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */, + 461C205021A5304A00F3BD47 /* CCPipelineDescriptor.h in Headers */, B6DD2FC61B04825B00E47F5F /* DetourNavMesh.h in Headers */, + EDC78C3B21CA19FB00E1863C /* CCActionFrame.h in Headers */, 1A5701BC180BCB5A0088DEC7 /* CCLabel.h in Headers */, - B665E2D51AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, + 4631CBF421AFD9FA0000D408 /* UIRichText.h in Headers */, 1A5701C0180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, + 4631CB7E21AFD9F90000D408 /* UIEditBoxImpl-ios.h in Headers */, + EDC78D1B21CA19FC00E1863C /* TriggerObj.h in Headers */, 50ABBE681925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, - B665E2AD1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */, - 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */, 50864CC81C7BC1B100B3BAB1 /* cpRatchetJoint.h in Headers */, 50864C9E1C7BC1B000B3BAB1 /* cpArbiter.h in Headers */, + 46BD387B21D35A4A002BD50F /* BlendStateMTL.h in Headers */, 8525E3A31B291E42008EE815 /* clipper.hpp in Headers */, - B665E2411AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */, 50864C8F1C7BC1B000B3BAB1 /* chipmunk_ffi.h in Headers */, - 5020A1C61D49912500E80C72 /* PathAttachment.h in Headers */, + EDC78D1D21CA19FC00E1863C /* CocoLoader.h in Headers */, + EDC78D2521CA19FC00E1863C /* LocalizationManager.h in Headers */, + EDC78CEB21CA19FC00E1863C /* Particle3DReader.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, B6DD2FCA1B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */, - 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, - 5020A2021D49912500E80C72 /* SkeletonRenderer.h in Headers */, - B665E2DD1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */, - 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, 50693C611B6BF2AE005C5820 /* CCDownloader.h in Headers */, - 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, + 46BD387E21D35A54002BD50F /* CommandBufferMTL.h in Headers */, + EDE6457621F017220063F6E4 /* ProgramState.h in Headers */, 5034CA42191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, - 1A5701C4180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, - 15AE193F19AAD35100C27E9E /* CCBatchNode.h in Headers */, - B665E37D1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */, - B665E25D1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */, - B665E39D1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */, - 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */, - 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */, - B665E2E11AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */, + ED28C230219E629B0078D854 /* Backend.h in Headers */, 52B47A2E1A5349A3004E4C60 /* HttpAsynConnection-apple.h in Headers */, 15AE1BBC19AADFF000C27E9E /* HttpResponse.h in Headers */, - 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */, 50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */, - 15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */, - 5020A1901D49912500E80C72 /* BoundingBoxAttachment.h in Headers */, - 5020A16C1D49912500E80C72 /* AtlasAttachmentLoader.h in Headers */, 50ABBE9E1925AB6F00A911A9 /* CCRefPtr.h in Headers */, + EDC78D1521CA19FC00E1863C /* CCDatas.h in Headers */, + 4631CB1821AFD9F90000D408 /* UIVideoPlayer.h in Headers */, BA6249A91E77D2850096291C /* tinydir.h in Headers */, - 15AE18DA19AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, - 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */, - 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, - B665E2011AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */, B6DD2FEC1B04825B00E47F5F /* DetourProximityGrid.h in Headers */, + EDC78D1721CA19FC00E1863C /* CCComExtensionData.h in Headers */, + 46BD388421D35A68002BD50F /* RenderPipelineMTL.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, - 5020A1B41D49912500E80C72 /* IkConstraintData.h in Headers */, + 4631CB5E21AFD9F90000D408 /* UITextField+CCUITextInput.h in Headers */, 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */, - 5020A1BA1D49912500E80C72 /* Json.h in Headers */, + EDC78CAB21CA19FC00E1863C /* TabControlReader.h in Headers */, 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 50864CE01C7BC1B100B3BAB1 /* cpTransform.h in Headers */, - 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, - 5020A1601D49912500E80C72 /* AnimationStateData.h in Headers */, 50ABBECE1925AB6F00A911A9 /* s3tc.h in Headers */, + 46BD388221D35A62002BD50F /* DeviceMTL.h in Headers */, 50643BE519BFCF1800EF68ED /* CCPlatformMacros.h in Headers */, - 15AE1BFA19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, - 15AE182F19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, - 15AE1BAA19AADFDF00C27E9E /* UIVBox.h in Headers */, 3EACC9A719F5014D00EB3C5E /* CCLight.h in Headers */, - 5E9F61291A3FFE3D0038DE01 /* CCFrustum.h in Headers */, - B665E3A11AA80A6500DDB1C5 /* CCPUPositionEmitter.h in Headers */, - 15AE194E19AAD35100C27E9E /* CCDataReaderHelper.h in Headers */, - B665E2691AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */, - 85505F091B60E3C1003F2CD4 /* CCSkinNode.h in Headers */, - D0FD03561A3B51AA00825BB5 /* CCAllocatorMacros.h in Headers */, - B665E42D1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */, - 1A5701CE180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */, - B665E4211AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */, + EDC78C9D21CA19FC00E1863C /* Node3DReader.h in Headers */, + ED28C22A219E629B0078D854 /* Device.h in Headers */, 501216911AC47380009A4BEA /* CCRenderState.h in Headers */, + ED28C254219E629C0078D854 /* VertexLayout.h in Headers */, + 4631CBE821AFD9FA0000D408 /* UILayout.h in Headers */, 1A40D1191E8E56C7002E363A /* en.h in Headers */, - 46BDE4E91FA87D5D00104C05 /* dll.h in Headers */, 1A5701E1180BCB8C0088DEC7 /* CCLayer.h in Headers */, - B665E3691AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h in Headers */, - 15AE1BEE19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, + 46F9B74521B0CB44009DF858 /* UIWebView-inl.h in Headers */, 1A5701E5180BCB8C0088DEC7 /* CCScene.h in Headers */, + 40FE106921F073BF0061C04F /* CCControlExtensions.h in Headers */, + EDC78CAD21CA19FC00E1863C /* CSTabControl_generated.h in Headers */, + 4631CB1C21AFD9F90000D408 /* UILayoutComponent.h in Headers */, 1A5701E9180BCB8C0088DEC7 /* CCTransition.h in Headers */, - 15AE198F19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, - B5CE6DC11B3BF2B1002B0419 /* UIAbstractCheckButton.h in Headers */, - B665E3911AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */, B6DD2FAE1B04825B00E47F5F /* DetourDebugDraw.h in Headers */, - 18956BB51A9DFBFD006E9155 /* Particle3DReader.h in Headers */, + EDC78C0521CA19FB00E1863C /* CCSkeletonNode.h in Headers */, + EDAF7C7021F1797000E070B2 /* CCTextureUtils.h in Headers */, + EDC78C7F21CA19FC00E1863C /* ProjectNodeReader.h in Headers */, B6DD2FD81B04825B00E47F5F /* DetourCrowd.h in Headers */, - B665E3F91AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */, - B665E2551AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */, 50ABBED41925AB6F00A911A9 /* uthash.h in Headers */, - B665E3AD1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */, 468A14F91EF223B700ECA675 /* idl.h in Headers */, 1A40D15B1E8E56C7002E363A /* ostreamwrapper.h in Headers */, 1A5701ED180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, + 40FE107021F073BF0061C04F /* CCControlStepper.h in Headers */, 1A5701F1180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, + ED28C246219E629C0078D854 /* BlendState.h in Headers */, 1A5701FA180BCBAD0088DEC7 /* CCMenu.h in Headers */, - 15AE18BA19AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, + ED28C250219E629C0078D854 /* Texture.h in Headers */, 1A5701FE180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, 50ABC00C1926664800A911A9 /* CCDevice.h in Headers */, 50864C9B1C7BC1B000B3BAB1 /* cpCompat62.h in Headers */, - 5020A1A21D49912500E80C72 /* EventData.h in Headers */, 1A40D1131E8E56C7002E363A /* encodedstream.h in Headers */, 1A570205180BCBD40088DEC7 /* CCClippingNode.h in Headers */, - 15AE1B8919AADA9A00C27E9E /* UICheckBox.h in Headers */, 5034CA34191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, - B665E40D1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */, - 15AE197C19AAD35700C27E9E /* CCFrame.h in Headers */, - B665E31D1AA80A6500DDB1C5 /* CCPUOnClearObserver.h in Headers */, - 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */, - B665E3A51AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.h in Headers */, - B68779071A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */, - B665E2651AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */, + ED28C228219E629B0078D854 /* RenderPipelineDescriptor.h in Headers */, 15FB208A1AE7C57D00C31518 /* shapes.h in Headers */, + 4631CB5821AFD9F90000D408 /* UITextView+CCUITextInput.h in Headers */, 50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */, 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, - B665E2211AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */, - 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, + EDC78BF721CA19FB00E1863C /* CCInputDelegate.h in Headers */, B6DD2FAA1B04825B00E47F5F /* DebugDraw.h in Headers */, - 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, - 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, - B6CAAFE51AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, 50864C8C1C7BC1B000B3BAB1 /* chipmunk.h in Headers */, - 382384241A2590DA002C4610 /* GameMapReader.h in Headers */, B6DD2FDC1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */, - B665E2391AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */, - 15B3708B19EE414C00ABE682 /* Manifest.h in Headers */, 15FB209A1AE7C57D00C31518 /* sweep.h in Headers */, 1A570213180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, - 38F526431A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */, - 5020A21A1D49912500E80C72 /* spine-cocos2dx.h in Headers */, 1A570217180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, - B603F1AB1AC8EA0900A9579C /* CCTerrain.h in Headers */, 1A40D1641E8E56C7002E363A /* rapidjson.h in Headers */, - 15AE198719AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, - B665E3ED1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */, - 15AE198619AAD36400C27E9E /* WidgetReader.h in Headers */, 1A570224180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, 15FB20961AE7C57D00C31518 /* cdt.h in Headers */, - B677B0CC1B18492D006762CB /* CCNavMesh.h in Headers */, - B665E2811AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */, - 15AE196819AAD35100C27E9E /* CCUtilMath.h in Headers */, 503DD8F61926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, - B6CAAFED1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */, 1A570228180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, 50864CA41C7BC1B000B3BAB1 /* cpBody.h in Headers */, + 4631CBCC21AFD9FA0000D408 /* UIPageViewIndicator.h in Headers */, 1A40D1491E8E56C7002E363A /* swap.h in Headers */, - B665E4391AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */, 1A57022C180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, - B665E4291AA80A6600DDB1C5 /* CCPUUtil.h in Headers */, - 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, + EDC78C3521CA19FB00E1863C /* CCBatchNode.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 1A40D11C1E8E56C7002E363A /* error.h in Headers */, - 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, - 2980F0261BA9A5550059E678 /* CCUISingleLineTextField.h in Headers */, - 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, - 15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */, 50864CA11C7BC1B000B3BAB1 /* cpBB.h in Headers */, - 15AE192A19AAD35100C27E9E /* TriggerMng.h in Headers */, 5034CA2C191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, 50ABBE981925AB6F00A911A9 /* CCProtocols.h in Headers */, 50CB247A19D9C5A100687767 /* AudioEngine-inl.h in Headers */, 52B47A321A5349A3004E4C60 /* HttpCookie.h in Headers */, 50ABBD431925AB0000A911A9 /* CCMathBase.h in Headers */, 15EFA214198A2BB5000C57D3 /* CCProtectedNode.h in Headers */, - 15AE194419AAD35100C27E9E /* CCComBase.h in Headers */, - 15AE195619AAD35100C27E9E /* CCDisplayManager.h in Headers */, - 15AE1B8719AADA9A00C27E9E /* UIButton.h in Headers */, - 46BDE4EB1FA87D6100104C05 /* PointAttachment.h in Headers */, - 38F526411A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */, 50ABBE441925AB6F00A911A9 /* CCDirector.h in Headers */, + EDC78C8121CA19FC00E1863C /* GameNode3DReader.h in Headers */, + 46E21B4A21B900C900430A43 /* StringUtils.h in Headers */, 5034CA4A191D591100CE6051 /* ccShader_Label_df.frag in Headers */, - B665E2591AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */, - B665E1F91AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */, 50864CA71C7BC1B000B3BAB1 /* cpConstraint.h in Headers */, - 2980F0221BA9A5550059E678 /* CCUIEditBoxIOS.h in Headers */, - B665E2351AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */, - 15AE1B7519AADA9A00C27E9E /* UILoadingBar.h in Headers */, - 15AE1BF219AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */, - 15AE1BEB19AAE01E00C27E9E /* CCControlButton.h in Headers */, - B665E35D1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */, 1A570281180BCC900088DEC7 /* CCSprite.h in Headers */, B6DD2FD21B04825B00E47F5F /* DetourNode.h in Headers */, 1A570285180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, - 15AE193B19AAD35100C27E9E /* CCArmatureDataManager.h in Headers */, 1A570289180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, - 15AE1B7F19AADA9A00C27E9E /* UIText.h in Headers */, - B6CAAFF91AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */, + EDC78C5D21CA19FC00E1863C /* CCTween.h in Headers */, 50864CB31C7BC1B000B3BAB1 /* cpGrooveJoint.h in Headers */, - B665E3D51AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */, 50ABBE701925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, - 15AE18B619AAD33D00C27E9E /* CCBSequence.h in Headers */, 1A57028D180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, 1A570295180BCCAB0088DEC7 /* CCAnimation.h in Headers */, - B665E2D11AA80A6500DDB1C5 /* CCPUInterParticleCollider.h in Headers */, 50ABBDB81925AB4100A911A9 /* CCTexture2D.h in Headers */, - 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 50ABBE341925AB6F00A911A9 /* CCConfiguration.h in Headers */, - B68778FF1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */, + ED28C23C219E629B0078D854 /* RenderPassDescriptor.h in Headers */, 1A570299180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, - B665E2B11AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */, + ED150A9521E631DA00EFE7F7 /* ProgramCache.h in Headers */, 50864CC21C7BC1B100B3BAB1 /* cpPolyline.h in Headers */, 50ABBEAA1925AB6F00A911A9 /* CCTouch.h in Headers */, - 15AE1BAE19AADFDF00C27E9E /* UILayoutParameter.h in Headers */, - 15AE18C819AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, - 85505F051B60E3B2003F2CD4 /* CCBoneNode.h in Headers */, - B665E2491AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */, - 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 50864C951C7BC1B000B3BAB1 /* chipmunk_types.h in Headers */, - 2980F02B1BA9A5550059E678 /* UITextView+CCUITextInput.h in Headers */, 50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, - D0FD03581A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */, 1A40D13D1E8E56C7002E363A /* regex.h in Headers */, + EDC78BFD21CA19FB00E1863C /* CCActionManagerEx.h in Headers */, 1A5702CB180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, - 15AE195E19AAD35100C27E9E /* CCSkin.h in Headers */, B6DD2FE01B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */, 1A5702F1180BCE750088DEC7 /* CCTMXLayer.h in Headers */, 15FB20771AE7BF8600C31518 /* CCAutoPolygon.h in Headers */, - 15AE18AE19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, - 15AE197819AAD35700C27E9E /* CCActionTimeline.h in Headers */, - B6CAAFF11AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */, 5034CA44191D591100CE6051 /* ccShader_Label.vert in Headers */, 1A5702F5180BCE750088DEC7 /* CCTMXObjectGroup.h in Headers */, + 4631CB9E21AFD9FA0000D408 /* UIScrollView.h in Headers */, 1A5702F9180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */, - 15B3707F19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */, 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */, - 507003241B69735300E83DDD /* HttpConnection-winrt.h in Headers */, + 4631CBC621AFD9FA0000D408 /* UIImageView.h in Headers */, + 461FE08521C34EEB00E5378F /* CCEnumClass.h in Headers */, 1A5702FD180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, - B665E3B11AA80A6500DDB1C5 /* CCPURender.h in Headers */, - B665E3951AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h in Headers */, - 15AE1B8D19AADA9A00C27E9E /* UIScale9Sprite.h in Headers */, - 15AE18AC19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, - 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A570303180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE2A1925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, - B6CAAFFD1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */, + 4631CBA021AFD9FA0000D408 /* UIRelativeBox.h in Headers */, 501216971AC47393009A4BEA /* CCPass.h in Headers */, 1A57030F180BCF190088DEC7 /* CCComponent.h in Headers */, - B665E22D1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */, - 85505F071B60E3BA003F2CD4 /* CCSkeletonNode.h in Headers */, - 15AE18B019AAD33D00C27E9E /* CCBKeyframe.h in Headers */, - 15AE18C419AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, - B665E3511AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */, 1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */, A045F6D91BA81577005076C7 /* CCTextureCube.h in Headers */, - B665E2F51AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */, 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, - B665E3751AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */, - 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, - 5020A1C01D49912500E80C72 /* MeshAttachment.h in Headers */, - B5668D801B3838E4003CBD5E /* UIScrollViewBar.h in Headers */, - 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, - 5020A15A1D49912500E80C72 /* AnimationState.h in Headers */, - D0FD035C1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */, - 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */, - 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */, + 4631CBD621AFD9FA0000D408 /* UIButton.h in Headers */, + EDC78C2521CA19FB00E1863C /* CCSkinNode.h in Headers */, + EDC78C0721CA19FB00E1863C /* CCFrame.h in Headers */, 1A57034E180BD09B0088DEC7 /* tinyxml2.h in Headers */, - 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, 1A570357180BD0B00088DEC7 /* ioapi.h in Headers */, + EDC78C0B21CA19FB00E1863C /* CCActionTimeline.h in Headers */, + EDC78C9721CA19FC00E1863C /* SpriteReader.h in Headers */, 50ABBD4B1925AB0000A911A9 /* Mat4.h in Headers */, - B665E3891AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h in Headers */, + EDC78C2F21CA19FB00E1863C /* CCTransformHelp.h in Headers */, + 4631CB5021AFD9F90000D408 /* CCUIMultilineTextField.h in Headers */, + EDC78C0121CA19FB00E1863C /* CCTimelineMacro.h in Headers */, + EDC78CF921CA19FC00E1863C /* ScrollViewReader.h in Headers */, 1A40D1431E8E56C7002E363A /* strfunc.h in Headers */, - B6CAB0011AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */, 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */, - B665E3351AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */, - 46BDE4DF1FA87D4D00104C05 /* ClippingAttachment.h in Headers */, - B665E3811AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */, B6DD2FBA1B04825B00E47F5F /* DetourAlloc.h in Headers */, - B665E2151AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */, - 1A01C69B18F57BE800EFE3A6 /* CCSet.h in Headers */, 294D7D971D0E67B4002CE7B7 /* CCDevice-apple.h in Headers */, - B665E4051AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.h in Headers */, 50864CBC1C7BC1B000B3BAB1 /* cpPinJoint.h in Headers */, - 46BDE4F11FA87D6F00104C05 /* Triangulator.h in Headers */, 50ABBED61925AB6F00A911A9 /* utlist.h in Headers */, + EDC78D0F21CA19FC00E1863C /* CCArmature.h in Headers */, 1A57035B180BD0B00088DEC7 /* unzip.h in Headers */, - 15AE1BA619AADFDF00C27E9E /* UIHBox.h in Headers */, 505385031B01887A00793096 /* CCProperties.h in Headers */, 5034CA48191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, - 5020A1841D49912500E80C72 /* Bone.h in Headers */, - 15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, 50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */, 1A40D1611E8E56C7002E363A /* prettywriter.h in Headers */, + EDC78C5721CA19FB00E1863C /* CCArmatureAnimation.h in Headers */, 5012169D1AC473A3009A4BEA /* CCTechnique.h in Headers */, - 15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */, - 46BDE4EF1FA87D6B00104C05 /* SkeletonTwoColorBatch.h in Headers */, - 503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */, - B665E41D1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */, - B665E34D1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */, - 5020A20E1D49912500E80C72 /* Slot.h in Headers */, 50ABBE6C1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, + 46F9B74721B0CB44009DF858 /* UIWebViewImpl-ios.h in Headers */, + EDC78C8721CA19FC00E1863C /* ListViewReader.h in Headers */, 5034CA3E191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, - 182C5CD91A98F30500C30D34 /* Sprite3DReader.h in Headers */, 50ABBE301925AB6F00A911A9 /* ccConfig.h in Headers */, B6DD2FE41B04825B00E47F5F /* DetourPathCorridor.h in Headers */, - 15AE195819AAD35100C27E9E /* CCInputDelegate.h in Headers */, - 5020A1541D49912500E80C72 /* Animation.h in Headers */, + EDC78CF521CA19FC00E1863C /* BoneNodeReader.h in Headers */, + EDC78D0121CA19FC00E1863C /* NodeReaderProtocol.h in Headers */, + 4631CB8821AFD9F90000D408 /* UIWidget.h in Headers */, B6DD2FB61B04825B00E47F5F /* RecastDump.h in Headers */, + 40FE105E21F073BF0061C04F /* CCControlHuePicker.h in Headers */, 50ABBDAC1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, - B665E3CD1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */, - 503341A01D9DC7B400770EC7 /* SkeletonBinary.h in Headers */, - B665E3711AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h in Headers */, + ED28C24A219E629C0078D854 /* Macros.h in Headers */, 5034CA3C191D591100CE6051 /* ccShader_PositionColor.vert in Headers */, - B665E3F51AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */, + 4631CBB421AFD9FA0000D408 /* UIVBox.h in Headers */, 50ABC0181926664800A911A9 /* CCImage.h in Headers */, - B665E2B91AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */, - 382384471A25915C002C4610 /* SpriteReader.h in Headers */, 1A40D14F1E8E56C7002E363A /* memorybuffer.h in Headers */, + ED150A9821E6320100EFE7F7 /* Program.h in Headers */, 50ABBE8E1925AB6F00A911A9 /* CCNS.h in Headers */, - B665E3051AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */, - B665E23D1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */, - 5020A1781D49912500E80C72 /* AttachmentLoader.h in Headers */, + 4631CBEC21AFD9FA0000D408 /* CocosGUI.h in Headers */, + EDC78CEF21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */, + 46F9B73121AFE7C0009DF858 /* CCScrollView.h in Headers */, 50ABBEA61925AB6F00A911A9 /* CCScriptSupport.h in Headers */, + 461FE09321CA129B00E5378F /* CCCallbackCommand.h in Headers */, + 46AF3A1E21F1877100D5AFCD /* CCPhysicsShape.h in Headers */, 46C02E0A18E91123004B7456 /* xxhash.h in Headers */, + ED28C226219E629B0078D854 /* DepthStencilState.h in Headers */, 5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */, 1A40D1671E8E56C7002E363A /* reader.h in Headers */, - B665E4091AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */, + EDC78D2D21CA19FC00E1863C /* CCSSceneReader.h in Headers */, 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, - B665E3591AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, - 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */, - 5020A21D1D49912500E80C72 /* spine.h in Headers */, B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */, + 4631CBBC21AFD9FA0000D408 /* UIText.h in Headers */, 3E6176771960F89B00DE83F5 /* CCEventListenerController.h in Headers */, - 50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */, - 15AE18CA19AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, + 4631CBAA21AFD9FA0000D408 /* UIHelper.h in Headers */, 50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */, + EDC78D1321CA19FC00E1863C /* CCArmatureDataManager.h in Headers */, 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */, + 4631CBBA21AFD9FA0000D408 /* GUIExport.h in Headers */, + EDC78BF921CA19FB00E1863C /* CCDecorativeDisplay.h in Headers */, 291901441B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */, + 4631CBDA21AFD9FA0000D408 /* UIAbstractCheckButton.h in Headers */, 3E6176691960F89B00DE83F5 /* CCController.h in Headers */, - 503D4F6F1CE2BDBE0054A2D1 /* CCVRDistortion.h in Headers */, - 3823841D1A2590D2002C4610 /* ComAudioReader.h in Headers */, 3E6176781960F89B00DE83F5 /* CCGameController.h in Headers */, - 15AE19BB19AAD39700C27E9E /* TextReader.h in Headers */, 50ABBE641925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */, - 15AE180B19AAD2F700C27E9E /* CCAABB.h in Headers */, 50ABBD921925AB4100A911A9 /* CCGLProgramCache.h in Headers */, + 4631CBF221AFD9FA0000D408 /* UIHBox.h in Headers */, 50864CCB1C7BC1B100B3BAB1 /* cpRobust.h in Headers */, 50ABBE961925AB6F00A911A9 /* CCProfiling.h in Headers */, - 15AE19B519AAD39700C27E9E /* TextAtlasReader.h in Headers */, - 15AE18D619AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, - 15AE182B19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, - B665E2251AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */, - 46BDE4ED1FA87D6600104C05 /* SkeletonClipping.h in Headers */, - B665E3651AA80A6500DDB1C5 /* CCPUOnTimeObserver.h in Headers */, - 15AE1B7D19AADA9A00C27E9E /* UISlider.h in Headers */, + EDC78D2F21CA19FC00E1863C /* CCSGUIReader.h in Headers */, 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */, - B665E4111AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */, - 15AE1B8319AADA9A00C27E9E /* UITextBMFont.h in Headers */, 50ABBD8E1925AB4100A911A9 /* CCGLProgram.h in Headers */, + ED28C248219E629C0078D854 /* Buffer.h in Headers */, 1A40D1101E8E56C7002E363A /* document.h in Headers */, - 38B8E2D819E66581002D7CE7 /* CSLoader.h in Headers */, 50ABC0081926664800A911A9 /* CCApplicationProtocol.h in Headers */, 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */, 1A41ABC71DF00D1500B5584C /* AudioDecoder.h in Headers */, 1A40D1701E8E56C7002E363A /* stringbuffer.h in Headers */, - D0FD03601A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */, - 5020A18A1D49912500E80C72 /* BoneData.h in Headers */, - 15AE198019AAD35700C27E9E /* CCTimeLine.h in Headers */, - 38B8E2E419E671D2002D7CE7 /* UILayoutComponent.h in Headers */, - 50F965581CD0360000ADE813 /* CCVRProtocol.h in Headers */, - B665E2CD1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */, + ED150A9E21E635AB00EFE7F7 /* ProgramMTL.h in Headers */, 50ABBD4F1925AB0000A911A9 /* MathUtil.h in Headers */, - 1A01C69718F57BE800EFE3A6 /* CCInteger.h in Headers */, 1A40D0E01E8E4C76002E363A /* md5.h in Headers */, - B6D38B8D1AC3AFAC00043997 /* CCSkybox.h in Headers */, - 15AE1C0619AAE01E00C27E9E /* CCTableViewCell.h in Headers */, - B665E4251AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */, - 15AE19AB19AAD39700C27E9E /* ListViewReader.h in Headers */, 5053850F1B02819E00793096 /* CCVertexAttribBinding.h in Headers */, 50ABBEBE1925AB6F00A911A9 /* ccUtils.h in Headers */, - 15AE183719AAD2F700C27E9E /* CCObjLoader.h in Headers */, - 15AE18CF19AAD33D00C27E9E /* CCNodeLoader.h in Headers */, 50ABBE801925AB6F00A911A9 /* CCEventTouch.h in Headers */, - B665E1FD1AA80A6500DDB1C5 /* CCPUAffectorTranslator.h in Headers */, + ED28C224219E629B0078D854 /* RenderPipeline.h in Headers */, + EDC78C3D21CA19FB00E1863C /* FlatBuffersSerialize.h in Headers */, + EDC78BF321CA19FB00E1863C /* CCArmatureDefine.h in Headers */, 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */, - B665E3BD1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, - 5033419A1D9DC7B400770EC7 /* kvec.h in Headers */, 50ABBDBC1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, B6DD2FC01B04825B00E47F5F /* DetourCommon.h in Headers */, - B6CAAFE91AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */, - 15AE182319AAD2F700C27E9E /* CCBundleReader.h in Headers */, - 182C5CB51A95964F00C30D34 /* Node3DReader.h in Headers */, 50ABBE541925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, 1A12775A18DFCC4F0005F345 /* CCTweenFunction.h in Headers */, - 15AE192819AAD35100C27E9E /* TriggerBase.h in Headers */, - B665E3F11AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */, - 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, - B665E26D1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h in Headers */, + EDC78CE721CA19FC00E1863C /* ParticleReader.h in Headers */, + 4631CB4021AFD9F90000D408 /* UIEditBoxImpl-mac.h in Headers */, 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */, - 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, - 503D4F671CE29D4E0054A2D1 /* CCVRDistortionMesh.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, + 4631CB7A21AFD9F90000D408 /* UIEditBoxImpl-common.h in Headers */, + 46BD388621D35A68002BD50F /* ShaderModuleMTL.h in Headers */, 50ABBD5F1925AB0000A911A9 /* Vec3.h in Headers */, + 4631CB2E21AFD9F90000D408 /* UIScrollViewBar.h in Headers */, 50ABBE821925AB6F00A911A9 /* CCEventType.h in Headers */, - 15AE194C19AAD35100C27E9E /* CCComRender.h in Headers */, - B665E2C11AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */, - 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */, 50CB247619D9C5A100687767 /* AudioCache.h in Headers */, - 15AE194119AAD35100C27E9E /* CCBone.h in Headers */, - D0FD035A1A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */, 50ABBD471925AB0000A911A9 /* CCVertex.h in Headers */, 50864CB01C7BC1B000B3BAB1 /* cpGearJoint.h in Headers */, - 5020A1961D49912500E80C72 /* Cocos2dAttachmentLoader.h in Headers */, - B665E3251AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */, - B68779031A8CA82E00643ABF /* CCParticle3DRender.h in Headers */, + EDC78C9321CA19FC00E1863C /* LoadingBarReader.h in Headers */, B6DD2FF01B04825B00E47F5F /* DetourTileCache.h in Headers */, - 15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */, - 15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */, - 382384041A259005002C4610 /* CSParseBinary_generated.h in Headers */, - 15AE195419AAD35100C27E9E /* CCDisplayFactory.h in Headers */, - 1A9DCA2A180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, - 1A01C69F18F57BE800EFE3A6 /* CCString.h in Headers */, + 46AF3A1C21F1877100D5AFCD /* cpCompat62.h in Headers */, 464AD6E8197EBB1400E502D8 /* pvr.h in Headers */, - 15AE194819AAD35100C27E9E /* CCComAudio.h in Headers */, - 1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */, - B665E3211AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */, 5034CA36191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, + EDC78C7921CA19FC00E1863C /* CSArmatureNode_generated.h in Headers */, 1A40D1371E8E56C7002E363A /* meta.h in Headers */, B24AA98C195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, + 46BD388821D35A68002BD50F /* TextureMTL.h in Headers */, 50864CDA1C7BC1B100B3BAB1 /* cpSpace.h in Headers */, + 46F9B74121B0CB44009DF858 /* UIWebView.h in Headers */, + EDC78D2721CA19FC00E1863C /* CCActionObject.h in Headers */, + 4631CBAC21AFD9FA0000D408 /* UICheckBox.h in Headers */, 50ABBEAE1925AB6F00A911A9 /* ccTypes.h in Headers */, 1A40D1341E8E56C7002E363A /* itoa.h in Headers */, - 15AE185819AAD31200C27E9E /* CDAudioManager.h in Headers */, - 0C261F2B1BE7528900707478 /* Light3DReader.h in Headers */, + EDC78C2B21CA19FB00E1863C /* CocosStudioExtension.h in Headers */, + EDC78C1B21CA19FB00E1863C /* CSLoader.h in Headers */, 50864C981C7BC1B000B3BAB1 /* chipmunk_unsafe.h in Headers */, - B665E38D1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */, - 15AE1BF819AAE01E00C27E9E /* CCControlStepper.h in Headers */, 50ABBE261925AB6F00A911A9 /* base64.h in Headers */, - 15AE1C1619AAE2C700C27E9E /* CCPhysicsDebugNode.h in Headers */, - 15AE1BF619AAE01E00C27E9E /* CCControlSlider.h in Headers */, - B665E2091AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */, - 1A01C68718F57BE800EFE3A6 /* CCArray.h in Headers */, - B665E3DD1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */, - 1A01C6A718F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, 50ABBEDA1925AB6F00A911A9 /* ZipUtils.h in Headers */, 50ABBDC01925AB4100A911A9 /* CCTextureCache.h in Headers */, B276EF641988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, - B665E2F11AA80A6500DDB1C5 /* CCPULineEmitter.h in Headers */, + 4631CBAE21AFD9FA0000D408 /* GUIDefine.h in Headers */, 1A40D11F1E8E56C7002E363A /* filereadstream.h in Headers */, ED9C6A9718599AD8000A5232 /* CCNodeGrid.h in Headers */, - 50ABC0201926664800A911A9 /* CCThread.h in Headers */, - 15AE1B8519AADA9A00C27E9E /* UITextField.h in Headers */, - 1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */, - B665E2511AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */, + EDC78C5121CA19FB00E1863C /* CCBone.h in Headers */, + EDC78C6521CA19FC00E1863C /* CSParse3DBinary_generated.h in Headers */, 15AE184B19AAD30500C27E9E /* Export.h in Headers */, - 46BDE4E71FA87D5A00104C05 /* Color.h in Headers */, - 15AE196019AAD35100C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 50ABBE221925AB6F00A911A9 /* atitc.h in Headers */, - B665E3E11AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */, - B665E3451AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */, - 15AE193319AAD35100C27E9E /* CCActionNode.h in Headers */, - B6CAAFF51AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */, - 85505F0E1B60E3DB003F2CD4 /* SkeletonNodeReader.h in Headers */, + EDC78C5521CA19FB00E1863C /* CocosStudioExport.h in Headers */, 50ABBED21925AB6F00A911A9 /* TGAlib.h in Headers */, - B665E2951AA80A6500DDB1C5 /* CCPUEmitter.h in Headers */, - B5A738991BB0051F00BAAEF8 /* UIPageViewIndicator.h in Headers */, - 15AE1BED19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, - 15AE195019AAD35100C27E9E /* CCDatas.h in Headers */, - 50864CEB1C7BC90A00B3BAB1 /* cpCompat62.h in Headers */, - 15AE18B319AAD33D00C27E9E /* CCBReader.h in Headers */, - 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, - 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, - B665E3551AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */, - B677B0D01B18492D006762CB /* CCNavMeshAgent.h in Headers */, - B665E3C91AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */, - B665E3FD1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */, - B68778FB1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */, - B665E3B51AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */, + EDC78D2321CA19FC00E1863C /* CCColliderDetector.h in Headers */, 501216A31AC473AD009A4BEA /* CCMaterial.h in Headers */, - B665E20D1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h in Headers */, + EDC78D2921CA19FC00E1863C /* TriggerBase.h in Headers */, + 40FE106221F073BF0061C04F /* CCControlUtils.h in Headers */, + EDE6457821F017220063F6E4 /* ShaderCache.h in Headers */, 1A40D12B1E8E56C7002E363A /* diyfp.h in Headers */, 50864CD71C7BC1B100B3BAB1 /* cpSlideJoint.h in Headers */, - 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, - B665E2E91AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */, - 382384321A259112002C4610 /* ParticleReader.h in Headers */, - 5020A1AE1D49912500E80C72 /* IkConstraint.h in Headers */, - B665E28D1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */, - 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */, - B665E3191AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */, + 40FE107421F073BF0061C04F /* CCControlSwitch.h in Headers */, + 4631CB4C21AFD9F90000D408 /* CCUIEditBoxIOS.h in Headers */, + 46BD387C21D35A4E002BD50F /* BufferMTL.h in Headers */, 50ABBE581925AB6F00A911A9 /* CCEventFocus.h in Headers */, - 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, - 46BDE4F31FA87D7400104C05 /* VertexEffect.h in Headers */, - B665E2991AA80A6500DDB1C5 /* CCPUEmitterManager.h in Headers */, - 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */, - 15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 50ABC00A1926664800A911A9 /* CCCommon.h in Headers */, + 46AF3A1A21F1877100D5AFCD /* CCPhysicsBody.h in Headers */, + 4631CBDE21AFD9FA0000D408 /* UILayoutParameter.h in Headers */, + 40FE107321F073BF0061C04F /* CCControlPotentiometer.h in Headers */, A045F6DF1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */, - 15AE19AD19AAD39700C27E9E /* LoadingBarReader.h in Headers */, 15FB209E1AE7C57D00C31518 /* sweep_context.h in Headers */, + EDC78CD721CA19FC00E1863C /* Sprite3DReader.h in Headers */, 50ABBE5C1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, + EDC78CA521CA19FC00E1863C /* ButtonReader.h in Headers */, 1A2B22B51E6E5828001D5EC9 /* Uri.h in Headers */, - B665E2191AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */, - 5E9F612D1A3FFE3D0038DE01 /* CCPlane.h in Headers */, - 5020A1E41D49912500E80C72 /* SkeletonAnimation.h in Headers */, - B665E3391AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */, - B665E4151AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */, + 46AF3A1621F1877100D5AFCD /* CCPhysicsWorld.h in Headers */, + EDC78BDB21CA19FB00E1863C /* CCProcessBase.h in Headers */, 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, 1A5FB7C51DF012D900C918C1 /* AudioMacros.h in Headers */, + EDC78BE321CA19FB00E1863C /* CCDataReaderHelper.h in Headers */, 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */, - 38ACD1FF1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */, 50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */, - 15AE1BE919AAE01E00C27E9E /* CCControl.h in Headers */, - 15AE193719AAD35100C27E9E /* CCArmature.h in Headers */, + EDC78C4F21CA19FB00E1863C /* CCSpriteFrameCacheHelper.h in Headers */, + 40FE107221F073BF0061C04F /* CCControlSaturationBrightnessPicker.h in Headers */, + EDC78C6721CA19FC00E1863C /* DictionaryHelper.h in Headers */, B63990CF1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */, - 15AE1BC319AADFFB00C27E9E /* cocos-ext.h in Headers */, 50864CD41C7BC1B100B3BAB1 /* cpSimpleMotor.h in Headers */, - 5020A17E1D49912500E80C72 /* AttachmentVertices.h in Headers */, - 15AE1B8B19AADA9A00C27E9E /* UIImageView.h in Headers */, - B665E2291AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */, 50ABBE601925AB6F00A911A9 /* CCEventListener.h in Headers */, - 4D76BE3D1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */, 50ABBEB21925AB6F00A911A9 /* CCUserDefault.h in Headers */, - 15AE198B19AAD36A00C27E9E /* ButtonReader.h in Headers */, A0534A6B1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -11558,7 +7318,7 @@ 1551A336158F2AB200E66CFE /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = ""; }; buildConfigurationList = 1551A339158F2AB200E66CFE /* Build configuration list for PBXProject "cocos2d_libs" */; @@ -11586,668 +7346,393 @@ buildActionMask = 2147483647; files = ( 50ABBE2B1925AB6F00A911A9 /* ccCArray.cpp in Sources */, - B6CAAFEA1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */, - 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, - B665E2F21AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */, - 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, - 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */, - 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 1A1645B0191B726C008C7C7F /* ConvertUTF.c in Sources */, - 15AE1BE219AAE01E00C27E9E /* CCScrollView.cpp in Sources */, + 46D3D48A21E6E8F700EF5E75 /* SimpleAudioEngine.cpp in Sources */, + 40FE104921F070640061C04F /* CCControlColourPicker.cpp in Sources */, 50ABBD581925AB0000A911A9 /* Vec2.cpp in Sources */, - 15AE18E119AAD35000C27E9E /* TriggerMng.cpp in Sources */, + EDC78BE421CA19FB00E1863C /* CCComRender.cpp in Sources */, 50ABBE311925AB6F00A911A9 /* CCConfiguration.cpp in Sources */, - 5020A1BC1D49912500E80C72 /* MeshAttachment.c in Sources */, - B665E3821AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */, - 502AF9781D0711B8006AF256 /* CCVRGenericHeadTracker.cpp in Sources */, - 1A01C6A418F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, - 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, - 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */, - 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */, - 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */, - B665E24A1AA80A6500DDB1C5 /* CCPUColorAffector.cpp in Sources */, - 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, - B665E2461AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */, - B68779041A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */, B6DD2FB71B04825B00E47F5F /* DetourAlloc.cpp in Sources */, + EDC78C8C21CA19FC00E1863C /* UserCameraReader.cpp in Sources */, 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */, 1A40D0DC1E8E4C76002E363A /* md5.c in Sources */, 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */, 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */, - 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */, - B665E3EA1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */, - 46A170EF1807CECA005B8026 /* CCPhysicsWorld.cpp in Sources */, - 15AE18E419AAD35000C27E9E /* CCActionFrame.cpp in Sources */, - B665E21A1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */, - B665E29E1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */, - 15AE18FD19AAD35000C27E9E /* CCComAttribute.cpp in Sources */, - 46A170ED1807CECA005B8026 /* CCPhysicsShape.cpp in Sources */, - B665E1FA1AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp in Sources */, 50ABBE991925AB6F00A911A9 /* CCRef.cpp in Sources */, - 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */, + 4631CB9721AFD9FA0000D408 /* UIPageViewIndicator.cpp in Sources */, ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */, - B665E36A1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */, - B5A738961BB0051F00BAAEF8 /* UIPageViewIndicator.cpp in Sources */, - B665E3961AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */, - 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, - B5CE6DBE1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp in Sources */, - 46A170E61807CECA005B8026 /* CCPhysicsBody.cpp in Sources */, - B665E40A1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */, - B677B0D91B18492D006762CB /* CCNavMeshUtils.cpp in Sources */, - C503066D1B60B583001E6D43 /* CCSkinNode.cpp in Sources */, + EDC78CC621CA19FC00E1863C /* LayoutReader.cpp in Sources */, + EDC78CDA21CA19FC00E1863C /* SliderReader.cpp in Sources */, 50ABBDA71925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, - B665E35E1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */, - B665E24E1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */, - 5020A2101D49912500E80C72 /* SlotData.c in Sources */, - 15AE1B9B19AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, - B665E3E21AA80A6600DDB1C5 /* CCPUSineForceAffector.cpp in Sources */, 50ABBD501925AB0000A911A9 /* Quaternion.cpp in Sources */, - B665E36E1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */, - 15AE190119AAD35000C27E9E /* CCComController.cpp in Sources */, - C5F516191C8216C60013B695 /* TabControlReader.cpp in Sources */, - 15AE1BE619AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, + EDC78C0221CA19FB00E1863C /* CCBoneNode.cpp in Sources */, + EDC78C1821CA19FB00E1863C /* CCActionTimelineCache.cpp in Sources */, 50ABBEBB1925AB6F00A911A9 /* ccUtils.cpp in Sources */, - 15AE186A19AAD31D00C27E9E /* CocosDenshion.m in Sources */, - B665E3C21AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */, - B665E34A1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */, - 15AE198C19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, - B665E4261AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */, - 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */, + EDC78C1421CA19FB00E1863C /* CCActionTimelineNode.cpp in Sources */, 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, 15FB208F1AE7C57D00C31518 /* advancing_front.cc in Sources */, + EDC78CA221CA19FC00E1863C /* ButtonReader.cpp in Sources */, 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */, - B665E2621AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */, - B665E4161AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */, 50FC3F9F1D74C0E5001C936A /* CCController-apple.mm in Sources */, - B665E41E1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */, - 15AE189819AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */, 50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, - 5E9F612A1A3FFE3D0038DE01 /* CCPlane.cpp in Sources */, - 15AE197419AAD35700C27E9E /* CCTimeLine.cpp in Sources */, - B665E4061AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.cpp in Sources */, - B665E30E1AA80A6500DDB1C5 /* CCPUObserver.cpp in Sources */, - 15AE188E19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, - B665E37E1AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp in Sources */, - B665E3061AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */, - 5020A1EC1D49912500E80C72 /* SkeletonBounds.c in Sources */, + EDC78BFA21CA19FB00E1863C /* TriggerObj.cpp in Sources */, + EDC78CB621CA19FC00E1863C /* PageViewReader.cpp in Sources */, 50ABBE8B1925AB6F00A911A9 /* CCNS.cpp in Sources */, - 15AE1BD819AAE01E00C27E9E /* CCControlStepper.cpp in Sources */, - 5020A1DA1D49912500E80C72 /* Skeleton.c in Sources */, - 46A170E81807CECA005B8026 /* CCPhysicsContact.cpp in Sources */, 1A570061180BC5A10088DEC7 /* CCAction.cpp in Sources */, - 15AE1BDC19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, 50ABBEC51925AB6F00A911A9 /* etc1.cpp in Sources */, - 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, - 15AE1B5B19AADA9900C27E9E /* UITextAtlas.cpp in Sources */, - B603F1A81AC8EA0900A9579C /* CCTerrain.cpp in Sources */, - 5020A15C1D49912500E80C72 /* AnimationStateData.c in Sources */, 1A570065180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, - B6CAAFF21AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */, + 4631CB2521AFD9F90000D408 /* UIAbstractCheckButton.cpp in Sources */, 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, - B665E3AE1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */, - 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, - B6CAAFE21AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */, DA8C62A219E52C6400000516 /* ioapi_mem.cpp in Sources */, - B240C5E91B09DFB000137F50 /* CCFrameBuffer.cpp in Sources */, - B68779001A8CA82E00643ABF /* CCParticle3DRender.cpp in Sources */, 1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, - B257B44E1989D5E800D9A687 /* CCPrimitive.cpp in Sources */, + 4631CB4921AFD9F90000D408 /* UIEditBox.cpp in Sources */, 299CF1FB19A434BC00C378C1 /* ccRandom.cpp in Sources */, - B665E3CE1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */, - 15AE18E819AAD35000C27E9E /* CCActionManagerEx.cpp in Sources */, - B677B0CD1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */, - 5020A1801D49912500E80C72 /* Bone.c in Sources */, - 15AE191B19AAD35000C27E9E /* CCTransformHelp.cpp in Sources */, - 15AE190319AAD35000C27E9E /* CCComRender.cpp in Sources */, + EDC78BDE21CA19FB00E1863C /* CCDatas.cpp in Sources */, + 4631CBB721AFD9FA0000D408 /* UITabControl.cpp in Sources */, 1A57006D180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, - 5020A1C21D49912500E80C72 /* PathAttachment.c in Sources */, - B665E20E1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */, + 4631CBCD21AFD9FA0000D408 /* UIScrollViewBar.cpp in Sources */, 1A570071180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, - 46BDE4C21FA86C7F00104C05 /* Array.c in Sources */, + EDC78C6221CA19FC00E1863C /* CCDataReaderHelper.cpp in Sources */, + ED28C241219E629C0078D854 /* BlendState.cpp in Sources */, 50CB247F19D9C5A100687767 /* AudioPlayer.mm in Sources */, 50ABBFFF1926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 1A570075180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, - 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */, - 382384131A259092002C4610 /* NodeReaderProtocol.cpp in Sources */, - 503D4F6B1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */, - B665E2C21AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */, - 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, - B665E2B61AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */, B6DD2FD51B04825B00E47F5F /* DetourCrowd.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, - 15AE18A619AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */, - 15AE18F619AAD35000C27E9E /* CCBatchNode.cpp in Sources */, - 5020A2251D49912500E80C72 /* TransformConstraintData.c in Sources */, 468A14EF1EF223B700ECA675 /* idl_gen_go.cpp in Sources */, - 15AE184419AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */, 50ABBE591925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, - B665E2FA1AA80A6500DDB1C5 /* CCPUMaterialManager.cpp in Sources */, B6DD2FAF1B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */, - B665E3921AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp in Sources */, 1A57007D180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, - 15AE189F19AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, - B665E2761AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */, 1A570081180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, 505385041B01887A00793096 /* CCProperties.cpp in Sources */, + EDC78CD021CA19FC00E1863C /* TextBMFontReader.cpp in Sources */, 1A570085180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, - 382384441A25915C002C4610 /* SpriteReader.cpp in Sources */, - 46BDE4C61FA86C7F00104C05 /* Color.c in Sources */, + EDC78C9021CA19FC00E1863C /* LoadingBarReader.cpp in Sources */, 1A570089180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, - B665E3A61AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */, - B665E3CA1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, 1A57008D180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, - B665E26E1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */, + 4631CB0D21AFD9F90000D408 /* UIWidget.cpp in Sources */, B6DD2FF11B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */, - B665E1FE1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */, - B665E2961AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */, + 4631CB8B21AFD9FA0000D408 /* UILayout.cpp in Sources */, + EDC78CFE21CA19FC00E1863C /* TextFieldReader.cpp in Sources */, 1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, - 15AE188419AAD33D00C27E9E /* CCBSequence.cpp in Sources */, 50ABBEBF1925AB6F00A911A9 /* CCValue.cpp in Sources */, 1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, 1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */, - B665E2321AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */, - B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, + EDC78C3821CA19FB00E1863C /* CCDecorativeDisplay.cpp in Sources */, 291901451B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */, - 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, - 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */, - B665E32A1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */, - 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */, - 2962D5F01C61CF3F004821A3 /* CCUISingleLineTextField.m in Sources */, - 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, - B665E3F21AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */, + 40FE105321F070640061C04F /* CCControlHuePicker.cpp in Sources */, + 46535CDF21ABE8C0005B5370 /* CCGLViewImpl-mac.mm in Sources */, 468A14E31EF223B700ECA675 /* flatc.cpp in Sources */, + EDC78C2821CA19FB00E1863C /* CCDisplayManager.cpp in Sources */, A045F6D61BA81577005076C7 /* CCTextureCube.cpp in Sources */, + EDC78C5E21CA19FC00E1863C /* CCTransformHelp.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, - 2962D5F81C61DBBF004821A3 /* CCUIPasswordTextField.m in Sources */, - D0FD034B1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */, - 15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, - 15AE183819AAD2F700C27E9E /* CCRay.cpp in Sources */, 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, - 1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, + 46AF3A0F21F1877100D5AFCD /* CCPhysicsBody.cpp in Sources */, 50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */, - B665E3B61AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */, - B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */, - B677B0C91B18492D006762CB /* CCNavMesh.cpp in Sources */, - B665E1F61AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */, - 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, - 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, - 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, B6DD2FDD1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */, 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, - 15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */, - 1A57011B180BC90D0088DEC7 /* CCGrabber.cpp in Sources */, - 15AE182419AAD2F700C27E9E /* CCMesh.cpp in Sources */, - 5020A17A1D49912500E80C72 /* AttachmentVertices.cpp in Sources */, - 15AE190D19AAD35000C27E9E /* CCDisplayManager.cpp in Sources */, 1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */, - B665E26A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */, B6DD2FD91B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */, - 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, - 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, - 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */, A0534A671B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */, - B665E2B21AA80A6500DDB1C5 /* CCPUForceField.cpp in Sources */, - 46BDE4CF1FA86C7F00104C05 /* Triangulator.c in Sources */, - 15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, - 38B8E2E119E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */, - B665E3F61AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */, + EDC78C5221CA19FB00E1863C /* CocoLoader.cpp in Sources */, + 46F9B72421AFE64D009DF858 /* CCTableView.cpp in Sources */, + EDC78CF621CA19FC00E1863C /* SkeletonNodeReader.cpp in Sources */, 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, + 4631CBAF21AFD9FA0000D408 /* UIImageView.cpp in Sources */, 50CB247B19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, B6DD2FC71B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */, 1A5701A5180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, - 3823842F1A259112002C4610 /* ParticleReader.cpp in Sources */, - C503066B1B60B583001E6D43 /* CCSkeletonNode.cpp in Sources */, - 15AE191119AAD35000C27E9E /* CCProcessBase.cpp in Sources */, - 15AE18EE19AAD35000C27E9E /* CCArmature.cpp in Sources */, - 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, - 507003211B69735300E83DDD /* HttpConnection-winrt.cpp in Sources */, + 40FE104C21F070640061C04F /* CCInvocation.cpp in Sources */, + 4631CBBD21AFD9FA0000D408 /* UILayoutManager.cpp in Sources */, + EDC78BD821CA19FB00E1863C /* CCComAudio.cpp in Sources */, + ED28C235219E629B0078D854 /* Texture.cpp in Sources */, 1A5701B1180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, - 15AE181619AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, + EDC78C2C21CA19FB00E1863C /* CCActionNode.cpp in Sources */, + EDC78C0C21CA19FB00E1863C /* CCFrame.cpp in Sources */, + 4631CB1D21AFD9F90000D408 /* UIButton.cpp in Sources */, B6DD2FE91B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */, - 18956BB21A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */, 1A5701B5180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */, + 4631CB2321AFD9F90000D408 /* UIVBox.cpp in Sources */, 1A5701B9180BCB5A0088DEC7 /* CCLabel.cpp in Sources */, - B665E2CA1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp in Sources */, 1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, - 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */, - B665E3121AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */, - 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, - 5020A1861D49912500E80C72 /* BoneData.c in Sources */, + 4631CBA121AFD9FA0000D408 /* UIHBox.cpp in Sources */, + EDC78C3021CA19FB00E1863C /* CCUtilMath.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, - C50306691B60B583001E6D43 /* CCBoneNode.cpp in Sources */, 85B3743A1B204B9400C488D6 /* clipper.cpp in Sources */, - 182C5CB21A95964700C30D34 /* Node3DReader.cpp in Sources */, 50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, - B665E28E1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp in Sources */, - 3823843D1A259140002C4610 /* SingleNodeReader.cpp in Sources */, - 1A5701C1180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */, - B665E30A1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */, - 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, + EDC78CFA21CA19FC00E1863C /* ScrollViewReader.cpp in Sources */, 50ABBD4C1925AB0000A911A9 /* MathUtil.cpp in Sources */, - 5020A1B01D49912500E80C72 /* IkConstraintData.c in Sources */, + EDC78C6C21CA19FC00E1863C /* CCDisplayFactory.cpp in Sources */, B6DD2FAB1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */, - 15AE191719AAD35000C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, - 5020A1741D49912500E80C72 /* AttachmentLoader.c in Sources */, - B665E2E21AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */, 1A087AE81860400400196EF5 /* edtaa3func.cpp in Sources */, - 50ABBD831925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, - B665E31E1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */, - B665E2FE1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */, - 15AE18FF19AAD35000C27E9E /* CCComAudio.cpp in Sources */, + EDC78C2021CA19FB00E1863C /* CCSkinNode.cpp in Sources */, + EDC78C2621CA19FB00E1863C /* TriggerBase.cpp in Sources */, + EDE6457121F017220063F6E4 /* ProgramState.cpp in Sources */, + 4631CB7321AFD9F90000D408 /* CCUIPasswordTextField.m in Sources */, 1A5701C7180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, - B665E2C61AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */, - B665E3761AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */, - 15AE18A819AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, - 5020A2041D49912500E80C72 /* Skin.c in Sources */, - 1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, 50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, 50FC3FA91D74C2D1001C936A /* CCEventListenerController.cpp in Sources */, + EDC78C4021CA19FB00E1863C /* CCActionFrameEasing.cpp in Sources */, 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, - 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */, - 15B3707C19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */, 3EACC9A419F5014D00EB3C5E /* CCLight.cpp in Sources */, - B677B0D51B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */, - B665E42E1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */, + ED28C22B219E629B0078D854 /* VertexLayout.cpp in Sources */, + 4631CBBF21AFD9FA0000D408 /* UITextField.cpp in Sources */, + EDC78CE821CA19FC00E1863C /* NodeReaderProtocol.cpp in Sources */, + ED28C24B219E629C0078D854 /* DepthStencilState.cpp in Sources */, + EDC78C6821CA19FC00E1863C /* DictionaryHelper.cpp in Sources */, + 4631CB6B21AFD9F90000D408 /* CCUIEditBoxMac.mm in Sources */, + 40FE104D21F070640061C04F /* CCControlStepper.cpp in Sources */, + EDC78CF221CA19FC00E1863C /* BoneNodeReader.cpp in Sources */, + 46F9B72821AFE64D009DF858 /* CCTableViewCell.cpp in Sources */, 1A5701E2180BCB8C0088DEC7 /* CCScene.cpp in Sources */, - 15AE1B9919AADFDF00C27E9E /* UIHBox.cpp in Sources */, - 15AE199C19AAD39600C27E9E /* ScrollViewReader.cpp in Sources */, - 15AE187E19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 1A12775C18DFCC590005F345 /* CCTweenFunction.cpp in Sources */, 1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, - 5020A1A41D49912500E80C72 /* extension.c in Sources */, B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, - B665E2061AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */, - B665E38A1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */, - B665E2161AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */, - B665E3361AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */, - 15B3708819EE414C00ABE682 /* Manifest.cpp in Sources */, - C5F516121C8216660013B695 /* UITabControl.cpp in Sources */, - B665E27E1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */, B63990CC1A490AFE00B07923 /* CCAsyncTaskPool.cpp in Sources */, 1A41ABC21DF00CEC00B5584C /* AudioDecoder.mm in Sources */, - 182C5CE51A9D725400C30D34 /* UserCameraReader.cpp in Sources */, - B665E29A1AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp in Sources */, 1A5701EA180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, - 15AE186B19AAD31D00C27E9E /* SimpleAudioEngine.mm in Sources */, - B665E2CE1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */, - 50ABBDAD1925AB4100A911A9 /* CCRenderer.cpp in Sources */, - 15AE199019AAD37200C27E9E /* ImageViewReader.cpp in Sources */, - C50306781B60B5B2001E6D43 /* SkeletonNodeReader.cpp in Sources */, - B665E28A1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */, - B665E2A21AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */, - B665E3EE1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */, + EDC78CAE21CA19FC00E1863C /* TabControlReader.cpp in Sources */, + EDC78CD221CA19FC00E1863C /* CheckBoxReader.cpp in Sources */, + EDC78C8221CA19FC00E1863C /* GameNode3DReader.cpp in Sources */, + EDC78CD821CA19FC00E1863C /* Sprite3DReader.cpp in Sources */, + 40FE105A21F070640061C04F /* CCControlSlider.cpp in Sources */, 1A5701EE180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, 15FB20931AE7C57D00C31518 /* cdt.cc in Sources */, - 15AE18F419AAD35000C27E9E /* CCArmatureDefine.cpp in Sources */, - 15AE186619AAD31D00C27E9E /* CDOpenALSupport.m in Sources */, + EDC78D2A21CA19FC00E1863C /* CCSkin.cpp in Sources */, 5012169A1AC473A3009A4BEA /* CCTechnique.cpp in Sources */, 1A5701F7180BCBAD0088DEC7 /* CCMenu.cpp in Sources */, - B665E33E1AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp in Sources */, + 4631CB4321AFD9F90000D408 /* UIEditBoxImpl-stub.cpp in Sources */, + 40FE105521F070640061C04F /* CCControlSaturationBrightnessPicker.cpp in Sources */, + EDC78BF021CA19FB00E1863C /* CCInputDelegate.cpp in Sources */, + EDC78D3421CA19FC00E1863C /* CCActionObject.cpp in Sources */, + EDC78C5A21CA19FC00E1863C /* CCActionManagerEx.cpp in Sources */, + 4631CBB521AFD9FA0000D408 /* UITextBMFont.cpp in Sources */, 1A1645B2191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, - 5020A1921D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */, - 46BDE4CD1FA86C7F00104C05 /* SkeletonTwoColorBatch.cpp in Sources */, - B665E3B21AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */, - 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */, - C50306751B60B5B2001E6D43 /* BoneNodeReader.cpp in Sources */, - 5070031B1B69735200E83DDD /* HttpClient-android.cpp in Sources */, - B665E2D61AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */, + ED28C237219E629B0078D854 /* Device.cpp in Sources */, 1A5701FB180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, - 5020A18C1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */, 1A570202180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, + 4631CB2921AFD9F90000D408 /* UITextAtlas.cpp in Sources */, + EDC78BFE21CA19FB00E1863C /* CocosStudioExtension.cpp in Sources */, + EDC78C0821CA19FB00E1863C /* CCActionTimeline.cpp in Sources */, 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, + EDC78C9E21CA19FC00E1863C /* Node3DReader.cpp in Sources */, + EDC78D0821CA19FC00E1863C /* WidgetCallBackHandlerProtocol.cpp in Sources */, + EDC78C9A21CA19FC00E1863C /* TextAtlasReader.cpp in Sources */, 15FB20971AE7C57D00C31518 /* sweep.cc in Sources */, + EDC78C4421CA19FB00E1863C /* CCTween.cpp in Sources */, 1A570210180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, 501216941AC47393009A4BEA /* CCPass.cpp in Sources */, - 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, - 292DB14D19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, + EDC78CDE21CA19FC00E1863C /* ComAudioReader.cpp in Sources */, + 4631CB3121AFD9F90000D408 /* UIEditBoxImpl-common.cpp in Sources */, 50ABBDB51925AB4100A911A9 /* CCTexture2D.cpp in Sources */, 3EACC9A019F5014D00EB3C5E /* CCCamera.cpp in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, - B665E3FE1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, A045F6DC1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */, - B665E25A1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */, - A0E749F71BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */, B6DD2FB31B04825B00E47F5F /* RecastDump.cpp in Sources */, - 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, - B6CAAFFA1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, - 15AE18F219AAD35000C27E9E /* CCArmatureDataManager.cpp in Sources */, - 46BDE4C41FA86C7F00104C05 /* ClippingAttachment.c in Sources */, - B665E2DE1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */, - 15AE1B6119AADA9900C27E9E /* UIButton.cpp in Sources */, + EDC78BEE21CA19FB00E1863C /* CocoStudio.cpp in Sources */, + EDC78D0A21CA19FC00E1863C /* CCArmatureDefine.cpp in Sources */, B276EF651988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, 50ABBE411925AB6F00A911A9 /* CCDirector.cpp in Sources */, + EDC78CEC21CA19FC00E1863C /* Particle3DReader.cpp in Sources */, 1A570221180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, - 5020A1561D49912500E80C72 /* AnimationState.c in Sources */, + ED28C27F219E629C0078D854 /* CommandBuffer.cpp in Sources */, 1A570225180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, + 4631CB2B21AFD9F90000D408 /* UIVideoPlayer-android.cpp in Sources */, 1A570229180BCC1A0088DEC7 /* CCParticleSystem.cpp in Sources */, - B665E3BA1AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp in Sources */, - B665E4321AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */, - B665E3DA1AA80A6600DDB1C5 /* CCPUScriptTranslator.cpp in Sources */, - B665E2361AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp in Sources */, + 4631CB1321AFD9F90000D408 /* UIVideoPlayer-ios.mm in Sources */, 1A57022D180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, 1A57027E180BCC900088DEC7 /* CCSprite.cpp in Sources */, - 29DA08F41C63351600F4052B /* UIEditBoxImpl-linux.cpp in Sources */, 1A570282180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, + 460D4D0D21ABD0C60075726E /* BlendStateMTL.mm in Sources */, 1A570286180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, + EDAF7C7121F1797000E070B2 /* CCTextureUtils.cpp in Sources */, B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, - 5020A1FE1D49912500E80C72 /* SkeletonRenderer.cpp in Sources */, - 50F965511CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */, - B60C5BD419AC68B10056FBDE /* CCBillBoard.cpp in Sources */, - 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, - 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, - 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */, - 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, - 382384211A2590DA002C4610 /* GameMapReader.cpp in Sources */, B6DD2FA71B04825B00E47F5F /* DebugDraw.cpp in Sources */, - B665E31A1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */, 1A57028A180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, - 15AE18E619AAD35000C27E9E /* CCActionFrameEasing.cpp in Sources */, - 38F5263E1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */, - B665E34E1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp in Sources */, - 15AE190F19AAD35000C27E9E /* CCInputDelegate.cpp in Sources */, - 15AE181A19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, - B665E3BE1AA80A6500DDB1C5 /* CCPUScaleAffector.cpp in Sources */, - 15B3708019EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */, + 461FE09021CA129B00E5378F /* CCCallbackCommand.cpp in Sources */, 1A570292180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, - B665E3421AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp in Sources */, - B665E2DA1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */, 1A570296180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, 50ABBE351925AB6F00A911A9 /* CCConsole.cpp in Sources */, B6DD2FED1B04825B00E47F5F /* DetourTileCache.cpp in Sources */, 50693C5E1B6BF2AE005C5820 /* CCDownloader.cpp in Sources */, - B665E3FA1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */, + EDC78C7C21CA19FC00E1863C /* ProjectNodeReader.cpp in Sources */, 50ABBEAF1925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, - 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, + EDC78C4821CA19FB00E1863C /* CCArmatureAnimation.cpp in Sources */, + ED28C243219E629C0078D854 /* ShaderModule.cpp in Sources */, 50ABBE791925AB6F00A911A9 /* CCEventMouse.cpp in Sources */, A05DCF9D1B90584E00EE040B /* CCDownloader-curl.cpp in Sources */, + EDC78D2021CA19FC00E1863C /* CCSpriteFrameCacheHelper.cpp in Sources */, + EDC78C7021CA19FC00E1863C /* CCSGUIReader.cpp in Sources */, 50ABC0111926664800A911A9 /* CCGLView.cpp in Sources */, - 50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, - 382384071A25900F002C4610 /* FlatBuffersSerialize.cpp in Sources */, - 5070031D1B69735200E83DDD /* HttpClient-winrt.cpp in Sources */, - 5020A1501D49912500E80C72 /* Animation.c in Sources */, - B665E3021AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp in Sources */, - B665E3721AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */, + 4631CB7721AFD9F90000D408 /* UIEditBoxImpl-ios.mm in Sources */, + 4631CBDF21AFD9FA0000D408 /* UILayoutParameter.cpp in Sources */, + EDC78BE021CA19FB00E1863C /* CCProcessBase.cpp in Sources */, + EDC78C2221CA19FB00E1863C /* CCSkeletonNode.cpp in Sources */, 1A5702C8180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, - B665E2861AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */, - 15AE1B5519AADA9900C27E9E /* UIScrollView.cpp in Sources */, - 46BDE4CB1FA86C7F00104C05 /* SkeletonClipping.c in Sources */, - 15AE191919AAD35000C27E9E /* CCSSceneReader.cpp in Sources */, 50ABBE7D1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, - B665E22A1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */, + 46AF3A0D21F1877100D5AFCD /* CCPhysicsWorld.cpp in Sources */, + EDC78C7421CA19FC00E1863C /* CCBatchNode.cpp in Sources */, + 4631CB6121AFD9F90000D408 /* CCUITextFieldFormatter.m in Sources */, + EDC78C0E21CA19FB00E1863C /* CSLoader.cpp in Sources */, + EDC78CBE21CA19FC00E1863C /* WidgetReader.cpp in Sources */, + 4631CB2721AFD9F90000D408 /* UICheckBox.cpp in Sources */, 1A5702EA180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 468A14F51EF223B700ECA675 /* idl_parser.cpp in Sources */, 50ABBD971925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */, - 46BDE4C91FA86C7F00104C05 /* PointAttachment.c in Sources */, - 15AE182019AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, - B665E2421AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */, - B6D38B8A1AC3AFAC00043997 /* CCSkybox.cpp in Sources */, + EDC78CBA21CA19FC00E1863C /* NodeReader.cpp in Sources */, 1A2B22B21E6E54EC001D5EC9 /* Uri.cpp in Sources */, - B665E3521AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */, + 4631CB9321AFD9FA0000D408 /* UIHelper.cpp in Sources */, + 460D4D1121ABD0C60075726E /* ShaderModuleMTL.mm in Sources */, 294D7D941D0E67B4002CE7B7 /* CCDevice-apple.mm in Sources */, 1A5702EE180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, - 15AE1BD619AAE01E00C27E9E /* CCControlSlider.cpp in Sources */, 468A14E61EF223B700ECA675 /* idl_gen_cpp.cpp in Sources */, - B665E3A21AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */, - B665E39E1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */, - B665E41A1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */, - B665E3C61AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */, 50ABBE691925AB6F00A911A9 /* CCEventListenerFocus.cpp in Sources */, - 15AE18EA19AAD35000C27E9E /* CCActionNode.cpp in Sources */, - 2962D6001C61DF1A004821A3 /* CCUIMultilineTextField.m in Sources */, - B665E32E1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp in Sources */, - B665E2AE1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */, - 15AE1BA319AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, + 460D4CD521A5666E0075726E /* CCRenderer.cpp in Sources */, B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, 1A5702F2180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, 468A14F21EF223B700ECA675 /* idl_gen_text.cpp in Sources */, - 5020A1F21D49912500E80C72 /* SkeletonData.c in Sources */, - 15AE189419AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 826294351AAF004C00CB7CF7 /* HttpCookie.cpp in Sources */, 1A5702F6180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 1A5702FA180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, - 0C261F281BE7528900707478 /* Light3DReader.cpp in Sources */, - B665E3621AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */, - 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */, 50FC3FA21D74C1A1001C936A /* CCEventController.cpp in Sources */, B6DD2FE11B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */, - B665E2BE1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */, - 3823841A1A2590D2002C4610 /* ComAudioReader.cpp in Sources */, - 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */, + EDC78C1E21CA19FB00E1863C /* CCTimeLine.cpp in Sources */, + 46AF3A1121F1877100D5AFCD /* CCPhysicsShape.cpp in Sources */, 50ABBD5C1925AB0000A911A9 /* Vec3.cpp in Sources */, + EDC78D1E21CA19FC00E1863C /* TriggerMng.cpp in Sources */, + EDC78D1021CA19FC00E1863C /* CCColliderDetector.cpp in Sources */, + EDC78C4621CA19FB00E1863C /* CCComExtensionData.cpp in Sources */, 1A570300180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, - 15AE191D19AAD35000C27E9E /* CCTween.cpp in Sources */, - 5020A16E1D49912500E80C72 /* Attachment.c in Sources */, 5053850C1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */, - 15AE199A19AAD39600C27E9E /* PageViewReader.cpp in Sources */, 1A57030C180BCF190088DEC7 /* CCComponent.cpp in Sources */, 15FB20741AE7BF8600C31518 /* CCAutoPolygon.cpp in Sources */, - B665E2A61AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */, - B665E2E61AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp in Sources */, - 15AE192219AAD35000C27E9E /* DictionaryHelper.cpp in Sources */, - 15AE196C19AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, - 15AE190719AAD35000C27E9E /* CCDatas.cpp in Sources */, - 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, - 5020A1E61D49912500E80C72 /* SkeletonBatch.cpp in Sources */, B6DD2FCB1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */, 50FC3F9E1D74C0A3001C936A /* CCController.cpp in Sources */, - B665E2721AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, 50ABBD3C1925AB0000A911A9 /* CCGeometry.cpp in Sources */, - 15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, 5012168E1AC47380009A4BEA /* CCRenderState.cpp in Sources */, - 29DA08F61C63351600F4052B /* UIEditBoxImpl-winrt.cpp in Sources */, - B665E35A1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */, - 3E2A09C21BAA91B70086B878 /* CCMotionStreak3D.cpp in Sources */, - 5020A1981D49912500E80C72 /* Event.c in Sources */, + 46AF3A2321F1877100D5AFCD /* CCPhysicsJoint.cpp in Sources */, 50ABC0011926664800A911A9 /* CCLock-apple.cpp in Sources */, + 4631CBE321AFD9FA0000D408 /* UISlider.cpp in Sources */, 50ABBD931925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, - 15AE183419AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, - 5020A1681D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */, - B665E23A1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */, + EDC78BE621CA19FB00E1863C /* CCComController.cpp in Sources */, + EDC78CB021CA19FC00E1863C /* TextReader.cpp in Sources */, 1A57034B180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, + EDC78C8421CA19FC00E1863C /* ListViewReader.cpp in Sources */, 1A570354180BD0B00088DEC7 /* ioapi.cpp in Sources */, - 15B3707819EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */, + EDC78CA621CA19FC00E1863C /* Light3DReader.cpp in Sources */, + 4631CB2F21AFD9F90000D408 /* UIText.cpp in Sources */, + EDC78CE421CA19FC00E1863C /* ParticleReader.cpp in Sources */, 1A570358180BD0B00088DEC7 /* unzip.cpp in Sources */, - 94A6DF051C7303FD0094AEF7 /* LocalizationManager.cpp in Sources */, - 5020A22B1D49912500E80C72 /* VertexAttachment.c in Sources */, - B665E3861AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp in Sources */, - 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 50ABBEB31925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, - 5E9F61261A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */, - B665E4221AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */, - B665E38E1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */, - B665E2021AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */, - B665E3661AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */, - B665E4361AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */, - B665E3DE1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */, - B665E22E1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */, - 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, + 46F9B73221AFE7C0009DF858 /* CCScrollView.cpp in Sources */, + 4631CB8921AFD9F90000D408 /* CocosGUI.cpp in Sources */, + 460D4D0B21ABD0C60075726E /* BufferMTL.mm in Sources */, + EDC78D0621CA19FC00E1863C /* CCBone.cpp in Sources */, + EDC78C8821CA19FC00E1863C /* GameMapReader.cpp in Sources */, + EDC78CE221CA19FC00E1863C /* NodeReaderDefine.cpp in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, - 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, + 4631CB6521AFD9F90000D408 /* CCUISingleLineTextField.m in Sources */, 50CB247719D9C5A100687767 /* AudioCache.mm in Sources */, - B665E25E1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */, - 15AE18FA19AAD35000C27E9E /* CCColliderDetector.cpp in Sources */, 50ABBEA71925AB6F00A911A9 /* CCTouch.cpp in Sources */, - 15AE191319AAD35000C27E9E /* CCSGUIReader.cpp in Sources */, B6DD2FBD1B04825B00E47F5F /* DetourCommon.cpp in Sources */, - 15AE186819AAD31D00C27E9E /* CDXMacOSXSupport.mm in Sources */, - B665E3221AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */, - 15AE191519AAD35000C27E9E /* CCSkin.cpp in Sources */, - B665E3461AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */, - 15AE189019AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, - 15AE18F819AAD35000C27E9E /* CCBone.cpp in Sources */, - B665E2121AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */, - 38ACD1FC1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp in Sources */, + 460D4D0A21ABD0C60075726E /* Utils.mm in Sources */, + ED150A9B21E635AB00EFE7F7 /* ProgramMTL.mm in Sources */, 15FB209B1AE7C57D00C31518 /* sweep_context.cc in Sources */, - B6CAAFEE1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */, + 460D4D1821ABD0C60075726E /* CommandBufferMTL.mm in Sources */, 50ABBD8B1925AB4100A911A9 /* CCGLProgram.cpp in Sources */, + 4631CB1F21AFD9F90000D408 /* UIPageView.cpp in Sources */, + ED150A9221E631DA00EFE7F7 /* ProgramCache.cpp in Sources */, 464AD6E5197EBB1400E502D8 /* pvr.cpp in Sources */, - 5020A1C81D49912500E80C72 /* PathConstraint.c in Sources */, + 460D4D1B21ABD0C60075726E /* RenderPipelineMTL.mm in Sources */, + 40FE104821F070640061C04F /* CCControlUtils.cpp in Sources */, 50ABBDA31925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, - 5020A21F1D49912500E80C72 /* TransformConstraint.c in Sources */, - 15AE19A219AAD39600C27E9E /* TextBMFontReader.cpp in Sources */, - 382384281A2590F9002C4610 /* NodeReader.cpp in Sources */, - 5020A19E1D49912500E80C72 /* EventData.c in Sources */, - 50ABC01D1926664800A911A9 /* CCThread.cpp in Sources */, - 15AE180C19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, - 15AE183019AAD2F700C27E9E /* CCOBB.cpp in Sources */, - 15AE191F19AAD35000C27E9E /* CCUtilMath.cpp in Sources */, 50ABBECB1925AB6F00A911A9 /* s3tc.cpp in Sources */, 50ABBD481925AB0000A911A9 /* Mat4.cpp in Sources */, + 4631CB9921AFD9FA0000D408 /* UIRadioButton.cpp in Sources */, + 40FE104E21F070640061C04F /* CCControl.cpp in Sources */, 826294341AAF003E00CB7CF7 /* HttpClient-apple.mm in Sources */, - A045F6EF1BA81821005076C7 /* GameNode3DReader.cpp in Sources */, 50ABBD8F1925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */, + EDE6457321F017220063F6E4 /* ShaderCache.cpp in Sources */, 50ABBD441925AB0000A911A9 /* CCVertex.cpp in Sources */, B276EF611988D1D500CD400F /* CCVertexIndexData.cpp in Sources */, - 15AE199819AAD39600C27E9E /* LoadingBarReader.cpp in Sources */, + EDC78D0C21CA19FC00E1863C /* CCActionFrame.cpp in Sources */, 503DD8F71926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */, 50ABBE751925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, - 15AE18F019AAD35000C27E9E /* CCArmatureAnimation.cpp in Sources */, + 4631CBC121AFD9FA0000D408 /* UILayoutComponent.cpp in Sources */, 50ABBE511925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, - 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */, + 460D4D0E21ABD0C60075726E /* DepthStencilStateMTL.mm in Sources */, + ED93A75921EDBCBA00170050 /* Program.cpp in Sources */, + 460D4D1521ABD0C60075726E /* TextureMTL.mm in Sources */, 468A14E91EF223B700ECA675 /* idl_gen_fbs.cpp in Sources */, - B68778FC1A8CA82E00643ABF /* CCParticle3DEmitter.cpp in Sources */, - B665E2921AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */, + 4631CB7521AFD9F90000D408 /* CCUIMultilineTextField.m in Sources */, 50ABC0631926664800A911A9 /* CCDevice-mac.mm in Sources */, - B677B0D11B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */, - 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, - 292DB14319B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, - B665E2EA1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp in Sources */, - 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, - 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, - 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */, - 15AE1BD219AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */, 50ABBEA31925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, - 38B8E2D519E66581002D7CE7 /* CSLoader.cpp in Sources */, - 15AE190519AAD35000C27E9E /* CCDataReaderHelper.cpp in Sources */, 826294331AAF001C00CB7CF7 /* HttpAsynConnection-apple.m in Sources */, - B6CAAFE61AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */, - B68778F81A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */, - 15AE19A019AAD39600C27E9E /* TextAtlasReader.cpp in Sources */, - 5020A1B61D49912500E80C72 /* Json.c in Sources */, - 503D4F631CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */, + EDC78C9421CA19FC00E1863C /* SpriteReader.cpp in Sources */, 50ABBE6D1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, 15FB20871AE7C57D00C31518 /* shapes.cc in Sources */, - B665E27A1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp in Sources */, - 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */, - 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - B665E2661AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */, 50ABBD541925AB0000A911A9 /* TransformUtils.cpp in Sources */, DABC9FA919E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */, 3E2F27A619CFBFE100E7C490 /* AudioEngine.cpp in Sources */, - B665E2EE1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */, - B665E4121AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */, + 46AF3A1721F1877100D5AFCD /* CCPhysicsContact.cpp in Sources */, + 46E21B4721B900C900430A43 /* StringUtils.cpp in Sources */, + EDC78D3221CA19FC00E1863C /* CCArmature.cpp in Sources */, + 4631CBD321AFD9FA0000D408 /* UIRichText.cpp in Sources */, + EDC78CC221CA19FC00E1863C /* ImageViewReader.cpp in Sources */, + 460D4D1421ABD0C60075726E /* DeviceMTL.mm in Sources */, + EDC78CC821CA19FC00E1863C /* SingleNodeReader.cpp in Sources */, 468A14EC1EF223B700ECA675 /* idl_gen_general.cpp in Sources */, 298C75D51C0465D0006BAE63 /* CCStencilStateManager.cpp in Sources */, - 5020A1621D49912500E80C72 /* Atlas.c in Sources */, - B665E3D21AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */, - B665E4021AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */, - D0FD03531A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp in Sources */, + EDC78C3621CA19FB00E1863C /* CCArmatureDataManager.cpp in Sources */, B6DD2FE51B04825B00E47F5F /* DetourPathQueue.cpp in Sources */, - B665E39A1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */, - 15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */, 501216A01AC473AD009A4BEA /* CCMaterial.cpp in Sources */, 50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, - 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */, - 15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */, - B665E2221AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp in Sources */, - 15AE197019AAD35700C27E9E /* CCFrame.cpp in Sources */, - 3823840F1A259092002C4610 /* NodeReaderDefine.cpp in Sources */, - 15AE1B9F19AADFDF00C27E9E /* UILayout.cpp in Sources */, 50ABBECF1925AB6F00A911A9 /* TGAlib.cpp in Sources */, - 15AE199E19AAD39600C27E9E /* SliderReader.cpp in Sources */, + 4631CBE521AFD9FA0000D408 /* UIRelativeBox.cpp in Sources */, 50ABBE451925AB6F00A911A9 /* CCEvent.cpp in Sources */, - 291A09251C5F06A60068C1D2 /* CCUIEditBoxMac.mm in Sources */, - D0FD034F1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */, 50ABBE611925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, + 40FE105021F070640061C04F /* CCControlPotentiometer.cpp in Sources */, 50ABBD9F1925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, - B665E3161AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */, 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, - 5020A1CE1D49912500E80C72 /* PathConstraintData.c in Sources */, 50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, - 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, - 5020A1AA1D49912500E80C72 /* IkConstraint.c in Sources */, - B665E43A1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */, - B665E1F21AA80A6500DDB1C5 /* CCPUAffector.cpp in Sources */, - 15AE1B4F19AADA9900C27E9E /* UILoadingBar.cpp in Sources */, - B665E2BA1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp in Sources */, 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, - 15AE190919AAD35000C27E9E /* CCDecorativeDisplay.cpp in Sources */, - B665E40E1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */, - 5020A2161D49912500E80C72 /* spine-cocos2dx.cpp in Sources */, - B665E21E1AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp in Sources */, - 15AE18E319AAD35000C27E9E /* TriggerObj.cpp in Sources */, - 15AE1BA119AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, - 50ABC0211926664800A911A9 /* CCGLViewImpl-desktop.cpp in Sources */, - 5033419C1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */, - 5020A1D41D49912500E80C72 /* RegionAttachment.c in Sources */, 50ABC00D1926664800A911A9 /* CCFileUtils.cpp in Sources */, 50ABBE4D1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, - B5668D7D1B3838E4003CBD5E /* UIScrollViewBar.cpp in Sources */, - B665E2D21AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */, 50ABBE9F1925AB6F00A911A9 /* CCScheduler.cpp in Sources */, + 4631CB7F21AFD9F90000D408 /* UIEditBoxImpl-win32.cpp in Sources */, B6DD2FC31B04825B00E47F5F /* DetourNavMesh.cpp in Sources */, B6DD2FCF1B04825B00E47F5F /* DetourNode.cpp in Sources */, - 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */, - B665E2521AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */, + 40FE104A21F070640061C04F /* CCControlSwitch.cpp in Sources */, + EDC78C3E21CA19FB00E1863C /* LocalizationManager.cpp in Sources */, 50ABC0151926664800A911A9 /* CCImage.cpp in Sources */, 50ABBE231925AB6F00A911A9 /* base64.cpp in Sources */, - B665E3AA1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */, - 15AE1B5D19AADA9900C27E9E /* UITextBMFont.cpp in Sources */, B6DD2FF51B04825B00E47F5F /* fastlz.c in Sources */, - 46BDE4D11FA86C7F00104C05 /* VertexEffect.c in Sources */, - B665E3561AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp in Sources */, - 382384361A259126002C4610 /* ProjectNodeReader.cpp in Sources */, - B665E37A1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */, 15AE1BB519AADFEF00C27E9E /* SocketIO.cpp in Sources */, - 15AE1B6519AADA9900C27E9E /* UIImageView.cpp in Sources */, - B665E3321AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */, + EDC78C4221CA19FB00E1863C /* FlatBuffersSerialize.cpp in Sources */, + 46D3D45B21DE014500EF5E75 /* BufferManager.mm in Sources */, 50ABBE5D1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, - 15AE182819AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */, - B665E42A1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */, - 5020A1F81D49912500E80C72 /* SkeletonJson.c in Sources */, - 15AE19A619AAD39600C27E9E /* TextReader.cpp in Sources */, - 15AE198819AAD36A00C27E9E /* ButtonReader.cpp in Sources */, - B5CE6DC81B3C05BA002B0419 /* UIRadioButton.cpp in Sources */, - 4D76BE3A1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */, - B665E33A1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */, - B665E2261AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */, 50ABBD601925AB0000A911A9 /* Vec4.cpp in Sources */, + EDC78C7A21CA19FC00E1863C /* ArmatureNodeReader.cpp in Sources */, 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */, - 43015DBF1B60DF4000E75161 /* CCComExtensionData.cpp in Sources */, - B665E3261AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */, - B6CAAFFE1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */, - 5020A1E01D49912500E80C72 /* SkeletonAnimation.cpp in Sources */, + 4631CB8D21AFD9FA0000D408 /* UIScale9Sprite.cpp in Sources */, + 4631CBC321AFD9FA0000D408 /* UIScrollView.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, - 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, - B665E23E1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */, 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, - 5020A20A1D49912500E80C72 /* Slot.c in Sources */, - B665E20A1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */, - B665E3E61AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */, - 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, - 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */, - B665E2821AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */, - 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, - B665E2AA1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */, + 4631CBDB21AFD9FA0000D408 /* UILoadingBar.cpp in Sources */, + 40FE104F21F070640061C04F /* CCControlButton.cpp in Sources */, 46C02E0718E91123004B7456 /* xxhash.c in Sources */, - 15AE1B6B19AADA9900C27E9E /* UIWidget.cpp in Sources */, + EDC78D3021CA19FC00E1863C /* CCComAttribute.cpp in Sources */, + 4631CBA321AFD9FA0000D408 /* UIListView.cpp in Sources */, + 4631CB3B21AFD9F90000D408 /* UIEditBoxImpl-mac.mm in Sources */, + EDC78BE821CA19FB00E1863C /* CCSSceneReader.cpp in Sources */, 50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */, - 15AE188819AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, - B665E2561AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */, - 15AE18A419AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, - 2962D6041C61F02E004821A3 /* CCUITextFieldFormatter.m in Sources */, - 182C5CD61A98F30500C30D34 /* Sprite3DReader.cpp in Sources */, - 38D9629D1ACA9721007C6FAF /* CocoStudio.cpp in Sources */, - B665E3D61AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */, - 15AE1B5719AADA9900C27E9E /* UISlider.cpp in Sources */, - B665E2F61AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */, 1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -12256,513 +7741,167 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5020A1641D49912500E80C72 /* Atlas.c in Sources */, - 5020A2121D49912500E80C72 /* SlotData.c in Sources */, - C5F516221C822E060013B695 /* TabControlReader.cpp in Sources */, - C5F516211C822DED0013B695 /* UITabControl.cpp in Sources */, - 507B39C21C31BDD30067B53E /* CCAllocatorGlobalNewDelete.cpp in Sources */, - 507B39C31C31BDD30067B53E /* UIVideoPlayer-ios.mm in Sources */, - 507B39C41C31BDD30067B53E /* CCPUPlaneCollider.cpp in Sources */, - 507B39C51C31BDD30067B53E /* CCPUBehaviour.cpp in Sources */, - 5020A18E1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */, - 5020A1CA1D49912500E80C72 /* PathConstraint.c in Sources */, 507B39C71C31BDD30067B53E /* DetourPathQueue.cpp in Sources */, - 507B39C81C31BDD30067B53E /* CCPUPlane.cpp in Sources */, - 507B39C91C31BDD30067B53E /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, - 507B39CA1C31BDD30067B53E /* CCTableViewCell.cpp in Sources */, - 5020A1821D49912500E80C72 /* Bone.c in Sources */, - 507B39CC1C31BDD30067B53E /* ButtonReader.cpp in Sources */, - 507B39CD1C31BDD30067B53E /* CCNodeLoaderLibrary.cpp in Sources */, - 507B39CE1C31BDD30067B53E /* CCActionFrame.cpp in Sources */, - 507B39D01C31BDD30067B53E /* CCSet.cpp in Sources */, - 507B39D11C31BDD30067B53E /* CCString.cpp in Sources */, 507B39D21C31BDD30067B53E /* sweep.cc in Sources */, - 502AF97A1D0711CA006AF256 /* CCVRGenericHeadTracker.cpp in Sources */, - 507B39D31C31BDD30067B53E /* ImageViewReader.cpp in Sources */, - 507B39D51C31BDD30067B53E /* CCPUAffectorManager.cpp in Sources */, 507B39D61C31BDD30067B53E /* CCTweenFunction.cpp in Sources */, - 507B39D71C31BDD30067B53E /* CCPhysicsWorld.cpp in Sources */, 507B39D91C31BDD30067B53E /* CCGroupCommand.cpp in Sources */, - 507B39DA1C31BDD30067B53E /* CCPhysicsShape.cpp in Sources */, - 507B39DB1C31BDD30067B53E /* CCPUOnRandomObserver.cpp in Sources */, 507B39DC1C31BDD30067B53E /* CCImage.cpp in Sources */, - 507B39DD1C31BDD30067B53E /* CCPURandomiserTranslator.cpp in Sources */, 507B39DE1C31BDD30067B53E /* DetourPathCorridor.cpp in Sources */, - 507B39DF1C31BDD30067B53E /* CCNotificationCenter.cpp in Sources */, - 507B39E01C31BDD30067B53E /* UIEditBoxImpl-mac.mm in Sources */, - 507B39E31C31BDD30067B53E /* CCPURandomiser.cpp in Sources */, - 507B39E41C31BDD30067B53E /* CCControlUtils.cpp in Sources */, - 507B39E51C31BDD30067B53E /* CCPUObserver.cpp in Sources */, 507B39E71C31BDD30067B53E /* CCTrianglesCommand.cpp in Sources */, - 507B39EA1C31BDD30067B53E /* UIWidget.cpp in Sources */, 507B39EB1C31BDD30067B53E /* CCNodeGrid.cpp in Sources */, - 507B39EC1C31BDD30067B53E /* CCPUDoAffectorEventHandler.cpp in Sources */, - 507B39ED1C31BDD30067B53E /* CCPUSlaveEmitterTranslator.cpp in Sources */, - 507B39EF1C31BDD30067B53E /* CCDictionary.cpp in Sources */, 507B39F01C31BDD30067B53E /* CCVertexIndexData.cpp in Sources */, 507B39F11C31BDD30067B53E /* CCEventFocus.cpp in Sources */, - 507B39F21C31BDD30067B53E /* CCSkeleton3D.cpp in Sources */, 507B39F31C31BDD30067B53E /* DetourTileCacheBuilder.cpp in Sources */, 507B39F41C31BDD30067B53E /* CCApplication-ios.mm in Sources */, - 507B39F81C31BDD30067B53E /* CCMenuItemImageLoader.cpp in Sources */, 507B39F91C31BDD30067B53E /* fastlz.c in Sources */, 507B39FA1C31BDD30067B53E /* CCSAXParser.cpp in Sources */, - 507B39FC1C31BDD30067B53E /* CCPhysicsJoint.cpp in Sources */, - 507B39FE1C31BDD30067B53E /* UserCameraReader.cpp in Sources */, - 507B39FF1C31BDD30067B53E /* UILayoutComponent.cpp in Sources */, - 507B3A011C31BDD30067B53E /* CCPrimitiveCommand.cpp in Sources */, - 507B3A021C31BDD30067B53E /* UIScrollViewBar.cpp in Sources */, - 507B3A031C31BDD30067B53E /* CCPUOnCountObserver.cpp in Sources */, - 507B3A041C31BDD30067B53E /* CDOpenALSupport.m in Sources */, - 507B3A061C31BDD30067B53E /* SimpleAudioEngine_objc.m in Sources */, - 507B3A071C31BDD30067B53E /* CCMesh.cpp in Sources */, - 507B3A081C31BDD30067B53E /* CCPUSphereSurfaceEmitter.cpp in Sources */, 507B3A091C31BDD30067B53E /* CCImage-ios.mm in Sources */, - 507B3A0C1C31BDD30067B53E /* CCPhysicsBody.cpp in Sources */, - 507B3A0D1C31BDD30067B53E /* CCControlButton.cpp in Sources */, 507B3A0E1C31BDD30067B53E /* CCGLProgramState.cpp in Sources */, - 507B3A0F1C31BDD30067B53E /* CCPUSimpleSpline.cpp in Sources */, - 507B3A111C31BDD30067B53E /* CCPrimitive.cpp in Sources */, 507B3A121C31BDD30067B53E /* CCAutoreleasePool.cpp in Sources */, - 507B3A131C31BDD30067B53E /* CCScale9SpriteLoader.cpp in Sources */, - 507B3A141C31BDD30067B53E /* TriggerMng.cpp in Sources */, - 5020A2181D49912500E80C72 /* spine-cocos2dx.cpp in Sources */, - 507B3A181C31BDD30067B53E /* CocosDenshion.m in Sources */, - 507B3A191C31BDD30067B53E /* CCPUBaseCollider.cpp in Sources */, 507B3A1A1C31BDD30067B53E /* RecastDebugDraw.cpp in Sources */, - 507B3A1B1C31BDD30067B53E /* CCPhysicsContact.cpp in Sources */, 507B3A1C1C31BDD30067B53E /* CCAction.cpp in Sources */, 507B3A1D1C31BDD30067B53E /* CCActionCamera.cpp in Sources */, - 507B3A1E1C31BDD30067B53E /* CCPUJetAffector.cpp in Sources */, 507B3A1F1C31BDD30067B53E /* CCVertexIndexBuffer.cpp in Sources */, - 507B3A211C31BDD30067B53E /* CCScrollView.cpp in Sources */, - 507B3A231C31BDD30067B53E /* Manifest.cpp in Sources */, 507B3A261C31BDD30067B53E /* CCActionCatmullRom.cpp in Sources */, - 507B3A271C31BDD30067B53E /* CCControlHuePicker.cpp in Sources */, - 507B3A281C31BDD30067B53E /* CCFrame.cpp in Sources */, 507B3A2B1C31BDD30067B53E /* CCActionEase.cpp in Sources */, 507B3A2C1C31BDD30067B53E /* CCGLProgram.cpp in Sources */, - 507B3A2D1C31BDD30067B53E /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */, - 507B3A2F1C31BDD30067B53E /* CCPhysicsSprite3D.cpp in Sources */, - 507B3A301C31BDD30067B53E /* CCSSceneReader.cpp in Sources */, 507B3A311C31BDD30067B53E /* CCActionGrid.cpp in Sources */, - 507B3A341C31BDD30067B53E /* CCPULinearForceAffectorTranslator.cpp in Sources */, - 507B3A351C31BDD30067B53E /* CCPUUtil.cpp in Sources */, - 507B3A361C31BDD30067B53E /* CCPUGeometryRotator.cpp in Sources */, 507B3A391C31BDD30067B53E /* HttpClient-apple.mm in Sources */, - 507B3A3B1C31BDD30067B53E /* CCPUBaseForceAffectorTranslator.cpp in Sources */, - 507B3A3C1C31BDD30067B53E /* FlatBuffersSerialize.cpp in Sources */, - 507B3A3D1C31BDD30067B53E /* CCParticle3DRender.cpp in Sources */, 507B3A3E1C31BDD30067B53E /* CCClippingRectangleNode.cpp in Sources */, - 507B3A3F1C31BDD30067B53E /* CCPULinearForceAffector.cpp in Sources */, - 507B3A401C31BDD30067B53E /* CCControlPotentiometer.cpp in Sources */, - 507B3A421C31BDD30067B53E /* CCPUDynamicAttributeTranslator.cpp in Sources */, - 507B3A431C31BDD30067B53E /* CCPUOnClearObserver.cpp in Sources */, - 507B3A481C31BDD30067B53E /* UITextField.cpp in Sources */, - 507B3A491C31BDD30067B53E /* CheckBoxReader.cpp in Sources */, - 507B3A4A1C31BDD30067B53E /* CCPhysics3D.cpp in Sources */, 507B3A4B1C31BDD30067B53E /* CCEventListenerAcceleration.cpp in Sources */, - 507B3A4C1C31BDD30067B53E /* CCPUGravityAffector.cpp in Sources */, - 507B3A4D1C31BDD30067B53E /* CCPULineAffectorTranslator.cpp in Sources */, - 507B3A4F1C31BDD30067B53E /* UIEditBox.cpp in Sources */, - 5020A1AC1D49912500E80C72 /* IkConstraint.c in Sources */, 507B3A531C31BDD30067B53E /* CCController-apple.mm in Sources */, - 507B3A541C31BDD30067B53E /* CCBReader.cpp in Sources */, - 507B3A551C31BDD30067B53E /* CCArmatureDefine.cpp in Sources */, - 507B3A561C31BDD30067B53E /* CCPUOnRandomObserverTranslator.cpp in Sources */, - 5020A1D61D49912500E80C72 /* RegionAttachment.c in Sources */, 507B3A571C31BDD30067B53E /* CCMeshCommand.cpp in Sources */, - 503D4F6D1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */, 507B3A581C31BDD30067B53E /* CCStencilStateManager.cpp in Sources */, - 507B3A591C31BDD30067B53E /* CCComRender.cpp in Sources */, - 507B3A5A1C31BDD30067B53E /* SpriteReader.cpp in Sources */, - 507B3A5D1C31BDD30067B53E /* LoadingBarReader.cpp in Sources */, 507B3A5E1C31BDD30067B53E /* CCEventTouch.cpp in Sources */, - 507B3A5F1C31BDD30067B53E /* CCOBB.cpp in Sources */, - 507B3A621C31BDD30067B53E /* CCLayerLoader.cpp in Sources */, - 507B3A631C31BDD30067B53E /* CCControlStepper.cpp in Sources */, 507B3A651C31BDD30067B53E /* CCPass.cpp in Sources */, 507B3A661C31BDD30067B53E /* CCEventListenerKeyboard.cpp in Sources */, - 507B3A671C31BDD30067B53E /* CCPUGravityAffectorTranslator.cpp in Sources */, - 507B3A681C31BDD30067B53E /* CCScrollViewLoader.cpp in Sources */, 507B3A691C31BDD30067B53E /* AudioEngine-inl.mm in Sources */, 507B3A6B1C31BDD30067B53E /* CCEvent.cpp in Sources */, 1A41ABC41DF00CEC00B5584C /* AudioDecoder.mm in Sources */, 507B3A6D1C31BDD30067B53E /* shapes.cc in Sources */, 507B3A6F1C31BDD30067B53E /* CCScheduler.cpp in Sources */, 507B3A711C31BDD30067B53E /* CCEventCustom.cpp in Sources */, - 507B3A731C31BDD30067B53E /* CCControlSlider.cpp in Sources */, - 507B3A741C31BDD30067B53E /* CCAttachNode.cpp in Sources */, - 507B3A751C31BDD30067B53E /* CCParticleSystem3D.cpp in Sources */, - 507B3A761C31BDD30067B53E /* CCBSequenceProperty.cpp in Sources */, 1A40D0DE1E8E4C76002E363A /* md5.c in Sources */, - 507B3A791C31BDD30067B53E /* CCControlButtonLoader.cpp in Sources */, 507B3A7B1C31BDD30067B53E /* CCEventListenerTouch.cpp in Sources */, 507B3A7E1C31BDD30067B53E /* DetourTileCache.cpp in Sources */, - 507B3A811C31BDD30067B53E /* CCSprite3D.cpp in Sources */, 507B3A821C31BDD30067B53E /* CCEventKeyboard.cpp in Sources */, - 507B3A831C31BDD30067B53E /* CCArmatureDataManager.cpp in Sources */, - 507B3A841C31BDD30067B53E /* CCPUBehaviourManager.cpp in Sources */, - 507B3A851C31BDD30067B53E /* CCPUParticleSystem3D.cpp in Sources */, 507B3A861C31BDD30067B53E /* CCLight.cpp in Sources */, - 507B3A871C31BDD30067B53E /* UIScrollView.cpp in Sources */, 507B3A881C31BDD30067B53E /* CCActionGrid3D.cpp in Sources */, - 507B3A8B1C31BDD30067B53E /* SliderReader.cpp in Sources */, - 507B3A8D1C31BDD30067B53E /* CCPURibbonTrail.cpp in Sources */, - 507B3A8E1C31BDD30067B53E /* CCPUAffector.cpp in Sources */, - 507B3A8F1C31BDD30067B53E /* UIText.cpp in Sources */, 468A14F41EF223B700ECA675 /* idl_gen_text.cpp in Sources */, 507B3A941C31BDD30067B53E /* DetourLocalBoundary.cpp in Sources */, - 507B3A951C31BDD30067B53E /* CCLayerColorLoader.cpp in Sources */, 507B3A961C31BDD30067B53E /* TransformUtils.cpp in Sources */, - 5020A1521D49912500E80C72 /* Animation.c in Sources */, - 507B3A971C31BDD30067B53E /* CCPUInterParticleCollider.cpp in Sources */, - 507B3A981C31BDD30067B53E /* UIEditBoxImpl-android.cpp in Sources */, - 507B3A991C31BDD30067B53E /* CCArmature.cpp in Sources */, - 5020A1F41D49912500E80C72 /* SkeletonData.c in Sources */, 507B3A9A1C31BDD30067B53E /* CCActionInstant.cpp in Sources */, - 46BDE4DE1FA87D4900104C05 /* ClippingAttachment.c in Sources */, 507B3A9C1C31BDD30067B53E /* DetourObstacleAvoidance.cpp in Sources */, - 46BDE4DC1FA87CD700104C05 /* VertexEffect.c in Sources */, - 507B3A9D1C31BDD30067B53E /* CCControlColourPicker.cpp in Sources */, - 507B3AA01C31BDD30067B53E /* ComAudioReader.cpp in Sources */, 507B3AA21C31BDD30067B53E /* CCValue.cpp in Sources */, 507B3AA31C31BDD30067B53E /* Vec2.cpp in Sources */, - 507B3AA41C31BDD30067B53E /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, - 507B3AA61C31BDD30067B53E /* CCPUOnCountObserverTranslator.cpp in Sources */, - 507B3AA71C31BDD30067B53E /* CocoLoader.cpp in Sources */, - 507B3AA81C31BDD30067B53E /* CCPURibbonTrailRender.cpp in Sources */, - 507B3AA91C31BDD30067B53E /* CCBoneNode.cpp in Sources */, 507B3AAA1C31BDD30067B53E /* CCDirector.cpp in Sources */, - 507B3AAB1C31BDD30067B53E /* CCTableView.cpp in Sources */, - 507B3AAD1C31BDD30067B53E /* CCPUPositionEmitter.cpp in Sources */, 507B3AAE1C31BDD30067B53E /* CCActionInterval.cpp in Sources */, - 507B3AAF1C31BDD30067B53E /* CCControlSaturationBrightnessPicker.cpp in Sources */, - 5020A1EE1D49912500E80C72 /* SkeletonBounds.c in Sources */, - 507B3AB11C31BDD30067B53E /* CCPUInterParticleColliderTranslator.cpp in Sources */, - 507B3AB21C31BDD30067B53E /* CCPUOnEmissionObserver.cpp in Sources */, 507B3AB31C31BDD30067B53E /* CCActionManager.cpp in Sources */, 507B3AB41C31BDD30067B53E /* CCDownloader-apple.mm in Sources */, - 507B3AB51C31BDD30067B53E /* CCPUBoxColliderTranslator.cpp in Sources */, 507B3AB61C31BDD30067B53E /* CCActionPageTurn3D.cpp in Sources */, 468A14F71EF223B700ECA675 /* idl_parser.cpp in Sources */, 507B3AB81C31BDD30067B53E /* CCActionProgressTimer.cpp in Sources */, - 507B3ABA1C31BDD30067B53E /* CCPUSlaveBehaviourTranslator.cpp in Sources */, - 507B3ABB1C31BDD30067B53E /* CCBKeyframe.cpp in Sources */, - 507B3ABF1C31BDD30067B53E /* LocalStorage-android.cpp in Sources */, - 5020A1E21D49912500E80C72 /* SkeletonAnimation.cpp in Sources */, - 5020A2271D49912500E80C72 /* TransformConstraintData.c in Sources */, 507B3AC01C31BDD30067B53E /* ZipUtils.cpp in Sources */, - 5020A1D01D49912500E80C72 /* PathConstraintData.c in Sources */, - 5020A20C1D49912500E80C72 /* Slot.c in Sources */, - 507B3AC11C31BDD30067B53E /* UIHelper.cpp in Sources */, - 507B3AC31C31BDD30067B53E /* CCPhysics3DDebugDrawer.cpp in Sources */, - 507B3AC61C31BDD30067B53E /* CCBundle3D.cpp in Sources */, 507B3AC91C31BDD30067B53E /* CCActionTiledGrid.cpp in Sources */, - 507B3ACA1C31BDD30067B53E /* CCNavMeshAgent.cpp in Sources */, - 5020A22D1D49912500E80C72 /* VertexAttachment.c in Sources */, 507B3ACC1C31BDD30067B53E /* CCActionTween.cpp in Sources */, 507B3ACD1C31BDD30067B53E /* CCAtlasNode.cpp in Sources */, - 507B3ACF1C31BDD30067B53E /* CCPhysics3DObject.cpp in Sources */, - 507B3AD01C31BDD30067B53E /* CCPUEmitter.cpp in Sources */, - 46BDE4DB1FA87CD500104C05 /* Triangulator.c in Sources */, 507B3AD11C31BDD30067B53E /* MathUtil.cpp in Sources */, 507B3AD21C31BDD30067B53E /* DetourNavMeshQuery.cpp in Sources */, - 507B3AD31C31BDD30067B53E /* CCDataVisitor.cpp in Sources */, 507B3AD51C31BDD30067B53E /* CCNode.cpp in Sources */, - 507B3AD61C31BDD30067B53E /* CCDrawingPrimitives.cpp in Sources */, - 507B3AD71C31BDD30067B53E /* CCPUSlaveEmitter.cpp in Sources */, 507B3AD81C31BDD30067B53E /* CCDrawNode.cpp in Sources */, - 507B3AD91C31BDD30067B53E /* CCGrabber.cpp in Sources */, - 507B3ADA1C31BDD30067B53E /* ParticleReader.cpp in Sources */, 507B3ADC1C31BDD30067B53E /* CCGrid.cpp in Sources */, - 507B3ADD1C31BDD30067B53E /* CCAnimation3D.cpp in Sources */, - 507B3ADF1C31BDD30067B53E /* CCPlane.cpp in Sources */, 507B3AE01C31BDD30067B53E /* CCFont.cpp in Sources */, - 507B3AE21C31BDD30067B53E /* CCSpriteFrameCacheHelper.cpp in Sources */, - 507B3AE31C31BDD30067B53E /* CCActionManagerEx.cpp in Sources */, - 507B3AE41C31BDD30067B53E /* CCEventListenerAssetsManagerEx.cpp in Sources */, 507B3AE61C31BDD30067B53E /* CCCommon-ios.mm in Sources */, - 507B3AE71C31BDD30067B53E /* UIEditBoxImpl-ios.mm in Sources */, - 507B3AE81C31BDD30067B53E /* CCNavMeshObstacle.cpp in Sources */, - 507B3AED1C31BDD30067B53E /* CCComExtensionData.cpp in Sources */, 507B3AF01C31BDD30067B53E /* CCFontAtlas.cpp in Sources */, 507B3AF11C31BDD30067B53E /* CCController.cpp in Sources */, 507B3AF31C31BDD30067B53E /* CCFileUtils.cpp in Sources */, 507B3AF41C31BDD30067B53E /* ccRandom.cpp in Sources */, 507B3AF51C31BDD30067B53E /* ioapi_mem.cpp in Sources */, - 507B3AF61C31BDD30067B53E /* ProjectNodeReader.cpp in Sources */, - 507B3AF71C31BDD30067B53E /* CCMenuItemLoader.cpp in Sources */, - 507B3AF91C31BDD30067B53E /* CCPUDoStopSystemEventHandler.cpp in Sources */, 507B3AFA1C31BDD30067B53E /* base64.cpp in Sources */, - 507B3AFB1C31BDD30067B53E /* CCPUOnVelocityObserverTranslator.cpp in Sources */, 507B3AFC1C31BDD30067B53E /* CCFontAtlasCache.cpp in Sources */, - 507B3AFD1C31BDD30067B53E /* TriggerObj.cpp in Sources */, - 507B3AFE1C31BDD30067B53E /* CCPhysics3DConstraint.cpp in Sources */, - 507B3AFF1C31BDD30067B53E /* CCNavMeshDebugDraw.cpp in Sources */, - 507B3B001C31BDD30067B53E /* CCActionTimelineNode.cpp in Sources */, - 507B3B011C31BDD30067B53E /* WidgetReader.cpp in Sources */, - 507B3B021C31BDD30067B53E /* CCPUOnVelocityObserver.cpp in Sources */, - 507B3B041C31BDD30067B53E /* CCPUObserverTranslator.cpp in Sources */, - 507B3B061C31BDD30067B53E /* CCPUAlignAffectorTranslator.cpp in Sources */, - 46BDE4DA1FA87CD200104C05 /* SkeletonTwoColorBatch.cpp in Sources */, 507B3B081C31BDD30067B53E /* CCFontFNT.cpp in Sources */, - 507B3B091C31BDD30067B53E /* CCParticle3DAffector.cpp in Sources */, - 507B3B0A1C31BDD30067B53E /* CCPUBillboardChain.cpp in Sources */, - 507B3B0B1C31BDD30067B53E /* GameNode3DReader.cpp in Sources */, 507B3B0C1C31BDD30067B53E /* CCFontFreeType.cpp in Sources */, 468A14EB1EF223B700ECA675 /* idl_gen_fbs.cpp in Sources */, - 507B3B0D1C31BDD30067B53E /* CCPUTechniqueTranslator.cpp in Sources */, - 507B3B0E1C31BDD30067B53E /* ExtensionDeprecated.cpp in Sources */, 507B3B0F1C31BDD30067B53E /* ccTypes.cpp in Sources */, - 507B3B101C31BDD30067B53E /* DictionaryHelper.cpp in Sources */, 468A14E81EF223B700ECA675 /* idl_gen_cpp.cpp in Sources */, - 507B3B131C31BDD30067B53E /* CCPUDoFreezeEventHandler.cpp in Sources */, - 5020A1A01D49912500E80C72 /* EventData.c in Sources */, 507B3B151C31BDD30067B53E /* CCLabel.cpp in Sources */, - 507B3B161C31BDD30067B53E /* CCBFileLoader.cpp in Sources */, - 507B3B181C31BDD30067B53E /* UIRadioButton.cpp in Sources */, - 507B3B191C31BDD30067B53E /* CCBAnimationManager.cpp in Sources */, - 507B3B1A1C31BDD30067B53E /* UIListView.cpp in Sources */, 507B3B1B1C31BDD30067B53E /* CCLabelAtlas.cpp in Sources */, 507B3B1C1C31BDD30067B53E /* CCAutoPolygon.cpp in Sources */, - 507B3B1D1C31BDD30067B53E /* UIEditBoxImpl-common.cpp in Sources */, - 507B3B201C31BDD30067B53E /* CCLabelBMFont.cpp in Sources */, 507B3B211C31BDD30067B53E /* edtaa3func.cpp in Sources */, - 507B3B221C31BDD30067B53E /* CCPUOnEventFlagObserverTranslator.cpp in Sources */, - 507B3B231C31BDD30067B53E /* CCColliderDetector.cpp in Sources */, - 507B3B271C31BDD30067B53E /* CCPUParticleFollowerTranslator.cpp in Sources */, - 507B3B291C31BDD30067B53E /* UISlider.cpp in Sources */, 507B3B2A1C31BDD30067B53E /* DetourNavMesh.cpp in Sources */, - 507B3B2B1C31BDD30067B53E /* CCPhysics3DWorld.cpp in Sources */, - 507B3B2C1C31BDD30067B53E /* CCPUOnExpireObserverTranslator.cpp in Sources */, - 5020A1941D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */, - 507B3B311C31BDD30067B53E /* UILayoutParameter.cpp in Sources */, - 507B3B321C31BDD30067B53E /* SingleNodeReader.cpp in Sources */, - 507B3B351C31BDD30067B53E /* CCPUDynamicAttribute.cpp in Sources */, - 507B3B371C31BDD30067B53E /* ListViewReader.cpp in Sources */, 507B3B381C31BDD30067B53E /* CCLabelTextFormatter.cpp in Sources */, - 507B3B391C31BDD30067B53E /* CCLabelTTF.cpp in Sources */, 507B3B3A1C31BDD30067B53E /* CCNinePatchImageParser.cpp in Sources */, - 507B3B3B1C31BDD30067B53E /* CCPUPointEmitterTranslator.cpp in Sources */, - 507B3B3C1C31BDD30067B53E /* NodeReader.cpp in Sources */, - 507B3B3D1C31BDD30067B53E /* CCActionObject.cpp in Sources */, - 507B3B3E1C31BDD30067B53E /* CCPUTextureAnimatorTranslator.cpp in Sources */, 507B3B3F1C31BDD30067B53E /* cdt.cc in Sources */, - 507B3B401C31BDD30067B53E /* CCPUOnPositionObserver.cpp in Sources */, - 507B3B421C31BDD30067B53E /* CCSkinNode.cpp in Sources */, 507B3B441C31BDD30067B53E /* ObjectFactory.cpp in Sources */, 507B3B451C31BDD30067B53E /* CCLayer.cpp in Sources */, 507B3B471C31BDD30067B53E /* CCTextureCache.cpp in Sources */, - 507B3B481C31BDD30067B53E /* CCPUMaterialManager.cpp in Sources */, 507B3B491C31BDD30067B53E /* CCScene.cpp in Sources */, 507B3B4A1C31BDD30067B53E /* Vec4.cpp in Sources */, - 507B3B4B1C31BDD30067B53E /* CCBillBoard.cpp in Sources */, - 507B3B4C1C31BDD30067B53E /* Particle3DReader.cpp in Sources */, - 507B3B4D1C31BDD30067B53E /* CCSprite3DMaterial.cpp in Sources */, - 507B3B501C31BDD30067B53E /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */, 507B3B511C31BDD30067B53E /* CCTransition.cpp in Sources */, - 507B3B531C31BDD30067B53E /* CCEventAssetsManagerEx.cpp in Sources */, - 507B3B541C31BDD30067B53E /* UIWebView.mm in Sources */, - 507B3B551C31BDD30067B53E /* CCLabelBMFontLoader.cpp in Sources */, - 507B3B571C31BDD30067B53E /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */, - 507B3B581C31BDD30067B53E /* CCThread.cpp in Sources */, - 507B3B591C31BDD30067B53E /* CCUISingleLineTextField.mm in Sources */, 507B3B5B1C31BDD30067B53E /* CCTransitionPageTurn.cpp in Sources */, - 507B3B5D1C31BDD30067B53E /* CCPUOnPositionObserverTranslator.cpp in Sources */, 507B3B5E1C31BDD30067B53E /* CCTransitionProgress.cpp in Sources */, - 507B3B5F1C31BDD30067B53E /* CCSkybox.cpp in Sources */, - 507B3B601C31BDD30067B53E /* CCFrameBuffer.cpp in Sources */, 507B3B611C31BDD30067B53E /* CCMenu.cpp in Sources */, - 507B3B621C31BDD30067B53E /* NodeReaderProtocol.cpp in Sources */, 507B3B631C31BDD30067B53E /* Quaternion.cpp in Sources */, 507B3B641C31BDD30067B53E /* CCMenuItem.cpp in Sources */, 507B3B651C31BDD30067B53E /* CCProperties.cpp in Sources */, - 507B3B671C31BDD30067B53E /* CCPUEventHandlerTranslator.cpp in Sources */, - 507B3B691C31BDD30067B53E /* CCDecorativeDisplay.cpp in Sources */, - 507B3B6A1C31BDD30067B53E /* TextReader.cpp in Sources */, - 50F965531CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */, 507B3B6B1C31BDD30067B53E /* Mat4.cpp in Sources */, 507B3B6C1C31BDD30067B53E /* CCClippingNode.cpp in Sources */, - 46BDE4D81FA87CCC00104C05 /* PointAttachment.c in Sources */, - 507B3B6D1C31BDD30067B53E /* UIButton.cpp in Sources */, 507B3B6E1C31BDD30067B53E /* CCMotionStreak.cpp in Sources */, 507B3B6F1C31BDD30067B53E /* CCProgressTimer.cpp in Sources */, - 507B3B701C31BDD30067B53E /* CCArmatureAnimation.cpp in Sources */, 507B3B711C31BDD30067B53E /* CCGLViewImpl-ios.mm in Sources */, - 507B3B721C31BDD30067B53E /* CCActionTimeline.cpp in Sources */, - 507B3B731C31BDD30067B53E /* TextAtlasReader.cpp in Sources */, 507B3B741C31BDD30067B53E /* DebugDraw.cpp in Sources */, - 507B3B751C31BDD30067B53E /* CCPUEventHandlerManager.cpp in Sources */, - 507B3B771C31BDD30067B53E /* CCBone.cpp in Sources */, 507B3B781C31BDD30067B53E /* CCRenderTexture.cpp in Sources */, 507B3B7A1C31BDD30067B53E /* CCParticleBatchNode.cpp in Sources */, - 507B3B7B1C31BDD30067B53E /* UIEditBoxImpl-stub.cpp in Sources */, - 507B3B7C1C31BDD30067B53E /* CCPUDoEnableComponentEventHandler.cpp in Sources */, - 507B3B7D1C31BDD30067B53E /* CCPUOnExpireObserver.cpp in Sources */, - 507B3B7E1C31BDD30067B53E /* SimpleAudioEngine.mm in Sources */, - 5020A1B21D49912500E80C72 /* IkConstraintData.c in Sources */, - 5020A19A1D49912500E80C72 /* Event.c in Sources */, - 507B3B801C31BDD30067B53E /* CCControl.cpp in Sources */, 507B3B821C31BDD30067B53E /* CCParticleExamples.cpp in Sources */, - 507B3B841C31BDD30067B53E /* CCComController.cpp in Sources */, - 507B3B851C31BDD30067B53E /* CCTerrain.cpp in Sources */, - 507B3B861C31BDD30067B53E /* CCPUScriptCompiler.cpp in Sources */, 507B3B871C31BDD30067B53E /* CCParticleSystem.cpp in Sources */, - 507B3B881C31BDD30067B53E /* CCMeshSkin.cpp in Sources */, 507B3B891C31BDD30067B53E /* CCCamera.cpp in Sources */, - 507B3B8A1C31BDD30067B53E /* CCPUSineForceAffectorTranslator.cpp in Sources */, 507B3B8B1C31BDD30067B53E /* SocketIO.cpp in Sources */, 507B3B8F1C31BDD30067B53E /* DetourNavMeshBuilder.cpp in Sources */, - 507B3B901C31BDD30067B53E /* CCPUVelocityMatchingAffector.cpp in Sources */, - 507B3B911C31BDD30067B53E /* CCPUOnEmissionObserverTranslator.cpp in Sources */, - 507B3B921C31BDD30067B53E /* TextBMFontReader.cpp in Sources */, 507B3B931C31BDD30067B53E /* DetourCommon.cpp in Sources */, - 507B3B941C31BDD30067B53E /* CCInvocation.cpp in Sources */, 507B3B951C31BDD30067B53E /* CCFastTMXTiledMap.cpp in Sources */, - 507B3B961C31BDD30067B53E /* ArmatureNodeReader.cpp in Sources */, - 5020A2061D49912500E80C72 /* Skin.c in Sources */, - 507B3B981C31BDD30067B53E /* CCPUFlockCenteringAffector.cpp in Sources */, - 507B3B991C31BDD30067B53E /* CCPUOnTimeObserverTranslator.cpp in Sources */, - 507B3B9A1C31BDD30067B53E /* CCPUDoScaleEventHandler.cpp in Sources */, - 507B3B9B1C31BDD30067B53E /* CCNodeLoader.cpp in Sources */, - 507B3B9C1C31BDD30067B53E /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */, - 507B3B9D1C31BDD30067B53E /* WidgetCallBackHandlerProtocol.cpp in Sources */, - 507B3B9E1C31BDD30067B53E /* UIWebViewImpl-ios.mm in Sources */, - 507B3B9F1C31BDD30067B53E /* CCPUGeometryRotatorTranslator.cpp in Sources */, 507B3BA31C31BDD30067B53E /* CCFastTMXLayer.cpp in Sources */, 507B3BA41C31BDD30067B53E /* CCParticleSystemQuad.cpp in Sources */, 507B3BA51C31BDD30067B53E /* CCGLProgramCache.cpp in Sources */, - 507B3BA61C31BDD30067B53E /* CCTimeLine.cpp in Sources */, 507B3BA91C31BDD30067B53E /* CCSprite.cpp in Sources */, - 507B3BAB1C31BDD30067B53E /* CCPUColorAffectorTranslator.cpp in Sources */, - 507B3BAC1C31BDD30067B53E /* CCComAudio.cpp in Sources */, - 507B3BAD1C31BDD30067B53E /* TriggerBase.cpp in Sources */, - 507B3BAE1C31BDD30067B53E /* UICheckBox.cpp in Sources */, - 507B3BB11C31BDD30067B53E /* CCPUOnCollisionObserver.cpp in Sources */, - 507B3BB21C31BDD30067B53E /* CCPUOnCollisionObserverTranslator.cpp in Sources */, - 507B3BB31C31BDD30067B53E /* CCBSequence.cpp in Sources */, - 507B3BB41C31BDD30067B53E /* CCPUScaleAffectorTranslator.cpp in Sources */, - 507B3BB51C31BDD30067B53E /* CCPUDoExpireEventHandler.cpp in Sources */, 507B3BB81C31BDD30067B53E /* CCSpriteBatchNode.cpp in Sources */, - 507B3BBA1C31BDD30067B53E /* CCPUListener.cpp in Sources */, 507B3BBB1C31BDD30067B53E /* CCSpriteFrame.cpp in Sources */, - 507B3BBC1C31BDD30067B53E /* HttpConnection-winrt.cpp in Sources */, - 507B3BBE1C31BDD30067B53E /* UITextField+CCUITextInput.mm in Sources */, - 5020A1FA1D49912500E80C72 /* SkeletonJson.c in Sources */, - 507B3BBF1C31BDD30067B53E /* CCPUCollisionAvoidanceAffector.cpp in Sources */, - 507B3BC11C31BDD30067B53E /* CCPUSlaveBehaviour.cpp in Sources */, - 507B3BC21C31BDD30067B53E /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */, - 507B3BC31C31BDD30067B53E /* CCBatchNode.cpp in Sources */, - 507B3BC41C31BDD30067B53E /* CDAudioManager.m in Sources */, 507B3BC51C31BDD30067B53E /* CCSpriteFrameCache.cpp in Sources */, 507B3BC61C31BDD30067B53E /* sweep_context.cc in Sources */, - 507B3BC71C31BDD30067B53E /* CCPUSineForceAffector.cpp in Sources */, 507B3BC81C31BDD30067B53E /* CCAnimation.cpp in Sources */, - 507B3BCA1C31BDD30067B53E /* CCDataReaderHelper.cpp in Sources */, 507B3BCB1C31BDD30067B53E /* CCVertexAttribBinding.cpp in Sources */, 507B3BCC1C31BDD30067B53E /* advancing_front.cc in Sources */, - 507B3BCD1C31BDD30067B53E /* UIScale9Sprite.cpp in Sources */, - 507B3BCE1C31BDD30067B53E /* PageViewReader.cpp in Sources */, - 507B3BCF1C31BDD30067B53E /* CCParticle3DEmitter.cpp in Sources */, 507B3BD01C31BDD30067B53E /* CCAnimationCache.cpp in Sources */, - 507B3BD11C31BDD30067B53E /* CCPUSphereColliderTranslator.cpp in Sources */, 507B3BD21C31BDD30067B53E /* CCConfiguration.cpp in Sources */, 507B3BD61C31BDD30067B53E /* CCTextFieldTTF.cpp in Sources */, - 507B3BD71C31BDD30067B53E /* CCPhysicsSprite.cpp in Sources */, 507B3BD81C31BDD30067B53E /* CCTileMapAtlas.cpp in Sources */, - 507B3BD91C31BDD30067B53E /* CCPUTextureAnimator.cpp in Sources */, - 5020A1701D49912500E80C72 /* Attachment.c in Sources */, 507B3BDA1C31BDD30067B53E /* CCTMXLayer.cpp in Sources */, - 507B3BDB1C31BDD30067B53E /* UIHBox.cpp in Sources */, - 507B3BDD1C31BDD30067B53E /* CCPUScriptTranslator.cpp in Sources */, - 507B3BDE1C31BDD30067B53E /* CCPUOnEventFlagObserver.cpp in Sources */, - 507B3BDF1C31BDD30067B53E /* CCMotionStreak3D.cpp in Sources */, 507B3BE01C31BDD30067B53E /* CCTMXObjectGroup.cpp in Sources */, - 507B3BE11C31BDD30067B53E /* GameMapReader.cpp in Sources */, - 46BDE4E21FA87D5000104C05 /* Array.c in Sources */, - 507B3BE21C31BDD30067B53E /* UILayoutManager.cpp in Sources */, - 507B3BE31C31BDD30067B53E /* CCBundleReader.cpp in Sources */, - 507B3BE41C31BDD30067B53E /* CCPUForceFieldAffector.cpp in Sources */, 507B3BE51C31BDD30067B53E /* CCGeometry.cpp in Sources */, - 507B3BE61C31BDD30067B53E /* CCPUNoise.cpp in Sources */, - 507B3BE71C31BDD30067B53E /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */, - 507B3BE91C31BDD30067B53E /* CCSpriteLoader.cpp in Sources */, 507B3BEA1C31BDD30067B53E /* s3tc.cpp in Sources */, - 507B3BEB1C31BDD30067B53E /* UIRichText.cpp in Sources */, - 507B3BED1C31BDD30067B53E /* CCSkin.cpp in Sources */, - 507B3BEE1C31BDD30067B53E /* CCPUJetAffectorTranslator.cpp in Sources */, 507B3BF31C31BDD30067B53E /* CCTMXTiledMap.cpp in Sources */, 507B3BF41C31BDD30067B53E /* etc1.cpp in Sources */, 507B3BF51C31BDD30067B53E /* CCNS.cpp in Sources */, 507B3BF61C31BDD30067B53E /* DetourDebugDraw.cpp in Sources */, - 507B3BFB1C31BDD30067B53E /* SkeletonNodeReader.cpp in Sources */, - 507B3BFC1C31BDD30067B53E /* CCAllocatorGlobal.cpp in Sources */, - 507B3BFD1C31BDD30067B53E /* CCPUBehaviourTranslator.cpp in Sources */, - 507B3BFE1C31BDD30067B53E /* CCPUScriptParser.cpp in Sources */, - 507B3BFF1C31BDD30067B53E /* CCPUBoxEmitter.cpp in Sources */, - 507B3C001C31BDD30067B53E /* UIVBox.cpp in Sources */, - 5020A1A61D49912500E80C72 /* extension.c in Sources */, - 507B3C021C31BDD30067B53E /* CCRenderer.cpp in Sources */, - 507B3C031C31BDD30067B53E /* CCPURender.cpp in Sources */, - 5020A15E1D49912500E80C72 /* AnimationStateData.c in Sources */, - 507B3C051C31BDD30067B53E /* CCPULineEmitter.cpp in Sources */, - 507B3C071C31BDD30067B53E /* CocoStudio.cpp in Sources */, 507B3C081C31BDD30067B53E /* CCTextureAtlas.cpp in Sources */, 507B3C091C31BDD30067B53E /* CCTMXXMLParser.cpp in Sources */, - 507B3C0A1C31BDD30067B53E /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */, 507B3C0B1C31BDD30067B53E /* CCParallaxNode.cpp in Sources */, - 507B3C0C1C31BDD30067B53E /* CCPUAlignAffector.cpp in Sources */, 507B3C0F1C31BDD30067B53E /* CCComponent.cpp in Sources */, - 507B3C101C31BDD30067B53E /* UIDeprecated.cpp in Sources */, 507B3C121C31BDD30067B53E /* pvr.cpp in Sources */, - 507B3C131C31BDD30067B53E /* CCFrustum.cpp in Sources */, - 507B3C141C31BDD30067B53E /* CCPUBoxCollider.cpp in Sources */, - 507B3C151C31BDD30067B53E /* CCPUMeshSurfaceEmitter.cpp in Sources */, - 507B3C161C31BDD30067B53E /* CCPUOnQuotaObserverTranslator.cpp in Sources */, - 94A6DF081C73040E0094AEF7 /* LocalizationManager.cpp in Sources */, - 507B3C171C31BDD30067B53E /* UIPageView.cpp in Sources */, 507B3C181C31BDD30067B53E /* CCComponentContainer.cpp in Sources */, 507B3C191C31BDD30067B53E /* ccCArray.cpp in Sources */, - 507B3C1A1C31BDD30067B53E /* CCActionNode.cpp in Sources */, 468A14F11EF223B700ECA675 /* idl_gen_go.cpp in Sources */, - 507B3C1B1C31BDD30067B53E /* CCDisplayFactory.cpp in Sources */, - 507B3C1C1C31BDD30067B53E /* Sprite3DReader.cpp in Sources */, - 507B3C1D1C31BDD30067B53E /* CCThread-apple.mm in Sources */, - 507B3C1E1C31BDD30067B53E /* UIAbstractCheckButton.cpp in Sources */, 507B3C201C31BDD30067B53E /* CCUserDefault-android.cpp in Sources */, 507B3C221C31BDD30067B53E /* tinyxml2.cpp in Sources */, 507B3C231C31BDD30067B53E /* CCTexture2D.cpp in Sources */, - 507B3C241C31BDD30067B53E /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */, - 507B3C251C31BDD30067B53E /* UILayout.cpp in Sources */, 507B3C261C31BDD30067B53E /* ioapi.cpp in Sources */, - 507B3C271C31BDD30067B53E /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */, - 5020A1DC1D49912500E80C72 /* Skeleton.c in Sources */, - 507B3C281C31BDD30067B53E /* CCPUForceField.cpp in Sources */, - 5020A17C1D49912500E80C72 /* AttachmentVertices.cpp in Sources */, 507B3C291C31BDD30067B53E /* unzip.cpp in Sources */, - 507B3C2A1C31BDD30067B53E /* CCControlLoader.cpp in Sources */, - 507B3C2B1C31BDD30067B53E /* TextFieldReader.cpp in Sources */, - 507B3C2C1C31BDD30067B53E /* CCPUEmitterTranslator.cpp in Sources */, - 507B3C2D1C31BDD30067B53E /* NodeReaderDefine.cpp in Sources */, - 507B3C2E1C31BDD30067B53E /* CCSGUIReader.cpp in Sources */, 507B3C2F1C31BDD30067B53E /* CCCustomCommand.cpp in Sources */, - 507B3C311C31BDD30067B53E /* ScrollViewReader.cpp in Sources */, - 507B3C321C31BDD30067B53E /* UITextView+CCUITextInput.mm in Sources */, - 507B3C331C31BDD30067B53E /* CCSkeletonNode.cpp in Sources */, 507B3C341C31BDD30067B53E /* CCProfiling.cpp in Sources */, 507B3C351C31BDD30067B53E /* CCTechnique.cpp in Sources */, - 507B3C361C31BDD30067B53E /* CCMeshVertexIndexData.cpp in Sources */, 507B3C371C31BDD30067B53E /* CCEventListener.cpp in Sources */, 507B3C381C31BDD30067B53E /* CCRenderState.cpp in Sources */, - 507B3C391C31BDD30067B53E /* AssetsManager.cpp in Sources */, 507B3C3B1C31BDD30067B53E /* CCTouch.cpp in Sources */, - 507B3C3E1C31BDD30067B53E /* CCPUParticleSystem3DTranslator.cpp in Sources */, - 507B3C401C31BDD30067B53E /* CCES2Renderer-ios.m in Sources */, 507B3C411C31BDD30067B53E /* cocos2d.cpp in Sources */, - 507B3C461C31BDD30067B53E /* CCRay.cpp in Sources */, - 507B3C471C31BDD30067B53E /* UITextBMFont.cpp in Sources */, - 5020A1761D49912500E80C72 /* AttachmentLoader.c in Sources */, 507B3C491C31BDD30067B53E /* CCEventListenerFocus.cpp in Sources */, 507B3C4B1C31BDD30067B53E /* CCEventListenerCustom.cpp in Sources */, 507B3C4C1C31BDD30067B53E /* CCIMEDispatcher.cpp in Sources */, @@ -12773,150 +7912,54 @@ 507B3C521C31BDD30067B53E /* CCTextureCube.cpp in Sources */, 507B3C551C31BDD30067B53E /* HttpAsynConnection-apple.m in Sources */, 507B3C561C31BDD30067B53E /* RecastDump.cpp in Sources */, - 507B3C571C31BDD30067B53E /* CCPUCircleEmitter.cpp in Sources */, - 507B3C581C31BDD30067B53E /* UITextAtlas.cpp in Sources */, - 507B3C591C31BDD30067B53E /* CCProcessBase.cpp in Sources */, 507B3C5A1C31BDD30067B53E /* DetourAlloc.cpp in Sources */, - 507B3C5B1C31BDD30067B53E /* CCPUSphereCollider.cpp in Sources */, - 507B3C5C1C31BDD30067B53E /* CCParticleSystemQuadLoader.cpp in Sources */, - 507B3C601C31BDD30067B53E /* CCPUBoxEmitterTranslator.cpp in Sources */, - 507B3C611C31BDD30067B53E /* CCTransformHelp.cpp in Sources */, 468A14E51EF223B700ECA675 /* flatc.cpp in Sources */, - 507B3C631C31BDD30067B53E /* LayoutReader.cpp in Sources */, - 507B3C641C31BDD30067B53E /* CCDeprecated.cpp in Sources */, - 507B3C651C31BDD30067B53E /* CCInputDelegate.cpp in Sources */, - 507B3C671C31BDD30067B53E /* UIImageView.cpp in Sources */, 507B3C681C31BDD30067B53E /* DetourCrowd.cpp in Sources */, 507B3C691C31BDD30067B53E /* CCAffineTransform.cpp in Sources */, - 507B3C6C1C31BDD30067B53E /* CCPUPathFollower.cpp in Sources */, - 507B3C6D1C31BDD30067B53E /* CCPhysicsDebugNode.cpp in Sources */, - 5033419E1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */, - 507B3C701C31BDD30067B53E /* CCBatchCommand.cpp in Sources */, - 507B3C711C31BDD30067B53E /* CCPUBeamRender.cpp in Sources */, 507B3C721C31BDD30067B53E /* CCRenderCommand.cpp in Sources */, - 507B3C731C31BDD30067B53E /* CCPUAffectorTranslator.cpp in Sources */, - 507B3C741C31BDD30067B53E /* CCPUPlaneColliderTranslator.cpp in Sources */, - 507B3C761C31BDD30067B53E /* UIPageViewIndicator.cpp in Sources */, - 503D4F651CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */, - 507B3C771C31BDD30067B53E /* CCPUColorAffector.cpp in Sources */, - 507B3C781C31BDD30067B53E /* CCPUBaseForceAffector.cpp in Sources */, - 507B3C791C31BDD30067B53E /* UILoadingBar.cpp in Sources */, 507B3C7A1C31BDD30067B53E /* CCScriptSupport.cpp in Sources */, - 507B3C7C1C31BDD30067B53E /* BoneNodeReader.cpp in Sources */, 507B3C7D1C31BDD30067B53E /* CCMaterial.cpp in Sources */, - 5020A1BE1D49912500E80C72 /* MeshAttachment.c in Sources */, - 507B3C7E1C31BDD30067B53E /* CCPUPointEmitter.cpp in Sources */, 507B3C811C31BDD30067B53E /* CCEventListenerController.cpp in Sources */, 507B3C831C31BDD30067B53E /* CCEAGLView-ios.mm in Sources */, 507B3C841C31BDD30067B53E /* AudioEngine.cpp in Sources */, 507B3C861C31BDD30067B53E /* HttpCookie.cpp in Sources */, - 507B3C871C31BDD30067B53E /* AssetsManagerEx.cpp in Sources */, 507B3C881C31BDD30067B53E /* CCQuadCommand.cpp in Sources */, - 507B3C8A1C31BDD30067B53E /* CCLayerGradientLoader.cpp in Sources */, - 507B3C8C1C31BDD30067B53E /* CCActionTimelineCache.cpp in Sources */, - 507B3C8D1C31BDD30067B53E /* LocalStorage.cpp in Sources */, - 507B3C8E1C31BDD30067B53E /* UIEditBoxImpl-win32.cpp in Sources */, - 507B3C8F1C31BDD30067B53E /* CCActionFrameEasing.cpp in Sources */, - 507B3C911C31BDD30067B53E /* CCPUOnQuotaObserver.cpp in Sources */, - 507B3C931C31BDD30067B53E /* CCPUEventHandler.cpp in Sources */, - 507B3C941C31BDD30067B53E /* CCDisplayManager.cpp in Sources */, - 507B3C951C31BDD30067B53E /* CCPUVortexAffectorTranslator.cpp in Sources */, - 507B3C961C31BDD30067B53E /* UIRelativeBox.cpp in Sources */, - 507B3C981C31BDD30067B53E /* CCPULineAffector.cpp in Sources */, - 5020A2001D49912500E80C72 /* SkeletonRenderer.cpp in Sources */, - 5020A16A1D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */, - 507B3C9A1C31BDD30067B53E /* CCGLBufferedNode.cpp in Sources */, - 507B3C9B1C31BDD30067B53E /* CCControlSwitch.cpp in Sources */, - 507B3C9C1C31BDD30067B53E /* CCPUSphere.cpp in Sources */, - 507B3C9D1C31BDD30067B53E /* CCUtilMath.cpp in Sources */, - 507B3C9E1C31BDD30067B53E /* CCPUBaseColliderTranslator.cpp in Sources */, - 507B3C9F1C31BDD30067B53E /* CCPUScriptLexer.cpp in Sources */, - 5020A1E81D49912500E80C72 /* SkeletonBatch.cpp in Sources */, 507B3CA01C31BDD30067B53E /* atitc.cpp in Sources */, - 507B3CA21C31BDD30067B53E /* CCPUObserverManager.cpp in Sources */, 507B3CA31C31BDD30067B53E /* AudioPlayer.mm in Sources */, 507B3CA41C31BDD30067B53E /* CCRef.cpp in Sources */, - 507B3CA51C31BDD30067B53E /* CCUIMultilineTextField.mm in Sources */, 507B3CA61C31BDD30067B53E /* clipper.cpp in Sources */, - 507B3CA71C31BDD30067B53E /* CCLabelTTFLoader.cpp in Sources */, - 507B3CA91C31BDD30067B53E /* CocosGUI.cpp in Sources */, 1A2B22B41E6E54EC001D5EC9 /* Uri.cpp in Sources */, - 507B3CAA1C31BDD30067B53E /* CCPUForceFieldAffectorTranslator.cpp in Sources */, 53E23A181E78B085009DD732 /* CCDevice-apple.mm in Sources */, - 507B3CAB1C31BDD30067B53E /* CCAABB.cpp in Sources */, - 507B3CAD1C31BDD30067B53E /* CCPUCircleEmitterTranslator.cpp in Sources */, 507B3CAF1C31BDD30067B53E /* CCEventController.cpp in Sources */, - 507B3CB01C31BDD30067B53E /* Node3DReader.cpp in Sources */, 507B3CB11C31BDD30067B53E /* CCAsyncTaskPool.cpp in Sources */, 507B3CB21C31BDD30067B53E /* CCConsole.cpp in Sources */, - 507B3CB51C31BDD30067B53E /* CCPUVortexAffector.cpp in Sources */, - 507B3CB61C31BDD30067B53E /* CCPULineEmitterTranslator.cpp in Sources */, - 507B3CB71C31BDD30067B53E /* CCPUParticleFollower.cpp in Sources */, 507B3CB81C31BDD30067B53E /* CCCameraBackgroundBrush.cpp in Sources */, - 507B3CB91C31BDD30067B53E /* CCPUTextureRotatorTranslator.cpp in Sources */, 507B3CBA1C31BDD30067B53E /* CCDirectorCaller-ios.mm in Sources */, - 46BDE4E61FA87D5800104C05 /* Color.c in Sources */, - 507B3CBB1C31BDD30067B53E /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */, - 507B3CBC1C31BDD30067B53E /* CCPhysics3DShape.cpp in Sources */, - 507B3CBD1C31BDD30067B53E /* CCComAttribute.cpp in Sources */, - 507B3CBE1C31BDD30067B53E /* CCNode+CCBRelativePositioning.cpp in Sources */, 507B3CBF1C31BDD30067B53E /* AudioCache.mm in Sources */, - 507B3CC01C31BDD30067B53E /* CCPUTranslateManager.cpp in Sources */, 507B3CC21C31BDD30067B53E /* Vec3.cpp in Sources */, - 507B3CC41C31BDD30067B53E /* CSLoader.cpp in Sources */, - 507B3CC51C31BDD30067B53E /* CCNavMesh.cpp in Sources */, - 507B3CC61C31BDD30067B53E /* CCPURendererTranslator.cpp in Sources */, - 507B3CC71C31BDD30067B53E /* CCPhysics3DComponent.cpp in Sources */, 507B3CCA1C31BDD30067B53E /* CCGLView.cpp in Sources */, - 507B3CCC1C31BDD30067B53E /* CCPUPathFollowerTranslator.cpp in Sources */, - 507B3CCD1C31BDD30067B53E /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */, 507B3CCE1C31BDD30067B53E /* CCLock-apple.cpp in Sources */, - 5020A2211D49912500E80C72 /* TransformConstraint.c in Sources */, 507B3CD01C31BDD30067B53E /* ccUtils.cpp in Sources */, - 5020A1B81D49912500E80C72 /* Json.c in Sources */, 507B3CD21C31BDD30067B53E /* CCEventListenerMouse.cpp in Sources */, - 507B3CD41C31BDD30067B53E /* CCPUTextureRotator.cpp in Sources */, - 507B3CD51C31BDD30067B53E /* CCPUEmitterManager.cpp in Sources */, 507B3CD61C31BDD30067B53E /* CCFileUtils-apple.mm in Sources */, 507B3CD71C31BDD30067B53E /* ccUTF8.cpp in Sources */, - 507B3CD81C31BDD30067B53E /* CCDatas.cpp in Sources */, 507B3CD91C31BDD30067B53E /* ccFPSImages.c in Sources */, - 5020A1581D49912500E80C72 /* AnimationState.c in Sources */, 507B3CDB1C31BDD30067B53E /* CCEventAcceleration.cpp in Sources */, - 46BDE4D91FA87CCF00104C05 /* SkeletonClipping.c in Sources */, - 507B3CDD1C31BDD30067B53E /* CCPUPositionEmitterTranslator.cpp in Sources */, - 507B3CDE1C31BDD30067B53E /* CCTween.cpp in Sources */, 507B3CDF1C31BDD30067B53E /* xxhash.c in Sources */, - 507B3CE01C31BDD30067B53E /* CCObjLoader.cpp in Sources */, - 507B3CE11C31BDD30067B53E /* CCAllocatorDiagnostics.cpp in Sources */, 468A14EE1EF223B700ECA675 /* idl_gen_general.cpp in Sources */, - 507B3CE21C31BDD30067B53E /* CCPUOnClearObserverTranslator.cpp in Sources */, - 507B3CE31C31BDD30067B53E /* CCUIEditBoxIOS.mm in Sources */, - 507B3CE41C31BDD30067B53E /* CCPUVertexEmitter.cpp in Sources */, - 507B3CE51C31BDD30067B53E /* CCNavMeshUtils.cpp in Sources */, - 5020A1C41D49912500E80C72 /* PathAttachment.c in Sources */, - 507B3CE61C31BDD30067B53E /* CCPUScaleVelocityAffector.cpp in Sources */, 507B3CE81C31BDD30067B53E /* TGAlib.cpp in Sources */, 507B3CE91C31BDD30067B53E /* CCDownloader.cpp in Sources */, - 507B3CEA1C31BDD30067B53E /* Light3DReader.cpp in Sources */, - 507B3CEB1C31BDD30067B53E /* CCArray.cpp in Sources */, - 507B3CEC1C31BDD30067B53E /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */, 507B3CEE1C31BDD30067B53E /* CCDevice-ios.mm in Sources */, 507B3CF11C31BDD30067B53E /* CCUserDefault-apple.mm in Sources */, 507B3CF21C31BDD30067B53E /* ConvertUTF.c in Sources */, - 507B3CF41C31BDD30067B53E /* CCPUMaterialTranslator.cpp in Sources */, 507B3CF51C31BDD30067B53E /* CCData.cpp in Sources */, 507B3CF71C31BDD30067B53E /* ConvertUTFWrapper.cpp in Sources */, 507B3CF81C31BDD30067B53E /* DetourProximityGrid.cpp in Sources */, 507B3CF91C31BDD30067B53E /* CCFontCharMap.cpp in Sources */, 507B3CFA1C31BDD30067B53E /* DetourNode.cpp in Sources */, - 507B3CFC1C31BDD30067B53E /* CCAnimate3D.cpp in Sources */, 507B3CFE1C31BDD30067B53E /* CCEventMouse.cpp in Sources */, - 507B3CFF1C31BDD30067B53E /* CCPUScaleAffector.cpp in Sources */, 507B3D001C31BDD30067B53E /* CCProtectedNode.cpp in Sources */, 507B3D011C31BDD30067B53E /* CCGLProgramStateCache.cpp in Sources */, - 5020A1881D49912500E80C72 /* BoneData.c in Sources */, - 507B3D041C31BDD30067B53E /* CCPUOnTimeObserver.cpp in Sources */, 507B3D051C31BDD30067B53E /* WebSocket.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -12925,667 +7968,397 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C5F5161F1C822D6D0013B695 /* UITabControl.cpp in Sources */, - C5F5161D1C822D400013B695 /* TabControlReader.cpp in Sources */, - D0FD03541A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp in Sources */, - 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */, - B665E38F1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */, - B665E21B1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */, B6DD2FE61B04825B00E47F5F /* DetourPathQueue.cpp in Sources */, - B665E38B1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */, - B665E2731AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, - 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, - 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */, - 15AE18D019AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, - 15AE192C19AAD35100C27E9E /* CCActionFrame.cpp in Sources */, - 5020A1BD1D49912500E80C72 /* MeshAttachment.c in Sources */, - 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */, - 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */, 15FB20981AE7C57D00C31518 /* sweep.cc in Sources */, - 502AF9791D0711C9006AF256 /* CCVRGenericHeadTracker.cpp in Sources */, - 15AE199219AAD37300C27E9E /* ImageViewReader.cpp in Sources */, - B665E1F71AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */, + EDC78CBB21CA19FC00E1863C /* NodeReader.cpp in Sources */, 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */, - 46A171051807CECB005B8026 /* CCPhysicsWorld.cpp in Sources */, 50ABBDA01925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, - 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, - B665E35B1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */, + EDC78C1921CA19FB00E1863C /* CCActionTimelineCache.cpp in Sources */, 50ABC0161926664800A911A9 /* CCImage.cpp in Sources */, - B665E3AB1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */, B6DD2FE21B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */, - 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, - 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, - B665E3A71AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */, - 15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, - B665E30F1AA80A6500DDB1C5 /* CCPUObserver.cpp in Sources */, + EDC78C3F21CA19FB00E1863C /* LocalizationManager.cpp in Sources */, + EDC78BE921CA19FB00E1863C /* CCSSceneReader.cpp in Sources */, B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, - 15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */, ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */, - B665E2531AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */, - B665E3F71AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */, - 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, B276EF621988D1D500CD400F /* CCVertexIndexData.cpp in Sources */, 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, - 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, + EDC78D1F21CA19FC00E1863C /* TriggerMng.cpp in Sources */, B6DD2FF21B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */, + EDC78CC721CA19FC00E1863C /* LayoutReader.cpp in Sources */, + 46BD388721D35A68002BD50F /* ShaderModuleMTL.mm in Sources */, + 4631CB9821AFD9FA0000D408 /* UIPageViewIndicator.cpp in Sources */, + EDC78D0721CA19FC00E1863C /* CCBone.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, - 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, B6DD2FF61B04825B00E47F5F /* fastlz.c in Sources */, + 40FE106721F073BF0061C04F /* CCControlPotentiometer.cpp in Sources */, 50ABC01A1926664800A911A9 /* CCSAXParser.cpp in Sources */, - B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */, - 182C5CE61A9D725400C30D34 /* UserCameraReader.cpp in Sources */, - 38B8E2E219E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */, - B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */, - 5020A2111D49912500E80C72 /* SlotData.c in Sources */, - B5668D7E1B3838E4003CBD5E /* UIScrollViewBar.cpp in Sources */, - B665E32B1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */, - 15AE185C19AAD31200C27E9E /* CDOpenALSupport.m in Sources */, - 15AE186119AAD31200C27E9E /* SimpleAudioEngine_objc.m in Sources */, - 15AE182519AAD2F700C27E9E /* CCMesh.cpp in Sources */, + EDC78C1521CA19FB00E1863C /* CCActionTimelineNode.cpp in Sources */, 1A41ABC31DF00CEC00B5584C /* AudioDecoder.mm in Sources */, - B665E4071AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.cpp in Sources */, 503DD8EE1926736A00CD74DD /* CCImage-ios.mm in Sources */, - 46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */, - 15AE1BEA19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, + EDC78BFF21CA19FB00E1863C /* CocosStudioExtension.cpp in Sources */, 50ABBD941925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, - B665E3DF1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */, - B257B44F1989D5E800D9A687 /* CCPrimitive.cpp in Sources */, 50ABBE281925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, - 15AE18D519AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, - 15AE192919AAD35100C27E9E /* TriggerMng.cpp in Sources */, - 15AE185E19AAD31200C27E9E /* CocosDenshion.m in Sources */, - B665E2071AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */, + EDC78C8521CA19FC00E1863C /* ListViewReader.cpp in Sources */, B6DD2FB01B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */, - 46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */, 1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */, + 4631CB2621AFD9F90000D408 /* UIAbstractCheckButton.cpp in Sources */, + EDC78C4121CA19FB00E1863C /* CCActionFrameEasing.cpp in Sources */, 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, - B665E2D71AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */, B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, - 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */, - 15B3708919EE414C00ABE682 /* Manifest.cpp in Sources */, - 5020A1ED1D49912500E80C72 /* SkeletonBounds.c in Sources */, + EDC78C9121CA19FC00E1863C /* LoadingBarReader.cpp in Sources */, + EDC78C3721CA19FB00E1863C /* CCArmatureDataManager.cpp in Sources */, 1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, - 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, - 15AE197B19AAD35700C27E9E /* CCFrame.cpp in Sources */, - 5020A1DB1D49912500E80C72 /* Skeleton.c in Sources */, 1A57006E180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, + 4631CB4A21AFD9F90000D408 /* UIEditBox.cpp in Sources */, 50ABBD8C1925AB4100A911A9 /* CCGLProgram.cpp in Sources */, - B665E2671AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */, - B6CAAFFF1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */, - 15AE196119AAD35100C27E9E /* CCSSceneReader.cpp in Sources */, 1A570072180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, - B665E2EB1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp in Sources */, - B665E4271AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */, - 5020A15D1D49912500E80C72 /* AnimationStateData.c in Sources */, - B665E2BF1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */, + EDC78C9F21CA19FC00E1863C /* Node3DReader.cpp in Sources */, + 4631CBB821AFD9FA0000D408 /* UITabControl.cpp in Sources */, 52B47A301A5349A3004E4C60 /* HttpClient-apple.mm in Sources */, + 4631CBCE21AFD9FA0000D408 /* UIScrollViewBar.cpp in Sources */, 1A2B22B31E6E54EC001D5EC9 /* Uri.cpp in Sources */, - B665E2131AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */, - 382384081A25900F002C4610 /* FlatBuffersSerialize.cpp in Sources */, - B68779011A8CA82E00643ABF /* CCParticle3DRender.cpp in Sources */, + ED28C242219E629C0078D854 /* BlendState.cpp in Sources */, + 46AF3A1021F1877100D5AFCD /* CCPhysicsBody.cpp in Sources */, + EDC78CB121CA19FC00E1863C /* TextReader.cpp in Sources */, + EDC78C2D21CA19FB00E1863C /* CCActionNode.cpp in Sources */, + 40FE106C21F073BF0061C04F /* CCControlSaturationBrightnessPicker.cpp in Sources */, DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */, - B665E2E71AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp in Sources */, - 15AE1BF119AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */, - B665E28F1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp in Sources */, - B665E31B1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */, - 15AE1B8419AADA9A00C27E9E /* UITextField.cpp in Sources */, - 5020A1811D49912500E80C72 /* Bone.c in Sources */, - 15AE198E19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, - B6CAAFE31AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */, 50ABBE621925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, - B665E2C71AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */, - 5020A1C31D49912500E80C72 /* PathAttachment.c in Sources */, - B665E2E31AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */, - 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */, 3E6176681960F89B00DE83F5 /* CCController-apple.mm in Sources */, - 15AE18B219AAD33D00C27E9E /* CCBReader.cpp in Sources */, - 15AE193C19AAD35100C27E9E /* CCArmatureDefine.cpp in Sources */, - B665E35F1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */, + 46AF3A1221F1877100D5AFCD /* CCPhysicsShape.cpp in Sources */, B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, - 503D4F6C1CE2BDBE0054A2D1 /* CCVRDistortion.cpp in Sources */, + EDE6457221F017220063F6E4 /* ProgramState.cpp in Sources */, + EDC78D3321CA19FC00E1863C /* CCArmature.cpp in Sources */, 298C75D61C0465D1006BAE63 /* CCStencilStateManager.cpp in Sources */, - 15AE194B19AAD35100C27E9E /* CCComRender.cpp in Sources */, - 382384451A25915C002C4610 /* SpriteReader.cpp in Sources */, - 15AE19AC19AAD39700C27E9E /* LoadingBarReader.cpp in Sources */, 50ABBE7E1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, - 15AE183119AAD2F700C27E9E /* CCOBB.cpp in Sources */, - 15AE18C519AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, - 15AE1BF719AAE01E00C27E9E /* CCControlStepper.cpp in Sources */, - 5020A2261D49912500E80C72 /* TransformConstraintData.c in Sources */, 501216951AC47393009A4BEA /* CCPass.cpp in Sources */, 50ABBE6E1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, - B665E2CB1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp in Sources */, - 15AE18D719AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */, 50CB247C19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, + EDC78C2121CA19FB00E1863C /* CCSkinNode.cpp in Sources */, 50ABBE461925AB6F00A911A9 /* CCEvent.cpp in Sources */, + 40FE106021F073BF0061C04F /* CCControlColourPicker.cpp in Sources */, 15FB20881AE7C57D00C31518 /* shapes.cc in Sources */, + EDC78C2721CA19FB00E1863C /* TriggerBase.cpp in Sources */, 50ABBEA01925AB6F00A911A9 /* CCScheduler.cpp in Sources */, 50ABBE4E1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, - 15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */, - 15AE181719AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, - B68779051A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */, + 4631CB0E21AFD9F90000D408 /* UIWidget.cpp in Sources */, + 4631CB8C21AFD9FA0000D408 /* UILayout.cpp in Sources */, 1A40D0DD1E8E4C76002E363A /* md5.c in Sources */, - 15AE18B719AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, - 15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, + EDC78C5F21CA19FC00E1863C /* CCTransformHelp.cpp in Sources */, 50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, B6DD2FEE1B04825B00E47F5F /* DetourTileCache.cpp in Sources */, - 15AE184119AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, 50ABBE5A1925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, - 15AE193A19AAD35100C27E9E /* CCArmatureDataManager.cpp in Sources */, - B665E21F1AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp in Sources */, - B665E37B1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */, 3EACC9A519F5014D00EB3C5E /* CCLight.cpp in Sources */, - 15AE1B7A19AADA9A00C27E9E /* UIScrollView.cpp in Sources */, 1A570076180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, - 15AE19B219AAD39700C27E9E /* SliderReader.cpp in Sources */, - B665E3B71AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */, - B665E1F31AA80A6500DDB1C5 /* CCPUAffector.cpp in Sources */, - 15AE1B7E19AADA9A00C27E9E /* UIText.cpp in Sources */, 468A14F31EF223B700ECA675 /* idl_gen_text.cpp in Sources */, B6DD2FDA1B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */, - 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, + 40FE106A21F073BF0061C04F /* CCControlHuePicker.cpp in Sources */, + 4631CB5C21AFD9F90000D408 /* UITextField+CCUITextInput.mm in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, - B665E2CF1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */, - 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, - 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */, + EDC78CFB21CA19FC00E1863C /* ScrollViewReader.cpp in Sources */, 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, B6DD2FDE1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */, - 46BDE4DD1FA87D4900104C05 /* ClippingAttachment.c in Sources */, - 15AE1BEC19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, - 46BDE4D71FA87CBD00104C05 /* VertexEffect.c in Sources */, - 3823841B1A2590D2002C4610 /* ComAudioReader.cpp in Sources */, 50ABBEC01925AB6F00A911A9 /* CCValue.cpp in Sources */, 50ABBD591925AB0000A911A9 /* Vec2.cpp in Sources */, - B665E3CB1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, - B665E32F1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp in Sources */, - 15AE192419AAD35100C27E9E /* CocoLoader.cpp in Sources */, - B665E3BB1AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp in Sources */, - 85505F041B60E3AB003F2CD4 /* CCBoneNode.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, - 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */, - B665E39F1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */, + EDC78CED21CA19FC00E1863C /* Particle3DReader.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, - 15AE1BF319AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, - 5020A17B1D49912500E80C72 /* AttachmentVertices.cpp in Sources */, - B665E2D31AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */, - B665E3331AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */, 1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, + 46AF3A2421F1877100D5AFCD /* CCPhysicsJoint.cpp in Sources */, A0534A681B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */, - B665E22F1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */, 1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, + 46F9B72521AFE64D009DF858 /* CCTableView.cpp in Sources */, 1A57008A180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, 468A14F61EF223B700ECA675 /* idl_parser.cpp in Sources */, - B665E3EF1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */, - 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, - 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, + EDC78BE721CA19FB00E1863C /* CCComController.cpp in Sources */, + 4631CBB021AFD9FA0000D408 /* UIImageView.cpp in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, - 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */, - B6CAAFEF1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */, - 15AE181B19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, + 40FE105F21F073BF0061C04F /* CCControlUtils.cpp in Sources */, + EDC78C0D21CA19FB00E1863C /* CCFrame.cpp in Sources */, + EDC78CD321CA19FC00E1863C /* CheckBoxReader.cpp in Sources */, + 40FE106621F073BF0061C04F /* CCControlButton.cpp in Sources */, + 40FE106521F073BF0061C04F /* CCControl.cpp in Sources */, 1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, - B677B0CE1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */, + EDC78CC321CA19FC00E1863C /* ImageViewReader.cpp in Sources */, 1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, + EDC78D0D21CA19FC00E1863C /* CCActionFrame.cpp in Sources */, + EDC78BD921CA19FB00E1863C /* CCComAudio.cpp in Sources */, + 4631CBBE21AFD9FA0000D408 /* UILayoutManager.cpp in Sources */, 1A570099180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, - B6CAAFF31AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */, - B665E2931AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */, 50ABBD4D1925AB0000A911A9 /* MathUtil.cpp in Sources */, + 4631CB1E21AFD9F90000D408 /* UIButton.cpp in Sources */, + EDC78CE321CA19FC00E1863C /* NodeReaderDefine.cpp in Sources */, B6DD2FCC1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */, - 50ABBE3E1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, + ED28C236219E629B0078D854 /* Texture.cpp in Sources */, + 4631CB2421AFD9F90000D408 /* UIVBox.cpp in Sources */, 1A57009F180BC5D20088DEC7 /* CCNode.cpp in Sources */, - 1A57010F180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, - B665E3F31AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */, - 46BDE4D61FA87CB700104C05 /* Triangulator.c in Sources */, + EDC78C2921CA19FB00E1863C /* CCDisplayManager.cpp in Sources */, + 4631CB5421AFD9F90000D408 /* CCUISingleLineTextField.mm in Sources */, + 4631CBA221AFD9FA0000D408 /* UIHBox.cpp in Sources */, 1A570113180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, - 1A57011C180BC90D0088DEC7 /* CCGrabber.cpp in Sources */, - 382384301A259112002C4610 /* ParticleReader.cpp in Sources */, 1A570120180BC90D0088DEC7 /* CCGrid.cpp in Sources */, - 15AE181119AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, - 5020A1871D49912500E80C72 /* BoneData.c in Sources */, - 5E9F612B1A3FFE3D0038DE01 /* CCPlane.cpp in Sources */, + EDC78C4321CA19FB00E1863C /* FlatBuffersSerialize.cpp in Sources */, 1A57019E180BCB590088DEC7 /* CCFont.cpp in Sources */, - 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, - 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */, - 15B3708119EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */, 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, - 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, - B677B0D61B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */, - 43015DC01B60DF4000E75161 /* CCComExtensionData.cpp in Sources */, 1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */, + EDC78C7521CA19FC00E1863C /* CCBatchNode.cpp in Sources */, 50ABC00E1926664800A911A9 /* CCFileUtils.cpp in Sources */, 299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */, - 5020A1B11D49912500E80C72 /* IkConstraintData.c in Sources */, + EDC78CA721CA19FC00E1863C /* Light3DReader.cpp in Sources */, DA8C62A319E52C6400000516 /* ioapi_mem.cpp in Sources */, - 382384371A259126002C4610 /* ProjectNodeReader.cpp in Sources */, - 5020A1751D49912500E80C72 /* AttachmentLoader.c in Sources */, - 15AE18C919AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */, - B665E2831AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */, 50ABBE241925AB6F00A911A9 /* base64.cpp in Sources */, - B665E36F1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */, 1A5701A6180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, - 15AE192B19AAD35100C27E9E /* TriggerObj.cpp in Sources */, - B6CAAFEB1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */, - B677B0D21B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */, - 4D76BE3B1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */, - 15AE198519AAD36400C27E9E /* WidgetReader.cpp in Sources */, - B665E36B1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */, - B665E3171AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */, - 5020A2051D49912500E80C72 /* Skin.c in Sources */, - B665E2031AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */, 1A5701B2180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, - B68778F91A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */, - 46BDE4D51FA87CB400104C05 /* SkeletonTwoColorBatch.cpp in Sources */, - B665E2271AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */, - A045F6F01BA81821005076C7 /* GameNode3DReader.cpp in Sources */, + 4631CBC021AFD9FA0000D408 /* UITextField.cpp in Sources */, + 46F9B72921AFE64D009DF858 /* CCTableViewCell.cpp in Sources */, 1A5701B6180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */, - B665E40F1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */, - 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, 468A14EA1EF223B700ECA675 /* idl_gen_fbs.cpp in Sources */, + ED28C22C219E629B0078D854 /* VertexLayout.cpp in Sources */, + EDC78CFF21CA19FC00E1863C /* TextFieldReader.cpp in Sources */, + ED28C24C219E629C0078D854 /* DepthStencilState.cpp in Sources */, + EDC78C7121CA19FC00E1863C /* CCSGUIReader.cpp in Sources */, + 40FE106321F073BF0061C04F /* CCInvocation.cpp in Sources */, 50ABBEAC1925AB6F00A911A9 /* ccTypes.cpp in Sources */, - 15AE196A19AAD35100C27E9E /* DictionaryHelper.cpp in Sources */, - B665E26B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */, 468A14E71EF223B700ECA675 /* idl_gen_cpp.cpp in Sources */, 1A5701BA180BCB5A0088DEC7 /* CCLabel.cpp in Sources */, - 15AE18AD19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, - B5CE6DC91B3C05BA002B0419 /* UIRadioButton.cpp in Sources */, - 5020A1A51D49912500E80C72 /* extension.c in Sources */, - 15AE18AB19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, - 15AE1B7219AADA9A00C27E9E /* UIListView.cpp in Sources */, 1A5701BE180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, 15FB20751AE7BF8600C31518 /* CCAutoPolygon.cpp in Sources */, - A0E749F81BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */, - 1A5701C2180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */, 1A087AE91860400400196EF5 /* edtaa3func.cpp in Sources */, - B665E33F1AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp in Sources */, - 15AE194219AAD35100C27E9E /* CCColliderDetector.cpp in Sources */, - B665E3771AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */, - 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, + EDAF7C7221F1797000E070B2 /* CCTextureUtils.cpp in Sources */, B6DD2FC41B04825B00E47F5F /* DetourNavMesh.cpp in Sources */, - B6CAAFFB1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, - B665E3471AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */, - 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, - 3823843E1A259140002C4610 /* SingleNodeReader.cpp in Sources */, - B665E28B1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */, - 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, - 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, - 5020A1931D49912500E80C72 /* Cocos2dAttachmentLoader.cpp in Sources */, + EDC78CC921CA19FC00E1863C /* SingleNodeReader.cpp in Sources */, 291901461B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */, - B665E39B1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */, - 382384291A2590F9002C4610 /* NodeReader.cpp in Sources */, - 15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */, - B665E4171AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */, + 4631CB4421AFD9F90000D408 /* UIEditBoxImpl-stub.cpp in Sources */, + 4631CBB621AFD9FA0000D408 /* UITextBMFont.cpp in Sources */, + 40FE106121F073BF0061C04F /* CCControlSwitch.cpp in Sources */, 15FB20941AE7C57D00C31518 /* cdt.cc in Sources */, - B665E34B1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */, - 5020A18D1D49912500E80C72 /* BoundingBoxAttachment.c in Sources */, - 85505F081B60E3BD003F2CD4 /* CCSkinNode.cpp in Sources */, + 46BD388521D35A68002BD50F /* RenderPipelineMTL.mm in Sources */, + EDC78C0321CA19FB00E1863C /* CCBoneNode.cpp in Sources */, 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, + EDC78BE521CA19FB00E1863C /* CCComRender.cpp in Sources */, 50ABBDBE1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, - B665E2FB1AA80A6500DDB1C5 /* CCPUMaterialManager.cpp in Sources */, 1A5701E3180BCB8C0088DEC7 /* CCScene.cpp in Sources */, + 4631CB2A21AFD9F90000D408 /* UITextAtlas.cpp in Sources */, 50ABBD611925AB0000A911A9 /* Vec4.cpp in Sources */, - B60C5BD519AC68B10056FBDE /* CCBillBoard.cpp in Sources */, - 18956BB31A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */, - 15AE184519AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */, - B665E25F1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */, + 46BD388921D35A68002BD50F /* TextureMTL.mm in Sources */, + 46BD387D21D35A51002BD50F /* BufferMTL.mm in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, - 15B3707D19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */, - 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, - 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, - B665E2471AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */, - 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, - 2980F0271BA9A5550059E678 /* CCUISingleLineTextField.mm in Sources */, + ED28C238219E629B0078D854 /* Device.cpp in Sources */, 1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, - B665E34F1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp in Sources */, + 4631CB3221AFD9F90000D408 /* UIEditBoxImpl-common.cpp in Sources */, + 46BD387A21D35A46002BD50F /* BlendStateMTL.mm in Sources */, + EDC78BE121CA19FB00E1863C /* CCProcessBase.cpp in Sources */, 1A5701EF180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, - B6D38B8B1AC3AFAC00043997 /* CCSkybox.cpp in Sources */, - B240C5EA1B09DFB000137F50 /* CCFrameBuffer.cpp in Sources */, - 5020A1571D49912500E80C72 /* AnimationState.c in Sources */, + EDC78CDB21CA19FC00E1863C /* SliderReader.cpp in Sources */, + 4631CB4E21AFD9F90000D408 /* CCUIEditBoxIOS.mm in Sources */, 1A5701F8180BCBAD0088DEC7 /* CCMenu.cpp in Sources */, - 382384141A259092002C4610 /* NodeReaderProtocol.cpp in Sources */, 50ABBD511925AB0000A911A9 /* Quaternion.cpp in Sources */, 1A5701FC180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, 505385051B01887A00793096 /* CCProperties.cpp in Sources */, - B665E2A71AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */, - 15AE195119AAD35100C27E9E /* CCDecorativeDisplay.cpp in Sources */, - 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */, - 50F965521CD0360000ADE813 /* CCVRGenericRenderer.cpp in Sources */, 50ABBD491925AB0000A911A9 /* Mat4.cpp in Sources */, + EDC78BEF21CA19FB00E1863C /* CocoStudio.cpp in Sources */, + EDC78CE921CA19FC00E1863C /* NodeReaderProtocol.cpp in Sources */, 1A570203180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, - 46BDE4D31FA87CAC00104C05 /* PointAttachment.c in Sources */, - 5020A1FF1D49912500E80C72 /* SkeletonRenderer.cpp in Sources */, - 15AE1B8619AADA9A00C27E9E /* UIButton.cpp in Sources */, 1A570209180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, + EDC78C3921CA19FB00E1863C /* CCDecorativeDisplay.cpp in Sources */, + 4631CB5A21AFD9F90000D408 /* CCUIMultilineTextField.mm in Sources */, + 4631CB2C21AFD9F90000D408 /* UIVideoPlayer-android.cpp in Sources */, 1A570211180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, - 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */, + 461FE09121CA129B00E5378F /* CCCallbackCommand.cpp in Sources */, + 4631CB1421AFD9F90000D408 /* UIVideoPlayer-ios.mm in Sources */, 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */, - 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, - 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */, B6DD2FA81B04825B00E47F5F /* DebugDraw.cpp in Sources */, - B665E2A31AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */, - 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, + 46BD388321D35A68002BD50F /* DeviceMTL.mm in Sources */, + ED28C280219E629C0078D854 /* CommandBuffer.cpp in Sources */, 1A570215180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 1A570222180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, - 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, - B665E25B1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */, - B665E3431AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp in Sources */, - 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */, - 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */, 1A570226180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, - 15AE194919AAD35100C27E9E /* CCComController.cpp in Sources */, - B603F1A91AC8EA0900A9579C /* CCTerrain.cpp in Sources */, - B665E3CF1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */, + EDC78CE521CA19FC00E1863C /* ParticleReader.cpp in Sources */, 1A57022A180BCC1A0088DEC7 /* CCParticleSystem.cpp in Sources */, - 15AE182919AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */, 3EACC9A119F5014D00EB3C5E /* CCCamera.cpp in Sources */, - B665E3E71AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */, 15AE1BBD19AADFF000C27E9E /* SocketIO.cpp in Sources */, B6DD2FC81B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */, - B665E42B1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */, - B665E3371AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */, - 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */, + EDC78C7B21CA19FC00E1863C /* ArmatureNodeReader.cpp in Sources */, B6DD2FBE1B04825B00E47F5F /* DetourCommon.cpp in Sources */, - 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, - 38F5263F1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */, - B665E2AB1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */, - B665E3671AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */, - B665E27B1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp in Sources */, - 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, - B665E42F1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */, - 38ACD1FD1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp in Sources */, - 29394CF719B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, - B665E2C31AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */, - 5020A1511D49912500E80C72 /* Animation.c in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, + EDC78C8321CA19FC00E1863C /* GameNode3DReader.cpp in Sources */, 50ABBD901925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */, - 15AE197F19AAD35700C27E9E /* CCTimeLine.cpp in Sources */, 1A57027F180BCC900088DEC7 /* CCSprite.cpp in Sources */, - B665E24F1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */, - 15AE194719AAD35100C27E9E /* CCComAudio.cpp in Sources */, - 15AE192719AAD35100C27E9E /* TriggerBase.cpp in Sources */, - 15AE1B8819AADA9A00C27E9E /* UICheckBox.cpp in Sources */, - B665E3231AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */, - B665E3271AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */, - 15AE18B519AAD33D00C27E9E /* CCBSequence.cpp in Sources */, - B665E3C31AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */, - B665E2631AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */, + 46E21B4821B900C900430A43 /* StringUtils.cpp in Sources */, 294D7D951D0E67B4002CE7B7 /* CCDevice-apple.mm in Sources */, 1A570283180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, - B665E2F71AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */, + 46BD387F21D35A57002BD50F /* CommandBufferMTL.mm in Sources */, + 4631CB7821AFD9F90000D408 /* UIEditBoxImpl-ios.mm in Sources */, + 4631CBE021AFD9FA0000D408 /* UILayoutParameter.cpp in Sources */, + EDC78D2121CA19FC00E1863C /* CCSpriteFrameCacheHelper.cpp in Sources */, + ED28C244219E629C0078D854 /* ShaderModule.cpp in Sources */, 1A570287180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, - 507003221B69735300E83DDD /* HttpConnection-winrt.cpp in Sources */, - 2980F02A1BA9A5550059E678 /* UITextField+CCUITextInput.mm in Sources */, - B665E2431AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */, - B665E3EB1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */, - B665E2771AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */, - 15AE193E19AAD35100C27E9E /* CCBatchNode.cpp in Sources */, - 15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */, + EDC78C4521CA19FB00E1863C /* CCTween.cpp in Sources */, + EDC78C5B21CA19FC00E1863C /* CCActionManagerEx.cpp in Sources */, + EDC78CDF21CA19FC00E1863C /* ComAudioReader.cpp in Sources */, + 4631CB2821AFD9F90000D408 /* UICheckBox.cpp in Sources */, 1A57028B180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 15FB209C1AE7C57D00C31518 /* sweep_context.cc in Sources */, - B665E3E31AA80A6600DDB1C5 /* CCPUSineForceAffector.cpp in Sources */, 1A570293180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, - 15AE194D19AAD35100C27E9E /* CCDataReaderHelper.cpp in Sources */, + 4631CB9421AFD9FA0000D408 /* UIHelper.cpp in Sources */, 5053850D1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */, 15FB20901AE7C57D00C31518 /* advancing_front.cc in Sources */, - 15AE1B8C19AADA9A00C27E9E /* UIScale9Sprite.cpp in Sources */, - 15AE19AE19AAD39700C27E9E /* PageViewReader.cpp in Sources */, - B68778FD1A8CA82E00643ABF /* CCParticle3DEmitter.cpp in Sources */, 1A570297180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, - B665E4031AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */, 50ABBE321925AB6F00A911A9 /* CCConfiguration.cpp in Sources */, - 5020A1F31D49912500E80C72 /* SkeletonData.c in Sources */, + EDC78CF321CA19FC00E1863C /* BoneNodeReader.cpp in Sources */, + 46AF3A0E21F1877100D5AFCD /* CCPhysicsWorld.cpp in Sources */, 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, - 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, + EDC78C4921CA19FB00E1863C /* CCArmatureAnimation.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, - B665E4131AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */, + EDC78D2B21CA19FC00E1863C /* CCSkin.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, - 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */, - B665E3DB1AA80A6600DDB1C5 /* CCPUScriptTranslator.cpp in Sources */, - B665E33B1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */, - 3E2A09C31BAA91B70086B878 /* CCMotionStreak3D.cpp in Sources */, 1A5702F3180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, - 382384221A2590DA002C4610 /* GameMapReader.cpp in Sources */, - 15AE1BAF19AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, - 46BDE4E11FA87D5000104C05 /* Array.c in Sources */, - 15AE182119AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, - 5020A16F1D49912500E80C72 /* Attachment.c in Sources */, - B665E2B71AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */, 50ABBD3D1925AB0000A911A9 /* CCGeometry.cpp in Sources */, - B665E30B1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */, - B665E26F1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */, - 15AE18D919AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, + 460D4CD621A5666E0075726E /* CCRenderer.cpp in Sources */, + EDC78C9521CA19FC00E1863C /* SpriteReader.cpp in Sources */, + ED93A75A21EDBCBA00170050 /* Program.cpp in Sources */, 50ABBECC1925AB6F00A911A9 /* s3tc.cpp in Sources */, - 15AE1B7819AADA9A00C27E9E /* UIRichText.cpp in Sources */, - 15AE195D19AAD35100C27E9E /* CCSkin.cpp in Sources */, - B665E2DB1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */, 1A5702F7180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, + EDC78C8921CA19FC00E1863C /* GameMapReader.cpp in Sources */, 50ABBEC61925AB6F00A911A9 /* etc1.cpp in Sources */, + EDC78CB721CA19FC00E1863C /* PageViewReader.cpp in Sources */, 50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */, B6DD2FAC1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */, - 85505F0D1B60E3D8003F2CD4 /* SkeletonNodeReader.cpp in Sources */, - D0FD03501A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */, - B665E2231AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp in Sources */, - 5020A1E71D49912500E80C72 /* SkeletonBatch.cpp in Sources */, - B665E3D71AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */, - B665E2331AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */, - 15AE1BA919AADFDF00C27E9E /* UIVBox.cpp in Sources */, - 50ABBDAE1925AB4100A911A9 /* CCRenderer.cpp in Sources */, - B665E3AF1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */, - B665E2EF1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */, - 38D9629E1ACA9721007C6FAF /* CocoStudio.cpp in Sources */, 50ABBDBA1925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 1A5702FB180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, - B665E40B1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */, - 5020A1991D49912500E80C72 /* Event.c in Sources */, 1A570301180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, - B665E1FF1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */, 1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */, - 15AE1B8F19AADA9A00C27E9E /* UIDeprecated.cpp in Sources */, - 5020A1691D49912500E80C72 /* AtlasAttachmentLoader.c in Sources */, 464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */, - 5E9F61271A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */, - B665E22B1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */, - B665E3031AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp in Sources */, - B665E3571AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp in Sources */, - 94A6DF071C73040D0094AEF7 /* LocalizationManager.cpp in Sources */, - 5020A22C1D49912500E80C72 /* VertexAttachment.c in Sources */, - 15AE1B7619AADA9A00C27E9E /* UIPageView.cpp in Sources */, 1A570311180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, 468A14F01EF223B700ECA675 /* idl_gen_go.cpp in Sources */, 50ABBE2C1925AB6F00A911A9 /* ccCArray.cpp in Sources */, - 15AE193219AAD35100C27E9E /* CCActionNode.cpp in Sources */, - 15AE195319AAD35100C27E9E /* CCDisplayFactory.cpp in Sources */, - 182C5CD71A98F30500C30D34 /* Sprite3DReader.cpp in Sources */, - 50ABC0061926664800A911A9 /* CCThread-apple.mm in Sources */, - B5CE6DBF1B3BF2B1002B0419 /* UIAbstractCheckButton.cpp in Sources */, + 4631CBE421AFD9FA0000D408 /* UISlider.cpp in Sources */, 50ABBEB61925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, 1A57034C180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, 50ABBDB61925AB4100A911A9 /* CCTexture2D.cpp in Sources */, - B665E2871AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */, - 15AE1BAB19AADFDF00C27E9E /* UILayout.cpp in Sources */, + EDC78C7D21CA19FC00E1863C /* ProjectNodeReader.cpp in Sources */, 1A570355180BD0B00088DEC7 /* ioapi.cpp in Sources */, - B665E3071AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */, - B665E2B31AA80A6500DDB1C5 /* CCPUForceField.cpp in Sources */, + 4631CB3021AFD9F90000D408 /* UIText.cpp in Sources */, + EDC78C0921CA19FB00E1863C /* CCActionTimeline.cpp in Sources */, + 46F9B73321AFE7C0009DF858 /* CCScrollView.cpp in Sources */, + EDC78C3121CA19FB00E1863C /* CCUtilMath.cpp in Sources */, + 46F9B74421B0CB44009DF858 /* UIWebView.mm in Sources */, 1A570359180BD0B00088DEC7 /* unzip.cpp in Sources */, - 15AE18BB19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, - 15AE19B819AAD39700C27E9E /* TextFieldReader.cpp in Sources */, - B665E29B1AA80A6500DDB1C5 /* CCPUEmitterTranslator.cpp in Sources */, - 382384101A259092002C4610 /* NodeReaderDefine.cpp in Sources */, - 15AE195B19AAD35100C27E9E /* CCSGUIReader.cpp in Sources */, 50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, - 15AE19B019AAD39700C27E9E /* ScrollViewReader.cpp in Sources */, - 2980F02C1BA9A5550059E678 /* UITextView+CCUITextInput.mm in Sources */, - 85505F061B60E3B6003F2CD4 /* CCSkeletonNode.cpp in Sources */, + 4631CB8A21AFD9FA0000D408 /* CocosGUI.cpp in Sources */, 50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */, 5012169B1AC473A3009A4BEA /* CCTechnique.cpp in Sources */, - 15AE182D19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, + EDC78D0B21CA19FC00E1863C /* CCArmatureDefine.cpp in Sources */, + EDC78D3121CA19FC00E1863C /* CCComAttribute.cpp in Sources */, 50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, 5012168F1AC47380009A4BEA /* CCRenderState.cpp in Sources */, - 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, - B665E37F1AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp in Sources */, - 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */, + 40FE107121F073BF0061C04F /* CCControlSlider.cpp in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, - 5020A1C91D49912500E80C72 /* PathConstraint.c in Sources */, - 15AE183919AAD2F700C27E9E /* CCRay.cpp in Sources */, - 5020A2201D49912500E80C72 /* TransformConstraint.c in Sources */, - 15AE1B8219AADA9A00C27E9E /* UITextBMFont.cpp in Sources */, - 5020A19F1D49912500E80C72 /* EventData.c in Sources */, 50ABBE6A1925AB6F00A911A9 /* CCEventListenerFocus.cpp in Sources */, 50ABBE661925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, + EDC78C8D21CA19FC00E1863C /* UserCameraReader.cpp in Sources */, + 4631CB2021AFD9F90000D408 /* UIPageView.cpp in Sources */, 503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */, 50ABBDB21925AB4100A911A9 /* ccShaders.cpp in Sources */, 50ABBD451925AB0000A911A9 /* CCVertex.cpp in Sources */, 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, 50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, + ED150A9C21E635AB00EFE7F7 /* ProgramMTL.mm in Sources */, + 4631CB9A21AFD9FA0000D408 /* UIRadioButton.cpp in Sources */, A045F6D71BA81577005076C7 /* CCTextureCube.cpp in Sources */, 52B47A2F1A5349A3004E4C60 /* HttpAsynConnection-apple.m in Sources */, B6DD2FB41B04825B00E47F5F /* RecastDump.cpp in Sources */, - B665E23B1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */, - 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */, - 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */, + ED150A9321E631DA00EFE7F7 /* ProgramCache.cpp in Sources */, B6DD2FB81B04825B00E47F5F /* DetourAlloc.cpp in Sources */, - B665E3FF1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, - 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - B665E2371AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp in Sources */, 468A14E41EF223B700ECA675 /* flatc.cpp in Sources */, - 15AE196319AAD35100C27E9E /* CCTransformHelp.cpp in Sources */, - 15AE19A819AAD39700C27E9E /* LayoutReader.cpp in Sources */, - 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, - 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */, - 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */, - 5033419D1D9DC7B400770EC7 /* SkeletonBinary.c in Sources */, B6DD2FD61B04825B00E47F5F /* DetourCrowd.cpp in Sources */, + EDC78C6D21CA19FC00E1863C /* CCDisplayFactory.cpp in Sources */, + 4631CBC221AFD9FA0000D408 /* UILayoutComponent.cpp in Sources */, 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, - B665E3831AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */, - 15AE1C1519AAE2C700C27E9E /* CCPhysicsDebugNode.cpp in Sources */, - 50ABBD841925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, - B665E2171AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */, + 46AF3A1821F1877100D5AFCD /* CCPhysicsContact.cpp in Sources */, + EDC78D3521CA19FC00E1863C /* CCActionObject.cpp in Sources */, 50ABBDA81925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, - B665E1FB1AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp in Sources */, - B665E3931AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp in Sources */, - B5A738971BB0051F00BAAEF8 /* UIPageViewIndicator.cpp in Sources */, - 5020A1B71D49912500E80C72 /* Json.c in Sources */, - 503D4F641CE29D4E0054A2D1 /* CCVRDistortionMesh.cpp in Sources */, - B665E24B1AA80A6500DDB1C5 /* CCPUColorAffector.cpp in Sources */, - B665E20F1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */, - 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */, 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, - 85505F0A1B60E3CE003F2CD4 /* BoneNodeReader.cpp in Sources */, + EDC78CAF21CA19FC00E1863C /* TabControlReader.cpp in Sources */, 501216A11AC473AD009A4BEA /* CCMaterial.cpp in Sources */, - B665E3971AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */, + EDC78BF121CA19FB00E1863C /* CCInputDelegate.cpp in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 503DD8E71926736A00CD74DD /* CCEAGLView-ios.mm in Sources */, 3E2BDAEC19C0436F0055CDCD /* AudioEngine.cpp in Sources */, - 5020A1631D49912500E80C72 /* Atlas.c in Sources */, 52B47A311A5349A3004E4C60 /* HttpCookie.cpp in Sources */, - 15B3707919EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */, 50ABBDA41925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, - 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, - 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, - 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */, - 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, - 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */, - B665E3531AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */, - B665E29F1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */, - 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */, - B665E43B1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */, - 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, - B665E2DF1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */, - 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - 15AE1BF919AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, - B665E3FB1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */, - 15AE196719AAD35100C27E9E /* CCUtilMath.cpp in Sources */, - B665E20B1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */, - B665E3D31AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */, + EDC78CA321CA19FC00E1863C /* ButtonReader.cpp in Sources */, 50ABBE201925AB6F00A911A9 /* atitc.cpp in Sources */, - 5020A1CF1D49912500E80C72 /* PathConstraintData.c in Sources */, - B665E3131AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */, 50CB248019D9C5A100687767 /* AudioPlayer.mm in Sources */, - 5020A1AB1D49912500E80C72 /* IkConstraint.c in Sources */, + EDC78C5321CA19FB00E1863C /* CocoLoader.cpp in Sources */, 50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */, - 2980F0251BA9A5550059E678 /* CCUIMultilineTextField.mm in Sources */, + 46BD388B21D35A68002BD50F /* Utils.mm in Sources */, 85B3743B1B204B9400C488D6 /* clipper.cpp in Sources */, - 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, - 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */, - B665E2BB1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp in Sources */, - 15AE180919AAD2F700C27E9E /* CCAABB.cpp in Sources */, - 5020A2171D49912500E80C72 /* spine-cocos2dx.cpp in Sources */, - B665E23F1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */, + EDC78C9B21CA19FC00E1863C /* TextAtlasReader.cpp in Sources */, + 4631CBD421AFD9FA0000D408 /* UIRichText.cpp in Sources */, + EDC78CBF21CA19FC00E1863C /* WidgetReader.cpp in Sources */, 3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */, - 182C5CB41A95964C00C30D34 /* Node3DReader.cpp in Sources */, - 5020A1D51D49912500E80C72 /* RegionAttachment.c in Sources */, B63990CD1A490AFE00B07923 /* CCAsyncTaskPool.cpp in Sources */, + EDC78C4721CA19FB00E1863C /* CCComExtensionData.cpp in Sources */, 50ABBE361925AB6F00A911A9 /* CCConsole.cpp in Sources */, - B665E4371AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */, - B665E2F31AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */, - B665E3731AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */, + EDC78D0921CA19FC00E1863C /* WidgetCallBackHandlerProtocol.cpp in Sources */, A045F6DD1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */, - 46BDE4E51FA87D5700104C05 /* Color.c in Sources */, - B665E41F1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */, 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */, - B665E2571AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */, - B6CAAFF71AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */, - 15AE194519AAD35100C27E9E /* CCComAttribute.cpp in Sources */, - 15AE18CC19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, + 46D3D48B21E6E8F700EF5E75 /* SimpleAudioEngine.cpp in Sources */, 50CB247819D9C5A100687767 /* AudioCache.mm in Sources */, - B665E4231AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */, 50ABBD5D1925AB0000A911A9 /* Vec3.cpp in Sources */, - 38B8E2D619E66581002D7CE7 /* CSLoader.cpp in Sources */, - B677B0CA1B18492D006762CB /* CCNavMesh.cpp in Sources */, - B665E3B31AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */, - B6CAAFE71AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */, + 4631CBE621AFD9FA0000D408 /* UIRelativeBox.cpp in Sources */, + 4631CB5221AFD9F90000D408 /* UITextView+CCUITextInput.mm in Sources */, 50ABC0121926664800A911A9 /* CCGLView.cpp in Sources */, - B665E3871AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp in Sources */, - B665E27F1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */, + EDC78C1F21CA19FB00E1863C /* CCTimeLine.cpp in Sources */, 50ABC0021926664800A911A9 /* CCLock-apple.cpp in Sources */, - 5020A1F91D49912500E80C72 /* SkeletonJson.c in Sources */, + 40FE106421F073BF0061C04F /* CCControlStepper.cpp in Sources */, 50ABBEBC1925AB6F00A911A9 /* ccUtils.cpp in Sources */, 50ABBE721925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, - B665E41B1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */, - B665E2971AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */, 50ABC0001926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 50ABBEB81925AB6F00A911A9 /* ccUTF8.cpp in Sources */, - 15AE194F19AAD35100C27E9E /* CCDatas.cpp in Sources */, 50ABBE841925AB6F00A911A9 /* ccFPSImages.c in Sources */, + EDC78C0F21CA19FB00E1863C /* CSLoader.cpp in Sources */, 50ABBE4A1925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, - 46BDE4D41FA87CB000104C05 /* SkeletonClipping.c in Sources */, - B665E3A31AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */, - 15AE196519AAD35100C27E9E /* CCTween.cpp in Sources */, 46C02E0818E91123004B7456 /* xxhash.c in Sources */, - 15AE183519AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, - D0FD034C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */, + EDC78BFB21CA19FB00E1863C /* TriggerObj.cpp in Sources */, + 4631CB8021AFD9F90000D408 /* UIEditBoxImpl-win32.cpp in Sources */, + EDC78C6921CA19FC00E1863C /* DictionaryHelper.cpp in Sources */, 468A14ED1EF223B700ECA675 /* idl_gen_general.cpp in Sources */, - B665E31F1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */, - 5020A1E11D49912500E80C72 /* SkeletonAnimation.cpp in Sources */, - 2980F0231BA9A5550059E678 /* CCUIEditBoxIOS.mm in Sources */, - B665E4331AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */, - B677B0DA1B18492D006762CB /* CCNavMeshUtils.cpp in Sources */, - B665E3C71AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */, - 5020A20B1D49912500E80C72 /* Slot.c in Sources */, 50ABBED01925AB6F00A911A9 /* TGAlib.cpp in Sources */, + EDC78CD921CA19FC00E1863C /* Sprite3DReader.cpp in Sources */, + EDC78BDF21CA19FB00E1863C /* CCDatas.cpp in Sources */, 50693C5F1B6BF2AE005C5820 /* CCDownloader.cpp in Sources */, - 0C261F291BE7528900707478 /* Light3DReader.cpp in Sources */, - 1A01C68518F57BE800EFE3A6 /* CCArray.cpp in Sources */, - B665E2AF1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */, 503DD8E31926736A00CD74DD /* CCDevice-ios.mm in Sources */, + EDC78CD121CA19FC00E1863C /* TextBMFontReader.cpp in Sources */, 50ABBEB41925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 1A1645B1191B726C008C7C7F /* ConvertUTF.c in Sources */, - B665E2FF1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */, 50ABBE3A1925AB6F00A911A9 /* CCData.cpp in Sources */, 1A1645B3191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, + 46D3D45C21DE014500EF5E75 /* BufferManager.mm in Sources */, B6DD2FEA1B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */, + EDE6457421F017220063F6E4 /* ShaderCache.cpp in Sources */, 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, + 46F9B74A21B0CB44009DF858 /* UIWebViewImpl-ios.mm in Sources */, + EDC78C2321CA19FB00E1863C /* CCSkeletonNode.cpp in Sources */, + EDC78C6321CA19FC00E1863C /* CCDataReaderHelper.cpp in Sources */, + 4631CB8E21AFD9FA0000D408 /* UIScale9Sprite.cpp in Sources */, + EDC78D1121CA19FC00E1863C /* CCColliderDetector.cpp in Sources */, + 4631CBC421AFD9FA0000D408 /* UIScrollView.cpp in Sources */, B6DD2FD01B04825B00E47F5F /* DetourNode.cpp in Sources */, - 15AE180D19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, 50ABBE7A1925AB6F00A911A9 /* CCEventMouse.cpp in Sources */, - B665E3BF1AA80A6500DDB1C5 /* CCPUScaleAffector.cpp in Sources */, + EDC78CF721CA19FC00E1863C /* SkeletonNodeReader.cpp in Sources */, + 4631CBDC21AFD9FA0000D408 /* UILoadingBar.cpp in Sources */, 15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, + 4631CBA421AFD9FA0000D408 /* UIListView.cpp in Sources */, 50ABBD981925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */, - B665E3631AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */, + 46BD388121D35A5F002BD50F /* DepthStencilStateMTL.mm in Sources */, 15AE1BBF19AADFF000C27E9E /* WebSocket.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -13601,6 +8374,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -13611,6 +8385,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -13656,6 +8431,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -13666,6 +8442,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -13733,10 +8510,11 @@ "$(SRCROOT)/../external/bullet/prebuilt/mac", "$(SRCROOT)/../external/Box2D/prebuilt/mac", "$(SRCROOT)/../external/uv/prebuilt/mac", + "$(SRCROOT)/../external/glsl-optimizer/prebuilt/mac", ); MACH_O_TYPE = staticlib; OTHER_LDFLAGS = "-llibsql3"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2 $(SRCROOT)/../external/openssl/include/mac $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/uv/include"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2 $(SRCROOT)/../external/openssl/include/mac $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/uv/include $(SRCROOT)/../external/glsl-optimizer/include"; }; name = Debug; }; @@ -13775,10 +8553,11 @@ "$(SRCROOT)/../external/bullet/prebuilt/mac", "$(SRCROOT)/../external/Box2D/prebuilt/mac", "$(SRCROOT)/../external/uv/prebuilt/mac", + "$(SRCROOT)/../external/glsl-optimizer/prebuilt/mac", ); MACH_O_TYPE = staticlib; OTHER_LDFLAGS = "-llibsql3"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2 $(SRCROOT)/../external/openssl/include/mac $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/uv/include"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2 $(SRCROOT)/../external/openssl/include/mac $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/uv/include $(SRCROOT)/../external/glsl-optimizer/include"; }; name = Release; }; @@ -13868,7 +8647,7 @@ ); GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; HEADER_SEARCH_PATHS = ""; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../external/png/prebuilt/ios\"", "\"$(SRCROOT)/../external/jpeg/prebuilt/ios\"", @@ -13882,11 +8661,12 @@ "\"$(SRCROOT)/../external/bullet/prebuilt/ios\"", "\"$(SRCROOT)/../external/Box2D/prebuilt/ios\"", "$(SRCROOT)/../external/uv/prebuilt/ios", + "$(SRCROOT)/../external/glsl-optimizer/prebuilt/ios", ); OTHER_LDFLAGS = "-llibsql3"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios/freetype2 $(SRCROOT)/../external/openssl/include/ios $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/uv/include"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios/freetype2 $(SRCROOT)/../external/openssl/include/ios $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/uv/include $(SRCROOT)/../external/glsl-optimizer/include"; }; name = Debug; }; @@ -13906,7 +8686,7 @@ ); GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; HEADER_SEARCH_PATHS = ""; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../external/png/prebuilt/ios\"", "\"$(SRCROOT)/../external/jpeg/prebuilt/ios\"", @@ -13920,11 +8700,12 @@ "\"$(SRCROOT)/../external/bullet/prebuilt/ios\"", "\"$(SRCROOT)/../external/Box2D/prebuilt/ios\"", "$(SRCROOT)/../external/uv/prebuilt/ios", + "$(SRCROOT)/../external/glsl-optimizer/prebuilt/ios", ); OTHER_LDFLAGS = "-llibsql3"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios/freetype2 $(SRCROOT)/../external/openssl/include/ios $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/uv/include"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios/freetype2 $(SRCROOT)/../external/openssl/include/ios $(SRCROOT)/../external/bullet/include/bullet $(SRCROOT)/../external/bullet/include $(SRCROOT)/../external/uv/include $(SRCROOT)/../external/glsl-optimizer/include"; }; name = Release; }; diff --git a/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/libcocos2d Mac.xcscheme b/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/libcocos2d Mac.xcscheme index 7e6f6294079f..f3893bfe0cdf 100644 --- a/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/libcocos2d Mac.xcscheme +++ b/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/libcocos2d Mac.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test Mac.xcscheme deleted file mode 100644 index 1477188eb2e8..000000000000 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test Mac.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test tvOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test tvOS.xcscheme deleted file mode 100644 index 7b039de913a4..000000000000 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test tvOS.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests Mac.xcscheme deleted file mode 100644 index 0f8a35ee14d6..000000000000 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests Mac.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests iOS.xcscheme deleted file mode 100644 index 46fa5e14c928..000000000000 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-memory-gc-tests iOS.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme index 23038dc7d3ca..601b3519a7bd 100644 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme +++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme index 02a937759db0..639d941c8cb8 100644 --- a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme +++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme @@ -1,6 +1,6 @@ /dev/null sudo apt-get update DEPENDS='libx11-dev' @@ -27,8 +16,6 @@ DEPENDS+=' libxmu-dev' DEPENDS+=' libglu1-mesa-dev' DEPENDS+=' libgl2ps-dev' DEPENDS+=' libxi-dev' -DEPENDS+=' gcc-4.9' -DEPENDS+=' g++-4.9' DEPENDS+=' libzip-dev' DEPENDS+=' libpng12-dev' DEPENDS+=' libcurl4-gnutls-dev' @@ -39,38 +26,4 @@ DEPENDS+=' libssl-dev' DEPENDS+=' libgtk-3-dev' DEPENDS+=' binutils' -MISSING= -echo "Checking for missing packages ..." -for i in $DEPENDS; do - if ! dpkg-query -W --showformat='${Status}\n' $i | grep "install ok installed" > /dev/null; then - MISSING+="$i " - fi -done - -if [ -n "$MISSING" ]; then - TXTCOLOR_DEFAULT="\033[0;m" - TXTCOLOR_GREEN="\033[0;32m" - echo -e $TXTCOLOR_GREEN"Missing packages: $MISSING.\nYou may be asked for your password for package installation."$TXTCOLOR_DEFAULT - CUR_APT_VERSION="$(apt --version | grep -o '[0-9].[0-9]')" - REQ_APT_VERSION="1.1" - if [ 1 -ge "$(echo "${CUR_APT_VERSION} >= ${REQ_APT_VERSION}" | bc)" ] - then - sudo apt-get install --allow-change-held-packages $MISSING -y > /dev/null - else - sudo apt-get install --force-yes --yes $MISSING > /dev/null - fi -fi - - - -sudo update-alternatives --remove-all gcc -sudo update-alternatives --remove-all g++ - -sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 -sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 60 - -echo "Cocos uses GCC Version: `gcc --version`" -echo "Cocos uses G++ Version: `g++ --version`" -echo "Cocos uses ld Version: `ld --version`" -echo "Cocos uses /usr/bin/ld Version: `/usr/bin/ld --version`" - +sudo apt-get install --force-yes --yes $DEPENDS > /dev/null diff --git a/cmake/Modules/CocosBuildHelpers.cmake b/cmake/Modules/CocosBuildHelpers.cmake index ad3428a43f88..389648d38fd1 100644 --- a/cmake/Modules/CocosBuildHelpers.cmake +++ b/cmake/Modules/CocosBuildHelpers.cmake @@ -45,25 +45,18 @@ function(cocos_mark_multi_resources res_out) set(${res_out} ${tmp_file_list} PARENT_SCOPE) endfunction() -# get `cocos_target` depend all dlls, save the result in `all_depend_dlls_out` -function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out) - set(all_depend_ext_dlls) +# get all linked libraries including transitive ones, recursive +function(search_depend_libs_recursive cocos_target all_depends_out) + set(all_depends_inner) set(targets_prepare_search ${cocos_target}) - # targets_prepare_search, target need find ext libs - set(have_searched_targets) - set(need_search_targets) while(true) foreach(tmp_target ${targets_prepare_search}) get_target_property(tmp_depend_libs ${tmp_target} LINK_LIBRARIES) list(REMOVE_ITEM targets_prepare_search ${tmp_target}) - # target itself use_cocos_pkg list(APPEND tmp_depend_libs ${tmp_target}) foreach(depend_lib ${tmp_depend_libs}) if(TARGET ${depend_lib}) - get_target_property(tmp_dlls ${depend_lib} CC_DEPEND_DLLS) - if(tmp_dlls) - list(APPEND all_depend_ext_dlls ${tmp_dlls}) - endif() + list(APPEND all_depends_inner ${depend_lib}) if(NOT (depend_lib STREQUAL tmp_target)) list(APPEND targets_prepare_search ${depend_lib}) endif() @@ -75,6 +68,23 @@ function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out) break() endif() endwhile(true) + set(${all_depends_out} ${all_depends_inner} PARENT_SCOPE) +endfunction() + +# get `cocos_target` depend all dlls, save the result in `all_depend_dlls_out` +function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out) + + set(depend_libs) + set(all_depend_ext_dlls) + search_depend_libs_recursive(${cocos_target} depend_libs) + foreach(depend_lib ${depend_libs}) + if(TARGET ${depend_lib}) + get_target_property(tmp_dlls ${depend_lib} CC_DEPEND_DLLS) + if(tmp_dlls) + list(APPEND all_depend_ext_dlls ${tmp_dlls}) + endif() + endif() + endforeach() set(${all_depend_dlls_out} ${all_depend_ext_dlls} PARENT_SCOPE) endfunction() @@ -168,7 +178,7 @@ function(setup_cocos_app_config app_name) elseif(MSVC) # only Debug and Release mode was supported when using MSVC. set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}/$") - set(APP_RES_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}/${CMAKE_BUILD_TYPE}") + set(APP_RES_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}/${CMAKE_BUILD_TYPE}/Resources") #Visual Studio Defaults to wrong type set_target_properties(${app_name} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS") else(LINUX) @@ -182,7 +192,6 @@ function(setup_cocos_app_config app_name) cocos_mark_code_files(${APP_NAME}) endif() - set(APP_BIN_DIR ${APP_BIN_DIR} PARENT_SCOPE) set(APP_RES_DIR ${APP_RES_DIR} PARENT_SCOPE) endfunction() @@ -232,26 +241,18 @@ macro(cocos_pak_xcode cocos_target) set(MACOSX_BUNDLE_LONG_VERSION_STRING ${COCOS_APP_LONG_VERSION_STRING}) set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${COCOS_APP_SHORT_VERSION_STRING}) - message("cocos package: ${cocos_target}, plist file: ${COCOS_APP_INFO_PLIST}") + message(STATUS "cocos package: ${cocos_target}, plist file: ${COCOS_APP_INFO_PLIST}") cocos_config_app_xcode_property(${cocos_target}) endmacro() # set Xcode property for application, include all depend target macro(cocos_config_app_xcode_property cocos_app) - cocos_config_target_xcode_property(${cocos_app}) - # for example, cocos_target: cpp-tests link engine_lib: cocos2d - get_target_property(engine_libs ${cocos_app} LINK_LIBRARIES) - foreach(engine_lib ${engine_libs}) - if(TARGET ${engine_lib}) - cocos_config_target_xcode_property(${engine_lib}) - # for example, engine_lib: cocos2d link external_lib: flatbuffers - get_target_property(external_libs ${engine_lib} LINK_LIBRARIES) - foreach(external_lib ${external_libs}) - if(TARGET ${external_lib}) - cocos_config_target_xcode_property(${external_lib}) - endif() - endforeach() + set(depend_libs) + search_depend_libs_recursive(${cocos_app} depend_libs) + foreach(depend_lib ${depend_libs}) + if(TARGET ${depend_lib}) + cocos_config_target_xcode_property(${depend_lib}) endif() endforeach() endmacro() diff --git a/cmake/Modules/CocosBuildSet.cmake b/cmake/Modules/CocosBuildSet.cmake index 31caf1d93d81..f93621238af9 100644 --- a/cmake/Modules/CocosBuildSet.cmake +++ b/cmake/Modules/CocosBuildSet.cmake @@ -1,53 +1,39 @@ -# Disable in-source builds to prevent source tree corruption. -if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}") - message(FATAL_ERROR " - FATAL: In-source builds are not allowed. - You should create a separate directory for build files. - ") -endif() - # print cmake debug info set(CMAKE_DEBUG_TARGET_PROPERTIES # INCLUDE_DIRECTORIES # COMPILE_DEFINITIONS + # COMPILE_OPTIONS + # AUTOUIC_OPTIONS # POSITION_INDEPENDENT_CODE - # CONTAINER_SIZE_REQUIRED - # LIB_VERSION ) -# 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) - -# Use new behaviour with cmake >= 3.1: -# Only interpret if() arguments as variables or keywords when unquoted. -cmake_policy(SET CMP0054 NEW) - -# print the info of CMAKE_TOOLCHAIN_FILE, if defined it -if(DEFINED CMAKE_TOOLCHAIN_FILE) - message(STATUS "using toolchain file: ${CMAKE_TOOLCHAIN_FILE}") -endif() # some useful variables for every one cocos project -set(COCOS_EXTERNAL_DIR ${COCOS2DX_ROOT_PATH}/external) set(ENGINE_BINARY_PATH ${PROJECT_BINARY_DIR}/engine) +if(CMAKE_TOOLCHAIN_FILE) + message(STATUS "using toolchain file:" ${CMAKE_TOOLCHAIN_FILE}) +endif() + message(STATUS "PROJECT_NAME:" ${PROJECT_NAME}) message(STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR}) message(STATUS "COCOS2DX_ROOT_PATH:" ${COCOS2DX_ROOT_PATH}) message(STATUS "CMAKE_MODULE_PATH:" ${CMAKE_MODULE_PATH}) -message(STATUS "COCOS_EXTERNAL_DIR:" ${COCOS_EXTERNAL_DIR}) # delete binary dir if you hope a full clean re-build message(STATUS "PROJECT_BINARY_DIR:" ${PROJECT_BINARY_DIR}) message(STATUS "ENGINE_BINARY_PATH:" ${ENGINE_BINARY_PATH}) -# include helper functions for cmake build -include(CocosBuildHelpers) +# the default behavior of build module +option(DEBUG_MODE "Debug or Release?" ON) +option(BUILD_LUA_LIBS "Build lua libraries" OFF) +option(BUILD_JS_LIBS "Build js libraries" OFF) -# select building modules -include(CocosSelectModule) +# include helper functions +include(CocosBuildHelpers) # set common compiler options -include(CocosCompileOptions) +# add target compile define function +# add target compile options function +include(CocosConfigDefine) +# config libraries dependence include(CocosConfigDepend) diff --git a/cmake/Modules/CocosCompileOptions.cmake b/cmake/Modules/CocosCompileOptions.cmake deleted file mode 100644 index aba389de920c..000000000000 --- a/cmake/Modules/CocosCompileOptions.cmake +++ /dev/null @@ -1,191 +0,0 @@ - #cmake has some strange defaults, this should help us a lot - #Please use them everywhere - #WINDOWS = Windows Desktop - #ANDROID = Android - #IOS = iOS - #MACOSX = MacOS X - #LINUX = Linux - if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(WINDOWS TRUE) - set(SYSTEM_STRING "Windows Desktop") - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") - set(SYSTEM_STRING "Android") - 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(APPLE TRUE) - set(SYSTEM_STRING "IOS") - else() - set(APPLE TRUE) - set(MACOSX TRUE) - set(SYSTEM_STRING "Mac OSX") - endif() - endif() - - if(CMAKE_GENERATOR STREQUAL Xcode) - set(XCODE TRUE) - elseif(CMAKE_GENERATOR MATCHES Visual) - set(VS TRUE) - endif() - #Debug is default value - if(NOT CMAKE_BUILD_TYPE) - if(DEBUG_MODE) - set(CMAKE_BUILD_TYPE Debug) - else() - set(CMAKE_BUILD_TYPE Release) - endif() - endif() - # make configurations type keep same to cmake build type. prevent use generate debug project but switch release mode in IDE - if(CMAKE_GENERATOR) - set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE STRING "Reset the configurations to what we need" FORCE) - endif() - message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") - - # check and print compiler infos - 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++") - else() - set(COMPILER_STRING "${CMAKE_CXX_COMPILER_ID}") - 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 building natively for ${SYSTEM_STRING} with ${COMPILER_STRING}") - endif() - message(STATUS ${BUILDING_STRING}) - - # Set compiler options - if(MSVC) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcmt") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libcmt") - - add_definitions(-DUNICODE -D_UNICODE) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS - -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710 - -wd4514 -wd4056 -wd4996 -wd4099) - # multi thread compile option - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") - # Use inline Debug info (/Z7) format. Or internal error may occur. - # Errors looks like: "xmemory0(592): error C3130: Internal Compiler Error: failed to write injected code block to PDB" - foreach(lang C CXX) - string(REGEX REPLACE "/Z[iI7]" "" CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG}") - set(CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG} /Z7") - endforeach() - else() - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -Wall") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-offsetof -fPIC") - if(CLANG AND NOT ANDROID) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - endif() - if(LINUX) - add_definitions(-D_GNU_SOURCE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -lrt") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -lrt") - endif() - # specail options for android - if(ANDROID) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -fexceptions") - set(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -latomic") - if(CLANG AND ANDROID_ARM_MODE STREQUAL thumb AND ANDROID_ABI STREQUAL armeabi) - string(REPLACE "-mthumb" "-marm" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) - string(REPLACE "-mthumb" "-marm" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - endif() - endif() - endif(MSVC) - - # Set common macro definitions - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-DCOCOS2D_DEBUG=1) - endif() - # Set macro definitions for special platforms - if(WINDOWS) - if(BUILD_SHARED_LIBS) - add_definitions(-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL) - else() - add_definitions(-DCC_STATIC) - endif() - add_definitions(-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32) - set(PLATFORM_FOLDER win32) - elseif(APPLE) - add_definitions(-DUSE_FILE32API) - if(MACOSX) - add_definitions(-DTARGET_OS_MAC) - set(PLATFORM_FOLDER mac) - elseif(IOS) - add_definitions(-DTARGET_OS_IPHONE) - add_definitions(-DTARGET_OS_IOS) - set(PLATFORM_FOLDER ios) - endif(MACOSX) - elseif(LINUX) - add_definitions(-DLINUX) - set(PLATFORM_FOLDER linux) - elseif(ANDROID) - add_definitions(-DUSE_FILE32API) - set(PLATFORM_FOLDER android) - else() - message(FATAL_ERROR "Unsupported platform, CMake will exit") - return() - endif() - - if(CMAKE_FIND_ROOT_PATH) - # Adds cocos2d-x external folder to the list of valid include/library paths when cross-compiling and using prebuilds - set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${COCOS_EXTERNAL_DIR}) - endif() - - # extra config for windows - if(WINDOWS) - # folder much targets - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - # not support other compile tools except MSVC for now - if(MSVC) - # Visual Studio 2015, MSVC_VERSION 1900 (v140 toolset) - # Visual Studio 2017, MSVC_VERSION 1910-1919 (v141 toolset) - if(${MSVC_VERSION} EQUAL 1900 OR ${MSVC_VERSION} GREATER 1900) - message(STATUS "using Windows MSVC generate cocos2d-x project, MSVC_VERSION:${MSVC_VERSION}") - else() - message(FATAL_ERROR "using Windows MSVC generate cocos2d-x project, MSVC_VERSION:${MSVC_VERSION} lower than needed") - endif() - else() - message(FATAL_ERROR "please using Windows MSVC compile cocos2d-x project, support other compile tools not yet") - endif() - endif() - -# custom target property for dll collect -define_property(TARGET - PROPERTY CC_DEPEND_DLLS - BRIEF_DOCS "depend dlls of a target" - FULL_DOCS "use to save depend dlls of a target" -) -# custom target property for lua/js link -define_property(TARGET - PROPERTY CC_JS_DEPEND - BRIEF_DOCS "cocos2d js depend libs" - FULL_DOCS "use to save depend libs of cocos2d js project" -) -define_property(TARGET - PROPERTY CC_LUA_DEPEND - BRIEF_DOCS "cocos2d lua depend libs" - FULL_DOCS "use to save depend libs of cocos2d lua project" -) \ No newline at end of file diff --git a/cmake/Modules/CocosConfigDefine.cmake b/cmake/Modules/CocosConfigDefine.cmake new file mode 100644 index 000000000000..7b6d2c846f5a --- /dev/null +++ b/cmake/Modules/CocosConfigDefine.cmake @@ -0,0 +1,141 @@ + #Please use them everywhere + #WINDOWS = Windows Desktop + #ANDROID = Android + #IOS = iOS + #MACOSX = MacOS X + #LINUX = Linux + if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(WINDOWS TRUE) + set(PLATFORM_FOLDER win32) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") + set(PLATFORM_FOLDER android) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if(ANDROID) + set(PLATFORM_FOLDER android) + else() + set(LINUX TRUE) + set(PLATFORM_FOLDER linux) + endif() + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + if(IOS) + set(APPLE TRUE) + set(PLATFORM_FOLDER ios) + else() + set(APPLE TRUE) + set(MACOSX TRUE) + set(PLATFORM_FOLDER mac) + endif() +else() + message(FATAL_ERROR "Unsupported platform, CMake will exit") + return() + endif() + + # build mode, Debug is default value + if(NOT CMAKE_BUILD_TYPE) + if(DEBUG_MODE) + set(CMAKE_BUILD_TYPE Debug) + else() + set(CMAKE_BUILD_TYPE Release) + endif() + endif() + + if(CMAKE_GENERATOR) + # generators that are capable of organizing into a hierarchy of folders + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + # simplify generator condition judgement + if(CMAKE_GENERATOR STREQUAL Xcode) + set(XCODE TRUE) + elseif(CMAKE_GENERATOR MATCHES Visual) + set(VS TRUE) + endif() + # make configurations type keep same to cmake build type. + set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE STRING "Reset the configurations to what we need" FORCE) + endif() + message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") + + +# custom target property for dll collect +define_property(TARGET + PROPERTY CC_DEPEND_DLLS + BRIEF_DOCS "depend dlls of a target" + FULL_DOCS "use to save depend dlls of a target" +) +# custom target property for lua/js link +define_property(TARGET + PROPERTY CC_JS_DEPEND + BRIEF_DOCS "cocos2d js depend libs" + FULL_DOCS "use to save depend libs of cocos2d js project" +) +define_property(TARGET + PROPERTY CC_LUA_DEPEND + BRIEF_DOCS "cocos2d lua depend libs" + FULL_DOCS "use to save depend libs of cocos2d lua project" +) + +# check c++ standard +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# check visual studio version + if(WINDOWS) + # not support other compile tools except MSVC for now + if(MSVC) + # Visual Studio 2015, MSVC_VERSION 1900 (v140 toolset) + # Visual Studio 2017, MSVC_VERSION 1910-1919 (v141 toolset) + if(${MSVC_VERSION} EQUAL 1900 OR ${MSVC_VERSION} GREATER 1900) + message(STATUS "using Windows MSVC generate cocos2d-x project, MSVC_VERSION:${MSVC_VERSION}") + else() + message(FATAL_ERROR "using Windows MSVC generate cocos2d-x project, MSVC_VERSION:${MSVC_VERSION} lower than needed") + endif() + else() + message(FATAL_ERROR "please using Windows MSVC compile cocos2d-x project, support other compile tools not yet") + endif() +endif() + + # Set macro definitions for special platforms + function(use_cocos2dx_compile_define target) + target_compile_definitions(${target} PUBLIC $<$:COCOS2D_DEBUG=1>) + if(APPLE) + target_compile_definitions(${target} PUBLIC __APPLE__) + target_compile_definitions(${target} PUBLIC USE_FILE32API) + elseif(LINUX) + target_compile_definitions(${target} PUBLIC LINUX) + target_compile_definitions(${target} PUBLIC _GNU_SOURCE) + elseif(ANDROID) + target_compile_definitions(${target} PUBLIC ANDROID) + target_compile_definitions(${target} PUBLIC USE_FILE32API) + elseif(WINDOWS) + target_compile_definitions(${target} + PUBLIC WIN32 + PUBLIC _WIN32 + PUBLIC _WINDOWS + PUBLIC UNICODE + PUBLIC _UNICODE + PUBLIC _CRT_SECURE_NO_WARNINGS + PUBLIC _SCL_SECURE_NO_WARNINGS + ) + if(BUILD_SHARED_LIBS) + target_compile_definitions(${target} + PUBLIC _USRDLL + PUBLIC _EXPORT_DLL_ + PUBLIC _USEGUIDLL + PUBLIC _USREXDLL + PUBLIC _USRSTUDIODLL + PUBLIC _USE3DDLL + ) + else() + target_compile_definitions(${target} PUBLIC CC_STATIC) + endif() + endif() +endfunction() + + # Set compiler options + function(use_cocos2dx_compile_options target) + if(MSVC) + target_compile_options(${target} + PUBLIC /MP + ) + endif() + endfunction() diff --git a/cmake/Modules/CocosConfigDepend.cmake b/cmake/Modules/CocosConfigDepend.cmake index 5602a0dd6d2f..8c3b6e5bc53c 100644 --- a/cmake/Modules/CocosConfigDepend.cmake +++ b/cmake/Modules/CocosConfigDepend.cmake @@ -30,6 +30,7 @@ macro(cocos2dx_depend) find_library(OPENAL_LIBRARY OpenAL) find_library(QUARTZCORE_LIBRARY QuartzCore) find_library(GAMECONTROLLER_LIBRARY GameController) + find_library(METAL_LIBRARY Metal) set(COCOS_APPLE_LIBS ${OPENAL_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} @@ -37,6 +38,7 @@ macro(cocos2dx_depend) ${FOUNDATION_LIBRARY} ${ICONV_LIBRARY} ${GAMECONTROLLER_LIBRARY} + ${METAL_LIBRARY} ) if(BUILD_JS_LIBS) @@ -87,62 +89,8 @@ macro(cocos2dx_depend) endif() endmacro() -macro(cocos2dx_define) - - if(USE_JPEG) - add_definitions(-DCC_USE_JPEG=1) - else() - add_definitions(-DCC_USE_JPEG=0) - endif() - - if(USE_WEBP) - add_definitions(-DCC_USE_WEBP=1) - else() - add_definitions(-DCC_USE_WEBP=0) - endif() - - if(USE_TIFF) - add_definitions(-DCC_USE_TIFF=1) - else() - add_definitions(-DCC_USE_TIFF=0) - endif() - - if(USE_PNG) - add_definitions(-DCC_USE_PNG=1) - else() - add_definitions(-DCC_USE_PNG=0) - endif() - - if(USE_CHIPMUNK) - add_definitions(-DCC_USE_PHYSICS=1) - add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1) - else() - add_definitions(-DCC_USE_PHYSICS=0) - add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=0) - endif() - - if(USE_BOX2D) - add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1) - else() - add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0) - endif(USE_BOX2D) - - if(USE_BULLET) - add_definitions(-DCC_USE_3D_PHYSICS=1) - add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1) - else(USE_BULLET) - add_definitions(-DCC_USE_3D_PHYSICS=0) - add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=0) - endif(USE_BULLET) - - # tocheck, libuv option - add_definitions(-DLWS_WITH_LIBUV) -endmacro() - - -macro(target_use_cocos2dx_depend target) +macro(use_cocos2dx_libs_depend target) cocos2dx_depend() - cocos2dx_define() foreach(platform_lib ${PLATFORM_SPECIFIC_LIBS}) target_link_libraries(${target} ${platform_lib}) endforeach() diff --git a/cmake/Modules/CocosSelectModule.cmake b/cmake/Modules/CocosSelectModule.cmake deleted file mode 100644 index bd3918c1ea58..000000000000 --- a/cmake/Modules/CocosSelectModule.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# the default behavior of build module -set(BUILD_LUA_LIBS_DEFAULT OFF) -set(BUILD_JS_LIBS_DEFAULT OFF) - -option(USE_CHIPMUNK "Use chipmunk for physics library" ON) -option(USE_BOX2D "Use box2d for physics library" OFF) -option(USE_BULLET "Use bullet for physics3d library" ON) -option(USE_RECAST "Use Recast for navigation mesh" ON) -option(USE_WEBP "Use WebP codec" ON) -option(USE_PNG "Use PNG codec" ON) -option(USE_TIFF "Use TIFF codec" ON) -option(USE_JPEG "Use JPEG codec" ON) -option(BUILD_SHARED_LIBS "Build shared libraries" OFF) -option(DEBUG_MODE "Debug or Release?" ON) -option(BUILD_EXTENSIONS "Build extension library" ON) -option(BUILD_EDITOR_SPINE "Build editor support for spine" ON) -option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON) -option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON) -option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT}) -option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT}) - diff --git a/cmake/Modules/PreventInSourceBuilds.cmake b/cmake/Modules/PreventInSourceBuilds.cmake new file mode 100644 index 000000000000..12e03009ba60 --- /dev/null +++ b/cmake/Modules/PreventInSourceBuilds.cmake @@ -0,0 +1,47 @@ +# Adapated from ITKv4/CMake/PreventInSourceBuilds.cmake +# +# This function will prevent in-source builds +function(AssureOutOfSourceBuilds) + # make sure the user doesn't play dirty with symlinks + get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) + get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) + + # disallow in-source builds + if("${srcdir}" STREQUAL "${bindir}") + message("######################################################") + message("# Cocos2d-x should not be configured & built in the Cocos2d-x source directory") + message("# You must run cmake in a build directory.") + message("# For example:") + message("# mkdir Cocos ; cd Cocos") + message("# download & unpack the Cocos2d-x tarball") + message("# mkdir Cocos2d-x-Build") + message("# this will create the following directory structure") + message("#") + message("# Cocos") + message("# +--Cocos2d-x") + message("# +--Cocos2d-x-Build") + message("#") + message("# Then you can proceed to configure and build") + message("# by using the following commands") + message("#") + message("# cd Cocos2d-x-Build") + message("# cmake ../Cocos2d-x # or ccmake, or cmake-gui ") + message("# make") + message("#") + message("# NOTE: Given that you already tried to make an in-source build") + message("# CMake have already created several files & directories") + message("# in your source tree. run 'git status' to find them and") + message("# remove them by doing:") + message("#") + message("# cd Cocos/Cocos2d-x") + message("# git clean -n -d") + message("# git clean -f -d") + message("# git checkout --") + message("#") + message("######################################################") + message(FATAL_ERROR "Quitting configuration") + endif() +endfunction() + +AssureOutOfSourceBuilds() + diff --git a/cmake/ios.toolchain.cmake b/cmake/ios.toolchain.cmake index 3d4490c2c8c9..3d9bd3050c47 100644 --- a/cmake/ios.toolchain.cmake +++ b/cmake/ios.toolchain.cmake @@ -35,8 +35,9 @@ set(UNIX True) set(APPLE True) set(IOS True) -# Required as of cmake 2.8.10 -set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) +# support iOS on cmake 3.11+ +# cmake 3.11 milestone feature, https://gitlab.kitware.com/cmake/cmake/issues/17431 +set(CMAKE_OSX_DEPLOYMENT_TARGET "8.0" CACHE STRING "set of the deployment target for iOS" FORCE) # Determine the cmake host system version so we know where to find the iOS SDKs find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) @@ -203,4 +204,13 @@ macro(find_host_package) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endmacro(find_host_package) \ No newline at end of file +endmacro(find_host_package) + +# This macro lets you find library on the host system +macro(find_host_library) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) + + find_library(${ARGN}) + + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +endmacro(find_host_library) diff --git a/cocos/2d/CCAction.h b/cocos/2d/CCAction.h index 7918377fade7..c1433eb004d3 100644 --- a/cocos/2d/CCAction.h +++ b/cocos/2d/CCAction.h @@ -355,12 +355,6 @@ class CC_DLL Follow : public Action * @param value Turn on/off boundary. */ void setBoundarySet(bool value) { _boundarySet = value; } - - /** @deprecated Alter behavior - turn on/off boundary. - * - * @param value Turn on/off boundary. - */ - CC_DEPRECATED_ATTRIBUTE void setBoudarySet(bool value) { setBoundarySet(value); } // // Override diff --git a/cocos/2d/CCActionGrid.h b/cocos/2d/CCActionGrid.h index 06a5fc983b1b..99cccc94e4db 100644 --- a/cocos/2d/CCActionGrid.h +++ b/cocos/2d/CCActionGrid.h @@ -105,12 +105,6 @@ class CC_DLL Grid3DAction : public GridAction */ Vec3 getVertex(const Vec2& position) const; - /** @deprecated Use getVertex() instead - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Vec3 vertex(const Vec2& position) { return getVertex(position); } - /** * @brief Get the non-transformed vertex that belongs to certain position in the grid. * @param position The position of the grid. @@ -120,12 +114,6 @@ class CC_DLL Grid3DAction : public GridAction */ Vec3 getOriginalVertex(const Vec2& position) const; - /** @deprecated Use getOriginalVertex() instead - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Vec3 originalVertex(const Vec2& position) { return getOriginalVertex(position); } - /** * @brief Set a new vertex to a certain position of the grid. * @param position The position of the grid. @@ -173,12 +161,6 @@ class CC_DLL TiledGrid3DAction : public GridAction */ Quad3 getTile(const Vec2& position) const; - /** @deprecated Use getTile() instead - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Quad3 tile(const Vec2& position) { return getTile(position); } - /** * @brief Get the non-transformed tile that belongs to a certain position of the grid. * @param position The position of the tile want to get. @@ -188,12 +170,6 @@ class CC_DLL TiledGrid3DAction : public GridAction */ Quad3 getOriginalTile(const Vec2& position) const; - /** @deprecated Use getOriginalTile() instead. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Quad3 originalTile(const Vec2& position) { return getOriginalTile(position); } - /** * @brief Set a new tile to a certain position of the grid. * @param position The position of the tile. diff --git a/cocos/2d/CCActionInstant.cpp b/cocos/2d/CCActionInstant.cpp index 5dabab99bb90..f6fcc38bd2cb 100644 --- a/cocos/2d/CCActionInstant.cpp +++ b/cocos/2d/CCActionInstant.cpp @@ -30,13 +30,6 @@ #include "2d/CCNode.h" #include "2d/CCSprite.h" -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - NS_CC_BEGIN // // InstantAction @@ -346,61 +339,18 @@ CallFunc * CallFunc::create(const std::function &func) return nullptr; } -CallFunc * CallFunc::create(Ref* selectorTarget, SEL_CallFunc selector) -{ - CallFunc *ret = new (std::nothrow) CallFunc(); - - if (ret && ret->initWithTarget(selectorTarget)) - { - ret->_callFunc = selector; - ret->autorelease(); - return ret; - } - - CC_SAFE_DELETE(ret); - return nullptr; -} - bool CallFunc::initWithFunction(const std::function &func) { _function = func; return true; } -bool CallFunc::initWithTarget(Ref* target) -{ - if (target) - { - target->retain(); - } - - if (_selectorTarget) - { - _selectorTarget->release(); - } - - _selectorTarget = target; - return true; -} - -CallFunc::~CallFunc() -{ - CC_SAFE_RELEASE(_selectorTarget); -} - CallFunc * CallFunc::clone() const - { +{ // no copy constructor auto a = new (std::nothrow) CallFunc(); - if( _selectorTarget) - { - a->initWithTarget(_selectorTarget); - a->_callFunc = _callFunc; - } - else if( _function ) - { + if( _function ) a->initWithFunction(_function); - } a->autorelease(); return a; @@ -420,11 +370,7 @@ void CallFunc::update(float time) void CallFunc::execute() { - if (_callFunc) - { - (_selectorTarget->*_callFunc)(); - } - else if( _function ) + if( _function ) { _function(); } @@ -448,28 +394,9 @@ CallFuncN * CallFuncN::create(const std::function &func) return nullptr; } -// FIXME: deprecated -CallFuncN * CallFuncN::create(Ref* selectorTarget, SEL_CallFuncN selector) -{ - CallFuncN *ret = new (std::nothrow) CallFuncN(); - - if (ret && ret->initWithTarget(selectorTarget, selector)) - { - ret->autorelease(); - return ret; - } - - CC_SAFE_DELETE(ret); - return nullptr; -} - void CallFuncN::execute() { - if (_callFuncN) - { - (_selectorTarget->*_callFuncN)(_target); - } - else if (_functionN) + if (_functionN) { _functionN(_target); } @@ -481,168 +408,15 @@ bool CallFuncN::initWithFunction(const std::function &func) return true; } -bool CallFuncN::initWithTarget(Ref* selectorTarget, SEL_CallFuncN selector) -{ - if (CallFunc::initWithTarget(selectorTarget)) - { - _callFuncN = selector; - return true; - } - - return false; -} - CallFuncN * CallFuncN::clone() const { // no copy constructor auto a = new (std::nothrow) CallFuncN(); - - if( _selectorTarget) - { - a->initWithTarget(_selectorTarget, _callFuncN); - } - else if( _functionN ){ + if( _functionN) a->initWithFunction(_functionN); - } a->autorelease(); return a; } -// -// CallFuncND -// - -__CCCallFuncND * __CCCallFuncND::create(Ref* selectorTarget, SEL_CallFuncND selector, void* d) -{ - __CCCallFuncND* ret = new (std::nothrow) __CCCallFuncND(); - - if (ret && ret->initWithTarget(selectorTarget, selector, d)) - { - ret->autorelease(); - return ret; - } - - CC_SAFE_DELETE(ret); - return nullptr; -} - -bool __CCCallFuncND::initWithTarget(Ref* selectorTarget, SEL_CallFuncND selector, void* d) -{ - if (CallFunc::initWithTarget(selectorTarget)) - { - _data = d; - _callFuncND = selector; - return true; - } - - return false; -} - -void __CCCallFuncND::execute() -{ - if (_callFuncND) - { - (_selectorTarget->*_callFuncND)(_target, _data); - } -} - -__CCCallFuncND * __CCCallFuncND::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) __CCCallFuncND(); - - if( _selectorTarget) - { - a->initWithTarget(_selectorTarget, _callFuncND, _data); - } - - a->autorelease(); - return a; -} - -// -// CallFuncO -// -__CCCallFuncO::__CCCallFuncO() : -_object(nullptr) -{ -} - -__CCCallFuncO::~__CCCallFuncO() -{ - CC_SAFE_RELEASE(_object); -} - -void __CCCallFuncO::execute() -{ - if (_callFuncO) - { - (_selectorTarget->*_callFuncO)(_object); - } -} - -__CCCallFuncO * __CCCallFuncO::create(Ref* selectorTarget, SEL_CallFuncO selector, Ref* object) -{ - __CCCallFuncO *ret = new (std::nothrow) __CCCallFuncO(); - - if (ret && ret->initWithTarget(selectorTarget, selector, object)) - { - ret->autorelease(); - return ret; - } - - CC_SAFE_DELETE(ret); - return nullptr; -} - -bool __CCCallFuncO::initWithTarget(Ref* selectorTarget, SEL_CallFuncO selector, Ref* object) -{ - if (CallFunc::initWithTarget(selectorTarget)) - { - _object = object; - CC_SAFE_RETAIN(_object); - - _callFuncO = selector; - return true; - } - - return false; -} - -__CCCallFuncO * __CCCallFuncO::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) __CCCallFuncO(); - - if( _selectorTarget) - { - a->initWithTarget(_selectorTarget, _callFuncO, _object); - } - - a->autorelease(); - return a; -} - -Ref* __CCCallFuncO::getObject() const -{ - return _object; -} - -void __CCCallFuncO::setObject(Ref* obj) -{ - if (obj != _object) - { - CC_SAFE_RELEASE(_object); - _object = obj; - CC_SAFE_RETAIN(_object); - } -} - NS_CC_END - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif diff --git a/cocos/2d/CCActionInstant.h b/cocos/2d/CCActionInstant.h index 79e044d7e3b8..d384951c9ff9 100644 --- a/cocos/2d/CCActionInstant.h +++ b/cocos/2d/CCActionInstant.h @@ -335,42 +335,11 @@ class CC_DLL CallFunc : public ActionInstant */ static CallFunc * create(const std::function& func); - /** Creates the action with the callback - - typedef void (Ref::*SEL_CallFunc)(); - @deprecated Use the std::function API instead. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static CallFunc * create(Ref* target, SEL_CallFunc selector); - public: /** Executes the callback. */ virtual void execute(); - /** Get the selector target. - * - * @return The selector target. - */ - Ref* getTargetCallback() - { - return _selectorTarget; - } - - /** Set the selector target. - * - * @param sel The selector target. - */ - void setTargetCallback(Ref* sel) - { - if (sel != _selectorTarget) - { - CC_SAFE_RETAIN(sel); - CC_SAFE_RELEASE(_selectorTarget); - _selectorTarget = sel; - } - } // // Overrides // @@ -382,19 +351,8 @@ class CC_DLL CallFunc : public ActionInstant virtual CallFunc* clone() const override; CC_CONSTRUCTOR_ACCESS: - CallFunc() - : _selectorTarget(nullptr) - , _callFunc(nullptr) - , _function(nullptr) - { - } - virtual ~CallFunc(); - - /** initializes the action with the callback - typedef void (Ref::*SEL_CallFunc)(); - @deprecated Use the std::function API instead. - */ - CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Ref* target); + CallFunc() = default; + virtual ~CallFunc() = default; /** initializes the action with the std::function * @lua NA @@ -402,14 +360,6 @@ class CC_DLL CallFunc : public ActionInstant bool initWithFunction(const std::function& func); protected: - /** Target that will be called */ - Ref* _selectorTarget; - - union - { - SEL_CallFunc _callFunc; - SEL_CallFuncN _callFuncN; - }; /** function that will be called */ std::function _function; @@ -433,13 +383,6 @@ class CC_DLL CallFuncN : public CallFunc */ static CallFuncN * create(const std::function& func); - /** Creates the action with the callback. - - typedef void (Ref::*SEL_CallFuncN)(Node*); - @deprecated Use the std::function API instead. - */ - CC_DEPRECATED_ATTRIBUTE static CallFuncN * create(Ref* target, SEL_CallFuncN selector); - // // Overrides // @@ -452,13 +395,6 @@ class CC_DLL CallFuncN : public CallFunc /** initializes the action with the std::function */ bool initWithFunction(const std::function& func); - - /** initializes the action with the callback - - typedef void (Ref::*SEL_CallFuncN)(Node*); - @deprecated Use the std::function API instead. - */ - CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Ref* target, SEL_CallFuncN selector); protected: /** function that will be called with the "sender" as the 1st argument */ @@ -468,92 +404,6 @@ class CC_DLL CallFuncN : public CallFunc CC_DISALLOW_COPY_AND_ASSIGN(CallFuncN); }; -/** @class __CCCallFuncND - * @deprecated Please use CallFuncN instead. - * @brief Calls a 'callback' with the node as the first argument and the 2nd argument is data. - * ND means: Node and Data. Data is void *, so it could be anything. - * @js NA - */ -class CC_DLL __CCCallFuncND : public CallFunc -{ -public: - /** Creates the action with the callback and the data to pass as an argument. - * - * @param target A certain target. - * @param selector The callback need to be executed. - * @param d Data, is void* type. - * @return An autoreleased __CCCallFuncND object. - */ - CC_DEPRECATED_ATTRIBUTE static __CCCallFuncND * create(Ref* target, SEL_CallFuncND selector, void* d); - - // - // Overrides - // - virtual __CCCallFuncND* clone() const override; - virtual void execute() override; - -CC_CONSTRUCTOR_ACCESS: - __CCCallFuncND() {} - virtual ~__CCCallFuncND() {} - - /** initializes the action with the callback and the data to pass as an argument */ - bool initWithTarget(Ref* target, SEL_CallFuncND selector, void* d); - -protected: - SEL_CallFuncND _callFuncND; - void* _data; - -private: - CC_DISALLOW_COPY_AND_ASSIGN(__CCCallFuncND); -}; - - -/** @class __CCCallFuncO - @deprecated Please use CallFuncN instead. - @brief Calls a 'callback' with an object as the first argument. O means Object. - @since v0.99.5 - @js NA - */ - -class CC_DLL __CCCallFuncO : public CallFunc -{ -public: - /** Creates the action with the callback. - typedef void (Ref::*SEL_CallFuncO)(Ref*); - * - * @param target A certain target. - * @param selector The callback need to be executed. - * @param object An object as the callback's first argument. - * @return An autoreleased __CCCallFuncO object. - */ - CC_DEPRECATED_ATTRIBUTE static __CCCallFuncO * create(Ref* target, SEL_CallFuncO selector, Ref* object); - // - // Overrides - // - virtual __CCCallFuncO* clone() const override; - virtual void execute() override; - - Ref* getObject() const; - void setObject(Ref* obj); - -CC_CONSTRUCTOR_ACCESS: - __CCCallFuncO(); - virtual ~__CCCallFuncO(); - /** initializes the action with the callback - - typedef void (Ref::*SEL_CallFuncO)(Ref*); - */ - bool initWithTarget(Ref* target, SEL_CallFuncO selector, Ref* object); - -protected: - /** object to be passed as argument */ - Ref* _object; - SEL_CallFuncO _callFuncO; - -private: - CC_DISALLOW_COPY_AND_ASSIGN(__CCCallFuncO); -}; - // end of actions group /// @} diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index bbc54a655461..592c0184c153 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -177,19 +177,6 @@ Sequence* Sequence::createWithTwoActions(FiniteTimeAction *actionOne, FiniteTime return nullptr; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Sequence* Sequence::variadicCreate(FiniteTimeAction *action1, ...) -{ - va_list params; - va_start(params, action1); - - Sequence *ret = Sequence::createWithVariableList(action1, params); - - va_end(params); - - return ret; -} -#else Sequence* Sequence::create(FiniteTimeAction *action1, ...) { va_list params; @@ -201,7 +188,6 @@ Sequence* Sequence::create(FiniteTimeAction *action1, ...) return ret; } -#endif Sequence* Sequence::createWithVariableList(FiniteTimeAction *action1, va_list args) { @@ -631,19 +617,6 @@ RepeatForever *RepeatForever::reverse() const // Spawn // -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Spawn* Spawn::variadicCreate(FiniteTimeAction *action1, ...) -{ - va_list params; - va_start(params, action1); - - Spawn *ret = Spawn::createWithVariableList(action1, params); - - va_end(params); - - return ret; -} -#else Spawn* Spawn::create(FiniteTimeAction *action1, ...) { va_list params; @@ -655,7 +628,6 @@ Spawn* Spawn::create(FiniteTimeAction *action1, ...) return ret; } -#endif Spawn* Spawn::createWithVariableList(FiniteTimeAction *action1, va_list args) { @@ -2535,15 +2507,7 @@ Animate* Animate::create(Animation *animation) } Animate::Animate() -: _splitTimes(new std::vector) -, _nextFrame(0) -, _origFrame(nullptr) -, _executedLoops(0) -, _animation(nullptr) -, _frameDisplayedEvent(nullptr) -, _currFrameIndex(0) { - } Animate::~Animate() diff --git a/cocos/2d/CCActionInterval.h b/cocos/2d/CCActionInterval.h index 59e5254715cb..4d6b3b4f6620 100644 --- a/cocos/2d/CCActionInterval.h +++ b/cocos/2d/CCActionInterval.h @@ -132,25 +132,7 @@ class CC_DLL Sequence : public ActionInterval * * @return An autoreleased Sequence object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported - typedef FiniteTimeAction* M; - static Sequence* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } - static Sequence* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } - static Sequence* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static Sequence* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for variable argument lists longer than 10 items, use the other create functions or variadicCreate with NULL as the last argument - static Sequence* variadicCreate(FiniteTimeAction* item, ...); -#else static Sequence* create(FiniteTimeAction *action1, ...) CC_REQUIRES_NULL_TERMINATION; -#endif /** Helper constructor to create an array of sequenceable actions given an array. * @code @@ -361,25 +343,7 @@ class CC_DLL Spawn : public ActionInterval * * @return An autoreleased Spawn object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. - typedef FiniteTimeAction* M; - static Spawn* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } - static Spawn* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } - static Spawn* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static Spawn* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for variable argument lists longer than 10 items, use the other create functions or createSpawn with NULL as the last argument. - static Spawn* variadicCreate(FiniteTimeAction* item, ...); -#else static Spawn* create(FiniteTimeAction *action1, ...) CC_REQUIRES_NULL_TERMINATION; -#endif /** Helper constructor to create an array of spawned actions. * @@ -1561,14 +1525,14 @@ class CC_DLL Animate : public ActionInterval bool initWithAnimation(Animation *animation); protected: - std::vector* _splitTimes; - int _nextFrame; - SpriteFrame* _origFrame; - int _currFrameIndex; - unsigned int _executedLoops; - Animation* _animation; - - EventCustom* _frameDisplayedEvent; + std::vector* _splitTimes = new std::vector; + int _nextFrame = 0; + SpriteFrame* _origFrame = nullptr; + int _currFrameIndex = 0; + unsigned int _executedLoops = 0; + Animation* _animation = nullptr; + + EventCustom* _frameDisplayedEvent = nullptr; AnimationFrame::DisplayedEventInfo _frameDisplayedEventInfo; private: CC_DISALLOW_COPY_AND_ASSIGN(Animate); diff --git a/cocos/2d/CCActionManager.h b/cocos/2d/CCActionManager.h index 8208cd552093..88959662a611 100644 --- a/cocos/2d/CCActionManager.h +++ b/cocos/2d/CCActionManager.h @@ -148,10 +148,6 @@ class CC_DLL ActionManager : public Ref */ virtual ssize_t getNumberOfRunningActions() const; - /** @deprecated Use getNumberOfRunningActionsInTarget() instead. - */ - CC_DEPRECATED_ATTRIBUTE ssize_t numberOfRunningActionsInTarget(Node *target) const { return getNumberOfRunningActionsInTarget(target); } - /** Returns the numbers of actions that are running in a * certain target with a specific tag. diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index 86d6c8af4fc8..b59acd3a86a6 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -201,11 +201,6 @@ class CC_DLL Animation : public Ref, public Clonable * @param filename The path of SpriteFrame. */ void addSpriteFrameWithFile(const std::string& filename); - /** - * @deprecated. Use addSpriteFrameWithFile() instead. - @js NA - */ - CC_DEPRECATED_ATTRIBUTE void addSpriteFrameWithFileName(const std::string& filename){ addSpriteFrameWithFile(filename);} /** Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it. * The frame will be added with one "delay unit". diff --git a/cocos/2d/CCAnimationCache.h b/cocos/2d/CCAnimationCache.h index ed082d07f837..4b56a336d56d 100644 --- a/cocos/2d/CCAnimationCache.h +++ b/cocos/2d/CCAnimationCache.h @@ -75,12 +75,6 @@ class CC_DLL AnimationCache : public Ref */ static void destroyInstance(); - /** @deprecated Use getInstance() instead. */ - CC_DEPRECATED_ATTRIBUTE static AnimationCache* sharedAnimationCache() { return AnimationCache::getInstance(); } - - /** @deprecated Use destroyInstance() instead. */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedAnimationCache() { return AnimationCache::destroyInstance(); } - bool init(void); /** Adds a Animation with a name. @@ -95,11 +89,6 @@ class CC_DLL AnimationCache : public Ref * @param name The name of animation. */ void removeAnimation(const std::string& name); - /** @deprecated. Use removeAnimation() instead - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void removeAnimationByName(const std::string& name){ removeAnimation(name);} /** Returns a Animation that was previously added. * If the name is not found it will return nil. @@ -108,12 +97,6 @@ class CC_DLL AnimationCache : public Ref * @return A Animation that was previously added. If the name is not found it will return nil. */ Animation* getAnimation(const std::string& name); - /** - * @deprecated. Use getAnimation() instead - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Animation* animationByName(const std::string& name){ return getAnimation(name); } /** Adds an animation from an NSDictionary. * Make sure that the frames were previously loaded in the SpriteFrameCache. diff --git a/cocos/2d/CCAtlasNode.cpp b/cocos/2d/CCAtlasNode.cpp index 0c1097c16a9b..787a93585555 100644 --- a/cocos/2d/CCAtlasNode.cpp +++ b/cocos/2d/CCAtlasNode.cpp @@ -30,8 +30,10 @@ THE SOFTWARE. #include "renderer/CCTextureAtlas.h" #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" +#include "base/ccUtils.h" +#include "renderer/ccShaders.h" #include "renderer/CCRenderer.h" -#include "renderer/CCGLProgram.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN @@ -40,21 +42,34 @@ NS_CC_BEGIN // AtlasNode - Creation & Init AtlasNode::AtlasNode() -: _itemsPerRow(0) -, _itemsPerColumn(0) -, _itemWidth(0) -, _itemHeight(0) -, _textureAtlas(nullptr) -, _isOpacityModifyRGB(false) -, _quadsToDraw(0) -, _uniformColor(0) -, _ignoreContentScaleFactor(false) { + auto& pipelineDescriptor = _quadCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + + //set vertexLayout according to V3F_C4B_T2F structure + backend::VertexLayout vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + pipelineDescriptor.vertexLayout = vertexLayout; } AtlasNode::~AtlasNode() { CC_SAFE_RELEASE(_textureAtlas); + CC_SAFE_RELEASE(_programState); } AtlasNode * AtlasNode::create(const std::string& tile, int tileWidth, int tileHeight, int itemsToRender) @@ -103,9 +118,6 @@ bool AtlasNode::initWithTexture(Texture2D* texture, int tileWidth, int tileHeigh _quadsToDraw = itemsToRender; - // shader stuff - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture)); - return true; } @@ -132,12 +144,18 @@ void AtlasNode::updateAtlasValues() // AtlasNode - draw void AtlasNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) -{ - // ETC1 ALPHA supports. - _quadCommand.init(_globalZOrder, _textureAtlas->getTexture(), getGLProgramState(), _blendFunc, _textureAtlas->getQuads(), _quadsToDraw, transform, flags); +{ + if( _textureAtlas->getTotalQuads() == 0 ) + return; + auto programState = _quadCommand.getPipelineDescriptor().programState; + programState->setTexture(_textureLocation, 0, _textureAtlas->getTexture()->getBackendTexture()); + + const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + programState->setUniform(_mvpMatrixLocation, projectionMat.m, sizeof(projectionMat.m)); + + _quadCommand.init(_globalZOrder, _textureAtlas->getTexture(), _blendFunc, _textureAtlas->getQuads(), _quadsToDraw, transform, flags); renderer->addCommand(&_quadCommand); - } // AtlasNode - RGBA protocol @@ -246,7 +264,7 @@ TextureAtlas * AtlasNode::getTextureAtlas() const return _textureAtlas; } -ssize_t AtlasNode::getQuadsToDraw() const +size_t AtlasNode::getQuadsToDraw() const { return _quadsToDraw; } diff --git a/cocos/2d/CCAtlasNode.h b/cocos/2d/CCAtlasNode.h index 612fe799d179..e7292567ea36 100644 --- a/cocos/2d/CCAtlasNode.h +++ b/cocos/2d/CCAtlasNode.h @@ -25,9 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCATLAS_NODE_H__ -#define __CCATLAS_NODE_H__ +#pragma once #include "2d/CCNode.h" #include "base/CCProtocols.h" @@ -66,19 +64,6 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol */ virtual void updateAtlasValues(); - /** Set an buffer manager of the texture vertex. */ - void setTextureAtlas(TextureAtlas* textureAtlas); - - /** Return the buffer manager of the texture vertex. - * - * @return Return A TextureAtlas. - */ - TextureAtlas* getTextureAtlas() const; - - void setQuadsToDraw(ssize_t quadsToDraw); - ssize_t getQuadsToDraw() const; - - // Overrides virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; virtual Texture2D* getTexture() const override; @@ -88,18 +73,31 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol virtual const Color3B& getColor(void) const override; virtual void setColor(const Color3B& color) override; virtual void setOpacity(GLubyte opacity) override; + /** - * @code - * When this function bound into js or lua,the parameter will be changed - * In js: var setBlendFunc(var src, var dst) - * @endcode - * @lua NA - */ + * @code + * When this function bound into js or lua,the parameter will be changed + * In js: var setBlendFunc(var src, var dst) + * @endcode + * @lua NA + */ virtual void setBlendFunc(const BlendFunc& blendFunc) override; /** - * @lua NA - */ + * @lua NA + */ virtual const BlendFunc& getBlendFunc() const override; + + /** Set an buffer manager of the texture vertex. */ + void setTextureAtlas(TextureAtlas* textureAtlas); + + /** Return the buffer manager of the texture vertex. + * + * @return Return A TextureAtlas. + */ + TextureAtlas* getTextureAtlas() const; + + void setQuadsToDraw(ssize_t quadsToDraw); + size_t getQuadsToDraw() const; CC_CONSTRUCTOR_ACCESS: AtlasNode(); @@ -112,39 +110,41 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol bool initWithTexture(Texture2D* texture, int tileWidth, int tileHeight, int itemsToRender); protected: + friend class Director; + void calculateMaxItems(); void updateBlendFunc(); void updateOpacityModifyRGB(); - - friend class Director; void setIgnoreContentScaleFactor(bool bIgnoreContentScaleFactor); /** Chars per row. */ - int _itemsPerRow; + int _itemsPerRow = 0; /** Chars per column. */ - int _itemsPerColumn; + int _itemsPerColumn = 0; /** Width of each char. */ - int _itemWidth; + int _itemWidth = 0; /** Height of each char. */ - int _itemHeight; + int _itemHeight = 0; Color3B _colorUnmodified; - TextureAtlas* _textureAtlas; + TextureAtlas* _textureAtlas = nullptr; /** Protocol variables. */ - bool _isOpacityModifyRGB; + bool _isOpacityModifyRGB = false; BlendFunc _blendFunc; /** Quads to draw. */ - ssize_t _quadsToDraw; - /** Color uniform. */ - GLint _uniformColor; + size_t _quadsToDraw = 0; + /** This variable is only used for LabelAtlas FPS display. So plz don't modify its value. */ - bool _ignoreContentScaleFactor; - /** Quad command. */ + bool _ignoreContentScaleFactor = false; + QuadCommand _quadCommand; - + backend::UniformLocation _textureLocation; + backend::UniformLocation _mvpMatrixLocation; + backend::ProgramState* _programState = nullptr; + private: CC_DISALLOW_COPY_AND_ASSIGN(AtlasNode); @@ -154,7 +154,3 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol /// @} NS_CC_END - -#endif // __CCATLAS_NODE_H__ - - diff --git a/cocos/2d/CCAutoPolygon.cpp b/cocos/2d/CCAutoPolygon.cpp index a873279b1e71..a8baa2656e22 100644 --- a/cocos/2d/CCAutoPolygon.cpp +++ b/cocos/2d/CCAutoPolygon.cpp @@ -161,11 +161,6 @@ unsigned int PolygonInfo::getTrianglesCount() const return (unsigned int)triangles.indexCount/3; } -unsigned int PolygonInfo::getTriaglesCount() const -{ - return getTrianglesCount(); -} - float PolygonInfo::getArea() const { float area = 0; @@ -192,7 +187,7 @@ AutoPolygon::AutoPolygon(const std::string &filename) _filename = filename; _image = new (std::nothrow) Image(); _image->initWithImageFile(filename); - CCASSERT(_image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, "unsupported format, currently only supports rgba8888"); + CCASSERT(_image->getPixelFormat()==Texture2D::PixelFormat::RGBA8888, "unsupported format, currently only supports rgba8888"); _data = _image->getData(); _width = _image->getWidth(); _height = _image->getHeight(); @@ -649,7 +644,7 @@ TrianglesCommand::Triangles AutoPolygon::triangulate(const std::vector& po // Triangles should really use std::vector and not arrays for verts and indices. // Then the above memcpy would not be necessary - TrianglesCommand::Triangles triangles = { vertsBuf, indicesBuf, static_cast(verts.size()), static_cast(indices.size()) }; + TrianglesCommand::Triangles triangles = { vertsBuf, indicesBuf, (unsigned int)verts.size(), (unsigned int)indices.size() }; return triangles; } diff --git a/cocos/2d/CCAutoPolygon.h b/cocos/2d/CCAutoPolygon.h index 1f8b835de0e0..35505a0f0cb2 100644 --- a/cocos/2d/CCAutoPolygon.h +++ b/cocos/2d/CCAutoPolygon.h @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. @@ -109,9 +109,6 @@ class CC_DLL PolygonInfo * @return number of triangles */ unsigned int getTrianglesCount() const; - - /** @deprecated Use method getTrianglesCount() instead */ - CC_DEPRECATED_ATTRIBUTE unsigned int getTriaglesCount() const; /** * get sum of all triangle area size diff --git a/cocos/2d/CCCamera.cpp b/cocos/2d/CCCamera.cpp index e1e42ef2c1e8..53e5145a40b8 100644 --- a/cocos/2d/CCCamera.cpp +++ b/cocos/2d/CCCamera.cpp @@ -1,6 +1,6 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -33,13 +33,11 @@ #include "renderer/CCRenderer.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCGLProgramCache.h" -#include "renderer/CCFrameBuffer.h" -#include "renderer/CCRenderState.h" NS_CC_BEGIN Camera* Camera::_visitingCamera = nullptr; -experimental::Viewport Camera::_defaultViewport; +Viewport Camera::_defaultViewport; // start static methods @@ -90,11 +88,11 @@ Camera* Camera::getDefaultCamera() return nullptr; } -const experimental::Viewport& Camera::getDefaultViewport() +const Viewport& Camera::getDefaultViewport() { return _defaultViewport; } -void Camera::setDefaultViewport(const experimental::Viewport& vp) +void Camera::setDefaultViewport(const Viewport& vp) { _defaultViewport = vp; } @@ -108,12 +106,12 @@ const Camera* Camera::getVisitingCamera() Camera::Camera() { - _frustum.setClipZ(true); + // minggo comment + // _frustum.setClipZ(true); } Camera::~Camera() { - CC_SAFE_RELEASE_NULL(_fbo); CC_SAFE_RELEASE(_clearBrush); } @@ -334,15 +332,16 @@ void Camera::unprojectGL(const Size& viewport, const Vec3* src, Vec3* dst) const dst->set(screen.x, screen.y, screen.z); } -bool Camera::isVisibleInFrustum(const AABB* aabb) const -{ - if (_frustumDirty) - { - _frustum.initFrustum(this); - _frustumDirty = false; - } - return !_frustum.isOutOfFrustum(*aabb); -} +// minggo comment +// bool Camera::isVisibleInFrustum(const AABB* aabb) const +// { +// if (_frustumDirty) +// { +// _frustum.initFrustum(this); +// _frustumDirty = false; +// } +// return !_frustum.isOutOfFrustum(*aabb); +// } float Camera::getDepthInView(const Mat4& transform) const { @@ -422,94 +421,21 @@ void Camera::clearBackground() } } -void Camera::setFrameBufferObject(experimental::FrameBuffer *fbo) -{ - CC_SAFE_RETAIN(fbo); - CC_SAFE_RELEASE_NULL(_fbo); - _fbo = fbo; - if(_scene) - { - _scene->setCameraOrderDirty(); - } -} - void Camera::apply() { _viewProjectionUpdated = _transformUpdated; - applyFrameBufferObject(); applyViewport(); } -void Camera::applyFrameBufferObject() -{ - if(nullptr == _fbo) - { - // inherit from context if it doesn't have a FBO - // don't call apply the default one -// experimental::FrameBuffer::applyDefaultFBO(); - } - else - { - _fbo->applyFBO(); - } -} - void Camera::applyViewport() { - glGetIntegerv(GL_VIEWPORT, _oldViewport); - - if(nullptr == _fbo) - { - glViewport(getDefaultViewport()._left, getDefaultViewport()._bottom, getDefaultViewport()._width, getDefaultViewport()._height); - } - else - { - glViewport(_viewport._left * _fbo->getWidth(), _viewport._bottom * _fbo->getHeight(), - _viewport._width * _fbo->getWidth(), _viewport._height * _fbo->getHeight()); - } -} - -void Camera::setViewport(const experimental::Viewport& vp) -{ - _viewport = vp; -} - -void Camera::restore() -{ - restoreFrameBufferObject(); - restoreViewport(); -} - -void Camera::restoreFrameBufferObject() -{ - if(nullptr == _fbo) - { - // it was inherited from context if it doesn't have a FBO - // don't call restore the default one... just keep using the previous one -// experimental::FrameBuffer::applyDefaultFBO(); - } - else - { - _fbo->restoreFBO(); - } -} - -void Camera::restoreViewport() -{ - glViewport(_oldViewport[0], _oldViewport[1], _oldViewport[2], _oldViewport[3]); + Director::getInstance()->getRenderer()->setViewPort(_defaultViewport.x, _defaultViewport.y, _defaultViewport.w, _defaultViewport.h); } int Camera::getRenderOrder() const { int result(0); - if(_fbo) - { - result = _fbo->getFID()<<8; - } - else - { - result = 127 <<8; - } + result = 127 <<8; result += _depth; return result; } diff --git a/cocos/2d/CCCamera.h b/cocos/2d/CCCamera.h index 1214a10b35c5..2174b2262469 100644 --- a/cocos/2d/CCCamera.h +++ b/cocos/2d/CCCamera.h @@ -1,6 +1,6 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -25,14 +25,12 @@ THE SOFTWARE. Code based GamePlay3D's Camera: http://gameplay3d.org ****************************************************************************/ -#ifndef _CCCAMERA_H__ -#define _CCCAMERA_H__ +#pragma once #include "2d/CCNode.h" #include "3d/CCFrustum.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCCustomCommand.h" -#include "renderer/CCFrameBuffer.h" NS_CC_BEGIN @@ -105,8 +103,8 @@ class CC_DLL Camera :public Node */ static const Camera* getVisitingCamera(); - static const experimental::Viewport& getDefaultViewport(); - static void setDefaultViewport(const experimental::Viewport& vp); + static const Viewport& getDefaultViewport(); + static void setDefaultViewport(const Viewport& vp); /** * Get the default camera of the current running scene. @@ -205,7 +203,8 @@ class CC_DLL Camera :public Node /** * Is this aabb visible in frustum */ - bool isVisibleInFrustum(const AABB* aabb) const; + // minggo comment + // bool isVisibleInFrustum(const AABB* aabb) const; /** * Get object depth towards camera @@ -249,19 +248,6 @@ class CC_DLL Camera :public Node Apply the FBO, RenderTargets and viewport. */ void apply(); - /** - Restore the FBO, RenderTargets and viewport. - */ - void restore(); - - /** - Set FBO, which will attach several render target for the rendered result. - */ - void setFrameBufferObject(experimental::FrameBuffer* fbo); - /** - Set Viewport for camera. - */ - void setViewport(const experimental::Viewport& vp); /** * Whether or not the viewprojection matrix was updated since the last frame. @@ -300,14 +286,11 @@ class CC_DLL Camera :public Node bool initDefault(); bool initPerspective(float fieldOfView, float aspectRatio, float nearPlane, float farPlane); bool initOrthographic(float zoomX, float zoomY, float nearPlane, float farPlane); - void applyFrameBufferObject(); void applyViewport(); - void restoreFrameBufferObject(); - void restoreViewport(); protected: static Camera* _visitingCamera; - static experimental::Viewport _defaultViewport; + static Viewport _defaultViewport; Scene* _scene = nullptr; //Scene camera belongs to Mat4 _projection; @@ -317,25 +300,20 @@ class CC_DLL Camera :public Node Vec3 _up; Camera::Type _type; - float _fieldOfView; - float _zoom[2]; - float _aspectRatio; - float _nearPlane; - float _farPlane; + float _fieldOfView = 0.f; + float _zoom[2] = {0.f}; + float _aspectRatio = 0.f; + float _nearPlane = 0.f; + float _farPlane = 0.f; mutable bool _viewProjectionDirty = true; bool _viewProjectionUpdated = false; //Whether or not the viewprojection matrix was updated since the last frame. CameraFlag _cameraFlag = CameraFlag::DEFAULT; // camera flag - mutable Frustum _frustum; // camera frustum + // minggo comment + //mutable Frustum _frustum; // camera frustum mutable bool _frustumDirty = true; int8_t _depth = -1; //camera depth, the depth of camera with CameraFlag::DEFAULT flag is 0 by default, a camera with larger depth is drawn on top of camera with smaller depth CameraBackgroundBrush* _clearBrush = nullptr; //brush used to clear the back ground - - experimental::Viewport _viewport; - experimental::FrameBuffer* _fbo = nullptr; - GLint _oldViewport[4]; }; NS_CC_END - -#endif// __CCCAMERA_H_ diff --git a/cocos/2d/CCCameraBackgroundBrush.h b/cocos/2d/CCCameraBackgroundBrush.h index c18f7f4aadb9..158d10726c5f 100644 --- a/cocos/2d/CCCameraBackgroundBrush.h +++ b/cocos/2d/CCCameraBackgroundBrush.h @@ -31,7 +31,6 @@ #include "3d/CCFrustum.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCCustomCommand.h" -#include "renderer/CCFrameBuffer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index ed3563cde980..43156335e942 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -25,34 +25,24 @@ * THE SOFTWARE. * */ - #include "2d/CCClippingNode.h" -#include "2d/CCDrawingPrimitives.h" -#include "renderer/CCGLProgramCache.h" #include "renderer/CCRenderer.h" -#include "renderer/CCRenderState.h" #include "base/CCDirector.h" #include "base/CCStencilStateManager.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#define CC_CLIPPING_NODE_OPENGLES 0 -#else -#define CC_CLIPPING_NODE_OPENGLES 1 -#endif - NS_CC_BEGIN -#if CC_CLIPPING_NODE_OPENGLES -static void setProgram(Node *n, GLProgram *p) -{ - n->setGLProgram(p); - - auto& children = n->getChildren(); - for(const auto &child : children) { - setProgram(child, p); - } -} -#endif +//namespace +//{ +// void setProgram(Node *n, GLProgram *p) +// { +// n->setGLProgram(p); +// +// auto& children = n->getChildren(); +// for(const auto &child : children) +// setProgram(child, p); +// } +//} ClippingNode::ClippingNode() : _stencil(nullptr) @@ -211,26 +201,26 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32 renderer->pushGroup(_groupCommand.getRenderQueueID()); - _beforeVisitCmd.init(_globalZOrder); - _beforeVisitCmd.func = CC_CALLBACK_0(StencilStateManager::onBeforeVisit, _stencilStateManager); - renderer->addCommand(&_beforeVisitCmd); + // _beforeVisitCmd.init(_globalZOrder); + // _beforeVisitCmd.func = CC_CALLBACK_0(StencilStateManager::onBeforeVisit, _stencilStateManager); + // renderer->addCommand(&_beforeVisitCmd); + _stencilStateManager->onBeforeVisit(_globalZOrder); auto alphaThreshold = this->getAlphaThreshold(); if (alphaThreshold < 1) { -#if CC_CLIPPING_NODE_OPENGLES - // since glAlphaTest do not exists in OES, use a shader that writes - // pixel only if greater than an alpha threshold - GLProgram *program = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST_NO_MV); - GLint alphaValueLocation = glGetUniformLocation(program->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE); - // set our alphaThreshold - program->use(); - program->setUniformLocationWith1f(alphaValueLocation, alphaThreshold); - // we need to recursively apply this shader to all the nodes in the stencil node - // FIXME: we should have a way to apply shader to all nodes without having to do this - setProgram(_stencil, program); -#endif - + //TODO: minggo: it is hard to do it in current design, and it is a bad design. + // We may not support it. +// // since glAlphaTest do not exists in OES, use a shader that writes +// // pixel only if greater than an alpha threshold +// GLProgram *program = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST_NO_MV); +// GLint alphaValueLocation = glGetUniformLocation(program->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE); +// // set our alphaThreshold +// program->use(); +// program->setUniformLocationWith1f(alphaValueLocation, alphaThreshold); +// // we need to recursively apply this shader to all the nodes in the stencil node +// // FIXME: we should have a way to apply shader to all nodes without having to do this +// setProgram(_stencil, program); } _stencil->visit(renderer, _modelViewTransform, flags); @@ -341,15 +331,16 @@ GLfloat ClippingNode::getAlphaThreshold() const void ClippingNode::setAlphaThreshold(GLfloat alphaThreshold) { -#if CC_CLIPPING_NODE_OPENGLES - if (alphaThreshold == 1 && alphaThreshold != _stencilStateManager->getAlphaThreshold()) - { - // should reset program used by _stencil - if (_stencil) - setProgram(_stencil, _originStencilProgram); - } -#endif - +//TODO: minggo +//#if CC_CLIPPING_NODE_OPENGLES +// if (alphaThreshold == 1 && alphaThreshold !cpp= _stencilStateManager->getAlphaThreshold()) +// { +// // should reset program used by _stencil +// if (_stencil) +// setProgram(_stencil, _originStencilProgram); +// } +//#endif + _stencilStateManager->setAlphaThreshold(alphaThreshold); } diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 573739a77683..32b42118cc47 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -25,14 +25,12 @@ * THE SOFTWARE. * */ - -#ifndef __MISCNODE_CCCLIPPING_NODE_H__ -#define __MISCNODE_CCCLIPPING_NODE_H__ +#pragma once #include "2d/CCNode.h" -#include "platform/CCGL.h" #include "renderer/CCGroupCommand.h" #include "renderer/CCCustomCommand.h" +#include "renderer/CCCallbackCommand.h" NS_CC_BEGIN @@ -162,14 +160,12 @@ class CC_DLL ClippingNode : public Node StencilStateManager* _stencilStateManager; GroupCommand _groupCommand; - CustomCommand _beforeVisitCmd; - CustomCommand _afterDrawStencilCmd; - CustomCommand _afterVisitCmd; + CallbackCommand _beforeVisitCmd; + CallbackCommand _afterDrawStencilCmd; + CallbackCommand _afterVisitCmd; private: CC_DISALLOW_COPY_AND_ASSIGN(ClippingNode); }; /** @} */ NS_CC_END - -#endif // __MISCNODE_CCCLIPPING_NODE_H__ diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index 53a9f6df6bfa..b2f270392cae 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -34,6 +34,9 @@ #include "2d/CCActionCatmullRom.h" #include "platform/CCGL.h" #include "base/ccUtils.h" +#include "renderer/CCGLProgram.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN @@ -106,13 +109,15 @@ DrawNode::DrawNode(GLfloat lineWidth) { _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; #if CC_ENABLE_CACHE_TEXTURE_DATA + //TODO new-renderer: interface setupBuffer removal + // Need to listen the event only when not use batchnode, because it will use VBO - auto listener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - /** listen the event that renderer was recreated on Android/WP8 */ - this->setupBuffer(); - }); +// auto listener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ +// /** listen the event that renderer was recreated on Android/WP8 */ +// this->setupBuffer(); +// }); - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); +// _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); #endif } @@ -125,21 +130,9 @@ DrawNode::~DrawNode() free(_bufferGLLine); _bufferGLLine = nullptr; - glDeleteBuffers(1, &_vbo); - glDeleteBuffers(1, &_vboGLLine); - glDeleteBuffers(1, &_vboGLPoint); - _vbo = 0; - _vboGLPoint = 0; - _vboGLLine = 0; - - if (Configuration::getInstance()->supportsShareableVAO()) - { - glBindVertexArray(0); - glDeleteVertexArrays(1, &_vao); - glDeleteVertexArrays(1, &_vaoGLLine); - glDeleteVertexArrays(1, &_vaoGLPoint); - _vao = _vaoGLLine = _vaoGLPoint = 0; - } + CC_SAFE_RELEASE(_programState); + CC_SAFE_RELEASE(_programStatePoint); + CC_SAFE_RELEASE(_programStateLine); } DrawNode* DrawNode::create(GLfloat defaultLineWidth) @@ -165,6 +158,9 @@ void DrawNode::ensureCapacity(int count) { _bufferCapacity += MAX(_bufferCapacity, count); _buffer = (V2F_C4B_T2F*)realloc(_buffer, _bufferCapacity*sizeof(V2F_C4B_T2F)); + + _customCommand.createVertexBuffer(sizeof(V2F_C4B_T2F), _bufferCapacity, CustomCommand::BufferUsage::STATIC); + _customCommand.updateVertexBuffer(_buffer, _bufferCapacity*sizeof(V2F_C4B_T2F)); } } @@ -176,6 +172,9 @@ void DrawNode::ensureCapacityGLPoint(int count) { _bufferCapacityGLPoint += MAX(_bufferCapacityGLPoint, count); _bufferGLPoint = (V2F_C4B_T2F*)realloc(_bufferGLPoint, _bufferCapacityGLPoint*sizeof(V2F_C4B_T2F)); + + _customCommandGLPoint.createVertexBuffer(sizeof(V2F_C4B_T2F), _bufferCapacityGLPoint, CustomCommand::BufferUsage::STATIC); + _customCommandGLPoint.updateVertexBuffer(_bufferGLPoint, _bufferCapacityGLPoint*sizeof(V2F_C4B_T2F)); } } @@ -187,271 +186,148 @@ void DrawNode::ensureCapacityGLLine(int count) { _bufferCapacityGLLine += MAX(_bufferCapacityGLLine, count); _bufferGLLine = (V2F_C4B_T2F*)realloc(_bufferGLLine, _bufferCapacityGLLine*sizeof(V2F_C4B_T2F)); + + _customCommandGLLine.createVertexBuffer(sizeof(V2F_C4B_T2F), _bufferCapacityGLLine, CustomCommand::BufferUsage::STATIC); + _customCommandGLLine.updateVertexBuffer(_bufferGLLine, _bufferCapacityGLLine*sizeof(V2F_C4B_T2F)); } } -void DrawNode::setupBuffer() -{ - if (Configuration::getInstance()->supportsShareableVAO()) - { - glGenVertexArrays(1, &_vao); - glBindVertexArray(_vao); - glGenBuffers(1, &_vbo); - glBindBuffer(GL_ARRAY_BUFFER, _vbo); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)* _bufferCapacity, _buffer, GL_STREAM_DRAW); - // vertex - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - // color - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - // texcoord - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); - - glGenVertexArrays(1, &_vaoGLLine); - glBindVertexArray(_vaoGLLine); - glGenBuffers(1, &_vboGLLine); - glBindBuffer(GL_ARRAY_BUFFER, _vboGLLine); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLLine, _bufferGLLine, GL_STREAM_DRAW); - // vertex - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - // color - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - // texcoord - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); - - glGenVertexArrays(1, &_vaoGLPoint); - glBindVertexArray(_vaoGLPoint); - glGenBuffers(1, &_vboGLPoint); - glBindBuffer(GL_ARRAY_BUFFER, _vboGLPoint); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLPoint, _bufferGLPoint, GL_STREAM_DRAW); - // vertex - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - // color - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - // Texture coord as pointsize - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); - - glBindVertexArray(0); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - } - else - { - glGenBuffers(1, &_vbo); - glBindBuffer(GL_ARRAY_BUFFER, _vbo); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)* _bufferCapacity, _buffer, GL_STREAM_DRAW); - - glGenBuffers(1, &_vboGLLine); - glBindBuffer(GL_ARRAY_BUFFER, _vboGLLine); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLLine, _bufferGLLine, GL_STREAM_DRAW); - - glGenBuffers(1, &_vboGLPoint); - glBindBuffer(GL_ARRAY_BUFFER, _vboGLPoint); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLPoint, _bufferGLPoint, GL_STREAM_DRAW); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - } - - CHECK_GL_ERROR_DEBUG(); -} - bool DrawNode::init() { _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; - - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR)); - + updateShader(); ensureCapacity(512); ensureCapacityGLPoint(64); ensureCapacityGLLine(256); - setupBuffer(); - _dirty = true; _dirtyGLLine = true; - _dirtyGLPoint = true; + _dirtyGLPoint = true; return true; } -void DrawNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) +void DrawNode::updateShader() { - if(_bufferCount) - { - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(DrawNode::onDraw, this, transform, flags); - renderer->addCommand(&_customCommand); - } - - if(_bufferCountGLPoint) - { - _customCommandGLPoint.init(_globalZOrder, transform, flags); - _customCommandGLPoint.func = CC_CALLBACK_0(DrawNode::onDrawGLPoint, this, transform, flags); - renderer->addCommand(&_customCommandGLPoint); - } - - if(_bufferCountGLLine) - { - _customCommandGLLine.init(_globalZOrder, transform, flags); - _customCommandGLLine.func = CC_CALLBACK_0(DrawNode::onDrawGLLine, this, transform, flags); - renderer->addCommand(&_customCommandGLLine); - } -} - -void DrawNode::onDraw(const Mat4 &transform, uint32_t /*flags*/) -{ - getGLProgramState()->apply(transform); - auto glProgram = this->getGLProgram(); - glProgram->setUniformLocationWith1f(glProgram->getUniformLocation("u_alpha"), _displayedOpacity / 255.0); - utils::setBlending(_blendFunc.src, _blendFunc.dst); + CC_SAFE_RELEASE(_programState); + _programState = new (std::nothrow) backend::ProgramState(positionColorLengthTexture_vert, positionColorLengthTexture_frag); + _customCommand.getPipelineDescriptor().programState = _programState; + setVertexLayout(_customCommand); + _customCommand.setDrawType(CustomCommand::DrawType::ARRAY); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); - if (_dirty) - { - glBindBuffer(GL_ARRAY_BUFFER, _vbo); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacity, _buffer, GL_STREAM_DRAW); - - _dirty = false; - } - if (Configuration::getInstance()->supportsShareableVAO()) - { - glBindVertexArray(_vao); - } - else - { - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - - glBindBuffer(GL_ARRAY_BUFFER, _vbo); - // vertex - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - // color - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - // texcoord - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); - } + CC_SAFE_RELEASE(_programStatePoint); + _programStatePoint = new (std::nothrow) backend::ProgramState(positionColorTextureAsPointsize_vert, positionColor_frag); + _customCommandGLPoint.getPipelineDescriptor().programState = _programStatePoint; + setVertexLayout(_customCommandGLPoint); + _customCommandGLPoint.setDrawType(CustomCommand::DrawType::ARRAY); + _customCommandGLPoint.setPrimitiveType(CustomCommand::PrimitiveType::POINT); - glDrawArrays(GL_TRIANGLES, 0, _bufferCount); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - if (Configuration::getInstance()->supportsShareableVAO()) - { - glBindVertexArray(0); - } - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _bufferCount); - CHECK_GL_ERROR_DEBUG(); + CC_SAFE_RELEASE(_programStateLine); + _programStateLine = new (std::nothrow) backend::ProgramState(positionColorLengthTexture_vert, positionColorLengthTexture_frag); + _customCommandGLLine.getPipelineDescriptor().programState = _programStateLine; + setVertexLayout(_customCommandGLLine); + _customCommandGLLine.setDrawType(CustomCommand::DrawType::ARRAY); + _customCommandGLLine.setPrimitiveType(CustomCommand::PrimitiveType::LINE); } -void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t /*flags*/) +void DrawNode::setVertexLayout(CustomCommand& cmd) { - auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR); - glProgram->use(); - glProgram->setUniformsForBuiltins(transform); - glProgram->setUniformLocationWith1f(glProgram->getUniformLocation("u_alpha"), _displayedOpacity / 255.0); +#define VERTEX_POSITION_SIZE 2 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + //set vertexLayout according to V2F_C4B_T2F structure + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); - utils::setBlending(_blendFunc.src, _blendFunc.dst); + backend::VertexLayout vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + auto& pipelineDescriptor = cmd.getPipelineDescriptor(); + pipelineDescriptor.vertexLayout = vertexLayout; +} - if (_dirtyGLLine) - { - glBindBuffer(GL_ARRAY_BUFFER, _vboGLLine); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLLine, _bufferGLLine, GL_STREAM_DRAW); - _dirtyGLLine = false; - } - if (Configuration::getInstance()->supportsShareableVAO()) +void DrawNode::updateBlendState(CustomCommand& cmd) +{ + backend::BlendDescriptor& blendDescriptor = cmd.getPipelineDescriptor().blendDescriptor; + blendDescriptor.blendEnabled = true; + if (_blendFunc == BlendFunc::ALPHA_NON_PREMULTIPLIED) { - glBindVertexArray(_vaoGLLine); + blendDescriptor.sourceRGBBlendFactor = backend::BlendFactor::SRC_ALPHA; + blendDescriptor.destinationRGBBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + blendDescriptor.sourceAlphaBlendFactor = backend::BlendFactor::SRC_ALPHA; + blendDescriptor.destinationAlphaBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + setOpacityModifyRGB(false); } else { - glBindBuffer(GL_ARRAY_BUFFER, _vboGLLine); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - // vertex - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - // color - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - // texcoord - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); + blendDescriptor.sourceRGBBlendFactor = backend::BlendFactor::ONE; + blendDescriptor.destinationRGBBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + blendDescriptor.sourceAlphaBlendFactor = backend::BlendFactor::ONE; + blendDescriptor.destinationAlphaBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + setOpacityModifyRGB(true); } - - glLineWidth(_lineWidth); - glDrawArrays(GL_LINES, 0, _bufferCountGLLine); - - if (Configuration::getInstance()->supportsShareableVAO()) - { - glBindVertexArray(0); - } - - glBindBuffer(GL_ARRAY_BUFFER, 0); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCountGLLine); - - CHECK_GL_ERROR_DEBUG(); } -void DrawNode::onDrawGLPoint(const Mat4 &transform, uint32_t /*flags*/) +void DrawNode::updateUniforms(const Mat4 &transform, CustomCommand& cmd) { - auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_COLOR_TEXASPOINTSIZE); - glProgram->use(); - glProgram->setUniformsForBuiltins(transform); - glProgram->setUniformLocationWith1f(glProgram->getUniformLocation("u_alpha"), _displayedOpacity / 255.0); + auto& pipelineDescriptor = cmd.getPipelineDescriptor(); + const auto& matrixP = _director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 matrixMVP = matrixP * transform; + auto mvpLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + pipelineDescriptor.programState->setUniform(mvpLocation, matrixMVP.m, sizeof(matrixMVP.m)); - utils::setBlending(_blendFunc.src, _blendFunc.dst); + float alpha = _displayedOpacity / 255.0; + Vec4 alpha4(alpha, 0, 0, 0); + auto alphaUniformLocation = pipelineDescriptor.programState->getUniformLocation("u_alpha"); + pipelineDescriptor.programState->setUniform(alphaUniformLocation, &alpha4, sizeof(alpha4)); +} - if (_dirtyGLPoint) +void DrawNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) +{ + if(_bufferCount) { - glBindBuffer(GL_ARRAY_BUFFER, _vboGLPoint); - glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacityGLPoint, _bufferGLPoint, GL_STREAM_DRAW); - - _dirtyGLPoint = false; + updateBlendState(_customCommand); + updateUniforms(transform, _customCommand); + _customCommand.init(_globalZOrder, transform, flags); + renderer->addCommand(&_customCommand); } - if (Configuration::getInstance()->supportsShareableVAO()) - { - glBindVertexArray(_vaoGLPoint); - } - else + if(_bufferCountGLPoint) { - glBindBuffer(GL_ARRAY_BUFFER, _vboGLPoint); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices)); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors)); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords)); + updateBlendState(_customCommandGLPoint); + updateUniforms(transform, _customCommandGLPoint); + _customCommandGLPoint.init(_globalZOrder, transform, flags); + renderer->addCommand(&_customCommandGLPoint); } - glDrawArrays(GL_POINTS, 0, _bufferCountGLPoint); - - if (Configuration::getInstance()->supportsShareableVAO()) + if(_bufferCountGLLine) { - glBindVertexArray(0); + updateBlendState(_customCommandGLLine); + updateUniforms(transform, _customCommandGLLine); + _customCommandGLLine.setLineWidth(_lineWidth); + _customCommandGLLine.init(_globalZOrder); + renderer->addCommand(&_customCommandGLLine); } - - glBindBuffer(GL_ARRAY_BUFFER, 0); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCountGLPoint); - CHECK_GL_ERROR_DEBUG(); } void DrawNode::drawPoint(const Vec2& position, const float pointSize, const Color4F &color) { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + drawDot(position, pointSize*0.5, color); +#else ensureCapacityGLPoint(1); V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLPoint + _bufferCountGLPoint); V2F_C4B_T2F a = {position, Color4B(color), Tex2F(pointSize,0)}; *point = a; + _customCommandGLPoint.updateVertexBuffer(point, _bufferCountGLPoint*sizeof(V2F_C4B_T2F), sizeof(V2F_C4B_T2F)); _bufferCountGLPoint += 1; _dirtyGLPoint = true; +#endif } void DrawNode::drawPoints(const Vec2 *position, unsigned int numberOfPoints, const Color4F &color) @@ -461,22 +337,32 @@ void DrawNode::drawPoints(const Vec2 *position, unsigned int numberOfPoints, con void DrawNode::drawPoints(const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color) { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + for(unsigned int i=0; i < numberOfPoints; i++) + { + drawDot(position[i], pointSize*0.5, color); + } +#else ensureCapacityGLPoint(numberOfPoints); V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLPoint + _bufferCountGLPoint); - - for(unsigned int i=0; i < numberOfPoints; i++,point++) + for(unsigned int i=0; i < numberOfPoints; i++) { V2F_C4B_T2F a = {position[i], Color4B(color), Tex2F(pointSize,0)}; - *point = a; + *(point + i) = a; } + _customCommandGLPoint.updateVertexBuffer(point, _bufferCountGLPoint*sizeof(V2F_C4B_T2F), numberOfPoints*sizeof(V2F_C4B_T2F)); _bufferCountGLPoint += numberOfPoints; _dirtyGLPoint = true; +#endif } void DrawNode::drawLine(const Vec2 &origin, const Vec2 &destination, const Color4F &color) { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + drawSegment(origin, destination, _lineWidth, color); +#else ensureCapacityGLLine(2); V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLLine + _bufferCountGLLine); @@ -487,8 +373,10 @@ void DrawNode::drawLine(const Vec2 &origin, const Vec2 &destination, const Color *point = a; *(point+1) = b; + _customCommandGLLine.updateVertexBuffer(point, _bufferCountGLLine*sizeof(V2F_C4B_T2F), 2*sizeof(V2F_C4B_T2F)); _bufferCountGLLine += 2; _dirtyGLLine = true; +#endif } void DrawNode::drawRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color) @@ -514,7 +402,8 @@ void DrawNode::drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool clos } V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLLine + _bufferCountGLLine); - + V2F_C4B_T2F *cursor = point; + unsigned int i = 0; for(; i -#include - -#include "2d/CCActionCatmullRom.h" -#include "base/CCDirector.h" -#include "renderer/CCGLProgramCache.h" -#include "renderer/CCRenderer.h" -#include "platform/CCGL.h" - -NS_CC_BEGIN - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -#ifndef M_PI - #define M_PI 3.14159265358979323846 -#endif - -namespace DrawPrimitives { - -static bool s_initialized = false; -static GLProgram* s_shader = nullptr; -static int s_colorLocation = -1; -static Color4F s_color(1.0f,1.0f,1.0f,1.0f); -static int s_pointSizeLocation = -1; -static GLfloat s_pointSize = 1.0f; - - -static void lazy_init() -{ - if( ! s_initialized ) { - - // - // Position and 1 color passed as a uniform (to simulate glColor4ub ) - // - s_shader = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_U_COLOR); - s_shader->retain(); - - s_colorLocation = s_shader->getUniformLocation("u_color"); - CHECK_GL_ERROR_DEBUG(); - s_pointSizeLocation = s_shader->getUniformLocation("u_pointSize"); - CHECK_GL_ERROR_DEBUG(); - - s_initialized = true; - } -} - -// When switching from background to foreground on android, we want the parameters to be initialized again -void init() -{ - lazy_init(); -} - -void free() -{ - CC_SAFE_RELEASE_NULL(s_shader); - s_initialized = false; -} - -void drawPoint(const Vec2& point) -{ - lazy_init(); - - Vec2 p; - p.x = point.x; - p.y = point.y; - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - s_shader->use(); - s_shader->setUniformsForBuiltins(); - - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize); - - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, &p); - - glDrawArrays(GL_POINTS, 0, 1); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,1); -} - -void drawPoints( const Vec2 *points, unsigned int numberOfPoints ) -{ - lazy_init(); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize); - - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, points); - glDrawArrays(GL_POINTS, 0, (GLsizei) numberOfPoints); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, numberOfPoints); -} - - -void drawLine(const Vec2& origin, const Vec2& destination) -{ - lazy_init(); - - Vec2 vertices[2] = { - Vec2(origin.x, origin.y), - Vec2(destination.x, destination.y) - }; - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_LINES, 0, 2); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,2); -} - -void drawRect( Vec2 origin, Vec2 destination ) -{ - drawLine(Vec2(origin.x, origin.y), Vec2(destination.x, origin.y)); - drawLine(Vec2(destination.x, origin.y), Vec2(destination.x, destination.y)); - drawLine(Vec2(destination.x, destination.y), Vec2(origin.x, destination.y)); - drawLine(Vec2(origin.x, destination.y), Vec2(origin.x, origin.y)); -} - -void drawSolidRect(Vec2 origin, Vec2 destination, Color4F color) -{ - Vec2 vertices[] = { - origin, - Vec2(destination.x, origin.y), - destination, - Vec2(origin.x, destination.y) - }; - - drawSolidPoly(vertices, 4, color ); -} - -void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon) -{ - lazy_init(); - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, poli); - - if( closePolygon ) - glDrawArrays(GL_LINE_LOOP, 0, (GLsizei) numberOfPoints); - else - glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) numberOfPoints); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, numberOfPoints); -} - -void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color) -{ - lazy_init(); - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, poli); - glDrawArrays(GL_TRIANGLE_FAN, 0, (GLsizei) numberOfPoints); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, numberOfPoints); -} - -void drawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY) -{ - lazy_init(); - - int additionalSegment = 1; - if (drawLineToCenter) - additionalSegment++; - - const float coef = 2.0f * (float)M_PI/segments; - - GLfloat *vertices = (GLfloat*)calloc( 2*(segments+2), sizeof(GLfloat)); - if( ! vertices ) - return; - - for(unsigned int i = 0;i <= segments; i++) { - float rads = i*coef; - GLfloat j = radius * cosf(rads + angle) * scaleX + center.x; - GLfloat k = radius * sinf(rads + angle) * scaleY + center.y; - - vertices[i*2] = j; - vertices[i*2+1] = k; - } - vertices[(segments+1)*2] = center.x; - vertices[(segments+1)*2+1] = center.y; - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) segments+additionalSegment); - - ::free( vertices ); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,segments+additionalSegment); -} - -void drawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter) -{ - drawCircle(center, radius, angle, segments, drawLineToCenter, 1.0f, 1.0f); -} - -void drawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY) -{ - lazy_init(); - - const float coef = 2.0f * (float)M_PI/segments; - - GLfloat *vertices = (GLfloat*)calloc( 2*(segments+2), sizeof(GLfloat)); - if( ! vertices ) - return; - - for(unsigned int i = 0;i <= segments; i++) { - float rads = i*coef; - GLfloat j = radius * cosf(rads + angle) * scaleX + center.x; - GLfloat k = radius * sinf(rads + angle) * scaleY + center.y; - - vertices[i*2] = j; - vertices[i*2+1] = k; - } - vertices[(segments+1)*2] = center.x; - vertices[(segments+1)*2+1] = center.y; - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - - glDrawArrays(GL_TRIANGLE_FAN, 0, (GLsizei) segments+1); - - ::free( vertices ); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,segments+1); -} - -void drawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments) -{ - drawSolidCircle(center, radius, angle, segments, 1.0f, 1.0f); -} - -void drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments) -{ - lazy_init(); - - Vec2* vertices = new (std::nothrow) Vec2[segments + 1]; - - float t = 0.0f; - for(unsigned int i = 0; i < segments; i++) - { - vertices[i].x = powf(1 - t, 2) * origin.x + 2.0f * (1 - t) * t * control.x + t * t * destination.x; - vertices[i].y = powf(1 - t, 2) * origin.y + 2.0f * (1 - t) * t * control.y + t * t * destination.y; - t += 1.0f / segments; - } - vertices[segments].x = destination.x; - vertices[segments].y = destination.y; - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) segments + 1); - CC_SAFE_DELETE_ARRAY(vertices); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,segments+1); -} - -void drawCatmullRom( PointArray *points, unsigned int segments ) -{ - drawCardinalSpline( points, 0.5f, segments ); -} - -void drawCardinalSpline( PointArray *config, float tension, unsigned int segments ) -{ - lazy_init(); - - Vec2* vertices = new (std::nothrow) Vec2[segments + 1]; - - ssize_t p; - float lt; - float deltaT = 1.0f / config->count(); - - for( unsigned int i=0; i < segments+1;i++) { - - float dt = (float)i / segments; - - // border - if( dt == 1 ) { - p = config->count() - 1; - lt = 1; - } else { - p = dt / deltaT; - lt = (dt - deltaT * (float)p) / deltaT; - } - - // Interpolate - Vec2 pp0 = config->getControlPointAtIndex(p-1); - Vec2 pp1 = config->getControlPointAtIndex(p+0); - Vec2 pp2 = config->getControlPointAtIndex(p+1); - Vec2 pp3 = config->getControlPointAtIndex(p+2); - - Vec2 newPos = ccCardinalSplineAt( pp0, pp1, pp2, pp3, tension, lt); - vertices[i].x = newPos.x; - vertices[i].y = newPos.y; - } - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*)&s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) segments + 1); - - CC_SAFE_DELETE_ARRAY(vertices); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,segments+1); -} - -void drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments) -{ - lazy_init(); - - Vec2* vertices = new (std::nothrow) Vec2[segments + 1]; - - float t = 0; - for (unsigned int i = 0; i < segments; i++) - { - vertices[i].x = powf(1 - t, 3) * origin.x + 3.0f * powf(1 - t, 2) * t * control1.x + 3.0f * (1 - t) * t * t * control2.x + t * t * t * destination.x; - vertices[i].y = powf(1 - t, 3) * origin.y + 3.0f * powf(1 - t, 2) * t * control1.y + 3.0f * (1 - t) * t * t * control2.y + t * t * t * destination.y; - t += 1.0f / segments; - } - vertices[segments].x = destination.x; - vertices[segments].y = destination.y; - - s_shader->use(); - s_shader->setUniformsForBuiltins(); - s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) segments + 1); - CC_SAFE_DELETE_ARRAY(vertices); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,segments+1); -} - -void setDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) -{ - s_color.r = r; - s_color.g = g; - s_color.b = b; - s_color.a = a; -} - -void setPointSize( GLfloat pointSize ) -{ - s_pointSize = pointSize * CC_CONTENT_SCALE_FACTOR(); - - // TODO: glPointSize( pointSize ); - -} - -void setDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) -{ - s_color.r = r/255.0f; - s_color.g = g/255.0f; - s_color.b = b/255.0f; - s_color.a = a/255.0f; -} - -} // DrawPrimitives namespace - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif - -NS_CC_END diff --git a/cocos/2d/CCDrawingPrimitives.h b/cocos/2d/CCDrawingPrimitives.h deleted file mode 100644 index f972a27411c8..000000000000 --- a/cocos/2d/CCDrawingPrimitives.h +++ /dev/null @@ -1,273 +0,0 @@ -/**************************************************************************** -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) 2011 Zynga Inc. -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -/* - * - * IMPORTANT IMPORTANT IMPORTANT IMPORTANT - * - * - * LEGACY FUNCTIONS - * - * USE DrawNode instead - * - */ - - -#ifndef __CCDRAWING_PRIMITIVES__ -#define __CCDRAWING_PRIMITIVES__ - - -#include "base/ccTypes.h" -#include "base/ccMacros.h" -#include "math/CCMath.h" - -/** - @file - Drawing OpenGL ES primitives. - - drawPoint, drawPoints - - drawLine - - drawRect, drawSolidRect - - drawPoly, drawSolidPoly - - drawCircle - - drawQuadBezier - - drawCubicBezier - - drawCatmullRom - - drawCardinalSpline - - You can change the color, point size, width by calling: - - drawColor4B(), drawColor4F() - - ccPointSize() - - glLineWidth() - - @warning These functions draws the Line, Vec2, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch. Instead you should use DrawNode - - */ - -NS_CC_BEGIN - -/** - * @addtogroup _2d - * @{ - */ - -class PointArray; - -/** -* @js cc.DrawingPrimitiveCanvas/cc.DrawingPrimitiveWebGL -*/ -namespace DrawPrimitives -{ - /** - * Initializes the drawing primitives. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL init(); - - /** - * Frees allocated resources by the drawing primitives. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL free(); - - /** Draws a point given x and y coordinate measured in points - * - * @param point A Vec2 with a point given x and y coordinate. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoint(const Vec2& point); - - /** Draws an array of points. - * - * @param points A point coordinates. - * @param numberOfPoints The number of points. - * @since v0.7.2 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoints(const Vec2 *points, unsigned int numberOfPoints); - - /** Draws a line given the origin and destination point measured in points - * - * @param origin A Vec2 Type point used to the line origin. - * @param destination A Vec2 Type point used to the line destination. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawLine(const Vec2& origin, const Vec2& destination); - - /** Draws a rectangle given the origin and destination point measured in points. - * The origin and the destination can not have the same x and y coordinate. - * - * @param origin The rectangle origin. - * @param destination The rectangle destination. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawRect(Vec2 origin, Vec2 destination); - - /** Draws a solid rectangle given the origin and destination point measured in points. - * The origin and the destination can not have the same x and y coordinate. - * - * @param origin The rectangle origin. - * @param destination The rectangle destination. - * @param color The rectangle color. - * @since 1.1 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidRect(Vec2 origin, Vec2 destination, Color4F color); - - /** Draws a polygon given a pointer to point coordinates and the number of vertices measured in points. - * The polygon can be closed or open. - * - * @param vertices A pointer to point coordinates. - * @param numOfVertices The number of vertices measured in points. - * @param closePolygon The polygon can be closed or open. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoly(const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon); - - /** Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color. - * - * @param poli A solid polygon given a pointer to CGPoint coordinates. - * @param numberOfPoints The number of vertices measured in points. - * @param color The solid polygon color. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color); - - /** Draws a circle given the center, radius and number of segments. - * - * @param center The circle center point. - * @param radius The circle rotate of radius. - * @param angle The circle angle. - * @param segments The number of segments. - * @param drawLineToCenter Whether or not draw the line from the origin to center. - * @param scaleX The scale value in x. - * @param scaleY The scale value in y. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); - - /** Draws a circle given the center, radius and number of segments. - * - * @param center The circle center point. - * @param radius The circle rotate of radius. - * @param angle The circle angle. - * @param segments The number of segments. - * @param drawLineToCenter Whether or not draw the line from the origin to center. - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); - - /** Draws a solid circle given the center, radius and number of segments. - * @param center The circle center point. - * @param radius The circle rotate of radius. - * @param angle The circle angle. - * @param segments The number of segments. - * @param scaleX The scale value in x. - * @param scaleY The scale value in y. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY); - - /** Draws a solid circle given the center, radius and number of segments. - * @param center The circle center point. - * @param radius The circle rotate of radius. - * @param angle The circle angle. - * @param segments The number of segments. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments); - - /** Draws a quad bezier path. - * - * @param origin The origin of the bezier path. - * @param control The control of the bezier path. - * @param destination The destination of the bezier path. - * @param segments The number of segments. - * @warning This function could be pretty slow. Use it only for debugging purposes. - * @since v0.8 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments); - - /** Draws a cubic bezier path. - * - * @param origin The origin of the bezier path. - * @param control1 The first control of the bezier path. - * @param control2 The second control of the bezier path. - * @param destination The destination of the bezier path. - * @param segments The number of segments. - * @warning This function could be pretty slow. Use it only for debugging purposes. - * @since v0.8 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments); - - /** Draws a Catmull Rom path. - * - * @param arrayOfControlPoints A point array of control point. - * @param segments The number of segments. - * @warning This function could be pretty slow. Use it only for debugging purposes. - * @since v2.0 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCatmullRom(PointArray *arrayOfControlPoints, unsigned int segments); - - /** Draws a Cardinal Spline path. - * - * @param config A array point. - * @param tension The tension of the spline. - * @param segments The number of segments. - * @warning This function could be pretty slow. Use it only for debugging purposes. - * @since v2.0 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCardinalSpline(PointArray *config, float tension, unsigned int segments); - - /** Set the drawing color with 4 unsigned bytes. - * - * @param r The red color with a unsigned bytes. - * @param g The green color with a unsigned bytes. - * @param b The blue color with a unsigned bytes. - * @param a Alpha with a unsigned bytes. - * @since v2.0 - * @js setDrawColor - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a); - - /** Set the drawing color with 4 floats. - * - * @param r The red color with an floats. - * @param g The green color with an floats. - * @param b The blue color with an floats. - * @param a Alpha with an floats. - * @since v2.0 - * @js setDrawColor - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a); - - /** Set the point size in points. Default 1. - * - * @param pointSize The point size with an float. - * @since v2.0 - */ - CC_DEPRECATED_ATTRIBUTE void CC_DLL setPointSize(GLfloat pointSize); - -}; - -// end of global group -/** @} */ - -NS_CC_END - -#endif // __CCDRAWING_PRIMITIVES__ diff --git a/cocos/2d/CCFastTMXLayer.cpp b/cocos/2d/CCFastTMXLayer.cpp index 5f7d0b6cae96..deefe95b999f 100644 --- a/cocos/2d/CCFastTMXLayer.cpp +++ b/cocos/2d/CCFastTMXLayer.cpp @@ -40,11 +40,13 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "2d/CCCamera.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgramCache.h" #include "renderer/CCRenderer.h" -#include "renderer/CCVertexIndexBuffer.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/Device.h" +#include "renderer/backend/Buffer.h" #include "base/CCDirector.h" #include "base/ccUTF8.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN namespace experimental { @@ -99,9 +101,6 @@ bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *la this->tileToNodeTransform(); - // shader, and other stuff - setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); - _useAutomaticVertexZ = false; _vertexZvalue = 0; @@ -109,20 +108,6 @@ bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *la } TMXLayer::TMXLayer() -: _layerName("") -, _layerSize(Size::ZERO) -, _mapTileSize(Size::ZERO) -, _tiles(nullptr) -, _tileSet(nullptr) -, _layerOrientation(FAST_TMX_ORIENTATION_ORTHO) -, _texture(nullptr) -, _vertexZvalue(0) -, _useAutomaticVertexZ(false) -, _quadsDirty(true) -, _dirty(true) -, _vertexBuffer(nullptr) -, _vData(nullptr) -, _indexBuffer(nullptr) { } @@ -131,10 +116,14 @@ TMXLayer::~TMXLayer() CC_SAFE_RELEASE(_tileSet); CC_SAFE_RELEASE(_texture); CC_SAFE_FREE(_tiles); - CC_SAFE_RELEASE(_vData); CC_SAFE_RELEASE(_vertexBuffer); CC_SAFE_RELEASE(_indexBuffer); - + + for (auto& e : _customCommands) + { + CC_SAFE_RELEASE(e.second->getPipelineDescriptor().programState); + delete e.second; + } } void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags) @@ -165,38 +154,20 @@ void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags) updatePrimitives(); _dirty = false; } - - if(_renderCommands.size() < static_cast(_primitives.size())) - { - _renderCommands.resize(_primitives.size()); - } - - int index = 0; - for(const auto& iter : _primitives) + + const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 finalMat = projectionMat * _modelViewTransform; + for (const auto& e : _customCommands) { - if(iter.second->getCount() > 0) + if (e.second->getIndexDrawCount() > 0) { - auto& cmd = _renderCommands[index++]; - auto blendfunc = _texture->hasPremultipliedAlpha() ? BlendFunc::ALPHA_PREMULTIPLIED : BlendFunc::ALPHA_NON_PREMULTIPLIED; - cmd.init(iter.first, _texture->getName(), getGLProgramState(), blendfunc, iter.second, _modelViewTransform, flags); - renderer->addCommand(&cmd); + auto mvpmatrixLocation = e.second->getPipelineDescriptor().programState->getUniformLocation("u_MVPMatrix"); + e.second->getPipelineDescriptor().programState->setUniform(mvpmatrixLocation, finalMat.m, sizeof(finalMat.m)); + renderer->addCommand(e.second); } } } -void TMXLayer::onDraw(Primitive *primitive) -{ - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _texture->getName()); - getGLProgramState()->apply(_modelViewTransform); - - glBindVertexArray(0); - primitive->draw(); - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, primitive->getCount() * 4); -} - void TMXLayer::updateTiles(const Rect& culledRect) { Rect visibleTiles = Rect(culledRect.origin, culledRect.size * Director::getInstance()->getContentScaleFactor()); @@ -292,37 +263,28 @@ void TMXLayer::updateTiles(const Rect& culledRect) void TMXLayer::updateVertexBuffer() { - glBindVertexArray(0); - if(nullptr == _vData) - { - _vertexBuffer = VertexBuffer::create(sizeof(V3F_C4B_T2F), (int)_totalQuads.size() * 4); - _vData = VertexData::create(); - _vData->setStream(_vertexBuffer, VertexStreamAttribute(0, GLProgram::VERTEX_ATTRIB_POSITION, GL_FLOAT, 3)); - _vData->setStream(_vertexBuffer, VertexStreamAttribute(offsetof(V3F_C4B_T2F, colors), GLProgram::VERTEX_ATTRIB_COLOR, GL_UNSIGNED_BYTE, 4, true)); - _vData->setStream(_vertexBuffer, VertexStreamAttribute(offsetof(V3F_C4B_T2F, texCoords), GLProgram::VERTEX_ATTRIB_TEX_COORD, GL_FLOAT, 2)); - CC_SAFE_RETAIN(_vData); - CC_SAFE_RETAIN(_vertexBuffer); - } - if(_vertexBuffer) + unsigned int vertexBufferSize = (unsigned int)(sizeof(V3F_C4B_T2F) * _totalQuads.size() * 4); + if (!_vertexBuffer) { - _vertexBuffer->updateVertices((void*)&_totalQuads[0], (int)_totalQuads.size() * 4, 0); + auto device = backend::Device::getInstance(); + _vertexBuffer = device->newBuffer(vertexBufferSize, backend::BufferType::VERTEX, backend::BufferUsage::STATIC); } - + _vertexBuffer->updateData(&_totalQuads[0], vertexBufferSize); } void TMXLayer::updateIndexBuffer() { - if(nullptr == _indexBuffer) - { #ifdef CC_FAST_TILEMAP_32_BIT_INDICES - _indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_UINT_32, (int)_indices.size()); + unsigned int indexBufferSize = (unsigned int)(sizeof(unsigned int) * _indices.size()); #else - _indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_SHORT_16, (int)_indices.size()); + unsigned int indexBufferSize = (unsigned int)(sizeof(unsigned short) * _indices.size()); #endif - CC_SAFE_RETAIN(_indexBuffer); + if (!_indexBuffer) + { + auto device = backend::Device::getInstance(); + _indexBuffer = device->newBuffer(indexBufferSize, backend::BufferType::INDEX, backend::BufferUsage::STATIC); } - _indexBuffer->updateIndices(&_indices[0], (int)_indices.size(), 0); - + _indexBuffer->updateData(&_indices[0], indexBufferSize); } // FastTMXLayer - setup Tiles @@ -420,23 +382,60 @@ Mat4 TMXLayer::tileToNodeTransform() void TMXLayer::updatePrimitives() { + auto blendfunc = _texture->hasPremultipliedAlpha() ? BlendFunc::ALPHA_PREMULTIPLIED : BlendFunc::ALPHA_NON_PREMULTIPLIED; for(const auto& iter : _indicesVertexZNumber) { int start = _indicesVertexZOffsets.at(iter.first); - - auto primitiveIter= _primitives.find(iter.first); - if(primitiveIter == _primitives.end()) + + auto commandIter = _customCommands.find(iter.first); + if (_customCommands.end() == commandIter) { - auto primitive = Primitive::create(_vData, _indexBuffer, GL_TRIANGLES); - primitive->setCount(iter.second * 6); - primitive->setStart(start * 6); - - _primitives.insert(iter.first, primitive); + auto command = new CustomCommand(); + command->setVertexBuffer(_vertexBuffer); + + CustomCommand::IndexFormat indexFormat = CustomCommand::IndexFormat::U_SHORT; +#if CC_FAST_TILEMAP_32_BIT_INDICES + indexFormat = CustomCommand::IndexFormat::U_INT; +#endif + command->setIndexBuffer(_indexBuffer, indexFormat); + + command->setIndexDrawInfo(start * 6, iter.second * 6); + + auto& vertexLayout = command->getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, offsetof(V3F_C4B_T2F, texCoords), false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, offsetof(V3F_C4B_T2F, colors), true); + + vertexLayout.setLayout((unsigned int)sizeof(V3F_C4B_T2F), backend::VertexStepMode::VERTEX); + + auto& pipelineDescriptor = command->getPipelineDescriptor(); + + if (_useAutomaticVertexZ) + { + CC_SAFE_RELEASE(pipelineDescriptor.programState); + auto programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColorAlphaTest_frag); + pipelineDescriptor.programState = programState; + _alphaValueLocation = pipelineDescriptor.programState->getUniformLocation("u_alpha_value"); + pipelineDescriptor.programState->setUniform(_alphaValueLocation, &_alphaFuncValue, sizeof(_alphaFuncValue)); + + } + else + { + CC_SAFE_RELEASE(pipelineDescriptor.programState); + auto programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + pipelineDescriptor.programState = programState; + + } + _mvpMatrixLocaiton = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + pipelineDescriptor.programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); + command->init(_globalZOrder, blendfunc); + + _customCommands[iter.first] = command; } else { - primitiveIter->second->setCount(iter.second * 6); - primitiveIter->second->setStart(start * 6); + commandIter->second->setIndexDrawInfo(start * 6, iter.second * 6); } } } @@ -738,17 +737,7 @@ void TMXLayer::parseInternalProperties() { _useAutomaticVertexZ = true; auto alphaFuncVal = getProperty("cc_alpha_func"); - float alphaFuncValue = alphaFuncVal.asFloat(); - setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST)); - - GLint alphaValueLocation = glGetUniformLocation(getGLProgram()->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE); - - // NOTE: alpha test shader is hard-coded to use the equivalent of a glAlphaFunc(GL_GREATER) comparison - - // use shader program to set uniform - getGLProgram()->use(); - getGLProgram()->setUniformLocationWith1f(alphaValueLocation, alphaFuncValue); - CHECK_GL_ERROR_DEBUG(); + _alphaFuncValue = alphaFuncVal.asFloat(); } else { diff --git a/cocos/2d/CCFastTMXLayer.h b/cocos/2d/CCFastTMXLayer.h index 7c71636ec060..70682c25d178 100644 --- a/cocos/2d/CCFastTMXLayer.h +++ b/cocos/2d/CCFastTMXLayer.h @@ -25,15 +25,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_FAST_TMX_LAYER_H__ -#define __CC_FAST_TMX_LAYER_H__ +#pragma once -#include #include #include "2d/CCNode.h" #include "2d/CCTMXXMLParser.h" -#include "renderer/CCPrimitiveCommand.h" -#include "base/CCMap.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN @@ -42,7 +39,11 @@ class TMXLayerInfo; class TMXTilesetInfo; class Texture2D; class Sprite; -struct _ccCArray; + +namespace backend +{ + class Buffer; +} namespace experimental{ @@ -80,6 +81,11 @@ namespace experimental{ class CC_DLL TMXLayer : public Node { public: + /** Possible orientations of the TMX map */ + static const int FAST_TMX_ORIENTATION_ORTHO; + static const int FAST_TMX_ORIENTATION_HEX; + static const int FAST_TMX_ORIENTATION_ISO; + /** Creates a FastTMXLayer with an tileset info, a layer info and a map info. * * @param tilesetInfo An tileset info. @@ -272,7 +278,6 @@ class CC_DLL TMXLayer : public Node void removeChild(Node* child, bool cleanup = true) override; protected: - bool initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo); void updateTiles(const Rect& culledRect); Vec2 calculateLayerOffset(const Vec2& offset); @@ -291,14 +296,12 @@ class CC_DLL TMXLayer : public Node // void updateTotalQuads(); - void onDraw(Primitive* primitive); int getTileIndexByPos(int x, int y) const { return x + y * (int) _layerSize.width; } void updateVertexBuffer(); void updateIndexBuffer(); void updatePrimitives(); -protected: - + //! name of the layer std::string _layerName; @@ -307,62 +310,54 @@ class CC_DLL TMXLayer : public Node /** size of the map's tile (could be different from the tile's size) */ Size _mapTileSize; /** pointer to the map of tiles */ - uint32_t* _tiles; + uint32_t* _tiles = nullptr; /** Tileset information for the layer */ - TMXTilesetInfo* _tileSet; + TMXTilesetInfo* _tileSet = nullptr; /** Layer orientation, which is the same as the map orientation */ - int _layerOrientation; + int _layerOrientation = FAST_TMX_ORIENTATION_ORTHO; /** properties from the layer. They can be added using Tiled */ ValueMap _properties; - Texture2D *_texture; + Texture2D *_texture = nullptr; /** container for sprite children. map > */ std::map > _spriteContainer; - //GLuint _buffersVBO; //0: vertex, 1: indices - Size _screenGridSize; Rect _screenGridRect; - int _screenTileCount; + int _screenTileCount = 0; - int _vertexZvalue; - bool _useAutomaticVertexZ; + int _vertexZvalue = 0; + bool _useAutomaticVertexZ = false; /** tile coordinate to node coordinate transform */ Mat4 _tileToNodeTransform; /** data for rendering */ - bool _quadsDirty; + bool _quadsDirty = true; std::vector _tileToQuadIndex; std::vector _totalQuads; #ifdef CC_FAST_TILEMAP_32_BIT_INDICES - std::vector _indices; + std::vector _indices; #else - std::vector _indices; + std::vector _indices; #endif std::map _indicesVertexZOffsets; std::unordered_map _indicesVertexZNumber; - std::vector _renderCommands; - bool _dirty; - - VertexBuffer* _vertexBuffer; - - VertexData* _vData; + bool _dirty = true; - IndexBuffer* _indexBuffer; - - Map _primitives; + backend::Buffer* _vertexBuffer = nullptr; + backend::Buffer* _indexBuffer = nullptr; + + float _alphaFuncValue = 0.f; + std::unordered_map _customCommands; -public: - /** Possible orientations of the TMX map */ - static const int FAST_TMX_ORIENTATION_ORTHO; - static const int FAST_TMX_ORIENTATION_HEX; - static const int FAST_TMX_ORIENTATION_ISO; + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _textureLocation; + backend::UniformLocation _alphaValueLocation; + backend::ProgramState* _programState = nullptr; }; // end of tilemap_parallax_nodes group /// @} } //end of namespace experimental NS_CC_END - -#endif //__CCTMX_LAYER2_H__ diff --git a/cocos/2d/CCFont.h b/cocos/2d/CCFont.h index 77d0826e8699..a6c57dbe36a3 100644 --- a/cocos/2d/CCFont.h +++ b/cocos/2d/CCFont.h @@ -41,16 +41,7 @@ class CC_DLL Font : public Ref { public: virtual FontAtlas* createFontAtlas() = 0; - virtual int* getHorizontalKerningForTextUTF32(const std::u32string& text, int &outNumLetters) const = 0; - - CC_DEPRECATED_ATTRIBUTE inline int* getHorizontalKerningForTextUTF16(const std::u16string& text, int &outNumLetters) const - { - std::u32string utf32; - StringUtils::UTF16ToUTF32(text, utf32); - return getHorizontalKerningForTextUTF32(utf32, outNumLetters); - } - virtual int getFontMaxHeight() const { return 0; } }; diff --git a/cocos/2d/CCFontAtlas.cpp b/cocos/2d/CCFontAtlas.cpp index b03bd37e8534..3b22d581ac9c 100644 --- a/cocos/2d/CCFontAtlas.cpp +++ b/cocos/2d/CCFontAtlas.cpp @@ -25,7 +25,7 @@ ****************************************************************************/ #include "2d/CCFontAtlas.h" -#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID +#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID #include #elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" @@ -53,6 +53,7 @@ FontAtlas::FontAtlas(Font &theFont) , _rendererRecreatedListener(nullptr) , _antialiasEnabled(true) , _currLineHeight(0) +, _currentPageDataRGBA(nullptr) { _font->retain(); @@ -91,6 +92,8 @@ void FontAtlas::reinit() _currentPageData = nullptr; } + CC_SAFE_DELETE_ARRAY(_currentPageDataRGBA); + auto texture = new (std::nothrow) Texture2D; _currentPageDataSize = CacheTextureWidth * CacheTextureHeight; @@ -100,15 +103,27 @@ void FontAtlas::reinit() { _lineHeight += 2 * outlineSize; _currentPageDataSize *= 2; + + _currentPageDataSizeRGBA = _currentPageDataSize * 2; + _currentPageDataRGBA = new (std::nothrow) unsigned char[_currentPageDataSizeRGBA]; + memset(_currentPageDataRGBA, 0, _currentPageDataSizeRGBA); } _currentPageData = new (std::nothrow) unsigned char[_currentPageDataSize]; memset(_currentPageData, 0, _currentPageDataSize); - auto pixelFormat = outlineSize > 0 ? Texture2D::PixelFormat::AI88 : Texture2D::PixelFormat::A8; - texture->initWithData(_currentPageData, _currentPageDataSize, - pixelFormat, CacheTextureWidth, CacheTextureHeight, Size(CacheTextureWidth,CacheTextureHeight) ); - + //metal do no support AI88 format + if(outlineSize > 0) + { + texture->initWithData(_currentPageDataRGBA, _currentPageDataSizeRGBA, + Texture2D::PixelFormat::RGBA8888, CacheTextureWidth, CacheTextureHeight, Size(CacheTextureWidth,CacheTextureHeight) ); + } + else + { + texture->initWithData(_currentPageData, _currentPageDataSize, + Texture2D::PixelFormat::A8, CacheTextureWidth, CacheTextureHeight, Size(CacheTextureWidth,CacheTextureHeight) ); + + } addTexture(texture,0); texture->release(); } @@ -129,7 +144,7 @@ FontAtlas::~FontAtlas() delete []_currentPageData; -#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID +#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID if (_iconv) { iconv_close(_iconv); @@ -219,7 +234,7 @@ void FontAtlas::conversionU32TOGB2312(const std::u32string& u32Text, std::unorde { case FT_ENCODING_GB2312: { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 std::u16string u16Text; cocos2d::StringUtils::UTF32ToUTF16(u32Text, u16Text); WideCharToMultiByte(936, NULL, (LPCWCH)u16Text.c_str(), strLen, (LPSTR)gb2312Text, gb2312StrSize, NULL, NULL); @@ -382,17 +397,7 @@ bool FontAtlas::prepareLetterDefinitions(const std::u32string& utf32Text) _currentPageOrigX = 0; if (_currentPageOrigY + _lineHeight + _letterPadding + _letterEdgeExtend >= CacheTextureHeight) { - unsigned char *data = nullptr; - if (pixelFormat == Texture2D::PixelFormat::AI88) - { - data = _currentPageData + CacheTextureWidth * (int)startY * 2; - } - else - { - data = _currentPageData + CacheTextureWidth * (int)startY; - } - _atlasTextures[_currentPage]->updateWithData(data, 0, startY, - CacheTextureWidth, CacheTextureHeight - startY); + updateTextureContent(pixelFormat, startY); startY = 0.0f; @@ -452,18 +457,30 @@ bool FontAtlas::prepareLetterDefinitions(const std::u32string& utf32Text) _letterDefinitions[it.first] = tempDef; } + updateTextureContent(pixelFormat, startY); + return true; +} + +void FontAtlas::updateTextureContent(Texture2D::PixelFormat format, int startY) +{ unsigned char *data = nullptr; - if (pixelFormat == Texture2D::PixelFormat::AI88) + auto outlineSize = _fontFreeType->getOutlineSize(); + if (outlineSize > 0 && format == Texture2D::PixelFormat::AI88) { + int nLen = CacheTextureWidth * (_currentPageOrigY - startY + _currLineHeight); data = _currentPageData + CacheTextureWidth * (int)startY * 2; + for (auto i = 0; i < nLen; i++) + { + _currentPageDataRGBA[i*4] = data[i*2]; + _currentPageDataRGBA[i*4+3] = data[i*2+1]; + } + _atlasTextures[_currentPage]->updateWithData(_currentPageDataRGBA, 0, startY, CacheTextureWidth, _currentPageOrigY - startY + _currLineHeight); } else { data = _currentPageData + CacheTextureWidth * (int)startY; + _atlasTextures[_currentPage]->updateWithData(data, 0, startY, CacheTextureWidth, _currentPageOrigY - startY + _currLineHeight); } - _atlasTextures[_currentPage]->updateWithData(data, 0, startY, CacheTextureWidth, _currentPageOrigY - startY + _currLineHeight); - - return true; } void FontAtlas::addTexture(Texture2D *texture, int slot) diff --git a/cocos/2d/CCFontAtlas.h b/cocos/2d/CCFontAtlas.h index 5d05bcd13ba6..065a522fa2b2 100644 --- a/cocos/2d/CCFontAtlas.h +++ b/cocos/2d/CCFontAtlas.h @@ -35,11 +35,11 @@ #include "platform/CCPlatformMacros.h" #include "base/CCRef.h" #include "platform/CCStdC.h" // ssize_t on windows +#include "renderer/CCTexture2D.h" NS_CC_BEGIN class Font; -class Texture2D; class EventCustom; class EventListenerCustom; class FontFreeType; @@ -128,6 +128,8 @@ class CC_DLL FontAtlas : public Ref * @param scaleFactor A float scale factor for scaling font letter info. */ void scaleFontLetterDefinition(float scaleFactor); + + void updateTextureContent(Texture2D::PixelFormat format, int startY); std::unordered_map _atlasTextures; std::unordered_map _letterDefinitions; @@ -139,7 +141,9 @@ class CC_DLL FontAtlas : public Ref // Dynamic GlyphCollection related stuff int _currentPage; unsigned char *_currentPageData; + unsigned char *_currentPageDataRGBA; int _currentPageDataSize; + int _currentPageDataSizeRGBA; float _currentPageOrigX; float _currentPageOrigY; int _letterPadding; diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index d04437233ac8..6715dbf83a8e 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -524,13 +524,15 @@ void BMFontConfiguration::parseCommonArguments(const char* line) tmp = strstr(tmp, "scaleW=") + 7; sscanf(tmp, "%d", &value); - int maxTextureSize = Configuration::getInstance()->getMaxTextureSize(); - CCASSERT(value <= maxTextureSize, "CCLabelBMFont: page can't be larger than supported"); + //TODO coulsonwang +// int maxTextureSize = Configuration::getInstance()->getMaxTextureSize(); +// CCASSERT(value <= maxTextureSize, "CCLabelBMFont: page can't be larger than supported"); // scaleH. sanity check tmp = strstr(tmp, "scaleH=") + 7; sscanf(tmp, "%d", &value); - CCASSERT(value <= maxTextureSize, "CCLabelBMFont: page can't be larger than supported"); + //TODO coulsonwang +// CCASSERT(value <= maxTextureSize, "CCLabelBMFont: page can't be larger than supported"); // pages. sanity check tmp = strstr(tmp, "pages=") + 6; diff --git a/cocos/2d/CCFontFreeType.h b/cocos/2d/CCFontFreeType.h index 1ba97a585493..10514f84dbe1 100644 --- a/cocos/2d/CCFontFreeType.h +++ b/cocos/2d/CCFontFreeType.h @@ -34,19 +34,9 @@ #include #include -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#define generic GenericFromFreeTypeLibrary -#define internal InternalFromFreeTypeLibrary -#endif - #include FT_FREETYPE_H #include FT_STROKER_H -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#undef generic -#undef internal -#endif - NS_CC_BEGIN class CC_DLL FontFreeType : public Font diff --git a/cocos/2d/CCGLBufferedNode.cpp b/cocos/2d/CCGLBufferedNode.cpp deleted file mode 100644 index 510f5f136647..000000000000 --- a/cocos/2d/CCGLBufferedNode.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 Zynga Inc. -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "2d/CCGLBufferedNode.h" - -GLBufferedNode::GLBufferedNode() -{ - for(int i = 0; i < BUFFER_SLOTS; i++) - { - _bufferObject[i] = 0; - _bufferSize[i] = 0; - _indexBufferObject[i] = 0; - _indexBufferSize[i] = 0; - } -} - -GLBufferedNode::~GLBufferedNode() -{ - for(int i = 0; i < BUFFER_SLOTS; i++) - { - if(_bufferSize[i]) - { - glDeleteBuffers(1, &(_bufferObject[i])); - } - if(_indexBufferSize[i]) - { - glDeleteBuffers(1, &(_indexBufferObject[i])); - } - } -} - -void GLBufferedNode::setGLBufferData(void *buf, GLuint bufSize, int slot) -{ - // WebGL doesn't support client-side arrays, so generate a buffer and load the data first. - if(_bufferSize[slot] < bufSize) - { - if(_bufferObject[slot]) - { - glDeleteBuffers(1, &(_bufferObject[slot])); - } - glGenBuffers(1, &(_bufferObject[slot])); - _bufferSize[slot] = bufSize; - - glBindBuffer(GL_ARRAY_BUFFER, _bufferObject[slot]); - glBufferData(GL_ARRAY_BUFFER, bufSize, buf, GL_DYNAMIC_DRAW); - } - else - { - glBindBuffer(GL_ARRAY_BUFFER, _bufferObject[slot]); - glBufferSubData(GL_ARRAY_BUFFER, 0, bufSize, buf); - } -} - -void GLBufferedNode::setGLIndexData(void *buf, GLuint bufSize, int slot) -{ - // WebGL doesn't support client-side arrays, so generate a buffer and load the data first. - if(_indexBufferSize[slot] < bufSize) - { - if(_indexBufferObject[slot]) - { - glDeleteBuffers(1, &(_indexBufferObject[slot])); - } - glGenBuffers(1, &(_indexBufferObject[slot])); - _indexBufferSize[slot] = bufSize; - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject[slot]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, bufSize, buf, GL_DYNAMIC_DRAW); - } - else - { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject[slot]); - glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, bufSize, buf); - } -} - diff --git a/cocos/2d/CCGLBufferedNode.h b/cocos/2d/CCGLBufferedNode.h deleted file mode 100644 index 83f9244d9e1a..000000000000 --- a/cocos/2d/CCGLBufferedNode.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 Zynga Inc. -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_GL_BUFFERED_NODE__ -#define __CC_GL_BUFFERED_NODE__ - -#include "platform/CCGL.h" - -/** -* @js NA -*/ -class GLBufferedNode -{ -public: - /** - * @js ctor - */ - GLBufferedNode(); - /** - * @js NA - * @lua NA - */ - virtual ~GLBufferedNode(); - - /**@{ - * Load the given data into this Node's GL Buffer. Needed for WebGL, as it does not support client-side arrays. - */ - void setGLBufferData(void *buf, GLuint bufSize, int slot); - void setGLIndexData(void *buf, GLuint bufSize, int slot); - /**@}*/ - /** Allocate 4 buffer objs per node, and index into them as slots.*/ - #define BUFFER_SLOTS 4 - /**Handle for vertex buffers.*/ - GLuint _bufferObject[BUFFER_SLOTS]; - /**Size in bytes for vertex buffers.*/ - GLuint _bufferSize[BUFFER_SLOTS]; - /**Handle for index buffers.*/ - GLuint _indexBufferObject[BUFFER_SLOTS]; - /**Size in bytes for index buffers.*/ - GLuint _indexBufferSize[BUFFER_SLOTS]; -}; -#endif // __CC_GL_BUFFERED_NODE__ diff --git a/cocos/2d/CCGrabber.cpp b/cocos/2d/CCGrabber.cpp deleted file mode 100644 index 5c397efe796a..000000000000 --- a/cocos/2d/CCGrabber.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -Copyright (c) 2009 On-Core -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "2d/CCGrabber.h" -#include "base/ccMacros.h" -#include "renderer/CCTexture2D.h" - -NS_CC_BEGIN - -Grabber::Grabber(void) - : _FBO(0) - , _oldFBO(0) -{ - memset(_oldClearColor, 0, sizeof(_oldClearColor)); - - // generate FBO - glGenFramebuffers(1, &_FBO); -} - -void Grabber::grab(Texture2D *texture) -{ - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - - // bind - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - - // associate texture with FBO - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture->getName(), 0); - - // check if it worked (probably worth doing :) ) - GLuint status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - if (status != GL_FRAMEBUFFER_COMPLETE) - { - CCASSERT(0, "Frame Grabber: could not attach texture to framebuffer"); - } - - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); -} - -void Grabber::beforeRender(Texture2D* /*texture*/) -{ - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - - // save clear color - glGetFloatv(GL_COLOR_CLEAR_VALUE, _oldClearColor); - // FIXME: doesn't work with RGB565. - - glClearColor(0, 0, 0, 0); - - // BUG #631: To fix #631, uncomment the lines with #631 - // Warning: But it Grabber won't work with 2 effects at the same time -// glClearColor(0.0f,0.0f,0.0f,1.0f); // #631 - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - -// glColorMask(true, true, true, false); // #631 -} - -void Grabber::afterRender(cocos2d::Texture2D* /*texture*/) -{ - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); -// glColorMask(true, true, true, true); // #631 - - // Restore clear color - glClearColor(_oldClearColor[0], _oldClearColor[1], _oldClearColor[2], _oldClearColor[3]); -} - -Grabber::~Grabber() -{ - CCLOGINFO("deallocing Grabber: %p", this); - glDeleteFramebuffers(1, &_FBO); -} - -NS_CC_END diff --git a/cocos/2d/CCGrabber.h b/cocos/2d/CCGrabber.h deleted file mode 100644 index a0d732ec1d9f..000000000000 --- a/cocos/2d/CCGrabber.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -Copyright (c) 2009 On-Core -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __EFFECTS_CCGRABBER_H__ -#define __EFFECTS_CCGRABBER_H__ - -#include "base/CCRef.h" -#include "platform/CCGL.h" - -NS_CC_BEGIN - -class Texture2D; - -/** - * @addtogroup _2d - * @{ - */ - -/** FBO class that grabs the contents of the screen */ -class Grabber : public Ref -{ -public: - /** - Constructor. - * @js ctor - */ - Grabber(void); - /** - Destructor. - * @js NA - * @lua NA - */ - ~Grabber(void); - /**Init the grab structure, will set the texture as the FBO color attachment.*/ - void grab(Texture2D *texture); - /**Begin capture the screen, which will save the old FBO, clear color, and set the new FBO, clear the background.*/ - void beforeRender(Texture2D *texture); - /**After capture, will reset the old FBO and clear color.*/ - void afterRender(Texture2D *texture); - -protected: - GLuint _FBO; - GLint _oldFBO; - GLfloat _oldClearColor[4]; -}; - -// end of effects group -/// @} - -NS_CC_END - -#endif // __EFFECTS_CCGRABBER_H__ diff --git a/cocos/2d/CCGrid.cpp b/cocos/2d/CCGrid.cpp index bc6f20487935..ed10b1a59c3b 100644 --- a/cocos/2d/CCGrid.cpp +++ b/cocos/2d/CCGrid.cpp @@ -29,56 +29,17 @@ THE SOFTWARE. #include "base/ccMacros.h" #include "base/ccUtils.h" #include "2d/CCNode.h" -#include "2d/CCGrabber.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCRenderState.h" #include "renderer/CCTexture2D.h" -#include "platform/CCGL.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/Device.h" #include "2d/CCCamera.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN // implementation of GridBase -GridBase* GridBase::create(const Size& gridSize) -{ - GridBase *pGridBase = new (std::nothrow) GridBase(); - - if (pGridBase) - { - if (pGridBase->initWithSize(gridSize)) - { - pGridBase->autorelease(); - } - else - { - CC_SAFE_RELEASE_NULL(pGridBase); - } - } - - return pGridBase; -} - -GridBase* GridBase::create(const Size& gridSize, Texture2D *texture, bool flipped) -{ - GridBase *pGridBase = new (std::nothrow) GridBase(); - - if (pGridBase) - { - if (pGridBase->initWithSize(gridSize, texture, flipped)) - { - pGridBase->autorelease(); - } - else - { - CC_SAFE_RELEASE_NULL(pGridBase); - } - } - - return pGridBase; -} - bool GridBase::initWithSize(const Size& gridSize) { return initWithSize(gridSize, Rect::ZERO); @@ -92,29 +53,21 @@ bool GridBase::initWithSize(const cocos2d::Size &gridSize, const cocos2d::Rect & auto POTWide = ccNextPOT((unsigned int)s.width); auto POTHigh = ccNextPOT((unsigned int)s.height); - // we only use rgba8888 - Texture2D::PixelFormat format = Texture2D::PixelFormat::RGBA8888; - - auto dataLen = POTWide * POTHigh * 4; - void *data = calloc(dataLen, 1); - if (! data) - { - CCLOG("cocos2d: Grid: not enough memory."); - this->release(); - return false; - } - Texture2D *texture = new (std::nothrow) Texture2D(); - if (! texture) { - free(data); CCLOG("cocos2d: Grid: error creating texture"); return false; } - - texture->initWithData(data, dataLen, format, POTWide, POTHigh, s); - free(data); + + backend::TextureDescriptor descriptor; + descriptor.width = POTWide; + descriptor.height = POTHigh; + descriptor.textureUsage = backend::TextureUsage::RENDER_TARGET; + descriptor.textureFormat = backend::TextureFormat::R8G8B8A8; + auto backendTexture = backend::Device::getInstance()->newTexture(descriptor); + texture->initWithBackendTexture(backendTexture); + backendTexture->release(); initWithSize(gridSize, texture, false, rect); @@ -139,6 +92,10 @@ bool GridBase::initWithSize(const Size& gridSize, Texture2D *texture, bool flipp _texture = texture; CC_SAFE_RETAIN(_texture); _isTextureFlipped = flipped; + +#ifdef CC_USE_METAL + _isTextureFlipped = !flipped; +#endif if (rect.equals(Rect::ZERO)) { auto size = _texture->getContentSize(); @@ -149,18 +106,23 @@ bool GridBase::initWithSize(const Size& gridSize, Texture2D *texture, bool flipp } _step.x = _gridRect.size.width/_gridSize.width; _step.y = _gridRect.size.height/_gridSize.height; - - _grabber = new (std::nothrow) Grabber(); - if (_grabber) - { - _grabber->grab(_texture); - } - else - { - ret = false; - } - - _shaderProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE); + + auto& pipelineDescriptor = _drawCommand.getPipelineDescriptor(); + CC_SAFE_RELEASE(_programState); + _programState = new (std::nothrow) backend::ProgramState(positionTexture_vert, positionTexture_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 + uint32_t texcoordOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float); + auto& vertexLayout = _drawCommand.getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + calculateVertexPoints(); return ret; @@ -172,7 +134,8 @@ GridBase::~GridBase(void) //TODO: ? why 2.0 comments this line: setActive(false); CC_SAFE_RELEASE(_texture); - CC_SAFE_RELEASE(_grabber); + + CC_SAFE_RELEASE(_programState); } // properties @@ -200,7 +163,7 @@ void GridBase::set2DProjection() { Director *director = Director::getInstance(); Size size = director->getWinSizeInPixels(); - + director->loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); Mat4 orthoMatrix; @@ -215,32 +178,50 @@ void GridBase::setGridRect(const cocos2d::Rect &rect) _gridRect = rect; } -void GridBase::beforeDraw(void) +void GridBase::beforeDraw() { // save projection Director *director = Director::getInstance(); - _directorProjection = director->getProjection(); - // 2d projection - // [director setProjection:Director::Projection::_2D]; - set2DProjection(); - - Size size = director->getWinSizeInPixels(); - glViewport(0, 0, (GLsizei)(size.width), (GLsizei)(size.height) ); - _grabber->beforeRender(_texture); + auto renderer = director->getRenderer(); + + renderer->addCommand(&_groupCommand); + renderer->pushGroup(_groupCommand.getRenderQueueID()); + + _beforeDrawCommand.func = [=]() -> void { + _directorProjection = director->getProjection(); + set2DProjection(); + Size size = director->getWinSizeInPixels(); + renderer->setViewPort(0, 0, size.width, size.height); + + RenderTargetFlag flags = RenderTargetFlag::COLOR; + _oldColorAttachment = renderer->getColorAttachment(); + _oldDepthAttachment = renderer->getDepthAttachment(); + _oldStencilAttachment = renderer->getStencilAttachment(); + _oldRenderTargetFlag = renderer->getRenderTargetFlag(); + + renderer->setRenderTarget(flags, _texture, nullptr, nullptr); + }; + renderer->addCommand(&_beforeDrawCommand); + renderer->clear(ClearFlag::COLOR, _clearColor, 1, 0); } void GridBase::afterDraw(cocos2d::Node * /*target*/) { - _grabber->afterRender(_texture); - // restore projection Director *director = Director::getInstance(); - director->setProjection(_directorProjection); + auto renderer = director->getRenderer(); + + _afterDrawCommand.func = [=]() -> void { + director->setProjection(_directorProjection); + const auto& vp = Camera::getDefaultViewport(); + renderer->setViewPort(vp.x, vp.y, vp.w, vp.h); + renderer->setRenderTarget(_oldRenderTargetFlag, _oldColorAttachment, _oldDepthAttachment, _oldStencilAttachment); + }; + renderer->addCommand(&_afterDrawCommand); + + renderer->popGroup(); - director->setViewport(); - const auto& vp = Camera::getDefaultViewport(); - glViewport(vp._left, vp._bottom, vp._width, vp._height); // if (target->getCamera()->isDirty()) // { // Vec2 offset = target->getAnchorPointInPoints(); @@ -253,30 +234,20 @@ void GridBase::afterDraw(cocos2d::Node * /*target*/) // kmGLTranslatef(-offset.x, -offset.y, 0); // } - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _texture->getName()); - // restore projection for default FBO .fixed bug #543 #544 //TODO: Director::getInstance()->setProjection(Director::getInstance()->getProjection()); //TODO: Director::getInstance()->applyOrientation(); - beforeBlit(); - blit(); - afterBlit(); -} + _beforeBlitCommand.func = [=]() -> void { + beforeBlit(); + }; + renderer->addCommand(&_beforeBlitCommand); -void GridBase::blit(void) -{ - CCASSERT(0, "Subclass should implement it."); -} - -void GridBase::reuse(void) -{ - CCASSERT(0, "Subclass should implement it!"); -} + blit(); -void GridBase::calculateVertexPoints(void) -{ - CCASSERT(0, "Subclass should implement it."); + _afterBlitCommand.func = [=]() -> void { + afterBlit(); + }; + renderer->addCommand(&_afterBlitCommand); } // implementation of Grid3D @@ -363,100 +334,73 @@ Grid3D* Grid3D::create(const Size& gridSize, Texture2D *texture, bool flipped, c Grid3D::Grid3D() -: _texCoordinates(nullptr) -, _vertices(nullptr) -, _originalVertices(nullptr) -, _indices(nullptr) -, _needDepthTestForBlit(false) { - } -Grid3D::~Grid3D(void) +Grid3D::~Grid3D() { CC_SAFE_FREE(_texCoordinates); CC_SAFE_FREE(_vertices); CC_SAFE_FREE(_indices); CC_SAFE_FREE(_originalVertices); + CC_SAFE_FREE(_vertexBuffer); } void Grid3D::beforeBlit() { + auto renderer = Director::getInstance()->getRenderer(); + if(_needDepthTestForBlit) { - _oldDepthTestValue = glIsEnabled(GL_DEPTH_TEST) != GL_FALSE; - GLboolean depthWriteMask; - glGetBooleanv(GL_DEPTH_WRITEMASK, &depthWriteMask); - _oldDepthWriteValue = depthWriteMask != GL_FALSE; - CHECK_GL_ERROR_DEBUG(); - - glEnable(GL_DEPTH_TEST); - RenderState::StateBlock::_defaultState->setDepthTest(true); - - glDepthMask(true); - RenderState::StateBlock::_defaultState->setDepthWrite(true); + _oldDepthTest = renderer->getDepthTest(); + renderer->setDepthTest(true); } } void Grid3D::afterBlit() { + auto renderer = Director::getInstance()->getRenderer(); if(_needDepthTestForBlit) { - if(_oldDepthTestValue) - glEnable(GL_DEPTH_TEST); - else - glDisable(GL_DEPTH_TEST); - RenderState::StateBlock::_defaultState->setDepthTest(_oldDepthTestValue); - - glDepthMask(_oldDepthWriteValue); - RenderState::StateBlock::_defaultState->setDepthWrite(_oldDepthWriteValue); + //TODO:minggo + renderer->setDepthTest(_oldDepthTest); } } -void Grid3D::blit(void) +void Grid3D::blit() { - int n = _gridSize.width * _gridSize.height; - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - _shaderProgram->use(); - _shaderProgram->setUniformsForBuiltins(); - - // - // Attributes - // - - // position - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices); - - // texCoords - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates); - - glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, _indices); + updateVertexBuffer(); + Director::getInstance()->getRenderer()->addCommand(&_drawCommand); + cocos2d::Mat4 projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto programState = _drawCommand.getPipelineDescriptor().programState; + programState->setUniform(_mvpMatrixLocation, projectionMat.m, sizeof(projectionMat.m)); + programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); } -void Grid3D::calculateVertexPoints(void) +void Grid3D::calculateVertexPoints() { float width = (float)_texture->getPixelsWide(); float height = (float)_texture->getPixelsHigh(); float imageH = _texture->getContentSizeInPixels().height; - int x, y, i; + size_t x = 0, y = 0, i = 0; CC_SAFE_FREE(_vertices); CC_SAFE_FREE(_originalVertices); CC_SAFE_FREE(_texCoordinates); + CC_SAFE_FREE(_vertexBuffer); CC_SAFE_FREE(_indices); - unsigned int numOfPoints = (_gridSize.width+1) * (_gridSize.height+1); + size_t numOfPoints = (_gridSize.width+1) * (_gridSize.height+1); _vertices = malloc(numOfPoints * sizeof(Vec3)); _originalVertices = malloc(numOfPoints * sizeof(Vec3)); _texCoordinates = malloc(numOfPoints * sizeof(Vec2)); + _vertexBuffer = malloc(numOfPoints * (sizeof(Vec3) + sizeof(Vec2))); _indices = (GLushort*)malloc(_gridSize.width * _gridSize.height * sizeof(GLushort) * 6); - GLfloat *vertArray = (GLfloat*)_vertices; - GLfloat *texArray = (GLfloat*)_texCoordinates; - GLushort *idxArray = _indices; + float *vertArray = (float*)_vertices; + float *texArray = (float*)_texCoordinates; + unsigned short *idxArray = _indices; for (x = 0; x < _gridSize.width; ++x) { @@ -464,21 +408,22 @@ void Grid3D::calculateVertexPoints(void) { int idx = (y * _gridSize.width) + x; - GLfloat x1 = x * _step.x + _gridRect.origin.x; - GLfloat x2 = x1 + _step.x; - GLfloat y1 = y * _step.y + _gridRect.origin.y; - GLfloat y2= y1 + _step.y; + float x1 = x * _step.x + _gridRect.origin.x; + float x2 = x1 + _step.x; + float y1 = y * _step.y + _gridRect.origin.y; + float y2= y1 + _step.y; - GLushort a = (GLushort)(x * (_gridSize.height + 1) + y); - GLushort b = (GLushort)((x + 1) * (_gridSize.height + 1) + y); - GLushort c = (GLushort)((x + 1) * (_gridSize.height + 1) + (y + 1)); - GLushort d = (GLushort)(x * (_gridSize.height + 1) + (y + 1)); + unsigned short a = (unsigned short)(x * (_gridSize.height + 1) + y); + unsigned short b = (unsigned short)((x + 1) * (_gridSize.height + 1) + y); + unsigned short c = (unsigned short)((x + 1) * (_gridSize.height + 1) + (y + 1)); + unsigned short d = (unsigned short)(x * (_gridSize.height + 1) + (y + 1)); - GLushort tempidx[6] = {a, b, d, b, c, d}; + unsigned short tempidx[6] = {a, b, d, b, c, d}; - memcpy(&idxArray[6*idx], tempidx, 6*sizeof(GLushort)); + memcpy(&idxArray[6*idx], tempidx, 6*sizeof(unsigned short)); int l1[4] = {a*3, b*3, c*3, d*3}; + Vec3 e(x1, y1, 0); Vec3 f(x2, y1, 0); Vec3 g(x2, y2, 0); @@ -508,6 +453,8 @@ void Grid3D::calculateVertexPoints(void) } } + updateVertexAndTexCoordinate(); + memcpy(_originalVertices, _vertices, (_gridSize.width+1) * (_gridSize.height+1) * sizeof(Vec3)); } @@ -545,7 +492,7 @@ void Grid3D::setVertex(const Vec2& pos, const Vec3& vertex) vertArray[index+2] = vertex.z; } -void Grid3D::reuse(void) +void Grid3D::reuse() { if (_reuseGrid > 0) { @@ -554,18 +501,41 @@ void Grid3D::reuse(void) } } -// implementation of TiledGrid3D +void Grid3D::updateVertexBuffer() +{ + size_t numOfPoints = (_gridSize.width+1) * (_gridSize.height+1); + auto tempVecPointer = (Vec3*)_vertices; + for (size_t i = 0; i < numOfPoints; ++i) + { + auto offset = i * (sizeof(Vec3) + sizeof(Vec2)); + memcpy((char*)_vertexBuffer + offset, &tempVecPointer[i], sizeof(Vec3)); + } + _drawCommand.updateVertexBuffer(_vertexBuffer, (unsigned int)(numOfPoints * sizeof(Vec3) + numOfPoints * sizeof(Vec2)) ); + + _drawCommand.updateIndexBuffer(_indices, _gridSize.width * _gridSize.height * 6 * sizeof(unsigned short)); +} -TiledGrid3D::TiledGrid3D() - : _texCoordinates(nullptr) - , _vertices(nullptr) - , _originalVertices(nullptr) - , _indices(nullptr) +void Grid3D::updateVertexAndTexCoordinate() { + unsigned int numOfPoints = (_gridSize.width+1) * (_gridSize.height+1); + auto tempVecPointer = (Vec3*)_vertices; + auto tempTexPointer = (Vec2*)_texCoordinates; + for (size_t i = 0; i < numOfPoints; ++i) + { + auto offset = i * (sizeof(Vec3) + sizeof(Vec2)); + memcpy((char*)_vertexBuffer + offset, &tempVecPointer[i], sizeof(Vec3)); + memcpy((char*)_vertexBuffer + offset + sizeof(Vec3), &tempTexPointer[i], sizeof(Vec2)); + } + _drawCommand.createVertexBuffer((unsigned int)(sizeof(Vec3) + sizeof(Vec2)), numOfPoints, CustomCommand::BufferUsage::DYNAMIC); + _drawCommand.updateVertexBuffer(_vertexBuffer, numOfPoints * sizeof(Vec3) + numOfPoints * sizeof(Vec2)); + _drawCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, _gridSize.width * _gridSize.height * 6, CustomCommand::BufferUsage::DYNAMIC); + _drawCommand.updateIndexBuffer(_indices, _gridSize.width * _gridSize.height * 6 * sizeof(unsigned short)); } -TiledGrid3D::~TiledGrid3D(void) +// implementation of TiledGrid3D + +TiledGrid3D::~TiledGrid3D() { CC_SAFE_FREE(_texCoordinates); CC_SAFE_FREE(_vertices); @@ -653,32 +623,17 @@ TiledGrid3D* TiledGrid3D::create(const Size& gridSize, Texture2D *texture, bool return ret; } -void TiledGrid3D::blit(void) +void TiledGrid3D::blit() { - int n = _gridSize.width * _gridSize.height; - - - _shaderProgram->use(); - _shaderProgram->setUniformsForBuiltins(); - - // - // Attributes - // - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - - // position - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices); - - // texCoords - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates); - - glDrawElements(GL_TRIANGLES, (GLsizei)n*6, GL_UNSIGNED_SHORT, _indices); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6); + updateVertexBuffer(); + Director::getInstance()->getRenderer()->addCommand(&_drawCommand); + cocos2d::Mat4 projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto programState = _drawCommand.getPipelineDescriptor().programState; + programState->setUniform(_mvpMatrixLocation, projectionMat.m, sizeof(projectionMat.m)); + programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); } -void TiledGrid3D::calculateVertexPoints(void) +void TiledGrid3D::calculateVertexPoints() { float width = (float)_texture->getPixelsWide(); float height = (float)_texture->getPixelsHigh(); @@ -689,21 +644,22 @@ void TiledGrid3D::calculateVertexPoints(void) CC_SAFE_FREE(_originalVertices); CC_SAFE_FREE(_texCoordinates); CC_SAFE_FREE(_indices); + CC_SAFE_FREE(_vertexBuffer); _vertices = malloc(numQuads*4*sizeof(Vec3)); _originalVertices = malloc(numQuads*4*sizeof(Vec3)); _texCoordinates = malloc(numQuads*4*sizeof(Vec2)); _indices = (GLushort*)malloc(numQuads*6*sizeof(GLushort)); + _vertexBuffer = malloc(numQuads * 4 * (sizeof(Vec3) + sizeof(Vec2) ) ); - GLfloat *vertArray = (GLfloat*)_vertices; - GLfloat *texArray = (GLfloat*)_texCoordinates; - GLushort *idxArray = _indices; - - int x, y; + float *vertArray = (GLfloat*)_vertices; + float *texArray = (GLfloat*)_texCoordinates; + unsigned short *idxArray = _indices; - for( x = 0; x < _gridSize.width; x++ ) + + for (int x = 0; x < _gridSize.width; ++x) { - for( y = 0; y < _gridSize.height; y++ ) + for (int y = 0; y < _gridSize.height; ++y) { float x1 = x * _step.x + _gridRect.origin.x; float x2 = x1 + _step.x; @@ -743,18 +699,19 @@ void TiledGrid3D::calculateVertexPoints(void) } } - for (x = 0; x < numQuads; x++) + for (int x = 0; x < numQuads; x++) { - idxArray[x*6+0] = (GLushort)(x * 4 + 0); - idxArray[x*6+1] = (GLushort)(x * 4 + 1); - idxArray[x*6+2] = (GLushort)(x * 4 + 2); + idxArray[x*6+0] = (unsigned short)(x * 4 + 0); + idxArray[x*6+1] = (unsigned short)(x * 4 + 1); + idxArray[x*6+2] = (unsigned short)(x * 4 + 2); - idxArray[x*6+3] = (GLushort)(x * 4 + 1); - idxArray[x*6+4] = (GLushort)(x * 4 + 2); - idxArray[x*6+5] = (GLushort)(x * 4 + 3); + idxArray[x*6+3] = (unsigned short)(x * 4 + 1); + idxArray[x*6+4] = (unsigned short)(x * 4 + 2); + idxArray[x*6+5] = (unsigned short)(x * 4 + 3); } - - memcpy(_originalVertices, _vertices, numQuads * 12 * sizeof(GLfloat)); + + updateVertexAndTexCoordinate(); + memcpy(_originalVertices, _vertices, numQuads * 12 * sizeof(float)); } void TiledGrid3D::setTile(const Vec2& pos, const Quad3& coords) @@ -789,7 +746,7 @@ Quad3 TiledGrid3D::getTile(const Vec2& pos) const return ret; } -void TiledGrid3D::reuse(void) +void TiledGrid3D::reuse() { if (_reuseGrid > 0) { @@ -800,4 +757,36 @@ void TiledGrid3D::reuse(void) } } +void TiledGrid3D::updateVertexBuffer() +{ + size_t numOfPoints = _gridSize.width * _gridSize.height * 4; + auto tempVecPointer = (Vec3*)_vertices; + for (size_t i = 0; i < numOfPoints; ++i) + { + auto offset = i * (sizeof(Vec3) + sizeof(Vec2)); + memcpy((char*)_vertexBuffer + offset, &tempVecPointer[i], sizeof(Vec3)); + } + _drawCommand.updateVertexBuffer(_vertexBuffer, (unsigned int)(numOfPoints * sizeof(Vec3) + numOfPoints * sizeof(Vec2)) ); + + _drawCommand.updateIndexBuffer(_indices, _gridSize.width * _gridSize.height * 6 * sizeof(unsigned short)); +} + +void TiledGrid3D::updateVertexAndTexCoordinate() +{ + unsigned int numOfPoints = _gridSize.width * _gridSize.height * 4; + auto tempVecPointer = (Vec3*)_vertices; + auto tempTexPointer = (Vec2*)_texCoordinates; + for (size_t i = 0; i < numOfPoints; ++i) + { + auto offset = i * (sizeof(Vec3) + sizeof(Vec2)); + memcpy((char*)_vertexBuffer + offset, &tempVecPointer[i], sizeof(Vec3)); + memcpy((char*)_vertexBuffer + offset + sizeof(Vec3), &tempTexPointer[i], sizeof(Vec2)); + } + _drawCommand.createVertexBuffer((unsigned int)(sizeof(Vec3) + sizeof(Vec2) ), numOfPoints, CustomCommand::BufferUsage::DYNAMIC); + _drawCommand.updateVertexBuffer(_vertexBuffer, numOfPoints * sizeof(Vec3) + numOfPoints * sizeof(Vec2)); + + _drawCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, _gridSize.width * _gridSize.height * 6, CustomCommand::BufferUsage::DYNAMIC); + _drawCommand.updateIndexBuffer(_indices, _gridSize.width * _gridSize.height * 6 * sizeof(unsigned short)); +} + NS_CC_END diff --git a/cocos/2d/CCGrid.h b/cocos/2d/CCGrid.h index 2af22597fbcd..11e0658a4eed 100644 --- a/cocos/2d/CCGrid.h +++ b/cocos/2d/CCGrid.h @@ -24,18 +24,20 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __EFFECTS_CCGRID_H__ -#define __EFFECTS_CCGRID_H__ +#pragma once #include "base/CCRef.h" #include "base/ccTypes.h" #include "base/CCDirector.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCCallbackCommand.h" NS_CC_BEGIN class Texture2D; -class Grabber; -class GLProgram; +// class Grabber; +// class GLProgram; class Node; /** @@ -48,16 +50,27 @@ class Node; class CC_DLL GridBase : public Ref { public: - /** create one Grid */ - static GridBase* create(const Size& gridSize, Texture2D *texture, bool flipped); - /** create one Grid */ - static GridBase* create(const Size& gridSize); /** Destructor. * @js NA * @lua NA */ - virtual ~GridBase(void); + virtual ~GridBase(); + + /**@{ + Interface for custom action when before or after draw. + @js NA + */ + virtual void beforeBlit() {} + virtual void afterBlit() {} + /**@}*/ + + /**Interface used to blit the texture with grid to screen.*/ + virtual void blit() = 0; + /**Interface, Reuse the grid vertices.*/ + virtual void reuse() = 0; + /**Interface, Calculate the vertices used for the blit.*/ + virtual void calculateVertexPoints() = 0; /**@{ Init the Grid base. @@ -102,27 +115,12 @@ class CC_DLL GridBase : public Ref /**@{ Init and reset the status when render effects by using the grid. */ - void beforeDraw(void); + void beforeDraw(); void afterDraw(Node *target); /**@}*/ - /**@{ - Interface for custom action when before or after draw. - @js NA - */ - virtual void beforeBlit() {} - virtual void afterBlit() {} - /**@}*/ - - /**Interface used to blit the texture with grid to screen.*/ - virtual void blit(void); - /**Interface, Reuse the grid vertices.*/ - virtual void reuse(void); - /**Interface, Calculate the vertices used for the blit.*/ - virtual void calculateVertexPoints(void); - /**Change projection to 2D for grabbing.*/ - void set2DProjection(void); + void set2DProjection(); /** * @brief Set the effect grid rect. @@ -136,16 +134,32 @@ class CC_DLL GridBase : public Ref const Rect& getGridRect() const { return _gridRect; } protected: - bool _active; - int _reuseGrid; + bool _active = false; + int _reuseGrid = 0; Size _gridSize; - Texture2D *_texture; + Texture2D *_texture = nullptr; Vec2 _step; - Grabber *_grabber; - bool _isTextureFlipped; - GLProgram* _shaderProgram; - Director::Projection _directorProjection; + bool _isTextureFlipped = false; + Director::Projection _directorProjection = Director::Projection::_2D; Rect _gridRect; + + Color4F _clearColor = {0, 0, 0, 0}; + + GroupCommand _groupCommand; + CustomCommand _drawCommand; + CallbackCommand _beforeDrawCommand; + CallbackCommand _afterDrawCommand; + CallbackCommand _beforeBlitCommand; + CallbackCommand _afterBlitCommand; + RenderTargetFlag _oldRenderTargetFlag; + Texture2D* _oldColorAttachment = nullptr; + Texture2D* _oldDepthAttachment = nullptr; + Texture2D* _oldStencilAttachment = nullptr; + + backend::UniformLocation _mvpMatrixLocation; + backend::UniformLocation _textureLocation; + + backend::ProgramState* _programState = nullptr; }; /** @@ -179,19 +193,12 @@ class CC_DLL Grid3D : public GridBase * @lua NA */ Vec3 getVertex(const Vec2& pos) const; - /** @deprecated Use getVertex() instead - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Vec3 vertex(const Vec2& pos) const { return getVertex(pos); } + /** Returns the original (non-transformed) vertex at a given position. * @js NA * @lua NA */ Vec3 getOriginalVertex(const Vec2& pos) const; - /** @deprecated Use getOriginalVertex() instead - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Vec3 originalVertex(const Vec2& pos) const { return getOriginalVertex(pos); } /** Sets a new vertex at a given position. * @lua NA @@ -211,17 +218,21 @@ class CC_DLL Grid3D : public GridBase Getter and Setter for depth test state when blit. @js NA */ - void setNeedDepthTestForBlit( bool neededDepthTest) { _needDepthTestForBlit = neededDepthTest; } + void setNeedDepthTestForBlit(bool neededDepthTest) { _needDepthTestForBlit = neededDepthTest; } bool getNeedDepthTestForBlit() const { return _needDepthTestForBlit; } /**@}*/ protected: - GLvoid *_texCoordinates; - GLvoid *_vertices; - GLvoid *_originalVertices; - GLushort *_indices; - bool _needDepthTestForBlit; - bool _oldDepthTestValue; - bool _oldDepthWriteValue; + void updateVertexBuffer(); + void updateVertexAndTexCoordinate(); + + void* _vertexBuffer = nullptr; + void* _texCoordinates = nullptr; + void* _vertices = nullptr; + void* _originalVertices = nullptr; + unsigned short *_indices = nullptr; + bool _needDepthTestForBlit = false; + bool _oldDepthTest = false; + bool _oldDepthWrite = false; }; /** @@ -239,59 +250,55 @@ class CC_DLL TiledGrid3D : public GridBase static TiledGrid3D* create(const Size& gridSize, Texture2D *texture, bool flipped); /** Create one Grid. */ static TiledGrid3D* create(const Size& gridSize, Texture2D *texture, bool flipped, const Rect& rect); - /** - Constructor. - * @js ctor - */ - TiledGrid3D(); - /** - Destructor. - * @js NA - * @lua NA + + /**@{ + Implementations for interfaces in base class. */ - ~TiledGrid3D(); + virtual void blit() override; + virtual void reuse() override; + virtual void calculateVertexPoints() override; + /**@}*/ /** Returns the tile at the given position. * @js NA * @lua NA */ Quad3 getTile(const Vec2& pos) const; - /** returns the tile at the given position - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Quad3 tile(const Vec2& pos) const { return getTile(pos); } /** Returns the original tile (untransformed) at the given position. * @js NA * @lua NA */ Quad3 getOriginalTile(const Vec2& pos) const; - /** returns the original tile (untransformed) at the given position - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Quad3 originalTile(const Vec2& pos) const { return getOriginalTile(pos); } /** Sets a new tile. * @lua NA */ void setTile(const Vec2& pos, const Quad3& coords); - /**@{ - Implementations for interfaces in base class. - */ - virtual void blit() override; - virtual void reuse() override; - virtual void calculateVertexPoints() override; - /**@}*/ protected: - GLvoid *_texCoordinates; - GLvoid *_vertices; - GLvoid *_originalVertices; - GLushort *_indices; + /** + Constructor. + * @js ctor + */ + TiledGrid3D() = default; + /** + Destructor. + * @js NA + * @lua NA + */ + ~TiledGrid3D(); + + void updateVertexBuffer(); + void updateVertexAndTexCoordinate(); + + void* _texCoordinates = nullptr; + void* _vertices = nullptr; + void* _originalVertices = nullptr; + unsigned short* _indices = nullptr; + void* _vertexBuffer = nullptr; }; // end of effects group /// @} NS_CC_END - -#endif // __EFFECTS_CCGRID_H__ diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 468f175eea8c..0209a96d56d2 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -44,9 +44,10 @@ #include "base/CCEventCustom.h" #include "base/ccUtils.h" #include "2d/CCFontFNT.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN - /** * LabelLetter used to update the quad in texture atlas without SpriteBatchNode. */ @@ -184,18 +185,6 @@ Label* Label::create() return ret; } -Label* Label::create(const std::string& text, const std::string& font, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */) -{ - if (FileUtils::getInstance()->isFileExist(font)) - { - return createWithTTF(text,font,fontSize,dimensions,hAlignment,vAlignment); - } - else - { - return createWithSystemFont(text,font,fontSize,dimensions,hAlignment,vAlignment); - } -} - Label* Label::createWithSystemFont(const std::string& text, const std::string& font, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */) { auto ret = new (std::nothrow) Label(hAlignment,vAlignment); @@ -453,6 +442,8 @@ Label::~Label() CC_SAFE_RELEASE_NULL(_textSprite); CC_SAFE_RELEASE_NULL(_shadowNode); + + CC_SAFE_RELEASE(_programState); } void Label::reset() @@ -552,38 +543,104 @@ static Texture2D* _getTexture(Label* label) return texture; } +void Label::setVertexLayout(PipelineDescriptor& pipelineDescriptor) +{ +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + //set vertexLayout according to V3F_C4B_T2F structure + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + + backend::VertexLayout vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + pipelineDescriptor.vertexLayout = vertexLayout; + + _customCommand.setDrawType(CustomCommand::DrawType::ELEMENT); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); +} + void Label::updateShaderProgram() { - switch (_currLabelEffect) + const char* vert = nullptr; + const char* frag = nullptr; + + if (_currentLabelType == LabelType::BMFONT || _currentLabelType == LabelType::CHARMAP) { - case cocos2d::LabelEffect::NORMAL: - if (_useDistanceField) - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_NORMAL)); - else if (_useA8Shader) - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_LABEL_NORMAL)); - else if (_shadowEnabled) - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR, _getTexture(this))); + auto texture = _getTexture(this); + if(texture && texture->getAlphaTextureName()) + { + vert = positionTextureColor_vert; + frag = etc1_frag; + } else - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, _getTexture(this))); - - break; - case cocos2d::LabelEffect::OUTLINE: - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_LABEL_OUTLINE)); - _uniformEffectColor = glGetUniformLocation(getGLProgram()->getProgram(), "u_effectColor"); - _uniformEffectType = glGetUniformLocation(getGLProgram()->getProgram(), "u_effectType"); - break; - case cocos2d::LabelEffect::GLOW: - if (_useDistanceField) { - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_GLOW)); - _uniformEffectColor = glGetUniformLocation(getGLProgram()->getProgram(), "u_effectColor"); + vert = positionTextureColor_vert; + frag = positionTextureColor_frag; } - break; - default: - return; } - - _uniformTextColor = glGetUniformLocation(getGLProgram()->getProgram(), "u_textColor"); + else + { + switch (_currLabelEffect) + { + case cocos2d::LabelEffect::NORMAL: + if (_useDistanceField) + { + vert = positionTextureColor_vert; + frag = label_distanceNormal_frag; + } + else if (_useA8Shader) + { + vert = positionTextureColor_vert; + frag = label_normal_frag; + } + else + { + auto texture = _getTexture(this); + if(texture && texture->getAlphaTextureName()) + { + vert = positionTextureColor_vert; + frag = etc1_frag; + } + else + { + vert = positionTextureColor_vert; + frag = positionTextureColor_frag; + } + } + break; + case cocos2d::LabelEffect::OUTLINE: + { + vert = positionTextureColor_vert; + frag = labelOutline_frag; + } + break; + case cocos2d::LabelEffect::GLOW: + if (_useDistanceField) + { + vert = positionTextureColor_vert; + frag = labelDistanceFieldGlow_frag; + } + break; + default: + return; + } + } + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + CC_SAFE_RELEASE(_programState); + _programState = new (std::nothrow) backend::ProgramState(vert, frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + _alphaTextureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture1"); + _textColorLocation = pipelineDescriptor.programState->getUniformLocation("u_textColor"); + _effectColorLocation = pipelineDescriptor.programState->getUniformLocation("u_effectColor"); + _effectTypeLocation = pipelineDescriptor.programState->getUniformLocation("u_effectType"); + setVertexLayout(pipelineDescriptor); } void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false */, bool useA8Shader /* = false */) @@ -1150,7 +1207,7 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */, if (_currentLabelType == LabelType::BMFONT || _currentLabelType == LabelType::CHARMAP) { - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(_shadowEnabled ? GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR : GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, _getTexture(this))); + updateShaderProgram(); } } @@ -1345,39 +1402,6 @@ void Label::setCameraMask(unsigned short mask, bool applyChildren) } } -void Label::setFontDefinition(const FontDefinition& textDefinition) -{ - _systemFont = textDefinition._fontName; - _systemFontSize = textDefinition._fontSize; - _hAlignment = textDefinition._alignment; - _vAlignment = textDefinition._vertAlignment; - setDimensions(textDefinition._dimensions.width, textDefinition._dimensions.height); - Color4B textColor = Color4B(textDefinition._fontFillColor); - textColor.a = textDefinition._fontAlpha; - setTextColor(textColor); - -#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS) - if (textDefinition._stroke._strokeEnabled) - { - CCLOGERROR("Stroke Currently only supported on iOS and Android!"); - } - _outlineSize = 0.f; -#else - if (textDefinition._stroke._strokeEnabled && textDefinition._stroke._strokeSize > 0.f) - { - Color4B outlineColor = Color4B(textDefinition._stroke._strokeColor); - outlineColor.a = textDefinition._stroke._strokeAlpha; - enableOutline(outlineColor, textDefinition._stroke._strokeSize); - } -#endif - - if (textDefinition._shadow._shadowEnabled) - { - enableShadow(Color4B(0, 0, 0, 255 * textDefinition._shadow._shadowOpacity), - textDefinition._shadow._shadowOffset, textDefinition._shadow._shadowBlur); - } -} - void Label::updateContent() { if (_systemFontDirty) @@ -1485,109 +1509,123 @@ float Label::getBMFontSize()const return _bmFontSize; } -void Label::onDrawShadow(GLProgram* glProgram, const Color4F& shadowColor) +void Label::updateBuffer(TextureAtlas* textureAtlas, CustomCommand& customCommand) { - if (_currentLabelType == LabelType::TTF) + if (textureAtlas->getTotalQuads() > customCommand.getVertexCapacity()) { - if (_currLabelEffect == LabelEffect::OUTLINE) - { - glProgram->setUniformLocationWith1i(_uniformEffectType, 2); // 2: shadow - glProgram->setUniformLocationWith4f(_uniformEffectColor, shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a); - } - else - { - glProgram->setUniformLocationWith4f(_uniformTextColor, shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a); - if (_currLabelEffect == LabelEffect::GLOW) - { - glProgram->setUniformLocationWith4f(_uniformEffectColor, shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a); - } - } - - glProgram->setUniformsForBuiltins(_shadowTransform); - for (auto&& it : _letters) - { - it.second->updateTransform(); - } - for (auto&& batchNode : _batchNodes) - { - batchNode->getTextureAtlas()->drawQuads(); - } - } - else - { - Color3B oldColor = _realColor; - GLubyte oldOPacity = _displayedOpacity; - _displayedOpacity = shadowColor.a * (oldOPacity / 255.0f) * 255; - setColor(Color3B(shadowColor)); - - glProgram->setUniformsForBuiltins(_shadowTransform); - for (auto&& it : _letters) - { - it.second->updateTransform(); - } - for (auto&& batchNode : _batchNodes) - { - batchNode->getTextureAtlas()->drawQuads(); - } - - _displayedOpacity = oldOPacity; - setColor(oldColor); + customCommand.createVertexBuffer((unsigned int)sizeof(V3F_C4B_T2F_Quad), (unsigned int)textureAtlas->getTotalQuads(), CustomCommand::BufferUsage::DYNAMIC); + customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, (unsigned int)textureAtlas->getTotalQuads()*6, CustomCommand::BufferUsage::DYNAMIC); } + customCommand.updateVertexBuffer(textureAtlas->getQuads(), (unsigned int)(textureAtlas->getTotalQuads() * sizeof(V3F_C4B_T2F_Quad)) ); + customCommand.updateIndexBuffer(textureAtlas->getIndices(), (unsigned int)(textureAtlas->getTotalQuads()*6*sizeof(unsigned short)) ); + customCommand.setIndexDrawInfo(0, (unsigned int)(textureAtlas->getTotalQuads()*6)); } -void Label::onDraw(const Mat4& transform, bool /*transformUpdated*/) +void Label::updateEffectUniforms(TextureAtlas* textureAtlas, Renderer *renderer, const Mat4 &transform) { - auto glprogram = getGLProgram(); - glprogram->use(); - utils::setBlending(_blendFunc.src, _blendFunc.dst); - - if (_shadowEnabled) - { - if (_boldEnabled) - onDrawShadow(glprogram, _textColorF); - else - onDrawShadow(glprogram, _shadowColor4F); - } - - glprogram->setUniformsForBuiltins(transform); - for (auto&& it : _letters) - { - it.second->updateTransform(); + updateBuffer(textureAtlas, _customCommand); + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + if (_shadowEnabled) { + updateBuffer(textureAtlas, _customCommandShadow); + auto& pipelineShadow = _customCommandShadow.getPipelineDescriptor(); + pipelineShadow = pipelineDescriptor; + pipelineShadow.programState = pipelineDescriptor.programState; + const auto& matrixP = _director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 matrixMVP = matrixP * _shadowTransform; + pipelineShadow.programState->setUniform(_mvpMatrixLocation, matrixMVP.m, sizeof(matrixMVP.m)); } - - if (_currentLabelType == LabelType::TTF) + + if(_currentLabelType == LabelType::TTF) { switch (_currLabelEffect) { - case LabelEffect::OUTLINE: - // draw outline of text - glprogram->setUniformLocationWith1i(_uniformEffectType, 1); // 1: outline - glprogram->setUniformLocationWith4f(_uniformEffectColor, - _effectColorF.r, _effectColorF.g, _effectColorF.b, _effectColorF.a); - for (auto&& batchNode : _batchNodes) + case LabelEffect::OUTLINE: { - batchNode->getTextureAtlas()->drawQuads(); + int effectType[] = {0, 0, 0, 0}; + Vec4 effectColor(_effectColorF.r, _effectColorF.g, _effectColorF.b, _effectColorF.a); + + //draw shadow + if(_shadowEnabled) + { + effectType[0] = 2; + auto& pipelineShadow = _customCommandShadow.getPipelineDescriptor(); + Vec4 shadowColor = Vec4(_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a); + pipelineShadow.programState->setUniform(_effectColorLocation, &shadowColor, sizeof(Vec4)); + pipelineShadow.programState->setUniform(_effectTypeLocation, &effectType, sizeof(effectType)); + _customCommandShadow.init(_globalZOrder); + renderer->addCommand(&_customCommandShadow); + } + + //draw outline + { + effectType[0] = 1; + updateBuffer(textureAtlas, _customCommandOutLine); + auto& pipelineOutline = _customCommandOutLine.getPipelineDescriptor(); + pipelineOutline = pipelineDescriptor; + pipelineOutline.programState = pipelineDescriptor.programState; + pipelineOutline.programState->setUniform(_effectColorLocation, &effectColor, sizeof(Vec4)); + pipelineOutline.programState->setUniform(_effectTypeLocation, &effectType, sizeof(effectType)); + _customCommandOutLine.init(_globalZOrder); + renderer->addCommand(&_customCommandOutLine); + } + + //draw text + { + effectType[0] = 0; + pipelineDescriptor.programState->setUniform(_effectColorLocation, &effectColor, sizeof(Vec4)); + pipelineDescriptor.programState->setUniform(_effectTypeLocation, &effectType, sizeof(effectType)); + } } - - // draw text without outline - glprogram->setUniformLocationWith1i(_uniformEffectType, 0); // 0: text - glprogram->setUniformLocationWith4f(_uniformTextColor, _textColorF.r, _textColorF.g, _textColorF.b, _textColorF.a); - break; - case LabelEffect::GLOW: - glprogram->setUniformLocationWith4f(_uniformEffectColor, - _effectColorF.r, _effectColorF.g, _effectColorF.b, _effectColorF.a); - case LabelEffect::NORMAL: - glprogram->setUniformLocationWith4f(_uniformTextColor, - _textColorF.r, _textColorF.g, _textColorF.b, _textColorF.a); - break; - default: - break; + break; + case LabelEffect::NORMAL: + { + if (_shadowEnabled) { + auto& pipelineShadow = _customCommandShadow.getPipelineDescriptor(); + Vec4 shadowColor = Vec4(_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a); + pipelineShadow.programState->setUniform(_textColorLocation, &shadowColor, sizeof(Vec4)); + _customCommandShadow.init(_globalZOrder); + renderer->addCommand(&_customCommandShadow); + } + } + break; + case LabelEffect::GLOW: + { + //draw shadow + if(_shadowEnabled) + { + auto& pipelineShadow = _customCommandShadow.getPipelineDescriptor(); + Vec4 shadowColor = Vec4(_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a); + pipelineShadow.programState->setUniform(_textColorLocation, &shadowColor, sizeof(Vec4)); + pipelineShadow.programState->setUniform(_effectColorLocation, &shadowColor, sizeof(Vec4)); + _customCommandShadow.init(_globalZOrder); + renderer->addCommand(&_customCommandShadow); + } + + Vec4 effectColor(_effectColorF.r, _effectColorF.g, _effectColorF.b, _effectColorF.a); + pipelineDescriptor.programState->setUniform(_effectColorLocation, &effectColor, sizeof(Vec4)); + } + break; + default: + break; } } - - for (auto&& batchNode : _batchNodes) + else { - batchNode->getTextureAtlas()->drawQuads(); + if (_shadowEnabled) { + Color3B oldColor = _realColor; + GLubyte oldOPacity = _displayedOpacity; + _displayedOpacity = _shadowColor4F.a * (oldOPacity / 255.0f) * 255; + setColor(Color3B(_shadowColor4F)); + _customCommandShadow.updateVertexBuffer(textureAtlas->getQuads(), (unsigned int)(textureAtlas->getTotalQuads() * sizeof(V3F_C4B_T2F_Quad)) ); + _customCommandShadow.init(_globalZOrder); + renderer->addCommand(&_customCommandShadow); + + _displayedOpacity = oldOPacity; + setColor(oldColor); + } } + + _customCommand.init(_globalZOrder); + renderer->addCommand(&_customCommand); } void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) @@ -1612,6 +1650,9 @@ void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) if (_insideBounds) #endif { + updateBlendState(); + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + cocos2d::Mat4 matrixProjection = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); if (!_shadowEnabled && (_currentLabelType == LabelType::BMFONT || _currentLabelType == LabelType::CHARMAP)) { for (auto&& it : _letters) @@ -1620,21 +1661,69 @@ void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) } // ETC1 ALPHA supports for BMFONT & CHARMAP auto textureAtlas = _batchNodes.at(0)->getTextureAtlas(); + if(!textureAtlas->getTotalQuads()) + return; + auto texture = textureAtlas->getTexture(); - _quadCommand.init(_globalZOrder, texture, getGLProgramState(), - _blendFunc, textureAtlas->getQuads(), textureAtlas->getTotalQuads(), transform, flags); + auto& pipelineQuad = _quadCommand.getPipelineDescriptor(); + pipelineQuad = pipelineDescriptor; + pipelineQuad.programState = pipelineDescriptor.programState; + pipelineQuad.programState->setUniform(_mvpMatrixLocation, matrixProjection.m, sizeof(matrixProjection.m)); + pipelineQuad.programState->setTexture(_textureLocation, 0, texture->getBackendTexture()); + auto alphaTexture = textureAtlas->getTexture()->getAlphaTexture(); + if(alphaTexture && alphaTexture->getBackendTexture()) + { + pipelineQuad.programState->setTexture(_alphaTextureLocation, 1, alphaTexture->getBackendTexture()); + } + _quadCommand.init(_globalZOrder, texture, _blendFunc, textureAtlas->getQuads(), textureAtlas->getTotalQuads(), transform, flags); renderer->addCommand(&_quadCommand); } else { - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(Label::onDraw, this, transform, transformUpdated); - - renderer->addCommand(&_customCommand); + for (auto&& batchNode : _batchNodes) + { + auto textureAtlas = batchNode->getTextureAtlas(); + if(!textureAtlas->getTotalQuads()) + return; + + cocos2d::Mat4 matrixMVP = matrixProjection * transform; + pipelineDescriptor.programState->setUniform(_mvpMatrixLocation, matrixMVP.m, sizeof(matrixMVP.m)); + Vec4 textColor(_textColorF.r, _textColorF.g, _textColorF.b, _textColorF.a); + pipelineDescriptor.programState->setUniform(_textColorLocation, &textColor, sizeof(Vec4)); + pipelineDescriptor.programState->setTexture(_textureLocation, 0, textureAtlas->getTexture()->getBackendTexture()); + auto alphaTexture = textureAtlas->getTexture()->getAlphaTexture(); + if(alphaTexture && alphaTexture->getBackendTexture()) + { + pipelineDescriptor.programState->setTexture(_alphaTextureLocation, 1, alphaTexture->getBackendTexture()); + } + updateEffectUniforms(textureAtlas, renderer, transform); + } } } } +void Label::updateBlendState() +{ + backend::BlendDescriptor& blendDescriptor = _customCommand.getPipelineDescriptor().blendDescriptor; + blendDescriptor.blendEnabled = true; + if (_blendFunc == BlendFunc::ALPHA_NON_PREMULTIPLIED) + { + blendDescriptor.sourceRGBBlendFactor = backend::BlendFactor::SRC_ALPHA; + blendDescriptor.destinationRGBBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + blendDescriptor.sourceAlphaBlendFactor = backend::BlendFactor::SRC_ALPHA; + blendDescriptor.destinationAlphaBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + setOpacityModifyRGB(false); + } + else + { + blendDescriptor.sourceRGBBlendFactor = backend::BlendFactor::ONE; + blendDescriptor.destinationRGBBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + blendDescriptor.sourceAlphaBlendFactor = backend::BlendFactor::ONE; + blendDescriptor.destinationAlphaBlendFactor = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + setOpacityModifyRGB(true); + } +} + void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) { if (! _visible || (_utf8Text.empty() && _children.empty()) ) diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index bf451b04e169..a0e1696bea52 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -87,6 +87,7 @@ class Sprite; class SpriteBatchNode; class DrawNode; class EventListenerCustom; +class TextureAtlas; /** * @brief Label is a subclass of Node that knows how to render text labels. @@ -608,13 +609,6 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol virtual void removeChild(Node* child, bool cleanup = true) override; virtual void setGlobalZOrder(float globalZOrder) override; - CC_DEPRECATED_ATTRIBUTE static Label* create(const std::string& text, const std::string& font, float fontSize, - const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT, - TextVAlignment vAlignment = TextVAlignment::TOP); - CC_DEPRECATED_ATTRIBUTE virtual void setFontDefinition(const FontDefinition& textDefinition); - CC_DEPRECATED_ATTRIBUTE FontDefinition getFontDefinition() const { return _getFontDefinition(); } - CC_DEPRECATED_ATTRIBUTE int getCommonLineHeight() const { return (int)getLineHeight();} - CC_CONSTRUCTOR_ACCESS: /** * Constructor of Label. @@ -653,8 +647,6 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol void computeStringNumLines(); - void onDraw(const Mat4& transform, bool transformUpdated); - void onDrawShadow(GLProgram* glProgram, const Color4F& shadowColor); void drawSelf(bool visibleByCamera, Renderer* renderer, uint32_t flags); bool multilineTextWrapByChar(); @@ -694,6 +686,11 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol FontDefinition _getFontDefinition() const; virtual void updateColor() override; + + void setVertexLayout(PipelineDescriptor& vertexLayout); + void updateBlendState(); + void updateEffectUniforms(TextureAtlas* textureAtlas, Renderer *renderer, const Mat4 &transform); + void updateBuffer(TextureAtlas* textureAtlas, CustomCommand& customCommand); LabelType _currentLabelType; bool _contentDirty; @@ -747,6 +744,9 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol QuadCommand _quadCommand; CustomCommand _customCommand; + CustomCommand _customCommandOutLine; + CustomCommand _customCommandShadow; + Mat4 _shadowTransform; GLint _uniformEffectColor; GLint _uniformEffectType; // 0: None, 1: Outline, 2: Shadow; Only used when outline is enabled. @@ -790,6 +790,15 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol bool _boldEnabled; DrawNode* _underlineNode; bool _strikethroughEnabled; + + backend::UniformLocation _mvpMatrixLocation; + backend::UniformLocation _textureLocation; + backend::UniformLocation _alphaTextureLocation; + backend::UniformLocation _textColorLocation; + backend::UniformLocation _effectColorLocation; + backend::UniformLocation _effectTypeLocation; + + backend::ProgramState* _programState = nullptr; private: CC_DISALLOW_COPY_AND_ASSIGN(Label); diff --git a/cocos/2d/CCLabelBMFont.cpp b/cocos/2d/CCLabelBMFont.cpp deleted file mode 100644 index 73cd97ffcb81..000000000000 --- a/cocos/2d/CCLabelBMFont.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/**************************************************************************** -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Zynga Inc. -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Use any of these editors to generate BMFonts: -http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) -http://www.n4te.com/hiero/hiero.jnlp (Free, Java) -http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) -http://www.angelcode.com/products/bmfont/ (Free, Windows only) - -****************************************************************************/ -#include "2d/CCLabelBMFont.h" -#include "base/ccUTF8.h" -#include "2d/CCSprite.h" - -#if CC_LABELBMFONT_DEBUG_DRAW -#include "renderer/CCRenderer.h" -#include "base/CCDirector.h" -#endif - -using namespace std; - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -NS_CC_BEGIN - -LabelBMFont * LabelBMFont::create() -{ - LabelBMFont * pRet = new (std::nothrow) LabelBMFont(); - if (pRet) - { - pRet->autorelease(); - return pRet; - } - CC_SAFE_DELETE(pRet); - return nullptr; -} - -//LabelBMFont - Creation & Init -LabelBMFont *LabelBMFont::create(const std::string& str, const std::string& fntFile, float width /* = 0 */, TextHAlignment alignment /* = TextHAlignment::LEFT */,const Vec2& imageOffset /* = Vec2::ZERO */) -{ - LabelBMFont *ret = new (std::nothrow) LabelBMFont(); - if(ret && ret->initWithString(str, fntFile, width, alignment,imageOffset)) - { - ret->autorelease(); - return ret; - } - CC_SAFE_DELETE(ret); - return nullptr; -} - -bool LabelBMFont::initWithString(const std::string& str, const std::string& fntFile, float width /* = 0 */, TextHAlignment alignment /* = TextHAlignment::LEFT */,const Vec2& imageOffset /* = Vec2::ZERO */) -{ - if (_label->setBMFontFilePath(fntFile,imageOffset)) - { - _fntFile = fntFile; - _label->setMaxLineWidth(width); - _label->setAlignment(alignment); - _label->setString(str); - this->setContentSize(_label->getContentSize()); - return true; - } - - return false; -} - -LabelBMFont::LabelBMFont() -{ - _label = Label::create(); - _label->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT); - this->addChild(_label); - this->setAnchorPoint(Vec2::ANCHOR_MIDDLE); - _cascadeOpacityEnabled = true; - -#if CC_LABELBMFONT_DEBUG_DRAW - _debugDrawNode = DrawNode::create(); - addChild(_debugDrawNode); -#endif -} - -LabelBMFont::~LabelBMFont() -{ - -} - -//LabelBMFont - LabelProtocol protocol -void LabelBMFont::setString(const std::string &newString) -{ - _label->setString(newString); - this->setContentSize(_label->getContentSize()); -} - -const std::string& LabelBMFont::getString() const -{ - return _label->getString(); -} - -/** Override synthesized setOpacity to recurse items */ - -void LabelBMFont::setOpacityModifyRGB(bool var) -{ - _label->setOpacityModifyRGB(var); - for(const auto &child : _children) { - child->setOpacityModifyRGB(var); - } -} -bool LabelBMFont::isOpacityModifyRGB() const -{ - return _label->isOpacityModifyRGB(); -} - -// LabelBMFont - Alignment -void LabelBMFont::setAlignment(TextHAlignment alignment) -{ - _label->setAlignment(alignment); - this->setContentSize(_label->getContentSize()); -} - -void LabelBMFont::setWidth(float width) -{ - _label->setMaxLineWidth(width); - this->setContentSize(_label->getContentSize()); -} - -void LabelBMFont::setLineBreakWithoutSpace( bool breakWithoutSpace ) -{ - _label->setLineBreakWithoutSpace(breakWithoutSpace); - this->setContentSize(_label->getContentSize()); -} - -// LabelBMFont - FntFile -void LabelBMFont::setFntFile(const std::string& fntFile, const Vec2& imageOffset /* = Vec2::ZERO */) -{ - if (_fntFile.compare(fntFile) != 0) - { - _fntFile = fntFile; - _label->setBMFontFilePath(fntFile,imageOffset); - } -} - -const std::string& LabelBMFont::getFntFile() const -{ - return _fntFile; -} - -std::string LabelBMFont::getDescription() const -{ - return StringUtils::format("", _tag, _label->getString().c_str()); -} - -void LabelBMFont::setBlendFunc(const BlendFunc &blendFunc) -{ - _label->setBlendFunc(blendFunc); -} - -const BlendFunc &LabelBMFont::getBlendFunc() const -{ - return _label->getBlendFunc(); -} - -Node* LabelBMFont::getChildByTag(int tag) const -{ - return _label->getLetter(tag); -} - -Sprite* LabelBMFont::getLetter(int ID) -{ - return _label->getLetter(ID); -} - -void LabelBMFont::setColor(const Color3B& color) -{ - _label->setColor(color); -} - -const Size& LabelBMFont::getContentSize() const -{ - const_cast(this)->setContentSize(_label->getContentSize()); - return _contentSize; -} - -Rect LabelBMFont::getBoundingBox() const -{ - return Node::getBoundingBox(); -} -#if CC_LABELBMFONT_DEBUG_DRAW -void LabelBMFont::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) -{ - Node::draw(renderer, transform, _transformUpdated); - - _debugDrawNode->clear(); - auto size = getContentSize(); - Vec2 vertices[4]= - { - Vec2::ZERO, - Vec2(size.width, 0), - Vec2(size.width, size.height), - Vec2(0, size.height) - }; - _debugDrawNode->drawPoly(vertices, 4, true, Color4F(1.0, 1.0, 1.0, 1.0)); -} -#endif - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif - -NS_CC_END diff --git a/cocos/2d/CCLabelBMFont.h b/cocos/2d/CCLabelBMFont.h deleted file mode 100644 index 7bc0adc2b2c2..000000000000 --- a/cocos/2d/CCLabelBMFont.h +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Zynga Inc. -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Use any of these editors to generate BMFonts: - http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) - http://www.n4te.com/hiero/hiero.jnlp (Free, Java) - http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) - http://www.angelcode.com/products/bmfont/ (Free, Windows only) - -****************************************************************************/ -#ifndef __CCBITMAP_FONT_ATLAS_H__ -#define __CCBITMAP_FONT_ATLAS_H__ - -/// @cond DO_NOT_SHOW - -#include "2d/CCLabel.h" -#if CC_LABELBMFONT_DEBUG_DRAW -#include "renderer/CCCustomCommand.h" -#include "2d/CCDrawNode.h" -#endif - -NS_CC_BEGIN - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif -/** @brief LabelBMFont is a subclass of SpriteBatchNode. - -Features: -- Treats each character like a Sprite. This means that each individual character can be: -- rotated -- scaled -- translated -- tinted -- change the opacity -- It can be used as part of a menu item. -- anchorPoint can be used to align the "label" -- Supports AngelCode text format - -Limitations: -- All inner characters are using an anchorPoint of (0.5f, 0.5f) and it is not recommend to change it -because it might affect the rendering - -LabelBMFont implements the protocol LabelProtocol, like Label and LabelAtlas. -LabelBMFont has the flexibility of Label, the speed of LabelAtlas and all the features of Sprite. -If in doubt, use LabelBMFont instead of LabelAtlas / Label. - -Supported editors: -http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) -http://www.n4te.com/hiero/hiero.jnlp (Free, Java) -http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) -http://www.angelcode.com/products/bmfont/ (Free, Windows only) - -@since v0.8 -*/ - -class CC_DLL CC_DEPRECATED_ATTRIBUTE LabelBMFont : public Node, public LabelProtocol, public BlendProtocol -{ -public: - /** - * @js ctor - */ - LabelBMFont(); - /** - * @js NA - * @lua NA - */ - virtual ~LabelBMFont(); - - /** creates a bitmap font atlas with an initial string and the FNT file */ - static LabelBMFont * create(const std::string& str, const std::string& fntFile, float width = 0, TextHAlignment alignment = TextHAlignment::LEFT,const Vec2& imageOffset = Vec2::ZERO); - - /** Creates an label. - */ - static LabelBMFont * create(); - - /** init a bitmap font atlas with an initial string and the FNT file */ - bool initWithString(const std::string& str, const std::string& fntFile, float width = 0, TextHAlignment alignment = TextHAlignment::LEFT,const Vec2& imageOffset = Vec2::ZERO); - - // super method - virtual void setString(const std::string& newString) override; - - virtual const std::string& getString() const override; - - virtual void setAlignment(TextHAlignment alignment); - virtual void setWidth(float width); - virtual void setLineBreakWithoutSpace(bool breakWithoutSpace); - - // RGBAProtocol - virtual bool isOpacityModifyRGB() const override; - virtual void setOpacityModifyRGB(bool isOpacityModifyRGB) override; - - void setFntFile(const std::string& fntFile, const Vec2& imageOffset = Vec2::ZERO); - const std::string& getFntFile() const; - - virtual void setBlendFunc(const BlendFunc &blendFunc) override; - - virtual const BlendFunc &getBlendFunc() const override; - - virtual Sprite * getLetter(int ID); - virtual Node * getChildByTag(int tag) const override; - - virtual void setColor(const Color3B& color) override; - - virtual const Size& getContentSize() const override; - virtual Rect getBoundingBox() const override; - - virtual std::string getDescription() const override; -#if CC_LABELBMFONT_DEBUG_DRAW - virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; -#endif - -private: -#if CC_LABELBMFONT_DEBUG_DRAW - DrawNode *_debugDrawNode; -#endif - - // name of fntFile - std::string _fntFile; - - Label* _label; - -}; - -// end of GUI group -/// @} -/// @} -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif - -NS_CC_END - -/// @endcond -#endif //__CCBITMAP_FONT_ATLAS_H__ diff --git a/cocos/2d/CCLabelTTF.cpp b/cocos/2d/CCLabelTTF.cpp deleted file mode 100644 index 381664a20ee7..000000000000 --- a/cocos/2d/CCLabelTTF.cpp +++ /dev/null @@ -1,296 +0,0 @@ -/**************************************************************************** -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "2d/CCLabelTTF.h" -#include "2d/CCLabel.h" -#include "base/ccUTF8.h" - -NS_CC_BEGIN - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -LabelTTF::LabelTTF() -{ - _renderLabel = Label::create(); - _renderLabel->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT); - this->addChild(_renderLabel); - this->setAnchorPoint(Vec2::ANCHOR_MIDDLE); - - _contentDirty = false; - _cascadeColorEnabled = true; - _cascadeOpacityEnabled = true; -} - -LabelTTF::~LabelTTF() -{ -} - -LabelTTF * LabelTTF::create() -{ - LabelTTF * ret = new (std::nothrow) LabelTTF(); - if (ret) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - return ret; -} - -LabelTTF* LabelTTF::create(const std::string& string, const std::string& fontName, float fontSize, - const Size &dimensions, TextHAlignment hAlignment, - TextVAlignment vAlignment) -{ - LabelTTF *ret = new (std::nothrow) LabelTTF(); - if(ret && ret->initWithString(string, fontName, fontSize, dimensions, hAlignment, vAlignment)) - { - ret->autorelease(); - return ret; - } - CC_SAFE_DELETE(ret); - return nullptr; -} - -LabelTTF * LabelTTF::createWithFontDefinition(const std::string& string, FontDefinition &textDefinition) -{ - LabelTTF *ret = new (std::nothrow) LabelTTF(); - if(ret && ret->initWithStringAndTextDefinition(string, textDefinition)) - { - ret->autorelease(); - return ret; - } - CC_SAFE_DELETE(ret); - return nullptr; -} - -bool LabelTTF::initWithString(const std::string& string, const std::string& fontName, float fontSize, - const cocos2d::Size &dimensions, TextHAlignment hAlignment, - TextVAlignment vAlignment) -{ - _renderLabel->setString(string); - _renderLabel->setSystemFontSize(fontSize); - _renderLabel->setDimensions(dimensions.width,dimensions.height); - _renderLabel->setAlignment(hAlignment,vAlignment); - _renderLabel->setSystemFontName(fontName); - _contentDirty = true; - - return true; -} - -bool LabelTTF::initWithStringAndTextDefinition(const std::string& string, FontDefinition &textDefinition) -{ - _renderLabel->setFontDefinition(textDefinition); - _renderLabel->setString(string); - _contentDirty = true; - - return true; -} - -void LabelTTF::setString(const std::string &string) -{ - _renderLabel->setString(string); - _contentDirty = true; -} - -const std::string& LabelTTF::getString() const -{ - return _renderLabel->getString(); -} - -std::string LabelTTF::getDescription() const -{ - return StringUtils::format("", _renderLabel->getSystemFontName().c_str(), _renderLabel->getSystemFontSize(), _renderLabel->getString().c_str()); -} - -TextHAlignment LabelTTF::getHorizontalAlignment() const -{ - return _renderLabel->getHorizontalAlignment(); -} - -void LabelTTF::setHorizontalAlignment(TextHAlignment alignment) -{ - _renderLabel->setHorizontalAlignment(alignment); - _contentDirty = true; -} - -TextVAlignment LabelTTF::getVerticalAlignment() const -{ - return _renderLabel->getVerticalAlignment(); -} - -void LabelTTF::setVerticalAlignment(TextVAlignment verticalAlignment) -{ - _renderLabel->setVerticalAlignment(verticalAlignment); - _contentDirty = true; -} - -const Size& LabelTTF::getDimensions() const -{ - return _renderLabel->getDimensions(); -} - -void LabelTTF::setDimensions(const Size &dim) -{ - _renderLabel->setDimensions(dim.width,dim.height); - _contentDirty = true; -} - -float LabelTTF::getFontSize() const -{ - return _renderLabel->getSystemFontSize(); -} - -void LabelTTF::setFontSize(float fontSize) -{ - _renderLabel->setSystemFontSize(fontSize); - _contentDirty = true; -} - -const std::string& LabelTTF::getFontName() const -{ - return _renderLabel->getSystemFontName(); -} - -void LabelTTF::setFontName(const std::string& fontName) -{ - _renderLabel->setSystemFontName(fontName); - _contentDirty = true; -} - -void LabelTTF::enableShadow(const Size &shadowOffset, float shadowOpacity, float shadowBlur, bool /*updateTexture*/) -{ - Color4B temp(Color3B::BLACK); - temp.a = 255 * shadowOpacity; - _renderLabel->enableShadow(temp,shadowOffset,shadowBlur); - _contentDirty = true; -} - -void LabelTTF::disableShadow(bool /*updateTexture*/) -{ - _renderLabel->disableEffect(); - _contentDirty = true; -} - -void LabelTTF::enableStroke(const Color3B &strokeColor, float strokeSize, bool /*updateTexture*/) -{ - _renderLabel->enableOutline(Color4B(strokeColor),strokeSize); - _contentDirty = true; -} - -void LabelTTF::disableStroke(bool /*updateTexture*/) -{ - _renderLabel->disableEffect(); - _contentDirty = true; -} - -void LabelTTF::setFontFillColor(const Color3B &tintColor, bool /*updateTexture*/) -{ - _renderLabel->setTextColor(Color4B(tintColor)); -} - -void LabelTTF::setTextDefinition(const FontDefinition& theDefinition) -{ - _renderLabel->setFontDefinition(theDefinition); - _contentDirty = true; -} - -const FontDefinition& LabelTTF::getTextDefinition() -{ - auto fontDef = _renderLabel->getFontDefinition(); - _fontDef = fontDef; - return _fontDef; -} - -void LabelTTF::setBlendFunc(const BlendFunc &blendFunc) -{ - _renderLabel->setBlendFunc(blendFunc); -} - -const BlendFunc &LabelTTF::getBlendFunc() const -{ - return _renderLabel->getBlendFunc(); -} - -void LabelTTF::setFlippedX(bool flippedX) -{ - if (flippedX) - { - _renderLabel->setScaleX(-1.0f); - } - else - { - _renderLabel->setScaleX(1.0f); - } -} - -void LabelTTF::setFlippedY(bool flippedY) -{ - if (flippedY) - { - _renderLabel->setScaleY(-1.0f); - } - else - { - _renderLabel->setScaleY(1.0f); - } -} - -void LabelTTF::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) -{ - if (_contentDirty) - { - this->setContentSize(_renderLabel->getContentSize()); - _contentDirty = false; - } - Node::visit(renderer,parentTransform, parentFlags); -} - -const Size& LabelTTF::getContentSize() const -{ - const_cast(this)->setContentSize(_renderLabel->getContentSize()); - return _contentSize; -} - -Rect LabelTTF::getBoundingBox() const -{ - const_cast(this)->setContentSize(_renderLabel->getContentSize()); - return Node::getBoundingBox(); -} - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif - -NS_CC_END diff --git a/cocos/2d/CCLabelTTF.h b/cocos/2d/CCLabelTTF.h deleted file mode 100644 index fd3e457f2a51..000000000000 --- a/cocos/2d/CCLabelTTF.h +++ /dev/null @@ -1,183 +0,0 @@ -/**************************************************************************** -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCLABELTTF_H__ -#define __CCLABELTTF_H__ - -/// @cond DO_NOT_SHOW - -#include "2d/CCNode.h" - -NS_CC_BEGIN - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -/// @cond - -class Label; - -/** - * @addtogroup _2d - * @{ - */ - -/** @brief LabelTTF is a subclass of TextureNode that knows how to render text labels - * - * All features from TextureNode are valid in LabelTTF - * - * LabelTTF objects are slow. Consider using LabelAtlas or LabelBMFont instead. - * - * Custom ttf file can be put in assets/ or external storage that the Application can access. - * @code - * LabelTTF *label1 = LabelTTF::create("alignment left", "A Damn Mess", fontSize, blockSize, - * TextHAlignment::LEFT, TextVAlignment::CENTER); - * LabelTTF *label2 = LabelTTF::create("alignment right", "/mnt/sdcard/Scissor Cuts.ttf", fontSize, blockSize, - * TextHAlignment::LEFT, TextVAlignment::CENTER); - * @endcode - * - */ -class CC_DLL CC_DEPRECATED_ATTRIBUTE LabelTTF : public Node, public LabelProtocol, public BlendProtocol -{ -public: - /** - * @js ctor - */ - LabelTTF(); - /** - * @js NA - * @lua NA - */ - virtual ~LabelTTF(); - - /** creates a Label from a fontname, alignment, dimension in points and font size in points - @since v2.0.1 - */ - static LabelTTF * create(const std::string& string, const std::string& fontName, float fontSize, - const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::CENTER, - TextVAlignment vAlignment = TextVAlignment::TOP); - - - /** Create a label with string and a font definition*/ - static LabelTTF * createWithFontDefinition(const std::string& string, FontDefinition &textDefinition); - - /** initializes the LabelTTF with a font name, alignment, dimension and font size */ - bool initWithString(const std::string& string, const std::string& fontName, float fontSize, - const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT, - TextVAlignment vAlignment = TextVAlignment::TOP); - - /** initializes the LabelTTF with a font name, alignment, dimension and font size */ - bool initWithStringAndTextDefinition(const std::string& string, FontDefinition &textDefinition); - - /** set the text definition used by this label */ - void setTextDefinition(const FontDefinition& theDefinition); - - /** get the text definition used by this label */ - const FontDefinition& getTextDefinition(); - - - - /** enable or disable shadow for the label */ - void enableShadow(const Size &shadowOffset, float shadowOpacity, float shadowBlur, bool mustUpdateTexture = true); - - /** disable shadow rendering */ - void disableShadow(bool mustUpdateTexture = true); - - /** enable or disable stroke */ - void enableStroke(const Color3B &strokeColor, float strokeSize, bool mustUpdateTexture = true); - - /** disable stroke */ - void disableStroke(bool mustUpdateTexture = true); - - /** set text tinting */ - void setFontFillColor(const Color3B &tintColor, bool mustUpdateTexture = true); - - /** Creates an label. - */ - static LabelTTF * create(); - - /** changes the string to render - * @warning Changing the string is as expensive as creating a new LabelTTF. To obtain better performance use LabelAtlas - */ - virtual void setString(const std::string &label) override; - virtual const std::string& getString(void) const override ; - - TextHAlignment getHorizontalAlignment() const; - void setHorizontalAlignment(TextHAlignment alignment); - - TextVAlignment getVerticalAlignment() const; - void setVerticalAlignment(TextVAlignment verticalAlignment); - - const Size& getDimensions() const; - void setDimensions(const Size &dim); - - float getFontSize() const; - void setFontSize(float fontSize); - - const std::string& getFontName() const; - void setFontName(const std::string& fontName); - - virtual void setBlendFunc(const BlendFunc &blendFunc) override; - - virtual const BlendFunc &getBlendFunc() const override; - - virtual void setFlippedX(bool flippedX); - virtual void setFlippedY(bool flippedY); - - virtual Rect getBoundingBox() const override; - - /** - * @js NA - * @lua NA - */ - virtual std::string getDescription() const override; - virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; - virtual const Size& getContentSize() const override; -protected: - Label* _renderLabel; - bool _contentDirty; - FontDefinition _fontDef; -}; - - -// end of group -/// @} -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif - -NS_CC_END - -/// @endcond -#endif //__CCLABEL_H__ - diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 697b69c6653b..62f5dce81816 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -32,7 +32,6 @@ THE SOFTWARE. #include "base/ccUtils.h" #include "platform/CCDevice.h" #include "renderer/CCRenderer.h" -#include "renderer/CCGLProgramState.h" #include "base/CCDirector.h" #include "base/CCEventDispatcher.h" #include "base/CCEventListenerTouch.h" @@ -42,6 +41,9 @@ THE SOFTWARE. #include "base/CCEventAcceleration.h" #include "base/CCEventListenerAcceleration.h" #include "base/ccUTF8.h" +#include "renderer/backend/Buffer.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) #include "platform/desktop/CCGLViewImpl-desktop.h" @@ -125,147 +127,6 @@ int Layer::executeScriptTouchesHandler(EventTouch::EventCode eventType, const st return 0; } -bool Layer::ccTouchBegan(Touch* /*pTouch*/, Event* /*pEvent*/) {return false;}; -void Layer::ccTouchMoved(Touch* /*pTouch*/, Event* /*pEvent*/) {} -void Layer::ccTouchEnded(Touch* /*pTouch*/, Event* /*pEvent*/) {} -void Layer::ccTouchCancelled(Touch* /*pTouch*/, Event* /*pEvent*/) {} -void Layer::ccTouchesBegan(__Set* /*pTouches*/, Event* /*pEvent*/) {} -void Layer::ccTouchesMoved(__Set* /*pTouches*/, Event* /*pEvent*/) {} -void Layer::ccTouchesEnded(__Set* /*pTouches*/, Event* /*pEvent*/) {} -void Layer::ccTouchesCancelled(__Set* /*pTouches*/, Event* /*pEvent*/) {} - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -/// isTouchEnabled getter -bool Layer::isTouchEnabled() const -{ - return _touchEnabled; -} - -/// isTouchEnabled setter -void Layer::setTouchEnabled(bool enabled) -{ - if (_touchEnabled != enabled) - { - _touchEnabled = enabled; - if (enabled) - { - if (_touchListener != nullptr) - return; - - if( _touchMode == Touch::DispatchMode::ALL_AT_ONCE ) - { - // Register Touch Event - auto listener = EventListenerTouchAllAtOnce::create(); - - listener->onTouchesBegan = CC_CALLBACK_2(Layer::onTouchesBegan, this); - listener->onTouchesMoved = CC_CALLBACK_2(Layer::onTouchesMoved, this); - listener->onTouchesEnded = CC_CALLBACK_2(Layer::onTouchesEnded, this); - listener->onTouchesCancelled = CC_CALLBACK_2(Layer::onTouchesCancelled, this); - - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); - _touchListener = listener; - } - else - { - // Register Touch Event - auto listener = EventListenerTouchOneByOne::create(); - listener->setSwallowTouches(_swallowsTouches); - - listener->onTouchBegan = CC_CALLBACK_2(Layer::onTouchBegan, this); - listener->onTouchMoved = CC_CALLBACK_2(Layer::onTouchMoved, this); - listener->onTouchEnded = CC_CALLBACK_2(Layer::onTouchEnded, this); - listener->onTouchCancelled = CC_CALLBACK_2(Layer::onTouchCancelled, this); - - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); - _touchListener = listener; - } - } - else - { - _eventDispatcher->removeEventListener(_touchListener); - _touchListener = nullptr; - } - } -} - -void Layer::setTouchMode(Touch::DispatchMode mode) -{ - if(_touchMode != mode) - { - _touchMode = mode; - - if( _touchEnabled) - { - setTouchEnabled(false); - setTouchEnabled(true); - } - } -} - -void Layer::setSwallowsTouches(bool swallowsTouches) -{ - if (_swallowsTouches != swallowsTouches) - { - _swallowsTouches = swallowsTouches; - - if( _touchEnabled) - { - setTouchEnabled(false); - setTouchEnabled(true); - } - } -} - -Touch::DispatchMode Layer::getTouchMode() const -{ - return _touchMode; -} - -bool Layer::isSwallowsTouches() const -{ - return _swallowsTouches; -} - -/// isAccelerometerEnabled getter -bool Layer::isAccelerometerEnabled() const -{ - return _accelerometerEnabled; -} -/// isAccelerometerEnabled setter -void Layer::setAccelerometerEnabled(bool enabled) -{ - if (enabled != _accelerometerEnabled) - { - _accelerometerEnabled = enabled; - - Device::setAccelerometerEnabled(enabled); - - _eventDispatcher->removeEventListener(_accelerationListener); - _accelerationListener = nullptr; - - if (enabled) - { - _accelerationListener = EventListenerAcceleration::create(CC_CALLBACK_2(Layer::onAcceleration, this)); - _eventDispatcher->addEventListenerWithSceneGraphPriority(_accelerationListener, this); - } - } -} - -void Layer::setAccelerometerInterval(double interval) { - if (_accelerometerEnabled) - { - if (_running) - { - Device::setAccelerometerInterval(interval); - } - } -} void Layer::onAcceleration(Acceleration* acc, Event* /*unused_event*/) { @@ -299,37 +160,6 @@ void Layer::onKeyReleased(EventKeyboard::KeyCode keyCode, Event* /*unused_event* #endif } -/// isKeyboardEnabled getter -bool Layer::isKeyboardEnabled() const -{ - return _keyboardEnabled; -} -/// isKeyboardEnabled setter -void Layer::setKeyboardEnabled(bool enabled) -{ - if (enabled != _keyboardEnabled) - { - _keyboardEnabled = enabled; - - _eventDispatcher->removeEventListener(_keyboardListener); - _keyboardListener = nullptr; - - if (enabled) - { - auto listener = EventListenerKeyboard::create(); - listener->onKeyPressed = CC_CALLBACK_2(Layer::onKeyPressed, this); - listener->onKeyReleased = CC_CALLBACK_2(Layer::onKeyReleased, this); - - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); - _keyboardListener = listener; - } - } -} - -void Layer::setKeypadEnabled(bool enabled) -{ - setKeyboardEnabled(enabled); -} /// Callbacks bool Layer::onTouchBegan(Touch *touch, Event *event) @@ -450,27 +280,36 @@ std::string Layer::getDescription() const return StringUtils::format("", _tag); } -__LayerRGBA::__LayerRGBA() -{ - CCLOG("LayerRGBA deprecated."); -} - - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif /// LayerColor LayerColor::LayerColor() { // default blend function _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; + + auto& vertexLayout = _customCommand.getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_color", 1, backend::VertexFormat::FLOAT_R32G32B32A32, sizeof(_vertexData[0].vertices), false); + vertexLayout.setLayout(sizeof(_vertexData[0]), backend::VertexStepMode::VERTEX); + + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionColor_vert, positionColor_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + + _customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, 6, CustomCommand::BufferUsage::STATIC); + unsigned short indices[] = {0, 1, 2, 2, 1, 3}; + _customCommand.updateIndexBuffer(indices, sizeof(indices)); + + _customCommand.createVertexBuffer(sizeof(_vertexData[0]), 4, CustomCommand::BufferUsage::DYNAMIC); + + _customCommand.setDrawType(CustomCommand::DrawType::ELEMENT); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); } LayerColor::~LayerColor() { + CC_SAFE_RELEASE(_programState); } /// blendFunc getter @@ -498,7 +337,7 @@ LayerColor* LayerColor::create() return ret; } -LayerColor * LayerColor::create(const Color4B& color, GLfloat width, GLfloat height) +LayerColor * LayerColor::create(const Color4B& color, float width, float height) { LayerColor * layer = new (std::nothrow) LayerColor(); if( layer && layer->initWithColor(color,width,height)) @@ -528,7 +367,7 @@ bool LayerColor::init() return initWithColor(Color4B(0,0,0,0), s.width, s.height); } -bool LayerColor::initWithColor(const Color4B& color, GLfloat w, GLfloat h) +bool LayerColor::initWithColor(const Color4B& color, float w, float h) { if (Layer::init()) { @@ -550,7 +389,6 @@ bool LayerColor::initWithColor(const Color4B& color, GLfloat w, GLfloat h) updateColor(); setContentSize(Size(w, h)); - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_COLOR_NO_MVP)); return true; } return false; @@ -573,87 +411,63 @@ void LayerColor::setContentSize(const Size & size) Layer::setContentSize(size); } -void LayerColor::changeWidthAndHeight(GLfloat w ,GLfloat h) +void LayerColor::changeWidthAndHeight(float w ,float h) { this->setContentSize(Size(w, h)); } -void LayerColor::changeWidth(GLfloat w) +void LayerColor::changeWidth(float w) { this->setContentSize(Size(w, _contentSize.height)); } -void LayerColor::changeHeight(GLfloat h) +void LayerColor::changeHeight(float h) { this->setContentSize(Size(_contentSize.width, h)); } void LayerColor::updateColor() { - for( unsigned int i=0; i < 4; i++ ) + for (int i = 0; i < 4; i++ ) { - _squareColors[i].r = _displayedColor.r / 255.0f; - _squareColors[i].g = _displayedColor.g / 255.0f; - _squareColors[i].b = _displayedColor.b / 255.0f; - _squareColors[i].a = _displayedOpacity / 255.0f; + _vertexData[i].colors.r = _displayedColor.r / 255.0f; + _vertexData[i].colors.g = _displayedColor.g / 255.0f; + _vertexData[i].colors.b = _displayedColor.b / 255.0f; + _vertexData[i].colors.a = _displayedOpacity / 255.0f; } + updateVertexBuffer(); } void LayerColor::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) -{ - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(LayerColor::onDraw, this, transform, flags); +{ + _customCommand.init(_globalZOrder, _blendFunc); renderer->addCommand(&_customCommand); + cocos2d::Mat4 projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + pipelineDescriptor.programState->setUniform(_mvpMatrixLocation, projectionMat.m, sizeof(projectionMat.m)); + for(int i = 0; i < 4; ++i) { Vec4 pos; pos.x = _squareVertices[i].x; pos.y = _squareVertices[i].y; pos.z = _positionZ; pos.w = 1; _modelViewTransform.transformVector(&pos); - _noMVPVertices[i] = Vec3(pos.x,pos.y,pos.z)/pos.w; + _vertexData[i].vertices = Vec3(pos.x,pos.y,pos.z)/pos.w; } + updateVertexBuffer(); } -void LayerColor::onDraw(const Mat4& transform, uint32_t /*flags*/) -{ - getGLProgram()->use(); - getGLProgram()->setUniformsForBuiltins(transform); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - - // - // Attributes - // - glBindBuffer(GL_ARRAY_BUFFER, 0); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _noMVPVertices); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_FLOAT, GL_FALSE, 0, _squareColors); - - utils::setBlending(_blendFunc.src, _blendFunc.dst); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,4); -} - -std::string LayerColor::getDescription() const +void LayerColor::updateVertexBuffer() { - return StringUtils::format("", _tag); + _customCommand.updateVertexBuffer(_vertexData, sizeof(_vertexData)); } // // LayerGradient // LayerGradient::LayerGradient() -: _startColor(Color4B::BLACK) -, _endColor(Color4B::BLACK) -, _startOpacity(255) -, _endOpacity(255) -, _alongVector(Vec2(0, -1)) -, _compressedInterpolation(true) { - } LayerGradient::~LayerGradient() @@ -758,25 +572,25 @@ void LayerGradient::updateColor() ); // (-1, -1) - _squareColors[0].r = E.r + (S.r - E.r) * ((c + u.x + u.y) / (2.0f * c)); - _squareColors[0].g = E.g + (S.g - E.g) * ((c + u.x + u.y) / (2.0f * c)); - _squareColors[0].b = E.b + (S.b - E.b) * ((c + u.x + u.y) / (2.0f * c)); - _squareColors[0].a = E.a + (S.a - E.a) * ((c + u.x + u.y) / (2.0f * c)); - // (1, -1) - _squareColors[1].r = E.r + (S.r - E.r) * ((c - u.x + u.y) / (2.0f * c)); - _squareColors[1].g = E.g + (S.g - E.g) * ((c - u.x + u.y) / (2.0f * c)); - _squareColors[1].b = E.b + (S.b - E.b) * ((c - u.x + u.y) / (2.0f * c)); - _squareColors[1].a = E.a + (S.a - E.a) * ((c - u.x + u.y) / (2.0f * c)); - // (-1, 1) - _squareColors[2].r = E.r + (S.r - E.r) * ((c + u.x - u.y) / (2.0f * c)); - _squareColors[2].g = E.g + (S.g - E.g) * ((c + u.x - u.y) / (2.0f * c)); - _squareColors[2].b = E.b + (S.b - E.b) * ((c + u.x - u.y) / (2.0f * c)); - _squareColors[2].a = E.a + (S.a - E.a) * ((c + u.x - u.y) / (2.0f * c)); - // (1, 1) - _squareColors[3].r = E.r + (S.r - E.r) * ((c - u.x - u.y) / (2.0f * c)); - _squareColors[3].g = E.g + (S.g - E.g) * ((c - u.x - u.y) / (2.0f * c)); - _squareColors[3].b = E.b + (S.b - E.b) * ((c - u.x - u.y) / (2.0f * c)); - _squareColors[3].a = E.a + (S.a - E.a) * ((c - u.x - u.y) / (2.0f * c)); + _vertexData[0].colors.r = E.r + (S.r - E.r) * ((c + u.x + u.y) / (2.0f * c)); + _vertexData[0].colors.g = E.g + (S.g - E.g) * ((c + u.x + u.y) / (2.0f * c)); + _vertexData[0].colors.b = E.b + (S.b - E.b) * ((c + u.x + u.y) / (2.0f * c)); + _vertexData[0].colors.a = E.a + (S.a - E.a) * ((c + u.x + u.y) / (2.0f * c)); + // (1, -1) + _vertexData[1].colors.r = E.r + (S.r - E.r) * ((c - u.x + u.y) / (2.0f * c)); + _vertexData[1].colors.g = E.g + (S.g - E.g) * ((c - u.x + u.y) / (2.0f * c)); + _vertexData[1].colors.b = E.b + (S.b - E.b) * ((c - u.x + u.y) / (2.0f * c)); + _vertexData[1].colors.a = E.a + (S.a - E.a) * ((c - u.x + u.y) / (2.0f * c)); + // (-1, 1) + _vertexData[2].colors.r = E.r + (S.r - E.r) * ((c + u.x - u.y) / (2.0f * c)); + _vertexData[2].colors.g = E.g + (S.g - E.g) * ((c + u.x - u.y) / (2.0f * c)); + _vertexData[2].colors.b = E.b + (S.b - E.b) * ((c + u.x - u.y) / (2.0f * c)); + _vertexData[2].colors.a = E.a + (S.a - E.a) * ((c + u.x - u.y) / (2.0f * c)); + // (1, 1) + _vertexData[3].colors.r = E.r + (S.r - E.r) * ((c - u.x - u.y) / (2.0f * c)); + _vertexData[3].colors.g = E.g + (S.g - E.g) * ((c - u.x - u.y) / (2.0f * c)); + _vertexData[3].colors.b = E.b + (S.b - E.b) * ((c - u.x - u.y) / (2.0f * c)); + _vertexData[3].colors.a = E.a + (S.a - E.a) * ((c - u.x - u.y) / (2.0f * c)); } const Color3B& LayerGradient::getStartColor() const @@ -800,24 +614,24 @@ const Color3B& LayerGradient::getEndColor() const return _endColor; } -void LayerGradient::setStartOpacity(GLubyte o) +void LayerGradient::setStartOpacity(uint8_t o) { _startOpacity = o; updateColor(); } -GLubyte LayerGradient::getStartOpacity() const +uint8_t LayerGradient::getStartOpacity() const { return _startOpacity; } -void LayerGradient::setEndOpacity(GLubyte o) +void LayerGradient::setEndOpacity(uint8_t o) { _endOpacity = o; updateColor(); } -GLubyte LayerGradient::getEndOpacity() const +uint8_t LayerGradient::getEndOpacity() const { return _endOpacity; } @@ -879,23 +693,30 @@ LayerRadialGradient* LayerRadialGradient::create() } LayerRadialGradient::LayerRadialGradient() -: _startColor(Color4B::BLACK) -, _startColorRend(Color4F::BLACK) -, _endColor(Color4B::BLACK) -, _endColorRend(Color4F::BLACK) -, _center(Vec2(0,0)) -, _radius(0.f) -, _expand(0.f) -, _uniformLocationStartColor(0) -, _uniformLocationEndColor(0) -, _uniformLocationCenter(0) -, _uniformLocationRadius(0) -, _uniformLocationExpand(0) -, _blendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED) -{ } +{ + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(position_vert, layer_radialGradient_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _startColorLocation = pipelineDescriptor.programState->getUniformLocation("u_startColor"); + _endColorLocation = pipelineDescriptor.programState->getUniformLocation("u_endColor"); + _centerLocation = pipelineDescriptor.programState->getUniformLocation("u_center"); + _radiusLocation = pipelineDescriptor.programState->getUniformLocation("u_radius"); + _expandLocation = pipelineDescriptor.programState->getUniformLocation("u_expand"); + + auto& vertexLayout = _customCommand.getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32, 0, false); + vertexLayout.setLayout(sizeof(_vertices[0]), backend::VertexStepMode::VERTEX); + + _customCommand.createVertexBuffer(sizeof(_vertices[0]), sizeof(_vertices) / sizeof(_vertices[0]), CustomCommand::BufferUsage::STATIC); + _customCommand.setDrawType(CustomCommand::DrawType::ARRAY); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE_STRIP); +} LayerRadialGradient::~LayerRadialGradient() -{} +{ + CC_SAFE_RELEASE(_programState); +} bool LayerRadialGradient::initWithColor(const cocos2d::Color4B &startColor, const cocos2d::Color4B &endColor, float radius, const Vec2& center, float expand) { @@ -916,14 +737,6 @@ bool LayerRadialGradient::initWithColor(const cocos2d::Color4B &startColor, cons setRadius(radius); setCenter(center); - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_LAYER_RADIAL_GRADIENT)); - auto program = getGLProgram(); - _uniformLocationStartColor = program->getUniformLocation("u_startColor"); - _uniformLocationEndColor = program->getUniformLocation("u_endColor"); - _uniformLocationExpand = program->getUniformLocation("u_expand"); - _uniformLocationRadius = program->getUniformLocation("u_radius"); - _uniformLocationCenter = program->getUniformLocation("u_center"); - return true; } @@ -932,38 +745,19 @@ bool LayerRadialGradient::initWithColor(const cocos2d::Color4B &startColor, cons void LayerRadialGradient::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(LayerRadialGradient::onDraw, this, transform, flags); + _customCommand.init(_globalZOrder, _blendFunc); renderer->addCommand(&_customCommand); -} -void LayerRadialGradient::onDraw(const Mat4& transform, uint32_t /*flags*/) -{ - auto program = getGLProgram(); - program->use(); - program->setUniformsForBuiltins(transform); - program->setUniformLocationWith4f(_uniformLocationStartColor, _startColorRend.r, - _startColorRend.g, _startColorRend.b, _startColorRend.a); - program->setUniformLocationWith4f(_uniformLocationEndColor, _endColorRend.r, - _endColorRend.g, _endColorRend.b, _endColorRend.a); - program->setUniformLocationWith2f(_uniformLocationCenter, _center.x, _center.y); - program->setUniformLocationWith1f(_uniformLocationRadius, _radius); - program->setUniformLocationWith1f(_uniformLocationExpand, _expand); - - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - - // - // Attributes - // - glBindBuffer(GL_ARRAY_BUFFER, 0); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, _vertices); - - utils::setBlending(_blendFunc.src, _blendFunc.dst); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,4); + const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto programState = _customCommand.getPipelineDescriptor().programState; + Mat4 finalMat = projectionMat * transform; + programState->setUniform(_mvpMatrixLocation, finalMat.m, sizeof(finalMat.m)); + + programState->setUniform(_startColorLocation, &_startColorRend, sizeof(_startColorRend)); + programState->setUniform(_endColorLocation, &_endColorRend, sizeof(_endColorRend)); + programState->setUniform(_centerLocation, &_center, sizeof(_center)); + programState->setUniform(_radiusLocation, &_radius, sizeof(_radius)); + programState->setUniform(_expandLocation, &_expand, sizeof(_expand)); } void LayerRadialGradient::setContentSize(const Size& size) @@ -973,6 +767,8 @@ void LayerRadialGradient::setContentSize(const Size& size) _vertices[3].x = size.width; _vertices[3].y = size.height; Layer::setContentSize(size); + + _customCommand.updateVertexBuffer(_vertices, sizeof(_vertices)); } void LayerRadialGradient::setStartOpacity(GLubyte opacity) @@ -981,18 +777,18 @@ void LayerRadialGradient::setStartOpacity(GLubyte opacity) _startColor.a = opacity; } -GLubyte LayerRadialGradient::getStartOpacity() const +uint8_t LayerRadialGradient::getStartOpacity() const { return _startColor.a; } -void LayerRadialGradient::setEndOpacity(GLubyte opacity) +void LayerRadialGradient::setEndOpacity(uint8_t opacity) { _endColorRend.a = opacity / 255.0f; _endColor.a = opacity; } -GLubyte LayerRadialGradient::getEndOpacity() const +uint8_t LayerRadialGradient::getEndOpacity() const { return _endColor.a; } @@ -1102,24 +898,6 @@ LayerMultiplex::~LayerMultiplex() } } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -LayerMultiplex * LayerMultiplex::createVariadic(Layer * layer, ...) -{ - va_list args; - va_start(args,layer); - - LayerMultiplex * multiplexLayer = new (std::nothrow) LayerMultiplex(); - if(multiplexLayer && multiplexLayer->initWithLayers(layer, args)) - { - multiplexLayer->autorelease(); - va_end(args); - return multiplexLayer; - } - va_end(args); - CC_SAFE_DELETE(multiplexLayer); - return nullptr; -} -#else LayerMultiplex * LayerMultiplex::create(Layer * layer, ...) { va_list args; @@ -1136,7 +914,6 @@ LayerMultiplex * LayerMultiplex::create(Layer * layer, ...) CC_SAFE_DELETE(multiplexLayer); return nullptr; } -#endif LayerMultiplex * LayerMultiplex::createWithLayer(Layer* layer) { diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 8123b8b7255a..cc7721615290 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -25,14 +25,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCLAYER_H__ -#define __CCLAYER_H__ +#pragma once #include "2d/CCNode.h" #include "base/CCProtocols.h" #include "renderer/CCCustomCommand.h" +#include NS_CC_BEGIN @@ -68,17 +67,6 @@ class CC_DLL Layer : public Node * @return An autoreleased Layer object. */ static Layer *create(); - - // Deprecated touch callbacks. - CC_DEPRECATED_ATTRIBUTE virtual bool ccTouchBegan(Touch *pTouch, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchMoved(Touch *pTouch, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchEnded(Touch *pTouch, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchCancelled(Touch *pTouch, Event *pEvent) final; - - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesBegan(__Set *pTouches, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesMoved(__Set *pTouches, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(__Set *pTouches, Event *pEvent) final; - CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(__Set *pTouches, Event *pEvent) final; /* Callback function should not be deprecated, it will generate lots of warnings. Since 'setTouchEnabled' was deprecated, it will make warnings if developer overrides onTouchXXX and invokes setTouchEnabled(true) instead of using EventDispatcher::addEventListenerWithXXX. @@ -141,11 +129,6 @@ class CC_DLL Layer : public Node * @js NA */ virtual void onTouchesCancelled(const std::vector&touches, Event *unused_event); - /** - @deprecated Please override onAcceleration - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void didAccelerate(Acceleration* /*accelerationValue*/) final {}; /* Callback function should not be deprecated, it will generate lots of warnings. Since 'setAccelerometerEnabled' was deprecated, it will make warnings if developer overrides onAcceleration and invokes setAccelerometerEnabled(true) instead of using EventDispatcher::addEventListenerWithXXX. @@ -157,67 +140,6 @@ class CC_DLL Layer : public Node */ virtual void onAcceleration(Acceleration* acc, Event* unused_event); - /** If isTouchEnabled, this method is called onEnter. Override it to change the - way Layer receives touch events. - ( Default: TouchDispatcher::sharedDispatcher()->addStandardDelegate(this,0); ) - Example: - void Layer::registerWithTouchDispatcher() - { - TouchDispatcher::sharedDispatcher()->addTargetedDelegate(this,INT_MIN+1,true); - } - @since v0.8.0 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void registerWithTouchDispatcher() final {}; - - /** whether or not it will receive Touch events. - You can enable / disable touch events with this property. - Only the touches of this node will be affected. This "method" is not propagated to it's children. - @since v0.8.1 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE bool isTouchEnabled() const; - CC_DEPRECATED_ATTRIBUTE void setTouchEnabled(bool value); - - CC_DEPRECATED_ATTRIBUTE virtual void setTouchMode(Touch::DispatchMode mode); - CC_DEPRECATED_ATTRIBUTE virtual Touch::DispatchMode getTouchMode() const; - - /** - swallowsTouches of the touch events. Default is true - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void setSwallowsTouches(bool swallowsTouches); - CC_DEPRECATED_ATTRIBUTE virtual bool isSwallowsTouches() const; - - /** whether or not it will receive Accelerometer events - You can enable / disable accelerometer events with this property. - @since v0.8.1 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual bool isAccelerometerEnabled() const; - CC_DEPRECATED_ATTRIBUTE virtual void setAccelerometerEnabled(bool value); - CC_DEPRECATED_ATTRIBUTE virtual void setAccelerometerInterval(double interval); - - /** whether or not it will receive keyboard or keypad events - You can enable / disable accelerometer events with this property. - it's new in cocos2d-x - @js NA - */ - - CC_DEPRECATED_ATTRIBUTE virtual bool isKeyboardEnabled() const; - CC_DEPRECATED_ATTRIBUTE virtual void setKeyboardEnabled(bool value); - - /** - Please use onKeyPressed instead. - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void keyPressed(int /*keyCode*/) final {}; - - /** - Please use onKeyReleased instead. - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void keyReleased(int /*keyCode*/) final {}; /* Callback function should not be deprecated, it will generate lots of warnings. Since 'setKeyboardEnabled' was deprecated, it will make warnings if developer overrides onKeyXXX and invokes setKeyboardEnabled(true) instead of using EventDispatcher::addEventListenerWithXXX. @@ -235,16 +157,6 @@ class CC_DLL Layer : public Node */ virtual void onKeyReleased(EventKeyboard::KeyCode keyCode, Event* event); - CC_DEPRECATED_ATTRIBUTE virtual bool isKeypadEnabled() const final { return _keyboardEnabled; } - CC_DEPRECATED_ATTRIBUTE virtual void setKeypadEnabled(bool value); - - /** - @deprecated Please override onKeyReleased and check the keycode of KeyboardEvent::KeyCode::Menu(KEY_BACKSPACE) instead. - @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual void keyBackClicked() final {}; - CC_DEPRECATED_ATTRIBUTE virtual void keyMenuClicked() final {}; - // Overrides virtual std::string getDescription() const override; @@ -255,12 +167,9 @@ class CC_DLL Layer : public Node virtual bool init() override; protected: - //add the api for avoid use deprecated api - CC_DEPRECATED_ATTRIBUTE void _addTouchListener() {} - - CC_DEPRECATED_ATTRIBUTE void addTouchListener() {} - CC_DEPRECATED_ATTRIBUTE int executeScriptTouchHandler(EventTouch::EventCode eventType, Touch* touch, Event* event); - CC_DEPRECATED_ATTRIBUTE int executeScriptTouchesHandler(EventTouch::EventCode eventType, const std::vector& touches, Event* event); + + int executeScriptTouchHandler(EventTouch::EventCode eventType, Touch* touch, Event* event); + int executeScriptTouchesHandler(EventTouch::EventCode eventType, const std::vector& touches, Event* event); bool _touchEnabled; bool _accelerometerEnabled; @@ -277,50 +186,6 @@ class CC_DLL Layer : public Node }; - -/** @class __LayerRGBA - * @brief LayerRGBA is a subclass of Layer that implements the RGBAProtocol protocol using a solid color as the background. - - All features from Layer are valid, plus the following new features that propagate into children that conform to the RGBAProtocol: - - opacity - - RGB colors - @since 2.1 - @js NA - */ -class CC_DLL __LayerRGBA : public Layer, public __RGBAProtocol -{ -public: - CREATE_FUNC(__LayerRGBA); - - - // - // Overrides - // - virtual GLubyte getOpacity() const override { return Layer::getOpacity(); } - virtual GLubyte getDisplayedOpacity() const override { return Layer::getDisplayedOpacity(); } - virtual void setOpacity(GLubyte opacity) override { Layer::setOpacity(opacity); } - virtual void updateDisplayedOpacity(GLubyte parentOpacity) override { Layer::updateDisplayedOpacity(parentOpacity); } - virtual bool isCascadeOpacityEnabled() const override { return Layer::isCascadeOpacityEnabled(); } - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled) override { Layer::setCascadeOpacityEnabled(cascadeOpacityEnabled); } - - virtual const Color3B& getColor() const override { return Layer::getColor(); } - virtual const Color3B& getDisplayedColor() const override { return Layer::getDisplayedColor(); } - virtual void setColor(const Color3B& color) override { Layer::setColor(color); } - virtual void updateDisplayedColor(const Color3B& parentColor) override { Layer::updateDisplayedColor(parentColor); } - virtual bool isCascadeColorEnabled() const override { return Layer::isCascadeOpacityEnabled(); } - virtual void setCascadeColorEnabled(bool cascadeColorEnabled) override { Layer::setCascadeColorEnabled(cascadeColorEnabled); } - - virtual void setOpacityModifyRGB(bool bValue) override { Layer::setOpacityModifyRGB(bValue); } - virtual bool isOpacityModifyRGB() const override { return Layer::isOpacityModifyRGB(); } - -CC_CONSTRUCTOR_ACCESS: - __LayerRGBA(); - virtual ~__LayerRGBA() {} - -private: - CC_DISALLOW_COPY_AND_ASSIGN(__LayerRGBA); -}; - // // LayerColor // @@ -334,6 +199,7 @@ All features from Layer are valid, plus the following new features: class CC_DLL LayerColor : public Layer, public BlendProtocol { public: + /** Creates a fullscreen black layer. * * @return An autoreleased LayerColor object. @@ -346,7 +212,7 @@ class CC_DLL LayerColor : public Layer, public BlendProtocol * @param height The height of layer. * @return An autoreleased LayerColor object. */ - static LayerColor * create(const Color4B& color, GLfloat width, GLfloat height); + static LayerColor * create(const Color4B& color, float width, float height); /** Creates a Layer with color. Width and height are the window size. * * @param color The color of layer. @@ -358,19 +224,19 @@ class CC_DLL LayerColor : public Layer, public BlendProtocol * * @param w The width of layer. */ - void changeWidth(GLfloat w); + void changeWidth(float w); /** Change height in Points. * * @param h The height of layer. */ - void changeHeight(GLfloat h); + void changeHeight(float h); /** Change width and height in Points. * * @param w The width of layer. * @param h The Height of layer. @since v0.8 */ - void changeWidthAndHeight(GLfloat w ,GLfloat h); + void changeWidthAndHeight(float w, float h); // // Overrides @@ -391,27 +257,28 @@ class CC_DLL LayerColor : public Layer, public BlendProtocol *@endcode */ virtual void setBlendFunc(const BlendFunc& blendFunc) override; - - virtual std::string getDescription() const override; CC_CONSTRUCTOR_ACCESS: LayerColor(); virtual ~LayerColor(); bool init() override; - bool initWithColor(const Color4B& color, GLfloat width, GLfloat height); + bool initWithColor(const Color4B& color, float width, float height); bool initWithColor(const Color4B& color); protected: - void onDraw(const Mat4& transform, uint32_t flags); virtual void updateColor() override; + void updateVertexBuffer(); BlendFunc _blendFunc; Vec2 _squareVertices[4]; - Color4F _squareColors[4]; CustomCommand _customCommand; - Vec3 _noMVPVertices[4]; + + V3F_C4F _vertexData[4]; + + backend::UniformLocation _mvpMatrixLocation; + backend::ProgramState* _programState = nullptr; private: CC_DISALLOW_COPY_AND_ASSIGN(LayerColor); @@ -504,23 +371,23 @@ class CC_DLL LayerGradient : public LayerColor * * @param startOpacity The start opacity, from 0 to 255. */ - void setStartOpacity( GLubyte startOpacity ); + void setStartOpacity(uint8_t startOpacity ); /** Returns the start opacity of the gradient. * * @return The start opacity. */ - GLubyte getStartOpacity() const; + uint8_t getStartOpacity() const; /** Returns the end opacity of the gradient. * * @param endOpacity The end opacity, from 0 to 255. */ - void setEndOpacity( GLubyte endOpacity ); + void setEndOpacity(uint8_t endOpacity ); /** Returns the end opacity of the gradient. * * @return The end opacity. */ - GLubyte getEndOpacity() const; + uint8_t getEndOpacity() const; /** Sets the directional vector that will be used for the gradient. The default value is vertical direction (0,-1). @@ -556,12 +423,12 @@ class CC_DLL LayerGradient : public LayerColor protected: virtual void updateColor() override; - Color3B _startColor; - Color3B _endColor; - GLubyte _startOpacity; - GLubyte _endOpacity; - Vec2 _alongVector; - bool _compressedInterpolation; + Color3B _startColor = Color3B::BLACK; + Color3B _endColor = Color3B::BLACK; + uint8_t _startOpacity = 255; + uint8_t _endOpacity = 255; + Vec2 _alongVector = {0, -1}; + bool _compressedInterpolation = true; }; @@ -589,11 +456,11 @@ class CC_DLL LayerRadialGradient : public Layer virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; virtual void setContentSize(const Size& size) override; - void setStartOpacity(GLubyte opacity); - GLubyte getStartOpacity() const; + void setStartOpacity(uint8_t opacity); + uint8_t getStartOpacity() const; - void setEndOpacity(GLubyte opacity); - GLubyte getEndOpacity() const; + void setEndOpacity(uint8_t opacity); + uint8_t getEndOpacity() const; void setRadius(float radius); float getRadius() const; @@ -623,32 +490,30 @@ class CC_DLL LayerRadialGradient : public Layer bool initWithColor(const Color4B& startColor, const Color4B& endColor, float radius, const Vec2& center, float expand); -protected: - void onDraw(const Mat4& transform, uint32_t flags); - - private: void convertColor4B24F(Color4F& outColor, const Color4B& inColor); - Color4B _startColor; - Color4F _startColorRend; // start color used in shader - - Color4B _endColor; - Color4F _endColorRend; // end color used in shader + Color4B _startColor = Color4B::BLACK; + Color4F _startColorRend = Color4F::BLACK; // start color used in shader - Vec2 _center; - float _radius; - float _expand; + Color4B _endColor = Color4B::BLACK; + Color4F _endColorRend = Color4F::BLACK; // end color used in shader + Vec2 _vertices[4]; + Vec2 _center; + float _radius = 0.f; + float _expand = 0.f; CustomCommand _customCommand; - GLint _uniformLocationStartColor; - GLint _uniformLocationEndColor; - GLint _uniformLocationCenter; - GLint _uniformLocationRadius; - GLint _uniformLocationExpand; + BlendFunc _blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED; - BlendFunc _blendFunc; + backend::UniformLocation _mvpMatrixLocation; + backend::UniformLocation _startColorLocation; + backend::UniformLocation _endColorLocation; + backend::UniformLocation _centerLocation; + backend::UniformLocation _radiusLocation; + backend::UniformLocation _expandLocation; + backend::ProgramState* _programState = nullptr; }; @@ -684,25 +549,7 @@ class CC_DLL LayerMultiplex : public Layer * In lua:local create(...) * @endcode */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported - typedef Layer* M; - static LayerMultiplex* create(M m1, std::nullptr_t listEnd) { return createVariadic(m1, NULL); } - static LayerMultiplex* create(M m1, M m2, std::nullptr_t listEnd) { return createVariadic(m1, m2, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, m6, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, m6, m7, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static LayerMultiplex* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return createVariadic(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for variable argument lists longer than 10 items, use createWithArray or createVariadic with NULL as the last argument - static LayerMultiplex* createVariadic(Layer* item, ...) CC_REQUIRES_NULL_TERMINATION; -#else static LayerMultiplex * create(Layer* layer, ... ); -#endif /** Creates a LayerMultiplex with one layer. * Lua script can not init with undetermined number of variables @@ -776,6 +623,3 @@ class CC_DLL LayerMultiplex : public Layer /// @} NS_CC_END - -#endif // __CCLAYER_H__ - diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index c59d559c3613..744f65d11162 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -59,21 +59,6 @@ Menu* Menu::create() return Menu::create(nullptr, nullptr); } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Menu * Menu::variadicCreate(MenuItem* item, ...) -{ - va_list args; - va_start(args,item); - - Menu *ret = Menu::createWithItems(item, args); - - va_end(args); - - return ret; -} -#else - - Menu * Menu::create(MenuItem* item, ...) { va_list args; @@ -85,8 +70,6 @@ Menu * Menu::create(MenuItem* item, ...) return ret; } -#endif - Menu* Menu::createWithArray(const Vector& arrayOfItems) { diff --git a/cocos/2d/CCMenu.h b/cocos/2d/CCMenu.h index d79ff0a24fa7..5e33503aba66 100644 --- a/cocos/2d/CCMenu.h +++ b/cocos/2d/CCMenu.h @@ -64,26 +64,8 @@ class CC_DLL Menu : public Layer */ static Menu* create(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. - typedef MenuItem* M; - static Menu* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } - static Menu* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } - static Menu* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static Menu* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for lists longer than 10 items, use createWithArray or variadicCreate with NULL as the last argument. - static Menu* variadicCreate(MenuItem* item, ...); -#else /** Creates a Menu with MenuItem objects. */ static Menu* create(MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION; -#endif /** * Creates a Menu with a Array of MenuItem objects. diff --git a/cocos/2d/CCMenuItem.cpp b/cocos/2d/CCMenuItem.cpp index 1e74cf151b6d..4e805db9595d 100644 --- a/cocos/2d/CCMenuItem.cpp +++ b/cocos/2d/CCMenuItem.cpp @@ -51,15 +51,6 @@ MenuItem* MenuItem::create() return MenuItem::create((const ccMenuCallback&)nullptr); } -// FIXME: deprecated -MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector) -{ - MenuItem *ret = new (std::nothrow) MenuItem(); - ret->initWithCallback(std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); - return ret; -} - MenuItem* MenuItem::create( const ccMenuCallback& callback) { MenuItem *ret = new (std::nothrow) MenuItem(); @@ -68,12 +59,6 @@ MenuItem* MenuItem::create( const ccMenuCallback& callback) return ret; } -// FIXME: deprecated -bool MenuItem::initWithTarget(cocos2d::Ref *target, SEL_MenuHandler selector ) -{ - return initWithCallback( std::bind(selector,target, std::placeholders::_1) ); -} - bool MenuItem::initWithCallback(const ccMenuCallback& callback) { setAnchorPoint(Vec2(0.5f, 0.5f)); @@ -138,12 +123,6 @@ bool MenuItem::isSelected() const return _selected; } -// FIXME: deprecated -void MenuItem::setTarget(Ref *target, SEL_MenuHandler selector) -{ - setCallback( std::bind( selector, target, std::placeholders::_1) ); -} - void MenuItem::setCallback(const ccMenuCallback& callback) { _callback = callback; @@ -175,15 +154,6 @@ void MenuItemLabel::setLabel(Node* var) _label = var; } -// FIXME:: deprecated -MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector) -{ - MenuItemLabel *ret = new (std::nothrow) MenuItemLabel(); - ret->initWithLabel(label, std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); - return ret; -} - MenuItemLabel * MenuItemLabel::create(Node*label, const ccMenuCallback& callback) { MenuItemLabel *ret = new (std::nothrow) MenuItemLabel(); @@ -200,12 +170,6 @@ MenuItemLabel* MenuItemLabel::create(Node *label) return ret; } -// FIXME:: deprecated -bool MenuItemLabel::initWithLabel(Node* label, Ref* target, SEL_MenuHandler selector) -{ - return initWithLabel(label, std::bind(selector,target, std::placeholders::_1) ); -} - bool MenuItemLabel::initWithLabel(Node* label, const ccMenuCallback& callback) { MenuItem::initWithCallback(callback); @@ -309,15 +273,6 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st return MenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)nullptr); } -// FIXME:: deprecated -MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) -{ - MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont(); - ret->initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); - return ret; -} - MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback& callback) { MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont(); @@ -326,12 +281,6 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st return ret; } -// FIXME:: deprecated -bool MenuItemAtlasFont::initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) -{ - return initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, std::bind(selector,target, std::placeholders::_1) ); -} - bool MenuItemAtlasFont::initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback& callback) { CCASSERT( value.size() != 0, "value length must be greater than 0"); @@ -373,15 +322,6 @@ const std::string& MenuItemFont::getFontName() return _globalFontName; } -// FIXME:: deprecated -MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_MenuHandler selector) -{ - MenuItemFont *ret = new (std::nothrow) MenuItemFont(); - ret->initWithString(value, std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); - return ret; -} - MenuItemFont * MenuItemFont::create(const std::string& value, const ccMenuCallback& callback) { MenuItemFont *ret = new (std::nothrow) MenuItemFont(); @@ -408,14 +348,6 @@ MenuItemFont::~MenuItemFont() CCLOGINFO("In the destructor of MenuItemFont (%p).", this); } -// FIXME:: deprecated -bool MenuItemFont::initWithString(const std::string& value, Ref* target, SEL_MenuHandler selector) -{ - CCASSERT( !value.empty(), "Value length must be greater than 0"); - - return initWithString(value, std::bind(selector,target, std::placeholders::_1) ); -} - bool MenuItemFont::initWithString(const std::string& value, const ccMenuCallback& callback) { CCASSERT( !value.empty(), "Value length must be greater than 0"); @@ -532,26 +464,11 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite return MenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)nullptr); } -// FIXME: deprecated -MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector) -{ - return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, std::bind(selector, target, std::placeholders::_1)); -} - MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite, const ccMenuCallback& callback) { return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, callback); } -// FIXME: deprecated -MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, Ref *target, SEL_MenuHandler selector) -{ - MenuItemSprite *ret = new (std::nothrow) MenuItemSprite(); - ret->initWithNormalSprite(normalSprite, selectedSprite, disabledSprite, std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); - return ret; -} - MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, const ccMenuCallback& callback) { MenuItemSprite *ret = new (std::nothrow) MenuItemSprite(); @@ -560,12 +477,6 @@ MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite return ret; } -// FIXME: deprecated -bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector) -{ - return initWithNormalSprite(normalSprite, selectedSprite, disabledSprite, std::bind(selector,target, std::placeholders::_1) ); -} - bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, const ccMenuCallback& callback) { MenuItem::initWithCallback(callback); @@ -677,30 +588,11 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std: return MenuItemImage::create(normalImage, selectedImage, "", (const ccMenuCallback&)nullptr); } -// FIXME: deprecated -MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, Ref* target, SEL_MenuHandler selector) -{ - return MenuItemImage::create(normalImage, selectedImage, "", std::bind(selector, target, std::placeholders::_1)); -} - MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const ccMenuCallback& callback) { return MenuItemImage::create(normalImage, selectedImage, "", callback); } -// FIXME: deprecated -MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) -{ - MenuItemImage *ret = new (std::nothrow) MenuItemImage(); - if (ret && ret->initWithNormalImage(normalImage, selectedImage, disabledImage, std::bind(selector, target, std::placeholders::_1))) - { - ret->autorelease(); - return ret; - } - CC_SAFE_DELETE(ret); - return nullptr; -} - MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, const ccMenuCallback& callback) { MenuItemImage *ret = new (std::nothrow) MenuItemImage(); @@ -725,11 +617,6 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std: return nullptr; } -// FIXME:: deprecated -bool MenuItemImage::initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) -{ - return initWithNormalImage(normalImage, selectedImage, disabledImage, std::bind(selector,target, std::placeholders::_1) ); -} bool MenuItemImage::initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, const ccMenuCallback& callback) { Node *normalSprite = nullptr; @@ -775,31 +662,6 @@ void MenuItemImage::setDisabledSpriteFrame(SpriteFrame * frame) // MenuItemToggle // -// FIXME:: deprecated -MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector& menuItems) -{ - MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); - ret->MenuItem::initWithCallback(std::bind(selector, target, std::placeholders::_1)); - ret->autorelease(); -#if CC_ENABLE_GC_FOR_NATIVE_OBJECTS - auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine(); - if (sEngine) - { - for (const auto &item : menuItems) - { - if (item) - { - sEngine->retainScriptObject(ret, item); - } - } - } -#endif // CC_ENABLE_GC_FOR_NATIVE_OBJECTS - ret->_subItems = menuItems; - ret->_selectedIndex = UINT_MAX; - ret->setSelectedIndex(0); - return ret; -} - MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, const Vector& menuItems) { MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); @@ -824,30 +686,6 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba return ret; } -// FIXME:: deprecated -MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, ...) -{ - va_list args; - va_start(args, item); - MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); - ret->initWithCallback(std::bind(selector, target, std::placeholders::_1), item, args); - ret->autorelease(); - va_end(args); - return ret; -} - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -MenuItemToggle * MenuItemToggle::createWithCallbackVA(const ccMenuCallback &callback, MenuItem* item, ...) -{ - va_list args; - va_start(args, item); - MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); - ret->initWithCallback(callback, item, args); - ret->autorelease(); - va_end(args); - return ret; -} -#else MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, MenuItem* item, ...) { va_list args; @@ -858,7 +696,6 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba va_end(args); return ret; } -#endif MenuItemToggle * MenuItemToggle::create() { @@ -868,12 +705,6 @@ MenuItemToggle * MenuItemToggle::create() return ret; } -// FIXME:: deprecated -bool MenuItemToggle::initWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, va_list args) -{ - return initWithCallback(std::bind( selector, target, std::placeholders::_1), item, args); -} - bool MenuItemToggle::initWithCallback(const ccMenuCallback &callback, MenuItem *item, va_list args) { MenuItem::initWithCallback(callback); diff --git a/cocos/2d/CCMenuItem.h b/cocos/2d/CCMenuItem.h index f31e2b0225ae..adc7344d20c9 100644 --- a/cocos/2d/CCMenuItem.h +++ b/cocos/2d/CCMenuItem.h @@ -61,8 +61,6 @@ class CC_DLL MenuItem : public Node /** Creates a MenuItem with no target/selector. */ static MenuItem* create(); /** Creates a MenuItem with a target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItem* create(Ref *rec, SEL_MenuHandler selector); - /** Creates a MenuItem with a target/selector. */ static MenuItem* create(const ccMenuCallback& callback); /** Returns the outside box. */ @@ -87,11 +85,6 @@ class CC_DLL MenuItem : public Node * @lua NA */ void setCallback(const ccMenuCallback& callback); - - /** Set the target/selector of the menu item. - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void setTarget(Ref *rec, SEL_MenuHandler selector); /** * @js NA @@ -117,11 +110,6 @@ class CC_DLL MenuItem : public Node * @lua NA */ bool initWithCallback(const ccMenuCallback& callback); - /** Initializes a MenuItem with a target/selector. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Ref *rec, SEL_MenuHandler selector); protected: bool _selected; @@ -144,9 +132,6 @@ class CC_DLL MenuItem : public Node class CC_DLL MenuItemLabel : public MenuItem { public: - /** Creates a MenuItemLabel with a Label, target and selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemLabel * create(Node*label, Ref* target, SEL_MenuHandler selector); - /** Creates a MenuItemLabel with a Label and a callback. */ static MenuItemLabel * create(Node*label, const ccMenuCallback& callback); @@ -194,9 +179,6 @@ class CC_DLL MenuItemLabel : public MenuItem /** Initializes a MenuItemLabel with a Label, target and selector. */ bool initWithLabel(Node* label, const ccMenuCallback& callback); - /** Initializes a MenuItemLabel with a Label, target and selector. */ - CC_DEPRECATED_ATTRIBUTE bool initWithLabel(Node* label, Ref* target, SEL_MenuHandler selector); - protected: Color3B _colorBackup; float _originalScale; @@ -220,8 +202,6 @@ class CC_DLL MenuItemAtlasFont : public MenuItemLabel /** Creates a menu item from a string and atlas with a target/selector. */ static MenuItemAtlasFont* create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap); /** Creates a menu item from a string and atlas. Use it with MenuItemToggle. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemAtlasFont* create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector); - /** Creates a menu item from a string and atlas. Use it with MenuItemToggle. */ static MenuItemAtlasFont* create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback& callback); CC_CONSTRUCTOR_ACCESS: @@ -235,9 +215,6 @@ class CC_DLL MenuItemAtlasFont : public MenuItemLabel */ virtual ~MenuItemAtlasFont(){} - /** Initializes a menu item from a string and atlas with a target/selector. */ - CC_DEPRECATED_ATTRIBUTE bool initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector); - /** Initializes a menu item from a string and atlas with a target/selector. */ bool initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback& callback); @@ -255,21 +232,17 @@ class CC_DLL MenuItemFont : public MenuItemLabel /** Creates a menu item from a string without target/selector. To be used with MenuItemToggle. */ static MenuItemFont * create(const std::string& value = ""); /** Creates a menu item from a string with a target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemFont * create(const std::string& value, Ref* target, SEL_MenuHandler selector); - /** Creates a menu item from a string with a target/selector. */ static MenuItemFont * create(const std::string& value, const ccMenuCallback& callback); /** Set default font size. */ static void setFontSize(int size); /** Get default font size. */ static int getFontSize(); - CC_DEPRECATED_ATTRIBUTE static int fontSize() { return MenuItemFont::getFontSize(); }; /** Set the default font name. */ static void setFontName(const std::string& name); /** Get the default font name. */ static const std::string& getFontName(); - CC_DEPRECATED_ATTRIBUTE static const std::string& fontName() { return MenuItemFont::getFontName(); }; - + /** Set font size. * c++ can not overload static and non-static member functions with the same parameter types. * so change the name to setFontSizeObj. @@ -283,7 +256,6 @@ class CC_DLL MenuItemFont : public MenuItemLabel * @js NA */ int getFontSizeObj() const; - CC_DEPRECATED_ATTRIBUTE int fontSizeObj() const { return getFontSizeObj(); }; /** * Set the font name . @@ -299,11 +271,6 @@ class CC_DLL MenuItemFont : public MenuItemLabel * @js NA */ const std::string& getFontNameObj() const; - - /** Deprecated Use getFontNameObj() instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE const std::string& fontNameObj() const { return getFontNameObj(); } CC_CONSTRUCTOR_ACCESS: /** @@ -316,9 +283,6 @@ class CC_DLL MenuItemFont : public MenuItemLabel */ virtual ~MenuItemFont(); - /** Initializes a menu item from a string with a target/selector. */ - CC_DEPRECATED_ATTRIBUTE bool initWithString(const std::string& value, Ref* target, SEL_MenuHandler selector); - /** Initializes a menu item from a string with a target/selector. */ bool initWithString(const std::string& value, const ccMenuCallback& callback); @@ -344,10 +308,6 @@ class CC_DLL MenuItemSprite : public MenuItem public: /** Creates a menu item with a normal, selected and disabled image.*/ static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Node* disabledSprite = nullptr); - /** Creates a menu item with a normal and selected image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector); - /** Creates a menu item with a normal, selected and disabled image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector); /** Creates a menu item with a normal and selected image with a callable object. */ static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, const ccMenuCallback& callback); /** Creates a menu item with a normal,selected and disabled image with target/selector. */ @@ -389,10 +349,7 @@ class CC_DLL MenuItemSprite : public MenuItem ,_selectedImage(nullptr) ,_disabledImage(nullptr) {} - - /** Initializes a menu item with a normal, selected and disabled image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE bool initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector); - + /** Initializes a menu item with a normal, selected and disabled image with a callable object. */ bool initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, const ccMenuCallback& callback); @@ -428,13 +385,8 @@ class CC_DLL MenuItemImage : public MenuItemSprite static MenuItemImage* create(const std::string& normalImage, const std::string& selectedImage); /** Creates a menu item with a normal,selected and disabled image.*/ static MenuItemImage* create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage); - /** Creates a menu item with a normal and selected image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemImage* create(const std::string& normalImage, const std::string& selectedImage, Ref* target, SEL_MenuHandler selector); /** Creates a menu item with a normal and selected image with a callable object. */ static MenuItemImage* create(const std::string&normalImage, const std::string&selectedImage, const ccMenuCallback& callback); - - /** Creates a menu item with a normal,selected and disabled image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE static MenuItemImage* create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector); /** Creates a menu item with a normal,selected and disabled image with a callable object. */ static MenuItemImage* create(const std::string&normalImage, const std::string&selectedImage, const std::string&disabledImage, const ccMenuCallback& callback); @@ -458,9 +410,6 @@ class CC_DLL MenuItemImage : public MenuItemSprite bool init(); - /** Initializes a menu item with a normal, selected and disabled image with target/selector. */ - CC_DEPRECATED_ATTRIBUTE bool initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector); - /** Initializes a menu item with a normal, selected and disabled image with a callable object. */ bool initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, const ccMenuCallback& callback); @@ -476,41 +425,12 @@ class CC_DLL MenuItemImage : public MenuItemSprite class CC_DLL MenuItemToggle : public MenuItem { public: - /** Creates a menu item from a Array with a target selector. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static MenuItemToggle * createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector& menuItems); - /** Creates a menu item from a list of items with a target/selector. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static MenuItemToggle* createWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, ...)CC_REQUIRES_NULL_TERMINATION; - /** *@brief Creates a menu item from a Array with a callable object. */ static MenuItemToggle * createWithCallback(const ccMenuCallback& callback, const Vector& menuItems); /** Creates a menu item from a list of items with a callable object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. - typedef MenuItem* M; - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for lists longer than 10 items, use createWithArray or variadicCreate with NULL as the last argument. - static MenuItemToggle* createWithCallbackVA(const ccMenuCallback& callback, M item, ...); -#else static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION; -#endif /** Creates a menu item with no target/selector and no items. */ static MenuItemToggle* create(); @@ -522,11 +442,6 @@ class CC_DLL MenuItemToggle : public MenuItem /** Return the selected item. */ MenuItem* getSelectedItem(); - - /** - *@deprecated Use `getSelectedItem` instead. - */ - CC_DEPRECATED_ATTRIBUTE MenuItem* selectedItem() { return getSelectedItem(); } /** Gets the index of the selected item. */ unsigned int getSelectedIndex() const { return _selectedIndex; } @@ -564,12 +479,6 @@ class CC_DLL MenuItemToggle : public MenuItem , _selectedItem(nullptr) {} - /** Initializes a menu item from a list of items with a target selector. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, va_list args); - /** Initializes a menu item from a list of items with a callable object. */ bool initWithCallback(const ccMenuCallback& callback, MenuItem* item, va_list args); diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 308102a81966..b0dad6772779 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -24,7 +24,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "2d/CCMotionStreak.h" #include "math/CCVertex.h" #include "base/CCDirector.h" @@ -32,27 +31,27 @@ THE SOFTWARE. #include "renderer/CCTextureCache.h" #include "renderer/CCTexture2D.h" #include "renderer/CCRenderer.h" -#include "renderer/CCGLProgramState.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN MotionStreak::MotionStreak() -: _fastMode(false) -, _startingPositionInitialized(false) -, _texture(nullptr) -, _blendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED) -, _stroke(0.0f) -, _fadeDelta(0.0f) -, _minSeg(0.0f) -, _maxPoints(0) -, _nuPoints(0) -, _previousNuPoints(0) -, _pointVertexes(nullptr) -, _pointState(nullptr) -, _vertices(nullptr) -, _colorPointer(nullptr) -, _texCoords(nullptr) { + _customCommand.setDrawType(CustomCommand::DrawType::ARRAY); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE_STRIP); + + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocaiton = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + + auto& vertexLayout = pipelineDescriptor.vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, 2 * sizeof(float), false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, 4 * sizeof(float), true); + vertexLayout.setLayout(4 * sizeof(float) + 4 * sizeof(uint8_t), backend::VertexStepMode::VERTEX); } MotionStreak::~MotionStreak() @@ -63,6 +62,7 @@ MotionStreak::~MotionStreak() CC_SAFE_FREE(_vertices); CC_SAFE_FREE(_colorPointer); CC_SAFE_FREE(_texCoords); + CC_SAFE_RELEASE(_programState); } MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const Color3B& color, const std::string& path) @@ -108,28 +108,23 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const Co _positionR.setZero(); _fastMode = true; - _minSeg = (minSeg == -1.0f) ? stroke/5.0f : minSeg; + _minSeg = (minSeg == -1.0f) ? stroke/ 5.0f : minSeg; _minSeg *= _minSeg; _stroke = stroke; - _fadeDelta = 1.0f/fade; + _fadeDelta = 1.0f / fade; - double fps = 1/Director::getInstance()->getAnimationInterval(); - _maxPoints = (int)(fade*fps)+2; + double fps = 1 / Director::getInstance()->getAnimationInterval(); + _maxPoints = (int)(fade * fps) + 2; - _nuPoints = 0; _pointState = (float *)malloc(sizeof(float) * _maxPoints); _pointVertexes = (Vec2*)malloc(sizeof(Vec2) * _maxPoints); - _vertices = (Vec2*)malloc(sizeof(Vec2) * _maxPoints * 2); - _texCoords = (Tex2F*)malloc(sizeof(Tex2F) * _maxPoints * 2); - _colorPointer = (GLubyte*)malloc(sizeof(GLubyte) * _maxPoints * 2 * 4); - - // Set blend mode - _blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED; - - // shader state - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR, texture)); + _vertexCount = _maxPoints * 2; + _vertices = (Vec2*)malloc(sizeof(Vec2) * _vertexCount); + _texCoords = (Tex2F*)malloc(sizeof(Tex2F) * _vertexCount); + _colorPointer = (uint8_t*)malloc(sizeof(uint8_t) * 4 * _vertexCount); + _customCommand.createVertexBuffer(sizeof(Vec2) + sizeof(Tex2F) + sizeof(uint8_t) * 4, _vertexCount, CustomCommand::BufferUsage::DYNAMIC); setTexture(texture); setColor(color); @@ -248,7 +243,7 @@ void MotionStreak::setOpacityModifyRGB(bool /*bValue*/) { } -bool MotionStreak::isOpacityModifyRGB(void) const +bool MotionStreak::isOpacityModifyRGB() const { return false; } @@ -256,27 +251,25 @@ bool MotionStreak::isOpacityModifyRGB(void) const void MotionStreak::update(float delta) { if (!_startingPositionInitialized) - { return; - } - + delta *= _fadeDelta; unsigned int newIdx, newIdx2, i, i2; unsigned int mov = 0; // Update current points - for(i = 0; i<_nuPoints; i++) + for (i = 0; i < _nuPoints; i++) { - _pointState[i]-=delta; + _pointState[i] -= delta; - if(_pointState[i] <= 0) + if (_pointState[i] <= 0) mov++; else { - newIdx = i-mov; + newIdx = i - mov; - if(mov>0) + if (mov > 0) { // Move data _pointState[newIdx] = _pointState[i]; @@ -285,8 +278,8 @@ void MotionStreak::update(float delta) _pointVertexes[newIdx] = _pointVertexes[i]; // Move vertices - i2 = i*2; - newIdx2 = newIdx*2; + i2 = i * 2; + newIdx2 = newIdx * 2; _vertices[newIdx2] = _vertices[i2]; _vertices[newIdx2+1] = _vertices[i2+1]; @@ -300,39 +293,34 @@ void MotionStreak::update(float delta) _colorPointer[newIdx2+5] = _colorPointer[i2+5]; _colorPointer[newIdx2+6] = _colorPointer[i2+6]; }else - newIdx2 = newIdx*8; + newIdx2 = newIdx * 8; - const GLubyte op = (GLubyte)(_pointState[newIdx] * 255.0f); + const uint8_t op = (uint8_t)(_pointState[newIdx] * 255.0f); _colorPointer[newIdx2+3] = op; _colorPointer[newIdx2+7] = op; } } - _nuPoints-=mov; + _nuPoints -= mov; // Append new point bool appendNewPoint = true; - if(_nuPoints >= _maxPoints) - { + if (_nuPoints >= _maxPoints) appendNewPoint = false; - } - - else if(_nuPoints>0) + else if (_nuPoints > 0) { bool a1 = _pointVertexes[_nuPoints-1].getDistanceSq(_positionR) < _minSeg; - bool a2 = (_nuPoints == 1) ? false : (_pointVertexes[_nuPoints-2].getDistanceSq(_positionR)< (_minSeg * 2.0f)); - if(a1 || a2) - { + bool a2 = (_nuPoints == 1) ? false : (_pointVertexes[_nuPoints-2].getDistanceSq(_positionR) < (_minSeg * 2.0f)); + if (a1 || a2) appendNewPoint = false; - } } - if(appendNewPoint) + if (appendNewPoint) { _pointVertexes[_nuPoints] = _positionR; _pointState[_nuPoints] = 1.0f; // Color assignment - const unsigned int offset = _nuPoints*8; + const unsigned int offset = _nuPoints * 8; *((Color3B*)(_colorPointer + offset)) = _displayedColor; *((Color3B*)(_colorPointer + offset+4)) = _displayedColor; @@ -341,7 +329,7 @@ void MotionStreak::update(float delta) _colorPointer[offset+7] = 255; // Generate polygon - if(_nuPoints > 0 && _fastMode ) + if (_nuPoints > 0 && _fastMode ) { if(_nuPoints > 1) { @@ -353,18 +341,17 @@ void MotionStreak::update(float delta) } } - _nuPoints ++; + _nuPoints++; } - if( ! _fastMode ) - { + + if (! _fastMode) ccVertexLineToPolygon(_pointVertexes, _stroke, _vertices, 0, _nuPoints); - } // Updated Tex Coords only if they are different than previous step - if( _nuPoints && _previousNuPoints != _nuPoints ) { + if (_nuPoints && _previousNuPoints != _nuPoints) { float texDelta = 1.0f / _nuPoints; - for( i=0; i < _nuPoints; i++ ) { + for (i = 0; i < _nuPoints; i++) { _texCoords[i*2] = Tex2F(0, texDelta*i); _texCoords[i*2+1] = Tex2F(1, texDelta*i); } @@ -378,34 +365,33 @@ void MotionStreak::reset() _nuPoints = 0; } -void MotionStreak::onDraw(const Mat4 &transform, uint32_t /*flags*/) -{ - getGLProgram()->use(); - getGLProgram()->setUniformsForBuiltins(transform); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - utils::setBlending(_blendFunc.src, _blendFunc.dst); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _texture->getName()); - - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, _vertices); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoords); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, 0, _colorPointer); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nuPoints*2); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _nuPoints*2); -} - void MotionStreak::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { if(_nuPoints <= 1) return; - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(MotionStreak::onDraw, this, transform, flags); + + auto drawCount = _nuPoints * 2; + + _customCommand.init(_globalZOrder, _blendFunc); + _customCommand.setVertexDrawInfo(0, drawCount); renderer->addCommand(&_customCommand); + + auto programState = _customCommand.getPipelineDescriptor().programState; + programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); + + const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 finalMat = projectionMat * transform; + programState->setUniform(_mvpMatrixLocaiton, finalMat.m, sizeof(Mat4)); + + unsigned int offset = 0; + unsigned int vertexSize = sizeof(Vec2) + sizeof(Vec2) + sizeof(uint8_t) * 4; + for (unsigned int i = 0; i < drawCount; ++i) + { + offset = i * vertexSize; + _customCommand.updateVertexBuffer(&_vertices[i], offset, sizeof(_vertices[0])); + _customCommand.updateVertexBuffer(&_texCoords[i], offset + sizeof(_vertices[0]), sizeof(_texCoords[0]) ); + _customCommand.updateVertexBuffer(&_colorPointer[i * 4], offset + sizeof(_vertices[0]) + sizeof(_texCoords[0]), 4 * sizeof(uint8_t)); + } } NS_CC_END diff --git a/cocos/2d/CCMotionStreak.h b/cocos/2d/CCMotionStreak.h index fc8e09a23be1..76d8b6c5761a 100644 --- a/cocos/2d/CCMotionStreak.h +++ b/cocos/2d/CCMotionStreak.h @@ -24,8 +24,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CCMOTION_STREAK_H__ -#define __CCMOTION_STREAK_H__ +#pragma once #include "base/CCProtocols.h" #include "2d/CCNode.h" @@ -67,6 +66,42 @@ class CC_DLL MotionStreak : public Node, public TextureProtocol */ static MotionStreak* create(float timeToFade, float minSeg, float strokeWidth, const Color3B& strokeColor, Texture2D* texture); + // Overrides + virtual void setPosition(const Vec2& position) override; + virtual void setPosition(float x, float y) override; + virtual const Vec2& getPosition() const override; + virtual void getPosition(float* x, float* y) const override; + virtual void setPositionX(float x) override; + virtual void setPositionY(float y) override; + virtual float getPositionX() const override; + virtual float getPositionY() const override; + virtual Vec3 getPosition3D() const override; + /** + * @js NA + * @lua NA + */ + virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; + /** + * @lua NA + */ + virtual void update(float delta) override; + virtual Texture2D* getTexture() const override; + virtual void setTexture(Texture2D *texture) override; + /** + * @js NA + * @lua NA + */ + virtual void setBlendFunc(const BlendFunc &blendFunc) override; + /** + * @js NA + * @lua NA + */ + virtual const BlendFunc& getBlendFunc() const override; + virtual uint8_t getOpacity() const override; + virtual void setOpacity(uint8_t opacity) override; + virtual void setOpacityModifyRGB(bool value) override; + virtual bool isOpacityModifyRGB() const override; + /** Color used for the tint. * * @param colors The color used for the tint. @@ -111,42 +146,6 @@ class CC_DLL MotionStreak : public Node, public TextureProtocol { _startingPositionInitialized = bStartingPositionInitialized; } - - // Overrides - virtual void setPosition(const Vec2& position) override; - virtual void setPosition(float x, float y) override; - virtual const Vec2& getPosition() const override; - virtual void getPosition(float* x, float* y) const override; - virtual void setPositionX(float x) override; - virtual void setPositionY(float y) override; - virtual float getPositionX(void) const override; - virtual float getPositionY(void) const override; - virtual Vec3 getPosition3D() const override; - /** - * @js NA - * @lua NA - */ - virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; - /** - * @lua NA - */ - virtual void update(float delta) override; - virtual Texture2D* getTexture() const override; - virtual void setTexture(Texture2D *texture) override; - /** - * @js NA - * @lua NA - */ - virtual void setBlendFunc(const BlendFunc &blendFunc) override; - /** - * @js NA - * @lua NA - */ - virtual const BlendFunc& getBlendFunc() const override; - virtual GLubyte getOpacity() const override; - virtual void setOpacity(GLubyte opacity) override; - virtual void setOpacityModifyRGB(bool value) override; - virtual bool isOpacityModifyRGB() const override; CC_CONSTRUCTOR_ACCESS: MotionStreak(); @@ -159,35 +158,36 @@ class CC_DLL MotionStreak : public Node, public TextureProtocol bool initWithFade(float fade, float minSeg, float stroke, const Color3B& color, Texture2D* texture); protected: - //renderer callback - void onDraw(const Mat4 &transform, uint32_t flags); - - bool _fastMode; - bool _startingPositionInitialized; + bool _fastMode = false; + bool _startingPositionInitialized = false; /** texture used for the motion streak */ - Texture2D* _texture; - BlendFunc _blendFunc; + Texture2D* _texture = nullptr; + BlendFunc _blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED; Vec2 _positionR; - float _stroke; - float _fadeDelta; - float _minSeg; + float _stroke = 0.f; + float _fadeDelta = 0.f; + float _minSeg = 0.f; - unsigned int _maxPoints; - unsigned int _nuPoints; - unsigned int _previousNuPoints; + unsigned int _maxPoints = 0; + unsigned int _nuPoints = 0; + unsigned int _previousNuPoints = 0; /** Pointers */ - Vec2* _pointVertexes; - float* _pointState; + Vec2* _pointVertexes = nullptr; + float* _pointState = nullptr; - // Opengl - Vec2* _vertices; - GLubyte* _colorPointer; - Tex2F* _texCoords; + Vec2* _vertices = nullptr; + uint8_t* _colorPointer = nullptr; + Tex2F* _texCoords = nullptr; + unsigned int _vertexCount = 0; CustomCommand _customCommand; + + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _textureLocation; + backend::ProgramState* _programState = nullptr; private: CC_DISALLOW_COPY_AND_ASSIGN(MotionStreak); @@ -197,5 +197,3 @@ class CC_DLL MotionStreak : public Node, public TextureProtocol /// @} NS_CC_END - -#endif //__CCMOTION_STREAK_H__ diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 1f266b699027..780af64d7c38 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1196,6 +1196,10 @@ void Node::draw(Renderer* /*renderer*/, const Mat4 & /*transform*/, uint32_t /*f { } +void Node::draw(RendererBackend* /*renderer*/, const Mat4 & /*transform*/, uint32_t /*flags*/) +{ +} + void Node::visit() { auto renderer = _director->getRenderer(); @@ -1297,6 +1301,59 @@ void Node::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t paren // _orderOfArrival = 0; } +void Node::visit(RendererBackend* renderer, const Mat4 &parentTransform, uint32_t parentFlags) +{ + // quick return if not visible. children won't be drawn. + if (!_visible) + { + return; + } + + uint32_t flags = processParentFlags(parentTransform, parentFlags); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the Mat4 stack, + // but it is deprecated and your code should not rely on it + _director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + _director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform); + + bool visibleByCamera = isVisitableByVisitingCamera(); + + int i = 0; + + if(!_children.empty()) + { + sortAllChildren(); + // draw children zOrder < 0 + for(auto size = _children.size(); i < size; ++i) + { + auto node = _children.at(i); + + if (node && node->_localZOrder < 0) + node->visit(renderer, _modelViewTransform, flags); + else + break; + } + // self draw + if (visibleByCamera) + this->draw(renderer, _modelViewTransform, flags); + + for(auto it=_children.cbegin()+i, itCend = _children.cend(); it != itCend; ++it) + (*it)->visit(renderer, _modelViewTransform, flags); + } + else if (visibleByCamera) + { + this->draw(renderer, _modelViewTransform, flags); + } + + _director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // reset for next frame + // _orderOfArrival = 0; +} + Mat4 Node::transform(const Mat4& parentTransform) { return parentTransform * this->getNodeToParentTransform(); @@ -1640,16 +1697,6 @@ void Node::pause() _eventDispatcher->pauseEventListenersForTarget(this); } -void Node::resumeSchedulerAndActions() -{ - resume(); -} - -void Node::pauseSchedulerAndActions() -{ - pause(); -} - // override me void Node::update(float fDelta) { @@ -1738,22 +1785,32 @@ const Mat4& Node::getNodeToParentTransform() const float sy = sinf(radiansY); float m0 = _transform.m[0], m1 = _transform.m[1], m4 = _transform.m[4], m5 = _transform.m[5], m8 = _transform.m[8], m9 = _transform.m[9]; - _transform.m[0] = cy * m0 - sx * m1, _transform.m[4] = cy * m4 - sx * m5, _transform.m[8] = cy * m8 - sx * m9; - _transform.m[1] = sy * m0 + cx * m1, _transform.m[5] = sy * m4 + cx * m5, _transform.m[9] = sy * m8 + cx * m9; + _transform.m[0] = cy * m0 - sx * m1; + _transform.m[4] = cy * m4 - sx * m5; + _transform.m[8] = cy * m8 - sx * m9; + _transform.m[1] = sy * m0 + cx * m1; + _transform.m[5] = sy * m4 + cx * m5; + _transform.m[9] = sy * m8 + cx * m9; } _transform = translation * _transform; if (_scaleX != 1.f) { - _transform.m[0] *= _scaleX, _transform.m[1] *= _scaleX, _transform.m[2] *= _scaleX; + _transform.m[0] *= _scaleX; + _transform.m[1] *= _scaleX; + _transform.m[2] *= _scaleX; } if (_scaleY != 1.f) { - _transform.m[4] *= _scaleY, _transform.m[5] *= _scaleY, _transform.m[6] *= _scaleY; + _transform.m[4] *= _scaleY; + _transform.m[5] *= _scaleY; + _transform.m[6] *= _scaleY; } if (_scaleZ != 1.f) { - _transform.m[8] *= _scaleZ, _transform.m[9] *= _scaleZ, _transform.m[10] *= _scaleZ; + _transform.m[8] *= _scaleZ; + _transform.m[9] *= _scaleZ; + _transform.m[10] *= _scaleZ; } // FIXME:: Try to inline skew @@ -2217,11 +2274,4 @@ int Node::getAttachedNodeCount() return __attachedNodeCount; } -// MARK: Deprecated - -__NodeRGBA::__NodeRGBA() -{ - CCLOG("NodeRGBA deprecated."); -} - NS_CC_END diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index b16ed3839d95..b68963c669a4 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -63,6 +63,7 @@ class GLProgramState; class Material; class Camera; class PhysicsBody; +class RendererBackend; /** * @addtogroup _2d @@ -165,8 +166,6 @@ class CC_DLL Node : public Ref * @param localZOrder The local Z order value. */ virtual void setLocalZOrder(std::int32_t localZOrder); - - CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(std::int32_t localZOrder) { setLocalZOrder(localZOrder); } /* Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing. @@ -196,8 +195,6 @@ class CC_DLL Node : public Ref virtual std::int32_t getLocalZOrder() const { return _localZOrder; } - CC_DEPRECATED_ATTRIBUTE virtual std::int32_t getZOrder() const { return getLocalZOrder(); } - /** Defines the order in which the nodes are renderer. Nodes that have a Global Z Order lower, are renderer first. @@ -451,7 +448,6 @@ class CC_DLL Node : public Ref * @js setVertexZ */ virtual void setPositionZ(float positionZ); - CC_DEPRECATED_ATTRIBUTE virtual void setVertexZ(float vertexZ) { setPositionZ(vertexZ); } /** * Gets position Z coordinate of this node. @@ -462,7 +458,6 @@ class CC_DLL Node : public Ref * @js getVertexZ */ virtual float getPositionZ() const; - CC_DEPRECATED_ATTRIBUTE virtual float getVertexZ() const { return getPositionZ(); } /** * Changes the X skew angle of the node in degrees. @@ -651,7 +646,6 @@ class CC_DLL Node : public Ref * @js setRotationX */ virtual void setRotationSkewX(float rotationX); - CC_DEPRECATED_ATTRIBUTE virtual void setRotationX(float rotationX) { return setRotationSkewX(rotationX); } /** * Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew. @@ -662,7 +656,6 @@ class CC_DLL Node : public Ref * @js getRotationX */ virtual float getRotationSkewX() const; - CC_DEPRECATED_ATTRIBUTE virtual float getRotationX() const { return getRotationSkewX(); } /** * Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. @@ -679,7 +672,6 @@ class CC_DLL Node : public Ref * @js setRotationY */ virtual void setRotationSkewY(float rotationY); - CC_DEPRECATED_ATTRIBUTE virtual void setRotationY(float rotationY) { return setRotationSkewY(rotationY); } /** * Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. @@ -690,16 +682,6 @@ class CC_DLL Node : public Ref * @js getRotationY */ virtual float getRotationSkewY() const; - CC_DEPRECATED_ATTRIBUTE virtual float getRotationY() const { return getRotationSkewY(); } - - /** @deprecated No longer needed - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void setGLServerState(int /*serverState*/) {} - /** @deprecated No longer needed - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE int getGLServerState() const { return 0; } /** * Sets whether the anchor point will be (0,0) when you position this node. @@ -710,7 +692,6 @@ class CC_DLL Node : public Ref * @param ignore true if anchor point will be (0,0) when you position this node. */ virtual void setIgnoreAnchorPointForPosition(bool ignore); - CC_DEPRECATED_ATTRIBUTE virtual void ignoreAnchorPointForPosition(bool ignore) { setIgnoreAnchorPointForPosition(ignore); } /** * Gets whether the anchor point will be (0,0) when you position this node. @@ -1058,7 +1039,7 @@ class CC_DLL Node : public Ref * @return The GLProgram (shader) currently used for this node. */ GLProgram* getGLProgram() const; - CC_DEPRECATED_ATTRIBUTE GLProgram* getShaderProgram() const { return getGLProgram(); } + /** * Sets the shader program for this node * @@ -1071,7 +1052,6 @@ class CC_DLL Node : public Ref * @param glprogram The shader program. */ virtual void setGLProgram(GLProgram *glprogram); - CC_DEPRECATED_ATTRIBUTE void setShaderProgram(GLProgram *glprogram) { setGLProgram(glprogram); } /** * Return the GLProgramState currently used for this node. @@ -1168,6 +1148,7 @@ class CC_DLL Node : public Ref * @param flags Renderer flag. */ virtual void draw(Renderer *renderer, const Mat4& transform, uint32_t flags); + virtual void draw(RendererBackend *renderer, const Mat4& transform, uint32_t flags); virtual void draw() final; /** @@ -1178,6 +1159,7 @@ class CC_DLL Node : public Ref * @param parentFlags Renderer flag. */ virtual void visit(Renderer *renderer, const Mat4& parentTransform, uint32_t parentFlags); + virtual void visit(RendererBackend *renderer, const Mat4& parentTransform, uint32_t parentFlags); virtual void visit() final; @@ -1196,9 +1178,6 @@ class CC_DLL Node : public Ref */ virtual Rect getBoundingBox() const; - /** @deprecated Use getBoundingBox instead */ - CC_DEPRECATED_ATTRIBUTE virtual Rect boundingBox() const { return getBoundingBox(); } - /** Set event dispatcher for scene. * * @param dispatcher The event dispatcher of scene. @@ -1308,10 +1287,6 @@ class CC_DLL Node : public Ref */ ssize_t getNumberOfRunningActionsByTag(int tag) const; - - /** @deprecated Use getNumberOfRunningActions() instead */ - CC_DEPRECATED_ATTRIBUTE ssize_t numberOfRunningActions() const { return getNumberOfRunningActions(); }; - /// @} end of Actions @@ -1496,8 +1471,6 @@ class CC_DLL Node : public Ref */ void unscheduleAllCallbacks(); - CC_DEPRECATED_ATTRIBUTE void unscheduleAllSelectors() { unscheduleAllCallbacks(); } - /** * Resumes all scheduled selectors, actions and event listeners. * This method is called internally by onEnter. @@ -1509,17 +1482,6 @@ class CC_DLL Node : public Ref */ virtual void pause(void); - /** - * Resumes all scheduled selectors, actions and event listeners. - * This method is called internally by onEnter. - */ - CC_DEPRECATED_ATTRIBUTE void resumeSchedulerAndActions(); - /** - * Pauses all scheduled selectors, actions and event listeners. - * This method is called internally by onExit. - */ - CC_DEPRECATED_ATTRIBUTE void pauseSchedulerAndActions(); - /** * Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live". * @param delta In seconds. @@ -1579,9 +1541,6 @@ class CC_DLL Node : public Ref */ virtual void setNodeToParentTransform(const Mat4& transform); - /** @deprecated use getNodeToParentTransform() instead */ - CC_DEPRECATED_ATTRIBUTE virtual AffineTransform nodeToParentTransform() const { return getNodeToParentAffineTransform(); } - /** * Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates. * The matrix is in Pixels. @@ -1591,9 +1550,6 @@ class CC_DLL Node : public Ref virtual const Mat4& getParentToNodeTransform() const; virtual AffineTransform getParentToNodeAffineTransform() const; - /** @deprecated Use getParentToNodeTransform() instead */ - CC_DEPRECATED_ATTRIBUTE virtual AffineTransform parentToNodeTransform() const { return getParentToNodeAffineTransform(); } - /** * Returns the world affine transform matrix. The matrix is in Pixels. * @@ -1602,9 +1558,6 @@ class CC_DLL Node : public Ref virtual Mat4 getNodeToWorldTransform() const; virtual AffineTransform getNodeToWorldAffineTransform() const; - /** @deprecated Use getNodeToWorldTransform() instead */ - CC_DEPRECATED_ATTRIBUTE virtual AffineTransform nodeToWorldTransform() const { return getNodeToWorldAffineTransform(); } - /** * Returns the inverse world affine transform matrix. The matrix is in Pixels. * @@ -1613,9 +1566,6 @@ class CC_DLL Node : public Ref virtual Mat4 getWorldToNodeTransform() const; virtual AffineTransform getWorldToNodeAffineTransform() const; - /** @deprecated Use getWorldToNodeTransform() instead */ - CC_DEPRECATED_ATTRIBUTE virtual AffineTransform worldToNodeTransform() const { return getWorldToNodeAffineTransform(); } - /// @} end of Transformations @@ -2057,48 +2007,6 @@ class CC_DLL Node : public Ref */ bool CC_DLL isScreenPointInRect(const Vec2 &pt, const Camera* camera, const Mat4& w2l, const Rect& rect, Vec3 *p); -// NodeRGBA - -/** @class __NodeRGBA - * @brief __NodeRGBA is a subclass of Node that implements the RGBAProtocol protocol. - - All features from Node are valid, plus the following new features: - - opacity - - RGB colors - - Opacity/Color propagates into children that conform to the RGBAProtocol if cascadeOpacity/cascadeColor is enabled. - @since v2.1 - @js NA - */ -class CC_DLL __NodeRGBA : public Node, public __RGBAProtocol -{ -public: - // overrides - virtual GLubyte getOpacity() const override { return Node::getOpacity(); } - virtual GLubyte getDisplayedOpacity() const override { return Node::getDisplayedOpacity(); } - virtual void setOpacity(GLubyte opacity) override { return Node::setOpacity(opacity); } - virtual void updateDisplayedOpacity(GLubyte parentOpacity) override { return Node::updateDisplayedOpacity(parentOpacity); } - virtual bool isCascadeOpacityEnabled() const override { return Node::isCascadeOpacityEnabled(); } - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled) override { return Node::setCascadeOpacityEnabled(cascadeOpacityEnabled); } - - virtual const Color3B& getColor(void) const override { return Node::getColor(); } - virtual const Color3B& getDisplayedColor() const override { return Node::getDisplayedColor(); } - virtual void setColor(const Color3B& color) override { return Node::setColor(color); } - virtual void updateDisplayedColor(const Color3B& parentColor) override { return Node::updateDisplayedColor(parentColor); } - virtual bool isCascadeColorEnabled() const override { return Node::isCascadeColorEnabled(); } - virtual void setCascadeColorEnabled(bool cascadeColorEnabled) override { return Node::setCascadeColorEnabled(cascadeColorEnabled); } - - virtual void setOpacityModifyRGB(bool bValue) override { return Node::setOpacityModifyRGB(bValue); } - virtual bool isOpacityModifyRGB() const override { return Node::isOpacityModifyRGB(); } - -CC_CONSTRUCTOR_ACCESS: - __NodeRGBA(); - virtual ~__NodeRGBA() {} - -private: - CC_DISALLOW_COPY_AND_ASSIGN(__NodeRGBA); -}; - // end of _2d group /// @} diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index 0f2d9ed27370..65ec47e542b6 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -22,7 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "2d/CCNodeGrid.h" #include "2d/CCGrid.h" #include "renderer/CCRenderer.h" @@ -53,11 +52,7 @@ NodeGrid* NodeGrid::create(const cocos2d::Rect &rect) } NodeGrid::NodeGrid() -: _gridTarget(nullptr) -, _nodeGrid(nullptr) -, _gridRect(Rect::ZERO) { - } void NodeGrid::setTarget(Node* target) @@ -111,10 +106,6 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p if(dirty) _modelViewTransform = this->transform(parentTransform); _transformUpdated = false; - - _groupCommand.init(_globalZOrder); - renderer->addCommand(&_groupCommand); - renderer->pushGroup(_groupCommand.getRenderQueueID()); // IMPORTANT: // To ease the migration to v3.0, we still support the Mat4 stack, @@ -132,10 +123,7 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p _nodeGrid->set2DProjection(); } - _gridBeginCommand.init(_globalZOrder); - _gridBeginCommand.func = CC_CALLBACK_0(NodeGrid::onGridBeginDraw, this); - renderer->addCommand(&_gridBeginCommand); - + onGridBeginDraw(); if(_gridTarget) { @@ -181,12 +169,8 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p director->setProjection(beforeProjectionType); } - _gridEndCommand.init(_globalZOrder); - _gridEndCommand.func = CC_CALLBACK_0(NodeGrid::onGridEndDraw, this); - renderer->addCommand(&_gridEndCommand); + onGridEndDraw(); - renderer->popGroup(); - director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); } diff --git a/cocos/2d/CCNodeGrid.h b/cocos/2d/CCNodeGrid.h index c057ce2bde7c..2eb98026e90f 100644 --- a/cocos/2d/CCNodeGrid.h +++ b/cocos/2d/CCNodeGrid.h @@ -22,9 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __MISCNODE_CCGRID_NODE_H__ -#define __MISCNODE_CCGRID_NODE_H__ +#pragma once #include "2d/CCNode.h" #include "renderer/CCGroupCommand.h" @@ -98,18 +96,16 @@ class CC_DLL NodeGrid : public Node void onGridBeginDraw(); void onGridEndDraw(); - Node* _gridTarget; - GridBase* _nodeGrid; + Node* _gridTarget = nullptr; + GridBase* _nodeGrid = nullptr; GroupCommand _groupCommand; CustomCommand _gridBeginCommand; CustomCommand _gridEndCommand; - Rect _gridRect; + Rect _gridRect = Rect::ZERO; private: CC_DISALLOW_COPY_AND_ASSIGN(NodeGrid); }; /** @} */ NS_CC_END - -#endif diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 1d238d6e2cae..dce69890a34d 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -28,7 +28,6 @@ * THE SOFTWARE. * */ - #include "2d/CCParticleBatchNode.h" #include "2d/CCGrid.h" #include "2d/CCParticleSystem.h" @@ -38,18 +37,44 @@ #include "renderer/CCTextureAtlas.h" #include "base/CCProfiling.h" #include "base/ccUTF8.h" +#include "base/ccUtils.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN ParticleBatchNode::ParticleBatchNode() -: _textureAtlas(nullptr) { - + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocaiton = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + + //set vertexLayout according to V3F_C4B_T2F structure + backend::VertexLayout vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + pipelineDescriptor.vertexLayout = vertexLayout; + + _customCommand.setDrawType(CustomCommand::DrawType::ELEMENT); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); } ParticleBatchNode::~ParticleBatchNode() { CC_SAFE_RELEASE(_textureAtlas); + CC_SAFE_RELEASE(_programState); } /* * creation with Texture2D @@ -95,8 +120,6 @@ bool ParticleBatchNode::initWithTexture(Texture2D *tex, int capacity) _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR, tex)); - return true; } @@ -131,7 +154,7 @@ void ParticleBatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, u if (isVisitableByVisitingCamera()) { - // IMPORTANT: + // IMPORTANT:d // To ease the migration to v3.0, we still support the Mat4 stack, // but it is deprecated and your code should not rely on it Director* director = Director::getInstance(); @@ -398,21 +421,40 @@ void ParticleBatchNode::removeAllChildrenWithCleanup(bool doCleanup) _textureAtlas->removeAllQuads(); } -void ParticleBatchNode::draw(Renderer* renderer, const Mat4 & /*transform*/, uint32_t flags) +void ParticleBatchNode::draw(Renderer* renderer, const Mat4 & transform, uint32_t flags) { CC_PROFILER_START("CCParticleBatchNode - draw"); if( _textureAtlas->getTotalQuads() == 0 ) - { return; + + _customCommand.init(_globalZOrder, _blendFunc); + + // Texture is set in TextureAtlas. + const cocos2d::Mat4& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 finalMat = projectionMat * transform; + auto programState = _customCommand.getPipelineDescriptor().programState; + programState->setUniform(_mvpMatrixLocaiton, finalMat.m, sizeof(finalMat.m)); + programState->setTexture(_textureLocation, 0, _textureAtlas->getTexture()->getBackendTexture()); + + if (_textureAtlas->isDirty()) + { + const auto& quads = _textureAtlas->getQuads(); + unsigned int capacity = (unsigned int)_textureAtlas->getCapacity(); + const auto& indices = _textureAtlas->getIndices(); + + _customCommand.createVertexBuffer((unsigned int)(sizeof(quads[0]) ), capacity, CustomCommand::BufferUsage::STATIC); + _customCommand.updateVertexBuffer(quads, sizeof(quads[0]) * capacity); + + _customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT , capacity * 6, CustomCommand::BufferUsage::STATIC); + _customCommand.updateIndexBuffer(indices, sizeof(indices[0]) * capacity * 6); } - _batchCommand.init(_globalZOrder, getGLProgram(), _blendFunc, _textureAtlas, _modelViewTransform, flags); - renderer->addCommand(&_batchCommand); + + renderer->addCommand(&_customCommand); + CC_PROFILER_STOP("CCParticleBatchNode - draw"); } - - void ParticleBatchNode::increaseAtlasCapacityTo(ssize_t quantity) { CCLOG("cocos2d: ParticleBatchNode: resizing TextureAtlas capacity from [%lu] to [%lu].", diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index b1cc594bcabd..b81b4e609d2a 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -28,12 +28,11 @@ * THE SOFTWARE. * */ -#ifndef __CCPARTICLEBATCHNODE_H__ -#define __CCPARTICLEBATCHNODE_H__ +#pragma once #include "2d/CCNode.h" #include "base/CCProtocols.h" -#include "renderer/CCBatchCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN @@ -130,7 +129,7 @@ class CC_DLL ParticleBatchNode : public Node, public TextureProtocol virtual void removeChild(Node* child, bool cleanup) override; virtual void reorderChild(Node * child, int zOrder) override; virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; - virtual Texture2D* getTexture(void) const override; + virtual Texture2D* getTexture() const override; virtual void setTexture(Texture2D *texture) override; /** * @code @@ -144,7 +143,7 @@ class CC_DLL ParticleBatchNode : public Node, public TextureProtocol * @js NA * @lua NA */ - virtual const BlendFunc& getBlendFunc(void) const override; + virtual const BlendFunc& getBlendFunc() const override; CC_CONSTRUCTOR_ACCESS: /** @@ -170,20 +169,21 @@ class CC_DLL ParticleBatchNode : public Node, public TextureProtocol void getCurrentIndex(int* oldIndex, int* newIndex, Node* child, int z); int addChildHelper(ParticleSystem* child, int z, int aTag, const std::string &name, bool setTag); void addChildByTagOrName(ParticleSystem* child, int z, int tag, const std::string &name, bool setTag); - void updateBlendFunc(void); + void updateBlendFunc(); /** the texture atlas used for drawing the quads */ - TextureAtlas* _textureAtlas; + TextureAtlas* _textureAtlas = nullptr; /** the blend function used for drawing the quads */ BlendFunc _blendFunc; - // quad command - BatchCommand _batchCommand; + + CustomCommand _customCommand; + + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _textureLocation; + backend::ProgramState* _programState = nullptr; }; // end of _2d group /// @} NS_CC_END - -#endif /* __CCPARTICLEBATCHNODE_H__ */ - diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 9d63c2d070aa..0821d54d65f0 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -54,6 +54,7 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/CCProfiling.h" #include "base/ccUTF8.h" +#include "base/ccUtils.h" #include "renderer/CCTextureCache.h" #include "platform/CCFileUtils.h" @@ -336,13 +337,13 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string& // blend function if (!_configName.empty()) { - _blendFunc.src = dictionary["blendFuncSource"].asFloat(); + _blendFunc.src = utils::toBackendBlendFactor((int)dictionary["blendFuncSource"].asFloat()); } else { - _blendFunc.src = dictionary["blendFuncSource"].asInt(); + _blendFunc.src = utils::toBackendBlendFactor(dictionary["blendFuncSource"].asInt()); } - _blendFunc.dst = dictionary["blendFuncDestination"].asInt(); + _blendFunc.dst = utils::toBackendBlendFactor(dictionary["blendFuncDestination"].asInt()); // color _startColor.r = dictionary["startColorRed"].asFloat(); @@ -1112,7 +1113,7 @@ void ParticleSystem::setBlendAdditive(bool additive) bool ParticleSystem::isBlendAdditive() const { - return( _blendFunc.src == GL_SRC_ALPHA && _blendFunc.dst == GL_ONE); + return( _blendFunc.src == backend::BlendFactor::SRC_ALPHA && _blendFunc.dst == backend::BlendFactor::ONE); } // ParticleSystem - Properties of Gravity Mode diff --git a/cocos/2d/CCParticleSystem.h b/cocos/2d/CCParticleSystem.h index 6e79de883701..08962a044539 100644 --- a/cocos/2d/CCParticleSystem.h +++ b/cocos/2d/CCParticleSystem.h @@ -189,12 +189,6 @@ emitter.startSpin = 0; */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#ifdef RELATIVE -#undef RELATIVE -#endif -#endif - class CC_DLL ParticleSystem : public Node, public TextureProtocol, public PlayableProtocol { public: @@ -731,7 +725,6 @@ class CC_DLL ParticleSystem : public Node, public TextureProtocol, public Playab /** does the alpha value modify color */ void setOpacityModifyRGB(bool opacityModifyRGB) override { _opacityModifyRGB = opacityModifyRGB; } bool isOpacityModifyRGB() const override { return _opacityModifyRGB; } - CC_DEPRECATED_ATTRIBUTE bool getOpacityModifyRGB() const { return isOpacityModifyRGB(); } /** Gets the particles movement type: Free or Grouped. @since v0.8 @@ -834,8 +827,8 @@ class CC_DLL ParticleSystem : public Node, public TextureProtocol, public Playab /** whether or not the particles are using blend additive. If enabled, the following blending function will be used. @code - source blend function = GL_SRC_ALPHA; - dest blend function = GL_ONE; + source blend function = BlendFactor::SRC_ALPHA; + dest blend function = BlendFactor::ONE; @endcode */ bool _isBlendAdditive; diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index a14e4540d97f..1253ba2cc510 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -42,15 +42,31 @@ THE SOFTWARE. #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" #include "base/ccUTF8.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN ParticleSystemQuad::ParticleSystemQuad() -:_quads(nullptr) -,_indices(nullptr) -,_VAOname(0) { - memset(_buffersVBO, 0, sizeof(_buffersVBO)); + auto& pipelieDescriptor = _quadCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + pipelieDescriptor.programState = _programState; + _mvpMatrixLocaiton = pipelieDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelieDescriptor.programState->getUniformLocation("u_texture"); + + //set vertexLayout according to V3F_C4B_T2F structure +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + auto& vertexLayout = pipelieDescriptor.vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); } ParticleSystemQuad::~ParticleSystemQuad() @@ -59,13 +75,8 @@ ParticleSystemQuad::~ParticleSystemQuad() { CC_SAFE_FREE(_quads); CC_SAFE_FREE(_indices); - glDeleteBuffers(2, &_buffersVBO[0]); - if (Configuration::getInstance()->supportsShareableVAO()) - { - glDeleteVertexArrays(1, &_VAOname); - glBindVertexArray(0); - } } + CC_SAFE_RELEASE(_programState); } // implementation ParticleSystemQuad @@ -119,16 +130,7 @@ bool ParticleSystemQuad::initWithTotalParticles(int numberOfParticles) } initIndices(); - if (Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOandVAO(); - } - else - { - setupVBO(); - } - - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); +// setupVBO(); #if CC_ENABLE_CACHE_TEXTURE_DATA // Need to listen the event only when not use batchnode, because it will use VBO @@ -432,34 +434,19 @@ void ParticleSystemQuad::updateParticleQuads() } } -void ParticleSystemQuad::postStep() -{ - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - - // Option 1: Sub Data - glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(_quads[0])*_totalParticles, _quads); - - // Option 2: Data - // glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * particleCount, quads_, GL_DYNAMIC_DRAW); - - // Option 3: Orphaning + glMapBuffer - // glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0])*_totalParticles, nullptr, GL_STREAM_DRAW); - // void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - // memcpy(buf, _quads, sizeof(_quads[0])*_totalParticles); - // glUnmapBuffer(GL_ARRAY_BUFFER); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); -} - // overriding draw method void ParticleSystemQuad::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { //quad command if(_particleCount > 0) { - _quadCommand.init(_globalZOrder, _texture, getGLProgramState(), _blendFunc, _quads, _particleCount, transform, flags); + auto programState = _quadCommand.getPipelineDescriptor().programState; + programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); + + cocos2d::Mat4 projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + programState->setUniform(_mvpMatrixLocaiton, projectionMat.m, sizeof(projectionMat.m)); + + _quadCommand.init(_globalZOrder, _texture, _blendFunc, _quads, _particleCount, transform, flags); renderer->addCommand(&_quadCommand); } } @@ -517,14 +504,7 @@ void ParticleSystemQuad::setTotalParticles(int tp) } initIndices(); - if (Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOandVAO(); - } - else - { - setupVBO(); - } +// setupVBO(); // fixed http://www.cocos2d-x.org/issues/3990 // Updates texture coords. @@ -542,77 +522,20 @@ void ParticleSystemQuad::setTotalParticles(int tp) resetSystem(); } -void ParticleSystemQuad::setupVBOandVAO() -{ - // clean VAO - glDeleteBuffers(2, &_buffersVBO[0]); - glDeleteVertexArrays(1, &_VAOname); - glBindVertexArray(0); - - glGenVertexArrays(1, &_VAOname); - glBindVertexArray(_VAOname); - -#define kQuadSize sizeof(_quads[0].bl) - - glGenBuffers(2, &_buffersVBO[0]); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _totalParticles, _quads, GL_DYNAMIC_DRAW); - - // vertices - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, vertices)); - - // colors - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, colors)); - - // tex coords - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, texCoords)); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _totalParticles * 6, _indices, GL_STATIC_DRAW); - - // Must unbind the VAO before changing the element buffer. - glBindVertexArray(0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); -} - -void ParticleSystemQuad::setupVBO() -{ - glDeleteBuffers(2, &_buffersVBO[0]); - - glGenBuffers(2, &_buffersVBO[0]); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _totalParticles, _quads, GL_DYNAMIC_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _totalParticles * 6, _indices, GL_STATIC_DRAW); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); -} - void ParticleSystemQuad::listenRendererRecreated(EventCustom* /*event*/) { //when comes to foreground in android, _buffersVBO and _VAOname is a wild handle //before recreating, we need to reset them to 0 - memset(_buffersVBO, 0, sizeof(_buffersVBO)); - if (Configuration::getInstance()->supportsShareableVAO()) - { - _VAOname = 0; - setupVBOandVAO(); - } - else - { - setupVBO(); - } +// memset(_buffersVBO, 0, sizeof(_buffersVBO)); +// if (Configuration::getInstance()->supportsShareableVAO()) +// { +// _VAOname = 0; +// setupVBOandVAO(); +// } +// else +// { +// setupVBO(); +// } } bool ParticleSystemQuad::allocMemory() @@ -654,14 +577,7 @@ void ParticleSystemQuad::setBatchNode(ParticleBatchNode * batchNode) allocMemory(); initIndices(); setTexture(oldBatch->getTexture()); - if (Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOandVAO(); - } - else - { - setupVBO(); - } +// setupVBO(); } // OLD: was it self render ? cleanup else if( !oldBatch ) @@ -673,15 +589,6 @@ void ParticleSystemQuad::setBatchNode(ParticleBatchNode * batchNode) CC_SAFE_FREE(_quads); CC_SAFE_FREE(_indices); - - glDeleteBuffers(2, &_buffersVBO[0]); - memset(_buffersVBO, 0, sizeof(_buffersVBO)); - if (Configuration::getInstance()->supportsShareableVAO()) - { - glDeleteVertexArrays(1, &_VAOname); - glBindVertexArray(0); - _VAOname = 0; - } } } } diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index 0d651277fc92..29ff4bd0c839 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -26,8 +26,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CC_PARTICLE_SYSTEM_QUAD_H__ -#define __CC_PARTICLE_SYSTEM_QUAD_H__ +#pragma once #include "2d/CCParticleSystem.h" #include "renderer/CCQuadCommand.h" @@ -121,11 +120,6 @@ class CC_DLL ParticleSystemQuad : public ParticleSystem * @lua NA */ virtual void updateParticleQuads() override; - /** - * @js NA - * @lua NA - */ - virtual void postStep() override; /** * @js NA * @lua NA @@ -162,8 +156,6 @@ class CC_DLL ParticleSystemQuad : public ParticleSystem * @lua NA */ virtual bool initWithTotalParticles(int numberOfParticles) override; - - protected: /** initializes the indices for the vertices*/ @@ -175,19 +167,17 @@ class CC_DLL ParticleSystemQuad : public ParticleSystem /** Updates texture coords */ void updateTexCoords(); - void setupVBOandVAO(); - void setupVBO(); bool allocMemory(); - V3F_C4B_T2F_Quad *_quads; // quads to be rendered - GLushort *_indices; // indices - GLuint _VAOname; - GLuint _buffersVBO[2]; //0: vertex 1: indices + V3F_C4B_T2F_Quad *_quads = nullptr; // quads to be rendered + unsigned short *_indices = nullptr; // indices QuadCommand _quadCommand; // quad command - - + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _textureLocation; + backend::ProgramState* _programState = nullptr; + private: CC_DISALLOW_COPY_AND_ASSIGN(ParticleSystemQuad); }; @@ -196,6 +186,3 @@ class CC_DLL ParticleSystemQuad : public ParticleSystem /// @} NS_CC_END - -#endif //__CC_PARTICLE_SYSTEM_QUAD_H__ - diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 66cddbcf049f..f1acf8cf0697 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -33,6 +33,8 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "renderer/CCRenderer.h" #include "base/ccUtils.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN @@ -40,17 +42,41 @@ NS_CC_BEGIN // kProgressTextureCoords holds points {0,1} {0,0} {1,0} {1,1} we can represent it as bits const char kProgressTextureCoords = 0x4b; +namespace +{ + void initPipelineDescriptor(cocos2d::CustomCommand& command, bool ridal) + { + auto& pipelieDescriptor = command.getPipelineDescriptor(); + auto programState = new (std::nothrow) backend::ProgramState(positionTextureColor_vert, positionTextureColor_frag); + CC_SAFE_RELEASE(pipelieDescriptor.programState); + pipelieDescriptor.programState = programState; + + //set vertexLayout according to V2F_C4B_T2F structure + #define VERTEX_POSITION_SIZE 2 + #define VERTEX_TEXCOORD_SIZE 2 + #define VERTEX_COLOR_SIZE 4 + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + auto& vertexLayout = pipelieDescriptor.vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); + + if (ridal) + { + command.setDrawType(CustomCommand::DrawType::ELEMENT); + command.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); + } + else + { + command.setDrawType(CustomCommand::DrawType::ARRAY); + command.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE_STRIP); + } + } +} -ProgressTimer::ProgressTimer() -:_type(Type::RADIAL) -,_midpoint(0,0) -,_barChangeRate(0,0) -,_percentage(0.0f) -,_sprite(nullptr) -,_vertexDataCount(0) -,_vertexData(nullptr) -,_reverseDirection(false) -{} ProgressTimer* ProgressTimer::create(Sprite* sp) { @@ -67,26 +93,24 @@ ProgressTimer* ProgressTimer::create(Sprite* sp) bool ProgressTimer::initWithSprite(Sprite* sp) { - setPercentage(0.0f); - _vertexData = nullptr; - _vertexDataCount = 0; - setAnchorPoint(Vec2(0.5f,0.5f)); - _type = Type::RADIAL; - _reverseDirection = false; setMidpoint(Vec2(0.5f, 0.5f)); setBarChangeRate(Vec2(1,1)); setSprite(sp); - // shader state - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR, sp->getTexture())); + CC_SAFE_RELEASE(_programState); + CC_SAFE_RELEASE(_programState2); + initPipelineDescriptor(_customCommand, true); + initPipelineDescriptor(_customCommand2, false); + return true; } ProgressTimer::~ProgressTimer(void) { - CC_SAFE_FREE(_vertexData); CC_SAFE_RELEASE(_sprite); + CC_SAFE_RELEASE(_customCommand.getPipelineDescriptor().programState); + CC_SAFE_RELEASE(_customCommand2.getPipelineDescriptor().programState); } void ProgressTimer::setPercentage(float percentage) @@ -118,10 +142,9 @@ void ProgressTimer::setSprite(Sprite *sprite) setContentSize(_sprite->getContentSize()); // Every time we set a new sprite, we free the current vertex data - if (_vertexData) + if (!_vertexData.empty()) { - CC_SAFE_FREE(_vertexData); - _vertexDataCount = 0; + _vertexData.clear(); updateProgress(); } } @@ -129,16 +152,22 @@ void ProgressTimer::setSprite(Sprite *sprite) void ProgressTimer::setType(Type type) { + + if (type == Type::RADIAL) + { + _customCommand.setDrawType(CustomCommand::DrawType::ELEMENT); + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE); + } + else + { + _customCommand.setPrimitiveType(CustomCommand::PrimitiveType::TRIANGLE_STRIP); + _customCommand.setDrawType(CustomCommand::DrawType::ARRAY); + } + if (type != _type) { // release all previous information - if (_vertexData) - { - CC_SAFE_FREE(_vertexData); - _vertexData = nullptr; - _vertexDataCount = 0; - } - + _vertexData.clear(); _type = type; } } @@ -147,10 +176,8 @@ void ProgressTimer::setReverseDirection(bool reverse) { if( _reverseDirection != reverse ) { _reverseDirection = reverse; - // release all previous information - CC_SAFE_FREE(_vertexData); - _vertexDataCount = 0; + _vertexData.clear(); } } @@ -189,23 +216,22 @@ Vec2 ProgressTimer::vertexFromAlphaPoint(Vec2 alpha) return ret; } -void ProgressTimer::updateColor(void) +void ProgressTimer::updateColor() { - if (!_sprite) { + if (!_sprite) return; - } - if (_vertexData) + if (!_vertexData.empty()) { - Color4B sc = _sprite->getQuad().tl.colors; - for (int i = 0; i < _vertexDataCount; ++i) + const Color4B& sc = _sprite->getQuad().tl.colors; + for (int i = 0; i < _vertexData.size(); ++i) { _vertexData[i].colors = sc; - } + } } } -void ProgressTimer::updateProgress(void) +void ProgressTimer::updateProgress() { switch (_type) { @@ -344,7 +370,6 @@ void ProgressTimer::updateRadial(void) // Now that we have the minimum magnitude we can use that to find our intersection hit = _midpoint+ ((percentagePt - _midpoint) * min_t); - } @@ -352,22 +377,21 @@ void ProgressTimer::updateRadial(void) // the 3 is for the _midpoint, 12 o'clock point and hitpoint position. bool sameIndexCount = true; - if(_vertexDataCount != index + 3){ + if (_vertexData.size() != index + 3) + { sameIndexCount = false; - CC_SAFE_FREE(_vertexData); - _vertexDataCount = 0; + _vertexData.resize(index + 3); + _customCommand.createVertexBuffer(sizeof(_vertexData[0]), (unsigned int)_vertexData.size(), CustomCommand::BufferUsage::DYNAMIC); } - - if(!_vertexData) { - _vertexDataCount = index + 3; - _vertexData = (V2F_C4B_T2F*)malloc(_vertexDataCount * sizeof(V2F_C4B_T2F)); - CCASSERT( _vertexData, "CCProgressTimer. Not enough memory"); + if (_indexData.size() != 3 + 3 * index) + { + _indexData.resize(3 + 3 * index); + _customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, (unsigned int)_indexData.size(), CustomCommand::BufferUsage::STATIC); } - updateColor(); - - if (!sameIndexCount) { + if (!sameIndexCount) + { // First we populate the array with the _midpoint, then all // vertices/texcoords/colors of the 12 'o clock start and edges and the hitpoint _vertexData[0].texCoords = textureCoordFromAlphaPoint(_midpoint); @@ -376,17 +400,29 @@ void ProgressTimer::updateRadial(void) _vertexData[1].texCoords = textureCoordFromAlphaPoint(topMid); _vertexData[1].vertices = vertexFromAlphaPoint(topMid); - for(int i = 0; i < index; ++i){ + for(int i = 0; i < index; ++i) + { Vec2 alphaPoint = boundaryTexCoord(i); _vertexData[i+2].texCoords = textureCoordFromAlphaPoint(alphaPoint); _vertexData[i+2].vertices = vertexFromAlphaPoint(alphaPoint); } + + for (int i = 0; i < index + 1; i++) + { + _indexData[i * 3] = 0; + _indexData[i * 3 + 1] = i + 2; + _indexData[i * 3 + 2] = i + 1; + } + + _customCommand.updateIndexBuffer(_indexData.data(), (unsigned int)(_indexData.size() * sizeof(_indexData[0])) ); } // hitpoint will go last - _vertexData[_vertexDataCount - 1].texCoords = textureCoordFromAlphaPoint(hit); - _vertexData[_vertexDataCount - 1].vertices = vertexFromAlphaPoint(hit); + _vertexData[_vertexData.size() - 1].texCoords = textureCoordFromAlphaPoint(hit); + _vertexData[_vertexData.size() - 1].vertices = vertexFromAlphaPoint(hit); + updateColor(); + _customCommand.updateVertexBuffer(_vertexData.data(), sizeof(_vertexData[0]) * _vertexData.size()); } /// @@ -400,9 +436,9 @@ void ProgressTimer::updateRadial(void) /// void ProgressTimer::updateBar(void) { - if (!_sprite) { + if (!_sprite) return; - } + float alpha = _percentage / 100.0f; Vec2 alphaOffset = Vec2(1.0f * (1.0f - _barChangeRate.x) + alpha * _barChangeRate.x, 1.0f * (1.0f - _barChangeRate.y) + alpha * _barChangeRate.y) * 0.5f; Vec2 min = _midpoint - alphaOffset; @@ -430,11 +466,13 @@ void ProgressTimer::updateBar(void) if (!_reverseDirection) { - if(!_vertexData) { - _vertexDataCount = 4; - _vertexData = (V2F_C4B_T2F*)malloc(_vertexDataCount * sizeof(V2F_C4B_T2F)); - CCASSERT( _vertexData, "CCProgressTimer. Not enough memory"); + + if (_vertexData.size() != 4) + { + _vertexData.resize(4); + _customCommand.createVertexBuffer(sizeof(_vertexData[0]), _vertexData.size(), CustomCommand::BufferUsage::DYNAMIC); } + // TOPLEFT _vertexData[0].texCoords = textureCoordFromAlphaPoint(Vec2(min.x,max.y)); _vertexData[0].vertices = vertexFromAlphaPoint(Vec2(min.x,max.y)); @@ -450,11 +488,15 @@ void ProgressTimer::updateBar(void) // BOTRIGHT _vertexData[3].texCoords = textureCoordFromAlphaPoint(Vec2(max.x,min.y)); _vertexData[3].vertices = vertexFromAlphaPoint(Vec2(max.x,min.y)); + + updateColor(); + + _customCommand.updateVertexBuffer(_vertexData.data(), sizeof(_vertexData[0]) * _vertexData.size()); } else { - if(!_vertexData) { - _vertexDataCount = 8; - _vertexData = (V2F_C4B_T2F*)malloc(_vertexDataCount * sizeof(V2F_C4B_T2F)); - CCASSERT( _vertexData, "CCProgressTimer. Not enough memory"); + if(_vertexData.size() != 8) { + _vertexData.resize(8); + _customCommand.createVertexBuffer(sizeof(_vertexData[0]), _vertexData.size() / 2, CustomCommand::BufferUsage::DYNAMIC); + _customCommand2.createVertexBuffer(sizeof(_vertexData[0]), _vertexData.size() / 2, CustomCommand::BufferUsage::DYNAMIC); // TOPLEFT 1 _vertexData[0].texCoords = textureCoordFromAlphaPoint(Vec2(0,1)); _vertexData[0].vertices = vertexFromAlphaPoint(Vec2(0,1)); @@ -487,71 +529,66 @@ void ProgressTimer::updateBar(void) // BOTLEFT 2 _vertexData[5].texCoords = textureCoordFromAlphaPoint(Vec2(max.x,min.y)); _vertexData[5].vertices = vertexFromAlphaPoint(Vec2(max.x,min.y)); + + updateColor(); + + _customCommand.updateVertexBuffer(_vertexData.data(), sizeof(_vertexData[0]) * _vertexData.size() / 2); + _customCommand2.updateVertexBuffer((char*)_vertexData.data() + sizeof(_vertexData[0]) * _vertexData.size() / 2, sizeof(_vertexData[0]) * _vertexData.size() / 2); } - updateColor(); } Vec2 ProgressTimer::boundaryTexCoord(char index) { - if (index < kProgressTextureCoordsCount) { - if (_reverseDirection) { + if (index < kProgressTextureCoordsCount) + { + if (_reverseDirection) return Vec2((kProgressTextureCoords>>(7-(index<<1)))&1,(kProgressTextureCoords>>(7-((index<<1)+1)))&1); - } else { + else return Vec2((kProgressTextureCoords>>((index<<1)+1))&1,(kProgressTextureCoords>>(index<<1))&1); - } } - return Vec2::ZERO; + else + return Vec2::ZERO; } -void ProgressTimer::onDraw(const Mat4 &transform, uint32_t /*flags*/) +void ProgressTimer::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { + if( _vertexData.empty() || ! _sprite) + return; - getGLProgram()->use(); - getGLProgram()->setUniformsForBuiltins(transform); - - utils::setBlending(_sprite->getBlendFunc().src, _sprite->getBlendFunc().dst); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _sprite->getTexture()->getName()); - - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]) , &_vertexData[0].vertices); - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]), &_vertexData[0].texCoords); - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(_vertexData[0]), &_vertexData[0].colors); + const cocos2d::Mat4& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + Mat4 finalMat = projectionMat * transform; + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + auto mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + auto textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + pipelineDescriptor.programState->setUniform(mvpMatrixLocation, finalMat.m, sizeof(finalMat.m)); + pipelineDescriptor.programState->setTexture(textureLocation, 0, _sprite->getTexture()->getBackendTexture()); - if(_type == Type::RADIAL) - { - glDrawArrays(GL_TRIANGLE_FAN, 0, _vertexDataCount); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_vertexDataCount); - } - else if (_type == Type::BAR) + if(_type == Type::BAR) { - if (!_reverseDirection) + if (!_reverseDirection) { - glDrawArrays(GL_TRIANGLE_STRIP, 0, _vertexDataCount); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_vertexDataCount); + _customCommand.init(_globalZOrder, _sprite->getBlendFunc()); + renderer->addCommand(&_customCommand); } - else + else { - glDrawArrays(GL_TRIANGLE_STRIP, 0, _vertexDataCount/2); - glDrawArrays(GL_TRIANGLE_STRIP, 4, _vertexDataCount/2); - // 2 draw calls - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(2,_vertexDataCount); + _customCommand.init(_globalZOrder, _sprite->getBlendFunc()); + renderer->addCommand(&_customCommand); + + _customCommand2.init(_globalZOrder, _sprite->getBlendFunc()); + auto& pipelineDescriptor2 = _customCommand2.getPipelineDescriptor(); + auto mvpMatrixLocation = pipelineDescriptor2.programState->getUniformLocation("u_MVPMatrix"); + auto textureLocaiton = pipelineDescriptor2.programState->getUniformLocation("u_texture"); + pipelineDescriptor2.programState->setUniform(mvpMatrixLocation, finalMat.m, sizeof(finalMat.m)); + pipelineDescriptor2.programState->setTexture(textureLocaiton, 0, _sprite->getTexture()->getBackendTexture()); + renderer->addCommand(&_customCommand2); } } -} - -void ProgressTimer::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) -{ - if( ! _vertexData || ! _sprite) - return; - - _customCommand.init(_globalZOrder, transform, flags); - _customCommand.func = CC_CALLBACK_0(ProgressTimer::onDraw, this, transform, flags); - renderer->addCommand(&_customCommand); + else + { + _customCommand.init(_globalZOrder, _sprite->getBlendFunc()); + renderer->addCommand(&_customCommand); + } } diff --git a/cocos/2d/CCProgressTimer.h b/cocos/2d/CCProgressTimer.h index f19b0bcc21e0..d025a3756c67 100644 --- a/cocos/2d/CCProgressTimer.h +++ b/cocos/2d/CCProgressTimer.h @@ -24,11 +24,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __MISC_NODE_CCPROGRESS_TIMER_H__ -#define __MISC_NODE_CCPROGRESS_TIMER_H__ +#pragma once #include "renderer/CCCustomCommand.h" #include "2d/CCNode.h" +#include "renderer/CCPipelineDescriptor.h" + +#include NS_CC_BEGIN @@ -112,14 +114,6 @@ class CC_DLL ProgressTimer : public Node */ void setReverseDirection(bool value); - /** Set the Reverse direction. - * @js setReverseDirection - * @lua setReverseDirection - * @param reverse If reverse is false it will clockwise,if is true it will Anti-clockwise. - */ - CC_DEPRECATED_ATTRIBUTE void setReverseProgress(bool reverse) { setReverseDirection(reverse); } - - /** * Midpoint is used to modify the progress start position. * If you're using radials type then the midpoint changes the center point. @@ -166,7 +160,7 @@ class CC_DLL ProgressTimer : public Node /** * @js ctor */ - ProgressTimer(); + ProgressTimer() = default; /** * @js NA * @lua NA @@ -177,27 +171,28 @@ class CC_DLL ProgressTimer : public Node bool initWithSprite(Sprite* sp); protected: - void onDraw(const Mat4 &transform, uint32_t flags); - Tex2F textureCoordFromAlphaPoint(Vec2 alpha); Vec2 vertexFromAlphaPoint(Vec2 alpha); - void updateProgress(void); - void updateBar(void); - void updateRadial(void); - virtual void updateColor(void) override; + void updateProgress(); + void updateBar(); + void updateRadial(); + virtual void updateColor() override; Vec2 boundaryTexCoord(char index); - Type _type; + Type _type = Type::RADIAL; Vec2 _midpoint; Vec2 _barChangeRate; - float _percentage; - Sprite *_sprite; - int _vertexDataCount; - V2F_C4B_T2F *_vertexData; + float _percentage = 0.0f; + Sprite *_sprite = nullptr; + std::vector _vertexData; + std::vector _indexData; + bool _reverseDirection = false; CustomCommand _customCommand; - - bool _reverseDirection; + CustomCommand _customCommand2; + + backend::ProgramState* _programState = nullptr; + backend::ProgramState* _programState2 = nullptr; private: CC_DISALLOW_COPY_AND_ASSIGN(ProgressTimer); @@ -207,5 +202,3 @@ class CC_DLL ProgressTimer : public Node /// @} NS_CC_END - -#endif //__MISC_NODE_CCPROGRESS_TIMER_H__ diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index fb63b9cac6cd..649998e598e8 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -24,7 +24,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "2d/CCRenderTexture.h" #include "base/ccUtils.h" @@ -37,31 +36,13 @@ THE SOFTWARE. #include "renderer/CCRenderer.h" #include "2d/CCCamera.h" #include "renderer/CCTextureCache.h" +#include "renderer/backend/Device.h" +#include "renderer/backend/Texture.h" NS_CC_BEGIN // implementation RenderTexture RenderTexture::RenderTexture() -: _keepMatrix(false) -, _rtTextureRect(Rect::ZERO) -, _fullRect(Rect::ZERO) -, _fullviewPort(Rect::ZERO) -, _FBO(0) -, _depthRenderBuffer(0) -, _stencilRenderBuffer(0) -, _oldFBO(0) -, _texture(0) -, _textureCopy(0) -, _UITextureImage(nullptr) -, _pixelFormat(Texture2D::PixelFormat::RGBA8888) -, _depthAndStencilFormat(0) -, _clearFlags(0) -, _clearColor(Color4F(0,0,0,0)) -, _clearDepth(0.0f) -, _clearStencil(0) -, _autoDraw(false) -, _sprite(nullptr) -, _saveFileCallback(nullptr) { #if CC_ENABLE_CACHE_TEXTURE_DATA // Listen this event to save render texture before come to background. @@ -77,18 +58,8 @@ RenderTexture::RenderTexture() RenderTexture::~RenderTexture() { CC_SAFE_RELEASE(_sprite); - CC_SAFE_RELEASE(_textureCopy); - - glDeleteFramebuffers(1, &_FBO); - if (_depthRenderBuffer) - { - glDeleteRenderbuffers(1, &_depthRenderBuffer); - } - - if (_stencilRenderBuffer) - { - glDeleteRenderbuffers(1, &_stencilRenderBuffer); - } + CC_SAFE_RELEASE(_texture2DCopy); + CC_SAFE_RELEASE(_depthStencilTexture); CC_SAFE_DELETE(_UITextureImage); } @@ -105,63 +76,36 @@ void RenderTexture::listenToBackground(EventCustom* /*event*/) if (_UITextureImage) { - const Size& s = _texture->getContentSizeInPixels(); - VolatileTextureMgr::addDataTexture(_texture, _UITextureImage->getData(), s.width * s.height * 4, Texture2D::PixelFormat::RGBA8888, s); + const Size& s = _texture2D->getContentSizeInPixels(); + VolatileTextureMgr::addDataTexture(_texture2D, _UITextureImage->getData(), s.width * s.height * 4, Texture2D::PixelFormat::RGBA8888, s); - if ( _textureCopy ) + if ( _texture2DCopy ) { - VolatileTextureMgr::addDataTexture(_textureCopy, _UITextureImage->getData(), s.width * s.height * 4, Texture2D::PixelFormat::RGBA8888, s); + VolatileTextureMgr::addDataTexture(_texture2DCopy, _UITextureImage->getData(), s.width * s.height * 4, Texture2D::PixelFormat::RGBA8888, s); } } else { CCLOG("Cache rendertexture failed!"); } - - glDeleteFramebuffers(1, &_FBO); - _FBO = 0; - - if (_depthRenderBuffer) - { - glDeleteRenderbuffers(1, &_depthRenderBuffer); - _depthRenderBuffer = 0; - } - - if (_stencilRenderBuffer) - { - glDeleteRenderbuffers(1, &_stencilRenderBuffer); - _stencilRenderBuffer = 0; - } #endif } void RenderTexture::listenToForeground(EventCustom* /*event*/) { #if CC_ENABLE_CACHE_TEXTURE_DATA - // -- regenerate frame buffer object and attach the texture - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - - GLint oldRBO; - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRBO); + const Size& s = _texture2D->getContentSizeInPixels(); + //TODO new-renderer: field _depthAndStencilFormat removal +// if (_depthAndStencilFormat != 0) +// { +// setupDepthAndStencil(s.width, s.height); +// } - glGenFramebuffers(1, &_FBO); - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - - const Size& s = _texture->getContentSizeInPixels(); - if (_depthAndStencilFormat != 0) + _texture2D->setAntiAliasTexParameters(); + if(_texture2DCopy) { - setupDepthAndStencil(s.width, s.height); + _texture2DCopy->setAntiAliasTexParameters(); } - - _texture->setAntiAliasTexParameters(); - if(_textureCopy) - { - _textureCopy->setAntiAliasTexParameters(); - } - - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0); - glBindRenderbuffer(GL_RENDERBUFFER, oldRBO); - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); #endif } @@ -178,7 +122,7 @@ RenderTexture * RenderTexture::create(int w, int h, Texture2D::PixelFormat eForm return nullptr; } -RenderTexture * RenderTexture::create(int w ,int h, Texture2D::PixelFormat eFormat, GLuint uDepthStencilFormat) +RenderTexture * RenderTexture::create(int w ,int h, Texture2D::PixelFormat eFormat, TextureFormat uDepthStencilFormat) { RenderTexture *ret = new (std::nothrow) RenderTexture(); @@ -195,7 +139,7 @@ RenderTexture * RenderTexture::create(int w, int h) { RenderTexture *ret = new (std::nothrow) RenderTexture(); - if(ret && ret->initWithWidthAndHeight(w, h, Texture2D::PixelFormat::RGBA8888, 0)) + if(ret && ret->initWithWidthAndHeight(w, h, Texture2D::PixelFormat::RGBA8888, TextureFormat::NONE)) { ret->autorelease(); return ret; @@ -206,106 +150,94 @@ RenderTexture * RenderTexture::create(int w, int h) bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat eFormat) { - return initWithWidthAndHeight(w, h, eFormat, 0); + return initWithWidthAndHeight(w, h, eFormat, TextureFormat::NONE); } -bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, GLuint depthStencilFormat) +bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, TextureFormat depthStencilFormat) { CCASSERT(format != Texture2D::PixelFormat::A8, "only RGB and RGBA formats are valid for a render texture"); bool ret = false; - void *data = nullptr; - do + do { _fullRect = _rtTextureRect = Rect(0,0,w,h); - //Size size = Director::getInstance()->getWinSizeInPixels(); - //_fullviewPort = Rect(0,0,size.width,size.height); w = (int)(w * CC_CONTENT_SCALE_FACTOR()); h = (int)(h * CC_CONTENT_SCALE_FACTOR()); _fullviewPort = Rect(0,0,w,h); - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - // textures must be power of two squared int powW = 0; int powH = 0; - if (Configuration::getInstance()->supportsNPOT()) +// if (Configuration::getInstance()->supportsNPOT()) +// { +// powW = w; +// powH = h; +// } +// else +// { +// powW = ccNextPOT(w); +// powH = ccNextPOT(h); +// } + powW = w; + powH = h; + + backend::TextureDescriptor descriptor; + descriptor.width = powW; + descriptor.height = powH; + descriptor.textureUsage = TextureUsage::RENDER_TARGET; + descriptor.textureFormat = TextureFormat::R8G8B8A8; + auto texture = backend::Device::getInstance()->newTexture(descriptor); + if (! texture) + break; + + _texture2D = new (std::nothrow) Texture2D(); + if (_texture2D) { - powW = w; - powH = h; + _texture2D->initWithBackendTexture(texture); + texture->release(); } else - { - powW = ccNextPOT(w); - powH = ccNextPOT(h); - } + break; - auto dataLen = powW * powH * 4; - data = malloc(dataLen); - CC_BREAK_IF(! data); + _renderTargetFlags = RenderTargetFlag::COLOR; - memset(data, 0, dataLen); - _pixelFormat = format; + clearColorAttachment(); - _texture = new (std::nothrow) Texture2D(); - if (_texture) + if (TextureFormat::D24S8 == depthStencilFormat) { - _texture->initWithData(data, dataLen, (Texture2D::PixelFormat)_pixelFormat, powW, powH, Size((float)w, (float)h)); - } - else - { - break; - } - GLint oldRBO; - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRBO); - - if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) - { - _textureCopy = new (std::nothrow) Texture2D(); - if (_textureCopy) - { - _textureCopy->initWithData(data, dataLen, (Texture2D::PixelFormat)_pixelFormat, powW, powH, Size((float)w, (float)h)); - } - else + descriptor.textureFormat = depthStencilFormat; + texture = backend::Device::getInstance()->newTexture(descriptor); + if (! texture) + break; + + _depthStencilTexture = new (std::nothrow) Texture2D; + if (!_depthStencilTexture) { + texture->release(); break; } - } - - // generate FBO - glGenFramebuffers(1, &_FBO); - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - // associate texture with FBO - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0); - - if (depthStencilFormat != 0) - { - _depthAndStencilFormat = depthStencilFormat; - setupDepthAndStencil(powW, powH); + _depthStencilTexture->initWithBackendTexture(texture); + texture->release(); } - // check if it worked (probably worth doing :) ) - CCASSERT(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Could not attach texture to framebuffer"); - - _texture->setAntiAliasTexParameters(); - if (_textureCopy) + _texture2D->setAntiAliasTexParameters(); + if (_texture2DCopy) { - _textureCopy->setAntiAliasTexParameters(); + _texture2DCopy->setAntiAliasTexParameters(); } // retained - setSprite(Sprite::createWithTexture(_texture)); + setSprite(Sprite::createWithTexture(_texture2D)); - _texture->release(); - _sprite->setFlippedY(true); + _texture2D->release(); +#if defined(CC_USE_GL) || defined(CC_USE_GLES) + _sprite->setFlippedY(true); +#endif _sprite->setBlendFunc( BlendFunc::ALPHA_PREMULTIPLIED ); _sprite->setOpacityModifyRGB(true); - - glBindRenderbuffer(GL_RENDERBUFFER, oldRBO); - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); // Disabled by default. _autoDraw = false; @@ -316,66 +248,9 @@ bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat ret = true; } while (0); - CC_SAFE_FREE(data); - return ret; } -void RenderTexture::setupDepthAndStencil(int powW, int powH) -{ - -#if(CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - if(Configuration::getInstance()->supportsOESPackedDepthStencil()) - { - //create and attach depth buffer - glGenRenderbuffers(1, &_depthRenderBuffer); - glBindRenderbuffer(GL_RENDERBUFFER, _depthRenderBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, _depthAndStencilFormat, (GLsizei)powW, (GLsizei)powH); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _depthRenderBuffer); - - // if depth format is the one with stencil part, bind same render buffer as stencil attachment - if (_depthAndStencilFormat == GL_DEPTH24_STENCIL8) - { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, _depthRenderBuffer); - } - } - else - { - glGenRenderbuffers(1, &_depthRenderBuffer); - glGenRenderbuffers(1, &_stencilRenderBuffer); - glBindRenderbuffer(GL_RENDERBUFFER, _depthRenderBuffer); - - if(Configuration::getInstance()->supportsOESDepth24()) - { - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24_OES, (GLsizei)powW, (GLsizei)powH); - } - else - { - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, (GLsizei)powW, (GLsizei)powH); - } - - glBindRenderbuffer(GL_RENDERBUFFER, _stencilRenderBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, (GLsizei)powW, (GLsizei)powH); - - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _depthRenderBuffer); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, - GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, _stencilRenderBuffer); - } -#else - //create and attach depth buffer - glGenRenderbuffers(1, &_depthRenderBuffer); - glBindRenderbuffer(GL_RENDERBUFFER, _depthRenderBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, _depthAndStencilFormat, (GLsizei)powW, (GLsizei)powH); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _depthRenderBuffer); - - // if depth format is the one with stencil part, bind same render buffer as stencil attachment - if (_depthAndStencilFormat == GL_DEPTH24_STENCIL8) - { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, _depthRenderBuffer); - } -#endif -} - void RenderTexture::setSprite(Sprite* sprite) { #if CC_ENABLE_GC_FOR_NATIVE_OBJECTS @@ -393,11 +268,6 @@ void RenderTexture::setSprite(Sprite* sprite) _sprite = sprite; } -void RenderTexture::setKeepMatrix(bool keepMatrix) -{ - _keepMatrix = keepMatrix; -} - void RenderTexture::setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport) { _rtTextureRect.origin.x = rtBegin.x; @@ -410,69 +280,42 @@ void RenderTexture::setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect void RenderTexture::beginWithClear(float r, float g, float b, float a) { - beginWithClear(r, g, b, a, 0, 0, GL_COLOR_BUFFER_BIT); + beginWithClear(r, g, b, a, 0, 0, ClearFlag::COLOR); } void RenderTexture::beginWithClear(float r, float g, float b, float a, float depthValue) { - beginWithClear(r, g, b, a, depthValue, 0, GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + beginWithClear(r, g, b, a, depthValue, 0, ClearFlag::COLOR | ClearFlag::DEPTH); } void RenderTexture::beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue) { - beginWithClear(r, g, b, a, depthValue, stencilValue, GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); + beginWithClear(r, g, b, a, depthValue, stencilValue, ClearFlag::ALL); } -void RenderTexture::beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, GLbitfield flags) +void RenderTexture::beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, ClearFlag flags) { setClearColor(Color4F(r, g, b, a)); - setClearDepth(depthValue); - setClearStencil(stencilValue); - setClearFlags(flags); - - this->begin(); - - //clear screen - _beginWithClearCommand.init(_globalZOrder); - _beginWithClearCommand.func = CC_CALLBACK_0(RenderTexture::onClear, this); - Director::getInstance()->getRenderer()->addCommand(&_beginWithClearCommand); + begin(); + Director::getInstance()->getRenderer()->clear(_clearFlags, _clearColor, _clearDepth, _clearStencil); } -//TODO: find a better way to clear the screen, there is no need to rebind render buffer there. void RenderTexture::clear(float r, float g, float b, float a) { - this->beginWithClear(r, g, b, a); - this->end(); + setClearColor(Color4F(r, g, b, a)); } void RenderTexture::clearDepth(float depthValue) { setClearDepth(depthValue); - - this->begin(); - - _clearDepthCommand.init(_globalZOrder); - _clearDepthCommand.func = CC_CALLBACK_0(RenderTexture::onClearDepth, this); - - Director::getInstance()->getRenderer()->addCommand(&_clearDepthCommand); - - this->end(); } void RenderTexture::clearStencil(int stencilValue) { - // save old stencil value - int stencilClearValue; - glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &stencilClearValue); - - glClearStencil(stencilValue); - glClear(GL_STENCIL_BUFFER_BIT); - - // restore clear color - glClearStencil(stencilClearValue); + setClearStencil(stencilValue); } void RenderTexture::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) @@ -561,239 +404,156 @@ void RenderTexture::onSaveToFile(const std::string& filename, bool isRGBA) /* get buffer as Image */ Image* RenderTexture::newImage(bool flipImage) { - CCASSERT(_pixelFormat == Texture2D::PixelFormat::RGBA8888, "only RGBA8888 can be saved as image"); - - if (nullptr == _texture) - { - return nullptr; - } - - const Size& s = _texture->getContentSizeInPixels(); - - // to get the image size to save - // if the saving image domain exceeds the buffer texture domain, - // it should be cut - int savedBufferWidth = (int)s.width; - int savedBufferHeight = (int)s.height; - - GLubyte *buffer = nullptr; - GLubyte *tempData = nullptr; +// CCASSERT(_pixelFormat == Texture2D::PixelFormat::RGBA8888, "only RGBA8888 can be saved as image"); +// +// if (nullptr == _texture) +// { +// return nullptr; +// } +// +// const Size& s = _texture->getContentSizeInPixels(); +// +// // to get the image size to save +// // if the saving image domain exceeds the buffer texture domain, +// // it should be cut +// int savedBufferWidth = (int)s.width; +// int savedBufferHeight = (int)s.height; +// +// GLubyte *buffer = nullptr; +// GLubyte *tempData = nullptr; Image *image = new (std::nothrow) Image(); - do - { - CC_BREAK_IF(! (buffer = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4])); +// do +// { +// CC_BREAK_IF(! (buffer = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4])); +// +// if(! (tempData = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4])) +// { +// delete[] buffer; +// buffer = nullptr; +// break; +// } +// +// glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); +// glBindFramebuffer(GL_FRAMEBUFFER, _FBO); +// +// // TODO: move this to configuration, so we don't check it every time +// /* Certain Qualcomm Adreno GPU's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. +// */ +// if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) +// { +// // -- bind a temporary texture so we can clear the render buffer without losing our texture +// glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _textureCopy->getName(), 0); +// CHECK_GL_ERROR_DEBUG(); +// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); +// glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0); +// } +// glPixelStorei(GL_PACK_ALIGNMENT, 1); +// glReadPixels(0,0,savedBufferWidth, savedBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, tempData); +// glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); +// +// if ( flipImage ) // -- flip is only required when saving image to file +// { +// // to get the actual texture data +// // #640 the image read from rendertexture is dirty +// for (int i = 0; i < savedBufferHeight; ++i) +// { +// memcpy(&buffer[i * savedBufferWidth * 4], +// &tempData[(savedBufferHeight - i - 1) * savedBufferWidth * 4], +// savedBufferWidth * 4); +// } +// +// image->initWithRawData(buffer, savedBufferWidth * savedBufferHeight * 4, savedBufferWidth, savedBufferHeight, 8); +// } +// else +// { +// image->initWithRawData(tempData, savedBufferWidth * savedBufferHeight * 4, savedBufferWidth, savedBufferHeight, 8); +// } +// +// } while (0); +// +// CC_SAFE_DELETE_ARRAY(buffer); +// CC_SAFE_DELETE_ARRAY(tempData); - if(! (tempData = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4])) - { - delete[] buffer; - buffer = nullptr; - break; - } + return image; +} - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); +void RenderTexture::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) +{ + if (_autoDraw) + { + //Begin will create a render group using new render target + begin(); - // TODO: move this to configuration, so we don't check it every time - /* Certain Qualcomm Adreno GPU's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. - */ - if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) - { - // -- bind a temporary texture so we can clear the render buffer without losing our texture - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _textureCopy->getName(), 0); - CHECK_GL_ERROR_DEBUG(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0); - } - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glReadPixels(0,0,savedBufferWidth, savedBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, tempData); - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); + //clear screen + Director::getInstance()->getRenderer()->clear(_clearFlags, _clearColor, _clearDepth, _clearStencil); - if ( flipImage ) // -- flip is only required when saving image to file - { - // to get the actual texture data - // #640 the image read from rendertexture is dirty - for (int i = 0; i < savedBufferHeight; ++i) - { - memcpy(&buffer[i * savedBufferWidth * 4], - &tempData[(savedBufferHeight - i - 1) * savedBufferWidth * 4], - savedBufferWidth * 4); - } + //! make sure all children are drawn + sortAllChildren(); - image->initWithRawData(buffer, savedBufferWidth * savedBufferHeight * 4, savedBufferWidth, savedBufferHeight, 8); - } - else + for(const auto &child: _children) { - image->initWithRawData(tempData, savedBufferWidth * savedBufferHeight * 4, savedBufferWidth, savedBufferHeight, 8); + if (child != _sprite) + child->visit(renderer, transform, flags); } - - } while (0); - CC_SAFE_DELETE_ARRAY(buffer); - CC_SAFE_DELETE_ARRAY(tempData); - - return image; + //End will pop the current render group + end(); + } } void RenderTexture::onBegin() { - // Director *director = Director::getInstance(); - + _oldProjMatrix = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, _projectionMatrix); - + _oldTransMatrix = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _transformMatrix); - + if(!_keepMatrix) { director->setProjection(director->getProjection()); - const Size& texSize = _texture->getContentSizeInPixels(); - + const Size& texSize = _texture2D->getContentSizeInPixels(); + // Calculate the adjustment ratios based on the old and new projections Size size = director->getWinSizeInPixels(); float widthRatio = size.width / texSize.width; float heightRatio = size.height / texSize.height; - + Mat4 orthoMatrix; Mat4::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix); director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, orthoMatrix); } - - //calculate viewport - { - Rect viewport; - viewport.size.width = _fullviewPort.size.width; - viewport.size.height = _fullviewPort.size.height; - float viewPortRectWidthRatio = float(viewport.size.width)/_fullRect.size.width; - float viewPortRectHeightRatio = float(viewport.size.height)/_fullRect.size.height; - viewport.origin.x = (_fullRect.origin.x - _rtTextureRect.origin.x) * viewPortRectWidthRatio; - viewport.origin.y = (_fullRect.origin.y - _rtTextureRect.origin.y) * viewPortRectHeightRatio; - //glViewport(_fullviewPort.origin.x, _fullviewPort.origin.y, (GLsizei)_fullviewPort.size.width, (GLsizei)_fullviewPort.size.height); - glViewport(viewport.origin.x, viewport.origin.y, (GLsizei)viewport.size.width, (GLsizei)viewport.size.height); - } - - // Adjust the orthographic projection and viewport - - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); - glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - - // TODO: move this to configuration, so we don't check it every time - /* Certain Qualcomm Adreno GPU's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. - */ - if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) - { - // -- bind a temporary texture so we can clear the render buffer without losing our texture - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _textureCopy->getName(), 0); - CHECK_GL_ERROR_DEBUG(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0); - } -} - -void RenderTexture::onEnd() -{ - Director *director = Director::getInstance(); - - glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO); - // restore viewport - director->setViewport(); - const auto& vp = Camera::getDefaultViewport(); - glViewport(vp._left, vp._bottom, vp._width, vp._height); - // - director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, _oldProjMatrix); - director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _oldTransMatrix); - -} - -void RenderTexture::onClear() -{ - // save clear color - GLfloat oldClearColor[4] = {0.0f}; - GLfloat oldDepthClearValue = 0.0f; - GLint oldStencilClearValue = 0; - GLboolean oldDepthWrite = GL_FALSE; - - // backup and set - if (_clearFlags & GL_COLOR_BUFFER_BIT) - { - glGetFloatv(GL_COLOR_CLEAR_VALUE, oldClearColor); - glClearColor(_clearColor.r, _clearColor.g, _clearColor.b, _clearColor.a); - } + Rect viewport; + viewport.size.width = _fullviewPort.size.width; + viewport.size.height = _fullviewPort.size.height; + float viewPortRectWidthRatio = float(viewport.size.width)/_fullRect.size.width; + float viewPortRectHeightRatio = float(viewport.size.height)/_fullRect.size.height; + viewport.origin.x = (_fullRect.origin.x - _rtTextureRect.origin.x) * viewPortRectWidthRatio; + viewport.origin.y = (_fullRect.origin.y - _rtTextureRect.origin.y) * viewPortRectHeightRatio; - if (_clearFlags & GL_DEPTH_BUFFER_BIT) - { - glGetFloatv(GL_DEPTH_CLEAR_VALUE, &oldDepthClearValue); - glClearDepth(_clearDepth); - - glGetBooleanv(GL_DEPTH_WRITEMASK, &oldDepthWrite); - glDepthMask(GL_TRUE); - } - - if (_clearFlags & GL_STENCIL_BUFFER_BIT) - { - glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &oldStencilClearValue); - glClearStencil(_clearStencil); - } - - // clear - glClear(_clearFlags); - - // restore - if (_clearFlags & GL_COLOR_BUFFER_BIT) - { - glClearColor(oldClearColor[0], oldClearColor[1], oldClearColor[2], oldClearColor[3]); - } - if (_clearFlags & GL_DEPTH_BUFFER_BIT) - { - glClearDepth(oldDepthClearValue); - glDepthMask(oldDepthWrite); - } - if (_clearFlags & GL_STENCIL_BUFFER_BIT) - { - glClearStencil(oldStencilClearValue); - } -} - -void RenderTexture::onClearDepth() -{ - //! save old depth value - GLfloat depthClearValue; - glGetFloatv(GL_DEPTH_CLEAR_VALUE, &depthClearValue); + Renderer *renderer = director->getRenderer(); + + _oldViewport = renderer->getViewport(); + renderer->setViewPort(viewport.origin.x, viewport.origin.y, viewport.size.width, viewport.size.height); - glClearDepth(_clearDepth); - glClear(GL_DEPTH_BUFFER_BIT); + _oldColorAttachment = renderer->getColorAttachment(); + _oldDepthAttachment = renderer->getDepthAttachment(); + _oldStencilAttachment = renderer->getStencilAttachment(); + _oldRenderTargetFlag = renderer->getRenderTargetFlag(); - // restore clear color - glClearDepth(depthClearValue); + renderer->setRenderTarget(_renderTargetFlags, _texture2D, _depthStencilTexture, _depthStencilTexture); } -void RenderTexture::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) +void RenderTexture::onEnd() { - if (_autoDraw) - { - //Begin will create a render group using new render target - begin(); - - //clear screen - _clearCommand.init(_globalZOrder); - _clearCommand.func = CC_CALLBACK_0(RenderTexture::onClear, this); - renderer->addCommand(&_clearCommand); - - //! make sure all children are drawn - sortAllChildren(); - - for(const auto &child: _children) - { - if (child != _sprite) - child->visit(renderer, transform, flags); - } + Renderer *renderer = Director::getInstance()->getRenderer(); + renderer->setViewPort(_oldViewport.x, _oldViewport.y, _oldViewport.w, _oldViewport.h); - //End will pop the current render group - end(); - } + renderer->setRenderTarget(_oldRenderTargetFlag, _oldColorAttachment, _oldDepthAttachment, _oldStencilAttachment); } void RenderTexture::begin() @@ -811,7 +571,7 @@ void RenderTexture::begin() { director->setProjection(director->getProjection()); - const Size& texSize = _texture->getContentSizeInPixels(); + const Size& texSize = _texture2D->getContentSizeInPixels(); // Calculate the adjustment ratios based on the old and new projections Size size = director->getWinSizeInPixels(); @@ -832,8 +592,7 @@ void RenderTexture::begin() _beginCommand.init(_globalZOrder); _beginCommand.func = CC_CALLBACK_0(RenderTexture::onBegin, this); - - Director::getInstance()->getRenderer()->addCommand(&_beginCommand); + renderer->addCommand(&_beginCommand); } void RenderTexture::end() @@ -847,10 +606,37 @@ void RenderTexture::end() Renderer *renderer = director->getRenderer(); renderer->addCommand(&_endCommand); renderer->popGroup(); - + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); +} + +void RenderTexture::setClearFlags(ClearFlag clearFlags) +{ + _clearFlags = clearFlags; + if (_clearFlags != ClearFlag::NONE + && !_depthStencilTexture) + { + _clearFlags = ClearFlag::COLOR; + } +} + +void RenderTexture::clearColorAttachment() +{ + auto renderer = Director::getInstance()->getRenderer(); + _beforeClearAttachmentCommand.func = [=]() -> void { + _oldColorAttachment = renderer->getColorAttachment(); + renderer->setRenderTarget(RenderTargetFlag::COLOR, _texture2D, nullptr, nullptr); + }; + renderer->addCommand(&_beforeClearAttachmentCommand); + + Color4F color(0.f, 0.f, 0.f, 0.f); + renderer->clear(ClearFlag::COLOR, color, 1, 0); + _afterClearAttachmentCommand.func = [=]() -> void { + renderer->setRenderTarget(RenderTargetFlag::COLOR, _oldColorAttachment, nullptr, nullptr); + }; + renderer->addCommand(&_afterClearAttachmentCommand); } NS_CC_END diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 03a27ab334e4..9abd78c1871e 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -24,17 +24,22 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CCRENDER_TEXTURE_H__ -#define __CCRENDER_TEXTURE_H__ +#pragma once #include "2d/CCNode.h" #include "2d/CCSprite.h" #include "platform/CCImage.h" #include "renderer/CCGroupCommand.h" #include "renderer/CCCustomCommand.h" +#include "renderer/CCCallbackCommand.h" NS_CC_BEGIN +namespace backend +{ + class Texture; +} + class EventCustom; /** @@ -61,7 +66,7 @@ class CC_DLL RenderTexture : public Node * @param format In Points and a pixel format( only RGB and RGBA formats are valid ). * @param depthStencilFormat The depthStencil format. */ - static RenderTexture * create(int w ,int h, Texture2D::PixelFormat format, GLuint depthStencilFormat); + static RenderTexture * create(int w ,int h, Texture2D::PixelFormat format, TextureFormat depthStencilFormat); /** Creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid. * @@ -78,6 +83,11 @@ class CC_DLL RenderTexture : public Node */ static RenderTexture * create(int w, int h); + // Overrides + virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; + + virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; + /** Starts grabbing. */ virtual void begin(); @@ -149,8 +159,6 @@ class CC_DLL RenderTexture : public Node */ Image* newImage(bool flipImage = true); - CC_DEPRECATED_ATTRIBUTE Image* newCCImage(bool flipImage = true) { return newImage(flipImage); }; - /** Saves the texture into a file using JPEG format. The file will be saved in the Documents folder. * Returns true if the operation is successful. * @@ -188,90 +196,86 @@ class CC_DLL RenderTexture : public Node * @param event Event Custom. */ void listenToForeground(EventCustom *event); - - /** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. + + /** Valid when "autoDraw" is true. * * @return Clear flags. */ - unsigned int getClearFlags() const { return _clearFlags; } - + inline ClearFlag getClearFlags() const { return _clearFlags; } + /** Set flags. * - * @param clearFlags Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. + * @param clearFlags set clear flags. */ - void setClearFlags(unsigned int clearFlags) { _clearFlags = clearFlags; } + void setClearFlags(ClearFlag clearFlags); /** Clear color value. Valid only when "autoDraw" is true. * * @return Color value. */ - const Color4F& getClearColor() const { return _clearColor; } + inline const Color4F& getClearColor() const { return _clearColor; } /** Set color value. * * @param clearColor Color value. */ - void setClearColor(const Color4F &clearColor) { _clearColor = clearColor; } + inline void setClearColor(const Color4F &clearColor) { _clearColor = clearColor; } /** Value for clearDepth. Valid only when "autoDraw" is true. * * @return Value for clearDepth. */ - float getClearDepth() const { return _clearDepth; } + inline float getClearDepth() const { return _clearDepth; } /** Set Value for clearDepth. * * @param clearDepth Value for clearDepth. */ - void setClearDepth(float clearDepth) { _clearDepth = clearDepth; } + inline void setClearDepth(float clearDepth) { _clearDepth = clearDepth; } /** Value for clear Stencil. Valid only when "autoDraw" is true. * * @return Value for clear Stencil. */ - int getClearStencil() const { return _clearStencil; } + inline int getClearStencil() const { return _clearStencil; } /** Set Value for clear Stencil. * * @param clearStencil Value for clear Stencil. */ - void setClearStencil(int clearStencil) { _clearStencil = clearStencil; } + inline void setClearStencil(int clearStencil) { _clearStencil = clearStencil; } /** When enabled, it will render its children into the texture automatically. Disabled by default for compatibility reasons. * Will be enabled in the future. * * @return Return the autoDraw value. */ - bool isAutoDraw() const { return _autoDraw; } + inline bool isAutoDraw() const { return _autoDraw; } /** Set a valve to control whether or not render its children into the texture automatically. * * @param isAutoDraw Whether or not render its children into the texture automatically. */ - void setAutoDraw(bool isAutoDraw) { _autoDraw = isAutoDraw; } + inline void setAutoDraw(bool isAutoDraw) { _autoDraw = isAutoDraw; } /** Gets the Sprite being used. * * @return A Sprite. */ - Sprite* getSprite() const { return _sprite; } + inline Sprite* getSprite() const { return _sprite; } /** Sets the Sprite being used. * * @param sprite A Sprite. */ void setSprite(Sprite* sprite); - - // Overrides - virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; - virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; /** Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix. * * @param keepMatrix Whether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix. * @js NA */ - void setKeepMatrix(bool keepMatrix); + inline void setKeepMatrix(bool keepMatrix) { _keepMatrix = keepMatrix; } /**Used for grab part of screen to a texture. * @param rtBegin The position of renderTexture on the fullRect. * @param fullRect The total size of screen. @@ -308,75 +312,69 @@ class CC_DLL RenderTexture : public Node * @param depthStencilFormat The depthStencil format. * @return If succeed, it will return true. */ - bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, GLuint depthStencilFormat); + bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, TextureFormat depthStencilFormat); protected: - virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, GLbitfield flags); - - //flags: whether generate new modelView and projection matrix or not - bool _keepMatrix; + virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, ClearFlag flags); + //renderer caches and callbacks + void onBegin(); + void onEnd(); + void clearColorAttachment(); + + void onSaveToFile(const std::string& fileName, bool isRGBA = true); + + bool _keepMatrix = false; Rect _rtTextureRect; Rect _fullRect; Rect _fullviewPort; + + Viewport _oldViewport; - GLuint _FBO; - GLuint _depthRenderBuffer; - GLuint _stencilRenderBuffer; - GLint _oldFBO; - Texture2D* _texture; - Texture2D* _textureCopy; // a copy of _texture - Image* _UITextureImage; - Texture2D::PixelFormat _pixelFormat; - GLuint _depthAndStencilFormat; + Texture2D* _texture2D = nullptr; + Texture2D* _depthStencilTexture = nullptr; + Texture2D* _texture2DCopy = nullptr; // a copy of _texture + Texture2D* _oldColorAttachment = nullptr; + Texture2D* _oldDepthAttachment = nullptr; + Texture2D* _oldStencilAttachment = nullptr; + RenderTargetFlag _renderTargetFlags; + RenderTargetFlag _oldRenderTargetFlag; + Image* _UITextureImage = nullptr; + Texture2D::PixelFormat _pixelFormat = Texture2D::PixelFormat::RGBA8888; - // code for "auto" update - GLbitfield _clearFlags; - Color4F _clearColor; - GLclampf _clearDepth; - GLint _clearStencil; - bool _autoDraw; + Color4F _clearColor; + float _clearDepth = 1.f; + int _clearStencil = 0; + bool _autoDraw = false; + ClearFlag _clearFlags = ClearFlag::NONE; /** The Sprite being used. - The sprite, by default, will use the following blending function: GL_ONE, GL_ONE_MINUS_SRC_ALPHA. + The sprite, by default, will use the following blending function: BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA. The blending function can be changed in runtime by calling: - - renderTexture->getSprite()->setBlendFunc((BlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}); + - renderTexture->getSprite()->setBlendFunc((BlendFunc){BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA}); */ - Sprite* _sprite; + Sprite* _sprite = nullptr; GroupCommand _groupCommand; - CustomCommand _beginWithClearCommand; - CustomCommand _clearDepthCommand; - CustomCommand _clearCommand; - CustomCommand _beginCommand; - CustomCommand _endCommand; + CallbackCommand _beginCommand; + CallbackCommand _endCommand; + + CallbackCommand _beforeClearAttachmentCommand; + CallbackCommand _afterClearAttachmentCommand; /*this command is used to encapsulate saveToFile, call saveToFile twice will overwrite this command and callback and the command and callback will be executed twice. */ CustomCommand _saveToFileCommand; - std::function _saveFileCallback; -protected: - //renderer caches and callbacks - void onBegin(); - void onEnd(); - - void onClear(); - void onClearDepth(); - - void onSaveToFile(const std::string& fileName, bool isRGBA = true); - - void setupDepthAndStencil(int powW, int powH); + std::function _saveFileCallback = nullptr; Mat4 _oldTransMatrix, _oldProjMatrix; Mat4 _transformMatrix, _projectionMatrix; + private: CC_DISALLOW_COPY_AND_ASSIGN(RenderTexture); - }; // end of textures group /// @} NS_CC_END - -#endif //__CCRENDER_TEXTURE_H__ diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 419483851c3d..a0cee6382e7b 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -33,7 +33,6 @@ THE SOFTWARE. #include "base/CCEventListenerCustom.h" #include "base/ccUTF8.h" #include "renderer/CCRenderer.h" -#include "renderer/CCFrameBuffer.h" #if CC_USE_PHYSICS #include "physics/CCPhysicsWorld.h" @@ -186,11 +185,6 @@ const std::vector& Scene::getCameras() } void Scene::render(Renderer* renderer, const Mat4& eyeTransform, const Mat4* eyeProjection) -{ - render(renderer, &eyeTransform, eyeProjection, 1); -} - -void Scene::render(Renderer* renderer, const Mat4* eyeTransforms, const Mat4* eyeProjections, unsigned int multiViewCount) { auto director = Director::getInstance(); Camera* defaultCamera = nullptr; @@ -214,14 +208,12 @@ void Scene::render(Renderer* renderer, const Mat4* eyeTransforms, const Mat4* ey // then the "nodeToParent transform" will be lost. // And it is important that the change is "permanent", because the matrix might be used for calculate // culling and other stuff. - for (unsigned int i = 0; i < multiViewCount; ++i) { - if (eyeProjections) - camera->setAdditionalProjection(eyeProjections[i] * camera->getProjectionMatrix().getInversed()); - if (eyeTransforms) - camera->setAdditionalTransform(eyeTransforms[i].getInversed()); - director->pushProjectionMatrix(i); - director->loadProjectionMatrix(Camera::_visitingCamera->getViewProjectionMatrix(), i); - } + if (eyeProjection) + camera->setAdditionalProjection(*eyeProjection * camera->getProjectionMatrix().getInversed()); + + camera->setAdditionalTransform(eyeTransform.getInversed()); + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, Camera::_visitingCamera->getViewProjectionMatrix()); camera->apply(); //clear background with max depth @@ -236,45 +228,39 @@ void Scene::render(Renderer* renderer, const Mat4* eyeTransforms, const Mat4* ey #endif renderer->render(); - camera->restore(); - for (unsigned int i = 0; i < multiViewCount; ++i) - director->popProjectionMatrix(i); + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); // we shouldn't restore the transform matrix since it could be used // from "update" or other parts of the game to calculate culling or something else. -// camera->setNodeToParentTransform(eyeCopy); + // camera->setNodeToParentTransform(eyeCopy); } #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION if (_physics3DWorld && _physics3DWorld->isDebugDrawEnabled()) { Camera *physics3dDebugCamera = _physics3dDebugCamera != nullptr ? _physics3dDebugCamera: defaultCamera; - - for (unsigned int i = 0; i < multiViewCount; ++i) { - if (eyeProjections) - physics3dDebugCamera->setAdditionalProjection(eyeProjections[i] * physics3dDebugCamera->getProjectionMatrix().getInversed()); - if (eyeTransforms) - physics3dDebugCamera->setAdditionalTransform(eyeTransforms[i].getInversed()); - director->pushProjectionMatrix(i); - director->loadProjectionMatrix(physics3dDebugCamera->getViewProjectionMatrix(), i); - } - + + if (eyeProjection) + physics3dDebugCamera->setAdditionalProjection(*eyeProjection * physics3dDebugCamera->getProjectionMatrix().getInversed()); + + physics3dDebugCamera->setAdditionalTransform(eyeTransform.getInversed()); + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, physics3dDebugCamera->getViewProjectionMatrix()); + physics3dDebugCamera->apply(); physics3dDebugCamera->clearBackground(); _physics3DWorld->debugDraw(renderer); renderer->render(); - + physics3dDebugCamera->restore(); - for (unsigned int i = 0; i < multiViewCount; ++i) - director->popProjectionMatrix(i); + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); } #endif Camera::_visitingCamera = nullptr; -// experimental::FrameBuffer::applyDefaultFBO(); } void Scene::removeAllChildren() diff --git a/cocos/2d/CCScene.h b/cocos/2d/CCScene.h index 41e5c05d3632..2ad41d1e409a 100644 --- a/cocos/2d/CCScene.h +++ b/cocos/2d/CCScene.h @@ -39,6 +39,7 @@ class BaseLight; class Renderer; class EventListenerCustom; class EventCustom; +class RendererBackend; #if CC_USE_PHYSICS class PhysicsWorld; #endif @@ -113,16 +114,7 @@ class CC_DLL Scene : public Node * @js NA */ virtual void render(Renderer* renderer, const Mat4& eyeTransform, const Mat4* eyeProjection = nullptr); - - /** Render the scene. - * @param renderer The renderer use to render the scene. - * @param eyeTransforms The AdditionalTransform List of camera of multiView. - * @param eyeProjections The projection matrix List of camera of multiView. - * @param multiViewCount The number of multiView. - * @js NA - */ - virtual void render(Renderer* renderer, const Mat4* eyeTransforms, const Mat4* eyeProjections, unsigned int multiViewCount); - + /** override function */ virtual void removeAllChildren() override; diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 3c1f7ae0d229..9f797a652e9e 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -40,6 +40,9 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/ccUTF8.h" #include "2d/CCCamera.h" +#include "platform/CCFileUtils.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN @@ -144,7 +147,6 @@ Sprite* Sprite::create() bool Sprite::init() { initWithTexture(nullptr, Rect::ZERO); - return true; } @@ -333,6 +335,7 @@ Sprite::~Sprite() CC_SAFE_FREE(_trianglesIndex); CC_SAFE_RELEASE(_spriteFrame); CC_SAFE_RELEASE(_texture); + CC_SAFE_RELEASE(_programState); } /* @@ -371,17 +374,48 @@ void Sprite::setTexture(const std::string &filename) setTextureRect(rect); } +void Sprite::setVertexLayout() +{ +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + + //set vertexLayout according to V3F_C4B_T2F structure + auto& vertexLayout = _trianglesCommand.getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); +} + +void Sprite::updateShaders(const char* vert, const char* frag) +{ + auto& pipelineDescriptor = _trianglesCommand.getPipelineDescriptor(); + CC_SAFE_RELEASE(_programState); + _programState = new (std::nothrow) backend::ProgramState(vert, frag); + pipelineDescriptor.programState = _programState; + + _mvpMatrixLocation = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + _alphaTextureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture1"); + + setVertexLayout(); + updateProgramState(); +} + void Sprite::setTexture(Texture2D *texture) { - if(_glProgramState == nullptr) - { - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture)); - } - // If batchnode, then texture id should be the same - CCASSERT(! _batchNode || (texture && texture->getName() == _batchNode->getTexture()->getName()), "CCSprite: Batched sprites should use the same texture as the batchnode"); + auto isETC1 = texture && texture->getAlphaTextureName(); + updateShaders(positionTextureColor_vert, (isETC1) ? etc1_frag : positionTextureColor_frag); + + CCASSERT(! _batchNode || (texture && texture == _batchNode->getTexture()), "CCSprite: Batched sprites should use the same texture as the batchnode"); // accept texture==nil as argument CCASSERT( !texture || dynamic_cast(texture), "setTexture expects a Texture2D. Invalid argument"); - + if (texture == nullptr) { // Gets the texture by key firstly. @@ -398,7 +432,7 @@ void Sprite::setTexture(Texture2D *texture) CC_SAFE_RELEASE(image); } } - + if ((_renderMode != RenderMode::QUAD_BATCHNODE) && (_texture != texture)) { CC_SAFE_RETAIN(texture); @@ -406,6 +440,24 @@ void Sprite::setTexture(Texture2D *texture) _texture = texture; updateBlendFunc(); } + + updateProgramState(); +} + +void Sprite::updateProgramState() +{ + if (_texture == nullptr || _texture->getBackendTexture() == nullptr) + { + return; + } + + auto programState = _trianglesCommand.getPipelineDescriptor().programState; + programState->setTexture(_textureLocation, 0, _texture->getBackendTexture()); + auto alphaTexture = _texture->getAlphaTexture(); + if(alphaTexture && alphaTexture->getBackendTexture()) + { + programState->setTexture(_alphaTextureLocation, 1, alphaTexture->getBackendTexture()); + } } Texture2D* Sprite::getTexture() const @@ -773,6 +825,7 @@ void Sprite::setTextureCoords(const Rect& rectInPoints) void Sprite::setTextureCoords(const Rect& rectInPoints, V3F_C4B_T2F_Quad* outQuad) { Texture2D *tex = (_renderMode == RenderMode::QUAD_BATCHNODE) ? _textureAtlas->getTexture() : _texture; + if (tex == nullptr) { return; @@ -782,7 +835,7 @@ void Sprite::setTextureCoords(const Rect& rectInPoints, V3F_C4B_T2F_Quad* outQua const float atlasWidth = (float)tex->getPixelsWide(); const float atlasHeight = (float)tex->getPixelsHigh(); - + float rw = rectInPixels.size.width; float rh = rectInPixels.size.height; @@ -1045,14 +1098,13 @@ void Sprite::updateTransform(void) } // draw - void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { - if (_texture == nullptr) + if (_texture == nullptr || _texture->getBackendTexture() == nullptr) { return; } - + #if CC_USE_CULLING // Don't calculate the culling if the transform was not updated auto visitingCamera = Camera::getVisitingCamera(); @@ -1068,40 +1120,42 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) // XXX: this always return true since _insideBounds = renderer->checkVisibility(transform, _contentSize); } - + if(_insideBounds) #endif { + const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto programState = _trianglesCommand.getPipelineDescriptor().programState; + programState->setUniform(_mvpMatrixLocation, projectionMat.m, sizeof(projectionMat.m)); + _trianglesCommand.init(_globalZOrder, _texture, - getGLProgramState(), _blendFunc, _polyInfo.triangles, transform, flags); - renderer->addCommand(&_trianglesCommand); - -#if CC_SPRITE_DEBUG_DRAW - _debugDrawNode->clear(); - auto count = _polyInfo.triangles.indexCount/3; - auto indices = _polyInfo.triangles.indices; - auto verts = _polyInfo.triangles.verts; - for(ssize_t i = 0; i < count; i++) - { - //draw 3 lines - Vec3 from =verts[indices[i*3]].vertices; - Vec3 to = verts[indices[i*3+1]].vertices; - _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); - - from =verts[indices[i*3+1]].vertices; - to = verts[indices[i*3+2]].vertices; - _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); - - from =verts[indices[i*3+2]].vertices; - to = verts[indices[i*3]].vertices; - _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); - } + + #if CC_SPRITE_DEBUG_DRAW + _debugDrawNode->clear(); + auto count = _polyInfo.triangles.indexCount/3; + auto indices = _polyInfo.triangles.indices; + auto verts = _polyInfo.triangles.verts; + for(ssize_t i = 0; i < count; i++) + { + //draw 3 lines + Vec3 from =verts[indices[i*3]].vertices; + Vec3 to = verts[indices[i*3+1]].vertices; + _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); + + from =verts[indices[i*3+1]].vertices; + to = verts[indices[i*3+2]].vertices; + _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); + + from =verts[indices[i*3+2]].vertices; + to = verts[indices[i*3]].vertices; + _debugDrawNode->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::WHITE); + } #endif //CC_SPRITE_DEBUG_DRAW } } @@ -1120,7 +1174,7 @@ void Sprite::addChild(Node *child, int zOrder, int tag) { Sprite* childSprite = dynamic_cast(child); CCASSERT( childSprite, "CCSprite only supports Sprites as children when using SpriteBatchNode"); - CCASSERT(childSprite->getTexture()->getName() == _textureAtlas->getTexture()->getName(), "childSprite's texture name should be equal to _textureAtlas's texture name!"); + CCASSERT(childSprite->getTexture() == _textureAtlas->getTexture(), "childSprite's texture name should be equal to _textureAtlas's texture name!"); //put it in descendants array of batch node _batchNode->appendChild(childSprite); @@ -1145,7 +1199,7 @@ void Sprite::addChild(Node *child, int zOrder, const std::string &name) { Sprite* childSprite = dynamic_cast(child); CCASSERT( childSprite, "CCSprite only supports Sprites as children when using SpriteBatchNode"); - CCASSERT(childSprite->getTexture()->getName() == _textureAtlas->getTexture()->getName(), + CCASSERT(childSprite->getTexture() == _textureAtlas->getTexture(), "childSprite's texture name should be equal to _textureAtlas's texture name."); //put it in descendants array of batch node _batchNode->appendChild(childSprite); @@ -1375,21 +1429,11 @@ void Sprite::setStretchEnabled(bool enabled) } } -void Sprite::setStrechEnabled(bool enabled) -{ - setStretchEnabled(enabled); -} - bool Sprite::isStretchEnabled() const { return _stretchEnabled; } -bool Sprite::isStrechEnabled() const -{ - return isStretchEnabled(); -} - void Sprite::updateStretchFactor() { const Size size = getContentSize(); @@ -1636,7 +1680,7 @@ bool Sprite::isFrameDisplayed(SpriteFrame *frame) const Rect r = frame->getRect(); return (r.equals(_rect) && - frame->getTexture()->getName() == _texture->getName() && + frame->getTexture() == _texture && frame->getOffset().equals(_unflippedOffsetPositionFromCenter)); } @@ -1690,12 +1734,14 @@ void Sprite::setBatchNode(SpriteBatchNode *spriteBatchNode) } // MARK: Texture protocol - void Sprite::updateBlendFunc(void) { CCASSERT(_renderMode != RenderMode::QUAD_BATCHNODE, "CCSprite: updateBlendFunc doesn't work when the sprite is rendered using a SpriteBatchNode"); - + // it is possible to have an untextured sprite + backend::BlendDescriptor& blendDescriptor = _trianglesCommand.getPipelineDescriptor().blendDescriptor; + blendDescriptor.blendEnabled = true; + if (! _texture || ! _texture->hasPremultipliedAlpha()) { _blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED; diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 10adf3ae3aa8..8bef9bd4086f 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -306,9 +306,6 @@ class CC_DLL Sprite : public Node, public TextureProtocol virtual void setSpriteFrame(SpriteFrame* newFrame); /** @} */ - /** @deprecated Use `setSpriteFrame()` instead. */ - CC_DEPRECATED_ATTRIBUTE virtual void setDisplayFrame(SpriteFrame *newFrame) { setSpriteFrame(newFrame); } - /** * Returns whether or not a SpriteFrame is being displayed. */ @@ -318,12 +315,6 @@ class CC_DLL Sprite : public Node, public TextureProtocol * Returns the current displayed frame. */ virtual SpriteFrame* getSpriteFrame() const; - /** @deprecated Use `getSpriteFrame()` instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE virtual SpriteFrame* getDisplayFrame() const { return getSpriteFrame(); } - /** @deprecated Use `getSpriteFrame()` instead. */ - CC_DEPRECATED_ATTRIBUTE virtual SpriteFrame* displayFrame() const { return getSpriteFrame(); }; /// @} End of frames methods @@ -416,16 +407,6 @@ class CC_DLL Sprite : public Node, public TextureProtocol */ void setFlippedX(bool flippedX); - /** @deprecated Use isFlippedX() instead. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE bool isFlipX() { return isFlippedX(); }; - /** @deprecated Use setFlippedX() instead - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void setFlipX(bool flippedX) { setFlippedX(flippedX); }; - /** * Return the flag which indicates whether the sprite is flipped vertically or not. * @@ -446,15 +427,6 @@ class CC_DLL Sprite : public Node, public TextureProtocol /// @} End of Sprite properties getter/setters - /** @deprecated Use isFlippedY() instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE bool isFlipY() { return isFlippedY(); }; - /** @deprecated Use setFlippedY() instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void setFlipY(bool flippedY) { setFlippedY(flippedY); }; - /** * returns a reference of the polygon information associated with this sprite * @@ -472,15 +444,9 @@ class CC_DLL Sprite : public Node, public TextureProtocol /** whether or not contentSize stretches the sprite's texture */ void setStretchEnabled(bool enabled); - /** @deprecated Use setStretchEnabled() instead. */ - CC_DEPRECATED_ATTRIBUTE void setStrechEnabled(bool enabled); - /** returns whether or not contentSize stretches the sprite's texture */ bool isStretchEnabled() const; - /** @deprecated Use isStretchEnabled() instead. */ - CC_DEPRECATED_ATTRIBUTE bool isStrechEnabled() const; - // // Overrides // @@ -544,6 +510,9 @@ class CC_DLL Sprite : public Node, public TextureProtocol int getResourceType() const { return _fileType; } const std::string& getResourceName() const { return _fileName; } + + virtual void setVertexLayout(); + virtual void updateShaders(const char* vert, const char* frag); CC_CONSTRUCTOR_ACCESS : /** @@ -664,6 +633,8 @@ CC_CONSTRUCTOR_ACCESS : virtual void flipX(); virtual void flipY(); + + virtual void updateProgramState(); // // Data used when the sprite is rendered using a SpriteSheet @@ -684,6 +655,13 @@ CC_CONSTRUCTOR_ACCESS : Texture2D* _texture; /// Texture2D object that is used to render the sprite SpriteFrame* _spriteFrame; TrianglesCommand _trianglesCommand; /// + + backend::UniformLocation _mvpMatrixLocation; + backend::UniformLocation _textureLocation; + backend::UniformLocation _alphaTextureLocation; + + backend::ProgramState* _programState = nullptr; + #if CC_SPRITE_DEBUG_DRAW DrawNode *_debugDrawNode; #endif //CC_SPRITE_DEBUG_DRAW @@ -724,7 +702,7 @@ CC_CONSTRUCTOR_ACCESS : int _fileType; bool _stretchEnabled; - + private: CC_DISALLOW_COPY_AND_ASSIGN(Sprite); }; diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index 877de6124352..4bb5e90bdf27 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -35,6 +35,9 @@ THE SOFTWARE. #include "renderer/CCTextureCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCQuadCommand.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" + NS_CC_BEGIN @@ -104,10 +107,36 @@ bool SpriteBatchNode::initWithTexture(Texture2D *tex, ssize_t capacity/* = DEFAU _descendants.reserve(capacity); - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR, tex)); + updateShaders(positionTextureColor_vert, positionTextureColor_frag); + return true; } +void SpriteBatchNode::updateShaders(const std::string &vertexShader, const std::string &fragmentShader) +{ + auto& pipelineDescriptor = _quadCommand.getPipelineDescriptor(); + CC_SAFE_RELEASE(_programState); + _programState = new (std::nothrow) backend::ProgramState(vertexShader, fragmentShader); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocaiton = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _textureLocation = pipelineDescriptor.programState->getUniformLocation("u_texture"); + +#define VERTEX_POSITION_SIZE 3 +#define VERTEX_TEXCOORD_SIZE 2 +#define VERTEX_COLOR_SIZE 4 + //set vertexLayout according to V3F_C4B_T2F structure + uint32_t colorOffset = (VERTEX_POSITION_SIZE)*sizeof(float); + uint32_t texcoordOffset = VERTEX_POSITION_SIZE*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + uint32_t totalSize = (VERTEX_POSITION_SIZE+VERTEX_TEXCOORD_SIZE)*sizeof(float) + VERTEX_COLOR_SIZE*sizeof(unsigned char); + + auto& vertexLayout = pipelineDescriptor.vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32B32, 0, false); + vertexLayout.setAtrribute("a_texCoord", 1, backend::VertexFormat::FLOAT_R32G32, texcoordOffset, false); + vertexLayout.setAtrribute("a_color", 2, backend::VertexFormat::UBYTE_R8G8B8A8, colorOffset, true); + + vertexLayout.setLayout(totalSize, backend::VertexStepMode::VERTEX); +} + bool SpriteBatchNode::init() { Texture2D * texture = new (std::nothrow) Texture2D(); @@ -125,13 +154,13 @@ bool SpriteBatchNode::initWithFile(const std::string& fileImage, ssize_t capacit } SpriteBatchNode::SpriteBatchNode() -: _textureAtlas(nullptr) { } SpriteBatchNode::~SpriteBatchNode() { CC_SAFE_RELEASE(_textureAtlas); + CC_SAFE_RELEASE(_programState); } // override visit @@ -194,7 +223,7 @@ void SpriteBatchNode::addChild(Node * child, int zOrder, const std::string &name CCASSERT(dynamic_cast(child) != nullptr, "CCSpriteBatchNode only supports Sprites as children"); Sprite *sprite = static_cast(child); // check Sprite is using the same texture id - CCASSERT(sprite->getTexture()->getName() == _textureAtlas->getTexture()->getName(), "CCSprite is not using the same texture id"); + CCASSERT(sprite->getTexture() == _textureAtlas->getTexture(), "CCSprite is not using the same texture id"); Node::addChild(child, zOrder, name); @@ -381,9 +410,14 @@ void SpriteBatchNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t f { child->updateTransform(); } + + const auto& matrixProjection = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + auto programState = _quadCommand.getPipelineDescriptor().programState; + programState->setUniform(_mvpMatrixLocaiton, matrixProjection.m, sizeof(matrixProjection.m)); + programState->setTexture(_textureLocation, 0, _textureAtlas->getTexture()->getBackendTexture()); - _batchCommand.init(_globalZOrder, getGLProgram(), _blendFunc, _textureAtlas, transform, flags); - renderer->addCommand(&_batchCommand); + _quadCommand.init(_globalZOrder, _textureAtlas->getTexture(), _blendFunc, _textureAtlas->getQuads(), _textureAtlas->getTotalQuads(), transform, flags); + renderer->addCommand(&_quadCommand); } void SpriteBatchNode::increaseAtlasCapacity() diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index 7f9de6916249..1fca0c720efc 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -26,16 +26,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CC_SPRITE_BATCH_NODE_H__ -#define __CC_SPRITE_BATCH_NODE_H__ +#pragma once #include #include "2d/CCNode.h" #include "base/CCProtocols.h" #include "renderer/CCTextureAtlas.h" -#include "renderer/CCBatchCommand.h" +#include "renderer/CCQuadCommand.h" NS_CC_BEGIN @@ -261,10 +259,16 @@ class CC_DLL SpriteBatchNode : public Node, public TextureProtocol void updateAtlasIndex(Sprite* sprite, ssize_t* curIndex); void swap(ssize_t oldIndex, ssize_t newIndex); void updateBlendFunc(); + + virtual void updateShaders(const std::string& vertexShader, const std::string& fragmentShader); - TextureAtlas *_textureAtlas; + TextureAtlas *_textureAtlas = nullptr; BlendFunc _blendFunc; - BatchCommand _batchCommand; // render command + QuadCommand _quadCommand; + + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _textureLocation; + backend::ProgramState* _programState = nullptr; // all descendants: children, grand children, etc... // There is not need to retain/release these objects, since they are already retained by _children @@ -276,5 +280,3 @@ class CC_DLL SpriteBatchNode : public Node, public TextureProtocol /** @} */ NS_CC_END - -#endif // __CC_SPRITE_BATCH_NODE_H__ diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 9eac614a751d..9f4b0c0dcd43 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -293,6 +293,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu // add sprite frame _spriteFramesCache.insertFrame(plist, spriteFrameName, spriteFrame); } + _spriteFramesCache.markPlistFull(plist, true); CC_SAFE_DELETE(image); } @@ -350,11 +351,6 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dict, const std:: void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist, Texture2D *texture) { - if (_spriteFramesCache.hasPlist(plist)) - { - return; // We already added it - } - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist); ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(fullPath); @@ -370,10 +366,6 @@ void SpriteFrameCache::addSpriteFramesWithFileContent(const std::string& plist_c void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist, const std::string& textureFileName) { CCASSERT(textureFileName.size()>0, "texture name should not be null"); - if (_spriteFramesCache.hasPlist(plist)) - { - return; // We already added it - } const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist); ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(fullPath); addSpriteFramesWithDictionary(dict, textureFileName, plist); @@ -391,45 +383,42 @@ void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist) return; } - if (!_spriteFramesCache.hasPlist(plist)) - { - ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(fullPath); + ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(fullPath); - string texturePath(""); + string texturePath(""); - if (dict.find("metadata") != dict.end()) - { - ValueMap& metadataDict = dict["metadata"].asValueMap(); - // try to read texture file name from meta data - texturePath = metadataDict["textureFileName"].asString(); - } + if (dict.find("metadata") != dict.end()) + { + ValueMap& metadataDict = dict["metadata"].asValueMap(); + // try to read texture file name from meta data + texturePath = metadataDict["textureFileName"].asString(); + } - if (!texturePath.empty()) - { - // build texture path relative to plist file - texturePath = FileUtils::getInstance()->fullPathFromRelativeFile(texturePath, plist); - } - else - { - // build texture path by replacing file extension - texturePath = plist; + if (!texturePath.empty()) + { + // build texture path relative to plist file + texturePath = FileUtils::getInstance()->fullPathFromRelativeFile(texturePath, plist); + } + else + { + // build texture path by replacing file extension + texturePath = plist; - // remove .xxx - size_t startPos = texturePath.find_last_of("."); - texturePath = texturePath.erase(startPos); + // remove .xxx + size_t startPos = texturePath.find_last_of("."); + texturePath = texturePath.erase(startPos); - // append .png - texturePath = texturePath.append(".png"); + // append .png + texturePath = texturePath.append(".png"); - CCLOG("cocos2d: SpriteFrameCache: Trying to use file %s as texture", texturePath.c_str()); - } - addSpriteFramesWithDictionary(dict, texturePath, plist); + CCLOG("cocos2d: SpriteFrameCache: Trying to use file %s as texture", texturePath.c_str()); } + addSpriteFramesWithDictionary(dict, texturePath, plist); } bool SpriteFrameCache::isSpriteFramesWithFileLoaded(const std::string& plist) const { - return _spriteFramesCache.hasPlist(plist); + return _spriteFramesCache.isPlistUsed(plist) && _spriteFramesCache.isPlistFull(plist); } void SpriteFrameCache::addSpriteFrame(SpriteFrame* frame, const std::string& frameName) @@ -686,7 +675,7 @@ bool SpriteFrameCache::reloadTexture(const std::string& plist) { CCASSERT(plist.size()>0, "plist filename should not be nullptr"); - if (_spriteFramesCache.hasPlist(plist)) { + if (_spriteFramesCache.isPlistUsed(plist)) { _spriteFramesCache.erasePlistIndex(plist); } else @@ -749,21 +738,21 @@ void SpriteFrameCache::PlistFramesCache::insertFrame(const std::string &plist, c _indexFrame2plist[frame] = plist; //insert index frameName->plist } -bool SpriteFrameCache::PlistFramesCache::isPlistUsed(const std::string &plist) const -{ - //plist loaded && not empty - auto it = _indexPlist2Frames.find(plist); - return it != _indexPlist2Frames.end() && !it->second.empty(); -} - bool SpriteFrameCache::PlistFramesCache::eraseFrame(const std::string &frame) { _spriteFrames.erase(frame); //drop SpriteFrame auto itFrame = _indexFrame2plist.find(frame); if (itFrame != _indexFrame2plist.end()) { - _indexPlist2Frames[itFrame->second].erase(frame); //update index plist->[frameNames] + auto plist = itFrame->second; + markPlistFull(plist, false); + _indexPlist2Frames[plist].erase(frame); //update index plist->[frameNames] _indexFrame2plist.erase(itFrame); //update index frame->plist + // erase plist index if all frames was erased + if (_indexFrame2plist.empty()) + { + _indexPlist2Frames.erase(plist); + } return true; } return false; @@ -776,6 +765,8 @@ bool SpriteFrameCache::PlistFramesCache::eraseFrames(const std::vectorplist } _indexPlist2Frames.erase(plist); //update index plist->[frameNames] + _isPlistFull.erase(plist); //erase full status return true; } @@ -800,6 +792,7 @@ void SpriteFrameCache::PlistFramesCache::clear() _indexPlist2Frames.clear(); _indexFrame2plist.clear(); _spriteFrames.clear(); + _isPlistFull.clear(); } bool SpriteFrameCache::PlistFramesCache::hasFrame(const std::string &frame) const @@ -807,10 +800,11 @@ bool SpriteFrameCache::PlistFramesCache::hasFrame(const std::string &frame) cons return _indexFrame2plist.find(frame) != _indexFrame2plist.end(); } -bool SpriteFrameCache::PlistFramesCache::hasPlist(const std::string &plist) const +bool SpriteFrameCache::PlistFramesCache::isPlistUsed(const std::string &plist) const { - return _indexPlist2Frames.find(plist) != _indexPlist2Frames.end(); -} + auto frames = _indexPlist2Frames.find(plist); + return frames != _indexPlist2Frames.end() && frames->second.size() > 0; +} SpriteFrame * SpriteFrameCache::PlistFramesCache::at(const std::string &frame) { diff --git a/cocos/2d/CCSpriteFrameCache.h b/cocos/2d/CCSpriteFrameCache.h index ca8e48ab1255..7b87fd9b486a 100644 --- a/cocos/2d/CCSpriteFrameCache.h +++ b/cocos/2d/CCSpriteFrameCache.h @@ -116,17 +116,22 @@ class CC_DLL SpriteFrameCache : public Ref void clear(); inline bool hasFrame(const std::string &frame) const; - inline bool hasPlist(const std::string &plist) const; + inline bool isPlistUsed(const std::string &plist) const; inline SpriteFrame *at(const std::string &frame); inline Map& getSpriteFrames(); - inline bool isPlistUsed(const std::string &plist) const; - + void markPlistFull(const std::string &plist, bool full) { _isPlistFull[plist] = full; } + bool isPlistFull(const std::string &plist) const + { + auto it = _isPlistFull.find(plist); + return it == _isPlistFull.end() ? false : it->second; + } private: Map _spriteFrames; std::unordered_map> _indexPlist2Frames; std::unordered_map _indexFrame2plist; + std::unordered_map _isPlistFull; }; public: @@ -137,21 +142,11 @@ class CC_DLL SpriteFrameCache : public Ref */ static SpriteFrameCache* getInstance(); - /** @deprecated Use getInstance() instead - @js NA - */ - CC_DEPRECATED_ATTRIBUTE static SpriteFrameCache* sharedSpriteFrameCache() { return SpriteFrameCache::getInstance(); } - /** Destroys the cache. It releases all the Sprite Frames and the retained instance. * @js NA */ static void destroyInstance(); - /** @deprecated Use destroyInstance() instead - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedSpriteFrameCache() { return SpriteFrameCache::destroyInstance(); } - /** Destructor. * @js NA * @lua NA @@ -277,9 +272,6 @@ class CC_DLL SpriteFrameCache : public Ref */ SpriteFrame* getSpriteFrameByName(const std::string& name); - /** @deprecated use getSpriteFrameByName() instead */ - CC_DEPRECATED_ATTRIBUTE SpriteFrame* spriteFrameByName(const std::string&name) { return getSpriteFrameByName(name); } - bool reloadTexture(const std::string& plist); protected: diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index e1bc3ec2ffeb..0fa38414cdc0 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -32,7 +32,9 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgram.h" +#include "renderer/ccShaders.h" +#include "renderer/backend/Program.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN @@ -246,16 +248,12 @@ void TMXLayer::parseInternalProperties() _useAutomaticVertexZ = true; auto alphaFuncVal = getProperty("cc_alpha_func"); float alphaFuncValue = alphaFuncVal.asFloat(); - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST)); - GLint alphaValueLocation = glGetUniformLocation(getGLProgram()->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE); - - // NOTE: alpha test shader is hard-coded to use the equivalent of a glAlphaFunc(GL_GREATER) comparison - - // use shader program to set uniform - getGLProgram()->use(); - getGLProgram()->setUniformLocationWith1f(alphaValueLocation, alphaFuncValue); - CHECK_GL_ERROR_DEBUG(); + auto& pipelineDescriptor = _quadCommand.getPipelineDescriptor(); + auto& vertexShader = pipelineDescriptor.programState->getProgram()->getVertexShader(); + updateShaders(vertexShader, positionTextureColorAlphaTest_frag); + auto alphaValueLocation = pipelineDescriptor.programState->getUniformLocation("u_alpha_value"); + pipelineDescriptor.programState->setUniform(alphaValueLocation, &alphaFuncValue, sizeof(alphaFuncValue)); } else { diff --git a/cocos/2d/CCTMXLayer.h b/cocos/2d/CCTMXLayer.h index 0115291a8a95..4b3705495ad3 100644 --- a/cocos/2d/CCTMXLayer.h +++ b/cocos/2d/CCTMXLayer.h @@ -110,10 +110,6 @@ class CC_DLL TMXLayer : public SpriteBatchNode * @return Returns the tile (Sprite) at a given a tile coordinate. */ Sprite* getTileAt(const Vec2& tileCoordinate); - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE Sprite* tileAt(const Vec2& tileCoordinate) { return getTileAt(tileCoordinate); }; /** Returns the tile gid at a given tile coordinate. It also returns the tile flags. * This method requires the tile map has not been previously released (eg. don't call [layer releaseMap]). @@ -123,12 +119,6 @@ class CC_DLL TMXLayer : public SpriteBatchNode * @return Returns the tile gid at a given tile coordinate. It also returns the tile flags. */ uint32_t getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr); - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE uint32_t tileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr){ - return getTileGIDAt(tileCoordinate, flags); - } /** Sets the tile gid (gid = tile global id) at a given tile coordinate. * The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. @@ -163,10 +153,6 @@ class CC_DLL TMXLayer : public SpriteBatchNode * @return The position in points of a given tile coordinate. */ Vec2 getPositionAt(const Vec2& tileCoordinate); - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE Vec2 positionAt(const Vec2& tileCoordinate) { return getPositionAt(tileCoordinate); }; /** Return the value for the specific property name. * @@ -174,10 +160,6 @@ class CC_DLL TMXLayer : public SpriteBatchNode * @return Return the value for the specific property name. */ Value getProperty(const std::string& propertyName) const; - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); }; /** Creates the tiles. */ void setupTiles(); diff --git a/cocos/2d/CCTMXObjectGroup.h b/cocos/2d/CCTMXObjectGroup.h index a1e54ae65caf..f252074b97bb 100644 --- a/cocos/2d/CCTMXObjectGroup.h +++ b/cocos/2d/CCTMXObjectGroup.h @@ -76,17 +76,13 @@ class CC_DLL TMXObjectGroup : public Ref */ Value getProperty(const std::string& propertyName) const; - CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); }; - /** Return the dictionary for the specific object name. * It will return the 1st object found on the array for the given name. * * @return Return the dictionary for the specific object name. */ ValueMap getObject(const std::string& objectName) const; - - CC_DEPRECATED_ATTRIBUTE ValueMap objectNamed(const std::string& objectName) const { return getObject(objectName); }; - + /** Gets the offset position of child objects. * * @return The offset position of child objects. diff --git a/cocos/2d/CCTMXTiledMap.h b/cocos/2d/CCTMXTiledMap.h index 8d5aafc784e2..1db62c9cf130 100644 --- a/cocos/2d/CCTMXTiledMap.h +++ b/cocos/2d/CCTMXTiledMap.h @@ -156,11 +156,6 @@ class CC_DLL TMXTiledMap : public Node * @return The TMXLayer for the specific layer. */ TMXLayer* getLayer(const std::string& layerName) const; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE TMXLayer* layerNamed(const std::string& layerName) const { return getLayer(layerName); }; /** Return the TMXObjectGroup for the specific group. * @@ -168,11 +163,6 @@ class CC_DLL TMXTiledMap : public Node * @return A Type of TMXObjectGroup. */ TMXObjectGroup* getObjectGroup(const std::string& groupName) const; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE TMXObjectGroup* objectGroupNamed(const std::string& groupName) const { return getObjectGroup(groupName); }; /** Return the value for the specific property name. * @@ -180,11 +170,6 @@ class CC_DLL TMXTiledMap : public Node * @return Return the value for the specific property name. */ Value getProperty(const std::string& propertyName) const; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const char *propertyName) const { return getProperty(propertyName); }; /** Return properties dictionary for tile GID. * @@ -192,7 +177,6 @@ class CC_DLL TMXTiledMap : public Node * @return Return properties dictionary for tile GID. */ Value getPropertiesForGID(int GID) const; - CC_DEPRECATED_ATTRIBUTE Value propertiesForGID(int GID) const { return getPropertiesForGID(GID); }; /** Assigns properties to argument value, returns true if it did found properties * for that GID and did assigned a value, else it returns false. diff --git a/cocos/2d/CCTMXXMLParser.h b/cocos/2d/CCTMXXMLParser.h index 4f9824dac0c9..1b25d029eb15 100644 --- a/cocos/2d/CCTMXXMLParser.h +++ b/cocos/2d/CCTMXXMLParser.h @@ -178,10 +178,6 @@ class CC_DLL TMXMapInfo : public Ref, public SAXDelegator /** creates a TMX Format with an XML string and a TMX resource path */ static TMXMapInfo * createWithXML(const std::string& tmxString, const std::string& resourcePath); - /** creates a TMX Format with a tmx file */ - CC_DEPRECATED_ATTRIBUTE static TMXMapInfo * formatWithTMXFile(const char *tmxFile) { return TMXMapInfo::create(tmxFile); }; - /** creates a TMX Format with an XML string and a TMX resource path */ - CC_DEPRECATED_ATTRIBUTE static TMXMapInfo * formatWithXML(const char* tmxString, const char* resourcePath) { return TMXMapInfo::createWithXML(tmxString, resourcePath); }; /** * @js ctor */ @@ -265,7 +261,6 @@ class CC_DLL TMXMapInfo : public Ref, public SAXDelegator /// is storing characters? bool isStoringCharacters() const { return _storingCharacters; } - CC_DEPRECATED_ATTRIBUTE bool getStoringCharacters() const { return isStoringCharacters(); } void setStoringCharacters(bool storingCharacters) { _storingCharacters = storingCharacters; } /// properties diff --git a/cocos/2d/CCTileMapAtlas.h b/cocos/2d/CCTileMapAtlas.h index b77844162ed4..568979166285 100644 --- a/cocos/2d/CCTileMapAtlas.h +++ b/cocos/2d/CCTileMapAtlas.h @@ -79,11 +79,7 @@ class CC_DLL TileMapAtlas : public AtlasNode *For the moment only channel R is used */ Color3B getTileAt(const Vec2& position) const; - /** - * Returns a tile from position x,y. - *For the moment only channel R is used - */ - CC_DEPRECATED_ATTRIBUTE Color3B tileAt(const Vec2& position) const { return getTileAt(position); }; + /** sets a tile at position x,y. For the moment only channel R is used */ diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index 0b14a801699d..0f1cef4c35c8 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -1317,7 +1317,7 @@ void TransitionCrossFade::onEnter() LayerColor* layer = LayerColor::create(color); // create the first render texture for inScene - RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); + RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888, TextureFormat::D24S8); if (nullptr == inTexture) { @@ -1334,7 +1334,7 @@ void TransitionCrossFade::onEnter() inTexture->end(); // create the second render texture for outScene - RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); + RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888, TextureFormat::D24S8); outTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) ); outTexture->setPosition(size.width/2, size.height/2); outTexture->setAnchorPoint( Vec2(0.5f,0.5f) ); diff --git a/cocos/2d/CCTransitionProgress.cpp b/cocos/2d/CCTransitionProgress.cpp index 1d94b3cc8904..8e5b469aa84f 100644 --- a/cocos/2d/CCTransitionProgress.cpp +++ b/cocos/2d/CCTransitionProgress.cpp @@ -72,7 +72,7 @@ void TransitionProgress::onEnter() Size size = Director::getInstance()->getWinSize(); // create the second render texture for outScene - RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); + RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888, backend::TextureFormat::D24S8); texture->getSprite()->setAnchorPoint(Vec2(0.5f,0.5f)); texture->setPosition(size.width/2, size.height/2); texture->setAnchorPoint(Vec2(0.5f,0.5f)); @@ -139,7 +139,7 @@ ProgressTimer* TransitionProgressRadialCCW::progressTimerNodeWithRenderTexture(R ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType(ProgressTimer::Type::RADIAL); // Return the radial type that we want to use @@ -183,7 +183,7 @@ ProgressTimer* TransitionProgressRadialCW::progressTimerNodeWithRenderTexture(Re ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType( ProgressTimer::Type::RADIAL ); // Return the radial type that we want to use @@ -215,7 +215,7 @@ ProgressTimer* TransitionProgressHorizontal::progressTimerNodeWithRenderTexture( ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType( ProgressTimer::Type::BAR); node->setMidpoint(Vec2(1, 0)); @@ -248,7 +248,7 @@ ProgressTimer* TransitionProgressVertical::progressTimerNodeWithRenderTexture(Re ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType(ProgressTimer::Type::BAR); node->setMidpoint(Vec2(0, 0)); @@ -294,7 +294,7 @@ ProgressTimer* TransitionProgressInOut::progressTimerNodeWithRenderTexture(Rende ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType( ProgressTimer::Type::BAR); node->setMidpoint(Vec2(0.5f, 0.5f)); @@ -328,7 +328,7 @@ ProgressTimer* TransitionProgressOutIn::progressTimerNodeWithRenderTexture(Rende ProgressTimer* node = ProgressTimer::create(texture->getSprite()); // but it is flipped upside down so we flip the sprite - node->getSprite()->setFlippedY(true); + // node->getSprite()->setFlippedY(true); node->setType( ProgressTimer::Type::BAR ); node->setMidpoint(Vec2(0.5f, 0.5f)); diff --git a/cocos/2d/CMakeLists.txt b/cocos/2d/CMakeLists.txt index 92a15df35490..1e91e009eb64 100644 --- a/cocos/2d/CMakeLists.txt +++ b/cocos/2d/CMakeLists.txt @@ -7,7 +7,6 @@ set(COCOS_2D_HEADER 2d/CCTMXTiledMap.h 2d/CCLayer.h 2d/CCActionCamera.h - 2d/CCLabelTTF.h 2d/CCParticleExamples.h 2d/CCSprite.h 2d/CCNode.h @@ -28,7 +27,6 @@ set(COCOS_2D_HEADER 2d/CCLabelAtlas.h 2d/CCActionCatmullRom.h 2d/CCActionGrid.h - 2d/CCDrawingPrimitives.h 2d/CCParticleBatchNode.h 2d/CCClippingRectangleNode.h 2d/CCActionEase.h @@ -45,7 +43,6 @@ set(COCOS_2D_HEADER 2d/CCFastTMXTiledMap.h 2d/CCLabelTextFormatter.h 2d/CCMenuItem.h - 2d/CCLabelBMFont.h 2d/CCFontFNT.h 2d/CCSpriteBatchNode.h 2d/CCTransitionProgress.h @@ -54,7 +51,6 @@ set(COCOS_2D_HEADER 2d/CCAnimation.h 2d/CCNodeGrid.h 2d/CCFontFreeType.h - 2d/CCGLBufferedNode.h 2d/CCAction.h 2d/CCTransition.h 2d/CCTransitionPageTurn.h @@ -70,8 +66,6 @@ set(COCOS_2D_HEADER 2d/CCTMXLayer.h 2d/CCCamera.h 2d/CCParallaxNode.h - 2d/CCGrabber.h - ) set(COCOS_2D_SRC @@ -98,7 +92,6 @@ set(COCOS_2D_SRC 2d/CCClippingRectangleNode.cpp 2d/CCComponentContainer.cpp 2d/CCComponent.cpp - 2d/CCDrawingPrimitives.cpp 2d/CCDrawNode.cpp 2d/CCFastTMXLayer.cpp 2d/CCFastTMXTiledMap.cpp @@ -108,14 +101,10 @@ set(COCOS_2D_SRC 2d/CCFont.cpp 2d/CCFontFNT.cpp 2d/CCFontFreeType.cpp - 2d/CCGLBufferedNode.cpp - 2d/CCGrabber.cpp 2d/CCGrid.cpp 2d/CCLabelAtlas.cpp - 2d/CCLabelBMFont.cpp 2d/CCLabel.cpp 2d/CCLabelTextFormatter.cpp - 2d/CCLabelTTF.cpp 2d/CCLayer.cpp 2d/CCLight.cpp 2d/CCMenu.cpp @@ -147,5 +136,4 @@ set(COCOS_2D_SRC 2d/CCTransitionPageTurn.cpp 2d/CCTransitionProgress.cpp 2d/CCTweenFunction.cpp - ) diff --git a/cocos/2d/cocos2d.def b/cocos/2d/cocos2d.def deleted file mode 100644 index 31666e8001a9..000000000000 --- a/cocos/2d/cocos2d.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY -EXPORTS - XXH32 \ No newline at end of file diff --git a/cocos/2d/cocos2d_headers.props b/cocos/2d/cocos2d_headers.props deleted file mode 100644 index ff21d70b749e..000000000000 --- a/cocos/2d/cocos2d_headers.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\ - - - - - $(EngineRoot)cocos;$(EngineRoot)cocos/editor-support;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES;$(EngineRoot)external\freetype2\include\win32\freetype2;$(EngineRoot)external\freetype2\include\win32\;$(EngineRoot)external;$(EngineRoot)external\openssl\include\win32 - _VARIADIC_MAX=10;%(PreprocessorDefinitions) - - - false - - - - - $(EngineRoot) - true - - - diff --git a/cocos/2d/cocos2dx.props b/cocos/2d/cocos2dx.props deleted file mode 100644 index d5e61ebdadd9..000000000000 --- a/cocos/2d/cocos2dx.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - false - - - - opengl32.lib;glew32.lib;libzlib.lib;libwebp.lib;libiconv.lib;freetype.lib;winmm.lib;ws2_32.lib;libSpine.lib;libbox2d.lib;libpng.lib;libjpeg.lib;libtiff.lib;libchipmunk.lib;glfw3.lib;libbullet.lib;%(AdditionalDependencies) - $(OutDir);%(AdditionalLibraryDirectories) - false - - - - false - - - - \ No newline at end of file diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj deleted file mode 100644 index b92c7cada5ef..000000000000 --- a/cocos/2d/libcocos2d.vcxproj +++ /dev/null @@ -1,1443 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - libcocos2d - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - cocos2d-x.win32 - Win32Proj - - - - DynamicLibrary - Unicode - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - - - DynamicLibrary - Unicode - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - ../../external/sqlite3/libraries/win32;$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - ../../external/uv/include;$(IncludePath) - - - ../../external/sqlite3/libraries/win32;$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - ../../external/uv/include;$(IncludePath) - - - - - - - - Disabled - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\Box2D\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\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;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;$(EngineRoot)external\poly2tri;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\win8.1-universal;$(EngineRoot)extensions;$(EngineRoot);$(EngineRoot)external/bullet/include/bullet;$(EngineRoot)external/bullet/include;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;LWS_DLL;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) - false - EnableFastChecks - MultiThreadedDebugDLL - Use - Level3 - OldStyle - 4267;4251;4244;%(DisableSpecificWarnings) - true - CompileAsCpp - precheader.h - precheader.h - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\freetype2\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\glfw3\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\curl\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\jpeg\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\png\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\tiff\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\webp\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OpenalSoft\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\MP3Decoder\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OggDecoder\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\bullet\prebuilt\win32\debug\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\Box2D\prebuilt\win32\debug\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\openssl\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\uv\prebuilt\win32\*.*" "$(OutDir)" - - - $(OutDir)$(ProjectName).dll - $(OutDir);%(AdditionalLibraryDirectories) - false - libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - $(TargetDir)$(TargetName).lib - MachineX86 - cocos2d.def - sqlite3.lib;libcurl.lib;websockets.lib;libcrypto.lib;libssl.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;version.lib;%(AdditionalDependencies) - - - - - - - - - - - - - $(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;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2D\include;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32\;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;$(EngineRoot)external\poly2tri;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\win8.1-universal;$(EngineRoot)extensions;$(EngineRoot);$(EngineRoot)external/bullet/include;$(EngineRoot)external/bullet/include/bullet;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;LWS_DLL;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) - MultiThreadedDLL - Use - Level3 - None - 4267;4251;4244;%(DisableSpecificWarnings) - true - CompileAsCpp - false - MinSpace - precheader.h - precheader.h - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\freetype2\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\glfw3\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\curl\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\jpeg\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\png\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\tiff\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\webp\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OpenalSoft\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\MP3Decoder\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OggDecoder\prebuilt\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\bullet\prebuilt\win32\release\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\Box2D\prebuilt\win32\release\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\openssl\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\external\uv\prebuilt\win32\*.*" "$(OutDir)" - - - sqlite3.lib;libcurl.lib;websockets.lib;libcrypto.lib;libssl.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;version.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).dll - $(OutDir);%(AdditionalLibraryDirectories) - LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - $(TargetDir)$(TargetName).lib - MachineX86 - cocos2d.def - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - precheader.h - Create - precheader.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {41e34993-647e-4282-8384-4ab1ae31a452} - - - {b7c2a162-dec9-4418-972e-240ab3cbfcae} - - - - - - \ No newline at end of file diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters deleted file mode 100644 index 3441f613000a..000000000000 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ /dev/null @@ -1,3938 +0,0 @@ - - - - - {08593631-5bf5-46aa-9436-62595c4f7bf6} - - - {0b1152b1-c732-4560-8629-87843b0fbd7c} - - - {0965e868-aacd-4d73-9c78-31d3cdaaed52} - - - {4d0146d9-df5b-4430-a426-60aa395750a6} - - - {a495c9fc-5276-476d-ba6b-5d627b31ef30} - - - {87a7d557-f382-477f-b183-69901a320c17} - - - {9ac3f4cb-fb7b-4bcc-8b5b-1d454f2ff564} - - - {fdea951b-e91d-45da-b5bd-22a1b875960a} - - - {3622d05e-fcef-4d4b-a51d-771d1c13a2ef} - - - {a565f213-2d13-4d2d-a3a0-5b2d06cbd05f} - - - {ec174f10-2de3-4568-9f30-b2f0a4e9396e} - - - {364c3b8c-77eb-46ed-a866-a8686b1b65bc} - - - {589928bf-e550-41f1-ae21-64443dd5fe21} - - - {1849ae10-8a10-4784-bbad-66fa67a1ed04} - - - {6c1e4a6b-c168-436b-aa63-0af7f4caebf9} - - - {b4e2b1e5-2d79-44a3-af45-728d47b7bdb2} - - - {44bdf58f-4af2-433c-b4af-58dc05ef96b5} - - - {63733c51-582a-4f0f-9a82-e066da459a72} - - - {dbdbbfad-71fc-4f1d-a809-b43651f87267} - - - {3bd71d42-dfa4-4649-bb01-ad607fdca1c2} - - - {704c4ce6-b7ad-4406-9414-71169734bbc1} - - - {976bf662-699e-482e-b5db-a20d4abab137} - - - {ad47c713-2196-4c8f-9205-2a2a7ecc0b80} - - - {b27aba95-51a2-413c-8570-0aff9adf2b6b} - - - {a1f539bc-d5be-4224-a4d2-01c0b6f17d6e} - - - {1de7fce7-0dee-4571-8fcd-43eb617aaf8b} - - - {f42979de-0079-4eba-b469-81ebff9ec588} - - - {f42ec238-cddc-475a-b343-6d0984cb9681} - - - {31338a7d-ebe1-4867-9c17-d3645122a864} - - - {5a094fe5-f941-4dd4-a892-28d721162ea7} - - - {9702eb68-42c9-405a-bc89-a1bd85a40ec7} - - - {ad654e6b-96ee-4693-9789-dc4aa1c52e70} - - - {177a9a30-a4a6-41e6-93f0-4a4cbe9e4039} - - - {c2ebbbc1-85b3-4d6f-a3c5-116eae2124e1} - - - {0d201449-ce7a-4f87-86ab-9c30e803c901} - - - {6ac0e3c8-d5b1-44d9-8c41-21662a767cc6} - - - {c75d4c37-d555-4a5b-a0ba-4bc9a3d846e1} - - - {67bdb22e-8cfc-41ed-bb07-861e88a31752} - - - {284a709e-9efa-484a-a595-83db6c7836c8} - - - {3c7267f2-06ea-4c7c-a13c-552076a3dc8c} - - - {b47c2297-bf5e-43e6-ae70-741efee00689} - - - {1b5e8a9e-87cf-4800-bb7b-4f63504fb132} - - - {d47fb3dd-9ab8-4559-b8b5-776d87aba319} - - - {65c0429b-5a85-46ac-ab4a-edb0aeb5d388} - - - {8bdf34ea-1e66-41b0-9dbf-7530ba14dce5} - - - {690fb572-be0b-4bb6-9b8b-a007afb99b39} - - - {5e397fa9-4e36-43f3-8c4f-1dd3382c1458} - - - {fa2abcd0-6362-4741-a144-a3b0226fe4f1} - - - {03596848-0d59-4d69-8193-30f404683c7a} - - - {4d27423a-d9e8-496b-bcc4-8684230c6c18} - - - {075b4cf0-63ae-4cb1-a6d8-e7cb24146531} - - - {9421ece2-69f8-4cee-8e59-575c3ba06f15} - - - {9421ece2-69f8-4cee-8e59-51043ba06f15} - - - {9421e104-69f8-4cee-8e59-51043ba06f15} - - - {9421e104-1028-4cee-8e59-51043ba06f15} - - - {94210432-69f8-4cee-8e59-51043ba06f15} - - - {a9901b6a-0c7b-4adb-8e17-105c872d744d} - - - {a9a3bf20-9daf-465d-9525-cce2ab0d85a3} - - - {0cf2210c-3544-41ed-9d4e-88987a1c7bcf} - - - {dc6e53e4-e518-403f-b2a9-97f6f7cd0961} - - - {22a4587f-d4ca-44fa-a734-ded122cd79e5} - - - {137efcbb-0d14-4f1c-a856-7b1669a6d2af} - - - {4825cd2d-ca8b-434c-8c79-2d3d3258086f} - - - {57ba2fcb-04bd-4b2f-9ae6-375992ad363a} - - - {acdfaa6f-1374-4611-a5e7-9038dc6900c4} - - - {f195e2f1-1030-4848-9498-f8142bf89009} - - - {d48c8016-e933-48dd-a5c0-202b0a84b82a} - - - {e25a6c9d-eaf2-446f-b9b2-d89fd21a9bdd} - - - {bbba68d3-e519-4e06-8a01-d8ee89b544f2} - - - {8579ed15-b266-4f80-818d-a3a9251c4248} - - - {89eb6312-dc7f-4fda-b9b2-ab67c31ddd55} - - - {118d80ca-ccf2-480c-b87d-25220af23440} - - - {e916e2b4-0a6e-4d25-8b36-66fa03719f48} - - - {0554a5b1-03a1-4d38-87a5-976dbe9a39d9} - - - {db915acb-1838-413d-b290-dc280365eabc} - - - {b71e98df-9863-4ee5-9818-04fad2ef8da1} - - - {78a3fbcc-4233-47f0-9b53-5a445dad9400} - - - {737cc376-2a40-4203-8280-842362c5db49} - - - {7604b98b-40ff-440f-8335-7729e1fa310c} - - - {da363675-4650-4c12-892e-d5755a8b608f} - - - {39a43e29-dd58-47a3-9906-bf714b185f6a} - - - {9aee531c-f935-4836-bf84-be42e78e38bb} - - - {92ff4e66-3943-47da-a439-c8f182bb871a} - - - {f646bed2-5709-4436-82a4-b553ff7cd85c} - - - {ed9d0632-d777-44fe-b754-29d08f3b0572} - - - {e1848cce-b225-42c4-bb6e-6430b6da123b} - - - {46294cdb-c29a-4480-9988-2e017f5f7846} - - - {b0703876-33ee-433c-bba3-45304ce83813} - - - {c37eceeb-5702-4ff7-88de-94680a22266f} - - - {e492faef-2169-4117-8d73-e0c66271fe25} - - - {ff65e340-b79d-4f87-9b4c-ed46bda5d20f} - - - {0f3fa25d-9e2b-4a2e-a1df-834b796b3fb3} - - - {8405cf93-e86c-4ec1-8b16-01058f542b09} - - - {ca5e1475-3bfd-4aae-ad54-2e19d5021b92} - - - {8686c220-18af-4bea-abce-f4797afd01f1} - - - {5cbd879f-02ae-4f28-af33-2c4f980dd6f0} - - - {d3d38486-e13f-47b4-96b0-51a7c78e6d69} - - - - - physics - - - physics - - - physics - - - physics - - - physics - - - external\xxhash - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - - external\ConvertUTF - - - external\ConvertUTF - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - platform - - - base - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - platform - - - platform - - - platform - - - platform - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\edtaa - - - base - - - renderer - - - base - - - 2d - - - 2d - - - storage - - - platform - - - 2d - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - extension\AssetsManager - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\physics_nodes - - - extension\physics_nodes - - - cocosdenshion\Source Files - - - cocosdenshion\Source Files - - - network\Source Files - - - network\Source Files - - - network\Source Files - - - ui\BaseClasses - - - ui\BaseClasses - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\System - - - ui\System - - - ui\System - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\reader - - - cocostudio\reader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader\ButtonReader - - - cocostudio\reader\WidgetReader\CheckBoxReader - - - cocostudio\reader\WidgetReader\ImageViewReader - - - cocostudio\reader\WidgetReader\LayoutReader - - - cocostudio\reader\WidgetReader\ListViewReader - - - cocostudio\reader\WidgetReader\LoadingBarReader - - - cocostudio\reader\WidgetReader\PageViewReader - - - cocostudio\reader\WidgetReader\ScrollViewReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\TextAtlasReader - - - cocostudio\reader\WidgetReader\TextBMFontReader - - - cocostudio\reader\WidgetReader\TextFieldReader - - - cocostudio\reader\WidgetReader\TextReader - - - cocostudio\reader\WidgetReader\Node3DReader - - - cocostudio\reader\WidgetReader\Sprite3DReader - - - cocostudio\reader\WidgetReader\UserCameraReader - - - cocostudio\reader\WidgetReader\Particle3DReader - - - cocostudio\json - - - cocostudio\json - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\armature - - - cocostudio\armature - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\datas - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\physics - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - 3d - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - cocosbuilder\Source Files - - - 3d - - - ui\UIWidgets\EditBox - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\desktop - - - ui\UIWidgets\EditBox - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - ui\UIWidgets - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - cocostudio\TimelineAction - - - ui\Layouts - - - 2d - - - 2d - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json - - - cocostudio\reader\WidgetReader\ComAudioReader - - - cocostudio\reader\WidgetReader\GameMapReader - - - cocostudio\reader\WidgetReader\NodeReader - - - cocostudio\reader\WidgetReader\ParticleReader - - - cocostudio\reader\WidgetReader\ProjectNodeReader - - - cocostudio\reader\WidgetReader\SingleNodeReader - - - cocostudio\reader\WidgetReader\SpriteReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\json - - - cocostudio\TimelineAction - - - base - - - base\allocator - - - base\allocator - - - base\allocator - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - 3d - - - 3d - - - 3d - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - cocostudio\json - - - external\poly2tri\common - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - renderer - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - base - - - base - - - - renderer - - - 2d - - - external\clipper - - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\components - - - network\Source Files - - - 2d - - - renderer - - - - cocostudio\reader\WidgetReader\TabControlReader - - - ui\UIWidgets - - - cocostudio\json - - - vr - - - vr - - - vr - - - vr - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - network\Source Files - - - network\Source Files - - - 3d - - - 3d - - - external\md5 - - - ui\UIWidgets\EditBox - - - - - - - - - - physics - - - physics - - - physics - - - physics - - - physics - - - external\xxhash - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - - external\ConvertUTF - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - platform - - - base - - - base - - - base - - - base - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - platform\win32\compat - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\edtaa - - - base - - - base - - - renderer - - - base - - - 2d - - - 2d - - - storage - - - platform - - - 2d - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - extension\AssetsManager - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\physics_nodes - - - extension\physics_nodes - - - extension - - - extension - - - extension - - - cocosdenshion\Header Files - - - cocosdenshion\Header Files - - - cocosdenshion\Header Files - - - network\Header Files - - - network\Header Files - - - network\Header Files - - - network\Header Files - - - network\Header Files - - - ui\BaseClasses - - - ui\BaseClasses - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\System - - - ui\System - - - ui\System - - - ui\System - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - cocostudio - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction\trigger - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\reader - - - cocostudio\reader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader\ButtonReader - - - cocostudio\reader\WidgetReader\CheckBoxReader - - - cocostudio\reader\WidgetReader\ImageViewReader - - - cocostudio\reader\WidgetReader\LayoutReader - - - cocostudio\reader\WidgetReader\ListViewReader - - - cocostudio\reader\WidgetReader\LoadingBarReader - - - cocostudio\reader\WidgetReader\PageViewReader - - - cocostudio\reader\WidgetReader\ScrollViewReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\TextAtlasReader - - - cocostudio\reader\WidgetReader\TextBMFontReader - - - cocostudio\reader\WidgetReader\TextFieldReader - - - cocostudio\reader\WidgetReader\TextReader - - - cocostudio\reader\WidgetReader\Node3DReader - - - cocostudio\reader\WidgetReader\UserCameraReader - - - cocostudio\reader\WidgetReader\Particle3DReader - - - cocostudio\reader\WidgetReader\Sprite3DReader - - - cocostudio\json - - - cocostudio\json - - - cocostudio\json - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson - - - cocostudio\json\rapidjson\internal - - - cocostudio\json\rapidjson\internal - - - cocostudio\json\rapidjson\internal - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\armature - - - cocostudio\armature - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\datas - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\physics - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - 3d - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - cocosbuilder\Header Files - - - 3d - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\EditBox - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\desktop - - - ui\UIWidgets\EditBox - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - ui\UIWidgets - - - ui\UIWidgets - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - cocostudio\TimelineAction - - - ui\Layouts - - - 2d - - - 2d - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json\flatbuffers - - - cocostudio\json - - - cocostudio\json - - - cocostudio\json - - - cocostudio\reader\WidgetReader\ComAudioReader - - - cocostudio\reader\WidgetReader\GameMapReader - - - cocostudio\reader\WidgetReader\NodeReader - - - cocostudio\reader\WidgetReader\ParticleReader - - - cocostudio\reader\WidgetReader\ProjectNodeReader - - - cocostudio\reader\WidgetReader\SingleNodeReader - - - cocostudio\reader\WidgetReader\SpriteReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\json - - - cocostudio\TimelineAction - - - base - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - physics - - - 3d - - - 3d - - - platform - - - platform - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D\ParticleUniverse - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - external\poly2tri - - - external\poly2tri\common - - - external\poly2tri\common - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - renderer - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - base - - - base - - - - renderer - - - 2d - - - external\clipper - - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\components - - - network\Header Files - - - network\Header Files - - - 2d - - - renderer - - - network\Header Files - - - - ui - - - cocostudio\json - - - cocostudio\reader\WidgetReader\TabControlReader - - - cocostudio\reader\WidgetReader\TabControlReader - - - ui\UIWidgets - - - cocostudio\json - - - vr - - - vr - - - vr - - - vr - - - vr - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - network\Header Files - - - 3d - - - 3d - - - external\md5 - - - ui\UIWidgets\EditBox - - - - - - - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - - 3d - - - \ No newline at end of file diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj deleted file mode 100644 index 07188708b904..000000000000 --- a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj +++ /dev/null @@ -1,1754 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - false - false - NotUsing - NotUsing - - - - - false - false - false - false - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0c32d479-46d5-46c3-9aa9-0a8ff8320516} - - - {f551524d-8a70-4b2f-a7c2-28ae61150022} - - - {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} - - - - {07c2895d-720c-487d-b7b4-12c293ea533f} - DynamicLibrary - libcocos2d - libcocos2d - en-US - 14.0 - true - Windows Store - 8.2 - 10.0.10240.0 - 10.0.10240.0 - - - - DynamicLibrary - true - v141 - - - DynamicLibrary - true - v141 - - - DynamicLibrary - true - v141 - - - DynamicLibrary - false - true - v141 - - - DynamicLibrary - false - true - v141 - - - DynamicLibrary - false - true - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - libcocos2d_v3.15_Windows_10.0 - - - false - false - libcocos2d_v3.15_Windows_10.0 - - - false - false - false - libcocos2d_v3.15_Windows_10.0 - - - false - false - false - libcocos2d_v3.15_Windows_10.0 - - - false - false - libcocos2d_v3.15_Windows_10.0 - - - false - false - libcocos2d_v3.15_Windows_10.0 - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - ProgramDatabase - - - Console - false - false - MSVCRT;%(IgnoreSpecificDefaultLibraries) - - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - false - ProgramDatabase - - - Console - false - false - - - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - ProgramDatabase - - - Console - false - false - MSVCRT;%(IgnoreSpecificDefaultLibraries) - - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - false - ProgramDatabase - - - Console - false - false - - - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - ProgramDatabase - - - Console - false - false - MSVCRT;%(IgnoreSpecificDefaultLibraries) - - - - - Use - true - pch.h - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) - false - 4458;4459;%(DisableSpecificWarnings) - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\win10-specific\OggDecoder\include;%(AdditionalIncludeDirectories) - /Zm384 /bigobj %(AdditionalOptions) - false - ProgramDatabase - - - Console - false - false - - - - - - - \ No newline at end of file diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters deleted file mode 100644 index 9b2610df4d8c..000000000000 --- a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters +++ /dev/null @@ -1,4209 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms - - - {7a1f75b9-e286-444c-9469-0cf18caf9851} - - - {0fee395c-63c7-44c6-a4f4-1f36e2c87bb8} - - - {50c0af16-c916-4fa8-9fa2-b86e38449e26} - - - {5aeb6e4f-9e25-4b88-b583-fa11189743a0} - - - {cfeb83ba-f330-49a3-a32f-4360729feb34} - - - {48ef00ff-acc8-4c9c-a6e4-00d72e737ad2} - - - {f2236b85-0526-49e2-a18c-ac4951062666} - - - {33f548c2-d835-4404-9e44-ad1511588c8e} - - - {26495053-242d-4ec8-bf5a-6ea6f5ac4000} - - - {94bbb957-b493-45d2-9f5a-753ac1ab78ce} - - - {a2141e87-a561-433e-905b-63ff5c4e0e6e} - - - {661c905d-7ec2-4161-8b09-1c22ddefb830} - - - {6b13d475-62b0-4d73-8cee-52f077aa3fe7} - - - {33af945f-9ffb-4e87-9467-7774d4cbaaee} - - - {abb46246-b4f9-4ad0-8db8-11b47ce43a1f} - - - {e779fbed-6102-4689-81bd-57b2e70b0f26} - - - {769e8f33-4eef-4d34-a192-6113354d584f} - - - {2775a689-9303-4568-8bdd-85793c152dc0} - - - {d58e753e-e7d1-49ea-970a-4e980b04cffa} - - - {9ec27523-fcde-48f7-8f77-34e2f2c51d3d} - - - {e7a997f1-97ef-408f-9455-132da617f439} - - - {b7fa88eb-4dd8-4476-89b3-665a128ecd49} - - - {1c30324c-b033-419a-b0bc-fcd04bf5e887} - - - {5f24927a-be4e-43d4-bfa6-19a11c86ba74} - - - {b4dfd33e-325a-45e5-b5c4-bc759a765944} - - - {1adc7897-87b2-4fa2-9de1-a662bbc0cef2} - - - {8f07e318-d877-4880-834e-0e5a36759148} - - - {47260f4a-f9ab-4801-8a7f-5610755592f6} - - - {69e44658-eabe-4434-bc55-09ba8fc18a65} - - - {0a31f1b5-366b-4b0e-b998-6eee00a5e232} - - - {377b23e6-4800-4305-b6de-7ffd6ab75445} - - - {3629c3cd-b691-403d-bec6-6915a63304bd} - - - {46c2c273-aa0e-4bc5-8eea-3aa512372d3a} - - - {09f711eb-3ba4-447e-85a0-b2b5ebb40328} - - - {ed4442ff-0420-424c-bbfa-720b8ab658d0} - - - {e6726a08-977a-4d22-b4b4-4e8c5aa75c80} - - - {33cb6b93-333c-4f05-bc0b-e17ac95abdf9} - - - {e74ad41e-c739-4e66-8b54-15914b651f1b} - - - {e6a2d595-06dc-436f-b5d7-57e8852f800e} - - - {5b4d4e9c-90de-496a-9897-930e48c96052} - - - {f711caa7-1c16-43ec-8f2e-92438bfdd92d} - - - {9b4e1b59-dc28-49aa-9b93-05ae39afeef4} - - - {566aad08-9d43-48ff-99a0-3f4a8e6cfa23} - - - {ebca298d-3724-42b8-923f-934f2df267de} - - - {cdcb5464-cce7-4252-9fa9-0113c6f88731} - - - {6ba31aca-4ffb-4c7f-86b3-68c686e9e83a} - - - {12508884-4921-4027-9e3f-0afcc4d51b18} - - - {d28da99a-5849-465a-a1ef-a39f13b8d71b} - - - {5c9216f7-37c5-45a7-abd5-0f91ab126e78} - - - {efebb9af-0744-4d20-947b-a118679860ba} - - - {c67477ac-753e-48da-9f7c-2044d8d3561c} - - - {b96929a6-1068-4e34-ba12-9b1506c52029} - - - {2b9df357-22d4-4fd0-b797-a9bfb25a2f49} - - - {cd711175-67df-4a15-bc83-c13422334b46} - - - {2520090a-69d8-46d3-a958-de49c068035c} - - - {21031d69-8a1d-468a-98d7-2c3080705ab3} - - - {b666aa35-1920-44d0-8311-86e80b7a010a} - - - {21d16309-93ee-4b38-a10a-de87be25dcc9} - - - {939431be-589b-461b-a4dd-791ad66e9611} - - - {00ac48e4-fa60-4020-b924-18562a81d799} - - - {593b7ac7-693d-4a46-ab32-e0203004e865} - - - {6651f0d8-3685-457c-9674-91ba9c2bde9b} - - - {922ba080-bc7b-4493-b12a-2ccf5ccc3d68} - - - {7bfc1d7e-a562-4ef8-82f0-af7c5f9ec004} - - - {fff4ac28-7649-4202-85ee-4fc22b4de31b} - - - {d0b5ce80-dfff-44b8-8ca0-c01ec18c3983} - - - {8d2b7057-43b4-41e4-a752-0cfc20b1c825} - - - {1715f2ff-18ed-405a-a0b7-1bb7fc7968de} - - - {7a8dbff0-49af-4a9e-af07-7ecc643cf7d0} - - - {287c8ea7-54ab-4514-94ad-bc60fca8e2f6} - - - {f8e329a2-40aa-428b-b111-3b788023c5e0} - - - {0a443764-b762-4858-b578-114bfc5d7ab5} - - - {6fcf3801-c3e1-4097-ba82-3da0a6599555} - - - {acb13cf1-4b21-4392-826a-0ca62db8afe9} - - - {92cd288c-1327-4990-8ae2-dab11fa3a69c} - - - {bc47263f-0690-488e-b240-0b7bf763f401} - - - {5937896e-882c-429a-ada7-72c799c06920} - - - {f68e83b4-2fa3-4f47-9864-e7dfd90c16a6} - - - {cc4f6ca9-4231-479d-8e19-ede4dff3382e} - - - {e3a5fe25-a92e-4c98-9026-782b2b5b1388} - - - {a10cc84c-5c61-43f4-a665-5e5cbab47ee1} - - - {438e0063-bdbc-4252-a0f5-f55f7d54ed6f} - - - {0760e708-a93e-41f5-abaf-a7e422882920} - - - {549d5ddb-02ff-4b34-8e49-8fb7570ecff4} - - - {55b041f0-d164-40f4-8dbd-a188ed9d9f6e} - - - {2e9af99e-c268-459a-9615-9f3c5b58efdc} - - - {757d4df8-a9d6-430f-9a7a-80170d9ca6fb} - - - {9ed292ed-61f9-4197-b99d-d6d6dbf63235} - - - {18477c41-d2ad-4050-b23e-06613d1265b4} - - - {d5ca0311-8832-4f39-a84c-986edf7b7db0} - - - {96ca83bc-ffd4-4d74-890d-f7e89df4a44e} - - - {68ac465b-56b4-4803-806f-00d23cb49142} - - - {079e35c5-f476-44f8-a3f0-04cf205f7260} - - - - - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base\allocator - - - base\allocator - - - base\allocator - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosdenshion\winrt - - - cocosdenshion\winrt - - - cocosdenshion\winrt - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\armature - - - cocostudio\armature - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\datas - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\physics - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\trigger - - - cocostudio\trigger - - - cocostudio\trigger - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - cocostudio\reader\WidgetReader\ButtonReader - - - cocostudio\reader\WidgetReader\CheckBoxReader - - - cocostudio\reader\WidgetReader\ComAudioReader - - - cocostudio\reader\WidgetReader\GameMapReader - - - cocostudio\reader\WidgetReader\ImageViewReader - - - cocostudio\reader\WidgetReader\LayoutReader - - - cocostudio\reader\WidgetReader\ListViewReader - - - cocostudio\reader\WidgetReader\LoadingBarReader - - - cocostudio\reader\WidgetReader\Node3DReader - - - cocostudio\reader\WidgetReader\NodeReader - - - cocostudio\reader\WidgetReader\PageViewReader - - - cocostudio\reader\WidgetReader\Particle3DReader - - - cocostudio\reader\WidgetReader\Particle3DReader\ParticleReader - - - cocostudio\reader\WidgetReader\ProjectNodeReader - - - cocostudio\reader\WidgetReader\ScrollViewReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\Sprite3DReader - - - cocostudio\reader\WidgetReader\SpriteReader - - - cocostudio\reader\WidgetReader\TextAtlasReader - - - cocostudio\reader\WidgetReader\TextBMFontReader - - - cocostudio\reader\WidgetReader\TextFieldReader - - - cocostudio\reader\WidgetReader\TextReader - - - cocostudio\reader\WidgetReader\UserCameraReader - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\physics_nodes - - - extension\physics_nodes - - - extension - - - external\ConvertUTF - - - external\ConvertUTF - - - external\edtaa - - - external\xxhash - - - external\unzip - - - external\unzip - - - external\unzip - - - external\tinyxml2 - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - network - - - network - - - network - - - network - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - storage - - - ui\BaseClasses - - - ui\BaseClasses - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\System - - - ui\System - - - ui\System - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - cocostudio\reader - - - cocostudio\reader - - - platform\winrt - - - external\poly2tri\common - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - network - - - network - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - base - - - audioengine - - - audioengine - - - audioengine - - - audioengine - - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - 2d - - - external\clipper - - - cocostudio\components - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\reader\WidgetReader\GameNodeDReader - - - 2d - - - renderer - - - physics - - - physics - - - physics - - - physics - - - physics - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - network - - - network - - - cocostudio\reader\WidgetReader\Light3DReader - - - cocostudio\components - - - cocostudio\reader\WidgetReader\TabControlReader - - - ui\UIWidgets - - - ui\UIWidgets\EditBox - - - vr - - - vr - - - vr - - - vr - - - external\md5 - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - - - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - base\allocator - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosbuilder - - - cocosdenshion\include - - - cocosdenshion\include - - - cocosdenshion\include - - - cocosdenshion\winrt - - - cocosdenshion\winrt - - - cocostudio - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\action - - - cocostudio\armature - - - cocostudio\armature - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\animation - - - cocostudio\armature\datas - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\display - - - cocostudio\armature\physics - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\armature\utils - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\components - - - cocostudio\trigger - - - cocostudio\trigger - - - cocostudio\trigger - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\TimelineAction - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - cocostudio\reader\WidgetReader\ArmatureNodeReader - - - cocostudio\reader\WidgetReader\ButtonReader - - - cocostudio\reader\WidgetReader\CheckBoxReader - - - cocostudio\reader\WidgetReader\ComAudioReader - - - cocostudio\reader\WidgetReader\GameMapReader - - - cocostudio\reader\WidgetReader\ImageViewReader - - - cocostudio\reader\WidgetReader\LayoutReader - - - cocostudio\reader\WidgetReader\ListViewReader - - - cocostudio\reader\WidgetReader\LoadingBarReader - - - cocostudio\reader\WidgetReader\Node3DReader - - - cocostudio\reader\WidgetReader\NodeReader - - - cocostudio\reader\WidgetReader\PageViewReader - - - cocostudio\reader\WidgetReader\Particle3DReader - - - cocostudio\reader\WidgetReader\Particle3DReader\ParticleReader - - - cocostudio\reader\WidgetReader\ProjectNodeReader - - - cocostudio\reader\WidgetReader\ScrollViewReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\SliderReader - - - cocostudio\reader\WidgetReader\Sprite3DReader - - - cocostudio\reader\WidgetReader\SpriteReader - - - cocostudio\reader\WidgetReader\TextAtlasReader - - - cocostudio\reader\WidgetReader\TextBMFontReader - - - cocostudio\reader\WidgetReader\TextFieldReader - - - cocostudio\reader\WidgetReader\TextReader - - - cocostudio\reader\WidgetReader\UserCameraReader - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCControlExtensions - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\GUI\CCScrollView - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\Particle3D\PU - - - extension\physics_nodes - - - extension\physics_nodes - - - extension - - - extension - - - extension - - - extension - - - external\ConvertUTF - - - external\edtaa - - - external\xxhash - - - external\unzip - - - external\unzip - - - external\unzip - - - external\unzip - - - external\tinyxml2 - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - network - - - network - - - network - - - network - - - network - - - network - - - network - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - storage - - - ui\BaseClasses - - - ui\BaseClasses - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\Layouts - - - ui\System - - - ui\System - - - ui\System - - - ui\System - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\EditBox - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets\ScrollWidget - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - ui\UIWidgets - - - cocostudio\reader - - - cocostudio\reader - - - platform\winrt - - - external\poly2tri - - - external\poly2tri\common - - - external\poly2tri\common - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - external\poly2tri\sweep - - - network - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - audioengine - - - audioengine - - - audioengine - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - navmesh - - - 2d - - - external\clipper - - - cocostudio\components - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\reader\WidgetReader\SkeletonReader - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\TimelineAction\Skeleton - - - cocostudio\reader\WidgetReader\GameNodeDReader - - - 2d - - - renderer - - - physics - - - physics - - - physics - - - physics - - - physics - - - physics - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - physics3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - extension\AssetsManager - - - network - - - network - - - network - - - cocostudio\reader\WidgetReader\Light3DReader - - - cocostudio\components - - - cocostudio\reader\WidgetReader\TabControlReader - - - cocostudio\reader\WidgetReader\TabControlReader - - - ui\UIWidgets - - - ui\UIWidgets\EditBox - - - vr - - - vr - - - vr - - - vr - - - external\md5 - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - cocostudio - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - external\flatbuffers - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json - - - external\json\error - - - external\json\error - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\internal - - - external\json\msinttypes - - - external\json\msinttypes - - - - - base - - - base - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - 3d - - - \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10.props b/cocos/2d/win10_props/cocos2d_win10.props deleted file mode 100644 index 4098971e2df7..000000000000 --- a/cocos/2d/win10_props/cocos2d_win10.props +++ /dev/null @@ -1,31 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\..\ - - - - - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\openssl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories) - - - WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;_USRJSSTATIC;%(PreprocessorDefinitions) - true - true - false - OldStyle - - - ogg.lib;vorbis.lib;vorbisfile.lib;libGLESv2.lib;libEGL.lib;ws2_32.lib;websockets.lib;libcurl_imp.lib;chipmunk.lib;zlib.lib;freetype.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) - $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\OggDecoder\prebuilt\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalLibraryDirectories); - /IGNORE:4264 %(AdditionalOptions) - - - - - $(EngineRoot) - true - - - diff --git a/cocos/2d/win10_props/cocos2d_win10_app.props b/cocos/2d/win10_props/cocos2d_win10_app.props deleted file mode 100644 index 1adf70417b67..000000000000 --- a/cocos/2d/win10_props/cocos2d_win10_app.props +++ /dev/null @@ -1,49 +0,0 @@ - - - - - $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\ - $(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ - $(EngineRoot)external\openssl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ - $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform)\ - $(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ - $(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\ - $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\OggDecoder\prebuilt\$(Platform)\ - $(EngineRoot)external\websockets\prebuilt\$(Platform)\ - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10_platform.props b/cocos/2d/win10_props/cocos2d_win10_platform.props deleted file mode 100644 index 14747a896d4e..000000000000 --- a/cocos/2d/win10_props/cocos2d_win10_platform.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - win10 - - - - msxml6.lib;%(AdditionalDependencies) - - - \ No newline at end of file diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index 98010fff11ab..d66dae093d56 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -110,10 +110,6 @@ class CC_DLL Animate3D: public ActionInterval /** set animate transition time between 3d animations */ static void setTransitionTime(float transTime) { if (transTime >= 0.f) _transTime = transTime; } - /**get & set play reverse, these are deprecated, use set negative speed instead*/ - CC_DEPRECATED_ATTRIBUTE bool getPlayBack() const { return _playReverse; } - CC_DEPRECATED_ATTRIBUTE void setPlayBack(bool reverse) { _playReverse = reverse; } - /**set animate quality*/ void setQuality(Animate3DQuality quality); diff --git a/cocos/3d/CCAnimation3D.h b/cocos/3d/CCAnimation3D.h index c99d4311752e..92e5830ab420 100644 --- a/cocos/3d/CCAnimation3D.h +++ b/cocos/3d/CCAnimation3D.h @@ -69,9 +69,6 @@ class CC_DLL Animation3D: public Ref /**read all animation or only the animation with given animationName? animationName == "" read the first.*/ static Animation3D* create(const std::string& filename, const std::string& animationName = ""); - - /**the cache method to create or get an Animation3D object*/ - CC_DEPRECATED_ATTRIBUTE static Animation3D* getOrCreate(const std::string& filename, const std::string& animationName = ""){ return create(filename, animationName); } /**get duration*/ float getDuration() const { return _duration; } diff --git a/cocos/3d/CCAnimationCurve.h b/cocos/3d/CCAnimationCurve.h index 7d7f26bddb11..249831a347a3 100644 --- a/cocos/3d/CCAnimationCurve.h +++ b/cocos/3d/CCAnimationCurve.h @@ -32,10 +32,6 @@ #include "base/CCRef.h" #include "math/CCMath.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#undef NEAR -#endif - NS_CC_BEGIN /** diff --git a/cocos/3d/CCBillBoard.cpp b/cocos/3d/CCBillBoard.cpp index e41cfcc23d6e..94b411f93813 100644 --- a/cocos/3d/CCBillBoard.cpp +++ b/cocos/3d/CCBillBoard.cpp @@ -225,16 +225,11 @@ bool BillBoard::calculateBillboardTransform() return false; } -bool BillBoard::calculateBillbaordTransform() -{ - return calculateBillboardTransform(); -} - void BillBoard::draw(Renderer *renderer, const Mat4 &/*transform*/, uint32_t flags) { //FIXME: frustum culling here flags |= Node::FLAGS_RENDER_AS_3D; - _trianglesCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, _polyInfo.triangles, _modelViewTransform, flags); + _trianglesCommand.init(0, _texture, _blendFunc, _polyInfo.triangles, _modelViewTransform, flags); _trianglesCommand.setTransparent(true); _trianglesCommand.set3D(true); renderer->addCommand(&_trianglesCommand); diff --git a/cocos/3d/CCBillBoard.h b/cocos/3d/CCBillBoard.h index 78fa67eefbd5..ea337c025739 100644 --- a/cocos/3d/CCBillBoard.h +++ b/cocos/3d/CCBillBoard.h @@ -115,9 +115,6 @@ class CC_DLL BillBoard : public Sprite * calculate a model matrix which keep original translate & scaling but always face to the camera */ bool calculateBillboardTransform(); - - /** @deprecated Use calculateBillboardTransform instead. */ - CC_DEPRECATED_ATTRIBUTE bool calculateBillbaordTransform(); Mat4 _camWorldMat; Mat4 _mvTransform; diff --git a/cocos/3d/CCMesh.h b/cocos/3d/CCMesh.h index 326b150673de..6b8716bd9b3d 100644 --- a/cocos/3d/CCMesh.h +++ b/cocos/3d/CCMesh.h @@ -63,8 +63,6 @@ class CC_DLL Mesh : public Ref typedef std::vector IndexArray; /**create mesh from positions, normals, and so on, single SubMesh*/ static Mesh* create(const std::vector& positions, const std::vector& normals, const std::vector& texs, const IndexArray& indices); - /**create mesh with vertex attributes*/ - CC_DEPRECATED_ATTRIBUTE static Mesh* create(const std::vector& vertices, int perVertexSizeInFloat, const IndexArray& indices, int /*numIndex*/, const std::vector& attribs, int /*attribCount*/){ return create(vertices, perVertexSizeInFloat, indices, attribs); } /** * @lua NA diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 9f96f9fe1f0e..ca364b751bd1 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -759,9 +759,10 @@ void Sprite3D::visit(cocos2d::Renderer *renderer, const cocos2d::Mat4 &parentTra void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { #if CC_USE_CULLING + //TODO new-renderer: interface isVisibleInFrustum removal // camera clipping - if(_children.size() == 0 && Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&getAABB())) - return; +// if(_children.size() == 0 && Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&getAABB())) +// return; #endif if (_skeleton) @@ -930,15 +931,6 @@ Mesh* Sprite3D::getMesh() const return _meshes.at(0); } -MeshSkin* Sprite3D::getSkin() const -{ - for (const auto& it : _meshes) { - if (it->getSkin()) - return it->getSkin(); - } - return nullptr; -} - void Sprite3D::setForce2DQueue(bool force2D) { for (const auto &mesh : _meshes) { diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index 5a8591b0d26f..db7a67510187 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -104,9 +104,6 @@ class CC_DLL Sprite3D : public Node, public BlendProtocol /** get mesh count */ ssize_t getMeshCount() const { return _meshes.size(); } - /**get skin*/ - CC_DEPRECATED_ATTRIBUTE MeshSkin* getSkin() const; - Skeleton3D* getSkeleton() const { return _skeleton; } /**get AttachNode by bone name, return nullptr if not exist*/ diff --git a/cocos/3d/CCTerrain.cpp b/cocos/3d/CCTerrain.cpp index 634a914b8397..fd59c393423e 100644 --- a/cocos/3d/CCTerrain.cpp +++ b/cocos/3d/CCTerrain.cpp @@ -1358,11 +1358,6 @@ bool Terrain::Chunk::getIntersectPointWithRay(const Ray& ray, Vec3& intersectPoi return isFind; } -bool Terrain::Chunk::getInsterctPointWithRay(const Ray& ray, Vec3& intersectPoint) -{ - return getIntersectPointWithRay(ray, intersectPoint); -} - void Terrain::Chunk::updateVerticesForLOD() { if(_oldLod == _currentLod){ return;} // no need to update vertices @@ -1559,18 +1554,19 @@ void Terrain::QuadTree::resetNeedDraw(bool value) void Terrain::QuadTree::cullByCamera(const Camera * camera, const Mat4 & worldTransform) { - if(!camera->isVisibleInFrustum(&_worldSpaceAABB)) - { + //TODO new-renderer: interface isVisibleInFrustum removal +// if(!camera->isVisibleInFrustum(&_worldSpaceAABB)) +// { this->resetNeedDraw(false); - }else - { +// }else + // { if(!_isTerminal){ _tl->cullByCamera(camera,worldTransform); _tr->cullByCamera(camera,worldTransform); _bl->cullByCamera(camera,worldTransform); _br->cullByCamera(camera,worldTransform); } - } +// } } void Terrain::QuadTree::preCalculateAABB(const Mat4 & worldTransform) @@ -1723,9 +1719,4 @@ bool Terrain::Triangle::getIntersectPoint(const Ray& ray, Vec3& intersectPoint) return true; } -bool Terrain::Triangle::getInsterctPoint(const Ray& ray, Vec3& intersectPoint) const -{ - return getIntersectPoint(ray, intersectPoint); -} - NS_CC_END diff --git a/cocos/3d/CCTerrain.h b/cocos/3d/CCTerrain.h index bfa7a4aca9e8..71901548e014 100644 --- a/cocos/3d/CCTerrain.h +++ b/cocos/3d/CCTerrain.h @@ -118,9 +118,6 @@ class CC_DLL Terrain : public Node Triangle(const Vec3& p1, const Vec3& p2, const Vec3& p3); bool getIntersectPoint(const Ray& ray, Vec3& intersectPoint) const; - /** @deprecated Use getIntersectPoint instead. */ - CC_DEPRECATED_ATTRIBUTE bool getInsterctPoint(const Ray& ray, Vec3& interScetPoint) const; - void transform(const Mat4& matrix); Vec3 _p1, _p2, _p3; }; @@ -239,9 +236,6 @@ class CC_DLL Terrain : public Node bool getIntersectPointWithRay(const Ray& ray, Vec3& intersectPoint); - /** @deprecated Use getIntersectPointWithRay instead. */ - CC_DEPRECATED_ATTRIBUTE bool getInsterctPointWithRay(const Ray& ray, Vec3& intersectPoint); - /**current LOD of the chunk*/ int _currentLod; diff --git a/cocos/3d/CMakeLists.txt b/cocos/3d/CMakeLists.txt index fadfdcccfdaf..92ddd5fb3760 100644 --- a/cocos/3d/CMakeLists.txt +++ b/cocos/3d/CMakeLists.txt @@ -1,8 +1,3 @@ - -if(WINDOWS AND BUILD_SHARED_LIBS) - add_definitions(-D_USE3DDLL) -endif() - set(COCOS_3D_HEADER 3d/CCBillBoard.h diff --git a/cocos/Android.mk b/cocos/Android.mk deleted file mode 100644 index d21c4e910d0a..000000000000 --- a/cocos/Android.mk +++ /dev/null @@ -1,340 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := cc_core - -LOCAL_MODULE_FILENAME := libcc_core - -LOCAL_ARM_MODE := arm - -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -MATHNEONFILE := math/MathUtil.cpp.neon -else -MATHNEONFILE := math/MathUtil.cpp -endif - -LOCAL_SRC_FILES := \ -cocos2d.cpp \ -2d/CCAction.cpp \ -2d/CCActionCamera.cpp \ -2d/CCActionCatmullRom.cpp \ -2d/CCActionEase.cpp \ -2d/CCActionGrid.cpp \ -2d/CCActionGrid3D.cpp \ -2d/CCActionInstant.cpp \ -2d/CCActionInterval.cpp \ -2d/CCActionManager.cpp \ -2d/CCActionPageTurn3D.cpp \ -2d/CCActionProgressTimer.cpp \ -2d/CCActionTiledGrid.cpp \ -2d/CCActionTween.cpp \ -2d/CCAnimation.cpp \ -2d/CCAnimationCache.cpp \ -2d/CCAtlasNode.cpp \ -2d/CCCamera.cpp \ -2d/CCCameraBackgroundBrush.cpp \ -2d/CCClippingNode.cpp \ -2d/CCClippingRectangleNode.cpp \ -2d/CCComponent.cpp \ -2d/CCComponentContainer.cpp \ -2d/CCDrawNode.cpp \ -2d/CCDrawingPrimitives.cpp \ -2d/CCFastTMXLayer.cpp \ -2d/CCFastTMXTiledMap.cpp \ -2d/CCFont.cpp \ -2d/CCFontAtlas.cpp \ -2d/CCFontAtlasCache.cpp \ -2d/CCFontCharMap.cpp \ -2d/CCFontFNT.cpp \ -2d/CCFontFreeType.cpp \ -2d/CCGLBufferedNode.cpp \ -2d/CCGrabber.cpp \ -2d/CCGrid.cpp \ -2d/CCLabel.cpp \ -2d/CCLabelAtlas.cpp \ -2d/CCLabelBMFont.cpp \ -2d/CCLabelTTF.cpp \ -2d/CCLabelTextFormatter.cpp \ -2d/CCLayer.cpp \ -2d/CCLight.cpp \ -2d/CCMenu.cpp \ -2d/CCMenuItem.cpp \ -2d/CCMotionStreak.cpp \ -2d/CCNode.cpp \ -2d/CCNodeGrid.cpp \ -2d/CCParallaxNode.cpp \ -2d/CCParticleBatchNode.cpp \ -2d/CCParticleExamples.cpp \ -2d/CCParticleSystem.cpp \ -2d/CCParticleSystemQuad.cpp \ -2d/CCProgressTimer.cpp \ -2d/CCProtectedNode.cpp \ -2d/CCRenderTexture.cpp \ -2d/CCScene.cpp \ -2d/CCSprite.cpp \ -2d/CCSpriteBatchNode.cpp \ -2d/CCSpriteFrame.cpp \ -2d/CCSpriteFrameCache.cpp \ -2d/CCTMXLayer.cpp \ -2d/CCTMXObjectGroup.cpp \ -2d/CCTMXTiledMap.cpp \ -2d/CCTMXXMLParser.cpp \ -2d/CCTextFieldTTF.cpp \ -2d/CCTileMapAtlas.cpp \ -2d/CCTransition.cpp \ -2d/CCTransitionPageTurn.cpp \ -2d/CCTransitionProgress.cpp \ -2d/CCTweenFunction.cpp \ -2d/CCAutoPolygon.cpp \ -3d/CCFrustum.cpp \ -3d/CCPlane.cpp \ -platform/CCFileUtils.cpp \ -platform/CCGLView.cpp \ -platform/CCImage.cpp \ -platform/CCSAXParser.cpp \ -platform/CCThread.cpp \ -$(MATHNEONFILE) \ -math/CCAffineTransform.cpp \ -math/CCGeometry.cpp \ -math/CCVertex.cpp \ -math/Mat4.cpp \ -math/Quaternion.cpp \ -math/TransformUtils.cpp \ -math/Vec2.cpp \ -math/Vec3.cpp \ -math/Vec4.cpp \ -base/CCNinePatchImageParser.cpp \ -base/CCStencilStateManager.cpp \ -base/CCAsyncTaskPool.cpp \ -base/CCAutoreleasePool.cpp \ -base/CCConfiguration.cpp \ -base/CCConsole.cpp \ -base/CCController-android.cpp \ -base/CCController.cpp \ -base/CCData.cpp \ -base/CCDataVisitor.cpp \ -base/CCDirector.cpp \ -base/CCEvent.cpp \ -base/CCEventAcceleration.cpp \ -base/CCEventController.cpp \ -base/CCEventCustom.cpp \ -base/CCEventDispatcher.cpp \ -base/CCEventFocus.cpp \ -base/CCEventKeyboard.cpp \ -base/CCEventListener.cpp \ -base/CCEventListenerAcceleration.cpp \ -base/CCEventListenerController.cpp \ -base/CCEventListenerCustom.cpp \ -base/CCEventListenerFocus.cpp \ -base/CCEventListenerKeyboard.cpp \ -base/CCEventListenerMouse.cpp \ -base/CCEventListenerTouch.cpp \ -base/CCEventMouse.cpp \ -base/CCEventTouch.cpp \ -base/CCIMEDispatcher.cpp \ -base/CCNS.cpp \ -base/CCProfiling.cpp \ -base/CCProperties.cpp \ -base/CCRef.cpp \ -base/CCScheduler.cpp \ -base/CCScriptSupport.cpp \ -base/CCTouch.cpp \ -base/CCUserDefault-android.cpp \ -base/CCUserDefault.cpp \ -base/CCValue.cpp \ -base/ObjectFactory.cpp \ -base/TGAlib.cpp \ -base/ZipUtils.cpp \ -base/allocator/CCAllocatorDiagnostics.cpp \ -base/allocator/CCAllocatorGlobal.cpp \ -base/allocator/CCAllocatorGlobalNewDelete.cpp \ -base/atitc.cpp \ -base/base64.cpp \ -base/ccCArray.cpp \ -base/ccFPSImages.c \ -base/ccRandom.cpp \ -base/ccTypes.cpp \ -base/ccUTF8.cpp \ -base/ccUtils.cpp \ -base/etc1.cpp \ -base/pvr.cpp \ -base/s3tc.cpp \ -renderer/CCBatchCommand.cpp \ -renderer/CCCustomCommand.cpp \ -renderer/CCGLProgram.cpp \ -renderer/CCGLProgramCache.cpp \ -renderer/CCGLProgramState.cpp \ -renderer/CCGLProgramStateCache.cpp \ -renderer/CCGroupCommand.cpp \ -renderer/CCMaterial.cpp \ -renderer/CCMeshCommand.cpp \ -renderer/CCPass.cpp \ -renderer/CCPrimitive.cpp \ -renderer/CCPrimitiveCommand.cpp \ -renderer/CCQuadCommand.cpp \ -renderer/CCRenderCommand.cpp \ -renderer/CCRenderState.cpp \ -renderer/CCRenderer.cpp \ -renderer/CCTechnique.cpp \ -renderer/CCTexture2D.cpp \ -renderer/CCTextureAtlas.cpp \ -renderer/CCTextureCache.cpp \ -renderer/CCTextureCube.cpp \ -renderer/CCTrianglesCommand.cpp \ -renderer/CCVertexAttribBinding.cpp \ -renderer/CCVertexIndexBuffer.cpp \ -renderer/CCVertexIndexData.cpp \ -renderer/CCFrameBuffer.cpp \ -renderer/ccShaders.cpp \ -vr/CCVRDistortion.cpp \ -vr/CCVRDistortionMesh.cpp \ -vr/CCVRGenericRenderer.cpp \ -vr/CCVRGenericHeadTracker.cpp \ -deprecated/CCArray.cpp \ -deprecated/CCDeprecated.cpp \ -deprecated/CCDictionary.cpp \ -deprecated/CCNotificationCenter.cpp \ -deprecated/CCSet.cpp \ -deprecated/CCString.cpp \ -physics/CCPhysicsBody.cpp \ -physics/CCPhysicsContact.cpp \ -physics/CCPhysicsJoint.cpp \ -physics/CCPhysicsShape.cpp \ -physics/CCPhysicsWorld.cpp \ -physics3d/CCPhysics3D.cpp \ -physics3d/CCPhysics3DWorld.cpp \ -physics3d/CCPhysics3DComponent.cpp \ -physics3d/CCPhysics3DDebugDrawer.cpp \ -physics3d/CCPhysics3DObject.cpp \ -physics3d/CCPhysics3DShape.cpp \ -physics3d/CCPhysicsSprite3D.cpp \ -physics3d/CCPhysics3DConstraint.cpp \ -navmesh/CCNavMesh.cpp \ -navmesh/CCNavMeshAgent.cpp \ -navmesh/CCNavMeshDebugDraw.cpp \ -navmesh/CCNavMeshObstacle.cpp \ -navmesh/CCNavMeshUtils.cpp \ -../external/ConvertUTF/ConvertUTFWrapper.cpp \ -../external/ConvertUTF/ConvertUTF.c \ -../external/md5/md5.c \ -../external/tinyxml2/tinyxml2.cpp \ -../external/unzip/ioapi_mem.cpp \ -../external/unzip/ioapi.cpp \ -../external/unzip/unzip.cpp \ -../external/edtaa3func/edtaa3func.cpp \ -../external/xxhash/xxhash.c \ -../external/poly2tri/common/shapes.cc \ -../external/poly2tri/sweep/advancing_front.cc \ -../external/poly2tri/sweep/cdt.cc \ -../external/poly2tri/sweep/sweep_context.cc \ -../external/poly2tri/sweep/sweep.cc \ -../external/clipper/clipper.cpp - - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/. \ - $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../external \ - $(LOCAL_PATH)/../external/tinyxml2 \ - $(LOCAL_PATH)/../external/unzip \ - $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ - $(LOCAL_PATH)/../external/bullet/include/bullet \ - $(LOCAL_PATH)/../external/xxhash \ - $(LOCAL_PATH)/../external/nslog \ - $(LOCAL_PATH)/../external/poly2tri \ - $(LOCAL_PATH)/../external/poly2tri/common \ - $(LOCAL_PATH)/../external/poly2tri/sweep \ - $(LOCAL_PATH)/../external/clipper \ - $(LOCAL_PATH)/../external/uv/include - -LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/../external \ - $(LOCAL_PATH)/../external/tinyxml2 \ - $(LOCAL_PATH)/../external/unzip \ - $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ - $(LOCAL_PATH)/../external/bullet/include/bullet \ - $(LOCAL_PATH)/../external/edtaa3func \ - $(LOCAL_PATH)/../external/xxhash \ - $(LOCAL_PATH)/../external/ConvertUTF \ - $(LOCAL_PATH)/../external/nslog \ - $(LOCAL_PATH)/../external/poly2tri \ - $(LOCAL_PATH)/../external/poly2tri/common \ - $(LOCAL_PATH)/../external/poly2tri/sweep \ - $(LOCAL_PATH)/../external/clipper \ - $(LOCAL_PATH)/../external/uv/include - -LOCAL_EXPORT_LDLIBS := -lGLESv2 \ - -llog \ - -landroid - -LOCAL_STATIC_LIBRARIES := ext_freetype2 -LOCAL_STATIC_LIBRARIES += ext_png -LOCAL_STATIC_LIBRARIES += ext_jpeg -LOCAL_STATIC_LIBRARIES += ext_tiff -LOCAL_STATIC_LIBRARIES += ext_webp -LOCAL_STATIC_LIBRARIES += ext_chipmunk -LOCAL_STATIC_LIBRARIES += ext_zlib -LOCAL_STATIC_LIBRARIES += ext_ssl -LOCAL_STATIC_LIBRARIES += ext_recast -LOCAL_STATIC_LIBRARIES += ext_bullet - -LOCAL_WHOLE_STATIC_LIBRARIES := ccandroid -LOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures - -# define the macro to compile through support/zip_support/ioapi.c -LOCAL_CFLAGS := -DUSE_FILE32API -LOCAL_CFLAGS += -fexceptions - -# Issues #9968 -#ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -# LOCAL_CFLAGS += -DHAVE_NEON=1 -#endif - -LOCAL_CPPFLAGS := -Wno-deprecated-declarations -LOCAL_EXPORT_CFLAGS := -DUSE_FILE32API -LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations - -include $(BUILD_STATIC_LIBRARY) - -#============================================================== - -include $(CLEAR_VARS) - -LOCAL_MODULE := cc_static -LOCAL_MODULE_FILENAME := libcc - -LOCAL_STATIC_LIBRARIES := ccs -LOCAL_STATIC_LIBRARIES += ccb -LOCAL_STATIC_LIBRARIES += cc3d -LOCAL_STATIC_LIBRARIES += ccnet -LOCAL_STATIC_LIBRARIES += audio -LOCAL_STATIC_LIBRARIES += spine - -include $(BUILD_STATIC_LIBRARY) -#============================================================== -$(call import-module,android/cpufeatures) -$(call import-module,freetype2/prebuilt/android) -$(call import-module,platform/android) -$(call import-module,png/prebuilt/android) -$(call import-module,zlib/prebuilt/android) -$(call import-module,jpeg/prebuilt/android) -$(call import-module,tiff/prebuilt/android) -$(call import-module,webp/prebuilt/android) -$(call import-module,chipmunk/prebuilt/android) -$(call import-module,3d) -$(call import-module,audio/android) -$(call import-module,editor-support/cocosbuilder) -$(call import-module,editor-support/cocostudio) -$(call import-module,editor-support/spine) -$(call import-module,network) -$(call import-module,ui) -$(call import-module,extensions) -$(call import-module,Box2D/prebuilt/android) -$(call import-module,bullet/prebuilt/android) -$(call import-module,recast) -# $(call import-module,curl/prebuilt/android) -$(call import-module,websockets/prebuilt/android) -$(call import-module,openssl/prebuilt/android) -$(call import-module,flatbuffers) -$(call import-module,uv/prebuilt/android) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 871e17d7585a..f2f6588858c8 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -34,30 +34,24 @@ set(COCOS2D_X_VERSION 3.18) set(COCOS_CORE_LIB cocos2d) -if(WINDOWS) - add_definitions(-DUNICODE -D_UNICODE) -endif() - include(2d/CMakeLists.txt) -include(3d/CMakeLists.txt) +#include(3d/CMakeLists.txt) include(platform/CMakeLists.txt) include(physics/CMakeLists.txt) -include(physics3d/CMakeLists.txt) +#include(physics3d/CMakeLists.txt) include(math/CMakeLists.txt) -include(navmesh/CMakeLists.txt) +#include(navmesh/CMakeLists.txt) include(renderer/CMakeLists.txt) -include(vr/CMakeLists.txt) include(base/CMakeLists.txt) -include(deprecated/CMakeLists.txt) include(ui/CMakeLists.txt) include(network/CMakeLists.txt) include(audio/CMakeLists.txt) 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} ${COCOS_CCB_HEADER}) -endif(BUILD_EDITOR_COCOSBUILDER) +# default value for cocos2dx extensions modules build +option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON) +option(BUILD_EDITOR_SPINE "Build editor support for spine" OFF) +option(BUILD_EXTENSIONS "Build extension library" ON) if(BUILD_EDITOR_COCOSTUDIO) include(editor-support/cocostudio/CMakeLists.txt) @@ -82,11 +76,9 @@ set(COCOS_HEADER cocos2d.h ${COCOS_MATH_HEADER} ${COCOS_NAVMESH_HEADER} ${COCOS_RENDERER_HEADER} - ${COCOS_VR_HEADER} ${COCOS_BASE_HEADER} ${COCOS_AUDIO_HEADER} ${COCOS_UI_HEADER} - ${COCOS_DEPRECATED_HEADER} ${COCOS_NETWORK_HEADER} ${COCOS_EDITOR_SUPPORT_HEADER} ${COCOS_EXTENSIONS_HEADER} @@ -102,11 +94,9 @@ set(COCOS_SRC cocos2d.cpp ${COCOS_MATH_SRC} ${COCOS_NAVMESH_SRC} ${COCOS_RENDERER_SRC} - ${COCOS_VR_SRC} ${COCOS_BASE_SRC} ${COCOS_AUDIO_SRC} ${COCOS_UI_SRC} - ${COCOS_DEPRECATED_SRC} ${COCOS_NETWORK_SRC} ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_EXTENSIONS_SRC} @@ -121,16 +111,20 @@ add_library(cocos2d ${COCOS_SRC}) add_subdirectory(${COCOS2DX_ROOT_PATH}/external ${ENGINE_BINARY_PATH}/external) target_link_libraries(cocos2d external) +# add base macro define and compile options +use_cocos2dx_compile_define(cocos2d) +use_cocos2dx_compile_options(cocos2d) + # use all platform related system libs -target_use_cocos2dx_depend(cocos2d) +use_cocos2dx_libs_depend(cocos2d) target_include_directories(cocos2d PUBLIC ${COCOS2DX_ROOT_PATH} PUBLIC ${COCOS2DX_ROOT_PATH}/cocos PUBLIC ${COCOS2DX_ROOT_PATH}/extensions PUBLIC ${COCOS2DX_ROOT_PATH}/cocos/platform + PUBLIC ${COCOS2DX_ROOT_PATH}/cocos/editor-support INTERFACE ${COCOS2DX_ROOT_PATH}/cocos/base - INTERFACE ${COCOS2DX_ROOT_PATH}/cocos/editor-support INTERFACE ${COCOS2DX_ROOT_PATH}/cocos/audio/include INTERFACE ${COCOS2DX_ROOT_PATH}/cocos/platform/${PLATFORM_FOLDER} ) @@ -155,3 +149,12 @@ endif() if(XCODE OR VS) cocos_mark_code_files("cocos2d") endif() + +if(WIN32) + # precompiled header. Compilation time speedup ~4x. + target_sources(cocos2d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp") + set_target_properties(cocos2d PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h") + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h") + # compile c as c++. needed for precompiled header + set_source_files_properties(${COCOS_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX) +endif() diff --git a/cocos/audio/AudioEngine.cpp b/cocos/audio/AudioEngine.cpp index f4f7d98767a0..4def036737f4 100644 --- a/cocos/audio/AudioEngine.cpp +++ b/cocos/audio/AudioEngine.cpp @@ -37,12 +37,8 @@ #include "audio/apple/AudioEngine-inl.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "audio/win32/AudioEngine-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "audio/winrt/AudioEngine-winrt.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "audio/linux/AudioEngine-linux.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#include "audio/tizen/AudioEngine-tizen.h" #endif #define TIME_DELAY_PRECISION 0.0001 diff --git a/cocos/audio/CMakeLists.txt b/cocos/audio/CMakeLists.txt index ae58b430cf6d..03285841149e 100644 --- a/cocos/audio/CMakeLists.txt +++ b/cocos/audio/CMakeLists.txt @@ -1,6 +1,7 @@ set(COCOS_AUDIO_SRC audio/AudioEngine.cpp + audio/SimpleAudioEngine.cpp ) if(WINDOWS) @@ -18,7 +19,6 @@ if(WINDOWS) ) set(COCOS_AUDIO_PLATFORM_SRC - audio/win32/SimpleAudioEngine.cpp audio/win32/MciPlayer.cpp audio/win32/MciPlayer.h audio/win32/AudioEngine-win32.cpp @@ -69,7 +69,6 @@ elseif(ANDROID) audio/android/AudioDecoderSLES.h audio/android/AudioDecoderMp3.h audio/android/PcmData.h - audio/android/jni/cddandroidAndroidJavaEngine.h audio/android/AudioMixerController.h audio/android/AudioResamplerCubic.h audio/android/AudioEngine-inl.h @@ -78,9 +77,7 @@ elseif(ANDROID) ) set(COCOS_AUDIO_PLATFORM_SRC - audio/android/cddSimpleAudioEngine.cpp audio/android/ccdandroidUtils.cpp - audio/android/jni/cddandroidAndroidJavaEngine.cpp audio/android/AudioEngine-inl.cpp audio/android/CCThreadPool.cpp audio/android/AssetFd.cpp @@ -115,7 +112,6 @@ elseif(LINUX) ) set(COCOS_AUDIO_PLATFORM_SRC - audio/linux/SimpleAudioEngine.cpp audio/linux/AudioEngine-linux.h audio/linux/AudioEngine-linux.cpp ) @@ -135,57 +131,6 @@ elseif(APPLE) audio/apple/AudioEngine-inl.mm audio/apple/AudioPlayer.mm ) - # split it in _C and non C - # because C files needs to be compiled with C compiler and not C++ - # compiler - if(MACOSX) - set(COCOS_AUDIO_PLATFORM_HEADER - ${COCOS_AUDIO_PLATFORM_HEADER} - audio/mac/CDConfig.h - audio/mac/SimpleAudioEngine_objc.h - audio/mac/CDOpenALSupport.h - audio/mac/CDXMacOSXSupport.h - audio/mac/CDAudioManager.h - audio/mac/CocosDenshion.h - ) - 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_PLATFORM_SRC - ${COCOS_AUDIO_PLATFORM_SRC_C} - ${COCOS_AUDIO_PLATFORM_SRC} - audio/mac/SimpleAudioEngine.mm - audio/mac/CDXMacOSXSupport.mm - ) - elseif(IOS) - set(COCOS_AUDIO_PLATFORM_HEADER - ${COCOS_AUDIO_PLATFORM_HEADER} - audio/ios/CDConfig.h - audio/ios/SimpleAudioEngine_objc.h - audio/ios/CDOpenALSupport.h - audio/ios/CDAudioManager.h - audio/ios/CocosDenshion.h - ) - set(COCOS_AUDIO_PLATFORM_SRC_C - audio/ios/CDAudioManager.m - audio/ios/CDOpenALSupport.m - audio/ios/CocosDenshion.m - audio/ios/SimpleAudioEngine_objc.m - ) - set(COCOS_AUDIO_PLATFORM_SRC - ${COCOS_AUDIO_PLATFORM_SRC_C} - ${COCOS_AUDIO_PLATFORM_SRC} - audio/ios/SimpleAudioEngine.mm - ) - endif() - - set_source_files_properties( - ${COCOS_AUDIO_PLATFORM_SRC_C} - PROPERTIES LANGUAGE C - ) endif() set(COCOS_AUDIO_HEADER diff --git a/cocos/audio/linux/SimpleAudioEngine.cpp b/cocos/audio/SimpleAudioEngine.cpp similarity index 78% rename from cocos/audio/linux/SimpleAudioEngine.cpp rename to cocos/audio/SimpleAudioEngine.cpp index acd9676b49a8..f5e48cb9ab7a 100644 --- a/cocos/audio/linux/SimpleAudioEngine.cpp +++ b/cocos/audio/SimpleAudioEngine.cpp @@ -21,7 +21,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include #include "audio/include/SimpleAudioEngine.h" @@ -31,37 +30,37 @@ using namespace CocosDenshion; using namespace cocos2d; using namespace cocos2d::experimental; -struct SimpleAudioEngineLinux { +struct SimpleAudioEngineDelegate { SimpleAudioEngine * engine = nullptr; int musicid; float effectsvolume; std::string musicpath; }; -SimpleAudioEngineLinux * g_SimpleAudioEngineLinux = nullptr; +SimpleAudioEngineDelegate * g_SimpleAudioEngine = nullptr; SimpleAudioEngine* SimpleAudioEngine::getInstance() { - if (!g_SimpleAudioEngineLinux) { - g_SimpleAudioEngineLinux = new SimpleAudioEngineLinux(); - g_SimpleAudioEngineLinux->engine = new SimpleAudioEngine(); + if (!g_SimpleAudioEngine) { + g_SimpleAudioEngine = new SimpleAudioEngineDelegate(); + g_SimpleAudioEngine->engine = new SimpleAudioEngine(); } - return g_SimpleAudioEngineLinux->engine; + return g_SimpleAudioEngine->engine; } void SimpleAudioEngine::end() { - if (g_SimpleAudioEngineLinux) { - delete g_SimpleAudioEngineLinux->engine; - delete g_SimpleAudioEngineLinux; + if (g_SimpleAudioEngine) { + delete g_SimpleAudioEngine->engine; + delete g_SimpleAudioEngine; } - g_SimpleAudioEngineLinux = nullptr; + g_SimpleAudioEngine = nullptr; } SimpleAudioEngine::SimpleAudioEngine() { - g_SimpleAudioEngineLinux->musicid = -1; - g_SimpleAudioEngineLinux->effectsvolume = 1.0f; + g_SimpleAudioEngine->musicid = -1; + g_SimpleAudioEngine->effectsvolume = 1.0f; } SimpleAudioEngine::~SimpleAudioEngine() @@ -70,47 +69,47 @@ SimpleAudioEngine::~SimpleAudioEngine() void SimpleAudioEngine::preloadBackgroundMusic(const char* filePath) { - g_SimpleAudioEngineLinux->musicpath = filePath; + g_SimpleAudioEngine->musicpath = filePath; AudioEngine::preload(filePath); } void SimpleAudioEngine::playBackgroundMusic(const char* filePath, bool loop) { - g_SimpleAudioEngineLinux->musicpath = filePath; - g_SimpleAudioEngineLinux->musicid = AudioEngine::play2d(filePath, loop); + g_SimpleAudioEngine->musicpath = filePath; + g_SimpleAudioEngine->musicid = AudioEngine::play2d(filePath, loop); } void SimpleAudioEngine::stopBackgroundMusic(bool releaseData) { - AudioEngine::stop(g_SimpleAudioEngineLinux->musicid); + AudioEngine::stop(g_SimpleAudioEngine->musicid); if (releaseData) { - AudioEngine::uncache(g_SimpleAudioEngineLinux->musicpath.c_str()); + AudioEngine::uncache(g_SimpleAudioEngine->musicpath.c_str()); } } void SimpleAudioEngine::pauseBackgroundMusic() { - AudioEngine::pause(g_SimpleAudioEngineLinux->musicid); + AudioEngine::pause(g_SimpleAudioEngine->musicid); } void SimpleAudioEngine::resumeBackgroundMusic() { - AudioEngine::resume(g_SimpleAudioEngineLinux->musicid); + AudioEngine::resume(g_SimpleAudioEngine->musicid); } void SimpleAudioEngine::rewindBackgroundMusic() { - AudioEngine::setCurrentTime(g_SimpleAudioEngineLinux->musicid, 0); + AudioEngine::setCurrentTime(g_SimpleAudioEngine->musicid, 0); } bool SimpleAudioEngine::willPlayBackgroundMusic() { - return g_SimpleAudioEngineLinux->musicid != -1; + return g_SimpleAudioEngine->musicid != -1; } bool SimpleAudioEngine::isBackgroundMusicPlaying() { - return AudioEngine::getState(g_SimpleAudioEngineLinux->musicid) == AudioEngine::AudioState::PLAYING; + return AudioEngine::getState(g_SimpleAudioEngine->musicid) == AudioEngine::AudioState::PLAYING; } // @@ -124,7 +123,7 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying() */ float SimpleAudioEngine::getBackgroundMusicVolume() { - return AudioEngine::getVolume(g_SimpleAudioEngineLinux->musicid); + return AudioEngine::getVolume(g_SimpleAudioEngine->musicid); } /** @@ -136,7 +135,7 @@ float SimpleAudioEngine::getBackgroundMusicVolume() */ void SimpleAudioEngine::setBackgroundMusicVolume(float volume) { - AudioEngine::setVolume(g_SimpleAudioEngineLinux->musicid, volume); + AudioEngine::setVolume(g_SimpleAudioEngine->musicid, volume); } /** @@ -144,7 +143,7 @@ void SimpleAudioEngine::setBackgroundMusicVolume(float volume) */ float SimpleAudioEngine::getEffectsVolume() { - return g_SimpleAudioEngineLinux->effectsvolume; + return g_SimpleAudioEngine->effectsvolume; } /** @@ -154,7 +153,7 @@ float SimpleAudioEngine::getEffectsVolume() */ void SimpleAudioEngine::setEffectsVolume(float volume) { - g_SimpleAudioEngineLinux->effectsvolume = volume; + g_SimpleAudioEngine->effectsvolume = volume; } /** diff --git a/cocos/audio/android/Android.mk b/cocos/audio/android/Android.mk deleted file mode 100644 index b30e062ae3d9..000000000000 --- a/cocos/audio/android/Android.mk +++ /dev/null @@ -1,73 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -#New AudioEngine -include $(CLEAR_VARS) - -LOCAL_MODULE := audio - -LOCAL_MODULE_FILENAME := libaudio - -LOCAL_SRC_FILES := AudioEngine-inl.cpp \ - ../AudioEngine.cpp \ - CCThreadPool.cpp \ - AssetFd.cpp \ - AudioDecoder.cpp \ - AudioDecoderProvider.cpp \ - AudioDecoderSLES.cpp \ - AudioDecoderOgg.cpp \ - AudioDecoderMp3.cpp \ - AudioDecoderWav.cpp \ - AudioPlayerProvider.cpp \ - AudioResampler.cpp \ - AudioResamplerCubic.cpp \ - PcmBufferProvider.cpp \ - PcmAudioPlayer.cpp \ - UrlAudioPlayer.cpp \ - PcmData.cpp \ - AudioMixerController.cpp \ - AudioMixer.cpp \ - PcmAudioService.cpp \ - Track.cpp \ - audio_utils/format.c \ - audio_utils/minifloat.cpp \ - audio_utils/primitives.c \ - utils/Utils.cpp \ - mp3reader.cpp \ - tinysndfile.cpp - - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include - -LOCAL_EXPORT_LDLIBS := -lOpenSLES - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../platform/android \ - $(LOCAL_PATH)/../../../external/android-specific \ - $(LOCAL_PATH)/../../../external/android-specific/tremolo - -LOCAL_STATIC_LIBRARIES += ext_vorbisidec ext_pvmp3dec -include $(BUILD_STATIC_LIBRARY) - -#SimpleAudioEngine -include $(CLEAR_VARS) - -LOCAL_MODULE := ccds - -LOCAL_MODULE_FILENAME := libccds - -LOCAL_SRC_FILES := cddSimpleAudioEngine.cpp \ - ccdandroidUtils.cpp \ - jni/cddandroidAndroidJavaEngine.cpp - -LOCAL_STATIC_LIBRARIES := audio -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../platform/android - -include $(BUILD_STATIC_LIBRARY) - -$(call import-module,android-specific/tremolo) -$(call import-module,android-specific/pvmp3dec) diff --git a/cocos/audio/android/cddSimpleAudioEngine.cpp b/cocos/audio/android/cddSimpleAudioEngine.cpp deleted file mode 100644 index c7c6b626ca3c..000000000000 --- a/cocos/audio/android/cddSimpleAudioEngine.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "audio/include/SimpleAudioEngine.h" -#include "audio/android/jni/cddandroidAndroidJavaEngine.h" -#include "audio/android/ccdandroidUtils.h" - -namespace CocosDenshion { - - static SimpleAudioEngine *s_pEngine = nullptr; - - SimpleAudioEngine* SimpleAudioEngine::getInstance() { - if (! s_pEngine) { - s_pEngine = new CocosDenshion::android::AndroidJavaEngine(); - } - - return s_pEngine; - } - - void SimpleAudioEngine::end() { - if (s_pEngine) { - delete s_pEngine; - s_pEngine = nullptr; - } - } - - SimpleAudioEngine::SimpleAudioEngine() { - } - - SimpleAudioEngine::~SimpleAudioEngine() { - } - - // Empty implementations. On Android, only subclasses are meant to be used - void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) { } - void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) { } - void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) { } - void SimpleAudioEngine::pauseBackgroundMusic() { } - void SimpleAudioEngine::resumeBackgroundMusic() { } - void SimpleAudioEngine::rewindBackgroundMusic() { } - bool SimpleAudioEngine::willPlayBackgroundMusic() { return false; } - bool SimpleAudioEngine::isBackgroundMusicPlaying() { return false; } - float SimpleAudioEngine::getBackgroundMusicVolume() { return 0.0f; } - void SimpleAudioEngine::setBackgroundMusicVolume(float volume) { } - float SimpleAudioEngine::getEffectsVolume() { return 0.0f; } - void SimpleAudioEngine::setEffectsVolume(float volume) { } - unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, - bool bLoop, - float pitch, - float pan, - float gain) { - return 0; } - void SimpleAudioEngine::pauseEffect(unsigned int nSoundId) { } - void SimpleAudioEngine::pauseAllEffects() { } - void SimpleAudioEngine::resumeEffect(unsigned int nSoundId) { } - void SimpleAudioEngine::resumeAllEffects() { } - void SimpleAudioEngine::stopEffect(unsigned int nSoundId) { } - void SimpleAudioEngine::stopAllEffects() { } - void SimpleAudioEngine::preloadEffect(const char* pszFilePath) { } - void SimpleAudioEngine::unloadEffect(const char* pszFilePath) { } -} diff --git a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp deleted file mode 100644 index 32055925110b..000000000000 --- a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#define LOG_TAG "cocosdenshion::android::AndroidJavaEngine" - -#include "audio/android/jni/cddandroidAndroidJavaEngine.h" -#include - -#include -#include "audio/android/ccdandroidUtils.h" -#include "audio/android/utils/Utils.h" -#include "audio/include/AudioEngine.h" -#include "platform/android/jni/JniHelper.h" - -// logging -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) - -// Java class -static const std::string helperClassName = "org.cocos2dx.lib.Cocos2dxHelper"; - -using namespace cocos2d; -using namespace cocos2d::experimental; -using namespace CocosDenshion::android; - -AndroidJavaEngine::AndroidJavaEngine() - : _implementBaseOnAudioEngine(false) - , _effectVolume(1.f) -{ - int sdkVer = getSDKVersion(); - if (sdkVer > 0) - { - __android_log_print(ANDROID_LOG_DEBUG, "cocos2d", "android SDK version:%d", sdkVer); - if (sdkVer == 21) - { - _implementBaseOnAudioEngine = true; - } - } - else - { - __android_log_print(ANDROID_LOG_DEBUG, "cocos2d", "%s", "Fail to get android SDK version."); - } -} - -AndroidJavaEngine::~AndroidJavaEngine() -{ - if (_implementBaseOnAudioEngine) - { - stopAllEffects(); - } - - JniHelper::callStaticVoidMethod(helperClassName, "end"); -} - -void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); - JniHelper::callStaticVoidMethod(helperClassName, "preloadBackgroundMusic", fullPath); -} - -void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); - JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", fullPath, loop); -} - -void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) { - JniHelper::callStaticVoidMethod(helperClassName, "stopBackgroundMusic"); -} - -void AndroidJavaEngine::pauseBackgroundMusic() { - JniHelper::callStaticVoidMethod(helperClassName, "pauseBackgroundMusic"); - -} - -void AndroidJavaEngine::resumeBackgroundMusic() { - JniHelper::callStaticVoidMethod(helperClassName, "resumeBackgroundMusic"); -} - -void AndroidJavaEngine::rewindBackgroundMusic() { - JniHelper::callStaticVoidMethod(helperClassName, "rewindBackgroundMusic"); -} - -bool AndroidJavaEngine::willPlayBackgroundMusic() { - return JniHelper::callStaticBooleanMethod(helperClassName, "willPlayBackgroundMusic"); -} - -bool AndroidJavaEngine::isBackgroundMusicPlaying() { - return JniHelper::callStaticBooleanMethod(helperClassName, "isBackgroundMusicPlaying"); -} - -float AndroidJavaEngine::getBackgroundMusicVolume() { - return JniHelper::callStaticFloatMethod(helperClassName, "getBackgroundMusicVolume"); -} - -void AndroidJavaEngine::setBackgroundMusicVolume(float volume) { - JniHelper::callStaticVoidMethod(helperClassName, "setBackgroundMusicVolume", volume); -} - -float AndroidJavaEngine::getEffectsVolume() -{ - if (_implementBaseOnAudioEngine) - { - return _effectVolume; - } - else - { - return JniHelper::callStaticFloatMethod(helperClassName, "getEffectsVolume"); - } -} - -void AndroidJavaEngine::setEffectsVolume(float volume) -{ - if (_implementBaseOnAudioEngine) - { - if (volume > 1.f) - { - volume = 1.f; - } - else if (volume < 0.f) - { - volume = 0.f; - } - - if (_effectVolume != volume) - { - _effectVolume = volume; - for (auto it : _soundIDs) - { - AudioEngine::setVolume(it, volume); - } - } - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "setEffectsVolume", volume); - } -} - -unsigned int AndroidJavaEngine::playEffect(const char* filePath, bool loop, - float pitch, float pan, float gain) -{ - if (_implementBaseOnAudioEngine) - { - auto soundID = AudioEngine::play2d(filePath, loop, _effectVolume); - if (soundID != AudioEngine::INVALID_AUDIO_ID) - { - _soundIDs.push_back(soundID); - - AudioEngine::setFinishCallback(soundID, [this](int id, const std::string& filePath){ - _soundIDs.remove(id); - }); - } - - return soundID; - } - else - { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); - int ret = JniHelper::callStaticIntMethod(helperClassName, "playEffect", fullPath, loop, pitch, pan, gain); - return (unsigned int)ret; - } -} - -void AndroidJavaEngine::pauseEffect(unsigned int soundID) -{ - if (_implementBaseOnAudioEngine) - { - AudioEngine::pause(soundID); - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "pauseEffect", (int)soundID); - } -} - -void AndroidJavaEngine::resumeEffect(unsigned int soundID) -{ - if (_implementBaseOnAudioEngine) - { - AudioEngine::resume(soundID); - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "resumeEffect", (int)soundID); - } -} - -void AndroidJavaEngine::stopEffect(unsigned int soundID) -{ - if (_implementBaseOnAudioEngine) - { - AudioEngine::stop(soundID); - _soundIDs.remove(soundID); - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "stopEffect", (int)soundID); - } -} - -void AndroidJavaEngine::pauseAllEffects() -{ - if (_implementBaseOnAudioEngine) - { - for (auto it : _soundIDs) - { - AudioEngine::pause(it); - } - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "pauseAllEffects"); - } -} - -void AndroidJavaEngine::resumeAllEffects() -{ - if (_implementBaseOnAudioEngine) - { - for (auto it : _soundIDs) - { - AudioEngine::resume(it); - } - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "resumeAllEffects"); - } -} - -void AndroidJavaEngine::stopAllEffects() -{ - if (_implementBaseOnAudioEngine) - { - for (auto it : _soundIDs) - { - AudioEngine::stop(it); - } - _soundIDs.clear(); - } - else - { - JniHelper::callStaticVoidMethod(helperClassName, "stopAllEffects"); - } -} - -void AndroidJavaEngine::preloadEffect(const char* filePath) -{ - if (!_implementBaseOnAudioEngine) - { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); - JniHelper::callStaticVoidMethod(helperClassName, "preloadEffect", fullPath); - } - else - { - AudioEngine::preload(filePath); - } -} - -void AndroidJavaEngine::unloadEffect(const char* filePath) -{ - if (!_implementBaseOnAudioEngine) - { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); - JniHelper::callStaticVoidMethod(helperClassName, "unloadEffect", fullPath); - } - else - { - AudioEngine::uncache(filePath); - } -} diff --git a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h deleted file mode 100644 index 120ba2c378e0..000000000000 --- a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CDDANDROIDANDROIDJAVAENGINE_H__ -#define __CDDANDROIDANDROIDJAVAENGINE_H__ - -#include "audio/include/SimpleAudioEngine.h" -#include "platform/android/jni/JniHelper.h" -#include - -namespace CocosDenshion { - namespace android { - class AndroidJavaEngine : public SimpleAudioEngine { - public: - AndroidJavaEngine(); - ~AndroidJavaEngine(); - - /* - * @brief Preload background music. - * @param filePath The path of the background music file. - */ - virtual void preloadBackgroundMusic(const char* filePath); - - /* - * @brief Play background music. - * @param filePath The path of the background music file,or the FileName of T_SoundResInfo. - * @param loop Whether the background music loop or not. - */ - virtual void playBackgroundMusic(const char* filePath, bool loop); - - /* - * @brief Stop playing background music. - * @param releaseData If release the background music data or not.As default value is false. - */ - virtual void stopBackgroundMusic(bool releaseData); - - /* - * @brief Pause playing background music. - */ - virtual void pauseBackgroundMusic(); - - /* - * @brief Resume playing background music. - */ - virtual void resumeBackgroundMusic(); - - /* - * @brief Rewind playing background music - */ - virtual void rewindBackgroundMusic(); - - /* - * @brief Indicates whether any background music can be played or not. - * @return true if background music can be played; otherwise false. - */ - virtual bool willPlayBackgroundMusic(); - - /* - * @brief Indicates whether the background music is playing. - * @return true if the background music is playing; otherwise false. - */ - virtual bool isBackgroundMusicPlaying(); - - /* - * @brief Get the volume of the background music. - * @return the range of 0.0 as the minimum and 1.0 as the maximum. - */ - virtual float getBackgroundMusicVolume(); - - /* - * @brief Set the volume of the background music. - * @param volume must be range of 0.0 as the minimum and 1.0 as the maximum. - */ - virtual void setBackgroundMusicVolume(float volume); - - /* - * @brief Get the volume of the effects. - * @return the range of 0.0 as the minimum and 1.0 as the maximum. - */ - virtual float getEffectsVolume(); - - /* - * @brief Set the volume of sound effects. - * @param volume must be range of 0.0 as the minimum and 1.0 as the maximum. - */ - virtual void setEffectsVolume(float volume); - - /* - * @brief Play sound effect with a file path, pitch, pan, and gain. - * @param filePath The path of the effect file. - * @param loop Determines whether to loop the effect playing or not. The default value is false. - * @param pitch Fequency, normal value is 1.0. will also change effect play time. - * @param pan Stereo effect, in the range of [-1..1] where -1 enables only left channel. - * @param gain Volume, in the range of [0..1]. The normal value is 1. - * @return The sound id. - */ - virtual unsigned int playEffect(const char* filePath, bool loop = false, - float pitch = 1.0f, float pan = 0.0f, float gain = 1.0f); - - /* - * @brief Pause playing sound effect. - * @param soundId The return value of function playEffect. - */ - virtual void pauseEffect(unsigned int soundId); - - /* - * @brief Pause all playing sound effect. - */ - virtual void pauseAllEffects(); - - /* - * @brief Resume playing sound effect. - * @param soundId The return value of function playEffect. - */ - virtual void resumeEffect(unsigned int soundId); - - /* - * @brief Resume all playing sound effects. - */ - virtual void resumeAllEffects(); - - /* - * @brief Stop playing sound effect. - * @param soundId The return value of function playEffect. - */ - virtual void stopEffect(unsigned int soundId); - - /* - * @brief Stop all playing sound effects. - */ - virtual void stopAllEffects(); - - /* - * @brief Preload a compressed audio file. - * @param filePath The path of the effect file. - */ - virtual void preloadEffect(const char* filePath); - - /* - * @brief Unload the preloaded effect from internal buffer. - * @param filePath The path of the effect file. - */ - virtual void unloadEffect(const char* filePath); - - private : - bool _implementBaseOnAudioEngine; - float _effectVolume; - std::list _soundIDs; - }; - } -} - -#endif //__CDDANDROIDANDROIDJAVAENGINE_H__ diff --git a/cocos/audio/apple/AudioCache.mm b/cocos/audio/apple/AudioCache.mm index 67df4a2481e9..901c9a1b0f0d 100644 --- a/cocos/audio/apple/AudioCache.mm +++ b/cocos/audio/apple/AudioCache.mm @@ -51,22 +51,6 @@ of this software and associated documentation files (the "Software"), to deal #define INVALID_AL_BUFFER_ID 0xFFFFFFFF #define PCMDATA_CACHEMAXSIZE 1048576 -typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -static ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq) -{ - static alBufferDataStaticProcPtr proc = nullptr; - - if (proc == nullptr) { - proc = (alBufferDataStaticProcPtr) alcGetProcAddress(nullptr, (const ALCchar*) "alBufferDataStatic"); - } - - if (proc){ - proc(bid, format, data, size, freq); - } - - return; -} - @interface NSTimerWrapper : NSObject { std::function _timeoutCallback; @@ -104,11 +88,6 @@ -(void) dealloc @end -static void setTimeout(double seconds, const std::function& cb) -{ - [[[NSTimerWrapper alloc] initWithTimeInterval:seconds callback:cb] autorelease]; -} - using namespace cocos2d; using namespace cocos2d::experimental; @@ -150,35 +129,19 @@ static void setTimeout(double seconds, const std::function& cb) } //wait for the 'readDataTask' task to exit _readDataTaskMutex.lock(); - _readDataTaskMutex.unlock(); - if (_pcmData) + if (_state == State::READY) { - if (_state == State::READY) - { - if (_alBufferId != INVALID_AL_BUFFER_ID && alIsBuffer(_alBufferId)) - { - ALOGV("~AudioCache(id=%u), delete buffer: %u", _id, _alBufferId); - alDeleteBuffers(1, &_alBufferId); - _alBufferId = INVALID_AL_BUFFER_ID; - } - } - else + if (_alBufferId != INVALID_AL_BUFFER_ID && alIsBuffer(_alBufferId)) { - ALOGW("AudioCache (%p), id=%u, buffer isn't ready, state=%d", this, _id, _state); + ALOGV("~AudioCache(id=%u), delete buffer: %u", _id, _alBufferId); + alDeleteBuffers(1, &_alBufferId); + _alBufferId = INVALID_AL_BUFFER_ID; } - - // fixed #17494: CrashIfClientProvidedBogusAudioBufferList - // We're using 'alBufferDataStaticProc' for speeding up - // the performance of playing audio without preload, but we need to manage the memory by ourself carefully. - // It's probably that '_pcmData' is freed before OpenAL finishes the audio render task, - // then 'CrashIfClientProvidedBogusAudioBufferList' may be triggered. - // 'cpp-tests/NewAudioEngineTest/AudioSwitchStateTest' can reproduce this issue without the following fix. - // The workaround is delaying 200ms to free pcm data. - char* data = _pcmData; - setTimeout(0.2, [data](){ - free(data); - }); + } + else + { + ALOGW("AudioCache (%p), id=%u, buffer isn't ready, state=%d", this, _id, _state); } if (_queBufferFrames > 0) @@ -189,6 +152,7 @@ static void setTimeout(double seconds, const std::function& cb) } } ALOGVV("~AudioCache() %p, id=%u, end", this, _id); + _readDataTaskMutex.unlock(); } void AudioCache::readDataTask(unsigned int selfId) @@ -261,24 +225,16 @@ static void setTimeout(double seconds, const std::function& cb) _pcmData = (char*)malloc(dataSize); memset(_pcmData, 0x00, dataSize); + ALOGV(" id=%u _pcmData alloc: %p", selfId, _pcmData); if (adjustFrames > 0) { memcpy(_pcmData + (dataSize - adjustFrameBuf.size()), adjustFrameBuf.data(), adjustFrameBuf.size()); } - alGenBuffers(1, &_alBufferId); - auto alError = alGetError(); - if (alError != AL_NO_ERROR) { - ALOGE("%s: attaching audio to buffer fail: %x", __PRETTY_FUNCTION__, alError); - break; - } - if (*_isDestroyed) break; - alBufferDataStaticProc(_alBufferId, _format, _pcmData, (ALsizei)dataSize, (ALsizei)sampleRate); - framesRead = decoder.readFixedFrames(std::min(framesToReadOnce, remainingFrames), _pcmData + _framesRead * bytesPerFrame); _framesRead += framesRead; remainingFrames -= framesRead; @@ -286,10 +242,6 @@ static void setTimeout(double seconds, const std::function& cb) if (*_isDestroyed) break; - _state = State::READY; - - invokingPlayCallbacks(); - uint32_t frames = 0; while (!*_isDestroyed && _framesRead < originalTotalFrames) { @@ -309,9 +261,22 @@ static void setTimeout(double seconds, const std::function& cb) { memset(_pcmData + _framesRead * bytesPerFrame, 0x00, (totalFrames - _framesRead) * bytesPerFrame); } - ALOGV("pcm buffer was loaded successfully, total frames: %u, total read frames: %u, adjust frames: %u, remainingFrames: %u", totalFrames, _framesRead, adjustFrames, remainingFrames); + ALOGV("pcm buffer was loaded successfully, total frames: %u, total read frames: %u, adjust frames: %u, remainingFrames: %u", totalFrames, _framesRead, adjustFrames, remainingFrames); _framesRead += adjustFrames; + + alGenBuffers(1, &_alBufferId); + auto alError = alGetError(); + if (alError != AL_NO_ERROR) { + ALOGE("%s: attaching audio to buffer fail: %x", __PRETTY_FUNCTION__, alError); + break; + } + ALOGV(" id=%u generated alGenBuffers: %u for _pcmData: %p", selfId, _alBufferId, _pcmData); + ALOGV(" id=%u _pcmData alBufferData: %p", selfId, _pcmData); + alBufferData(_alBufferId, _format, _pcmData, (ALsizei)dataSize, (ALsizei)sampleRate); + _state = State::READY; + invokingPlayCallbacks(); + } else { @@ -333,6 +298,10 @@ static void setTimeout(double seconds, const std::function& cb) } while (false); + if (_pcmData != nullptr){ + CC_SAFE_FREE(_pcmData); + } + decoder.close(); //FIXME: Why to invoke play callback first? Should it be after 'load' callback? @@ -345,7 +314,7 @@ static void setTimeout(double seconds, const std::function& cb) _state = State::FAILED; if (_alBufferId != INVALID_AL_BUFFER_ID && alIsBuffer(_alBufferId)) { - ALOGV("readDataTask failed, delete buffer: %u", _alBufferId); + ALOGV(" id=%u readDataTask failed, delete buffer: %u", selfId, _alBufferId); alDeleteBuffers(1, &_alBufferId); _alBufferId = INVALID_AL_BUFFER_ID; } diff --git a/cocos/audio/include/AudioEngine.h b/cocos/audio/include/AudioEngine.h index 81bd3668a897..090183a257e3 100644 --- a/cocos/audio/include/AudioEngine.h +++ b/cocos/audio/include/AudioEngine.h @@ -22,18 +22,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #pragma once -#include "platform/CCPlatformConfig.h" -#include "platform/CCPlatformMacros.h" -#include "audio/include/Export.h" - #include #include #include #include +#include "platform/CCPlatformConfig.h" +#include "platform/CCPlatformMacros.h" +#include "audio/include/Export.h" + #ifdef ERROR #undef ERROR #endif // ERROR diff --git a/cocos/audio/include/SimpleAudioEngine.h b/cocos/audio/include/SimpleAudioEngine.h index 7f7e7a37506e..09ed251d3b40 100644 --- a/cocos/audio/include/SimpleAudioEngine.h +++ b/cocos/audio/include/SimpleAudioEngine.h @@ -63,13 +63,6 @@ class EXPORT_DLL SimpleAudioEngine */ static SimpleAudioEngine* getInstance(); - /** - * @deprecated Use `getInstance` instead. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static SimpleAudioEngine* sharedEngine() { return SimpleAudioEngine::getInstance(); } - /** * Release the shared Engine object. * diff --git a/cocos/audio/ios/CDAudioManager.h b/cocos/audio/ios/CDAudioManager.h deleted file mode 100644 index 110f799cc5b8..000000000000 --- a/cocos/audio/ios/CDAudioManager.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/ios/CocosDenshion.h" -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000 - #import -#else - #import "audio/mac/CDXMacOSXSupport.h" -#endif - -/** Different modes of the engine */ -typedef enum { - kAMM_FxOnly, //!Other apps will be able to play audio - kAMM_FxPlusMusic, //!Only this app will play audio - kAMM_FxPlusMusicIfNoOtherAudio, //!If another app is playing audio at start up then allow it to continue and don't play music - kAMM_MediaPlayback, //!This app takes over audio e.g music player app - kAMM_PlayAndRecord //!App takes over audio and has input and output -} tAudioManagerMode; - -/** Possible states of the engine */ -typedef enum { - kAMStateUninitialised, //!Audio manager has not been initialised - do not use - kAMStateInitialising, //!Audio manager is in the process of initialising - do not use - kAMStateInitialised //!Audio manager is initialised - safe to use -} tAudioManagerState; - -typedef enum { - kAMRBDoNothing, //Audio manager will not do anything on resign or becoming active - kAMRBStopPlay, //Background music is stopped on resign and resumed on become active - kAMRBStop //Background music is stopped on resign but not resumed - maybe because you want to do this from within your game -} tAudioManagerResignBehavior; - -/** Notifications */ -extern NSString * const kCDN_AudioManagerInitialised; - -@interface CDAsynchInitialiser : NSOperation {} -@end - -/** CDAudioManager supports two long audio source channels called left and right*/ -typedef enum { - kASC_Left = 0, - kASC_Right = 1 -} tAudioSourceChannel; - -typedef enum { - kLAS_Init, - kLAS_Loaded, - kLAS_Playing, - kLAS_Paused, - kLAS_Stopped, -} tLongAudioSourceState; - -@class CDLongAudioSource; -@protocol CDLongAudioSourceDelegate -@optional -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource; -/** The file used to load the audio source has changed */ -- (void) cdAudioSourceFileDidChange:(CDLongAudioSource *) audioSource; -@end - -/** - CDLongAudioSource represents an audio source that has a long duration which makes - it costly to load into memory for playback as an effect using CDSoundEngine. Examples - include background music and narration tracks. The audio file may or may not be compressed. - Bear in mind that current iDevices can only use hardware to decode a single compressed - audio file at a time and playing multiple compressed files will result in a performance drop - as software decompression will take place. - @since v0.99 - */ -@interface CDLongAudioSource : NSObject { - AVAudioPlayer *audioSourcePlayer; - NSString *audioSourceFilePath; - NSInteger numberOfLoops; - float volume; - id delegate; - BOOL mute; - BOOL enabled_; - BOOL backgroundMusic; - // whether background music is paused - BOOL paused; - BOOL stopped; -@public - BOOL systemPaused;//Used for auto resign handling - NSTimeInterval systemPauseLocation;//Used for auto resign handling -@protected - tLongAudioSourceState state; -} -@property (readonly) AVAudioPlayer *audioSourcePlayer; -@property (readonly) NSString *audioSourceFilePath; -@property (readwrite, nonatomic) NSInteger numberOfLoops; -@property (readwrite, nonatomic) float volume; -@property (assign) id delegate; -/* This long audio source functions as background music */ -@property (readwrite, nonatomic) BOOL backgroundMusic; -@property (readonly) BOOL paused; - -/** Loads the file into the audio source */ --(void) load:(NSString*) filePath; -/** Plays the audio source */ --(void) play; -/** Stops playing the audio source */ --(void) stop; -/** Pauses the audio source */ --(void) pause; -/** Rewinds the audio source */ --(void) rewind; -/** Resumes playing the audio source if it was paused */ --(void) resume; -/** Returns whether or not the audio source is playing */ --(BOOL) isPlaying; - -@end - -/** - CDAudioManager manages audio requirements for a game. It provides access to a CDSoundEngine object - for playing sound effects. It provides access to two CDLongAudioSource object (left and right channel) - for playing long duration audio such as background music and narration tracks. Additionally it manages - the audio session to take care of things like audio session interruption and interacting with the audio - of other apps that are running on the device. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface CDAudioManager : NSObject { - CDSoundEngine *soundEngine; - CDLongAudioSource *backgroundMusic; - NSMutableArray *audioSourceChannels; - NSString* _audioSessionCategory; - BOOL _audioWasPlayingAtStartup; - tAudioManagerMode _mode; - SEL backgroundMusicCompletionSelector; - id backgroundMusicCompletionListener; - BOOL willPlayBackgroundMusic; - BOOL _mute; - BOOL _resigned; - BOOL _interrupted; - BOOL _audioSessionActive; - BOOL enabled_; - - //For handling resign/become active - BOOL _isObservingAppEvents; - tAudioManagerResignBehavior _resignBehavior; -} - -@property (readonly) CDSoundEngine *soundEngine; -@property (readonly) CDLongAudioSource *backgroundMusic; -@property (readonly) BOOL willPlayBackgroundMusic; - -/** Returns the shared singleton */ -+ (CDAudioManager *) sharedManager; -+ (tAudioManagerState) sharedManagerState; -/** Configures the shared singleton with a mode*/ -+ (void) configure: (tAudioManagerMode) mode; -/** Initializes the engine asynchronously with a mode */ -+ (void) initAsynchronously: (tAudioManagerMode) mode; -/** Initializes the engine synchronously with a mode, channel definition and a total number of channels */ -- (id) init: (tAudioManagerMode) mode; --(void) audioSessionInterrupted; --(void) audioSessionResumed; --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle; -/** Returns true is audio is muted at a hardware level e.g user has ringer switch set to off */ --(BOOL) isDeviceMuted; -/** Returns true if another app is playing audio such as the iPod music player */ --(BOOL) isOtherAudioPlaying; -/** Sets the way the audio manager interacts with the operating system such as whether it shares output with other apps or obeys the mute switch */ --(void) setMode:(tAudioManagerMode) mode; -/** Shuts down the shared audio manager instance so that it can be reinitialised */ -+(void) end; - -/** Call if you want to use built in resign behavior but need to do some additional audio processing on resign active. */ -- (void) applicationWillResignActive; -/** Call if you want to use built in resign behavior but need to do some additional audio processing on become active. */ -- (void) applicationDidBecomeActive; - -//New AVAudioPlayer API -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel; -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel; - -//Legacy AVAudioPlayer API -/** Plays music in background. The music can be looped or not - It is recommended to use .aac files as background music since they are decoded by the device (hardware). - */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** Preloads a background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; -/** Stops playing the background music */ --(void) stopBackgroundMusic; -/** Pauses the background music */ --(void) pauseBackgroundMusic; -/** Rewinds the background music */ --(void) rewindBackgroundMusic; -/** Resumes playing the background music */ --(void) resumeBackgroundMusic; -/** Returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector; - -@end - -/** Fader for long audio source objects */ -@interface CDLongAudioSourceFader : CDPropertyModifier{} -@end - -static const int kCDNoBuffer = -1; - -/** Allows buffers to be associated with file names */ -@interface CDBufferManager:NSObject{ - NSMutableDictionary* loadedBuffers; - NSMutableArray *freedBuffers; - CDSoundEngine *soundEngine; - int nextBufferId; -} - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine; --(int) bufferForFile:(NSString*) filePath create:(BOOL) create; --(void) releaseBufferForFile:(NSString *) filePath; - -@end - diff --git a/cocos/audio/ios/CDAudioManager.m b/cocos/audio/ios/CDAudioManager.m deleted file mode 100644 index b0d4ceec30aa..000000000000 --- a/cocos/audio/ios/CDAudioManager.m +++ /dev/null @@ -1,918 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - -#import "audio/ios/CDAudioManager.h" - -NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; - -//NSOperation object used to asynchronously initialise -@implementation CDAsynchInitialiser - --(void) main { - [super main]; - [CDAudioManager sharedManager]; -} - -@end - -@implementation CDLongAudioSource - -@synthesize audioSourcePlayer, audioSourceFilePath, delegate, backgroundMusic, paused; - --(id) init { - if ((self = [super init])) { - state = kLAS_Init; - volume = 1.0f; - mute = NO; - enabled_ = YES; - paused = NO; - stopped = NO; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDLongAudioSource - deallocating %@", self); - [audioSourcePlayer release]; - [audioSourceFilePath release]; - [super dealloc]; -} - --(void) load:(NSString*) filePath { - //We have already loaded a file previously, check if we are being asked to load the same file - if (state == kLAS_Init || ![filePath isEqualToString:audioSourceFilePath]) { - CDLOGINFO(@"Denshion::CDLongAudioSource - Loading new audio source %@",filePath); - //New file - if (state != kLAS_Init) { - [audioSourceFilePath release];//Release old file path - [audioSourcePlayer release];//Release old AVAudioPlayer, they can't be reused - } - audioSourceFilePath = [filePath copy]; - NSError *error = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:audioSourceFilePath]; - audioSourcePlayer = [(AVAudioPlayer*)[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:&error]; - if (error == nil) { - [audioSourcePlayer prepareToPlay]; - audioSourcePlayer.delegate = self; - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceFileDidChange:)]) { - //Tell our delegate the file has changed - [delegate cdAudioSourceFileDidChange:self]; - } - } else { - CDLOG(@"Denshion::CDLongAudioSource - Error initialising audio player: %@",error); - } - } else { - //Same file - just return it to a consistent state - [self pause]; - [self rewind]; - } - audioSourcePlayer.volume = volume; - audioSourcePlayer.numberOfLoops = numberOfLoops; - state = kLAS_Loaded; -} - --(void) play { - if (enabled_) { - systemPaused = NO; - paused = NO; - stopped = NO; - [audioSourcePlayer play]; - } else { - CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); - } -} - --(void) stop { - paused = NO; - stopped = YES; - [audioSourcePlayer stop]; -} - --(void) pause { - paused = YES; - [audioSourcePlayer pause]; -} - --(void) rewind { - paused = NO; - [audioSourcePlayer setCurrentTime:0]; - [audioSourcePlayer play]; - stopped = NO; -} - --(void) resume { - if (!stopped) { - paused = NO; - [audioSourcePlayer play]; - } -} - --(BOOL) isPlaying { - if (state != kLAS_Init) { - return [audioSourcePlayer isPlaying]; - } else { - return NO; - } -} - --(void) setVolume:(float) newVolume -{ - volume = newVolume; - if (state != kLAS_Init && !mute) { - audioSourcePlayer.volume = newVolume; - } -} - --(float) volume -{ - return volume; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute != muteValue) { - if (mute) { - //Turn sound back on - audioSourcePlayer.volume = volume; - } else { - audioSourcePlayer.volume = 0.0f; - } - mute = muteValue; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue != enabled_) { - enabled_ = enabledValue; - if (!enabled_) { - //"Stop" the sounds - [self pause]; - [self rewind]; - } - } -} - --(NSInteger) numberOfLoops { - return numberOfLoops; -} - --(void) setNumberOfLoops:(NSInteger) loopCount -{ - audioSourcePlayer.numberOfLoops = loopCount; - numberOfLoops = loopCount; -} - -- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player finished"); -#if TARGET_IPHONE_SIMULATOR - CDLOGINFO(@"Denshion::CDLongAudioSource - workaround for OpenAL clobbered audio issue"); - //This is a workaround for an issue in all simulators (tested to 3.1.2). Problem is - //that OpenAL audio playback is clobbered when an AVAudioPlayer stops. Workaround - //is to keep the player playing on an endless loop with 0 volume and then when - //it is played again reset the volume and set loop count appropriately. - //NB: this workaround is not foolproof but it is good enough for most situations. - player.numberOfLoops = -1; - player.volume = 0; - [player play]; -#endif - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceDidFinishPlaying:)]) { - [delegate cdAudioSourceDidFinishPlaying:self]; - } -} - --(void)audioPlayerBeginInterruption:(AVAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player interrupted"); -} - --(void)audioPlayerEndInterruption:(AVAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player resumed"); - if (self.backgroundMusic) { - //Check if background music can play as rules may have changed during - //the interruption. This is to address a specific issue in 4.x when - //fast task switching - if([CDAudioManager sharedManager].willPlayBackgroundMusic) { - [player play]; - } - } else { - [player play]; - } -} - -@end - - -@interface CDAudioManager (PrivateMethods) --(BOOL) audioSessionSetActive:(BOOL) active; --(BOOL) audioSessionSetCategory:(NSString*) category; --(void) badAlContextHandler; -@end - - -@implementation CDAudioManager -#define BACKGROUND_MUSIC_CHANNEL kASC_Left - -@synthesize soundEngine, willPlayBackgroundMusic; -static CDAudioManager *sharedManager; -static tAudioManagerState _sharedManagerState = kAMStateUninitialised; -static tAudioManagerMode configuredMode; -static BOOL configured = FALSE; - --(BOOL) audioSessionSetActive:(BOOL) active { - NSError *activationError = nil; - if ([[AVAudioSession sharedInstance] setActive:active error:&activationError]) { - _audioSessionActive = active; - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set active %i succeeded", active); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set active %i failed with error %@", active, activationError); - return NO; - } -} - --(BOOL) audioSessionSetCategory:(NSString*) category { - NSError *categoryError = nil; - if ([[AVAudioSession sharedInstance] setCategory:category error:&categoryError]) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set category %@ succeeded", category); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set category %@ failed with error %@", category, categoryError); - return NO; - } -} - -// Init -+ (CDAudioManager *) sharedManager -{ - @synchronized(self) { - if (!sharedManager) { - if (!configured) { - //Set defaults here - configuredMode = kAMM_FxPlusMusicIfNoOtherAudio; - } - sharedManager = [[CDAudioManager alloc] init:configuredMode]; - _sharedManagerState = kAMStateInitialised;//This is only really relevant when using asynchronous initialisation - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AudioManagerInitialised object:nil]; - } - } - return sharedManager; -} - -+ (tAudioManagerState) sharedManagerState { - return _sharedManagerState; -} - -/** - * Call this to set up audio manager asynchronously. Initialisation is finished when sharedManagerState == kAMStateInitialised - */ -+ (void) initAsynchronously: (tAudioManagerMode) mode { - @synchronized(self) { - if (_sharedManagerState == kAMStateUninitialised) { - _sharedManagerState = kAMStateInitialising; - [CDAudioManager configure:mode]; - CDAsynchInitialiser *initOp = [[[CDAsynchInitialiser alloc] init] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:initOp]; - } - } -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedManager == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - -/* - * Call this method before accessing the shared manager in order to configure the shared audio manager - */ -+ (void) configure: (tAudioManagerMode) mode { - configuredMode = mode; - configured = TRUE; -} - --(BOOL) isOtherAudioPlaying -{ - // AudioSessionGetProperty removed from tvOS 9.1 -#if defined(CC_TARGET_OS_TVOS) - return false; -#else - UInt32 isPlaying = 0; - UInt32 varSize = sizeof(isPlaying); - AudioSessionGetProperty (kAudioSessionProperty_OtherAudioIsPlaying, &varSize, &isPlaying); - return (isPlaying != 0); -#endif -} - --(void) setMode:(tAudioManagerMode) mode { - - _mode = mode; - switch (_mode) { - - case kAMM_FxOnly: - //Share audio with other app - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - break; - - case kAMM_FxPlusMusic: - //Use audio exclusively - if other audio is playing it will be stopped - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - break; - - case kAMM_MediaPlayback: - //Use audio exclusively, ignore mute switch and sleep - CDLOGINFO(@"Denshion::CDAudioManager - Media playback mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_MediaPlayback; - _audioSessionCategory = AVAudioSessionCategoryPlayback; - willPlayBackgroundMusic = YES; - break; - - case kAMM_PlayAndRecord: - //Use audio exclusively, ignore mute switch and sleep, has inputs and outputs - CDLOGINFO(@"Denshion::CDAudioManager - Play and record mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_PlayAndRecord; - _audioSessionCategory = AVAudioSessionCategoryPlayAndRecord; - willPlayBackgroundMusic = YES; - break; - - default: - //kAudioManagerFxPlusMusicIfNoOtherAudio - if ([self isOtherAudioPlaying]) { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is playing audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - } else { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is not playing audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - } - - break; - } - - [self audioSessionSetCategory:_audioSessionCategory]; - -} - -/** - * This method is used to work around various bugs introduced in 4.x OS versions. In some circumstances the - * audio session is interrupted but never resumed, this results in the loss of OpenAL audio when following - * standard practices. If we detect this situation then we will attempt to resume the audio session ourselves. - * Known triggers: lock the device then unlock it (iOS 4.2 gm), playback a song using MPMediaPlayer (iOS 4.0) - */ -- (void) badAlContextHandler { - if (_interrupted && alcGetCurrentContext() == NULL) { - CDLOG(@"Denshion::CDAudioManager - bad OpenAL context detected, attempting to resume audio session"); - [self audioSessionResumed]; - } -} - -- (id) init: (tAudioManagerMode) mode { - if ((self = [super init])) { - - [[NSNotificationCenter defaultCenter] addObserver: self - selector: NSSelectorFromString(@"handleInterruption:") - name: AVAudioSessionInterruptionNotification - object: [AVAudioSession sharedInstance]]; - - _mode = mode; - backgroundMusicCompletionSelector = nil; - _isObservingAppEvents = FALSE; - _mute = NO; - _resigned = NO; - _interrupted = NO; - enabled_ = YES; - _audioSessionActive = NO; - [self setMode:mode]; - soundEngine = [[CDSoundEngine alloc] init]; - - //Set up audioSource channels - audioSourceChannels = [[NSMutableArray alloc] init]; - CDLongAudioSource *leftChannel = [[CDLongAudioSource alloc] init]; - leftChannel.backgroundMusic = YES; - CDLongAudioSource *rightChannel = [[CDLongAudioSource alloc] init]; - rightChannel.backgroundMusic = NO; - [audioSourceChannels insertObject:leftChannel atIndex:kASC_Left]; - [audioSourceChannels insertObject:rightChannel atIndex:kASC_Right]; - [leftChannel release]; - [rightChannel release]; - //Used to support legacy APIs - backgroundMusic = [self audioSourceForChannel:BACKGROUND_MUSIC_CHANNEL]; - backgroundMusic.delegate = self; - - //Add handler for bad al context messages, these are posted by the sound engine. - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(badAlContextHandler) name:kCDN_BadAlContext object:nil]; - - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDAudioManager - deallocating"); - [self stopBackgroundMusic]; - [soundEngine release]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [self audioSessionSetActive:NO]; - [audioSourceChannels release]; - [super dealloc]; -} - -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel -{ - return (CDLongAudioSource*)[audioSourceChannels objectAtIndex:channel]; -} - -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel -{ - CDLongAudioSource *audioSource = [self audioSourceForChannel:channel]; - if (audioSource) { - [audioSource load:filePath]; - } - return audioSource; -} - --(BOOL) isBackgroundMusicPlaying { - return [self.backgroundMusic isPlaying]; -} - -//NB: originally I tried using a route change listener and intended to store the current route, -//however, on a 3gs running 3.1.2 no route change is generated when the user switches the -//ringer mute switch to off (i.e. enables sound) therefore polling is the only reliable way to -//determine ringer switch state --(BOOL) isDeviceMuted { - -#if TARGET_IPHONE_SIMULATOR || defined(CC_TARGET_OS_TVOS) - //Calling audio route stuff on the simulator causes problems - return NO; -#else - CFStringRef newAudioRoute; - UInt32 propertySize = sizeof (CFStringRef); - - AudioSessionGetProperty ( - kAudioSessionProperty_AudioRoute, - &propertySize, - &newAudioRoute - ); - - if (newAudioRoute == NULL) { - //Don't expect this to happen but playing safe otherwise a null in the CFStringCompare will cause a crash - return YES; - } else { - CFComparisonResult newDeviceIsMuted = CFStringCompare ( - newAudioRoute, - (CFStringRef) @"", - 0 - ); - - return (newDeviceIsMuted == kCFCompareEqualTo); - } -#endif -} - -#pragma mark Audio Interrupt Protocol - --(BOOL) mute { - return _mute; -} - --(void) setMute:(BOOL) muteValue { - if (muteValue != _mute) { - _mute = muteValue; - [soundEngine setMute:muteValue]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.mute = muteValue; - } - } -} - --(BOOL) enabled { - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue { - if (enabledValue != enabled_) { - enabled_ = enabledValue; - [soundEngine setEnabled:enabled_]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.enabled = enabled_; - } - } -} - --(CDLongAudioSource*) backgroundMusic -{ - return backgroundMusic; -} - -//Load background music ready for playing --(void) preloadBackgroundMusic:(NSString*) filePath -{ - [self.backgroundMusic load:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [self.backgroundMusic load:filePath]; - - if (loop) { - [self.backgroundMusic setNumberOfLoops:-1]; - } else { - [self.backgroundMusic setNumberOfLoops:0]; - } - - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - play bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - [self.backgroundMusic play]; -} - --(void) stopBackgroundMusic -{ - [self.backgroundMusic stop]; -} - --(void) pauseBackgroundMusic -{ - [self.backgroundMusic pause]; -} - --(void) resumeBackgroundMusic -{ - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - resume bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - if (![self.backgroundMusic paused]) { - return; - } - - [self.backgroundMusic resume]; -} - --(void) rewindBackgroundMusic -{ - [self.backgroundMusic rewind]; -} - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector { - backgroundMusicCompletionListener = listener; - backgroundMusicCompletionSelector = selector; -} - -/* - * Call this method to have the audio manager automatically handle application resign and - * become active. Pass a tAudioManagerResignBehavior to indicate the desired behavior - * for resigning and becoming active again. - * - * If autohandle is YES then the applicationWillResignActive and applicationDidBecomActive - * methods are automatically called, otherwise you must call them yourself at the appropriate time. - * - * Based on idea of Dominique Bongard - */ --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle { - - if (!_isObservingAppEvents && autoHandle) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) name:@"UIApplicationWillResignActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:@"UIApplicationDidBecomeActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:@"UIApplicationWillTerminateNotification" object:nil]; - _isObservingAppEvents = TRUE; - } - _resignBehavior = resignBehavior; -} - -- (void) applicationWillResignActive { - _resigned = YES; - - //Set the audio session to one that allows sharing so that other audio won't be clobbered on resume - [self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; - - switch (_resignBehavior) { - - case kAMRBStopPlay: - - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (!audioSource->systemPaused) { - if (audioSource.isPlaying) { - audioSource->systemPaused = YES; - audioSource->systemPauseLocation = audioSource.audioSourcePlayer.currentTime; - [audioSource pause]; - } else { - //Music is either paused or stopped, if it is paused it will be restarted - //by OS so we will stop it. - audioSource->systemPaused = NO; - [audioSource stop]; - } - } - } - break; - - case kAMRBStop: - //Stop music regardless of whether it is playing or not because if it was paused - //then the OS would resume it - for( CDLongAudioSource *audioSource in audioSourceChannels) { - [audioSource stop]; - } - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - handled resign active"); -} - -//Called when application resigns active only if setResignBehavior has been called -- (void) applicationWillResignActive:(NSNotification *) notification -{ - [self applicationWillResignActive]; -} - -- (void) applicationDidBecomeActive { - - if (_resigned) { - _resigned = NO; - //Reset the mode incase something changed with audio while we were inactive - [self setMode:_mode]; - switch (_resignBehavior) { - - case kAMRBStopPlay: - - //Music had been stopped but stop maintains current time - //so playing again will continue from where music was before resign active. - //We check if music can be played because while we were inactive the user might have - //done something that should force music to not play such as starting a track in the iPod - if (self.willPlayBackgroundMusic) { - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (audioSource->systemPaused) { - [audioSource resume]; - audioSource->systemPaused = NO; - } - } - } - break; - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handled become active"); - } -} - -//Called when application becomes active only if setResignBehavior has been called -- (void) applicationDidBecomeActive:(NSNotification *) notification -{ - [self applicationDidBecomeActive]; -} - -//Called when application terminates only if setResignBehavior has been called -- (void) applicationWillTerminate:(NSNotification *) notification -{ - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handling terminate"); - [self stopBackgroundMusic]; -} - -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource { - CDLOGINFO(@"Denshion::CDAudioManager - audio manager got told background music finished"); - if (backgroundMusicCompletionSelector != nil) { - [backgroundMusicCompletionListener performSelector:backgroundMusicCompletionSelector]; - } -} - -- (void) handleInterruption:(NSNotification*) notification { - if (notification.name != AVAudioSessionInterruptionNotification || - notification.userInfo == nil) - return; - - NSDictionary *interuptionDict = notification.userInfo; - NSInteger interuptionType = [[interuptionDict valueForKey:AVAudioSessionInterruptionTypeKey] integerValue]; - // decide what to do based on interruption type here... - switch (interuptionType) { - case AVAudioSessionInterruptionTypeBegan: - [self audioSessionInterrupted]; - break; - - case AVAudioSessionInterruptionTypeEnded: - [self audioSessionResumed]; - break; - - default: - NSLog(@"Audio Session Interruption Notification case default."); - break; - } -} - --(void)audioSessionInterrupted -{ - if (!_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session interrupted"); - _interrupted = YES; - - // Deactivate the current audio session - [self audioSessionSetActive:NO]; - - if (alcGetCurrentContext() != NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Setting OpenAL context to NULL"); - - ALenum error = AL_NO_ERROR; - - // set the current context to NULL will 'shutdown' openAL - alcMakeContextCurrent(NULL); - - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current %x\n", error); - } - #pragma unused(error) - } - } -} - --(void)audioSessionResumed -{ - if (_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session resumed"); - _interrupted = NO; - - BOOL activationResult = NO; - // Reactivate the current audio session - activationResult = [self audioSessionSetActive:YES]; - - //This code is to handle a problem with iOS 4.0 and 4.01 where reactivating the session can fail if - //task switching is performed too rapidly. A test case that reliably reproduces the issue is to call the - //iPhone and then hang up after two rings (timing may vary ;)) - //Basically we keep waiting and trying to let the OS catch up with itself but the number of tries is - //limited. - if (!activationResult) { - CDLOG(@"Denshion::CDAudioManager - Failure reactivating audio session, will try wait-try cycle"); - int activateCount = 0; - while (!activationResult && activateCount < 10) { - [NSThread sleepForTimeInterval:0.5]; - activationResult = [self audioSessionSetActive:YES]; - activateCount++; - CDLOGINFO(@"Denshion::CDAudioManager - Reactivation attempt %i status = %i",activateCount,activationResult); - } - } - - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Restoring OpenAL context"); - ALenum error = AL_NO_ERROR; - // Restore open al context - alcMakeContextCurrent([soundEngine openALContext]); - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current%x\n", error); - } - #pragma unused(error) - } - } -} - -+(void) end { - [sharedManager release]; - sharedManager = nil; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDLongAudioSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDLongAudioSource*)target).volume = newVal; -} - --(float) _getTargetProperty { - return ((CDLongAudioSource*)target).volume; -} - --(void) _stopTarget { - //Pause instead of stop as stop releases resources and causes problems in the simulator - [((CDLongAudioSource*)target) pause]; -} - --(Class) _allowableType { - return [CDLongAudioSource class]; -} - -@end -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDBufferManager - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - soundEngine = theSoundEngine; - loadedBuffers = [[NSMutableDictionary alloc] initWithCapacity:CD_BUFFERS_START]; - freedBuffers = [[NSMutableArray alloc] init]; - nextBufferId = 0; - } - return self; -} - --(void) dealloc { - [loadedBuffers release]; - [freedBuffers release]; - [super dealloc]; -} - --(int) bufferForFile:(NSString*) filePath create:(BOOL) create { - - NSNumber* soundId = (NSNumber*)[loadedBuffers objectForKey:filePath]; - if(soundId == nil) - { - if (create) { - NSNumber* bufferId = nil; - //First try to get a buffer from the free buffers - if ([freedBuffers count] > 0) { - bufferId = [[[freedBuffers lastObject] retain] autorelease]; - [freedBuffers removeLastObject]; - CDLOGINFO(@"Denshion::CDBufferManager reusing buffer id %i",[bufferId intValue]); - } else { - bufferId = [[NSNumber alloc] initWithInt:nextBufferId]; - [bufferId autorelease]; - CDLOGINFO(@"Denshion::CDBufferManager generating new buffer id %i",[bufferId intValue]); - nextBufferId++; - } - - if ([soundEngine loadBuffer:[bufferId intValue] filePath:filePath]) { - //File successfully loaded - CDLOGINFO(@"Denshion::CDBufferManager buffer loaded %@ %@",bufferId,filePath); - [loadedBuffers setObject:bufferId forKey:filePath]; - return [bufferId intValue]; - } else { - //File didn't load, put buffer id on free list - [freedBuffers addObject:bufferId]; - return kCDNoBuffer; - } - } else { - //No matching buffer was found - return kCDNoBuffer; - } - } else { - return [soundId intValue]; - } -} - --(void) releaseBufferForFile:(NSString *) filePath { - int bufferId = [self bufferForFile:filePath create:NO]; - if (bufferId != kCDNoBuffer) { - [soundEngine unloadBuffer:bufferId]; - [loadedBuffers removeObjectForKey:filePath]; - NSNumber *freedBufferId = [[NSNumber alloc] initWithInt:bufferId]; - [freedBufferId autorelease]; - [freedBuffers addObject:freedBufferId]; - } -} -@end - - - diff --git a/cocos/audio/ios/CDConfig.h b/cocos/audio/ios/CDConfig.h deleted file mode 100644 index 2bd8f760c19d..000000000000 --- a/cocos/audio/ios/CDConfig.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ -#define COCOSDENSHION_VERSION "Aphex.rc" - - -/** - If enabled code useful for debugging such as parameter check assertions will be performed. - If you experience any problems you should enable this and test your code with a debug build. - */ -//#define CD_DEBUG 1 - -/** - The total number of sounds/buffers that can be loaded assuming memory is sufficient - */ -//Number of buffers slots that will be initially created -#define CD_BUFFERS_START 64 -//Number of buffers that will be added -#define CD_BUFFERS_INCREMENT 16 - -/** - If enabled, OpenAL code will use static buffers. When static buffers are used the audio - data is managed outside of OpenAL, this eliminates a memcpy operation which leads to - higher performance when loading sounds. - - However, the downside is that when the audio data is freed you must - be certain that it is no longer being accessed otherwise your app will crash. Testing on OS 2.2.1 - and 3.1.2 has shown that this may occur if a buffer is being used by a source with state = AL_PLAYING - when the buffer is deleted. If the data is freed too quickly after the source is stopped then - a crash will occur. The implemented workaround is that when static buffers are used the unloadBuffer code will wait for - any playing sources to finish playing before the associated buffer and data are deleted, however, this delay may negate any - performance gains that are achieved during loading. - - Performance tests on a 1st gen iPod running OS 2.2.1 loading the CocosDenshionDemo sounds were ~0.14 seconds without - static buffers and ~0.12 seconds when using static buffers. - - */ -//#define CD_USE_STATIC_BUFFERS 1 - - diff --git a/cocos/audio/ios/CDOpenALSupport.h b/cocos/audio/ios/CDOpenALSupport.h deleted file mode 100644 index aeac861c96c1..000000000000 --- a/cocos/audio/ios/CDOpenALSupport.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id$ - */ - -/* - This file contains code from version 1.1 and 1.4 of MyOpenALSupport.h taken from Apple's oalTouch version. - The 1.4 version code is used for loading IMA4 files, however, this code causes very noticeable clicking - when used to load wave files that are looped so the 1.1 version code is used specifically for loading - wav files. - */ - -#ifndef __CD_OPENAL_H -#define __CD_OPENAL_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#import -#import -#import - - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/cocos/audio/ios/CDOpenALSupport.m b/cocos/audio/ios/CDOpenALSupport.m deleted file mode 100644 index 16ae51571a61..000000000000 --- a/cocos/audio/ios/CDOpenALSupport.m +++ /dev/null @@ -1,248 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id: CDOpenALSupport.h 16 2010-03-11 06:22:10Z steveoldmeadow $ - */ - -#import "audio/ios/CDOpenALSupport.h" -#import "audio/ios/CocosDenshion.h" -#import -#import - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus err = noErr; - UInt64 fileDataSize = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - AudioFileID afid = 0; - void* theData = NULL; - - // Open a file with ExtAudioFileOpen() - err = AudioFileOpenURL(inFileURL, kAudioFileReadPermission, 0, &afid); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileOpenURL FAILED, Error = %ld\n", err); goto Exit; } - - // Get the audio data format - err = AudioFileGetProperty(afid, kAudioFilePropertyDataFormat, &thePropertySize, &theFileFormat); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFileProperty_DataFormat) FAILED, Error = %ld\n", err); goto Exit; } - - if (theFileFormat.mChannelsPerFrame > 2) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); goto Exit; - } - - if ((theFileFormat.mFormatID != kAudioFormatLinearPCM) || (!TestAudioFormatNativeEndian(theFileFormat))) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be little-endian PCM\n"); goto Exit; - } - - if ((theFileFormat.mBitsPerChannel != 8) && (theFileFormat.mBitsPerChannel != 16)) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be 8 or 16 bit PCM\n"); goto Exit; - } - - - thePropertySize = sizeof(fileDataSize); - err = AudioFileGetProperty(afid, kAudioFilePropertyAudioDataByteCount, &thePropertySize, &fileDataSize); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFilePropertyAudioDataByteCount) FAILED, Error = %ld\n", err); goto Exit; } - - // Read all the data into memory - UInt32 dataSize = (UInt32)fileDataSize; - theData = malloc(dataSize); - if (theData) - { - memset(theData, 0, dataSize); - AudioFileReadBytes(afid, false, 0, &dataSize, theData); - if(err == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - //This fix was added by me, however, 8 bit sounds have a clipping sound at the end so aren't really usable (SO) - if (theFileFormat.mBitsPerChannel == 16) { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - } else { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO8 : AL_FORMAT_MONO8; - } - *outSampleRate = (ALsizei)theFileFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", err); goto Exit; - } - } - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (afid) AudioFileClose(afid); - return theData; -} - -//Taken from oalTouch MyOpenALSupport 1.4 -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus status = noErr; - BOOL abort = NO; - SInt64 theFileLengthInFrames = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - ExtAudioFileRef extRef = NULL; - void* theData = NULL; - AudioStreamBasicDescription theOutputFormat; - UInt32 dataSize = 0; - - // Open a file with ExtAudioFileOpen() - status = ExtAudioFileOpenURL(inFileURL, &extRef); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileOpenURL FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the audio data format - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - if (theFileFormat.mChannelsPerFrame > 2) - { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); - abort = YES; - } - if (abort) - goto Exit; - - // Set the client format to 16 bit signed integer (native-endian) data - // Maintain the channel count and sample rate of the original source format - theOutputFormat.mSampleRate = theFileFormat.mSampleRate; - theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame; - - theOutputFormat.mFormatID = kAudioFormatLinearPCM; - theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mFramesPerPacket = 1; - theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mBitsPerChannel = 16; - theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; - - // Set the desired client (output) data format - status = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &theOutputFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the total frame count - thePropertySize = sizeof(theFileLengthInFrames); - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Read all the data into memory - dataSize = (UInt32) theFileLengthInFrames * theOutputFormat.mBytesPerFrame; - theData = malloc(dataSize); - if (theData) - { - memset(theData, 0, dataSize); - AudioBufferList theDataBuffer; - theDataBuffer.mNumberBuffers = 1; - theDataBuffer.mBuffers[0].mDataByteSize = dataSize; - theDataBuffer.mBuffers[0].mNumberChannels = theOutputFormat.mChannelsPerFrame; - theDataBuffer.mBuffers[0].mData = theData; - - // Read the data into an AudioBufferList - status = ExtAudioFileRead(extRef, (UInt32*)&theFileLengthInFrames, &theDataBuffer); - if(status == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - *outDataFormat = (theOutputFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - *outSampleRate = (ALsizei)theOutputFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", status); - abort = YES; - } - } - if (abort) - goto Exit; - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (extRef) ExtAudioFileDispose(extRef); - return theData; -} - -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) { - - CFStringRef extension = CFURLCopyPathExtension(inFileURL); - CFComparisonResult isWavFile = 0; - if (extension != NULL) { - isWavFile = CFStringCompare (extension,(CFStringRef)@"wav", kCFCompareCaseInsensitive); - CFRelease(extension); - } - - if (isWavFile == kCFCompareEqualTo) { - return CDloadWaveAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } else { - return CDloadCafAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } -} - diff --git a/cocos/audio/ios/CocosDenshion.h b/cocos/audio/ios/CocosDenshion.h deleted file mode 100644 index 60232b4ab73b..000000000000 --- a/cocos/audio/ios/CocosDenshion.h +++ /dev/null @@ -1,448 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - - -/** -@file -@b IMPORTANT -There are 3 different ways of using CocosDenshion. Depending on which you choose you -will need to include different files and frameworks. - -@par SimpleAudioEngine -This is recommended for basic audio requirements. If you just want to play some sound fx -and some background music and have no interest in learning the lower level workings then -this is the interface to use. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDAudioManager -CDAudioManager is basically a thin wrapper around an AVAudioPlayer object used for playing -background music and a CDSoundEngine object used for playing sound effects. It manages the -audio session for you deals with audio session interruption. It is fairly low level and it -is expected you have some understanding of the underlying technologies. For example, for -many use cases regarding background music it is expected you will work directly with the -backgroundMusic AVAudioPlayer which is exposed as a property. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDSoundEngine -CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch -example. It can playback up to 32 sounds simultaneously with control over pitch, pan -and gain. It can be set up to handle audio session interruption automatically. You -may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine -because you require OS 2.0 compatibility. - -Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - -*/ - -#import -#import -#import -#import -#import "audio/ios/CDConfig.h" - - -#if !defined(CD_DEBUG) || CD_DEBUG == 0 -#define CDLOG(...) do {} while (0) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG == 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG > 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) NSLog(__VA_ARGS__) -#endif // CD_DEBUG - - -#import "audio/ios/CDOpenALSupport.h" - -//Tested source limit on 2.2.1 and 3.1.2 with up to 128 sources and appears to work. Older OS versions e.g 2.2 may support only 32 -#define CD_SOURCE_LIMIT 32 //Total number of sources we will ever want, may actually get less -#define CD_NO_SOURCE 0xFEEDFAC //Return value indicating playback failed i.e. no source -#define CD_IGNORE_AUDIO_SESSION 0xBEEFBEE //Used internally to indicate audio session will not be handled -#define CD_MUTE 0xFEEDBAB //Return value indicating sound engine is muted or non functioning -#define CD_NO_SOUND = -1; - -#define CD_SAMPLE_RATE_HIGH 44100 -#define CD_SAMPLE_RATE_MID 22050 -#define CD_SAMPLE_RATE_LOW 16000 -#define CD_SAMPLE_RATE_BASIC 8000 -#define CD_SAMPLE_RATE_DEFAULT 44100 - -extern NSString * const kCDN_BadAlContext; -extern NSString * const kCDN_AsynchLoadComplete; - -extern float const kCD_PitchDefault; -extern float const kCD_PitchLowerOneOctave; -extern float const kCD_PitchHigherOneOctave; -extern float const kCD_PanDefault; -extern float const kCD_PanFullLeft; -extern float const kCD_PanFullRight; -extern float const kCD_GainDefault; - -enum bufferState { - CD_BS_EMPTY = 0, - CD_BS_LOADED = 1, - CD_BS_FAILED = 2 -}; - -typedef struct _sourceGroup { - int startIndex; - int currentIndex; - int totalSources; - bool enabled; - bool nonInterruptible; - int *sourceStatuses;//pointer into array of source status information -} sourceGroup; - -typedef struct _bufferInfo { - ALuint bufferId; - int bufferState; - void* bufferData; - ALenum format; - ALsizei sizeInBytes; - ALsizei frequencyInHertz; -} bufferInfo; - -typedef struct _sourceInfo { - bool usable; - ALuint sourceId; - ALuint attachedBufferId; -} sourceInfo; - -#pragma mark CDAudioTransportProtocol - -@protocol CDAudioTransportProtocol -/** Play the audio */ --(BOOL) play; -/** Pause the audio, retain resources */ --(BOOL) pause; -/** Stop the audio, release resources */ --(BOOL) stop; -/** Return playback to beginning */ --(BOOL) rewind; -@end - -#pragma mark CDAudioInterruptProtocol - -@protocol CDAudioInterruptProtocol -/** Is audio mute */ --(BOOL) mute; -/** If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently */ --(void) setMute:(BOOL) muteValue; -/** Is audio enabled */ --(BOOL) enabled; -/** If NO then all audio is stopped and any calls to start new audio will be ignored */ --(void) setEnabled:(BOOL) enabledValue; -@end - -#pragma mark CDUtilities -/** - Collection of utilities required by CocosDenshion - */ -@interface CDUtilities : NSObject -{ -} - -/** Fundamentally the same as the corresponding method is FileUtils but added to break binding to cocos2d */ -+(NSString*) fullPathFromRelativePath:(NSString*) relPath; - -@end - - -#pragma mark CDSoundEngine - -/** CDSoundEngine is built upon OpenAL and works with SDK 2.0. - CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch - example. It can playback up to 32 sounds simultaneously with control over pitch, pan - and gain. It can be set up to handle audio session interruption automatically. You - may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine - because you require OS 2.0 compatibility. - - Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - - @since v0.8 - */ -@class CDSoundSource; -@interface CDSoundEngine : NSObject { - - bufferInfo *_buffers; - sourceInfo *_sources; - sourceGroup *_sourceGroups; - ALCcontext *context; - NSUInteger _sourceGroupTotal; - UInt32 _audioSessionCategory; - BOOL _handleAudioSession; - ALfloat _preMuteGain; - NSObject *_mutexBufferLoad; - BOOL mute_; - BOOL enabled_; - - ALenum lastErrorCode_; - BOOL functioning_; - float asynchLoadProgress_; - BOOL getGainWorks_; - - //For managing dynamic allocation of sources and buffers - int sourceTotal_; - int bufferTotal; - -} - -@property (readwrite, nonatomic) ALfloat masterGain; -@property (readonly) ALenum lastErrorCode;//Last OpenAL error code that was generated -@property (readonly) BOOL functioning;//Is the sound engine functioning -@property (readwrite) float asynchLoadProgress; -@property (readonly) BOOL getGainWorks;//Does getting the gain for a source work -/** Total number of sources available */ -@property (readonly) int sourceTotal; -/** Total number of source groups that have been defined */ -@property (readonly) NSUInteger sourceGroupTotal; - -/** Sets the sample rate for the audio mixer. For best performance this should match the sample rate of your audio content */ -+(void) setMixerSampleRate:(Float32) sampleRate; - -/** Initializes the engine with a group definition and a total number of groups */ --(id)init; - -/** Plays a sound in a channel group with a pitch, pan and gain. The sound could played looped or not */ --(ALuint) playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop; - -/** Creates and returns a sound source object for the specified sound within the specified source group. - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId; - -/** Stops playing a sound */ -- (void) stopSound:(ALuint) sourceId; -/** Stops playing a source group */ -- (void) stopSourceGroup:(int) sourceGroupId; -/** Stops all playing sounds */ --(void) stopAllSounds; -/** Pause a sound */ --(void) pauseSound:(ALuint) sourceId; -/** Pause all sounds */ --(void) pauseAllSounds; -/** Resume a sound */ --(void) resumeSound:(ALuint) sourceId; -/** Resume all sounds */ --(void) resumeAllSounds; --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions; --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(NSUInteger) total; --(void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible; --(void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled; --(BOOL) sourceGroupEnabled:(int) sourceGroupId; --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq; --(BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath; --(void) loadBuffersAsynchronously:(NSArray *) loadRequests; --(BOOL) unloadBuffer:(int) soundId; --(ALCcontext *) openALContext; - -/** Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid */ --(float) bufferDurationInSeconds:(int) soundId; -/** Returns the size of the buffer in bytes or a negative value if the buffer id is invalid */ --(ALsizei) bufferSizeInBytes:(int) soundId; -/** Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid */ --(ALsizei) bufferFrequencyInHertz:(int) soundId; - -/** Used internally, never call unless you know what you are doing */ --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource; - -@end - -#pragma mark CDSoundSource -/** CDSoundSource is a wrapper around an OpenAL sound source. - It allows you to manipulate properties such as pitch, gain, pan and looping while the - sound is playing. CDSoundSource is based on the old CDSourceWrapper class but with much - added functionality. - - @since v1.0 - */ -@interface CDSoundSource : NSObject { - ALenum lastError; -@public - ALuint _sourceId; - ALuint _sourceIndex; - CDSoundEngine* _engine; - int _soundId; - float _preMuteGain; - BOOL enabled_; - BOOL mute_; -} -@property (readwrite, nonatomic) float pitch; -@property (readwrite, nonatomic) float gain; -@property (readwrite, nonatomic) float pan; -@property (readwrite, nonatomic) BOOL looping; -@property (readonly) BOOL isPlaying; -@property (readwrite, nonatomic) int soundId; -/** Returns the duration of the attached buffer in seconds or a negative value if the buffer is invalid */ -@property (readonly) float durationInSeconds; - -/** Stores the last error code that occurred. Check against AL_NO_ERROR */ -@property (readonly) ALenum lastError; -/** Do not init yourself, get an instance from the sourceForSound factory method on CDSoundEngine */ --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine; - -@end - -#pragma mark CDAudioInterruptTargetGroup - -/** Container for objects that implement audio interrupt protocol i.e. they can be muted and enabled. - Setting mute and enabled for the group propagates to all children. - Designed to be used with your CDSoundSource objects to get them to comply with global enabled and mute settings - if that is what you want to do.*/ -@interface CDAudioInterruptTargetGroup : NSObject { - BOOL mute_; - BOOL enabled_; - NSMutableArray *children_; -} --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget; -@end - -#pragma mark CDAsynchBufferLoader - -/** CDAsynchBufferLoader - TODO - */ -@interface CDAsynchBufferLoader : NSOperation { - NSArray *_loadRequests; - CDSoundEngine *_soundEngine; -} - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine; - -@end - -#pragma mark CDBufferLoadRequest - -/** CDBufferLoadRequest */ -@interface CDBufferLoadRequest: NSObject -{ - NSString *filePath; - int soundId; - //id loader; -} - -@property (readonly) NSString *filePath; -@property (readonly) int soundId; - -- (id)init:(int) theSoundId filePath:(const NSString *) theFilePath; -@end - -/** Interpolation type */ -typedef enum { - kIT_Linear, //!Straight linear interpolation fade - kIT_SCurve, //!S curved interpolation - kIT_Exponential //!Exponential interpolation -} tCDInterpolationType; - -#pragma mark CDFloatInterpolator -@interface CDFloatInterpolator: NSObject -{ - float start; - float end; - float lastValue; - tCDInterpolationType interpolationType; -} -@property (readwrite, nonatomic) float start; -@property (readwrite, nonatomic) float end; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - -/** Return a value between min and max based on t which represents fractional progress where 0 is the start - and 1 is the end */ --(float) interpolate:(float) t; --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; - -@end - -#pragma mark CDPropertyModifier - -/** Base class for classes that modify properties such as pitch, pan and gain */ -@interface CDPropertyModifier: NSObject -{ - CDFloatInterpolator *interpolator; - float startValue; - float endValue; - id target; - BOOL stopTargetWhenComplete; - -} -@property (readwrite, nonatomic) BOOL stopTargetWhenComplete; -@property (readwrite, nonatomic) float startValue; -@property (readwrite, nonatomic) float endValue; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; -/** Set to a fractional value between 0 and 1 where 0 equals the start and 1 equals the end*/ --(void) modify:(float) t; - --(void) _setTargetProperty:(float) newVal; --(float) _getTargetProperty; --(void) _stopTarget; --(Class) _allowableType; - -@end - -#pragma mark CDSoundSourceFader - -/** Fader for CDSoundSource objects */ -@interface CDSoundSourceFader : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePanner - -/** Panner for CDSoundSource objects */ -@interface CDSoundSourcePanner : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePitchBender - -/** Pitch bender for CDSoundSource objects */ -@interface CDSoundSourcePitchBender : CDPropertyModifier{} -@end - -#pragma mark CDSoundEngineFader - -/** Fader for CDSoundEngine objects */ -@interface CDSoundEngineFader : CDPropertyModifier{} -@end - - - - diff --git a/cocos/audio/ios/CocosDenshion.m b/cocos/audio/ios/CocosDenshion.m deleted file mode 100644 index 298c9c16b752..000000000000 --- a/cocos/audio/ios/CocosDenshion.m +++ /dev/null @@ -1,1642 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/ios/CocosDenshion.h" - -ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -ALvoid alcMacOSXMixerOutputRateProc(const ALdouble value); - - -typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq) -{ - static alBufferDataStaticProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alBufferDataStaticProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alBufferDataStatic"); - } - - if (proc) - proc(bid, format, data, size, freq); - - return; -} - -typedef ALvoid AL_APIENTRY (*alcMacOSXMixerOutputRateProcPtr) (const ALdouble value); -ALvoid alcMacOSXMixerOutputRateProc(const ALdouble value) -{ - static alcMacOSXMixerOutputRateProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alcMacOSXMixerOutputRateProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alcMacOSXMixerOutputRate"); - } - - if (proc) - proc(value); - - return; -} - -NSString * const kCDN_BadAlContext = @"kCDN_BadAlContext"; -NSString * const kCDN_AsynchLoadComplete = @"kCDN_AsynchLoadComplete"; -float const kCD_PitchDefault = 1.0f; -float const kCD_PitchLowerOneOctave = 0.5f; -float const kCD_PitchHigherOneOctave = 2.0f; -float const kCD_PanDefault = 0.0f; -float const kCD_PanFullLeft = -1.0f; -float const kCD_PanFullRight = 1.0f; -float const kCD_GainDefault = 1.0f; - -@interface CDSoundEngine (PrivateMethods) --(BOOL) _initOpenAL; --(void) _testGetGain; --(void) _dumpSourceGroupsInfo; --(void) _getSourceIndexForSourceGroup; --(void) _freeSourceGroups; --(BOOL) _setUpSourceGroups:(int[]) definitions total:(NSUInteger) total; -@end - -#pragma mark - CDUtilities - -@implementation CDUtilities - -+(NSString*) fullPathFromRelativePath:(NSString*) relPath -{ - // do not convert an absolute path (starting with '/') - if(([relPath length] > 0) && ([relPath characterAtIndex:0] == '/')) - { - return relPath; - } - - NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]]; - NSString *file = [imagePathComponents lastObject]; - - [imagePathComponents removeLastObject]; - NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents]; - - NSString *fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory]; - if (fullpath == nil) - fullpath = relPath; - - return fullpath; -} - -@end - -#pragma mark - -#pragma mark CDSoundEngine - -@implementation CDSoundEngine - -static Float32 _mixerSampleRate; -static BOOL _mixerRateSet = NO; - -@synthesize lastErrorCode = lastErrorCode_; -@synthesize functioning = functioning_; -@synthesize asynchLoadProgress = asynchLoadProgress_; -@synthesize getGainWorks = getGainWorks_; -@synthesize sourceTotal = sourceTotal_; - -+ (void) setMixerSampleRate:(Float32) sampleRate { - _mixerRateSet = YES; - _mixerSampleRate = sampleRate; -} - -- (void) _testGetGain { - float testValue = 0.7f; - ALuint testSourceId = _sources[0].sourceId; - alSourcef(testSourceId, AL_GAIN, 0.0f);//Start from know value - alSourcef(testSourceId, AL_GAIN, testValue); - ALfloat gainVal; - alGetSourcef(testSourceId, AL_GAIN, &gainVal); - getGainWorks_ = (gainVal == testValue); -} - -//Generate sources one at a time until we fail --(void) _generateSources { - - _sources = (sourceInfo*)malloc( sizeof(_sources[0]) * CD_SOURCE_LIMIT); - BOOL hasFailed = NO; - sourceTotal_ = 0; - alGetError();//Clear error - while (!hasFailed && sourceTotal_ < CD_SOURCE_LIMIT) { - alGenSources(1, &(_sources[sourceTotal_].sourceId)); - if (alGetError() == AL_NO_ERROR) { - //Now try attaching source to null buffer - alSourcei(_sources[sourceTotal_].sourceId, AL_BUFFER, 0); - if (alGetError() == AL_NO_ERROR) { - _sources[sourceTotal_].usable = true; - sourceTotal_++; - } else { - hasFailed = YES; - } - } else { - _sources[sourceTotal_].usable = false; - hasFailed = YES; - } - } - //Mark the rest of the sources as not usable - for (int i=sourceTotal_; i < CD_SOURCE_LIMIT; i++) { - _sources[i].usable = false; - } -} - --(void) _generateBuffers:(int) startIndex endIndex:(int) endIndex { - if (_buffers) { - alGetError(); - for (int i=startIndex; i <= endIndex; i++) { - alGenBuffers(1, &_buffers[i].bufferId); - _buffers[i].bufferData = NULL; - if (alGetError() == AL_NO_ERROR) { - _buffers[i].bufferState = CD_BS_EMPTY; - } else { - _buffers[i].bufferState = CD_BS_FAILED; - CDLOG(@"Denshion::CDSoundEngine - buffer creation failed %i",i); - } - } - } -} - -/** - * Internal method called during init - */ -- (BOOL) _initOpenAL -{ - //ALenum error; - context = NULL; - ALCdevice *newDevice = NULL; - - //Set the mixer rate for the audio mixer - if (!_mixerRateSet) { - _mixerSampleRate = CD_SAMPLE_RATE_DEFAULT; - } - alcMacOSXMixerOutputRateProc(_mixerSampleRate); - CDLOGINFO(@"Denshion::CDSoundEngine - mixer output rate set to %0.2f",_mixerSampleRate); - - // Create a new OpenAL Device - // Pass NULL to specify the system's default output device - newDevice = alcOpenDevice(NULL); - if (newDevice != NULL) - { - // Create a new OpenAL Context - // The new context will render to the OpenAL Device just created - context = alcCreateContext(newDevice, 0); - if (context != NULL) - { - // Make the new context the Current OpenAL Context - alcMakeContextCurrent(context); - - // Create some OpenAL Buffer Objects - [self _generateBuffers:0 endIndex:bufferTotal-1]; - - // Create some OpenAL Source Objects - [self _generateSources]; - - } - } else { - return FALSE;//No device - } - alGetError();//Clear error - return TRUE; -} - -- (void) dealloc { - - ALCcontext *currentContext = NULL; - ALCdevice *device = NULL; - - [self stopAllSounds]; - - CDLOGINFO(@"Denshion::CDSoundEngine - Deallocing sound engine."); - [self _freeSourceGroups]; - - // Delete the Sources - CDLOGINFO(@"Denshion::CDSoundEngine - deleting sources."); - for (int i=0; i < sourceTotal_; i++) { - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Detach from current buffer - alDeleteSources(1, &(_sources[i].sourceId)); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - Error deleting source! %x\n", lastErrorCode_); - } - } - - // Delete the Buffers - CDLOGINFO(@"Denshion::CDSoundEngine - deleting buffers."); - for (int i=0; i < bufferTotal; i++) { - alDeleteBuffers(1, &_buffers[i].bufferId); -#ifdef CD_USE_STATIC_BUFFERS - if (_buffers[i].bufferData) { - free(_buffers[i].bufferData); - } -#endif - } - CDLOGINFO(@"Denshion::CDSoundEngine - free buffers."); - free(_buffers); - currentContext = alcGetCurrentContext(); - //Get device for active context - device = alcGetContextsDevice(currentContext); - //Release context - CDLOGINFO(@"Denshion::CDSoundEngine - destroy context."); - alcMakeContextCurrent(NULL); - alcDestroyContext(currentContext); - //Close device - CDLOGINFO(@"Denshion::CDSoundEngine - close device."); - alcCloseDevice(device); - CDLOGINFO(@"Denshion::CDSoundEngine - free sources."); - free(_sources); - - //Release mutexes - [_mutexBufferLoad release]; - - [super dealloc]; -} - --(NSUInteger) sourceGroupTotal { - return _sourceGroupTotal; -} - --(void) _freeSourceGroups -{ - CDLOGINFO(@"Denshion::CDSoundEngine freeing source groups"); - if(_sourceGroups) { - for (int i=0; i < _sourceGroupTotal; i++) { - if (_sourceGroups[i].sourceStatuses) { - free(_sourceGroups[i].sourceStatuses); - CDLOGINFO(@"Denshion::CDSoundEngine freed source statuses %i",i); - } - } - free(_sourceGroups); - } -} - --(BOOL) _redefineSourceGroups:(int[]) definitions total:(NSUInteger) total -{ - if (_sourceGroups) { - //Stop all sounds - [self stopAllSounds]; - //Need to free source groups - [self _freeSourceGroups]; - } - return [self _setUpSourceGroups:definitions total:total]; -} - --(BOOL) _setUpSourceGroups:(int[]) definitions total:(NSUInteger) total -{ - _sourceGroups = (sourceGroup *)malloc( sizeof(_sourceGroups[0]) * total); - if(!_sourceGroups) { - CDLOG(@"Denshion::CDSoundEngine - source groups memory allocation failed"); - return NO; - } - - _sourceGroupTotal = total; - int sourceCount = 0; - for (int i=0; i < _sourceGroupTotal; i++) { - - _sourceGroups[i].startIndex = 0; - _sourceGroups[i].currentIndex = _sourceGroups[i].startIndex; - _sourceGroups[i].enabled = false; - _sourceGroups[i].nonInterruptible = false; - _sourceGroups[i].totalSources = definitions[i]; - _sourceGroups[i].sourceStatuses = malloc(sizeof(_sourceGroups[i].sourceStatuses[0]) * _sourceGroups[i].totalSources); - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - _sourceGroups[i].sourceStatuses[j] = (sourceCount + j) << 1; - } - } - sourceCount += definitions[i]; - } - return YES; -} - --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(NSUInteger) total { - [self _redefineSourceGroups:sourceGroupDefinitions total:total]; -} - --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions { - CDLOGINFO(@"Denshion::CDSoundEngine - source groups defined by NSArray."); - NSUInteger totalDefs = [sourceGroupDefinitions count]; - int* defs = (int *)malloc( sizeof(int) * totalDefs); - int currentIndex = 0; - for (id currentDef in sourceGroupDefinitions) { - if ([currentDef isKindOfClass:[NSNumber class]]) { - defs[currentIndex] = (int)[(NSNumber*)currentDef integerValue]; - CDLOGINFO(@"Denshion::CDSoundEngine - found definition %i.",defs[currentIndex]); - } else { - CDLOG(@"Denshion::CDSoundEngine - warning, did not understand source definition."); - defs[currentIndex] = 0; - } - currentIndex++; - } - [self _redefineSourceGroups:defs total:totalDefs]; - free(defs); -} - -- (void) _lazyInitOpenAL -{ - if (!functioning_) { - // Initialize our OpenAL environment - if ([self _initOpenAL]) { - //Set up the default source group - a single group that contains all the sources - int sourceDefs[1]; - sourceDefs[0] = self.sourceTotal; - [self _setUpSourceGroups:sourceDefs total:1]; - - functioning_ = YES; - //Synchronize premute gain - _preMuteGain = self.masterGain; - mute_ = NO; - enabled_ = YES; - //Test whether get gain works for sources - [self _testGetGain]; - CDLOG(@"OpenAL was initialized successfully!"); - } else { - //Something went wrong with OpenAL - functioning_ = NO; - CDLOG(@"OpenAL failed to be initialized!"); - } - } -} - -- (id)init -{ - if ((self = [super init])) { - - //Create mutexes - _mutexBufferLoad = [[NSObject alloc] init]; - - asynchLoadProgress_ = 0.0f; - - bufferTotal = CD_BUFFERS_START; - _buffers = (bufferInfo *)malloc( sizeof(_buffers[0]) * bufferTotal); - - [self _lazyInitOpenAL]; - } - - return self; -} - -/** - * Delete the buffer identified by soundId - * @return true if buffer deleted successfully, otherwise false - */ -- (BOOL) unloadBuffer:(int) soundId -{ - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0 || soundId >= bufferTotal) { - CDLOG(@"Denshion::CDSoundEngine - soundId is outside array bounds, maybe you need to increase CD_MAX_BUFFERS"); - return FALSE; - } - - //Before a buffer can be deleted any sources that are attached to it must be stopped - for (int i=0; i < sourceTotal_; i++) { - //Note: tried getting the AL_BUFFER attribute of the source instead but doesn't - //appear to work on a device - just returned zero. - if (_buffers[soundId].bufferId == _sources[i].attachedBufferId) { - - CDLOG(@"Denshion::CDSoundEngine - Found attached source %i %i %i",i,_buffers[soundId].bufferId,_sources[i].sourceId); -#ifdef CD_USE_STATIC_BUFFERS - //When using static buffers a crash may occur if a source is playing with a buffer that is about - //to be deleted even though we stop the source and successfully delete the buffer. Crash is confirmed - //on 2.2.1 and 3.1.2, however, it will only occur if a source is used rapidly after having its prior - //data deleted. To avoid any possibility of the crash we wait for the source to finish playing. - ALint state; - - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - - if (state == AL_PLAYING) { - CDLOG(@"Denshion::CDSoundEngine - waiting for source to complete playing before removing buffer data"); - alSourcei(_sources[i].sourceId, AL_LOOPING, FALSE);//Turn off looping otherwise loops will never end - while (state == AL_PLAYING) { - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - usleep(10000); - } - } -#endif - //Stop source and detach - alSourceStop(_sources[i].sourceId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error stopping source: %x\n", lastErrorCode_); - } - - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Attach to "NULL" buffer to detach - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error detaching buffer: %x\n", lastErrorCode_); - } else { - //Record that source is now attached to nothing - _sources[i].attachedBufferId = 0; - } - } - } - - alDeleteBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error deleting buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { -#ifdef CD_USE_STATIC_BUFFERS - //Free previous data, if alDeleteBuffer has returned without error then no - if (_buffers[soundId].bufferData) { - CDLOGINFO(@"Denshion::CDSoundEngine - freeing static data for soundId %i @ %i",soundId,_buffers[soundId].bufferData); - free(_buffers[soundId].bufferData);//Free the old data - _buffers[soundId].bufferData = NULL; - } -#endif - } - - alGenBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error regenerating buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { - //We now have an empty buffer - _buffers[soundId].bufferState = CD_BS_EMPTY; - CDLOGINFO(@"Denshion::CDSoundEngine - buffer %i successfully unloaded\n",soundId); - return TRUE; - } -} - -/** - * Load buffers asynchronously - * Check asynchLoadProgress for progress. asynchLoadProgress represents fraction of completion. When it equals 1.0 loading - * is complete. NB: asynchLoadProgress is simply based on the number of load requests, it does not take into account - * file sizes. - * @param An array of CDBufferLoadRequest objects - */ -- (void) loadBuffersAsynchronously:(NSArray *) loadRequests { - @synchronized(self) { - asynchLoadProgress_ = 0.0f; - CDAsynchBufferLoader *loaderOp = [[[CDAsynchBufferLoader alloc] init:loadRequests soundEngine:self] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:loaderOp]; - } -} - --(BOOL) _resizeBuffers:(int) increment { - - void * tmpBufferInfos = realloc( _buffers, sizeof(_buffers[0]) * (bufferTotal + increment) ); - - if(!tmpBufferInfos) { - free(tmpBufferInfos); - return NO; - } else { - _buffers = tmpBufferInfos; - int oldBufferTotal = bufferTotal; - bufferTotal = bufferTotal + increment; - [self _generateBuffers:oldBufferTotal endIndex:bufferTotal-1]; - return YES; - } -} - --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq { - - @synchronized(_mutexBufferLoad) { - - [self _lazyInitOpenAL]; - - if (!functioning_) { - //OpenAL initialisation has previously failed - CDLOG(@"Denshion::CDSoundEngine - Loading buffer failed because sound engine state != functioning"); - return FALSE; - } - - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0) { - CDLOG(@"Denshion::CDSoundEngine - soundId is negative"); - return FALSE; - } - - if (soundId >= bufferTotal) { - //Need to resize the buffers - int requiredIncrement = CD_BUFFERS_INCREMENT; - while (bufferTotal + requiredIncrement < soundId) { - requiredIncrement += CD_BUFFERS_INCREMENT; - } - CDLOGINFO(@"Denshion::CDSoundEngine - attempting to resize buffers by %i for sound %i",requiredIncrement,soundId); - if (![self _resizeBuffers:requiredIncrement]) { - CDLOG(@"Denshion::CDSoundEngine - buffer resize failed"); - return FALSE; - } - } - - if (soundData) - { - if (_buffers[soundId].bufferState != CD_BS_EMPTY) { - CDLOGINFO(@"Denshion::CDSoundEngine - non empty buffer, regenerating"); - if (![self unloadBuffer:soundId]) { - //Deletion of buffer failed, delete buffer routine has set buffer state and lastErrorCode - return NO; - } - } - -#ifdef CD_DEBUG - //Check that sample rate matches mixer rate and warn if they do not - if (freq != (int)_mixerSampleRate) { - CDLOGINFO(@"Denshion::CDSoundEngine - WARNING sample rate does not match mixer sample rate performance may not be optimal."); - } -#endif - -#ifdef CD_USE_STATIC_BUFFERS - alBufferDataStaticProc(_buffers[soundId].bufferId, format, soundData, size, freq); - _buffers[soundId].bufferData = soundData;//Save the pointer to the new data -#else - alBufferData(_buffers[soundId].bufferId, format, soundData, size, freq); -#endif - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error attaching audio to buffer: %x", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - } else { - CDLOG(@"Denshion::CDSoundEngine Buffer data is null!"); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - - _buffers[soundId].format = format; - _buffers[soundId].sizeInBytes = size; - _buffers[soundId].frequencyInHertz = freq; - _buffers[soundId].bufferState = CD_BS_LOADED; - CDLOGINFO(@"Denshion::CDSoundEngine Buffer %i loaded format:%i freq:%i size:%i",soundId,format,freq,size); - return TRUE; - }//end mutex -} - -/** - * Load sound data for later play back. - * @return TRUE if buffer loaded okay for play back otherwise false - */ -- (BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath -{ - - ALvoid* data; - ALenum format; - ALsizei size; - ALsizei freq; - - CDLOGINFO(@"Denshion::CDSoundEngine - Loading openAL buffer %i %@", soundId, filePath); - - CFURLRef fileURL = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:filePath]; - if (path) { - fileURL = (CFURLRef)[[NSURL fileURLWithPath:path] retain]; - } - - if (fileURL) - { - data = CDGetOpenALAudioData(fileURL, &size, &format, &freq); - CFRelease(fileURL); - BOOL result = [self loadBufferFromData:soundId soundData:data format:format size:size freq:freq]; -#ifndef CD_USE_STATIC_BUFFERS - free(data);//Data can be freed here because alBufferData performs a memcpy -#endif - return result; - } else { - CDLOG(@"Denshion::CDSoundEngine Could not find file!\n"); - //Don't change buffer state here as it will be the same as before method was called - return FALSE; - } -} - --(BOOL) validateBufferId:(int) soundId { - if (soundId < 0 || soundId >= bufferTotal) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId buffer outside range %i",soundId); - return NO; - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId invalid buffer state %i", soundId); - return NO; - } else { - return YES; - } -} - --(float) bufferDurationInSeconds:(int) soundId { - if ([self validateBufferId:soundId]) { - float factor = 0.0f; - switch (_buffers[soundId].format) { - case AL_FORMAT_MONO8: - factor = 1.0f; - break; - case AL_FORMAT_MONO16: - factor = 0.5f; - break; - case AL_FORMAT_STEREO8: - factor = 0.5f; - break; - case AL_FORMAT_STEREO16: - factor = 0.25f; - break; - } - return (float)_buffers[soundId].sizeInBytes/(float)_buffers[soundId].frequencyInHertz * factor; - } else { - return -1.0f; - } -} - --(ALsizei) bufferSizeInBytes:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].sizeInBytes; - } else { - return -1.0f; - } -} - --(ALsizei) bufferFrequencyInHertz:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].frequencyInHertz; - } else { - return -1.0f; - } -} - -- (ALfloat) masterGain { - if (mute_) { - //When mute the real gain will always be 0 therefore return the preMuteGain value - return _preMuteGain; - } else { - ALfloat gain; - alGetListenerf(AL_GAIN, &gain); - return gain; - } -} - -/** - * Overall gain setting multiplier. e.g 0.5 is half the gain. - */ -- (void) setMasterGain:(ALfloat) newGainValue { - if (mute_) { - _preMuteGain = newGainValue; - } else { - alListenerf(AL_GAIN, newGainValue); - } -} - -#pragma mark CDSoundEngine AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - mute_ = newMuteValue; - if (mute_) { - //Remember what the gain was - _preMuteGain = self.masterGain; - //Set gain to 0 - do not use the property as this will adjust preMuteGain when muted - alListenerf(AL_GAIN, 0.0f); - } else { - //Restore gain to what it was before being muted - self.masterGain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stopAllSounds]; - } -} - --(void) _lockSource:(int) sourceIndex lock:(BOOL) lock { - BOOL found = NO; - for (int i=0; i < _sourceGroupTotal && !found; i++) { - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources && !found; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - if((_sourceGroups[i].sourceStatuses[j] >> 1)==sourceIndex) { - if (lock) { - //Set first bit to lock this source - _sourceGroups[i].sourceStatuses[j] |= 1; - } else { - //Unset first bit to unlock this source - _sourceGroups[i].sourceStatuses[j] &= ~1; - } - found = YES; - } - } - } - } -} - --(int) _getSourceIndexForSourceGroup:(int)sourceGroupId -{ - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine invalid source group id %i",sourceGroupId); - return CD_NO_SOURCE; - } - - int sourceIndex = -1;//Using -1 to indicate no source found - BOOL complete = NO; - ALint sourceState = 0; - sourceGroup *thisSourceGroup = &_sourceGroups[sourceGroupId]; - thisSourceGroup->currentIndex = thisSourceGroup->startIndex; - while (!complete) { - //Iterate over sources looking for one that is not locked, first bit indicates if source is locked - if ((thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] & 1) == 0) { - //This source is not locked - sourceIndex = thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] >> 1;//shift back to get the index - if (thisSourceGroup->nonInterruptible) { - //Check if this source is playing, if so it can't be interrupted - alGetSourcei(_sources[sourceIndex].sourceId, AL_SOURCE_STATE, &sourceState); - if (sourceState != AL_PLAYING) { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } else { - sourceIndex = -1;//The source index was no good because the source was playing - } - } else { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } - } - thisSourceGroup->currentIndex++; - if (thisSourceGroup->currentIndex >= thisSourceGroup->totalSources) { - //Reset to the beginning - thisSourceGroup->currentIndex = 0; - } - if (thisSourceGroup->currentIndex == thisSourceGroup->startIndex) { - //We have looped around and got back to the start - complete = YES; - } - } - - //Reset start index to beginning if beyond bounds - if (thisSourceGroup->startIndex >= thisSourceGroup->totalSources) { - thisSourceGroup->startIndex = 0; - } - - if (sourceIndex >= 0) { - return sourceIndex; - } else { - return CD_NO_SOURCE; - } - -} - -/** - * Play a sound. - * @param soundId the id of the sound to play (buffer id). - * @param SourceGroupId the source group that will be used to play the sound. - * @param pitch pitch multiplier. e.g 1.0 is unaltered, 0.5 is 1 octave lower. - * @param pan stereo position. -1 is fully left, 0 is centre and 1 is fully right. - * @param gain gain multiplier. e.g. 1.0 is unaltered, 0.5 is half the gain - * @param loop should the sound be looped or one shot. - * @return the id of the source being used to play the sound or CD_MUTE if the sound engine is muted or non functioning - * or CD_NO_SOURCE if a problem occurs setting up the source - * - */ -- (ALuint)playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop { - -#ifdef CD_DEBUG - //Sanity check parameters - only in DEBUG - NSAssert(soundId >= 0, @"soundId can not be negative"); - NSAssert(soundId < bufferTotal, @"soundId exceeds limit"); - NSAssert(sourceGroupId >= 0, @"sourceGroupId can not be negative"); - NSAssert(sourceGroupId < _sourceGroupTotal, @"sourceGroupId exceeds limit"); - NSAssert(pitch > 0, @"pitch must be greater than zero"); - NSAssert(pan >= -1 && pan <= 1, @"pan must be between -1 and 1"); - NSAssert(gain >= 0, @"gain can not be negative"); -#endif - //If mute or initialisation has failed or buffer is not loaded then do nothing - if (!enabled_ || !functioning_ || _buffers[soundId].bufferState != CD_BS_LOADED || _sourceGroups[sourceGroupId].enabled) { -#ifdef CD_DEBUG - if (!functioning_) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because sound engine is not functioning"); - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because buffer %i is not loaded", soundId); - } -#endif - return CD_MUTE; - } - - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId];//This method ensures sourceIndex is valid - - if (sourceIndex != CD_NO_SOURCE) { - ALint state; - ALuint source = _sources[sourceIndex].sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetError();//Clear the error code - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alSourcei(source, AL_BUFFER, buffer);//Attach to sound - alSourcef(source, AL_PITCH, pitch);//Set pitch - alSourcei(source, AL_LOOPING, loop);//Set looping - alSourcef(source, AL_GAIN, gain);//Set gain/volume - float sourcePosAL[] = {pan, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(source, AL_POSITION, sourcePosAL); - alGetError();//Clear the error code - alSourcePlay(source); - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - //Everything was okay - _sources[sourceIndex].attachedBufferId = buffer; - return source; - } else { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundEngine - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return CD_NO_SOURCE; - } - } else { - return CD_NO_SOURCE; - } -} - --(BOOL) _soundSourceAttachToBuffer:(CDSoundSource*) soundSource soundId:(int) soundId { - //Attach the source to the buffer - ALint state; - ALuint source = soundSource->_sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alGetError();//Clear the error code - alSourcei(source, AL_BUFFER, buffer);//Attach to sound data - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - _sources[soundSource->_sourceIndex].attachedBufferId = buffer; - //_sourceBufferAttachments[soundSource->_sourceIndex] = buffer;//Keep track of which - soundSource->_soundId = soundId; - return YES; - } else { - return NO; - } -} - -/** - * Get a sound source for the specified sound in the specified source group - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId -{ - if (!functioning_) { - return nil; - } - //Check if a source is available - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId]; - if (sourceIndex != CD_NO_SOURCE) { - CDSoundSource *result = [[CDSoundSource alloc] init:_sources[sourceIndex].sourceId sourceIndex:sourceIndex soundEngine:self]; - [self _lockSource:sourceIndex lock:YES]; - //Try to attach to the buffer - if ([self _soundSourceAttachToBuffer:result soundId:soundId]) { - //Set to a known state - result.pitch = 1.0f; - result.pan = 0.0f; - result.gain = 1.0f; - result.looping = NO; - return [result autorelease]; - } else { - //Release the sound source we just created, this will also unlock the source - [result release]; - return nil; - } - } else { - //No available source within that source group - return nil; - } -} - --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource { - CDLOGINFO(@"Denshion::CDSoundEngine _soundSourcePreRelease %i",soundSource->_sourceIndex); - //Unlock the sound source's source - [self _lockSource:soundSource->_sourceIndex lock:NO]; -} - -/** - * Stop all sounds playing within a source group - */ -- (void) stopSourceGroup:(int) sourceGroupId { - - if (!functioning_ || sourceGroupId >= _sourceGroupTotal || sourceGroupId < 0) { - return; - } - int sourceCount = _sourceGroups[sourceGroupId].totalSources; - for (int i=0; i < sourceCount; i++) { - int sourceIndex = _sourceGroups[sourceGroupId].sourceStatuses[i] >> 1; - alSourceStop(_sources[sourceIndex].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -/** - * Stop a sound playing. - * @param sourceId an OpenAL source identifier i.e. the return value of playSound - */ -- (void)stopSound:(ALuint) sourceId { - if (!functioning_) { - return; - } - alSourceStop(sourceId); - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -- (void) stopAllSounds { - for (int i=0; i < sourceTotal_; i++) { - alSourceStop(_sources[i].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -- (void) pauseSound:(ALuint) sourceId { - if (!functioning_) { - return; - } - alSourcePause(sourceId); - alGetError();//Clear error in case we pause any sounds that couldn't be paused -} - -- (void) pauseAllSounds { - for (int i = 0; i < sourceTotal_; i++) { - [self pauseSound:_sources[i].sourceId]; - } - alGetError();//Clear error in case we stopped any sounds that couldn't be paused -} - -- (void) resumeSound:(ALuint) soundId { - if (!functioning_) { - return; - } - - // only resume a sound id that is paused - ALint state; - alGetSourcei(soundId, AL_SOURCE_STATE, &state); - if (state != AL_PAUSED) - { - return; - } - - alSourcePlay(soundId); - alGetError();//Clear error in case we stopped any sounds that couldn't be resumed -} - -- (void) resumeAllSounds { - for (int i = 0; i < sourceTotal_; i++) { - [self resumeSound:_sources[i].sourceId]; - } - alGetError();//Clear error in case we stopped any sounds that couldn't be resumed -} - -/** - * Set a source group as non interruptible. Default is that source groups are interruptible. - * Non interruptible means that if a request to play a sound is made for a source group and there are - * no free sources available then the play request will be ignored and CD_NO_SOURCE will be returned. - */ -- (void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupNonInterruptible invalid source group id %i",sourceGroupId); - return; - } - - if (isNonInterruptible) { - _sourceGroups[sourceGroupId].nonInterruptible = true; - } else { - _sourceGroups[sourceGroupId].nonInterruptible = false; - } -} - -/** - * Set the mute property for a source group. If mute is turned on any sounds in that source group - * will be stopped and further sounds in that source group will play. However, turning mute off - * will not restart any sounds that were playing when mute was turned on. Also the mute setting - * for the sound engine must be taken into account. If the sound engine is mute no sounds will play - * no matter what the source group mute setting is. - */ -- (void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupEnabled invalid source group id %i",sourceGroupId); - return; - } - - if (enabled) { - _sourceGroups[sourceGroupId].enabled = true; - [self stopSourceGroup:sourceGroupId]; - } else { - _sourceGroups[sourceGroupId].enabled = false; - } -} - -/** - * Return the mute property for the source group identified by sourceGroupId - */ -- (BOOL) sourceGroupEnabled:(int) sourceGroupId { - return _sourceGroups[sourceGroupId].enabled; -} - --(ALCcontext *) openALContext { - return context; -} - -- (void) _dumpSourceGroupsInfo { -#ifdef CD_DEBUG - CDLOGINFO(@"-------------- source Group Info --------------"); - for (int i=0; i < _sourceGroupTotal; i++) { - CDLOGINFO(@"Group: %i start:%i total:%i",i,_sourceGroups[i].startIndex, _sourceGroups[i].totalSources); - CDLOGINFO(@"----- mute:%i nonInterruptible:%i",_sourceGroups[i].enabled, _sourceGroups[i].nonInterruptible); - CDLOGINFO(@"----- Source statuses ----"); - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - CDLOGINFO(@"Source status:%i index=%i locked=%i",j,_sourceGroups[i].sourceStatuses[j] >> 1, _sourceGroups[i].sourceStatuses[j] & 1); - } - } -#endif -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDSoundSource - -@synthesize lastError; - -//Macro for handling the al error code -#define CDSOUNDSOURCE_UPDATE_LAST_ERROR (lastError = alGetError()) -#define CDSOUNDSOURCE_ERROR_HANDLER ( CDSOUNDSOURCE_UPDATE_LAST_ERROR == AL_NO_ERROR) - --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine { - if ((self = [super init])) { - _sourceId = theSourceId; - _engine = engine; - _sourceIndex = index; - enabled_ = YES; - mute_ = NO; - _preMuteGain = self.gain; - } - return self; -} - --(void) dealloc -{ - CDLOGINFO(@"Denshion::CDSoundSource deallocated %i",self->_sourceIndex); - - //Notify sound engine we are about to release - [_engine _soundSourcePreRelease:self]; - [super dealloc]; -} - -- (void) setPitch:(float) newPitchValue { - alSourcef(_sourceId, AL_PITCH, newPitchValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setGain:(float) newGainValue { - if (!mute_) { - alSourcef(_sourceId, AL_GAIN, newGainValue); - } else { - _preMuteGain = newGainValue; - } - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setPan:(float) newPanValue { - float sourcePosAL[] = {newPanValue, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (void) setLooping:(BOOL) newLoopingValue { - alSourcei(_sourceId, AL_LOOPING, newLoopingValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (BOOL) isPlaying { - ALint state; - alGetSourcei(_sourceId, AL_SOURCE_STATE, &state); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return (state == AL_PLAYING); -} - -- (float) pitch { - ALfloat pitchVal; - alGetSourcef(_sourceId, AL_PITCH, &pitchVal); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return pitchVal; -} - -- (float) pan { - ALfloat sourcePosAL[] = {0.0f,0.0f,0.0f}; - alGetSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return sourcePosAL[0]; -} - -- (float) gain { - if (!mute_) { - ALfloat val; - alGetSourcef(_sourceId, AL_GAIN, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; - } else { - return _preMuteGain; - } -} - -- (BOOL) looping { - ALfloat val; - alGetSourcef(_sourceId, AL_LOOPING, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; -} - --(BOOL) stop { - alSourceStop(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) play { - if (enabled_) { - alSourcePlay(_sourceId); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - if (lastError != AL_NO_ERROR) { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundSource - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return NO; - } else { - return YES; - } - } else { - return NO; - } -} - --(BOOL) pause { - alSourcePause(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) rewind { - alSourceRewind(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(void) setSoundId:(int) soundId { - [_engine _soundSourceAttachToBuffer:self soundId:soundId]; -} - --(int) soundId { - return _soundId; -} - --(float) durationInSeconds { - return [_engine bufferDurationInSeconds:_soundId]; -} - -#pragma mark CDSoundSource AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - if (newMuteValue) { - //Remember what the gain was - _preMuteGain = self.gain; - self.gain = 0.0f; - mute_ = newMuteValue;//Make sure this is done after setting the gain property as the setter behaves differently depending on mute value - } else { - //Restore gain to what it was before being muted - mute_ = newMuteValue; - self.gain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stop]; - } -} - -@end - -//////////////////////////////////////////////////////////////////////////// -#pragma mark - CDAudioInterruptTargetGroup - -@implementation CDAudioInterruptTargetGroup - --(id) init { - if ((self = [super init])) { - children_ = [[NSMutableArray alloc] initWithCapacity:32]; - enabled_ = YES; - mute_ = NO; - } - return self; -} - --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget { - //Synchronize child with group settings; - [interruptibleTarget setMute:mute_]; - [interruptibleTarget setEnabled:enabled_]; - [children_ addObject:interruptibleTarget]; -} - --(void) removeAudioInterruptTarget:(NSObject*) interruptibleTarget { - [children_ removeObjectIdenticalTo:interruptibleTarget]; -} - -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - for (NSObject* target in children_) { - [target setMute:newMuteValue]; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue == enabled_) { - return; - } - - for (NSObject* target in children_) { - [target setEnabled:enabledValue]; - } -} - -@end - - - -//////////////////////////////////////////////////////////////////////////// - -#pragma mark - CDAsynchBufferLoader - -@implementation CDAsynchBufferLoader - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - _loadRequests = loadRequests; - [_loadRequests retain]; - _soundEngine = theSoundEngine; - [_soundEngine retain]; - } - return self; -} - --(void) main { - CDLOGINFO(@"Denshion::CDAsynchBufferLoader - loading buffers"); - [super main]; - _soundEngine.asynchLoadProgress = 0.0f; - - if ([_loadRequests count] > 0) { - float increment = 1.0f / [_loadRequests count]; - //Iterate over load request and load - for (CDBufferLoadRequest *loadRequest in _loadRequests) { - [_soundEngine loadBuffer:loadRequest.soundId filePath:loadRequest.filePath]; - _soundEngine.asynchLoadProgress += increment; - } - } - - //Completed - _soundEngine.asynchLoadProgress = 1.0f; - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AsynchLoadComplete object:nil]; - -} - --(void) dealloc { - [_loadRequests release]; - [_soundEngine release]; - [super dealloc]; -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDBufferLoadRequest - -@implementation CDBufferLoadRequest - -@synthesize filePath, soundId; - --(id) init:(int) theSoundId filePath:(const NSString *) theFilePath { - if ((self = [super init])) { - soundId = theSoundId; - filePath = [theFilePath copy]; - } - return self; -} - --(void) dealloc { - [filePath release]; - [super dealloc]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDFloatInterpolator - -@implementation CDFloatInterpolator -@synthesize start,end,interpolationType; - --(float) interpolate:(float) t { - - if (t < 1.0f) { - switch (interpolationType) { - case kIT_Linear: - //Linear interpolation - return ((end - start) * t) + start; - - case kIT_SCurve: - //Cubic s curve t^2 * (3 - 2t) - return ((float)(t * t * (3.0 - (2.0 * t))) * (end - start)) + start; - - case kIT_Exponential: - //Formulas taken from EaseAction - if (end > start) { - //Fade in - float logDelta = (t==0) ? 0 : powf(2, 10 * (t/1 - 1)) - 1 * 0.001f; - return ((end - start) * logDelta) + start; - } else { - //Fade Out - float logDelta = (-powf(2, -10 * t/1) + 1); - return ((end - start) * logDelta) + start; - } - default: - return 0.0f; - } - } else { - return end; - } -} - --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - start = startVal; - end = endVal; - interpolationType = type; - } - return self; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDPropertyModifier - -@implementation CDPropertyModifier - -@synthesize stopTargetWhenComplete; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - if (target) { - //Release the previous target if there is one - [target release]; - } - target = theTarget; -#if CD_DEBUG - //Check target is of the required type - if (![theTarget isMemberOfClass:[self _allowableType]] ) { - CDLOG(@"Denshion::CDPropertyModifier target is not of type %@",[self _allowableType]); - NSAssert([theTarget isKindOfClass:[CDSoundEngine class]], @"CDPropertyModifier target not of required type"); - } -#endif - [target retain]; - startValue = startVal; - endValue = endVal; - if (interpolator) { - //Release previous interpolator if there is one - [interpolator release]; - } - interpolator = [[CDFloatInterpolator alloc] init:type startVal:startVal endVal:endVal]; - stopTargetWhenComplete = NO; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDPropertyModifier deallocated %@",self); - [target release]; - [interpolator release]; - [super dealloc]; -} - --(void) modify:(float) t { - if (t < 1.0) { - [self _setTargetProperty:[interpolator interpolate:t]]; - } else { - //At the end - [self _setTargetProperty:endValue]; - if (stopTargetWhenComplete) { - [self _stopTarget]; - } - } -} - --(float) startValue { - return startValue; -} - --(void) setStartValue:(float) startVal -{ - startValue = startVal; - interpolator.start = startVal; -} - --(float) endValue { - return startValue; -} - --(void) setEndValue:(float) endVal -{ - endValue = endVal; - interpolator.end = endVal; -} - --(tCDInterpolationType) interpolationType { - return interpolator.interpolationType; -} - --(void) setInterpolationType:(tCDInterpolationType) interpolationType { - interpolator.interpolationType = interpolationType; -} - --(void) _setTargetProperty:(float) newVal { - -} - --(float) _getTargetProperty { - return 0.0f; -} - --(void) _stopTarget { - -} - --(Class) _allowableType { - return [NSObject class]; -} -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDSoundSourceFader - -@implementation CDSoundSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).gain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).gain; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDSoundSourcePanner - -@implementation CDSoundSourcePanner - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pan = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pan; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDSoundSourcePitchBender - -@implementation CDSoundSourcePitchBender - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pitch = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pitch; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - CDSoundEngineFader - -@implementation CDSoundEngineFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundEngine*)target).masterGain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundEngine*)target).masterGain; -} - --(void) _stopTarget { - [((CDSoundEngine*)target) stopAllSounds]; -} - --(Class) _allowableType { - return [CDSoundEngine class]; -} - -@end - - diff --git a/cocos/audio/ios/SimpleAudioEngine.mm b/cocos/audio/ios/SimpleAudioEngine.mm deleted file mode 100644 index e7344d9ce770..000000000000 --- a/cocos/audio/ios/SimpleAudioEngine.mm +++ /dev/null @@ -1,357 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "audio/include/SimpleAudioEngine.h" -#include "audio/ios/SimpleAudioEngine_objc.h" -#include "platform/CCFileUtils.h" - -USING_NS_CC; - -static bool __isAudioPreloadOrPlayed = false; - -static void static_end() -{ - if (__isAudioPreloadOrPlayed) - { - [SimpleAudioEngine end]; - } - - __isAudioPreloadOrPlayed = false; -} - -static void static_preloadBackgroundMusic(const char* pszFilePath) -{ - __isAudioPreloadOrPlayed = true; - [[SimpleAudioEngine sharedEngine] preloadBackgroundMusic: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - __isAudioPreloadOrPlayed = true; - [[SimpleAudioEngine sharedEngine] playBackgroundMusic: [NSString stringWithUTF8String: pszFilePath] loop: bLoop]; -} - -static void static_stopBackgroundMusic() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; -} - -static void static_pauseBackgroundMusic() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] pauseBackgroundMusic]; -} - -static void static_resumeBackgroundMusic() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] resumeBackgroundMusic]; -} - -static void static_rewindBackgroundMusic() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] rewindBackgroundMusic]; -} - -static bool static_willPlayBackgroundMusic() -{ - if (!__isAudioPreloadOrPlayed) - return false; - - return [[SimpleAudioEngine sharedEngine] willPlayBackgroundMusic]; -} - -static bool static_isBackgroundMusicPlaying() -{ - if (!__isAudioPreloadOrPlayed) - return false; - - return [[SimpleAudioEngine sharedEngine] isBackgroundMusicPlaying]; -} - -static float static_getBackgroundMusicVolume() -{ - if (!__isAudioPreloadOrPlayed) - return 0.0f; - - return [[SimpleAudioEngine sharedEngine] backgroundMusicVolume]; -} - -static void static_setBackgroundMusicVolume(float volume) -{ - if (!__isAudioPreloadOrPlayed) - return; - - volume = MAX( MIN(volume, 1.0), 0 ); - [SimpleAudioEngine sharedEngine].backgroundMusicVolume = volume; -} - -static float static_getEffectsVolume() -{ - if (!__isAudioPreloadOrPlayed) - return 0.0f; - - return [[SimpleAudioEngine sharedEngine] effectsVolume]; -} - -static void static_setEffectsVolume(float volume) -{ - if (!__isAudioPreloadOrPlayed) - return; - - volume = MAX( MIN(volume, 1.0), 0 ); - [SimpleAudioEngine sharedEngine].effectsVolume = volume; -} - -static unsigned int static_playEffect(const char* pszFilePath, bool bLoop, Float32 pszPitch, Float32 pszPan, Float32 pszGain) -{ - __isAudioPreloadOrPlayed = true; - return [[SimpleAudioEngine sharedEngine] playEffect:[NSString stringWithUTF8String: pszFilePath] loop:bLoop pitch:pszPitch pan: pszPan gain:pszGain]; -} - -static void static_stopEffect(int nSoundId) -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] stopEffect: nSoundId]; -} - -static void static_preloadEffect(const char* pszFilePath) -{ - __isAudioPreloadOrPlayed = true; - [[SimpleAudioEngine sharedEngine] preloadEffect: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_unloadEffect(const char* pszFilePath) -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] unloadEffect: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_pauseEffect(unsigned int uSoundId) -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] pauseEffect: uSoundId]; -} - -static void static_pauseAllEffects() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] pauseAllEffects]; -} - -static void static_resumeEffect(unsigned int uSoundId) -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] resumeEffect: uSoundId]; -} - -static void static_resumeAllEffects() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] resumeAllEffects]; -} - -static void static_stopAllEffects() -{ - if (!__isAudioPreloadOrPlayed) - return; - - [[SimpleAudioEngine sharedEngine] stopAllEffects]; -} - -namespace CocosDenshion { - -static SimpleAudioEngine *s_pEngine = nullptr; - -SimpleAudioEngine::SimpleAudioEngine() -{ - -} - -SimpleAudioEngine::~SimpleAudioEngine() -{ - -} - -SimpleAudioEngine* SimpleAudioEngine::getInstance() -{ - if (! s_pEngine) - { - s_pEngine = new (std::nothrow) SimpleAudioEngine(); - } - - return s_pEngine; -} - -void SimpleAudioEngine::end() -{ - if (s_pEngine) - { - delete s_pEngine; - s_pEngine = nullptr; - } - - static_end(); -} - -void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_preloadBackgroundMusic(fullPath.c_str()); -} - -void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_playBackgroundMusic(fullPath.c_str(), bLoop); -} - -void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) -{ - static_stopBackgroundMusic(); -} - -void SimpleAudioEngine::pauseBackgroundMusic() -{ - static_pauseBackgroundMusic(); -} - -void SimpleAudioEngine::resumeBackgroundMusic() -{ - static_resumeBackgroundMusic(); -} - -void SimpleAudioEngine::rewindBackgroundMusic() -{ - static_rewindBackgroundMusic(); -} - -bool SimpleAudioEngine::willPlayBackgroundMusic() -{ - return static_willPlayBackgroundMusic(); -} - -bool SimpleAudioEngine::isBackgroundMusicPlaying() -{ - return static_isBackgroundMusicPlaying(); -} - -float SimpleAudioEngine::getBackgroundMusicVolume() -{ - return static_getBackgroundMusicVolume(); -} - -void SimpleAudioEngine::setBackgroundMusicVolume(float volume) -{ - static_setBackgroundMusicVolume(volume); -} - -float SimpleAudioEngine::getEffectsVolume() -{ - return static_getEffectsVolume(); -} - -void SimpleAudioEngine::setEffectsVolume(float volume) -{ - static_setEffectsVolume(volume); -} - -unsigned int SimpleAudioEngine::playEffect(const char *pszFilePath, bool bLoop, - float pitch, float pan, float gain) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - return static_playEffect(fullPath.c_str(), bLoop, pitch, pan, gain); -} - -void SimpleAudioEngine::stopEffect(unsigned int nSoundId) -{ - static_stopEffect(nSoundId); -} - -void SimpleAudioEngine::preloadEffect(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_preloadEffect(fullPath.c_str()); -} - -void SimpleAudioEngine::unloadEffect(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_unloadEffect(fullPath.c_str()); -} - -void SimpleAudioEngine::pauseEffect(unsigned int uSoundId) -{ - static_pauseEffect(uSoundId); -} - -void SimpleAudioEngine::resumeEffect(unsigned int uSoundId) -{ - static_resumeEffect(uSoundId); -} - -void SimpleAudioEngine::pauseAllEffects() -{ - static_pauseAllEffects(); -} - -void SimpleAudioEngine::resumeAllEffects() -{ - static_resumeAllEffects(); -} - -void SimpleAudioEngine::stopAllEffects() -{ - static_stopAllEffects(); -} - -} // endof namespace CocosDenshion { diff --git a/cocos/audio/ios/SimpleAudioEngine_objc.h b/cocos/audio/ios/SimpleAudioEngine_objc.h deleted file mode 100644 index bfceac286269..000000000000 --- a/cocos/audio/ios/SimpleAudioEngine_objc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - -#import "audio/ios/CDAudioManager.h" - -/** - A wrapper to the CDAudioManager object. - This is recommended for basic audio requirements. If you just want to play some sound fx - and some background music and have no interest in learning the lower level workings then - this is the interface to use. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface SimpleAudioEngine : NSObject { - - BOOL mute_; - BOOL enabled_; -} - -/** Background music volume. Range is 0.0f to 1.0f. This will only have an effect if willPlayBackgroundMusic returns YES */ -@property (readwrite) float backgroundMusicVolume; -/** Effects volume. Range is 0.0f to 1.0f */ -@property (readwrite) float effectsVolume; -/** If NO it indicates background music will not be played either because no background music is loaded or the audio session does not permit it.*/ -@property (readonly) BOOL willPlayBackgroundMusic; - -/** returns the shared instance of the SimpleAudioEngine object */ -+ (SimpleAudioEngine*) sharedEngine; - -/** Preloads a music file so it will be ready to play as background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; - -/** plays background music in a loop*/ --(void) playBackgroundMusic:(NSString*) filePath; -/** plays background music, if loop is true the music will repeat otherwise it will be played once */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** stops playing background music */ --(void) stopBackgroundMusic; -/** pauses the background music */ --(void) pauseBackgroundMusic; -/** resume background music that has been paused */ --(void) resumeBackgroundMusic; -/** rewind the background music */ --(void) rewindBackgroundMusic; -/** returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - -/** plays an audio effect with a file path*/ --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop; -/** stop a sound that is playing, note you must pass in the soundId that is returned when you started playing the sound with playEffect */ --(void) stopEffect:(ALuint) soundId; -/** plays an audio effect with a file path, pitch, pan and gain */ --(ALuint) playEffect:(NSString*) filePath loop:(BOOL)loop pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain; -/** pause an audio */ --(void) pauseEffect:(ALuint) soundId; -/** pause all audioes */ --(void) pauseAllEffects; -/** resume an audio */ --(void) resumeEffect:(ALuint) soundId; -/** resume all audioes */ --(void) resumeAllEffects; -/** stop all audioes */ --(void) stopAllEffects; -/** preloads an audio effect */ --(void) preloadEffect:(NSString*) filePath; -/** unloads an audio effect from memory */ --(void) unloadEffect:(NSString*) filePath; -/** Gets a CDSoundSource object set up to play the specified file. */ --(CDSoundSource *) soundSourceForFile:(NSString*) filePath; - -/** Shuts down the shared audio engine instance so that it can be reinitialised */ -+(void) end; - -@end diff --git a/cocos/audio/ios/SimpleAudioEngine_objc.m b/cocos/audio/ios/SimpleAudioEngine_objc.m deleted file mode 100644 index 2c4cec0c9793..000000000000 --- a/cocos/audio/ios/SimpleAudioEngine_objc.m +++ /dev/null @@ -1,240 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/ios/SimpleAudioEngine_objc.h" - -@implementation SimpleAudioEngine - -static SimpleAudioEngine *sharedEngine = nil; -static CDSoundEngine* soundEngine = nil; -static CDAudioManager *am = nil; -static CDBufferManager *bufferManager = nil; - -// Init -+ (SimpleAudioEngine *) sharedEngine -{ - @synchronized(self) { - if (!sharedEngine) - sharedEngine = [[SimpleAudioEngine alloc] init]; - } - return sharedEngine; -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedEngine == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - --(id) init -{ - if((self=[super init])) { - am = [CDAudioManager sharedManager]; - soundEngine = am.soundEngine; - bufferManager = [[CDBufferManager alloc] initWithEngine:soundEngine]; - mute_ = NO; - enabled_ = YES; - } - return self; -} - -// Memory -- (void) dealloc -{ - am = nil; - soundEngine = nil; - bufferManager = nil; - [super dealloc]; -} - -+(void) end -{ - am = nil; - [CDAudioManager end]; - [bufferManager release]; - [sharedEngine release]; - sharedEngine = nil; -} - -#pragma mark SimpleAudioEngine - background music - --(void) preloadBackgroundMusic:(NSString*) filePath { - [am preloadBackgroundMusic:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath -{ - [am playBackgroundMusic:filePath loop:TRUE]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [am playBackgroundMusic:filePath loop:loop]; -} - --(void) stopBackgroundMusic -{ - [am stopBackgroundMusic]; -} - --(void) pauseBackgroundMusic { - [am pauseBackgroundMusic]; -} - --(void) resumeBackgroundMusic { - [am resumeBackgroundMusic]; -} - --(void) rewindBackgroundMusic { - [am rewindBackgroundMusic]; -} - --(BOOL) isBackgroundMusicPlaying { - return [am isBackgroundMusicPlaying]; -} - --(BOOL) willPlayBackgroundMusic { - return [am willPlayBackgroundMusic]; -} - -#pragma mark SimpleAudioEngine - sound effects - --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop -{ - return [self playEffect:filePath loop:loop pitch:1.0f pan:0.0f gain:1.0f]; -} - --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - return [soundEngine playSound:soundId sourceGroupId:0 pitch:pitch pan:pan gain:gain loop:loop]; - } else { - return CD_MUTE; - } -} - --(void) stopEffect:(ALuint) soundId { - [soundEngine stopSound:soundId]; -} - --(void) pauseEffect:(ALuint) soundId { - [soundEngine pauseSound: soundId]; -} - --(void) pauseAllEffects { - [soundEngine pauseAllSounds]; -} - --(void) resumeEffect:(ALuint) soundId { - [soundEngine resumeSound: soundId]; -} - --(void) resumeAllEffects { - [soundEngine resumeAllSounds]; -} - --(void) stopAllEffects { - [soundEngine stopAllSounds]; -} - --(void) preloadEffect:(NSString*) filePath -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId == kCDNoBuffer) { - CDLOG(@"Denshion::SimpleAudioEngine sound failed to preload %@",filePath); - } -} - --(void) unloadEffect:(NSString*) filePath -{ - CDLOGINFO(@"Denshion::SimpleAudioEngine unloadedEffect %@",filePath); - [bufferManager releaseBufferForFile:filePath]; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute_; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute_ != muteValue) { - mute_ = muteValue; - am.mute = mute_; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue -{ - if (enabled_ != enabledValue) { - enabled_ = enabledValue; - am.enabled = enabled_; - } -} - - -#pragma mark SimpleAudioEngine - BackgroundMusicVolume --(float) backgroundMusicVolume -{ - return am.backgroundMusic.volume; -} - --(void) setBackgroundMusicVolume:(float) volume -{ - am.backgroundMusic.volume = volume; -} - -#pragma mark SimpleAudioEngine - EffectsVolume --(float) effectsVolume -{ - return am.soundEngine.masterGain; -} - --(void) setEffectsVolume:(float) volume -{ - am.soundEngine.masterGain = volume; -} - --(CDSoundSource *) soundSourceForFile:(NSString*) filePath { - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - CDSoundSource *result = [soundEngine soundSourceForSound:soundId sourceGroupId:0]; - CDLOGINFO(@"Denshion::SimpleAudioEngine sound source created for %@",filePath); - return result; - } else { - return nil; - } -} - -@end diff --git a/cocos/audio/mac/CDAudioManager.h b/cocos/audio/mac/CDAudioManager.h deleted file mode 100644 index bfc07a04f5c1..000000000000 --- a/cocos/audio/mac/CDAudioManager.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/mac/CocosDenshion.h" -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000 - #import -#else - #import "audio/mac/CDXMacOSXSupport.h" -#endif - -/** Different modes of the engine */ -typedef enum { - kAMM_FxOnly, //!Other apps will be able to play audio - kAMM_FxPlusMusic, //!Only this app will play audio - kAMM_FxPlusMusicIfNoOtherAudio, //!If another app is playing audio at start up then allow it to continue and don't play music - kAMM_MediaPlayback, //!This app takes over audio e.g music player app - kAMM_PlayAndRecord //!App takes over audio and has input and output -} tAudioManagerMode; - -/** Possible states of the engine */ -typedef enum { - kAMStateUninitialised, //!Audio manager has not been initialised - do not use - kAMStateInitialising, //!Audio manager is in the process of initialising - do not use - kAMStateInitialised //!Audio manager is initialised - safe to use -} tAudioManagerState; - -typedef enum { - kAMRBDoNothing, //Audio manager will not do anything on resign or becoming active - kAMRBStopPlay, //Background music is stopped on resign and resumed on become active - kAMRBStop //Background music is stopped on resign but not resumed - maybe because you want to do this from within your game -} tAudioManagerResignBehavior; - -/** Notifications */ -extern NSString * const kCDN_AudioManagerInitialised; - -@interface CDAsynchInitialiser : NSOperation {} -@end - -/** CDAudioManager supports two long audio source channels called left and right*/ -typedef enum { - kASC_Left = 0, - kASC_Right = 1 -} tAudioSourceChannel; - -typedef enum { - kLAS_Init, - kLAS_Loaded, - kLAS_Playing, - kLAS_Paused, - kLAS_Stopped, -} tLongAudioSourceState; - -@class CDLongAudioSource; -@protocol CDLongAudioSourceDelegate -@optional -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource; -/** The file used to load the audio source has changed */ -- (void) cdAudioSourceFileDidChange:(CDLongAudioSource *) audioSource; -@end - -/** - CDLongAudioSource represents an audio source that has a long duration which makes - it costly to load into memory for playback as an effect using CDSoundEngine. Examples - include background music and narration tracks. The audio file may or may not be compressed. - Bear in mind that current iDevices can only use hardware to decode a single compressed - audio file at a time and playing multiple compressed files will result in a performance drop - as software decompression will take place. - @since v0.99 - */ -@interface CDLongAudioSource : NSObject { - CCAudioPlayer *audioSourcePlayer; - NSString *audioSourceFilePath; - NSInteger numberOfLoops; - float volume; - id delegate; - BOOL mute; - BOOL enabled_; - BOOL backgroundMusic; - // whether background music is paused - BOOL paused; -@public - BOOL systemPaused;//Used for auto resign handling - NSTimeInterval systemPauseLocation;//Used for auto resign handling -@protected - tLongAudioSourceState state; -} -@property (readonly) CCAudioPlayer *audioSourcePlayer; -@property (readonly) NSString *audioSourceFilePath; -@property (readwrite, nonatomic) NSInteger numberOfLoops; -@property (readwrite, nonatomic) float volume; -@property (assign) id delegate; -/* This long audio source functions as background music */ -@property (readwrite, nonatomic) BOOL backgroundMusic; -@property (readonly) BOOL paused; - -/** Loads the file into the audio source */ --(void) load:(NSString*) filePath; -/** Plays the audio source */ --(void) play; -/** Stops playing the audio source */ --(void) stop; -/** Pauses the audio source */ --(void) pause; -/** Rewinds the audio source */ --(void) rewind; -/** Resumes playing the audio source if it was paused */ --(void) resume; -/** Returns whether or not the audio source is playing */ --(BOOL) isPlaying; - -@end - -/** - CDAudioManager manages audio requirements for a game. It provides access to a CDSoundEngine object - for playing sound effects. It provides access to two CDLongAudioSource object (left and right channel) - for playing long duration audio such as background music and narration tracks. Additionally it manages - the audio session to take care of things like audio session interruption and interacting with the audio - of other apps that are running on the device. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface CDAudioManager : NSObject { - CDSoundEngine *soundEngine; - CDLongAudioSource *backgroundMusic; - NSMutableArray *audioSourceChannels; - NSString* _audioSessionCategory; - BOOL _audioWasPlayingAtStartup; - tAudioManagerMode _mode; - SEL backgroundMusicCompletionSelector; - id backgroundMusicCompletionListener; - BOOL willPlayBackgroundMusic; - BOOL _mute; - BOOL _resigned; - BOOL _interrupted; - BOOL _audioSessionActive; - BOOL enabled_; - - //For handling resign/become active - BOOL _isObservingAppEvents; - tAudioManagerResignBehavior _resignBehavior; -} - -@property (readonly) CDSoundEngine *soundEngine; -@property (readonly) CDLongAudioSource *backgroundMusic; -@property (readonly) BOOL willPlayBackgroundMusic; - -/** Returns the shared singleton */ -+ (CDAudioManager *) sharedManager; -+ (tAudioManagerState) sharedManagerState; -/** Configures the shared singleton with a mode*/ -+ (void) configure: (tAudioManagerMode) mode; -/** Initializes the engine asynchronously with a mode */ -+ (void) initAsynchronously: (tAudioManagerMode) mode; -/** Initializes the engine synchronously with a mode, channel definition and a total number of channels */ -- (id) init: (tAudioManagerMode) mode; --(void) audioSessionInterrupted; --(void) audioSessionResumed; --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle; -/** Returns true is audio is muted at a hardware level e.g user has ringer switch set to off */ --(BOOL) isDeviceMuted; -/** Returns true if another app is playing audio such as the iPod music player */ --(BOOL) isOtherAudioPlaying; -/** Sets the way the audio manager interacts with the operating system such as whether it shares output with other apps or obeys the mute switch */ --(void) setMode:(tAudioManagerMode) mode; -/** Shuts down the shared audio manager instance so that it can be reinitialised */ -+(void) end; - -/** Call if you want to use built in resign behavior but need to do some additional audio processing on resign active. */ -- (void) applicationWillResignActive; -/** Call if you want to use built in resign behavior but need to do some additional audio processing on become active. */ -- (void) applicationDidBecomeActive; - -//New CCAudioPlayer API -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel; -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel; - -//Legacy CCAudioPlayer API -/** Plays music in background. The music can be looped or not - It is recommended to use .aac files as background music since they are decoded by the device (hardware). - */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** Preloads a background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; -/** Stops playing the background music */ --(void) stopBackgroundMusic; -/** Pauses the background music */ --(void) pauseBackgroundMusic; -/** Rewinds the background music */ --(void) rewindBackgroundMusic; -/** Resumes playing the background music */ --(void) resumeBackgroundMusic; -/** Returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector; - -@end - -/** Fader for long audio source objects */ -@interface CDLongAudioSourceFader : CDPropertyModifier{} -@end - -static const int kCDNoBuffer = -1; - -/** Allows buffers to be associated with file names */ -@interface CDBufferManager:NSObject{ - NSMutableDictionary* loadedBuffers; - NSMutableArray *freedBuffers; - CDSoundEngine *soundEngine; - int nextBufferId; -} - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine; --(int) bufferForFile:(NSString*) filePath create:(BOOL) create; --(void) releaseBufferForFile:(NSString *) filePath; - -@end - diff --git a/cocos/audio/mac/CDAudioManager.m b/cocos/audio/mac/CDAudioManager.m deleted file mode 100644 index ced152e4e915..000000000000 --- a/cocos/audio/mac/CDAudioManager.m +++ /dev/null @@ -1,899 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - -#import "audio/mac/CDAudioManager.h" - -NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; - -//NSOperation object used to asynchronously initialise -@implementation CDAsynchInitialiser - --(void) main { - [super main]; - [CDAudioManager sharedManager]; -} - -@end - -@implementation CDLongAudioSource - -@synthesize audioSourcePlayer, audioSourceFilePath, delegate, backgroundMusic, paused; - --(id) init { - if ((self = [super init])) { - state = kLAS_Init; - volume = 1.0f; - mute = NO; - enabled_ = YES; - paused = NO; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDLongAudioSource - deallocating %@", self); - [audioSourcePlayer release]; - [audioSourceFilePath release]; - [super dealloc]; -} - --(void) load:(NSString*) filePath { - //We have already loaded a file previously, check if we are being asked to load the same file - if (state == kLAS_Init || ![filePath isEqualToString:audioSourceFilePath]) { - CDLOGINFO(@"Denshion::CDLongAudioSource - Loading new audio source %@",filePath); - //New file - if (state != kLAS_Init) { - [audioSourceFilePath release];//Release old file path - [audioSourcePlayer release];//Release old CCAudioPlayer, they can't be reused - } - audioSourceFilePath = [filePath copy]; - NSError *error = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:audioSourceFilePath]; - audioSourcePlayer = [(CCAudioPlayer*)[CCAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:&error]; - if (error == nil) { - [audioSourcePlayer prepareToPlay]; - audioSourcePlayer.delegate = self; - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceFileDidChange:)]) { - //Tell our delegate the file has changed - [delegate cdAudioSourceFileDidChange:self]; - } - } else { - CDLOG(@"Denshion::CDLongAudioSource - Error initialising audio player: %@",error); - } - } else { - //Same file - just return it to a consistent state - [self pause]; - [self rewind]; - } - audioSourcePlayer.volume = volume; - audioSourcePlayer.numberOfLoops = numberOfLoops; - state = kLAS_Loaded; -} - --(void) play { - if (enabled_) { - systemPaused = NO; - paused = NO; - [audioSourcePlayer play]; - } else { - CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); - } -} - --(void) stop { - paused = NO; - [audioSourcePlayer stop]; -} - --(void) pause { - paused = YES; - [audioSourcePlayer pause]; -} - --(void) rewind { - paused = NO; - [audioSourcePlayer setCurrentTime:0]; - [audioSourcePlayer play]; -} - --(void) resume { - paused = NO; - [audioSourcePlayer resume]; -} - --(BOOL) isPlaying { - if (state != kLAS_Init) { - return [audioSourcePlayer isPlaying]; - } else { - return NO; - } -} - --(void) setVolume:(float) newVolume -{ - volume = newVolume; - if (state != kLAS_Init && !mute) { - audioSourcePlayer.volume = newVolume; - } -} - --(float) volume -{ - return volume; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute != muteValue) { - if (mute) { - //Turn sound back on - audioSourcePlayer.volume = volume; - } else { - audioSourcePlayer.volume = 0.0f; - } - mute = muteValue; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue != enabled_) { - enabled_ = enabledValue; - if (!enabled_) { - //"Stop" the sounds - [self pause]; - [self rewind]; - } - } -} - --(NSInteger) numberOfLoops { - return numberOfLoops; -} - --(void) setNumberOfLoops:(NSInteger) loopCount -{ - audioSourcePlayer.numberOfLoops = loopCount; - numberOfLoops = loopCount; -} - -- (void)audioPlayerDidFinishPlaying:(CCAudioPlayer *)player successfully:(BOOL)flag { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player finished"); -#if TARGET_IPHONE_SIMULATOR - CDLOGINFO(@"Denshion::CDLongAudioSource - workaround for OpenAL clobbered audio issue"); - //This is a workaround for an issue in all simulators (tested to 3.1.2). Problem is - //that OpenAL audio playback is clobbered when an CCAudioPlayer stops. Workaround - //is to keep the player playing on an endless loop with 0 volume and then when - //it is played again reset the volume and set loop count appropriately. - //NB: this workaround is not foolproof but it is good enough for most situations. - player.numberOfLoops = -1; - player.volume = 0; - [player play]; -#endif - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceDidFinishPlaying:)]) { - [delegate cdAudioSourceDidFinishPlaying:self]; - } -} - --(void)audioPlayerBeginInterruption:(CCAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player interrupted"); -} - --(void)audioPlayerEndInterruption:(CCAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player resumed"); - if (self.backgroundMusic) { - //Check if background music can play as rules may have changed during - //the interruption. This is to address a specific issue in 4.x when - //fast task switching - if([CDAudioManager sharedManager].willPlayBackgroundMusic) { - [player play]; - } - } else { - [player play]; - } -} - -@end - - -@interface CDAudioManager (PrivateMethods) --(BOOL) audioSessionSetActive:(BOOL) active; --(BOOL) audioSessionSetCategory:(NSString*) category; --(void) badAlContextHandler; -@end - - -@implementation CDAudioManager -#define BACKGROUND_MUSIC_CHANNEL kASC_Left - -@synthesize soundEngine, willPlayBackgroundMusic; -static CDAudioManager *sharedManager; -static tAudioManagerState _sharedManagerState = kAMStateUninitialised; -static tAudioManagerMode configuredMode; -static BOOL configured = FALSE; - --(BOOL) audioSessionSetActive:(BOOL) active { - NSError *activationError = nil; - if ([[AVAudioSession sharedInstance] setActive:active error:&activationError]) { - _audioSessionActive = active; - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set active %i succeeded", active); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set active %i failed with error %@", active, activationError); - return NO; - } -} - --(BOOL) audioSessionSetCategory:(NSString*) category { - NSError *categoryError = nil; - if ([[AVAudioSession sharedInstance] setCategory:category error:&categoryError]) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set category %@ succeeded", category); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set category %@ failed with error %@", category, categoryError); - return NO; - } -} - -// Init -+ (CDAudioManager *) sharedManager -{ - @synchronized(self) { - if (!sharedManager) { - if (!configured) { - //Set defaults here - configuredMode = kAMM_FxPlusMusicIfNoOtherAudio; - } - sharedManager = [[CDAudioManager alloc] init:configuredMode]; - _sharedManagerState = kAMStateInitialised;//This is only really relevant when using asynchronous initialisation - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AudioManagerInitialised object:nil]; - } - } - return sharedManager; -} - -+ (tAudioManagerState) sharedManagerState { - return _sharedManagerState; -} - -/** - * Call this to set up audio manager asynchronously. Initialisation is finished when sharedManagerState == kAMStateInitialised - */ -+ (void) initAsynchronously: (tAudioManagerMode) mode { - @synchronized(self) { - if (_sharedManagerState == kAMStateUninitialised) { - _sharedManagerState = kAMStateInitialising; - [CDAudioManager configure:mode]; - CDAsynchInitialiser *initOp = [[[CDAsynchInitialiser alloc] init] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:initOp]; - } - } -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedManager == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - -/* - * Call this method before accessing the shared manager in order to configure the shared audio manager - */ -+ (void) configure: (tAudioManagerMode) mode { - configuredMode = mode; - configured = TRUE; -} - --(BOOL) isOtherAudioPlaying { - UInt32 isPlaying = 0; - UInt32 varSize = sizeof(isPlaying); - AudioSessionGetProperty (kAudioSessionProperty_OtherAudioIsPlaying, &varSize, &isPlaying); - return (isPlaying != 0); -} - --(void) setMode:(tAudioManagerMode) mode { - - _mode = mode; - switch (_mode) { - - case kAMM_FxOnly: - //Share audio with other app - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - break; - - case kAMM_FxPlusMusic: - //Use audio exclusively - if other audio is playing it will be stopped - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - break; - - case kAMM_MediaPlayback: - //Use audio exclusively, ignore mute switch and sleep - CDLOGINFO(@"Denshion::CDAudioManager - Media playback mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_MediaPlayback; - _audioSessionCategory = AVAudioSessionCategoryPlayback; - willPlayBackgroundMusic = YES; - break; - - case kAMM_PlayAndRecord: - //Use audio exclusively, ignore mute switch and sleep, has inputs and outputs - CDLOGINFO(@"Denshion::CDAudioManager - Play and record mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_PlayAndRecord; - _audioSessionCategory = AVAudioSessionCategoryPlayAndRecord; - willPlayBackgroundMusic = YES; - break; - - default: - //kAudioManagerFxPlusMusicIfNoOtherAudio - if ([self isOtherAudioPlaying]) { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is playing audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - } else { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is not playing audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - } - - break; - } - - [self audioSessionSetCategory:_audioSessionCategory]; - -} - -/** - * This method is used to work around various bugs introduced in 4.x OS versions. In some circumstances the - * audio session is interrupted but never resumed, this results in the loss of OpenAL audio when following - * standard practices. If we detect this situation then we will attempt to resume the audio session ourselves. - * Known triggers: lock the device then unlock it (iOS 4.2 gm), playback a song using MPMediaPlayer (iOS 4.0) - */ -- (void) badAlContextHandler { - if (_interrupted && alcGetCurrentContext() == NULL) { - CDLOG(@"Denshion::CDAudioManager - bad OpenAL context detected, attempting to resume audio session"); - [self audioSessionResumed]; - } -} - -- (id) init: (tAudioManagerMode) mode { - if ((self = [super init])) { - - //Initialise the audio session - AVAudioSession* session = [AVAudioSession sharedInstance]; - session.delegate = self; - - _mode = mode; - backgroundMusicCompletionSelector = nil; - _isObservingAppEvents = FALSE; - _mute = NO; - _resigned = NO; - _interrupted = NO; - enabled_ = YES; - _audioSessionActive = NO; - [self setMode:mode]; - soundEngine = [[CDSoundEngine alloc] init]; - - //Set up audioSource channels - audioSourceChannels = [[NSMutableArray alloc] init]; - CDLongAudioSource *leftChannel = [[CDLongAudioSource alloc] init]; - leftChannel.backgroundMusic = YES; - CDLongAudioSource *rightChannel = [[CDLongAudioSource alloc] init]; - rightChannel.backgroundMusic = NO; - [audioSourceChannels insertObject:leftChannel atIndex:kASC_Left]; - [audioSourceChannels insertObject:rightChannel atIndex:kASC_Right]; - [leftChannel release]; - [rightChannel release]; - //Used to support legacy APIs - backgroundMusic = [self audioSourceForChannel:BACKGROUND_MUSIC_CHANNEL]; - backgroundMusic.delegate = self; - - //Add handler for bad al context messages, these are posted by the sound engine. - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(badAlContextHandler) name:kCDN_BadAlContext object:nil]; - - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDAudioManager - deallocating"); - [self stopBackgroundMusic]; - [soundEngine release]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [self audioSessionSetActive:NO]; - [audioSourceChannels release]; - [super dealloc]; -} - -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel -{ - return (CDLongAudioSource*)[audioSourceChannels objectAtIndex:channel]; -} - -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel -{ - CDLongAudioSource *audioSource = [self audioSourceForChannel:channel]; - if (audioSource) { - [audioSource load:filePath]; - } - return audioSource; -} - --(BOOL) isBackgroundMusicPlaying { - return [self.backgroundMusic isPlaying]; -} - -//NB: originally I tried using a route change listener and intended to store the current route, -//however, on a 3gs running 3.1.2 no route change is generated when the user switches the -//ringer mute switch to off (i.e. enables sound) therefore polling is the only reliable way to -//determine ringer switch state --(BOOL) isDeviceMuted { - -#if TARGET_IPHONE_SIMULATOR - //Calling audio route stuff on the simulator causes problems - return NO; -#else - CFStringRef newAudioRoute; - UInt32 propertySize = sizeof (CFStringRef); - - AudioSessionGetProperty ( - kAudioSessionProperty_AudioRoute, - &propertySize, - &newAudioRoute - ); - - if (newAudioRoute == NULL) { - //Don't expect this to happen but playing safe otherwise a null in the CFStringCompare will cause a crash - return YES; - } else { - CFComparisonResult newDeviceIsMuted = CFStringCompare ( - newAudioRoute, - (CFStringRef) @"", - 0 - ); - - return (newDeviceIsMuted == kCFCompareEqualTo); - } -#endif -} - -#pragma mark Audio Interrupt Protocol - --(BOOL) mute { - return _mute; -} - --(void) setMute:(BOOL) muteValue { - if (muteValue != _mute) { - _mute = muteValue; - [soundEngine setMute:muteValue]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.mute = muteValue; - } - } -} - --(BOOL) enabled { - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue { - if (enabledValue != enabled_) { - enabled_ = enabledValue; - [soundEngine setEnabled:enabled_]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.enabled = enabled_; - } - } -} - --(CDLongAudioSource*) backgroundMusic -{ - return backgroundMusic; -} - -//Load background music ready for playing --(void) preloadBackgroundMusic:(NSString*) filePath -{ - [self.backgroundMusic load:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [self.backgroundMusic load:filePath]; - - if (loop) { - [self.backgroundMusic setNumberOfLoops:-1]; - } else { - [self.backgroundMusic setNumberOfLoops:0]; - } - - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - play bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - [self.backgroundMusic play]; -} - --(void) stopBackgroundMusic -{ - [self.backgroundMusic stop]; -} - --(void) pauseBackgroundMusic -{ - [self.backgroundMusic pause]; -} - --(void) resumeBackgroundMusic -{ - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - resume bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - if (![self.backgroundMusic paused]) { - return; - } - - [self.backgroundMusic resume]; -} - --(void) rewindBackgroundMusic -{ - [self.backgroundMusic rewind]; -} - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector { - backgroundMusicCompletionListener = listener; - backgroundMusicCompletionSelector = selector; -} - -/* - * Call this method to have the audio manager automatically handle application resign and - * become active. Pass a tAudioManagerResignBehavior to indicate the desired behavior - * for resigning and becoming active again. - * - * If autohandle is YES then the applicationWillResignActive and applicationDidBecomActive - * methods are automatically called, otherwise you must call them yourself at the appropriate time. - * - * Based on idea of Dominique Bongard - */ --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle { - - if (!_isObservingAppEvents && autoHandle) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) name:@"UIApplicationWillResignActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:@"UIApplicationDidBecomeActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:@"UIApplicationWillTerminateNotification" object:nil]; - _isObservingAppEvents = TRUE; - } - _resignBehavior = resignBehavior; -} - -- (void) applicationWillResignActive { - _resigned = YES; - - //Set the audio session to one that allows sharing so that other audio won't be clobbered on resume - [self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; - - switch (_resignBehavior) { - - case kAMRBStopPlay: - - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (audioSource.isPlaying) { - audioSource->systemPaused = YES; - audioSource->systemPauseLocation = audioSource.audioSourcePlayer.currentTime; - [audioSource stop]; - } else { - //Music is either paused or stopped, if it is paused it will be restarted - //by OS so we will stop it. - audioSource->systemPaused = NO; - [audioSource stop]; - } - } - break; - - case kAMRBStop: - //Stop music regardless of whether it is playing or not because if it was paused - //then the OS would resume it - for( CDLongAudioSource *audioSource in audioSourceChannels) { - [audioSource stop]; - } - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - handled resign active"); -} - -//Called when application resigns active only if setResignBehavior has been called -- (void) applicationWillResignActive:(NSNotification *) notification -{ - [self applicationWillResignActive]; -} - -- (void) applicationDidBecomeActive { - - if (_resigned) { - _resigned = NO; - //Reset the mode incase something changed with audio while we were inactive - [self setMode:_mode]; - switch (_resignBehavior) { - - case kAMRBStopPlay: - - //Music had been stopped but stop maintains current time - //so playing again will continue from where music was before resign active. - //We check if music can be played because while we were inactive the user might have - //done something that should force music to not play such as starting a track in the iPod - if (self.willPlayBackgroundMusic) { - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (audioSource->systemPaused) { - [audioSource resume]; - audioSource->systemPaused = NO; - } - } - } - break; - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handled become active"); - } -} - -//Called when application becomes active only if setResignBehavior has been called -- (void) applicationDidBecomeActive:(NSNotification *) notification -{ - [self applicationDidBecomeActive]; -} - -//Called when application terminates only if setResignBehavior has been called -- (void) applicationWillTerminate:(NSNotification *) notification -{ - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handling terminate"); - [self stopBackgroundMusic]; -} - -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource { - CDLOGINFO(@"Denshion::CDAudioManager - audio manager got told background music finished"); - if (backgroundMusicCompletionSelector != nil) { - [backgroundMusicCompletionListener performSelector:backgroundMusicCompletionSelector]; - } -} - --(void) beginInterruption { - CDLOGINFO(@"Denshion::CDAudioManager - begin interruption"); - [self audioSessionInterrupted]; -} - --(void) endInterruption { - CDLOGINFO(@"Denshion::CDAudioManager - end interruption"); - [self audioSessionResumed]; -} - -#if __CC_PLATFORM_IOS >= 40000 --(void) endInterruptionWithFlags:(NSUInteger)flags { - CDLOGINFO(@"Denshion::CDAudioManager - interruption ended with flags %i",flags); - if (flags == AVAudioSessionInterruptionFlags_ShouldResume) { - [self audioSessionResumed]; - } -} -#endif - --(void)audioSessionInterrupted -{ - if (!_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session interrupted"); - _interrupted = YES; - - // Deactivate the current audio session - [self audioSessionSetActive:NO]; - - if (alcGetCurrentContext() != NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Setting OpenAL context to NULL"); - - ALenum error = AL_NO_ERROR; - - // set the current context to NULL will 'shutdown' openAL - alcMakeContextCurrent(NULL); - - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current %x\n", error); - } - #pragma unused(error) - } - } -} - --(void)audioSessionResumed -{ - if (_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session resumed"); - _interrupted = NO; - - BOOL activationResult = NO; - // Reactivate the current audio session - activationResult = [self audioSessionSetActive:YES]; - - //This code is to handle a problem with iOS 4.0 and 4.01 where reactivating the session can fail if - //task switching is performed too rapidly. A test case that reliably reproduces the issue is to call the - //iPhone and then hang up after two rings (timing may vary ;)) - //Basically we keep waiting and trying to let the OS catch up with itself but the number of tries is - //limited. - if (!activationResult) { - CDLOG(@"Denshion::CDAudioManager - Failure reactivating audio session, will try wait-try cycle"); - int activateCount = 0; - while (!activationResult && activateCount < 10) { - [NSThread sleepForTimeInterval:0.5]; - activationResult = [self audioSessionSetActive:YES]; - activateCount++; - CDLOGINFO(@"Denshion::CDAudioManager - Reactivation attempt %i status = %i",activateCount,activationResult); - } - } - - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Restoring OpenAL context"); - ALenum error = AL_NO_ERROR; - // Restore open al context - alcMakeContextCurrent([soundEngine openALContext]); - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current%x\n", error); - } - #pragma unused(error) - } - } -} - -+(void) end { - [sharedManager release]; - sharedManager = nil; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDLongAudioSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDLongAudioSource*)target).volume = newVal; -} - --(float) _getTargetProperty { - return ((CDLongAudioSource*)target).volume; -} - --(void) _stopTarget { - //Pause instead of stop as stop releases resources and causes problems in the simulator - [((CDLongAudioSource*)target) pause]; -} - --(Class) _allowableType { - return [CDLongAudioSource class]; -} - -@end -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDBufferManager - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - soundEngine = theSoundEngine; - loadedBuffers = [[NSMutableDictionary alloc] initWithCapacity:CD_BUFFERS_START]; - freedBuffers = [[NSMutableArray alloc] init]; - nextBufferId = 0; - } - return self; -} - --(void) dealloc { - [loadedBuffers release]; - [freedBuffers release]; - [super dealloc]; -} - --(int) bufferForFile:(NSString*) filePath create:(BOOL) create { - - NSNumber* soundId = (NSNumber*)[loadedBuffers objectForKey:filePath]; - if(soundId == nil) - { - if (create) { - NSNumber* bufferId = nil; - //First try to get a buffer from the free buffers - if ([freedBuffers count] > 0) { - bufferId = [[[freedBuffers lastObject] retain] autorelease]; - [freedBuffers removeLastObject]; - CDLOGINFO(@"Denshion::CDBufferManager reusing buffer id %i",[bufferId intValue]); - } else { - bufferId = [[NSNumber alloc] initWithInt:nextBufferId]; - [bufferId autorelease]; - CDLOGINFO(@"Denshion::CDBufferManager generating new buffer id %i",[bufferId intValue]); - nextBufferId++; - } - - if ([soundEngine loadBuffer:[bufferId intValue] filePath:filePath]) { - //File successfully loaded - CDLOGINFO(@"Denshion::CDBufferManager buffer loaded %@ %@",bufferId,filePath); - [loadedBuffers setObject:bufferId forKey:filePath]; - return [bufferId intValue]; - } else { - //File didn't load, put buffer id on free list - [freedBuffers addObject:bufferId]; - return kCDNoBuffer; - } - } else { - //No matching buffer was found - return kCDNoBuffer; - } - } else { - return [soundId intValue]; - } -} - --(void) releaseBufferForFile:(NSString *) filePath { - int bufferId = [self bufferForFile:filePath create:NO]; - if (bufferId != kCDNoBuffer) { - [soundEngine unloadBuffer:bufferId]; - [loadedBuffers removeObjectForKey:filePath]; - NSNumber *freedBufferId = [[NSNumber alloc] initWithInt:bufferId]; - [freedBufferId autorelease]; - [freedBuffers addObject:freedBufferId]; - } -} -@end - - - diff --git a/cocos/audio/mac/CDConfig.h b/cocos/audio/mac/CDConfig.h deleted file mode 100644 index 2bd8f760c19d..000000000000 --- a/cocos/audio/mac/CDConfig.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ -#define COCOSDENSHION_VERSION "Aphex.rc" - - -/** - If enabled code useful for debugging such as parameter check assertions will be performed. - If you experience any problems you should enable this and test your code with a debug build. - */ -//#define CD_DEBUG 1 - -/** - The total number of sounds/buffers that can be loaded assuming memory is sufficient - */ -//Number of buffers slots that will be initially created -#define CD_BUFFERS_START 64 -//Number of buffers that will be added -#define CD_BUFFERS_INCREMENT 16 - -/** - If enabled, OpenAL code will use static buffers. When static buffers are used the audio - data is managed outside of OpenAL, this eliminates a memcpy operation which leads to - higher performance when loading sounds. - - However, the downside is that when the audio data is freed you must - be certain that it is no longer being accessed otherwise your app will crash. Testing on OS 2.2.1 - and 3.1.2 has shown that this may occur if a buffer is being used by a source with state = AL_PLAYING - when the buffer is deleted. If the data is freed too quickly after the source is stopped then - a crash will occur. The implemented workaround is that when static buffers are used the unloadBuffer code will wait for - any playing sources to finish playing before the associated buffer and data are deleted, however, this delay may negate any - performance gains that are achieved during loading. - - Performance tests on a 1st gen iPod running OS 2.2.1 loading the CocosDenshionDemo sounds were ~0.14 seconds without - static buffers and ~0.12 seconds when using static buffers. - - */ -//#define CD_USE_STATIC_BUFFERS 1 - - diff --git a/cocos/audio/mac/CDOpenALSupport.h b/cocos/audio/mac/CDOpenALSupport.h deleted file mode 100644 index aeac861c96c1..000000000000 --- a/cocos/audio/mac/CDOpenALSupport.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id$ - */ - -/* - This file contains code from version 1.1 and 1.4 of MyOpenALSupport.h taken from Apple's oalTouch version. - The 1.4 version code is used for loading IMA4 files, however, this code causes very noticeable clicking - when used to load wave files that are looped so the 1.1 version code is used specifically for loading - wav files. - */ - -#ifndef __CD_OPENAL_H -#define __CD_OPENAL_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#import -#import -#import - - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/cocos/audio/mac/CDOpenALSupport.m b/cocos/audio/mac/CDOpenALSupport.m deleted file mode 100644 index 5603c9da2891..000000000000 --- a/cocos/audio/mac/CDOpenALSupport.m +++ /dev/null @@ -1,248 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id: CDOpenALSupport.h 16 2010-03-11 06:22:10Z steveoldmeadow $ - */ - -#import "audio/mac/CDOpenALSupport.h" -#import "audio/mac/CocosDenshion.h" -#import -#import - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus err = noErr; - UInt64 fileDataSize = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - AudioFileID afid = 0; - void* theData = NULL; - - // Open a file with ExtAudioFileOpen() - err = AudioFileOpenURL(inFileURL, kAudioFileReadPermission, 0, &afid); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileOpenURL FAILED, Error = %ld\n", err); goto Exit; } - - // Get the audio data format - err = AudioFileGetProperty(afid, kAudioFilePropertyDataFormat, &thePropertySize, &theFileFormat); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFileProperty_DataFormat) FAILED, Error = %ld\n", err); goto Exit; } - - if (theFileFormat.mChannelsPerFrame > 2) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); goto Exit; - } - - if ((theFileFormat.mFormatID != kAudioFormatLinearPCM) || (!TestAudioFormatNativeEndian(theFileFormat))) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be little-endian PCM\n"); goto Exit; - } - - if ((theFileFormat.mBitsPerChannel != 8) && (theFileFormat.mBitsPerChannel != 16)) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be 8 or 16 bit PCM\n"); goto Exit; - } - - - thePropertySize = sizeof(fileDataSize); - err = AudioFileGetProperty(afid, kAudioFilePropertyAudioDataByteCount, &thePropertySize, &fileDataSize); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFilePropertyAudioDataByteCount) FAILED, Error = %ld\n", err); goto Exit; } - - // Read all the data into memory - UInt32 dataSize = (UInt32)fileDataSize; - theData = malloc(dataSize); - if (theData) - { - memset(theData, 0, dataSize); - AudioFileReadBytes(afid, false, 0, &dataSize, theData); - if(err == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - //This fix was added by me, however, 8 bit sounds have a clipping sound at the end so aren't really usable (SO) - if (theFileFormat.mBitsPerChannel == 16) { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - } else { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO8 : AL_FORMAT_MONO8; - } - *outSampleRate = (ALsizei)theFileFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", err); goto Exit; - } - } - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (afid) AudioFileClose(afid); - return theData; -} - -//Taken from oalTouch MyOpenALSupport 1.4 -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus status = noErr; - BOOL abort = NO; - SInt64 theFileLengthInFrames = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - ExtAudioFileRef extRef = NULL; - void* theData = NULL; - AudioStreamBasicDescription theOutputFormat; - UInt32 dataSize = 0; - - // Open a file with ExtAudioFileOpen() - status = ExtAudioFileOpenURL(inFileURL, &extRef); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileOpenURL FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the audio data format - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - if (theFileFormat.mChannelsPerFrame > 2) - { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); - abort = YES; - } - if (abort) - goto Exit; - - // Set the client format to 16 bit signed integer (native-endian) data - // Maintain the channel count and sample rate of the original source format - theOutputFormat.mSampleRate = theFileFormat.mSampleRate; - theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame; - - theOutputFormat.mFormatID = kAudioFormatLinearPCM; - theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mFramesPerPacket = 1; - theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mBitsPerChannel = 16; - theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; - - // Set the desired client (output) data format - status = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &theOutputFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the total frame count - thePropertySize = sizeof(theFileLengthInFrames); - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Read all the data into memory - dataSize = (UInt32) theFileLengthInFrames * theOutputFormat.mBytesPerFrame; - theData = malloc(dataSize); - if (theData) - { - memset(theData, 0, dataSize); - AudioBufferList theDataBuffer; - theDataBuffer.mNumberBuffers = 1; - theDataBuffer.mBuffers[0].mDataByteSize = dataSize; - theDataBuffer.mBuffers[0].mNumberChannels = theOutputFormat.mChannelsPerFrame; - theDataBuffer.mBuffers[0].mData = theData; - - // Read the data into an AudioBufferList - status = ExtAudioFileRead(extRef, (UInt32*)&theFileLengthInFrames, &theDataBuffer); - if(status == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - *outDataFormat = (theOutputFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - *outSampleRate = (ALsizei)theOutputFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", status); - abort = YES; - } - } - if (abort) - goto Exit; - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (extRef) ExtAudioFileDispose(extRef); - return theData; -} - -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) { - - CFStringRef extension = CFURLCopyPathExtension(inFileURL); - CFComparisonResult isWavFile = 0; - if (extension != NULL) { - isWavFile = CFStringCompare (extension,(CFStringRef)@"wav", kCFCompareCaseInsensitive); - CFRelease(extension); - } - - if (isWavFile == kCFCompareEqualTo) { - return CDloadWaveAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } else { - return CDloadCafAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } -} - diff --git a/cocos/audio/mac/CDXMacOSXSupport.h b/cocos/audio/mac/CDXMacOSXSupport.h deleted file mode 100644 index eaa97f2e3465..000000000000 --- a/cocos/audio/mac/CDXMacOSXSupport.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -/** - A set of proxy classes to allow iOS audio code to run on MacOS X. CCAudioPlayer is implemented using NSSound. - AVAudioSession is a "do nothing" class as it isn't really relevant on MacOS X. - - Limitations: - CCAudioPlayer numberOfLoops not correctly supported. Looping is either on or off, can not specify a specific number of loops. - CCAudioPlayer panning not supported. - CCAudioPlayer metering not supported. - AVAudioSession nothing is supported, not applicable to MacOS X. - */ - -#import -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - -#import -#import - -enum AudioSessionProperties { - kAudioSessionProperty_OtherAudioIsPlaying, - kAudioSessionProperty_AudioRoute -}; -#ifdef __cplusplus -extern "C" { -#endif - -extern OSStatus AudioSessionGetProperty(UInt32 inID, UInt32 *ioDataSize, void *outData); - -#ifdef __cplusplus -} -#endif -/** - Based on AVAudioPlayer.h header in AVFoundation headers - */ -@class NSData, NSURL, NSError, NSDictionary; -@protocol AVAudioPlayerDelegate; - -/* This class is available with iPhone 2.2 or later */ -@interface CCAudioPlayer : NSObject { - - // properties - id delegate; - NSUInteger numberOfChannels; - BOOL playing; - NSTimeInterval duration; - NSURL *url; - NSData *data; - float pan; - float volume; - NSTimeInterval currentTime; - NSTimeInterval deviceCurrentTime; - NSInteger numberOfLoops; - BOOL meteringEnabled; - - -@private - NSSound* _player; -} - -/* For all of these init calls, if a return value of nil is given you can check outError to see what the problem was. - If not nil, then the object is usable for playing - */ - -/* all data must be in the form of an audio file understood by CoreAudio */ -- (id)initWithContentsOfURL:(NSURL *)theUrl error:(NSError **)outError; -- (id)initWithData:(NSData *)theData error:(NSError **)outError; - -/* transport control */ -/* methods that return BOOL return YES on success and NO on failure. */ -- (BOOL)prepareToPlay; /* get ready to play the sound. happens automatically on play. */ -- (BOOL)play; /* sound is played asynchronously. */ -- (BOOL)playAtTime:(NSTimeInterval) time; /* play a sound some time in the future. time should be greater than deviceCurrentTime. */ -- (void)pause; /* pauses playback, but remains ready to play. */ -- (void)stop; /* stops playback. no longer ready to play. */ -- (BOOL) resume; - -/* properties */ - -@property(readonly, getter=isPlaying) BOOL playing; - -@property(readonly) NSUInteger numberOfChannels; -@property(readonly) NSTimeInterval duration; /* the duration of the sound. */ - -@property(assign) id delegate; /* the delegate will be sent playerDidFinishPlaying */ - -/* one of these three properties will be non-nil based on the init... method used */ -@property(readonly) NSURL *url; /* returns nil if object was not created with a URL */ -@property(readonly) NSData *data; /* returns nil if object was not created with a data object */ -@property float pan; /* set panning. -1.0 is left, 0.0 is center, 1.0 is right. */ -@property float volume; /* The volume for the sound. The nominal range is from 0.0 to 1.0. */ - -/* If the sound is playing, currentTime is the offset into the sound of the current playback position. - If the sound is not playing, currentTime is the offset into the sound where playing would start. */ -@property NSTimeInterval currentTime; - -/* returns the current time associated with the output device */ -@property(readonly) NSTimeInterval deviceCurrentTime; - -/* "numberOfLoops" is the number of times that the sound will return to the beginning upon reaching the end. - A value of zero means to play the sound just once. - A value of one will result in playing the sound twice, and so on.. - Any negative number will loop indefinitely until stopped. - */ -@property NSInteger numberOfLoops; - -/* metering */ - -@property(getter=isMeteringEnabled) BOOL meteringEnabled; /* turns level metering on or off. default is off. */ - -- (void)updateMeters; /* call to refresh meter values */ -- (float)peakPowerForChannel:(NSUInteger)channelNumber; /* returns peak power in decibels for a given channel */ -- (float)averagePowerForChannel:(NSUInteger)channelNumber; /* returns average power in decibels for a given channel */ - -@end - -/* A protocol for delegates of CCAudioPlayer */ -@protocol AVAudioPlayerDelegate -@optional -/* audioPlayerDidFinishPlaying:successfully: is called when a sound has finished playing. This method is NOT called if the player is stopped due to an interruption. */ -- (void)audioPlayerDidFinishPlaying:(CCAudioPlayer *)player successfully:(BOOL)flag; - -/* if an error occurs while decoding it will be reported to the delegate. */ -- (void)audioPlayerDecodeErrorDidOccur:(CCAudioPlayer *)player error:(NSError *)error; - -/* audioPlayerBeginInterruption: is called when the audio session has been interrupted while the player was playing. The player will have been paused. */ -- (void)audioPlayerBeginInterruption:(CCAudioPlayer *)player; - -/* audioPlayerEndInterruption:withFlags: is called when the audio session interruption has ended and this player had been interrupted while playing. */ -/* Currently the only flag is AVAudioSessionInterruptionFlags_ShouldResume. */ -- (void)audioPlayerEndInterruption:(CCAudioPlayer *)player withFlags:(NSUInteger)flags; - -/* audioPlayerEndInterruption: is called when the preferred method, audioPlayerEndInterruption:withFlags:, is not implemented. */ -- (void)audioPlayerEndInterruption:(CCAudioPlayer *)player; -@end - - -/** - Taken from AVAudioSession.h header in AVFoundation headers - */ - -/* This protocol is available with iPhone 3.0 or later */ -@protocol AVAudioSessionDelegate; -@class NSError, NSString; - -/* values for the category property */ -extern NSString *const AVAudioSessionCategoryAmbient; -extern NSString *const AVAudioSessionCategorySoloAmbient; -extern NSString *const AVAudioSessionCategoryPlayback; -extern NSString *const AVAudioSessionCategoryRecord; -extern NSString *const AVAudioSessionCategoryPlayAndRecord; -extern NSString *const AVAudioSessionCategoryAudioProcessing; - -enum { - AVAudioSessionInterruptionFlags_ShouldResume = 1 -}; - -enum { - AVAudioSessionSetActiveFlags_NotifyOthersOnDeactivation = 1 -}; - -@interface AVAudioSession : NSObject { - - // properties - NSString* category; - double preferredHardwareSampleRate; - NSTimeInterval preferredIOBufferDuration; - - BOOL inputIsAvailable; - double currentHardwareSampleRate; - NSInteger currentHardwareInputNumberOfChannels; - NSInteger currentHardwareOutputNumberOfChannels; - id delegate; - -@private - __strong void *_impl; -} - -/* returns singleton instance */ -+ (id)sharedInstance; - -@property(assign) id delegate; - -- (BOOL)setActive:(BOOL)beActive error:(NSError**)outError; -- (BOOL)setActive:(BOOL)beActive withFlags:(NSInteger)flags error:(NSError**)outError; - -- (BOOL)setCategory:(NSString*)theCategory error:(NSError**)outError; -- (BOOL)setPreferredHardwareSampleRate:(double)sampleRate error:(NSError**)outError; -- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration error:(NSError**)outError; - -@property(readonly) NSString* category; -@property(readonly) double preferredHardwareSampleRate; -@property(readonly) NSTimeInterval preferredIOBufferDuration; - -@property(readonly) BOOL inputIsAvailable; -@property(readonly) double currentHardwareSampleRate; -@property(readonly) NSInteger currentHardwareInputNumberOfChannels; -@property(readonly) NSInteger currentHardwareOutputNumberOfChannels; - -@end - - -/* A protocol for delegates of AVAudioSession */ -@protocol AVAudioSessionDelegate -@optional - -- (void)beginInterruption; - -- (void)endInterruptionWithFlags:(NSUInteger)flags; - -- (void)endInterruption; /* endInterruptionWithFlags: will be called instead if implemented. */ - -- (void)inputIsAvailableChanged:(BOOL)isInputAvailable; -@end - -#endif diff --git a/cocos/audio/mac/CDXMacOSXSupport.mm b/cocos/audio/mac/CDXMacOSXSupport.mm deleted file mode 100644 index 8799eb90dfb4..000000000000 --- a/cocos/audio/mac/CDXMacOSXSupport.mm +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - -#import "audio/mac/CDXMacOSXSupport.h" -#import "audio/include/SimpleAudioEngine.h" -#import "audio/mac/CocosDenshion.h" - -NSString * const AVAudioSessionCategoryAmbient = @"AVAudioSessionCategoryAmbient"; -NSString *const AVAudioSessionCategorySoloAmbient = @"AVAudioSessionCategorySoloAmbient"; -NSString *const AVAudioSessionCategoryPlayback = @"AVAudioSessionCategoryPlayback"; -NSString *const AVAudioSessionCategoryRecord = @"AVAudioSessionCategoryRecord"; -NSString *const AVAudioSessionCategoryPlayAndRecord = @"AVAudioSessionCategoryPlayAndRecord"; -NSString *const AVAudioSessionCategoryAudioProcessing = @"AVAudioSessionCategoryAudioProcessing"; - -OSStatus AudioSessionGetProperty(UInt32 inID, UInt32 *ioDataSize, void *outData) { - //TODO: set outData appropriately - return 0; -} - -@implementation CCAudioPlayer - -@synthesize delegate, numberOfChannels, pan, deviceCurrentTime, url, data; - -- (id)initWithContentsOfURL:(NSURL *)theUrl error:(NSError **)outError { - if ((self = [super init])) { - _player = [[NSSound alloc] initWithContentsOfURL:theUrl byReference:YES]; - if (_player != nil) { - _player.delegate = self; - CDLOG(@"Denshion::CDXMacOSXSupport - NSSound allocated for %@", theUrl); - } - } - return self; -} - -- (id)initWithData:(NSData *)theData error:(NSError **)outError { - if ((self = [super init])) { - _player = [[NSSound alloc] initWithData:theData]; - if (_player != nil) { - _player.delegate = self; - CDLOG(@"Denshion::CDXMacOSXSupport - NSSound allocated for %@", theData); - } - } - return self; -} - - --(void) dealloc { - [_player release]; - [super dealloc]; -} - -- (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)finished { - if (self.delegate && [self.delegate respondsToSelector:@selector(audioPlayerDidFinishPlaying:successfully:)]) { - [self.delegate audioPlayerDidFinishPlaying:self successfully:finished]; - } -} - -- (BOOL)play { - BOOL result; - result = [_player play]; - if (!result) { - //May be paused, try resuming instead - result = [_player resume]; - } - return result; -} - -- (BOOL) resume{ - BOOL result = [_player resume]; - return result; -} - - --(void) pause { - [_player pause]; -} - --(void) stop { - [_player stop]; -} - --(BOOL) isPlaying { - return [_player isPlaying]; -} - --(void) setVolume:(float) vol { - [_player setVolume:vol]; -} - --(float) volume { - return [_player volume]; -} - --(void) setNumberOfLoops:(NSInteger) nOfLoops { - if (nOfLoops < 0) { - [_player setLoops:YES]; - } else { - [_player setLoops:NO]; - } -} - --(NSInteger) numberOfLoops { - if (_player.loops) { - return -1; - } else { - return 0; - } -} - --(void) setCurrentTime:(NSTimeInterval) aCurrentTime { - [_player setCurrentTime:aCurrentTime]; -} - --(NSTimeInterval) currentTime { - return [_player currentTime]; -} - --(NSTimeInterval) duration { - return [_player duration]; -} - -#pragma mark unsupported -- (BOOL)prepareToPlay { - return YES; -} --(BOOL)playAtTime:(NSTimeInterval)time { - return YES; -} --(void) setMeteringEnabled:(BOOL) enabled { -} --(BOOL) isMeteringEnabled { - return NO; -} -- (void)updateMeters{} -- (float)peakPowerForChannel:(NSUInteger)channelNumber{return 0.0f;} -- (float)averagePowerForChannel:(NSUInteger)channelNumber{return 0.0f;} -@end - -/** - A "do nothing" implementation - AVAudioSession is not really relevant to Mac OS X. - */ -@implementation AVAudioSession -@synthesize delegate, category, preferredHardwareSampleRate, preferredIOBufferDuration; -@synthesize inputIsAvailable, currentHardwareSampleRate, currentHardwareInputNumberOfChannels, currentHardwareOutputNumberOfChannels; - -+ (id)sharedInstance { - return nil; -} - -- (BOOL)setActive:(BOOL)beActive error:(NSError**)outError {return YES;} -- (BOOL)setActive:(BOOL)beActive withFlags:(NSInteger)flags error:(NSError**)outError {return YES;} -- (BOOL)setCategory:(NSString*)theCategory error:(NSError**)outError {return YES;} -- (BOOL)setPreferredHardwareSampleRate:(double)sampleRate error:(NSError**)outError {return YES;} -- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration error:(NSError**)outError {return YES;} - -@end -#endif diff --git a/cocos/audio/mac/CocosDenshion.h b/cocos/audio/mac/CocosDenshion.h deleted file mode 100644 index ed25c32e9ce7..000000000000 --- a/cocos/audio/mac/CocosDenshion.h +++ /dev/null @@ -1,448 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - - -/** -@file -@b IMPORTANT -There are 3 different ways of using CocosDenshion. Depending on which you choose you -will need to include different files and frameworks. - -@par SimpleAudioEngine -This is recommended for basic audio requirements. If you just want to play some sound fx -and some background music and have no interest in learning the lower level workings then -this is the interface to use. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDAudioManager -CDAudioManager is basically a thin wrapper around an CCAudioPlayer object used for playing -background music and a CDSoundEngine object used for playing sound effects. It manages the -audio session for you deals with audio session interruption. It is fairly low level and it -is expected you have some understanding of the underlying technologies. For example, for -many use cases regarding background music it is expected you will work directly with the -backgroundMusic CCAudioPlayer which is exposed as a property. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDSoundEngine -CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch -example. It can playback up to 32 sounds simultaneously with control over pitch, pan -and gain. It can be set up to handle audio session interruption automatically. You -may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine -because you require OS 2.0 compatibility. - -Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - -*/ - -#import -#import -#import -#import -#import "audio/mac/CDConfig.h" - - -#if !defined(CD_DEBUG) || CD_DEBUG == 0 -#define CDLOG(...) do {} while (0) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG == 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG > 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) NSLog(__VA_ARGS__) -#endif // CD_DEBUG - - -#import "audio/mac/CDOpenALSupport.h" - -//Tested source limit on 2.2.1 and 3.1.2 with up to 128 sources and appears to work. Older OS versions e.g 2.2 may support only 32 -#define CD_SOURCE_LIMIT 32 //Total number of sources we will ever want, may actually get less -#define CD_NO_SOURCE 0xFEEDFAC //Return value indicating playback failed i.e. no source -#define CD_IGNORE_AUDIO_SESSION 0xBEEFBEE //Used internally to indicate audio session will not be handled -#define CD_MUTE 0xFEEDBAB //Return value indicating sound engine is muted or non functioning -#define CD_NO_SOUND = -1; - -#define CD_SAMPLE_RATE_HIGH 44100 -#define CD_SAMPLE_RATE_MID 22050 -#define CD_SAMPLE_RATE_LOW 16000 -#define CD_SAMPLE_RATE_BASIC 8000 -#define CD_SAMPLE_RATE_DEFAULT 44100 - -extern NSString * const kCDN_BadAlContext; -extern NSString * const kCDN_AsynchLoadComplete; - -extern float const kCD_PitchDefault; -extern float const kCD_PitchLowerOneOctave; -extern float const kCD_PitchHigherOneOctave; -extern float const kCD_PanDefault; -extern float const kCD_PanFullLeft; -extern float const kCD_PanFullRight; -extern float const kCD_GainDefault; - -enum bufferState { - CD_BS_EMPTY = 0, - CD_BS_LOADED = 1, - CD_BS_FAILED = 2 -}; - -typedef struct _sourceGroup { - int startIndex; - int currentIndex; - int totalSources; - bool enabled; - bool nonInterruptible; - int *sourceStatuses;//pointer into array of source status information -} sourceGroup; - -typedef struct _bufferInfo { - ALuint bufferId; - int bufferState; - void* bufferData; - ALenum format; - ALsizei sizeInBytes; - ALsizei frequencyInHertz; -} bufferInfo; - -typedef struct _sourceInfo { - bool usable; - ALuint sourceId; - ALuint attachedBufferId; -} sourceInfo; - -#pragma mark CDAudioTransportProtocol - -@protocol CDAudioTransportProtocol -/** Play the audio */ --(BOOL) play; -/** Pause the audio, retain resources */ --(BOOL) pause; -/** Stop the audio, release resources */ --(BOOL) stop; -/** Return playback to beginning */ --(BOOL) rewind; -@end - -#pragma mark CDAudioInterruptProtocol - -@protocol CDAudioInterruptProtocol -/** Is audio mute */ --(BOOL) mute; -/** If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently */ --(void) setMute:(BOOL) muteValue; -/** Is audio enabled */ --(BOOL) enabled; -/** If NO then all audio is stopped and any calls to start new audio will be ignored */ --(void) setEnabled:(BOOL) enabledValue; -@end - -#pragma mark CDUtilities -/** - Collection of utilities required by CocosDenshion - */ -@interface CDUtilities : NSObject -{ -} - -/** Fundamentally the same as the corresponding method is FileUtils but added to break binding to cocos2d */ -+(NSString*) fullPathFromRelativePath:(NSString*) relPath; - -@end - - -#pragma mark CDSoundEngine - -/** CDSoundEngine is built upon OpenAL and works with SDK 2.0. - CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch - example. It can playback up to 32 sounds simultaneously with control over pitch, pan - and gain. It can be set up to handle audio session interruption automatically. You - may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine - because you require OS 2.0 compatibility. - - Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - - @since v0.8 - */ -@class CDSoundSource; -@interface CDSoundEngine : NSObject { - - bufferInfo *_buffers; - sourceInfo *_sources; - sourceGroup *_sourceGroups; - ALCcontext *context; - NSUInteger _sourceGroupTotal; - UInt32 _audioSessionCategory; - BOOL _handleAudioSession; - ALfloat _preMuteGain; - NSObject *_mutexBufferLoad; - BOOL mute_; - BOOL enabled_; - - ALenum lastErrorCode_; - BOOL functioning_; - float asynchLoadProgress_; - BOOL getGainWorks_; - - //For managing dynamic allocation of sources and buffers - int sourceTotal_; - int bufferTotal; - -} - -@property (readwrite, nonatomic) ALfloat masterGain; -@property (readonly) ALenum lastErrorCode;//Last OpenAL error code that was generated -@property (readonly) BOOL functioning;//Is the sound engine functioning -@property (readwrite) float asynchLoadProgress; -@property (readonly) BOOL getGainWorks;//Does getting the gain for a source work -/** Total number of sources available */ -@property (readonly) int sourceTotal; -/** Total number of source groups that have been defined */ -@property (readonly) NSUInteger sourceGroupTotal; - -/** Sets the sample rate for the audio mixer. For best performance this should match the sample rate of your audio content */ -+(void) setMixerSampleRate:(Float32) sampleRate; - -/** Initializes the engine with a group definition and a total number of groups */ --(id)init; - -/** Plays a sound in a channel group with a pitch, pan and gain. The sound could played looped or not */ --(ALuint) playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop; - -/** Creates and returns a sound source object for the specified sound within the specified source group. - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId; - -/** Stops playing a sound */ -- (void) stopSound:(ALuint) sourceId; -/** Stops playing a source group */ -- (void) stopSourceGroup:(int) sourceGroupId; -/** Stops all playing sounds */ --(void) stopAllSounds; -/** Pause a sound */ --(void) pauseSound:(ALuint) sourceId; -/** Pause all sounds */ --(void) pauseAllSounds; -/** Resume a sound */ --(void) resumeSound:(ALuint) sourceId; -/** Resume all sounds */ --(void) resumeAllSounds; --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions; --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(NSUInteger) total; --(void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible; --(void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled; --(BOOL) sourceGroupEnabled:(int) sourceGroupId; --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq; --(BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath; --(void) loadBuffersAsynchronously:(NSArray *) loadRequests; --(BOOL) unloadBuffer:(int) soundId; --(ALCcontext *) openALContext; - -/** Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid */ --(float) bufferDurationInSeconds:(int) soundId; -/** Returns the size of the buffer in bytes or a negative value if the buffer id is invalid */ --(ALsizei) bufferSizeInBytes:(int) soundId; -/** Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid */ --(ALsizei) bufferFrequencyInHertz:(int) soundId; - -/** Used internally, never call unless you know what you are doing */ --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource; - -@end - -#pragma mark CDSoundSource -/** CDSoundSource is a wrapper around an OpenAL sound source. - It allows you to manipulate properties such as pitch, gain, pan and looping while the - sound is playing. CDSoundSource is based on the old CDSourceWrapper class but with much - added functionality. - - @since v1.0 - */ -@interface CDSoundSource : NSObject { - ALenum lastError; -@public - ALuint _sourceId; - ALuint _sourceIndex; - CDSoundEngine* _engine; - int _soundId; - float _preMuteGain; - BOOL enabled_; - BOOL mute_; -} -@property (readwrite, nonatomic) float pitch; -@property (readwrite, nonatomic) float gain; -@property (readwrite, nonatomic) float pan; -@property (readwrite, nonatomic) BOOL looping; -@property (readonly) BOOL isPlaying; -@property (readwrite, nonatomic) int soundId; -/** Returns the duration of the attached buffer in seconds or a negative value if the buffer is invalid */ -@property (readonly) float durationInSeconds; - -/** Stores the last error code that occurred. Check against AL_NO_ERROR */ -@property (readonly) ALenum lastError; -/** Do not init yourself, get an instance from the sourceForSound factory method on CDSoundEngine */ --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine; - -@end - -#pragma mark CDAudioInterruptTargetGroup - -/** Container for objects that implement audio interrupt protocol i.e. they can be muted and enabled. - Setting mute and enabled for the group propagates to all children. - Designed to be used with your CDSoundSource objects to get them to comply with global enabled and mute settings - if that is what you want to do.*/ -@interface CDAudioInterruptTargetGroup : NSObject { - BOOL mute_; - BOOL enabled_; - NSMutableArray *children_; -} --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget; -@end - -#pragma mark CDAsynchBufferLoader - -/** CDAsynchBufferLoader - * TODO: ??? - */ -@interface CDAsynchBufferLoader : NSOperation { - NSArray *_loadRequests; - CDSoundEngine *_soundEngine; -} - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine; - -@end - -#pragma mark CDBufferLoadRequest - -/** CDBufferLoadRequest */ -@interface CDBufferLoadRequest: NSObject -{ - NSString *filePath; - int soundId; - //id loader; -} - -@property (readonly) NSString *filePath; -@property (readonly) int soundId; - -- (id)init:(int) theSoundId filePath:(const NSString *) theFilePath; -@end - -/** Interpolation type */ -typedef enum { - kIT_Linear, //!Straight linear interpolation fade - kIT_SCurve, //!S curved interpolation - kIT_Exponential //!Exponential interpolation -} tCDInterpolationType; - -#pragma mark CDFloatInterpolator -@interface CDFloatInterpolator: NSObject -{ - float start; - float end; - float lastValue; - tCDInterpolationType interpolationType; -} -@property (readwrite, nonatomic) float start; -@property (readwrite, nonatomic) float end; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - -/** Return a value between min and max based on t which represents fractional progress where 0 is the start - and 1 is the end */ --(float) interpolate:(float) t; --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; - -@end - -#pragma mark CDPropertyModifier - -/** Base class for classes that modify properties such as pitch, pan and gain */ -@interface CDPropertyModifier: NSObject -{ - CDFloatInterpolator *interpolator; - float startValue; - float endValue; - id target; - BOOL stopTargetWhenComplete; - -} -@property (readwrite, nonatomic) BOOL stopTargetWhenComplete; -@property (readwrite, nonatomic) float startValue; -@property (readwrite, nonatomic) float endValue; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; -/** Set to a fractional value between 0 and 1 where 0 equals the start and 1 equals the end*/ --(void) modify:(float) t; - --(void) _setTargetProperty:(float) newVal; --(float) _getTargetProperty; --(void) _stopTarget; --(Class) _allowableType; - -@end - -#pragma mark CDSoundSourceFader - -/** Fader for CDSoundSource objects */ -@interface CDSoundSourceFader : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePanner - -/** Panner for CDSoundSource objects */ -@interface CDSoundSourcePanner : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePitchBender - -/** Pitch bender for CDSoundSource objects */ -@interface CDSoundSourcePitchBender : CDPropertyModifier{} -@end - -#pragma mark CDSoundEngineFader - -/** Fader for CDSoundEngine objects */ -@interface CDSoundEngineFader : CDPropertyModifier{} -@end - - - - diff --git a/cocos/audio/mac/CocosDenshion.m b/cocos/audio/mac/CocosDenshion.m deleted file mode 100644 index df3d8c7cc8e9..000000000000 --- a/cocos/audio/mac/CocosDenshion.m +++ /dev/null @@ -1,1641 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/mac/CocosDenshion.h" - -ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -ALvoid alcMacOSXMixerOutputRateProc(const ALdouble value); - - -typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq) -{ - static alBufferDataStaticProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alBufferDataStaticProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alBufferDataStatic"); - } - - if (proc) - proc(bid, format, data, size, freq); - - return; -} - -typedef ALvoid AL_APIENTRY (*alcMacOSXMixerOutputRateProcPtr) (const ALdouble value); -ALvoid alcMacOSXMixerOutputRateProc(const ALdouble value) -{ - static alcMacOSXMixerOutputRateProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alcMacOSXMixerOutputRateProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alcMacOSXMixerOutputRate"); - } - - if (proc) - proc(value); - - return; -} - -NSString * const kCDN_BadAlContext = @"kCDN_BadAlContext"; -NSString * const kCDN_AsynchLoadComplete = @"kCDN_AsynchLoadComplete"; -float const kCD_PitchDefault = 1.0f; -float const kCD_PitchLowerOneOctave = 0.5f; -float const kCD_PitchHigherOneOctave = 2.0f; -float const kCD_PanDefault = 0.0f; -float const kCD_PanFullLeft = -1.0f; -float const kCD_PanFullRight = 1.0f; -float const kCD_GainDefault = 1.0f; - -@interface CDSoundEngine (PrivateMethods) --(BOOL) _initOpenAL; --(void) _testGetGain; --(void) _dumpSourceGroupsInfo; --(void) _getSourceIndexForSourceGroup; --(void) _freeSourceGroups; --(BOOL) _setUpSourceGroups:(int[]) definitions total:(NSUInteger) total; -@end - -#pragma mark - -#pragma mark CDUtilities - -@implementation CDUtilities - -+(NSString*) fullPathFromRelativePath:(NSString*) relPath -{ - // do not convert an absolute path (starting with '/') - if(([relPath length] > 0) && ([relPath characterAtIndex:0] == '/')) - { - return relPath; - } - - NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]]; - NSString *file = [imagePathComponents lastObject]; - - [imagePathComponents removeLastObject]; - NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents]; - - NSString *fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory]; - if (fullpath == nil) - fullpath = relPath; - - return fullpath; -} - -@end - -#pragma mark - -#pragma mark CDSoundEngine - -@implementation CDSoundEngine - -static Float32 _mixerSampleRate; -static BOOL _mixerRateSet = NO; - -@synthesize lastErrorCode = lastErrorCode_; -@synthesize functioning = functioning_; -@synthesize asynchLoadProgress = asynchLoadProgress_; -@synthesize getGainWorks = getGainWorks_; -@synthesize sourceTotal = sourceTotal_; - -+ (void) setMixerSampleRate:(Float32) sampleRate { - _mixerRateSet = YES; - _mixerSampleRate = sampleRate; -} - -- (void) _testGetGain { - float testValue = 0.7f; - ALuint testSourceId = _sources[0].sourceId; - alSourcef(testSourceId, AL_GAIN, 0.0f);//Start from know value - alSourcef(testSourceId, AL_GAIN, testValue); - ALfloat gainVal; - alGetSourcef(testSourceId, AL_GAIN, &gainVal); - getGainWorks_ = (gainVal == testValue); -} - -//Generate sources one at a time until we fail --(void) _generateSources { - - _sources = (sourceInfo*)malloc( sizeof(_sources[0]) * CD_SOURCE_LIMIT); - BOOL hasFailed = NO; - sourceTotal_ = 0; - alGetError();//Clear error - while (!hasFailed && sourceTotal_ < CD_SOURCE_LIMIT) { - alGenSources(1, &(_sources[sourceTotal_].sourceId)); - if (alGetError() == AL_NO_ERROR) { - //Now try attaching source to null buffer - alSourcei(_sources[sourceTotal_].sourceId, AL_BUFFER, 0); - if (alGetError() == AL_NO_ERROR) { - _sources[sourceTotal_].usable = true; - sourceTotal_++; - } else { - hasFailed = YES; - } - } else { - _sources[sourceTotal_].usable = false; - hasFailed = YES; - } - } - //Mark the rest of the sources as not usable - for (int i=sourceTotal_; i < CD_SOURCE_LIMIT; i++) { - _sources[i].usable = false; - } -} - --(void) _generateBuffers:(int) startIndex endIndex:(int) endIndex { - if (_buffers) { - alGetError(); - for (int i=startIndex; i <= endIndex; i++) { - alGenBuffers(1, &_buffers[i].bufferId); - _buffers[i].bufferData = NULL; - if (alGetError() == AL_NO_ERROR) { - _buffers[i].bufferState = CD_BS_EMPTY; - } else { - _buffers[i].bufferState = CD_BS_FAILED; - CDLOG(@"Denshion::CDSoundEngine - buffer creation failed %i",i); - } - } - } -} - -/** - * Internal method called during init - */ -- (BOOL) _initOpenAL -{ - //ALenum error; - context = NULL; - ALCdevice *newDevice = NULL; - - //Set the mixer rate for the audio mixer - if (!_mixerRateSet) { - _mixerSampleRate = CD_SAMPLE_RATE_DEFAULT; - } - alcMacOSXMixerOutputRateProc(_mixerSampleRate); - CDLOGINFO(@"Denshion::CDSoundEngine - mixer output rate set to %0.2f",_mixerSampleRate); - - // Create a new OpenAL Device - // Pass NULL to specify the system's default output device - newDevice = alcOpenDevice(NULL); - if (newDevice != NULL) - { - // Create a new OpenAL Context - // The new context will render to the OpenAL Device just created - context = alcCreateContext(newDevice, 0); - if (context != NULL) - { - // Make the new context the Current OpenAL Context - alcMakeContextCurrent(context); - - // Create some OpenAL Buffer Objects - [self _generateBuffers:0 endIndex:bufferTotal-1]; - - // Create some OpenAL Source Objects - [self _generateSources]; - - } - } else { - return FALSE;//No device - } - alGetError();//Clear error - return TRUE; -} - -- (void) dealloc { - - ALCcontext *currentContext = NULL; - ALCdevice *device = NULL; - - [self stopAllSounds]; - - CDLOGINFO(@"Denshion::CDSoundEngine - Deallocing sound engine."); - [self _freeSourceGroups]; - - // Delete the Sources - CDLOGINFO(@"Denshion::CDSoundEngine - deleting sources."); - for (int i=0; i < sourceTotal_; i++) { - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Detach from current buffer - alDeleteSources(1, &(_sources[i].sourceId)); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - Error deleting source! %x\n", lastErrorCode_); - } - } - - // Delete the Buffers - CDLOGINFO(@"Denshion::CDSoundEngine - deleting buffers."); - for (int i=0; i < bufferTotal; i++) { - alDeleteBuffers(1, &_buffers[i].bufferId); -#ifdef CD_USE_STATIC_BUFFERS - if (_buffers[i].bufferData) { - free(_buffers[i].bufferData); - } -#endif - } - CDLOGINFO(@"Denshion::CDSoundEngine - free buffers."); - free(_buffers); - currentContext = alcGetCurrentContext(); - //Get device for active context - device = alcGetContextsDevice(currentContext); - //Release context - CDLOGINFO(@"Denshion::CDSoundEngine - destroy context."); - alcMakeContextCurrent(NULL); - alcDestroyContext(currentContext); - //Close device - CDLOGINFO(@"Denshion::CDSoundEngine - close device."); - alcCloseDevice(device); - CDLOGINFO(@"Denshion::CDSoundEngine - free sources."); - free(_sources); - - //Release mutexes - [_mutexBufferLoad release]; - - [super dealloc]; -} - --(NSUInteger) sourceGroupTotal { - return _sourceGroupTotal; -} - --(void) _freeSourceGroups -{ - CDLOGINFO(@"Denshion::CDSoundEngine freeing source groups"); - if(_sourceGroups) { - for (int i=0; i < _sourceGroupTotal; i++) { - if (_sourceGroups[i].sourceStatuses) { - free(_sourceGroups[i].sourceStatuses); - CDLOGINFO(@"Denshion::CDSoundEngine freed source statuses %i",i); - } - } - free(_sourceGroups); - } -} - --(BOOL) _redefineSourceGroups:(int[]) definitions total:(NSUInteger) total -{ - if (_sourceGroups) { - //Stop all sounds - [self stopAllSounds]; - //Need to free source groups - [self _freeSourceGroups]; - } - return [self _setUpSourceGroups:definitions total:total]; -} - --(BOOL) _setUpSourceGroups:(int[]) definitions total:(NSUInteger) total -{ - _sourceGroups = (sourceGroup *)malloc( sizeof(_sourceGroups[0]) * total); - if(!_sourceGroups) { - CDLOG(@"Denshion::CDSoundEngine - source groups memory allocation failed"); - return NO; - } - - _sourceGroupTotal = total; - int sourceCount = 0; - for (int i=0; i < _sourceGroupTotal; i++) { - - _sourceGroups[i].startIndex = 0; - _sourceGroups[i].currentIndex = _sourceGroups[i].startIndex; - _sourceGroups[i].enabled = false; - _sourceGroups[i].nonInterruptible = false; - _sourceGroups[i].totalSources = definitions[i]; - _sourceGroups[i].sourceStatuses = malloc(sizeof(_sourceGroups[i].sourceStatuses[0]) * _sourceGroups[i].totalSources); - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - _sourceGroups[i].sourceStatuses[j] = (sourceCount + j) << 1; - } - } - sourceCount += definitions[i]; - } - return YES; -} - --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(NSUInteger) total { - [self _redefineSourceGroups:sourceGroupDefinitions total:total]; -} - --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions { - CDLOGINFO(@"Denshion::CDSoundEngine - source groups defined by NSArray."); - NSUInteger totalDefs = [sourceGroupDefinitions count]; - int* defs = (int *)malloc( sizeof(int) * totalDefs); - int currentIndex = 0; - for (id currentDef in sourceGroupDefinitions) { - if ([currentDef isKindOfClass:[NSNumber class]]) { - defs[currentIndex] = (int)[(NSNumber*)currentDef integerValue]; - CDLOGINFO(@"Denshion::CDSoundEngine - found definition %i.",defs[currentIndex]); - } else { - CDLOG(@"Denshion::CDSoundEngine - warning, did not understand source definition."); - defs[currentIndex] = 0; - } - currentIndex++; - } - [self _redefineSourceGroups:defs total:totalDefs]; - free(defs); -} - -- (id)init -{ - if ((self = [super init])) { - - //Create mutexes - _mutexBufferLoad = [[NSObject alloc] init]; - - asynchLoadProgress_ = 0.0f; - - bufferTotal = CD_BUFFERS_START; - _buffers = (bufferInfo *)malloc( sizeof(_buffers[0]) * bufferTotal); - - // Initialize our OpenAL environment - if ([self _initOpenAL]) { - //Set up the default source group - a single group that contains all the sources - int sourceDefs[1]; - sourceDefs[0] = self.sourceTotal; - [self _setUpSourceGroups:sourceDefs total:1]; - - functioning_ = YES; - //Synchronize premute gain - _preMuteGain = self.masterGain; - mute_ = NO; - enabled_ = YES; - //Test whether get gain works for sources - [self _testGetGain]; - } else { - //Something went wrong with OpenAL - functioning_ = NO; - } - } - - return self; -} - -/** - * Delete the buffer identified by soundId - * @return true if buffer deleted successfully, otherwise false - */ -- (BOOL) unloadBuffer:(int) soundId -{ - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0 || soundId >= bufferTotal) { - CDLOG(@"Denshion::CDSoundEngine - soundId is outside array bounds, maybe you need to increase CD_MAX_BUFFERS"); - return FALSE; - } - - //Before a buffer can be deleted any sources that are attached to it must be stopped - for (int i=0; i < sourceTotal_; i++) { - //Note: tried getting the AL_BUFFER attribute of the source instead but doesn't - //appear to work on a device - just returned zero. - if (_buffers[soundId].bufferId == _sources[i].attachedBufferId) { - - CDLOG(@"Denshion::CDSoundEngine - Found attached source %i %i %i",i,_buffers[soundId].bufferId,_sources[i].sourceId); -#ifdef CD_USE_STATIC_BUFFERS - //When using static buffers a crash may occur if a source is playing with a buffer that is about - //to be deleted even though we stop the source and successfully delete the buffer. Crash is confirmed - //on 2.2.1 and 3.1.2, however, it will only occur if a source is used rapidly after having its prior - //data deleted. To avoid any possibility of the crash we wait for the source to finish playing. - ALint state; - - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - - if (state == AL_PLAYING) { - CDLOG(@"Denshion::CDSoundEngine - waiting for source to complete playing before removing buffer data"); - alSourcei(_sources[i].sourceId, AL_LOOPING, FALSE);//Turn off looping otherwise loops will never end - while (state == AL_PLAYING) { - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - usleep(10000); - } - } -#endif - //Stop source and detach - alSourceStop(_sources[i].sourceId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error stopping source: %x\n", lastErrorCode_); - } - - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Attach to "NULL" buffer to detach - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error detaching buffer: %x\n", lastErrorCode_); - } else { - //Record that source is now attached to nothing - _sources[i].attachedBufferId = 0; - } - } - } - - alDeleteBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error deleting buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { -#ifdef CD_USE_STATIC_BUFFERS - //Free previous data, if alDeleteBuffer has returned without error then no - if (_buffers[soundId].bufferData) { - CDLOGINFO(@"Denshion::CDSoundEngine - freeing static data for soundId %i @ %i",soundId,_buffers[soundId].bufferData); - free(_buffers[soundId].bufferData);//Free the old data - _buffers[soundId].bufferData = NULL; - } -#endif - } - - alGenBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error regenerating buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { - //We now have an empty buffer - _buffers[soundId].bufferState = CD_BS_EMPTY; - CDLOGINFO(@"Denshion::CDSoundEngine - buffer %i successfully unloaded\n",soundId); - return TRUE; - } -} - -/** - * Load buffers asynchronously - * Check asynchLoadProgress for progress. asynchLoadProgress represents fraction of completion. When it equals 1.0 loading - * is complete. NB: asynchLoadProgress is simply based on the number of load requests, it does not take into account - * file sizes. - * @param An array of CDBufferLoadRequest objects - */ -- (void) loadBuffersAsynchronously:(NSArray *) loadRequests { - @synchronized(self) { - asynchLoadProgress_ = 0.0f; - CDAsynchBufferLoader *loaderOp = [[[CDAsynchBufferLoader alloc] init:loadRequests soundEngine:self] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:loaderOp]; - } -} - --(BOOL) _resizeBuffers:(int) increment { - - void * tmpBufferInfos = realloc( _buffers, sizeof(_buffers[0]) * (bufferTotal + increment) ); - - if(!tmpBufferInfos) { - free(tmpBufferInfos); - return NO; - } else { - _buffers = tmpBufferInfos; - int oldBufferTotal = bufferTotal; - bufferTotal = bufferTotal + increment; - [self _generateBuffers:oldBufferTotal endIndex:bufferTotal-1]; - return YES; - } -} - --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq { - - @synchronized(_mutexBufferLoad) { - - if (!functioning_) { - //OpenAL initialisation has previously failed - CDLOG(@"Denshion::CDSoundEngine - Loading buffer failed because sound engine state != functioning"); - return FALSE; - } - - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0) { - CDLOG(@"Denshion::CDSoundEngine - soundId is negative"); - return FALSE; - } - - if (soundId >= bufferTotal) { - //Need to resize the buffers - int requiredIncrement = CD_BUFFERS_INCREMENT; - while (bufferTotal + requiredIncrement < soundId) { - requiredIncrement += CD_BUFFERS_INCREMENT; - } - CDLOGINFO(@"Denshion::CDSoundEngine - attempting to resize buffers by %i for sound %i",requiredIncrement,soundId); - if (![self _resizeBuffers:requiredIncrement]) { - CDLOG(@"Denshion::CDSoundEngine - buffer resize failed"); - return FALSE; - } - } - - if (soundData) - { - if (_buffers[soundId].bufferState != CD_BS_EMPTY) { - CDLOGINFO(@"Denshion::CDSoundEngine - non empty buffer, regenerating"); - if (![self unloadBuffer:soundId]) { - //Deletion of buffer failed, delete buffer routine has set buffer state and lastErrorCode - return NO; - } - } - -#ifdef CD_DEBUG - //Check that sample rate matches mixer rate and warn if they do not - if (freq != (int)_mixerSampleRate) { - CDLOGINFO(@"Denshion::CDSoundEngine - WARNING sample rate does not match mixer sample rate performance may not be optimal."); - } -#endif - -#ifdef CD_USE_STATIC_BUFFERS - alBufferDataStaticProc(_buffers[soundId].bufferId, format, soundData, size, freq); - _buffers[soundId].bufferData = soundData;//Save the pointer to the new data -#else - alBufferData(_buffers[soundId].bufferId, format, soundData, size, freq); -#endif - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error attaching audio to buffer: %x", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - } else { - CDLOG(@"Denshion::CDSoundEngine Buffer data is null!"); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - - _buffers[soundId].format = format; - _buffers[soundId].sizeInBytes = size; - _buffers[soundId].frequencyInHertz = freq; - _buffers[soundId].bufferState = CD_BS_LOADED; - CDLOGINFO(@"Denshion::CDSoundEngine Buffer %i loaded format:%i freq:%i size:%i",soundId,format,freq,size); - return TRUE; - }//end mutex -} - -/** - * Load sound data for later play back. - * @return TRUE if buffer loaded okay for play back otherwise false - */ -- (BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath -{ - - ALvoid* data; - ALenum format; - ALsizei size; - ALsizei freq; - - CDLOGINFO(@"Denshion::CDSoundEngine - Loading openAL buffer %i %@", soundId, filePath); - - CFURLRef fileURL = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:filePath]; - if (path) { - fileURL = (CFURLRef)[[NSURL fileURLWithPath:path] retain]; - } - - if (fileURL) - { - data = CDGetOpenALAudioData(fileURL, &size, &format, &freq); - CFRelease(fileURL); - BOOL result = [self loadBufferFromData:soundId soundData:data format:format size:size freq:freq]; -#ifndef CD_USE_STATIC_BUFFERS - free(data);//Data can be freed here because alBufferData performs a memcpy -#endif - return result; - } else { - CDLOG(@"Denshion::CDSoundEngine Could not find file!\n"); - //Don't change buffer state here as it will be the same as before method was called - return FALSE; - } -} - --(BOOL) validateBufferId:(int) soundId { - if (soundId < 0 || soundId >= bufferTotal) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId buffer outside range %i",soundId); - return NO; - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId invalid buffer state %i", soundId); - return NO; - } else { - return YES; - } -} - --(float) bufferDurationInSeconds:(int) soundId { - if ([self validateBufferId:soundId]) { - float factor = 0.0f; - switch (_buffers[soundId].format) { - case AL_FORMAT_MONO8: - factor = 1.0f; - break; - case AL_FORMAT_MONO16: - factor = 0.5f; - break; - case AL_FORMAT_STEREO8: - factor = 0.5f; - break; - case AL_FORMAT_STEREO16: - factor = 0.25f; - break; - } - return (float)_buffers[soundId].sizeInBytes/(float)_buffers[soundId].frequencyInHertz * factor; - } else { - return -1.0f; - } -} - --(ALsizei) bufferSizeInBytes:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].sizeInBytes; - } else { - return -1.0f; - } -} - --(ALsizei) bufferFrequencyInHertz:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].frequencyInHertz; - } else { - return -1.0f; - } -} - -- (ALfloat) masterGain { - if (mute_) { - //When mute the real gain will always be 0 therefore return the preMuteGain value - return _preMuteGain; - } else { - ALfloat gain; - alGetListenerf(AL_GAIN, &gain); - return gain; - } -} - -/** - * Overall gain setting multiplier. e.g 0.5 is half the gain. - */ -- (void) setMasterGain:(ALfloat) newGainValue { - if (mute_) { - _preMuteGain = newGainValue; - } else { - alListenerf(AL_GAIN, newGainValue); - } -} - -#pragma mark CDSoundEngine AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - mute_ = newMuteValue; - if (mute_) { - //Remember what the gain was - _preMuteGain = self.masterGain; - //Set gain to 0 - do not use the property as this will adjust preMuteGain when muted - alListenerf(AL_GAIN, 0.0f); - } else { - //Restore gain to what it was before being muted - self.masterGain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stopAllSounds]; - } -} - --(void) _lockSource:(int) sourceIndex lock:(BOOL) lock { - BOOL found = NO; - for (int i=0; i < _sourceGroupTotal && !found; i++) { - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources && !found; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - if((_sourceGroups[i].sourceStatuses[j] >> 1)==sourceIndex) { - if (lock) { - //Set first bit to lock this source - _sourceGroups[i].sourceStatuses[j] |= 1; - } else { - //Unset first bit to unlock this source - _sourceGroups[i].sourceStatuses[j] &= ~1; - } - found = YES; - } - } - } - } -} - --(int) _getSourceIndexForSourceGroup:(int)sourceGroupId -{ - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine invalid source group id %i",sourceGroupId); - return CD_NO_SOURCE; - } - - int sourceIndex = -1;//Using -1 to indicate no source found - BOOL complete = NO; - ALint sourceState = 0; - sourceGroup *thisSourceGroup = &_sourceGroups[sourceGroupId]; - thisSourceGroup->currentIndex = thisSourceGroup->startIndex; - while (!complete) { - //Iterate over sources looking for one that is not locked, first bit indicates if source is locked - if ((thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] & 1) == 0) { - //This source is not locked - sourceIndex = thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] >> 1;//shift back to get the index - if (thisSourceGroup->nonInterruptible) { - //Check if this source is playing, if so it can't be interrupted - alGetSourcei(_sources[sourceIndex].sourceId, AL_SOURCE_STATE, &sourceState); - if (sourceState != AL_PLAYING) { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } else { - sourceIndex = -1;//The source index was no good because the source was playing - } - } else { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } - } - thisSourceGroup->currentIndex++; - if (thisSourceGroup->currentIndex >= thisSourceGroup->totalSources) { - //Reset to the beginning - thisSourceGroup->currentIndex = 0; - } - if (thisSourceGroup->currentIndex == thisSourceGroup->startIndex) { - //We have looped around and got back to the start - complete = YES; - } - } - - //Reset start index to beginning if beyond bounds - if (thisSourceGroup->startIndex >= thisSourceGroup->totalSources) { - thisSourceGroup->startIndex = 0; - } - - if (sourceIndex >= 0) { - return sourceIndex; - } else { - return CD_NO_SOURCE; - } - -} - -/** - * Play a sound. - * @param soundId the id of the sound to play (buffer id). - * @param sourceGroupId the source group that will be used to play the sound. - * @param pitch pitch multiplier. e.g 1.0 is unaltered, 0.5 is 1 octave lower. - * @param pan stereo position. -1 is fully left, 0 is centre and 1 is fully right. - * @param gain gain multiplier. e.g. 1.0 is unaltered, 0.5 is half the gain - * @param loop should the sound be looped or one shot. - * @return the id of the source being used to play the sound or CD_MUTE if the sound engine is muted or non functioning - * or CD_NO_SOURCE if a problem occurs setting up the source - * - */ -- (ALuint)playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop { - -#ifdef CD_DEBUG - //Sanity check parameters - only in DEBUG - NSAssert(soundId >= 0, @"soundId can not be negative"); - NSAssert(soundId < bufferTotal, @"soundId exceeds limit"); - NSAssert(sourceGroupId >= 0, @"sourceGroupId can not be negative"); - NSAssert(sourceGroupId < _sourceGroupTotal, @"sourceGroupId exceeds limit"); - NSAssert(pitch > 0, @"pitch must be greater than zero"); - NSAssert(pan >= -1 && pan <= 1, @"pan must be between -1 and 1"); - NSAssert(gain >= 0, @"gain can not be negative"); -#endif - //If mute or initialisation has failed or buffer is not loaded then do nothing - if (!enabled_ || !functioning_ || _buffers[soundId].bufferState != CD_BS_LOADED || _sourceGroups[sourceGroupId].enabled) { -#ifdef CD_DEBUG - if (!functioning_) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because sound engine is not functioning"); - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because buffer %i is not loaded", soundId); - } -#endif - return CD_MUTE; - } - - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId];//This method ensures sourceIndex is valid - - if (sourceIndex != CD_NO_SOURCE) { - ALint state; - ALuint source = _sources[sourceIndex].sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetError();//Clear the error code - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alSourcei(source, AL_BUFFER, buffer);//Attach to sound - alSourcef(source, AL_PITCH, pitch);//Set pitch - alSourcei(source, AL_LOOPING, loop);//Set looping - alSourcef(source, AL_GAIN, gain);//Set gain/volume - float sourcePosAL[] = {pan, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(source, AL_POSITION, sourcePosAL); - alGetError();//Clear the error code - alSourcePlay(source); - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - //Everything was okay - _sources[sourceIndex].attachedBufferId = buffer; - return source; - } else { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundEngine - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return CD_NO_SOURCE; - } - } else { - return CD_NO_SOURCE; - } -} - --(BOOL) _soundSourceAttachToBuffer:(CDSoundSource*) soundSource soundId:(int) soundId { - //Attach the source to the buffer - ALint state; - ALuint source = soundSource->_sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alGetError();//Clear the error code - alSourcei(source, AL_BUFFER, buffer);//Attach to sound data - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - _sources[soundSource->_sourceIndex].attachedBufferId = buffer; - //_sourceBufferAttachments[soundSource->_sourceIndex] = buffer;//Keep track of which - soundSource->_soundId = soundId; - return YES; - } else { - return NO; - } -} - -/** - * Get a sound source for the specified sound in the specified source group - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId -{ - if (!functioning_) { - return nil; - } - //Check if a source is available - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId]; - if (sourceIndex != CD_NO_SOURCE) { - CDSoundSource *result = [[CDSoundSource alloc] init:_sources[sourceIndex].sourceId sourceIndex:sourceIndex soundEngine:self]; - [self _lockSource:sourceIndex lock:YES]; - //Try to attach to the buffer - if ([self _soundSourceAttachToBuffer:result soundId:soundId]) { - //Set to a known state - result.pitch = 1.0f; - result.pan = 0.0f; - result.gain = 1.0f; - result.looping = NO; - return [result autorelease]; - } else { - //Release the sound source we just created, this will also unlock the source - [result release]; - return nil; - } - } else { - //No available source within that source group - return nil; - } -} - --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource { - CDLOGINFO(@"Denshion::CDSoundEngine _soundSourcePreRelease %i",soundSource->_sourceIndex); - //Unlock the sound source's source - [self _lockSource:soundSource->_sourceIndex lock:NO]; -} - -/** - * Stop all sounds playing within a source group - */ -- (void) stopSourceGroup:(int) sourceGroupId { - - if (!functioning_ || sourceGroupId >= _sourceGroupTotal || sourceGroupId < 0) { - return; - } - int sourceCount = _sourceGroups[sourceGroupId].totalSources; - for (int i=0; i < sourceCount; i++) { - int sourceIndex = _sourceGroups[sourceGroupId].sourceStatuses[i] >> 1; - alSourceStop(_sources[sourceIndex].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -/** - * Stop a sound playing. - * @param sourceId an OpenAL source identifier i.e. the return value of playSound - */ -- (void)stopSound:(ALuint) sourceId { - if (!functioning_) { - return; - } - alSourceStop(sourceId); - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -- (void) stopAllSounds { - for (int i=0; i < sourceTotal_; i++) { - alSourceStop(_sources[i].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -- (void) pauseSound:(ALuint) sourceId { - if (!functioning_) { - return; - } - alSourcePause(sourceId); - alGetError();//Clear error in case we pause any sounds that couldn't be paused -} - -- (void) pauseAllSounds { - for (int i = 0; i < sourceTotal_; i++) { - [self pauseSound:_sources[i].sourceId]; - } - alGetError();//Clear error in case we stopped any sounds that couldn't be paused -} - -- (void) resumeSound:(ALuint) soundId { - if (!functioning_) { - return; - } - - // only resume a sound id that is paused - ALint state; - alGetSourcei(soundId, AL_SOURCE_STATE, &state); - if (state != AL_PAUSED) - { - return; - } - - alSourcePlay(soundId); - alGetError();//Clear error in case we stopped any sounds that couldn't be resumed -} - -- (void) resumeAllSounds { - for (int i = 0; i < sourceTotal_; i++) { - [self resumeSound:_sources[i].sourceId]; - } - alGetError();//Clear error in case we stopped any sounds that couldn't be resumed -} - -/** - * Set a source group as non interruptible. Default is that source groups are interruptible. - * Non interruptible means that if a request to play a sound is made for a source group and there are - * no free sources available then the play request will be ignored and CD_NO_SOURCE will be returned. - */ -- (void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupNonInterruptible invalid source group id %i",sourceGroupId); - return; - } - - if (isNonInterruptible) { - _sourceGroups[sourceGroupId].nonInterruptible = true; - } else { - _sourceGroups[sourceGroupId].nonInterruptible = false; - } -} - -/** - * Set the mute property for a source group. If mute is turned on any sounds in that source group - * will be stopped and further sounds in that source group will play. However, turning mute off - * will not restart any sounds that were playing when mute was turned on. Also the mute setting - * for the sound engine must be taken into account. If the sound engine is mute no sounds will play - * no matter what the source group mute setting is. - */ -- (void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupEnabled invalid source group id %i",sourceGroupId); - return; - } - - if (enabled) { - _sourceGroups[sourceGroupId].enabled = true; - [self stopSourceGroup:sourceGroupId]; - } else { - _sourceGroups[sourceGroupId].enabled = false; - } -} - -/** - * Return the mute property for the source group identified by sourceGroupId - */ -- (BOOL) sourceGroupEnabled:(int) sourceGroupId { - return _sourceGroups[sourceGroupId].enabled; -} - --(ALCcontext *) openALContext { - return context; -} - -- (void) _dumpSourceGroupsInfo { -#ifdef CD_DEBUG - CDLOGINFO(@"-------------- source Group Info --------------"); - for (int i=0; i < _sourceGroupTotal; i++) { - CDLOGINFO(@"Group: %i start:%i total:%i",i,_sourceGroups[i].startIndex, _sourceGroups[i].totalSources); - CDLOGINFO(@"----- mute:%i nonInterruptible:%i",_sourceGroups[i].enabled, _sourceGroups[i].nonInterruptible); - CDLOGINFO(@"----- Source statuses ----"); - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - CDLOGINFO(@"Source status:%i index=%i locked=%i",j,_sourceGroups[i].sourceStatuses[j] >> 1, _sourceGroups[i].sourceStatuses[j] & 1); - } - } -#endif -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDSoundSource - -@synthesize lastError; - -//Macro for handling the al error code -#define CDSOUNDSOURCE_UPDATE_LAST_ERROR (lastError = alGetError()) -#define CDSOUNDSOURCE_ERROR_HANDLER ( CDSOUNDSOURCE_UPDATE_LAST_ERROR == AL_NO_ERROR) - --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine { - if ((self = [super init])) { - _sourceId = theSourceId; - _engine = engine; - _sourceIndex = index; - enabled_ = YES; - mute_ = NO; - _preMuteGain = self.gain; - } - return self; -} - --(void) dealloc -{ - CDLOGINFO(@"Denshion::CDSoundSource deallocated %i",self->_sourceIndex); - - //Notify sound engine we are about to release - [_engine _soundSourcePreRelease:self]; - [super dealloc]; -} - -- (void) setPitch:(float) newPitchValue { - alSourcef(_sourceId, AL_PITCH, newPitchValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setGain:(float) newGainValue { - if (!mute_) { - alSourcef(_sourceId, AL_GAIN, newGainValue); - } else { - _preMuteGain = newGainValue; - } - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setPan:(float) newPanValue { - float sourcePosAL[] = {newPanValue, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (void) setLooping:(BOOL) newLoopingValue { - alSourcei(_sourceId, AL_LOOPING, newLoopingValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (BOOL) isPlaying { - ALint state; - alGetSourcei(_sourceId, AL_SOURCE_STATE, &state); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return (state == AL_PLAYING); -} - -- (float) pitch { - ALfloat pitchVal; - alGetSourcef(_sourceId, AL_PITCH, &pitchVal); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return pitchVal; -} - -- (float) pan { - ALfloat sourcePosAL[] = {0.0f,0.0f,0.0f}; - alGetSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return sourcePosAL[0]; -} - -- (float) gain { - if (!mute_) { - ALfloat val; - alGetSourcef(_sourceId, AL_GAIN, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; - } else { - return _preMuteGain; - } -} - -- (BOOL) looping { - ALfloat val; - alGetSourcef(_sourceId, AL_LOOPING, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; -} - --(BOOL) stop { - alSourceStop(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) play { - if (enabled_) { - alSourcePlay(_sourceId); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - if (lastError != AL_NO_ERROR) { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundSource - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return NO; - } else { - return YES; - } - } else { - return NO; - } -} - --(BOOL) pause { - alSourcePause(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) rewind { - alSourceRewind(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(void) setSoundId:(int) soundId { - [_engine _soundSourceAttachToBuffer:self soundId:soundId]; -} - --(int) soundId { - return _soundId; -} - --(float) durationInSeconds { - return [_engine bufferDurationInSeconds:_soundId]; -} - -#pragma mark CDSoundSource AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - if (newMuteValue) { - //Remember what the gain was - _preMuteGain = self.gain; - self.gain = 0.0f; - mute_ = newMuteValue;//Make sure this is done after setting the gain property as the setter behaves differently depending on mute value - } else { - //Restore gain to what it was before being muted - mute_ = newMuteValue; - self.gain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stop]; - } -} - -@end - -//////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDAudioInterruptTargetGroup - -@implementation CDAudioInterruptTargetGroup - --(id) init { - if ((self = [super init])) { - children_ = [[NSMutableArray alloc] initWithCapacity:32]; - enabled_ = YES; - mute_ = NO; - } - return self; -} - --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget { - //Synchronize child with group settings; - [interruptibleTarget setMute:mute_]; - [interruptibleTarget setEnabled:enabled_]; - [children_ addObject:interruptibleTarget]; -} - --(void) removeAudioInterruptTarget:(NSObject*) interruptibleTarget { - [children_ removeObjectIdenticalTo:interruptibleTarget]; -} - -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - for (NSObject* target in children_) { - [target setMute:newMuteValue]; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue == enabled_) { - return; - } - - for (NSObject* target in children_) { - [target setEnabled:enabledValue]; - } -} - -@end - - - -//////////////////////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CDAsynchBufferLoader - -@implementation CDAsynchBufferLoader - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - _loadRequests = loadRequests; - [_loadRequests retain]; - _soundEngine = theSoundEngine; - [_soundEngine retain]; - } - return self; -} - --(void) main { - CDLOGINFO(@"Denshion::CDAsynchBufferLoader - loading buffers"); - [super main]; - _soundEngine.asynchLoadProgress = 0.0f; - - if ([_loadRequests count] > 0) { - float increment = 1.0f / [_loadRequests count]; - //Iterate over load request and load - for (CDBufferLoadRequest *loadRequest in _loadRequests) { - [_soundEngine loadBuffer:loadRequest.soundId filePath:loadRequest.filePath]; - _soundEngine.asynchLoadProgress += increment; - } - } - - //Completed - _soundEngine.asynchLoadProgress = 1.0f; - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AsynchLoadComplete object:nil]; - -} - --(void) dealloc { - [_loadRequests release]; - [_soundEngine release]; - [super dealloc]; -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDBufferLoadRequest - -@implementation CDBufferLoadRequest - -@synthesize filePath, soundId; - --(id) init:(int) theSoundId filePath:(const NSString *) theFilePath { - if ((self = [super init])) { - soundId = theSoundId; - filePath = [theFilePath copy]; - } - return self; -} - --(void) dealloc { - [filePath release]; - [super dealloc]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDFloatInterpolator - -@implementation CDFloatInterpolator -@synthesize start,end,interpolationType; - --(float) interpolate:(float) t { - - if (t < 1.0f) { - switch (interpolationType) { - case kIT_Linear: - //Linear interpolation - return ((end - start) * t) + start; - - case kIT_SCurve: - //Cubic s curve t^2 * (3 - 2t) - return ((t * t * (3.0f - (2.0f * t))) * (end - start)) + start; - - case kIT_Exponential: - //Formulas taken from EaseAction - if (end > start) { - //Fade in - float logDelta = (t==0) ? 0 : powf(2, 10 * (t/1 - 1)) - 1 * 0.001f; - return ((end - start) * logDelta) + start; - } else { - //Fade Out - float logDelta = (-powf(2, -10 * t/1) + 1); - return ((end - start) * logDelta) + start; - } - default: - return 0.0f; - } - } else { - return end; - } -} - --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - start = startVal; - end = endVal; - interpolationType = type; - } - return self; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDPropertyModifier - -@implementation CDPropertyModifier - -@synthesize stopTargetWhenComplete; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - if (target) { - //Release the previous target if there is one - [target release]; - } - target = theTarget; -#if CD_DEBUG - //Check target is of the required type - if (![theTarget isMemberOfClass:[self _allowableType]] ) { - CDLOG(@"Denshion::CDPropertyModifier target is not of type %@",[self _allowableType]); - NSAssert([theTarget isKindOfClass:[CDSoundEngine class]], @"CDPropertyModifier target not of required type"); - } -#endif - [target retain]; - startValue = startVal; - endValue = endVal; - if (interpolator) { - //Release previous interpolator if there is one - [interpolator release]; - } - interpolator = [[CDFloatInterpolator alloc] init:type startVal:startVal endVal:endVal]; - stopTargetWhenComplete = NO; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDPropertyModifier deallocated %@",self); - [target release]; - [interpolator release]; - [super dealloc]; -} - --(void) modify:(float) t { - if (t < 1.0f) { - [self _setTargetProperty:[interpolator interpolate:t]]; - } else { - //At the end - [self _setTargetProperty:endValue]; - if (stopTargetWhenComplete) { - [self _stopTarget]; - } - } -} - --(float) startValue { - return startValue; -} - --(void) setStartValue:(float) startVal -{ - startValue = startVal; - interpolator.start = startVal; -} - --(float) endValue { - return startValue; -} - --(void) setEndValue:(float) endVal -{ - endValue = endVal; - interpolator.end = endVal; -} - --(tCDInterpolationType) interpolationType { - return interpolator.interpolationType; -} - --(void) setInterpolationType:(tCDInterpolationType) interpolationType { - interpolator.interpolationType = interpolationType; -} - --(void) _setTargetProperty:(float) newVal { - -} - --(float) _getTargetProperty { - return 0.0f; -} - --(void) _stopTarget { - -} - --(Class) _allowableType { - return [NSObject class]; -} -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourceFader - -@implementation CDSoundSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).gain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).gain; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourcePanner - -@implementation CDSoundSourcePanner - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pan = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pan; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourcePitchBender - -@implementation CDSoundSourcePitchBender - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pitch = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pitch; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundEngineFader - -@implementation CDSoundEngineFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundEngine*)target).masterGain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundEngine*)target).masterGain; -} - --(void) _stopTarget { - [((CDSoundEngine*)target) stopAllSounds]; -} - --(Class) _allowableType { - return [CDSoundEngine class]; -} - -@end - - diff --git a/cocos/audio/mac/SimpleAudioEngine.mm b/cocos/audio/mac/SimpleAudioEngine.mm deleted file mode 100644 index e4639355e430..000000000000 --- a/cocos/audio/mac/SimpleAudioEngine.mm +++ /dev/null @@ -1,295 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "audio/include/SimpleAudioEngine.h" -#include "audio/mac/SimpleAudioEngine_objc.h" -#include - -#include "platform/CCFileUtils.h" -using namespace cocos2d; - -static void static_end() -{ - [SimpleAudioEngine end]; -} - -static void static_preloadBackgroundMusic(const char* pszFilePath) -{ - [[SimpleAudioEngine sharedEngine] preloadBackgroundMusic: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - [[SimpleAudioEngine sharedEngine] playBackgroundMusic: [NSString stringWithUTF8String: pszFilePath] loop: bLoop]; -} - -static void static_stopBackgroundMusic() -{ - [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; -} - -static void static_pauseBackgroundMusic() -{ - [[SimpleAudioEngine sharedEngine] pauseBackgroundMusic]; -} - -static void static_resumeBackgroundMusic() -{ - [[SimpleAudioEngine sharedEngine] resumeBackgroundMusic]; -} - -static void static_rewindBackgroundMusic() -{ - [[SimpleAudioEngine sharedEngine] rewindBackgroundMusic]; -} - -static bool static_willPlayBackgroundMusic() -{ - return [[SimpleAudioEngine sharedEngine] willPlayBackgroundMusic]; -} - -static bool static_isBackgroundMusicPlaying() -{ - return [[SimpleAudioEngine sharedEngine] isBackgroundMusicPlaying]; -} - -static float static_getBackgroundMusicVolume() -{ - return [[SimpleAudioEngine sharedEngine] backgroundMusicVolume]; -} - -static void static_setBackgroundMusicVolume(float volume) -{ - volume = MAX( MIN(volume, 1.0), 0 ); - [SimpleAudioEngine sharedEngine].backgroundMusicVolume = volume; -} - -static float static_getEffectsVolume() -{ - return [[SimpleAudioEngine sharedEngine] effectsVolume]; -} - -static void static_setEffectsVolume(float volume) -{ - volume = MAX( MIN(volume, 1.0), 0 ); - [SimpleAudioEngine sharedEngine].effectsVolume = volume; -} - -static unsigned int static_playEffect(const char* pszFilePath, bool bLoop, Float32 pszPitch, Float32 pszPan, Float32 pszGain) -{ - return [[SimpleAudioEngine sharedEngine] playEffect:[NSString stringWithUTF8String: pszFilePath] loop:bLoop pitch:pszPitch pan: pszPan gain:pszGain ]; -} - -static void static_stopEffect(int nSoundId) -{ - [[SimpleAudioEngine sharedEngine] stopEffect: nSoundId]; -} - -static void static_preloadEffect(const char* pszFilePath) -{ - [[SimpleAudioEngine sharedEngine] preloadEffect: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_unloadEffect(const char* pszFilePath) -{ - [[SimpleAudioEngine sharedEngine] unloadEffect: [NSString stringWithUTF8String: pszFilePath]]; -} - -static void static_pauseEffect(unsigned int uSoundId) -{ - [[SimpleAudioEngine sharedEngine] pauseEffect: uSoundId]; -} - -static void static_pauseAllEffects() -{ - [[SimpleAudioEngine sharedEngine] pauseAllEffects]; -} - -static void static_resumeEffect(unsigned int uSoundId) -{ - [[SimpleAudioEngine sharedEngine] resumeEffect: uSoundId]; -} - -static void static_resumeAllEffects() -{ - [[SimpleAudioEngine sharedEngine] resumeAllEffects]; -} - -static void static_stopAllEffects() -{ - [[SimpleAudioEngine sharedEngine] stopAllEffects]; -} - -namespace CocosDenshion { - -static SimpleAudioEngine *s_pEngine; - -SimpleAudioEngine::SimpleAudioEngine() -{ - -} - -SimpleAudioEngine::~SimpleAudioEngine() -{ - -} - -SimpleAudioEngine* SimpleAudioEngine::getInstance() -{ - if (! s_pEngine) - { - s_pEngine = new (std::nothrow) SimpleAudioEngine(); - } - - return s_pEngine; -} - -void SimpleAudioEngine::end() -{ - if (s_pEngine) - { - delete s_pEngine; - s_pEngine = nullptr; - } - - static_end(); -} - -void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_preloadBackgroundMusic(fullPath.c_str()); -} - -void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_playBackgroundMusic(fullPath.c_str(), bLoop); -} - -void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) -{ - static_stopBackgroundMusic(); -} - -void SimpleAudioEngine::pauseBackgroundMusic() -{ - static_pauseBackgroundMusic(); -} - -void SimpleAudioEngine::resumeBackgroundMusic() -{ - static_resumeBackgroundMusic(); -} - -void SimpleAudioEngine::rewindBackgroundMusic() -{ - static_rewindBackgroundMusic(); -} - -bool SimpleAudioEngine::willPlayBackgroundMusic() -{ - return static_willPlayBackgroundMusic(); -} - -bool SimpleAudioEngine::isBackgroundMusicPlaying() -{ - return static_isBackgroundMusicPlaying(); -} - -float SimpleAudioEngine::getBackgroundMusicVolume() -{ - return static_getBackgroundMusicVolume(); -} - -void SimpleAudioEngine::setBackgroundMusicVolume(float volume) -{ - static_setBackgroundMusicVolume(volume); -} - -float SimpleAudioEngine::getEffectsVolume() -{ - return static_getEffectsVolume(); -} - -void SimpleAudioEngine::setEffectsVolume(float volume) -{ - static_setEffectsVolume(volume); -} - -unsigned int SimpleAudioEngine::playEffect(const char *pszFilePath, bool bLoop, - float pitch, float pan, float gain) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - return static_playEffect(fullPath.c_str(), bLoop, pitch, pan, gain); -} - -void SimpleAudioEngine::stopEffect(unsigned int nSoundId) -{ - static_stopEffect(nSoundId); -} - -void SimpleAudioEngine::preloadEffect(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_preloadEffect(fullPath.c_str()); -} - -void SimpleAudioEngine::unloadEffect(const char* pszFilePath) -{ - // Changing file path to full path - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - static_unloadEffect(fullPath.c_str()); -} - -void SimpleAudioEngine::pauseEffect(unsigned int uSoundId) -{ - static_pauseEffect(uSoundId); -} - -void SimpleAudioEngine::resumeEffect(unsigned int uSoundId) -{ - static_resumeEffect(uSoundId); -} - -void SimpleAudioEngine::pauseAllEffects() -{ - static_pauseAllEffects(); -} - -void SimpleAudioEngine::resumeAllEffects() -{ - static_resumeAllEffects(); -} - -void SimpleAudioEngine::stopAllEffects() -{ - static_stopAllEffects(); -} -} diff --git a/cocos/audio/mac/SimpleAudioEngine_objc.h b/cocos/audio/mac/SimpleAudioEngine_objc.h deleted file mode 100644 index 68f633447f41..000000000000 --- a/cocos/audio/mac/SimpleAudioEngine_objc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - - -#import "audio/mac/CDAudioManager.h" - -/** - A wrapper to the CDAudioManager object. - This is recommended for basic audio requirements. If you just want to play some sound fx - and some background music and have no interest in learning the lower level workings then - this is the interface to use. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface SimpleAudioEngine : NSObject { - - BOOL mute_; - BOOL enabled_; -} - -/** Background music volume. Range is 0.0f to 1.0f. This will only have an effect if willPlayBackgroundMusic returns YES */ -@property (readwrite) float backgroundMusicVolume; -/** Effects volume. Range is 0.0f to 1.0f */ -@property (readwrite) float effectsVolume; -/** If NO it indicates background music will not be played either because no background music is loaded or the audio session does not permit it.*/ -@property (readonly) BOOL willPlayBackgroundMusic; - -/** returns the shared instance of the SimpleAudioEngine object */ -+ (SimpleAudioEngine*) sharedEngine; - -/** Preloads a music file so it will be ready to play as background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; - -/** plays background music in a loop*/ --(void) playBackgroundMusic:(NSString*) filePath; -/** plays background music, if loop is true the music will repeat otherwise it will be played once */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** stops playing background music */ --(void) stopBackgroundMusic; -/** pauses the background music */ --(void) pauseBackgroundMusic; -/** resume background music that has been paused */ --(void) resumeBackgroundMusic; -/** rewind the background music */ --(void) rewindBackgroundMusic; -/** returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - -/** plays an audio effect with a file path*/ --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop; -/** stop a sound that is playing, note you must pass in the soundId that is returned when you started playing the sound with playEffect */ --(void) stopEffect:(ALuint) soundId; -/** plays an audio effect with a file path, pitch, pan and gain */ --(ALuint) playEffect:(NSString*) filePath loop:(BOOL)loop pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain; -/** pause an audio */ --(void) pauseEffect:(ALuint) soundId; -/** pause all audioes */ --(void) pauseAllEffects; -/** resume an audio */ --(void) resumeEffect:(ALuint) soundId; -/** resume all audioes */ --(void) resumeAllEffects; -/** stop all audioes */ --(void) stopAllEffects; -/** preloads an audio effect */ --(void) preloadEffect:(NSString*) filePath; -/** unloads an audio effect from memory */ --(void) unloadEffect:(NSString*) filePath; -/** Gets a CDSoundSource object set up to play the specified file. */ --(CDSoundSource *) soundSourceForFile:(NSString*) filePath; - -/** Shuts down the shared audio engine instance so that it can be reinitialised */ -+(void) end; - -@end diff --git a/cocos/audio/mac/SimpleAudioEngine_objc.m b/cocos/audio/mac/SimpleAudioEngine_objc.m deleted file mode 100644 index 2617d06a5e13..000000000000 --- a/cocos/audio/mac/SimpleAudioEngine_objc.m +++ /dev/null @@ -1,240 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - $Id$ - */ - -#import "audio/mac/SimpleAudioEngine_objc.h" - -@implementation SimpleAudioEngine - -static SimpleAudioEngine *sharedEngine = nil; -static CDSoundEngine* soundEngine = nil; -static CDAudioManager *am = nil; -static CDBufferManager *bufferManager = nil; - -// Init -+ (SimpleAudioEngine *) sharedEngine -{ - @synchronized(self) { - if (!sharedEngine) - sharedEngine = [[SimpleAudioEngine alloc] init]; - } - return sharedEngine; -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedEngine == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - --(id) init -{ - if((self=[super init])) { - am = [CDAudioManager sharedManager]; - soundEngine = am.soundEngine; - bufferManager = [[CDBufferManager alloc] initWithEngine:soundEngine]; - mute_ = NO; - enabled_ = YES; - } - return self; -} - -// Memory -- (void) dealloc -{ - am = nil; - soundEngine = nil; - bufferManager = nil; - [super dealloc]; -} - -+(void) end -{ - am = nil; - [CDAudioManager end]; - [bufferManager release]; - [sharedEngine release]; - sharedEngine = nil; -} - -#pragma mark SimpleAudioEngine - background music - --(void) preloadBackgroundMusic:(NSString*) filePath { - [am preloadBackgroundMusic:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath -{ - [am playBackgroundMusic:filePath loop:TRUE]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [am playBackgroundMusic:filePath loop:loop]; -} - --(void) stopBackgroundMusic -{ - [am stopBackgroundMusic]; -} - --(void) pauseBackgroundMusic { - [am pauseBackgroundMusic]; -} - --(void) resumeBackgroundMusic { - [am resumeBackgroundMusic]; -} - --(void) rewindBackgroundMusic { - [am rewindBackgroundMusic]; -} - --(BOOL) isBackgroundMusicPlaying { - return [am isBackgroundMusicPlaying]; -} - --(BOOL) willPlayBackgroundMusic { - return [am willPlayBackgroundMusic]; -} - -#pragma mark SimpleAudioEngine - sound effects - --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop -{ - return [self playEffect:filePath loop:loop pitch:1.0f pan:0.0f gain:1.0f]; -} - --(ALuint) playEffect:(NSString*) filePath loop:(BOOL) loop pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - return [soundEngine playSound:soundId sourceGroupId:0 pitch:pitch pan:pan gain:gain loop:loop]; - } else { - return CD_MUTE; - } -} - --(void) stopEffect:(ALuint) soundId { - [soundEngine stopSound:soundId]; -} - --(void) pauseEffect:(ALuint) soundId { - [soundEngine pauseSound: soundId]; -} - --(void) pauseAllEffects { - [soundEngine pauseAllSounds]; -} - --(void) resumeEffect:(ALuint) soundId { - [soundEngine resumeSound: soundId]; -} - --(void) resumeAllEffects { - [soundEngine resumeAllSounds]; -} - --(void) stopAllEffects { - [soundEngine stopAllSounds]; -} - --(void) preloadEffect:(NSString*) filePath -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId == kCDNoBuffer) { - CDLOG(@"Denshion::SimpleAudioEngine sound failed to preload %@",filePath); - } -} - --(void) unloadEffect:(NSString*) filePath -{ - CDLOGINFO(@"Denshion::SimpleAudioEngine unloadedEffect %@",filePath); - [bufferManager releaseBufferForFile:filePath]; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute_; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute_ != muteValue) { - mute_ = muteValue; - am.mute = mute_; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue -{ - if (enabled_ != enabledValue) { - enabled_ = enabledValue; - am.enabled = enabled_; - } -} - - -#pragma mark SimpleAudioEngine - BackgroundMusicVolume --(float) backgroundMusicVolume -{ - return am.backgroundMusic.volume; -} - --(void) setBackgroundMusicVolume:(float) volume -{ - am.backgroundMusic.volume = volume; -} - -#pragma mark SimpleAudioEngine - EffectsVolume --(float) effectsVolume -{ - return am.soundEngine.masterGain; -} - --(void) setEffectsVolume:(float) volume -{ - am.soundEngine.masterGain = volume; -} - --(CDSoundSource *) soundSourceForFile:(NSString*) filePath { - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - CDSoundSource *result = [soundEngine soundSourceForSound:soundId sourceGroupId:0]; - CDLOGINFO(@"Denshion::SimpleAudioEngine sound source created for %@",filePath); - return result; - } else { - return nil; - } -} - -@end diff --git a/cocos/audio/tizen/AudioEngine-tizen.cpp b/cocos/audio/tizen/AudioEngine-tizen.cpp deleted file mode 100644 index 2a45684508c1..000000000000 --- a/cocos/audio/tizen/AudioEngine-tizen.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "audio/tizen/AudioEngine-tizen.h" - -// for native asset manager -#include -#include -#include -#include "audio/include/AudioEngine.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" -#include "platform/CCFileUtils.h" -#include "platform/tizen/CCApplication-tizen.h" - -#include - -class AudioEngineThreadPool -{ -public: - AudioEngineThreadPool() - : _running(true) { - _threads = std::thread(std::bind(&AudioEngineThreadPool::threadFunc, this)); - } - - ~AudioEngineThreadPool() - { - _running = false; - _sleepCondition.notify_one(); - _threads.join(); - } - - void addTask(const std::function &task) { - _tasks.push(task); - _sleepCondition.notify_one(); - } -private: - bool _running; - std::thread _threads; - std::queue< std::function > _tasks; - - void threadFunc(void) { - while (true) { - std::function task = nullptr; - - if (_tasks.empty()) - { - if (!_running) - { - break; - } - std::unique_lock lk(_sleepMutex); - _sleepCondition.wait(lk); - continue; - } - - task = _tasks.front(); - - task(); - - _tasks.pop(); - } - } - - std::mutex _sleepMutex; - std::condition_variable _sleepCondition; -}; - -static AudioEngineThreadPool* _threadPool = nullptr; - -using namespace cocos2d; -using namespace cocos2d::experimental; - -static void sessionInterruptedCallback(sound_session_interrupted_code_e code, void *user_data) -{ - Application* app = Application::getInstance(); - if(app && app->isPaused()) - { - return; - } - if(code == SOUND_SESSION_INTERRUPTED_COMPLETED) - { - AudioEngine::resumeAll(); - } - else - { - AudioEngine::pauseAll(); - if (code == SOUND_SESSION_INTERRUPTED_BY_EARJACK_UNPLUG) - { - AudioEngine::resumeAll(); - } - } -} - -AudioPlayer::AudioPlayer() - : _playerHandle(nullptr) - , _finishCallback(nullptr) - , _initCallback(nullptr) - , _duration(0.0f) - , _playOver(false) - , _initSucceed(false) -{ -} - -static void _stopPlayer(player_h player) -{ - player_state_e state = PLAYER_STATE_NONE; - player_get_state(player, &state); - if (state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED) - { - player_stop(player); - } - player_unprepare(player); -} - -static void _pausePlayer(player_h player) -{ - player_state_e state; - player_get_state(player, &state); - - if(state == PLAYER_STATE_PLAYING) - { - player_pause(player); - } -} - -static void _resumePlayer(player_h player) -{ - player_state_e state; - player_get_state(player, &state); - - if(state != PLAYER_STATE_PLAYING) - { - player_start(player); - } -} - -AudioPlayer::~AudioPlayer() -{ - _taskMutex.lock(); - _threadPool->addTask(std::bind(_stopPlayer, _playerHandle)); - _threadPool->addTask(std::bind(player_destroy, _playerHandle)); - _taskMutex.unlock(); -} - -void AudioPlayer::stopPlayer() -{ - _playOver = true; -} - -static void completed_callback(void* user_data) -{ - AudioPlayer* player = (AudioPlayer*)user_data; - player->stopPlayer(); -} - -void AudioPlayer::init(const std::string& fileFullPath, float volume, bool loop) -{ - do - { - player_h player; - auto playerRet = player_create(&player); - if(playerRet != PLAYER_ERROR_NONE) - { - log("Fail to create player.Error code:%d",playerRet); - break; - } - - _playerHandle = player; - playerRet = player_set_uri(player, fileFullPath.c_str()); - if(playerRet != PLAYER_ERROR_NONE) - { - log("Fail to sets the data source for player.Error code:%d",playerRet); - break; - } - - player_set_volume(player, volume, volume); - player_set_completed_cb(player, completed_callback, this); - if (loop) - { - player_set_looping(player, true); - } - playerRet = player_prepare(player); - if(playerRet != PLAYER_ERROR_NONE){ - log("Fail to prepares the media player for playback.Error code:%d",playerRet); - break; - } - - playerRet = player_start(player); - if(playerRet != PLAYER_ERROR_NONE){ - log("Fail to starts playback.Error code:%d",playerRet); - break; - } - - _initSucceed = true; - } while (0); - - if (_initCallback) - { - _initCallback(); - } - _taskMutex.unlock(); -} - -//==================================================== -AudioEngineImpl::AudioEngineImpl() - : currentAudioID(0) - , _lazyInitLoop(true) -{ - -} - -AudioEngineImpl::~AudioEngineImpl() -{ - this->stopAll(); - - if (_threadPool) - { - delete _threadPool; - _threadPool = nullptr; - } - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this); -} - -bool AudioEngineImpl::init() -{ - sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA); - sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START, - SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY); - sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED); - - sound_manager_set_session_interrupted_cb(sessionInterruptedCallback, this); - - if (!_threadPool) - { - _threadPool = new (std::nothrow) AudioEngineThreadPool(); - } - - return true; -} - -int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume) -{ - auto audioId = AudioEngine::INVALID_AUDIO_ID; - - do - { - audioId = currentAudioID++; - - auto& player = _audioPlayers[audioId]; - player._audioID = audioId; - player._initCallback = std::bind(&AudioEngineImpl::initPlayerCallback,this,&player,audioId); - - player._taskMutex.lock(); - _threadPool->addTask(std::bind(&AudioPlayer::init,&player,FileUtils::getInstance()->fullPathForFilename(filePath), volume, loop)); - - if (_lazyInitLoop) { - _lazyInitLoop = false; - - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.03f, false); - } - } while (0); - - return audioId; -} - -void AudioEngineImpl::initPlayerCallback(AudioPlayer *player, int audioID) -{ - if (player->_initSucceed) - { - AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; - } - else - { - _threadMutex.lock(); - _toRemoveAudioIDs.push_back(audioID); - _threadMutex.unlock(); - } -} - -void AudioEngineImpl::update(float dt) -{ - if (_threadMutex.try_lock()) { - int audioID; - size_t removeAudioCount = _toRemoveAudioIDs.size(); - for (size_t index = 0; index < removeAudioCount; ++index) { - audioID = _toRemoveAudioIDs[index]; - auto playerIt = _audioPlayers.find(audioID); - if (playerIt != _audioPlayers.end()) { - if(playerIt->second._finishCallback) { - auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; - playerIt->second._finishCallback(audioID, *audioInfo.filePath); - } - _audioPlayers.erase(audioID); - AudioEngine::remove(audioID); - } - } - _threadMutex.unlock(); - } - - auto itend = _audioPlayers.end(); - for (auto iter = _audioPlayers.begin(); iter != itend; ++iter) - { - if(iter->second._playOver) - { - if (iter->second._finishCallback) - iter->second._finishCallback(iter->second._audioID, *AudioEngine::_audioIDInfoMap[iter->second._audioID].filePath); - - AudioEngine::remove(iter->second._audioID); - _audioPlayers.erase(iter); - break; - } - } - - if(_audioPlayers.empty()){ - _lazyInitLoop = true; - - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this); - } -} - -void AudioEngineImpl::setVolume(int audioID,float volume) -{ - auto& player = _audioPlayers[audioID]; - player_set_volume(player._playerHandle, volume, volume); -} - -void AudioEngineImpl::setLoop(int audioID, bool loop) -{ - auto& player = _audioPlayers[audioID]; - player_set_looping(player._playerHandle, loop); -} - -void AudioEngineImpl::pause(int audioID) -{ - auto& player = _audioPlayers[audioID]; - _threadPool->addTask(std::bind(_pausePlayer, player._playerHandle)); -} - -void AudioEngineImpl::resume(int audioID) -{ - auto& player = _audioPlayers[audioID]; - _threadPool->addTask(std::bind(_resumePlayer, player._playerHandle)); -} - -void AudioEngineImpl::stop(int audioID) -{ - _audioPlayers.erase(audioID); -} - -void AudioEngineImpl::stopAll() -{ - _audioPlayers.clear(); -} - -float AudioEngineImpl::getDuration(int audioID) -{ - int duration; - auto& player = _audioPlayers[audioID]; - auto ret = player_get_duration(player._playerHandle, &duration); - if(ret != PLAYER_ERROR_NONE) - { - log("Fail to get duration:%d",ret); - } - return duration / 1000.0f; -} - -float AudioEngineImpl::getCurrentTime(int audioID) -{ - int currPos; - auto& player = _audioPlayers[audioID]; - auto ret = player_get_play_position(player._playerHandle, &currPos); - if(ret != PLAYER_ERROR_NONE) - { - CCLOG("Fail to get position:%d",ret); - } - return currPos / 1000.0f; -} - -bool AudioEngineImpl::setCurrentTime(int audioID, float time) -{ - auto& player = _audioPlayers[audioID]; - int pos = 1000 * time; - player_set_play_position(player._playerHandle, pos, true, NULL, NULL); - - return true; -} - -void AudioEngineImpl::setFinishCallback(int audioID, const std::function &callback) -{ - _audioPlayers[audioID]._finishCallback = callback; -} - -void AudioEngineImpl::preload(const std::string& filePath, std::function callback) -{ - //TODO: implement preload on Tizen platform. -} - -#endif diff --git a/cocos/audio/tizen/AudioEngine-tizen.h b/cocos/audio/tizen/AudioEngine-tizen.h deleted file mode 100644 index d6d1cf4441d0..000000000000 --- a/cocos/audio/tizen/AudioEngine-tizen.h +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#ifndef __AUDIO_ENGINE_TIZEN_H_ -#define __AUDIO_ENGINE_TIZEN_H_ - -#include -#include -#include -#include -#include - -#include "base/CCRef.h" -#include "base/ccUtils.h" - -#define MAX_AUDIOINSTANCES 8 - -#define ERRORLOG(msg) log("fun:%s,line:%d,msg:%s",__func__,__LINE__,#msg) - -NS_CC_BEGIN - namespace experimental{ -class AudioEngineImpl; - -class AudioPlayer -{ -public: - AudioPlayer(); - ~AudioPlayer(); - - void init(const std::string& fileFullPath, float volume, bool loop); - void stopPlayer(); - - player_h _playerHandle; - std::function _initCallback; - std::mutex _taskMutex; - -private: - bool _playOver; - float _duration; - int _audioID; - bool _initSucceed; - - std::function _finishCallback; - - friend class AudioEngineImpl; -}; - -class AudioEngineImpl : public cocos2d::Ref -{ -public: - AudioEngineImpl(); - ~AudioEngineImpl(); - - bool init(); - int play2d(const std::string &fileFullPath ,bool loop ,float volume); - void setVolume(int audioID,float volume); - void setLoop(int audioID, bool loop); - void pause(int audioID); - void resume(int audioID); - void stop(int audioID); - void stopAll(); - float getDuration(int audioID); - float getCurrentTime(int audioID); - bool setCurrentTime(int audioID, float time); - void setFinishCallback(int audioID, const std::function &callback); - - void uncache(const std::string& filePath){} - void uncacheAll(){} - - void update(float dt); - - void preload(const std::string& filePath, std::function callback); - -private: - void initPlayerCallback(AudioPlayer *player, int audioID); - - //audioID,AudioInfo - std::unordered_map _audioPlayers; - - std::mutex _threadMutex; - std::vector _toRemoveAudioIDs; - - int currentAudioID; - - bool _lazyInitLoop; -}; - - } -NS_CC_END - -#endif // __AUDIO_ENGINE_TIZEN_H_ - -#endif diff --git a/cocos/audio/tizen/SimpleAudioEngineTizen.cpp b/cocos/audio/tizen/SimpleAudioEngineTizen.cpp deleted file mode 100644 index 9f47018a07c8..000000000000 --- a/cocos/audio/tizen/SimpleAudioEngineTizen.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "audio/include/SimpleAudioEngine.h" -#include "audio/include/AudioEngine.h" - -USING_NS_CC; -using namespace cocos2d::experimental; - -static float s_bgMusicVolume = 1.0f; -static float s_effectVolume = 1.0f; - -namespace CocosDenshion { - -SimpleAudioEngine::SimpleAudioEngine() { - -} - -SimpleAudioEngine::~SimpleAudioEngine() { -} - -SimpleAudioEngine* SimpleAudioEngine::getInstance() { - static SimpleAudioEngine s_SharedEngine; - return &s_SharedEngine; -} - -void SimpleAudioEngine::end() { - AudioEngine::end(); -} - -static int s_bgAudioID = AudioEngine::INVALID_AUDIO_ID; -static std::string bgMusicFilePath; -////////////////////////////////////////////////////////////////////////// -// BackgroundMusic -////////////////////////////////////////////////////////////////////////// - -void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath,bool bLoop) { - if (s_bgAudioID != AudioEngine::INVALID_AUDIO_ID) - { - AudioEngine::stop(s_bgAudioID); - s_bgAudioID = AudioEngine::INVALID_AUDIO_ID; - } - - if (pszFilePath) - { - bgMusicFilePath = pszFilePath; - s_bgAudioID = AudioEngine::play2d(pszFilePath,bLoop,s_bgMusicVolume); - } -} - -void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) { - AudioEngine::stop(s_bgAudioID); -} - -void SimpleAudioEngine::pauseBackgroundMusic() { - AudioEngine::pause(s_bgAudioID); -} - -void SimpleAudioEngine::resumeBackgroundMusic() { - AudioEngine::resume(s_bgAudioID); -} - -void SimpleAudioEngine::rewindBackgroundMusic() { - AudioEngine::stop(s_bgAudioID); - if (!bgMusicFilePath.empty()) - { - s_bgAudioID = AudioEngine::play2d(bgMusicFilePath); - } -} - -bool SimpleAudioEngine::willPlayBackgroundMusic() { - return false; -} - -bool SimpleAudioEngine::isBackgroundMusicPlaying() { - auto state = AudioEngine::getState(s_bgAudioID); - if (state == AudioEngine::AudioState::PLAYING) - { - return true; - } - return false; -} - -void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) { - bgMusicFilePath = pszFilePath; -} - -////////////////////////////////////////////////////////////////////////// -// effect function -////////////////////////////////////////////////////////////////////////// - -unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop, - float pitch, float pan, float gain) { - return AudioEngine::play2d(pszFilePath,bLoop,s_effectVolume); -} - -void SimpleAudioEngine::stopEffect(unsigned int nSoundId) { - AudioEngine::stop(nSoundId); -} - -void SimpleAudioEngine::preloadEffect(const char* pszFilePath) { - // FIXME: need implementation -} - -void SimpleAudioEngine::unloadEffect(const char* pszFilePath) { - AudioEngine::uncache(pszFilePath); -} - -void SimpleAudioEngine::pauseEffect(unsigned int uSoundId) { - AudioEngine::pause(uSoundId); -} - -void SimpleAudioEngine::pauseAllEffects() { - bool resumeBGMusic = false; - auto state = AudioEngine::getState(s_bgAudioID); - if (state == AudioEngine::AudioState::PLAYING) - { - resumeBGMusic = true; - } - AudioEngine::pauseAll(); - if (resumeBGMusic) - { - AudioEngine::resume(s_bgAudioID); - } -} - -void SimpleAudioEngine::resumeEffect(unsigned int uSoundId) { - AudioEngine::resume(uSoundId); -} - -void SimpleAudioEngine::resumeAllEffects() { - bool pauseBGMusic = false; - auto state = AudioEngine::getState(s_bgAudioID); - if (state == AudioEngine::AudioState::PAUSED) - { - pauseBGMusic = true; - } - AudioEngine::resumeAll(); - if (pauseBGMusic) - { - AudioEngine::pause(s_bgAudioID); - } -} - -void SimpleAudioEngine::stopAllEffects() { - //FIXME - AudioEngine::stopAll(); -} - - - -////////////////////////////////////////////////////////////////////////// -// volume interface -////////////////////////////////////////////////////////////////////////// - -float SimpleAudioEngine::getBackgroundMusicVolume() { - return s_bgMusicVolume; -} - -void SimpleAudioEngine::setBackgroundMusicVolume(float volume) { - if (volume > 1.0f) - { - volume = 1.0f; - } - else if(volume < 0.0f) - { - volume = 0.0f; - } - s_bgMusicVolume = volume; - AudioEngine::setVolume(s_bgAudioID, s_bgMusicVolume); -} - -float SimpleAudioEngine::getEffectsVolume() { - return s_effectVolume; -} - -void SimpleAudioEngine::setEffectsVolume(float volume) { - if (volume > 1.0f) - { - volume = 1.0f; - } - else if(volume < 0.0f) - { - volume = 0.0f; - } - s_effectVolume = volume; - //FIXME -} - - -} // end of namespace CocosDenshion - -#endif diff --git a/cocos/audio/win32/SimpleAudioEngine.cpp b/cocos/audio/win32/SimpleAudioEngine.cpp deleted file mode 100644 index f0dcd9a1b919..000000000000 --- a/cocos/audio/win32/SimpleAudioEngine.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "audio/include/SimpleAudioEngine.h" - -#include -#include - -#include "audio/win32/MciPlayer.h" -#include "platform/CCFileUtils.h" - -USING_NS_CC; - -using namespace std; - -namespace CocosDenshion { - -typedef map EffectList; -typedef pair Effect; - -static char s_szRootPath[MAX_PATH]; -static DWORD s_dwRootLen; -static char s_szFullPath[MAX_PATH]; - -static std::string _FullPath(const char * szPath); -static unsigned int _Hash(const char *key); - -#define BREAK_IF(cond) if (cond) break; - -static EffectList& sharedList() -{ - static EffectList s_List; - return s_List; -} - -static MciPlayer& sharedMusic() -{ - static MciPlayer s_Music; - return s_Music; -} - -SimpleAudioEngine::SimpleAudioEngine() -{ -} - -SimpleAudioEngine::~SimpleAudioEngine() -{ -} - -SimpleAudioEngine* SimpleAudioEngine::getInstance() -{ - static SimpleAudioEngine s_SharedEngine; - return &s_SharedEngine; -} - -void SimpleAudioEngine::end() -{ - sharedMusic().Close(); - - for (auto& iter : sharedList()) - { - delete iter.second; - iter.second = nullptr; - } - sharedList().clear(); - return; -} - -////////////////////////////////////////////////////////////////////////// -// BackgroundMusic -////////////////////////////////////////////////////////////////////////// - -void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - if (! pszFilePath) - { - return; - } - - sharedMusic().Open(_FullPath(pszFilePath).c_str(), _Hash(pszFilePath)); - sharedMusic().Play((bLoop) ? -1 : 1); -} - -void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) -{ - if (bReleaseData) - { - sharedMusic().Close(); - } - else - { - sharedMusic().Stop(); - } -} - -void SimpleAudioEngine::pauseBackgroundMusic() -{ - sharedMusic().Pause(); -} - -void SimpleAudioEngine::resumeBackgroundMusic() -{ - sharedMusic().Resume(); -} - -void SimpleAudioEngine::rewindBackgroundMusic() -{ - sharedMusic().Rewind(); -} - -bool SimpleAudioEngine::willPlayBackgroundMusic() -{ - return false; -} - -bool SimpleAudioEngine::isBackgroundMusicPlaying() -{ - return sharedMusic().IsPlaying(); -} - -////////////////////////////////////////////////////////////////////////// -// effect function -////////////////////////////////////////////////////////////////////////// - -unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop, - float pitch, float pan, float gain) -{ - unsigned int nRet = _Hash(pszFilePath); - - preloadEffect(pszFilePath); - - EffectList::iterator p = sharedList().find(nRet); - if (p != sharedList().end()) - { - p->second->Play((bLoop) ? -1 : 1); - } - - return nRet; -} - -void SimpleAudioEngine::stopEffect(unsigned int nSoundId) -{ - EffectList::iterator p = sharedList().find(nSoundId); - if (p != sharedList().end()) - { - p->second->Stop(); - } -} - -void SimpleAudioEngine::preloadEffect(const char* pszFilePath) -{ - int nRet = 0; - do - { - BREAK_IF(! pszFilePath); - - nRet = _Hash(pszFilePath); - - BREAK_IF(sharedList().end() != sharedList().find(nRet)); - - sharedList().insert(Effect(nRet, new MciPlayer())); - MciPlayer * pPlayer = sharedList()[nRet]; - pPlayer->Open(_FullPath(pszFilePath).c_str(), nRet); - - BREAK_IF(nRet == pPlayer->GetSoundID()); - - delete pPlayer; - sharedList().erase(nRet); - nRet = 0; - } while (0); -} - -void SimpleAudioEngine::pauseEffect(unsigned int nSoundId) -{ - EffectList::iterator p = sharedList().find(nSoundId); - if (p != sharedList().end()) - { - p->second->Pause(); - } -} - -void SimpleAudioEngine::pauseAllEffects() -{ - for (auto& iter : sharedList()) - { - iter.second->Pause(); - } -} - -void SimpleAudioEngine::resumeEffect(unsigned int nSoundId) -{ - EffectList::iterator p = sharedList().find(nSoundId); - if (p != sharedList().end()) - { - p->second->Resume(); - } -} - -void SimpleAudioEngine::resumeAllEffects() -{ - for (auto& iter : sharedList()) - { - iter.second->Resume(); - } -} - -void SimpleAudioEngine::stopAllEffects() -{ - for (auto& iter : sharedList()) - { - iter.second->Stop(); - } -} - -void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) -{ - -} - -void SimpleAudioEngine::unloadEffect(const char* pszFilePath) -{ - unsigned int nID = _Hash(pszFilePath); - - EffectList::iterator p = sharedList().find(nID); - if (p != sharedList().end()) - { - delete p->second; - p->second = nullptr; - sharedList().erase(nID); - } -} - -////////////////////////////////////////////////////////////////////////// -// volume interface -////////////////////////////////////////////////////////////////////////// - -float SimpleAudioEngine::getBackgroundMusicVolume() -{ - return 1.0; -} - -void SimpleAudioEngine::setBackgroundMusicVolume(float volume) -{ -} - -float SimpleAudioEngine::getEffectsVolume() -{ - return 1.0; -} - -void SimpleAudioEngine::setEffectsVolume(float volume) -{ -} - -////////////////////////////////////////////////////////////////////////// -// static function -////////////////////////////////////////////////////////////////////////// - -static std::string _FullPath(const char * szPath) -{ - return FileUtils::getInstance()->fullPathForFilename(szPath); -} - -unsigned int _Hash(const char *key) -{ - unsigned int len = strlen(key); - const char *end=key+len; - unsigned int hash; - - for (hash = 0; key < end; key++) - { - hash *= 16777619; - hash ^= (unsigned int) (unsigned char) toupper(*key); - } - return (hash); -} - -} // end of namespace CocosDenshion diff --git a/cocos/audio/winrt/Audio.cpp b/cocos/audio/winrt/Audio.cpp deleted file mode 100644 index 99b5adbedfd0..000000000000 --- a/cocos/audio/winrt/Audio.cpp +++ /dev/null @@ -1,602 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "audio/winrt/Audio.h" -#include "platform/CCCommon.h" -#include "audio/winrt/AudioSourceReader.h" - -inline void ThrowIfFailed(HRESULT hr) -{ - if (FAILED(hr)) - { - // Set a breakpoint on this line to catch DX API errors. - throw Platform::Exception::CreateException(hr); - } -} - -void AudioEngineCallbacks::Initialize(Audio *audio) -{ - m_audio = audio; -} - -// Called in the event of a critical system error which requires XAudio2 -// to be closed down and restarted. The error code is given in error. -void _stdcall AudioEngineCallbacks::OnCriticalError(HRESULT Error) -{ - UNUSED_PARAM(Error); - m_audio->SetEngineExperiencedCriticalError(); -}; - -Audio::Audio() : - m_backgroundID(0), - m_soundEffctVolume(1.0f), - m_backgroundMusicVolume(1.0f) -{ -} - -void Audio::Initialize() -{ - m_engineExperiencedCriticalError = false; - - m_musicEngine = nullptr; - m_soundEffectEngine = nullptr; - m_musicMasteringVoice = nullptr; - m_soundEffectMasteringVoice = nullptr; -} - -void Audio::CreateResources() -{ - do - { - if (FAILED(XAudio2Create(&m_musicEngine))) - { - m_engineExperiencedCriticalError = true; - break; - } - -#if defined(_DEBUG) - XAUDIO2_DEBUG_CONFIGURATION debugConfig = {0}; - debugConfig.BreakMask = XAUDIO2_LOG_ERRORS; - debugConfig.TraceMask = XAUDIO2_LOG_ERRORS; - m_musicEngine->SetDebugConfiguration(&debugConfig); -#endif - - m_musicEngineCallback.Initialize(this); - m_musicEngine->RegisterForCallbacks(&m_musicEngineCallback); - - // This sample plays the equivalent of background music, which we tag on the mastering voice as AudioCategory_GameMedia. - // In ordinary usage, if we were playing the music track with no effects, we could route it entirely through - // Media Foundation. Here we are using XAudio2 to apply a reverb effect to the music, so we use Media Foundation to - // decode the data then we feed it through the XAudio2 pipeline as a separate Mastering Voice, so that we can tag it - // as Game Media. - // We default the mastering voice to 2 channels to simplify the reverb logic. - if(FAILED(m_musicEngine->CreateMasteringVoice(&m_musicMasteringVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, nullptr, nullptr, AudioCategory_GameMedia))) - { - m_engineExperiencedCriticalError = true; - break; - } - - // Create a separate engine and mastering voice for sound effects in the sample - // Games will use many voices in a complex graph for audio, mixing all effects down to a - // single mastering voice. - // We are creating an entirely new engine instance and mastering voice in order to tag - // our sound effects with the audio category AudioCategory_GameEffects. - if(FAILED(XAudio2Create(&m_soundEffectEngine))) - { - m_engineExperiencedCriticalError = true; - break; - } - - m_soundEffectEngineCallback.Initialize(this); - m_soundEffectEngine->RegisterForCallbacks(&m_soundEffectEngineCallback); - - // We default the mastering voice to 2 channels to simplify the reverb logic. - if(FAILED(m_soundEffectEngine->CreateMasteringVoice(&m_soundEffectMasteringVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, nullptr, nullptr, AudioCategory_GameEffects))) - { - m_engineExperiencedCriticalError = true; - break; - } - } while (false); -} - -unsigned int Audio::Hash(const char *key) -{ - unsigned int len = static_cast(strlen(key)); - const char *end=key+len; - unsigned int hash; - - for (hash = 0; key < end; key++) - { - hash *= 16777619; - hash ^= (unsigned int) (unsigned char) toupper(*key); - } - return (hash); -} - -void Audio::ReleaseResources() -{ - if (m_musicMasteringVoice != nullptr) - { - m_musicMasteringVoice->DestroyVoice(); - m_musicMasteringVoice = nullptr; - } - if (m_soundEffectMasteringVoice != nullptr) - { - m_soundEffectMasteringVoice->DestroyVoice(); - m_soundEffectMasteringVoice = nullptr; - } - - for (auto& EffectIter : m_soundEffects) - { - if (EffectIter.second.m_soundEffectSourceVoice != nullptr) - { - EffectIter.second.m_soundEffectSourceVoice->DestroyVoice(); - EffectIter.second.m_soundEffectSourceVoice = nullptr; - } - } - m_soundEffects.clear(); - - m_musicEngine = nullptr; - m_soundEffectEngine = nullptr; -} - -void Audio::Start() -{ - if (m_engineExperiencedCriticalError) - { - return; - } - - if (! m_backgroundFile.empty()) - PlayBackgroundMusic(m_backgroundFile.c_str(), m_backgroundLoop); -} - -// This sample processes audio buffers during the render cycle of the application. -// As long as the sample maintains a high-enough frame rate, this approach should -// not glitch audio. In game code, it is best for audio buffers to be processed -// on a separate thread that is not synced to the main render loop of the game. -void Audio::Render() -{ - if (m_engineExperiencedCriticalError) - { - ReleaseResources(); - Initialize(); - CreateResources(); - Start(); - if (m_engineExperiencedCriticalError) - { - return; - } - } -} - -void Audio::PlayBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - m_backgroundFile = pszFilePath; - m_backgroundLoop = bLoop; - - if (m_engineExperiencedCriticalError) { - return; - } - - StopBackgroundMusic(true); - PlaySoundEffect(pszFilePath, bLoop, m_backgroundID, true); -} - -void Audio::StopBackgroundMusic(bool bReleaseData) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - StopSoundEffect(m_backgroundID); - - if (bReleaseData){ - UnloadSoundEffect(m_backgroundID); - RemoveFromList(m_backgroundID); - } -} - -void Audio::PauseBackgroundMusic() -{ - if (m_engineExperiencedCriticalError) { - return; - } - - PauseSoundEffect(m_backgroundID); -} - -void Audio::ResumeBackgroundMusic() -{ - if (m_engineExperiencedCriticalError) { - return; - } - - ResumeSoundEffect(m_backgroundID); -} - -void Audio::RewindBackgroundMusic() -{ - if (m_engineExperiencedCriticalError) { - return; - } - - RewindSoundEffect(m_backgroundID); -} - -bool Audio::IsBackgroundMusicPlaying() -{ - return IsSoundEffectStarted(m_backgroundID) && !IsSoundEffectPaused(m_backgroundID); -} - -void Audio::SetBackgroundVolume(float volume) -{ - m_backgroundMusicVolume = volume; - - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() != m_soundEffects.find(m_backgroundID)) - { - m_soundEffects[m_backgroundID].m_soundEffectSourceVoice->SetVolume(volume); - } -} - -float Audio::GetBackgroundVolume() -{ - return m_backgroundMusicVolume; -} - -void Audio::SetSoundEffectVolume(float volume) -{ - m_soundEffctVolume = volume; - - if (m_engineExperiencedCriticalError) { - return; - } - - for (auto& iter : m_soundEffects) - { - if (iter.first != m_backgroundID) - iter.second.m_soundEffectSourceVoice->SetVolume(m_soundEffctVolume); - } -} - -float Audio::GetSoundEffectVolume() -{ - return m_soundEffctVolume; -} - -void Audio::PlaySoundEffect(const char* pszFilePath, bool bLoop, unsigned int& sound, bool isMusic) -{ - sound = Hash(pszFilePath); - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - { - PreloadSoundEffect(pszFilePath, isMusic); - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - m_soundEffects[sound].m_audioBuffer.LoopCount = bLoop ? XAUDIO2_LOOP_INFINITE : 0; - - PlaySoundEffect(sound); -} - -void Audio::PlaySoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - StopSoundEffect(sound); - - if (FAILED(m_soundEffects[sound].m_soundEffectSourceVoice->SubmitSourceBuffer(&m_soundEffects[sound].m_audioBuffer))) - { - m_engineExperiencedCriticalError = true; - } - - if (m_engineExperiencedCriticalError) { - // If there's an error, then we'll recreate the engine on the next render pass - return; - } - - SoundEffectData* soundEffect = &m_soundEffects[sound]; - HRESULT hr = soundEffect->m_soundEffectSourceVoice->Start(); - if FAILED(hr) - { - m_engineExperiencedCriticalError = true; - return; - } - - m_soundEffects[sound].m_soundEffectStarted = true; - m_soundEffects[sound].m_soundEffectPaused = false; -} - -void Audio::StopSoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - HRESULT hr = m_soundEffects[sound].m_soundEffectSourceVoice->Stop(); - HRESULT hr1 = m_soundEffects[sound].m_soundEffectSourceVoice->FlushSourceBuffers(); - if (FAILED(hr) || FAILED(hr1)) - { - // If there's an error, then we'll recreate the engine on the next render pass - m_engineExperiencedCriticalError = true; - return; - } - - m_soundEffects[sound].m_soundEffectStarted = false; - m_soundEffects[sound].m_soundEffectPaused = false; -} - -void Audio::PauseSoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - HRESULT hr = m_soundEffects[sound].m_soundEffectSourceVoice->Stop(); - if FAILED(hr) - { - // If there's an error, then we'll recreate the engine on the next render pass - m_engineExperiencedCriticalError = true; - return; - } - m_soundEffects[sound].m_soundEffectPaused = true; -} - -void Audio::ResumeSoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - HRESULT hr = m_soundEffects[sound].m_soundEffectSourceVoice->Start(); - if FAILED(hr) - { - // If there's an error, then we'll recreate the engine on the next render pass - m_engineExperiencedCriticalError = true; - return; - } - m_soundEffects[sound].m_soundEffectPaused = false; -} - -void Audio::RewindSoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - StopSoundEffect(sound); - PlaySoundEffect(sound); -} - -void Audio::PauseAllSoundEffects() -{ - if (m_engineExperiencedCriticalError) { - return; - } - - for (auto& iter : m_soundEffects) - { - if (iter.first != m_backgroundID) - PauseSoundEffect(iter.first); - } -} - -void Audio::ResumeAllSoundEffects() -{ - if (m_engineExperiencedCriticalError) { - return; - } - - for (auto& iter : m_soundEffects) - { - if (iter.first != m_backgroundID) - ResumeSoundEffect(iter.first); - } -} - -void Audio::StopAllSoundEffects(bool bReleaseData) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - EffectList::iterator iter; - for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) - { - if (iter->first != m_backgroundID){ - StopSoundEffect(iter->first); - if (bReleaseData) - { - UnloadSoundEffect(iter->first); - } - } - } - if (bReleaseData) - { - for (iter = m_soundEffects.begin(); iter != m_soundEffects.end();) - { - if (iter->first != m_backgroundID){ - m_soundEffects.erase(iter++); - } - else - { - iter++; - } - } - } -} - -bool Audio::IsSoundEffectStarted(unsigned int sound) -{ - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return false; - - return m_soundEffects[sound].m_soundEffectStarted; -} - -bool Audio::IsSoundEffectPaused(unsigned int sound) -{ - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return false; - - return m_soundEffects[sound].m_soundEffectPaused; -} - -void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - int sound = Hash(pszFilePath); - - std::unique_ptr reader = std::make_unique(); - - if (!reader) { - return; - } - - static_cast(reader.get())->doLargeFileSupport(false); - - if (!reader->initialize(pszFilePath)) { - return; - } - - m_soundEffects[sound].m_soundID = sound; - size_t bufferLength = reader->getTotalAudioBytes(); - WAVEFORMATEX wfx = reader->getWaveFormatInfo(); - - cocos2d::experimental::AudioDataChunk chunk; - if (!reader->consumeChunk(chunk)) { - return; - } - - m_soundEffects[sound].m_soundEffectBufferData = new (std::nothrow) BYTE[chunk._dataSize]; - if (nullptr == m_soundEffects[sound].m_soundEffectBufferData) { - return; - } - - m_soundEffects[sound].m_soundEffectBufferLength = chunk._dataSize; - CopyMemory(m_soundEffects[sound].m_soundEffectBufferData, chunk._data->data(), chunk._dataSize); - - if (isMusic) - { - XAUDIO2_SEND_DESCRIPTOR descriptors[1]; - descriptors[0].pOutputVoice = m_musicMasteringVoice; - descriptors[0].Flags = 0; - XAUDIO2_VOICE_SENDS sends = {0}; - sends.SendCount = 1; - sends.pSends = descriptors; - - if (FAILED(m_musicEngine->CreateSourceVoice(&m_soundEffects[sound].m_soundEffectSourceVoice, - &wfx, 0, 1.0f, &m_voiceContext, &sends))) - { - m_engineExperiencedCriticalError = true; - } - //fix bug: set a initial volume - m_soundEffects[sound].m_soundEffectSourceVoice->SetVolume(m_backgroundMusicVolume); - } else - { - XAUDIO2_SEND_DESCRIPTOR descriptors[1]; - descriptors[0].pOutputVoice = m_soundEffectMasteringVoice; - descriptors[0].Flags = 0; - XAUDIO2_VOICE_SENDS sends = {0}; - sends.SendCount = 1; - sends.pSends = descriptors; - - if(FAILED(m_soundEffectEngine->CreateSourceVoice(&m_soundEffects[sound].m_soundEffectSourceVoice, - &wfx, 0, 1.0f, &m_voiceContext, &sends, nullptr))) - { - m_engineExperiencedCriticalError = true; - } - //fix bug: set a initial volume - m_soundEffects[sound].m_soundEffectSourceVoice->SetVolume(m_soundEffctVolume); - } - - m_soundEffects[sound].m_soundEffectSampleRate = wfx.nSamplesPerSec; - - // Queue in-memory buffer for playback - ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); - - m_soundEffects[sound].m_audioBuffer.AudioBytes = static_cast(m_soundEffects[sound].m_soundEffectBufferLength); - m_soundEffects[sound].m_audioBuffer.pAudioData = m_soundEffects[sound].m_soundEffectBufferData; - m_soundEffects[sound].m_audioBuffer.pContext = &m_soundEffects[sound]; - m_soundEffects[sound].m_audioBuffer.Flags = XAUDIO2_END_OF_STREAM; - m_soundEffects[sound].m_audioBuffer.LoopCount = 0; -} - -void Audio::UnloadSoundEffect(const char* pszFilePath) -{ - int sound = Hash(pszFilePath); - - UnloadSoundEffect(sound); - - RemoveFromList(sound); -} - -void Audio::UnloadSoundEffect(unsigned int sound) -{ - if (m_engineExperiencedCriticalError) { - return; - } - - if (m_soundEffects.end() == m_soundEffects.find(sound)) - return; - - m_soundEffects[sound].m_soundEffectSourceVoice->DestroyVoice(); - - if(m_soundEffects[sound].m_soundEffectBufferData) - delete [] m_soundEffects[sound].m_soundEffectBufferData; - - m_soundEffects[sound].m_soundEffectBufferData = nullptr; - m_soundEffects[sound].m_soundEffectSourceVoice = nullptr; - m_soundEffects[sound].m_soundEffectStarted = false; - m_soundEffects[sound].m_soundEffectPaused = false; - ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); -} - -void Audio::RemoveFromList( unsigned int sound ) -{ - m_soundEffects.erase(sound); -} - - diff --git a/cocos/audio/winrt/Audio.h b/cocos/audio/winrt/Audio.h deleted file mode 100644 index 10f8929ba07c..000000000000 --- a/cocos/audio/winrt/Audio.h +++ /dev/null @@ -1,169 +0,0 @@ -//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -//// PARTICULAR PURPOSE. -//// -//// Copyright (c) Microsoft Corporation. All rights reserved - -// For licensing information relating to this distribution please see Third Party Notices file. - -#pragma once - -#include -#include -#include -#include -#include - -#define XAUDIO2_HELPER_FUNCTIONS 1 -#include -#include - -static const int STREAMING_BUFFER_SIZE = 65536; -static const int MAX_BUFFER_COUNT = 3; - -#define UNUSED_PARAM(unusedparam) (void)unusedparam - -struct SoundEffectData -{ - unsigned int m_soundID; - IXAudio2SourceVoice* m_soundEffectSourceVoice; - XAUDIO2_BUFFER m_audioBuffer; - byte* m_soundEffectBufferData; - size_t m_soundEffectBufferLength; - uint32 m_soundEffectSampleRate; - bool m_soundEffectStarted; - bool m_soundEffectPaused; -}; - -class Audio; -class AudioEngineCallbacks: public IXAudio2EngineCallback -{ -private: - Audio *m_audio; - -public : - AudioEngineCallbacks(){}; - void Initialize(Audio* audio); - - // Called by XAudio2 just before an audio processing pass begins. - void _stdcall OnProcessingPassStart(){}; - - // Called just after an audio processing pass ends. - void _stdcall OnProcessingPassEnd(){}; - - // Called in the event of a critical system error which requires XAudio2 - // to be closed down and restarted. The error code is given in Error. - void _stdcall OnCriticalError(HRESULT Error); -}; - -struct StreamingVoiceContext : public IXAudio2VoiceCallback -{ - STDMETHOD_(void, OnVoiceProcessingPassStart)(UINT32){} - STDMETHOD_(void, OnVoiceProcessingPassEnd)(){} - STDMETHOD_(void, OnStreamEnd)(){} - STDMETHOD_(void, OnBufferStart)(void*) - { - ResetEvent(hBufferEndEvent); - } - STDMETHOD_(void, OnBufferEnd)(void* pContext) - { - //Trigger the event for the music stream. - if (pContext == 0) { - SetEvent(hBufferEndEvent); - } - } - STDMETHOD_(void, OnLoopEnd)(void*){} - STDMETHOD_(void, OnVoiceError)(void*, HRESULT){} - - HANDLE hBufferEndEvent; - StreamingVoiceContext() : hBufferEndEvent(CreateEventEx(NULL, FALSE, FALSE, NULL)) - { - } - virtual ~StreamingVoiceContext() - { - CloseHandle(hBufferEndEvent); - } -}; - -class Audio -{ -private: - IXAudio2* m_musicEngine; - IXAudio2* m_soundEffectEngine; - IXAudio2MasteringVoice* m_musicMasteringVoice; - IXAudio2MasteringVoice* m_soundEffectMasteringVoice; - - StreamingVoiceContext m_voiceContext; - - typedef std::map EffectList; - typedef std::pair Effect; - EffectList m_soundEffects; - - unsigned int m_backgroundID; - std::string m_backgroundFile; - bool m_backgroundLoop; - - float m_soundEffctVolume; - float m_backgroundMusicVolume; - - bool m_engineExperiencedCriticalError; - AudioEngineCallbacks m_musicEngineCallback; - AudioEngineCallbacks m_soundEffectEngineCallback; - - unsigned int Hash(const char* key); - -public: - Audio(); - - void Initialize(); - void CreateResources(); - void ReleaseResources(); - void Start(); - void Render(); - - // This flag can be used to tell when the audio system is experiencing critical errors. - // XAudio2 gives a critical error when the user unplugs their headphones, and a new - // speaker configuration is generated. - void SetEngineExperiencedCriticalError() - { - m_engineExperiencedCriticalError = true; - } - - bool HasEngineExperiencedCriticalError() - { - return m_engineExperiencedCriticalError; - } - - void PlayBackgroundMusic(const char* pszFilePath, bool bLoop); - void StopBackgroundMusic(bool bReleaseData); - void PauseBackgroundMusic(); - void ResumeBackgroundMusic(); - void RewindBackgroundMusic(); - bool IsBackgroundMusicPlaying(); - - void SetBackgroundVolume(float volume); - float GetBackgroundVolume(); - void SetSoundEffectVolume(float volume); - float GetSoundEffectVolume(); - - void PlaySoundEffect(const char* pszFilePath, bool bLoop, unsigned int& sound, bool isMusic = false); - void PlaySoundEffect(unsigned int sound); - bool IsSoundEffectStarted(unsigned int sound); - bool IsSoundEffectPaused(unsigned int sound); - void StopSoundEffect(unsigned int sound); - void PauseSoundEffect(unsigned int sound); - void ResumeSoundEffect(unsigned int sound); - void RewindSoundEffect(unsigned int sound); - - void PauseAllSoundEffects(); - void ResumeAllSoundEffects(); - void StopAllSoundEffects(bool bReleaseData); - - void PreloadSoundEffect(const char* pszFilePath, bool isMusic = false); - void UnloadSoundEffect(const char* pszFilePath); - void UnloadSoundEffect(unsigned int sound); - -private: - void RemoveFromList(unsigned int sound); -}; diff --git a/cocos/audio/winrt/AudioCachePlayer.cpp b/cocos/audio/winrt/AudioCachePlayer.cpp deleted file mode 100644 index 17715f93ebae..000000000000 --- a/cocos/audio/winrt/AudioCachePlayer.cpp +++ /dev/null @@ -1,634 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#include "audio/winrt/AudioCachePlayer.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" - -using namespace cocos2d; -using namespace cocos2d::experimental; - -inline void ThrowIfFailed(HRESULT hr) -{ - if (FAILED(hr)) { - // Set a breakpoint on this line to catch XAudio2 API errors. - throw Platform::Exception::CreateException(hr); - } -} - - -// AudioCache -AudioCache::AudioCache() - : _isReady(false) - , _retry(false) - , _fileFullPath("") - , _srcReader(nullptr) - , _fileFormat(FileFormat::UNKNOWN) -{ - _callbacks.clear(); - memset(&_audInfo, 0, sizeof(AudioInfo)); -} - -AudioCache::~AudioCache() -{ - _callbacks.clear(); - - if (nullptr != _srcReader) { - delete _srcReader; - _srcReader = nullptr; - } -} - -void AudioCache::readDataTask() -{ - if (_isReady) { - return; - } - - if (nullptr != _srcReader) { - delete _srcReader; - _srcReader = nullptr; - } - - switch (_fileFormat) - { - case FileFormat::WAV: - _srcReader = new (std::nothrow) WAVReader(); - break; - - case FileFormat::OGG: - _srcReader = new (std::nothrow) OGGReader(); - break; - - case FileFormat::MP3: - _srcReader = new (std::nothrow) MP3Reader(); - - break; - - case FileFormat::UNKNOWN: - default: - break; - } - - if (_srcReader && _srcReader->initialize(_fileFullPath)) { - _audInfo._totalAudioBytes = _srcReader->getTotalAudioBytes(); - _audInfo._wfx = _srcReader->getWaveFormatInfo(); - _isReady = true; - _retry = false; - invokePlayCallbacks(); - } - - if (!_isReady) { - _retry = true; - log("Failed to read input file: %s.\n", _fileFullPath.c_str()); - } - - invokeLoadCallbacks(); -} - -void AudioCache::addPlayCallback(const std::function &callback) -{ - _cbMutex.lock(); - if (_isReady) { - callback(); - } - else { - _callbacks.push_back(callback); - } - _cbMutex.unlock(); - - if (_retry) { - readDataTask(); - } -} - -void AudioCache::addLoadCallback(const std::function &callback) -{ - if (_isReady) { - callback(true); - } - else { - _loadCallbacks.push_back(callback); - } - - if (_retry) { - readDataTask(); - } -} - -void AudioCache::invokePlayCallbacks() -{ - _cbMutex.lock(); - auto cnt = _callbacks.size(); - for (size_t ind = 0; ind < cnt; ind++) - { - _callbacks[ind](); - } - _callbacks.clear(); - _cbMutex.unlock(); -} - -void AudioCache::invokeLoadCallbacks() -{ - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([&](){ - auto cnt = _loadCallbacks.size(); - for (size_t ind = 0; ind < cnt; ind++) - { - _loadCallbacks[ind](_isReady); - } - _loadCallbacks.clear(); - }); -} - -bool AudioCache::getChunk(AudioDataChunk& chunk) -{ - bool ret = false; - - if (nullptr != _srcReader) { - ret = _srcReader->consumeChunk(chunk); - } - - return ret; -} - -void AudioCache::doBuffering() -{ - if (isStreamingSource()){ - _srcReader->produceChunk(); - } -} - -bool AudioCache::isStreamingSource() -{ - if (nullptr != _srcReader) { - return _srcReader->isStreamingSource(); - } - - return false; -} - -void AudioCache::seek(const float ratio) -{ - if (nullptr != _srcReader){ - _srcReader->seekTo(ratio); - } -} - - -// AudioPlayer -AudioPlayer::AudioPlayer() - : _loop(false) - , _ready(false) - , _current(0.0) - , _volume(0.0) - , _duration(0.0) - , _cache(nullptr) - , _totalSamples(0) - , _samplesOffset(0) - , _criticalError(false) - , _isStreaming(false) - , _finishCallback(nullptr) - , _xaMasterVoice(nullptr) - , _xaSourceVoice(nullptr) - , _state(AudioPlayerState::INITIALIZING) -{ - init(); -} - -AudioPlayer::~AudioPlayer() -{ - free(); -} - -void AudioPlayer::stop() -{ - _stop(); -} - -void AudioPlayer::pause() -{ - _stop(true); -} - -bool AudioPlayer::update() -{ - if (_criticalError){ - free(); - init(); - } - - if (_cache != nullptr) { - _cache->doBuffering(); - } - - //log("bufferQueued: %d, _current: %f", _cachedBufferQ.size(), _current); - return _criticalError; -} - -void AudioPlayer::resume() -{ - _play(true); -} - -bool AudioPlayer::isInError() -{ - return _criticalError; -} - -float AudioPlayer::getDuration() -{ - if (nullptr == _cache) { - return _duration; - } - - auto fmt = _cache->_audInfo._wfx; - - if (!fmt.nChannels) { - return _duration; - } - - if ((int)_duration <= 0) - { - switch (fmt.wFormatTag) - { - case WAVE_FORMAT_PCM: - case WAVE_FORMAT_ADPCM: - _duration = (float(_cache->_audInfo._totalAudioBytes / ((fmt.wBitsPerSample / 8) * fmt.nChannels)) / fmt.nSamplesPerSec) * 1000; - _totalSamples = fmt.nSamplesPerSec * _duration / 1000; - break; - - default: - break; - } - } - - return _duration; -} - -float AudioPlayer::getCurrentTime() -{ - _stMutex.lock(); - auto samplesPlayed = getSourceVoiceState().SamplesPlayed; - //log("_samplesOffset: %lu, samplesPlayed: %lu, _current: %f", (UINT32)_samplesOffset, (UINT32)samplesPlayed, _current); - _current += ((samplesPlayed - _samplesOffset) / (float)_totalSamples) * _duration; - _current = _current > _duration ? 0.0 : _current; - _samplesOffset = samplesPlayed; - _stMutex.unlock(); - return _current; -} - -bool AudioPlayer::setTime(float time) -{ - bool ret = true; - _stop(); - - if (!_isStreaming) { - auto fmt = _cache->_audInfo._wfx; - int seek = (time / _duration) * _totalSamples; - seek -= (seek % (fmt.nChannels * fmt.nBlockAlign)); - - _xaBuffer.LoopCount = 0; - _xaBuffer.PlayBegin = seek; - _xaBuffer.PlayLength = _totalSamples - seek; - - if (_xaBuffer.PlayBegin >= _totalSamples) { - _xaBuffer.PlayBegin = _totalSamples - (fmt.nChannels * fmt.nBlockAlign); - _xaBuffer.PlayLength = (fmt.nChannels * fmt.nBlockAlign); - } - } - - _stMutex.lock(); - _samplesOffset = getSourceVoiceState().SamplesPlayed; - _current = time; - _stMutex.unlock(); - _play(); - return ret; -} - -void AudioPlayer::setVolume(float volume) -{ - if (_xaMasterVoice != nullptr){ - if (FAILED(_xaMasterVoice->SetVolume(volume))) { - error(); - } - else { - _volume = volume; - } - } -} - -bool AudioPlayer::play2d(AudioCache* cache) -{ - bool ret = false; - HRESULT hr = S_OK; - - if (cache != nullptr) - { - _cache = cache; - if (nullptr == _xaSourceVoice && _ready) { - - XAUDIO2_SEND_DESCRIPTOR descriptors[1]; - descriptors[0].pOutputVoice = _xaMasterVoice; - descriptors[0].Flags = 0; - XAUDIO2_VOICE_SENDS sends = { 0 }; - sends.SendCount = 1; - sends.pSends = descriptors; - hr = _xaEngine->CreateSourceVoice(&_xaSourceVoice, &cache->_audInfo._wfx, 0, 1.0, this, &sends); - } - - if (SUCCEEDED(hr)) { - _isStreaming = _cache->isStreamingSource(); - _duration = getDuration(); - ret = _play(); - } - else { - error(); - } - } - - return ret; -} - -void AudioPlayer::init() -{ - do { - memset(&_xaBuffer, 0, sizeof(_xaBuffer)); - if (FAILED(XAudio2Create(_xaEngine.ReleaseAndGetAddressOf()))) { - error(); - break; - } - -#if defined(_DEBUG) - XAUDIO2_DEBUG_CONFIGURATION debugConfig = { 0 }; - debugConfig.BreakMask = XAUDIO2_LOG_ERRORS; - debugConfig.TraceMask = XAUDIO2_LOG_ERRORS; - _xaEngine->SetDebugConfiguration(&debugConfig); -#endif - - _xaEngine->RegisterForCallbacks(this); - if (FAILED(_xaEngine->CreateMasteringVoice(&_xaMasterVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, nullptr, nullptr, AudioCategory_GameMedia))) { - error(); - break; - } - - _ready = true; - _state = AudioPlayerState::READY; - } while (false); -} - -void AudioPlayer::free() -{ - _ready = false; - _stop(); - memset(&_xaBuffer, 0, sizeof(_xaBuffer)); - - if (_xaEngine) { - _xaEngine->UnregisterForCallbacks(this); - _xaEngine->StopEngine(); - } - - if (_xaSourceVoice != nullptr) { - _xaSourceVoice->DestroyVoice(); - _xaSourceVoice = nullptr; - } - - if (_xaMasterVoice != nullptr) { - _xaMasterVoice->DestroyVoice(); - _xaMasterVoice = nullptr; - } - - while (!_cachedBufferQ.empty()) { - popBuffer(); - } -} - -bool AudioPlayer::_play(bool resume) -{ - do { - if (!resume) { - _cache->seek(_current / _duration); - submitBuffers(); - } - - if (_state == AudioPlayerState::PAUSED && !resume || nullptr == _xaSourceVoice) break; - - if (FAILED(_xaMasterVoice->SetVolume(_volume)) || FAILED(_xaSourceVoice->Start())) { - error(); - } - else { - _state = AudioPlayerState::PLAYING; - } - } while (false); - - return !_criticalError; -} - -void AudioPlayer::_stop(bool pause) -{ - if (_xaSourceVoice != nullptr) { - - if (FAILED(_xaSourceVoice->Stop())) { - error(); - } - else { - if (!pause) { - _xaSourceVoice->FlushSourceBuffers(); - if (_state != AudioPlayerState::PAUSED) _state = AudioPlayerState::STOPPED; - } - else { - _state = AudioPlayerState::PAUSED; - } - } - } -} - -void AudioPlayer::error() -{ - _criticalError = true; - _ready = false; - _state = AudioPlayerState::ERRORED; - CCLOG("Audio system encountered error."); -} - -void AudioPlayer::popBuffer() -{ - _bqMutex.lock(); - if (!_cachedBufferQ.empty()) { - _cachedBufferQ.pop(); - } - _bqMutex.unlock(); -} - -bool AudioPlayer::submitBuffers() -{ - bool ret = false; - - _bqMutex.lock(); - do { - if (nullptr == _xaSourceVoice) break; - if (!_cachedBufferQ.size() || (_isStreaming && _cachedBufferQ.size() < QUEUEBUFFER_NUM)) { - AudioDataChunk chunk; - if (_cache->getChunk(chunk) && chunk._dataSize) { - _xaBuffer.AudioBytes = static_cast(chunk._dataSize); - _xaBuffer.pAudioData = chunk._data->data(); - _xaBuffer.Flags = chunk._endOfStream ? XAUDIO2_END_OF_STREAM : 0; - _cachedBufferQ.push(chunk); - ret = SUCCEEDED(_xaSourceVoice->SubmitSourceBuffer(&_xaBuffer)); - if (!_isStreaming) break; - } - else { - break; - } - } - else if (!_isStreaming) { - ret = SUCCEEDED(_xaSourceVoice->SubmitSourceBuffer(&_xaBuffer)); - break; - } - else { - break; - } - } while (ret); - _bqMutex.unlock(); - - return ret; -} - -void AudioPlayer::updateState() -{ - if (!_isStreaming) { - _stMutex.lock(); - _samplesOffset = getSourceVoiceState().SamplesPlayed; - _stMutex.unlock(); - } - else { - if (_cachedBufferQ.size() > getSourceVoiceState(true).BuffersQueued) { - popBuffer(); - } - } -} - -void AudioPlayer::onBufferRunOut() -{ - _stMutex.lock(); - _samplesOffset = 0; - _current = 0.0; - _xaBuffer.PlayBegin = _xaBuffer.PlayLength = 0; - _stMutex.unlock(); - - if (!_loop) { - _stop(); - //invokeFinishCallback(); - } - else { - _play(); - } -} - -void AudioPlayer::invokeFinishCallback() -{ - if (_finishCallback) { - _finishCallback(0, ""); - } -} - -XAUDIO2_VOICE_STATE AudioPlayer::getSourceVoiceState(bool fast) -{ - XAUDIO2_VOICE_STATE state; - memset(&state, 0, sizeof(XAUDIO2_VOICE_STATE)); - - if (_xaSourceVoice != nullptr) { - _xaSourceVoice->GetState(&state, fast ? XAUDIO2_VOICE_NOSAMPLESPLAYED : 0); - } - - return state; -} - -// IXAudio2EngineCallback -void AudioPlayer::OnProcessingPassStart() -{ -} - -void AudioPlayer::OnProcessingPassEnd() -{ -} - -void AudioPlayer::OnCriticalError(HRESULT err) -{ - UNREFERENCED_PARAMETER(err); - if (_ready) { - error(); - } -} - -// IXAudio2VoiceCallback -void AudioPlayer::OnVoiceProcessingPassStart(UINT32 uBytesRequired) -{ - if (_ready && uBytesRequired && _isStreaming){ - submitBuffers(); - } -} - -void AudioPlayer::OnVoiceProcessingPassEnd() -{ -} - -void AudioPlayer::OnStreamEnd() -{ - if (_ready) { - onBufferRunOut(); - } -} - -void AudioPlayer::OnBufferStart(void* pBufferContext) -{ - UNREFERENCED_PARAMETER(pBufferContext); -} - -void AudioPlayer::OnBufferEnd(void* pBufferContext) -{ - UNREFERENCED_PARAMETER(pBufferContext); - if (_ready) { - updateState(); - } -} - -void AudioPlayer::OnLoopEnd(void* pBufferContext) -{ - UNREFERENCED_PARAMETER(pBufferContext); - - if (_ready && !_loop) { - _stop(); - } -} - -void AudioPlayer::OnVoiceError(void* pBufferContext, HRESULT err) -{ - UNREFERENCED_PARAMETER(pBufferContext); - UNREFERENCED_PARAMETER(err); - if (_ready) { - error(); - } -} - -#endif diff --git a/cocos/audio/winrt/AudioCachePlayer.h b/cocos/audio/winrt/AudioCachePlayer.h deleted file mode 100644 index cce4e7f590b8..000000000000 --- a/cocos/audio/winrt/AudioCachePlayer.h +++ /dev/null @@ -1,165 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#ifndef __AUDIO_CACHE_PLAYER_H_ -#define __AUDIO_CACHE_PLAYER_H_ - -#include "audio/winrt/AudioSourceReader.h" - -NS_CC_BEGIN -namespace experimental{ - -typedef struct AudioInfo -{ - size_t _totalAudioBytes; - WAVEFORMATEX _wfx; -} AudioInfo; - -enum class AudioPlayerState -{ - ERRORED = -1, - INITIALIZING, - READY, - PLAYING, - PAUSED, - STOPPED -}; - - class AudioCache -{ -public: - AudioCache(); - ~AudioCache(); - - void readDataTask(); - void addPlayCallback(const std::function &callback); - void addLoadCallback(const std::function &callback); - bool getChunk(AudioDataChunk& chunk); - void doBuffering(); - bool isStreamingSource(); - void seek(const float ratio); - -protected: - void invokePlayCallbacks(); - void invokeLoadCallbacks(); - -private: - AudioCache(const AudioCache&); - AudioCache& operator=(const AudioCache&); - -private: - bool _retry; - bool _isReady; - AudioInfo _audInfo; - std::mutex _cbMutex; - FileFormat _fileFormat; - std::string _fileFullPath; - AudioSourceReader *_srcReader; - std::vector> _callbacks; - std::vector> _loadCallbacks; - - friend class AudioPlayer; - friend class AudioEngineImpl; - }; - - - class AudioPlayer : public IXAudio2EngineCallback, IXAudio2VoiceCallback - { - public: - AudioPlayer(); - virtual ~AudioPlayer(); - - void stop(); - void pause(); - bool update(); - void resume(); - bool isInError(); - float getDuration(); - float getCurrentTime(); - bool setTime(float time); - void setVolume(float volume); - bool play2d(AudioCache* cache); - AudioPlayerState getState() { return _state; } - - protected: - AudioPlayer(AudioPlayer&); - AudioPlayer& operator=(AudioPlayer&); - - void init(); - void free(); - void error(); - void popBuffer(); - void updateState(); - bool submitBuffers(); - void onBufferRunOut(); - void invokeFinishCallback(); - void _stop(bool pause = false); - bool _play(bool resume = false); - XAUDIO2_VOICE_STATE getSourceVoiceState(bool fast = false); - - // IXAudio2EngineCallback - STDMETHOD_(void, OnProcessingPassStart) () override; - STDMETHOD_(void, OnProcessingPassEnd) () override; - STDMETHOD_(void, OnCriticalError) (HRESULT error) override; - - // IXAudio2VoiceCallback - STDMETHOD_(void, OnVoiceProcessingPassStart) (UINT32 uBytesRequired) override; - STDMETHOD_(void, OnVoiceProcessingPassEnd) () override; - STDMETHOD_(void, OnStreamEnd) () override; - STDMETHOD_(void, OnBufferStart) (void* pBufferContext) override; - STDMETHOD_(void, OnBufferEnd) (void* pBufferContext) override; - STDMETHOD_(void, OnLoopEnd) (void* pBufferContext) override; - STDMETHOD_(void, OnVoiceError) (void *pBufferContext, HRESULT error) override; - - private: - bool _loop; - bool _ready; - float _volume; - float _current; - float _duration; - bool _criticalError; - bool _isStreaming; - UINT64 _totalSamples; - UINT64 _samplesOffset; - - XAUDIO2_BUFFER _xaBuffer; - IXAudio2SourceVoice *_xaSourceVoice; - IXAudio2MasteringVoice *_xaMasterVoice; - Microsoft::WRL::ComPtr _xaEngine; - - AudioCache *_cache; - std::mutex _stMutex; - std::mutex _bqMutex; - AudioPlayerState _state; - std::queue _cachedBufferQ; - std::function _finishCallback; - - - friend class AudioEngineImpl; - }; - -} -NS_CC_END -#endif // __AUDIO_CACHE_PLAYER_H_ -#endif - diff --git a/cocos/audio/winrt/AudioEngine-winrt.cpp b/cocos/audio/winrt/AudioEngine-winrt.cpp deleted file mode 100644 index 7f70345fe459..000000000000 --- a/cocos/audio/winrt/AudioEngine-winrt.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "base/ccMacros.h" -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#include "audio/winrt/AudioEngine-winrt.h" -#include "platform/CCFileUtils.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" - -using namespace cocos2d; -using namespace cocos2d::experimental; - -AudioEngineImpl::AudioEngineImpl() - : _lazyInitLoop(true) - , _currentAudioID(0) -{ - -} - -AudioEngineImpl::~AudioEngineImpl() -{ - auto scheduler = cocos2d::Director::getInstance()->getScheduler(); - scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this); - _audioCaches.clear(); -} - -bool AudioEngineImpl::init() -{ - return true; -} - -AudioCache* AudioEngineImpl::preload(const std::string& filePath, std::function callback) -{ - AudioCache* audioCache = nullptr; - do - { - auto it = _audioCaches.find(filePath); - if (it == _audioCaches.end()) { - FileFormat fileFormat = FileFormat::UNKNOWN; - - std::string fileExtension = FileUtils::getInstance()->getFileExtension(filePath); - - if (fileExtension == ".wav") - { - fileFormat = FileFormat::WAV; - } - else if (fileExtension == ".ogg") - { - fileFormat = FileFormat::OGG; - } - else if (fileExtension == ".mp3") - { - fileFormat = FileFormat::MP3; - } - else - { - log("Unsupported media type file: %s\n", filePath.c_str()); - break; - } - - audioCache = &_audioCaches[filePath]; - audioCache->_fileFormat = fileFormat; - - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filePath); - audioCache->_fileFullPath = fullPath; - AudioEngine::addTask(std::bind(&AudioCache::readDataTask, audioCache)); - } - else - { - audioCache = &it->second; - } - } while (false); - - if (callback) - { - if (audioCache) - { - audioCache->addLoadCallback(callback); - } - else - { - callback(false); - } - } - - return audioCache; -} - -int AudioEngineImpl::play2d(const std::string &filePath, bool loop, float volume) -{ - auto audioCache = preload(filePath, nullptr); - if (audioCache == nullptr) - { - return AudioEngine::INVALID_AUDIO_ID; - } - - auto player = &_audioPlayers[_currentAudioID]; - player->_loop = loop; - player->_volume = volume; - audioCache->addPlayCallback(std::bind(&AudioEngineImpl::_play2d, this, audioCache, _currentAudioID)); - - if (_lazyInitLoop) { - _lazyInitLoop = false; - - auto scheduler = cocos2d::Director::getInstance()->getScheduler(); - scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.05f, false); - } - - return _currentAudioID++; -} - -void AudioEngineImpl::_play2d(AudioCache *cache, int audioID) -{ - if (cache->_isReady){ - auto playerIt = _audioPlayers.find(audioID); - if (playerIt != _audioPlayers.end()) { - if (playerIt->second.play2d(cache)) { - AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; - } - else{ - _threadMutex.lock(); - _toRemoveAudioIDs.push_back(audioID); - _threadMutex.unlock(); - } - } - } - else { - _threadMutex.lock(); - _toRemoveCaches.push_back(cache); - _toRemoveAudioIDs.push_back(audioID); - _threadMutex.unlock(); - } -} - -void AudioEngineImpl::setVolume(int audioID, float volume) -{ - auto& player = _audioPlayers[audioID]; - - if (player._ready){ - player.setVolume(volume); - } - - if (player.isInError()) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } -} - -void AudioEngineImpl::setLoop(int audioID, bool loop) -{ - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - player._loop = loop; - } - - if (player.isInError()) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } -} - -bool AudioEngineImpl::pause(int audioID) -{ - bool ret = false; - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - player.pause(); - AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PAUSED; - } - - ret = !player.isInError(); - - if (!ret) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } - - return ret; -} - -bool AudioEngineImpl::resume(int audioID) -{ - bool ret = false; - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - player.resume(); - AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; - } - - ret = !player.isInError(); - - if (!ret) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } - - return ret; -} - -bool AudioEngineImpl::stop(int audioID) -{ - bool ret = false; - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - player.stop(); - ret = !player.isInError(); - } - - if (!ret) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } - - _audioPlayers.erase(audioID); - return ret; -} - -void AudioEngineImpl::stopAll() -{ - for (auto &player : _audioPlayers) { - player.second.stop(); - } - - _audioPlayers.clear(); -} - -float AudioEngineImpl::getDuration(int audioID) -{ - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - return player.getDuration(); - } - else { - return AudioEngine::TIME_UNKNOWN; - } -} - -float AudioEngineImpl::getCurrentTime(int audioID) -{ - float ret = 0.0f; - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - ret = player.getCurrentTime(); - } - - return ret; -} - -bool AudioEngineImpl::setCurrentTime(int audioID, float time) -{ - bool ret = false; - auto& player = _audioPlayers[audioID]; - - if (player._ready) { - ret = player.setTime(time); - } - - if (!ret) { - log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); - } - - return ret; -} - -void AudioEngineImpl::setFinishCallback(int audioID, const std::function &callback) -{ - _audioPlayers[audioID]._finishCallback = callback; -} - -void AudioEngineImpl::update(float dt) -{ - int audioID; - - if (_threadMutex.try_lock()) { - size_t removeAudioCount = _toRemoveAudioIDs.size(); - for (size_t index = 0; index < removeAudioCount; ++index) { - audioID = _toRemoveAudioIDs[index]; - auto playerIt = _audioPlayers.find(audioID); - if (playerIt != _audioPlayers.end()) { - if (playerIt->second._finishCallback) { - auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; - playerIt->second._finishCallback(audioID, *audioInfo.filePath); - } - _audioPlayers.erase(audioID); - AudioEngine::remove(audioID); - } - } - - size_t removeCacheCount = _toRemoveCaches.size(); - for (size_t index = 0; index < removeCacheCount; ++index) { - auto itEnd = _audioCaches.end(); - for (auto it = _audioCaches.begin(); it != itEnd; ++it) { - if (&it->second == _toRemoveCaches[index]) { - _audioCaches.erase(it); - break; - } - } - } - _threadMutex.unlock(); - } - - for (auto it = _audioPlayers.begin(); it != _audioPlayers.end();) { - audioID = it->first; - auto& player = it->second; - - if (player._ready && player._state == AudioPlayerState::STOPPED) { - if (player._finishCallback) { - auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; - player._finishCallback(audioID, *audioInfo.filePath); - } - - AudioEngine::remove(audioID); - it = _audioPlayers.erase(it); - } - else{ - player.update(); - ++it; - } - } - - if (_audioPlayers.empty()){ - _lazyInitLoop = true; - - auto scheduler = cocos2d::Director::getInstance()->getScheduler(); - scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this); - } -} - -void AudioEngineImpl::uncache(const std::string &filePath) -{ - _audioCaches.erase(filePath); -} - -void AudioEngineImpl::uncacheAll() -{ - _audioCaches.clear(); -} - -#endif diff --git a/cocos/audio/winrt/AudioEngine-winrt.h b/cocos/audio/winrt/AudioEngine-winrt.h deleted file mode 100644 index aa3f84b9f6df..000000000000 --- a/cocos/audio/winrt/AudioEngine-winrt.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#ifndef __AUDIO_ENGINE_WINRT_H_ -#define __AUDIO_ENGINE_WINRT_H_ - -#define NEAR near - -#include - -#include "base/CCRef.h" -#include "audio/include/AudioEngine.h" -#include "audio/winrt/AudioCachePlayer.h" - -NS_CC_BEGIN - namespace experimental{ -#define MAX_AUDIOINSTANCES 32 - - class CC_DLL AudioEngineImpl : public cocos2d::Ref - { - public: - AudioEngineImpl(); - ~AudioEngineImpl(); - - bool init(); - int play2d(const std::string &fileFullPath, bool loop, float volume); - void setVolume(int audioID, float volume); - void setLoop(int audioID, bool loop); - bool pause(int audioID); - bool resume(int audioID); - bool stop(int audioID); - void stopAll(); - float getDuration(int audioID); - float getCurrentTime(int audioID); - bool setCurrentTime(int audioID, float time); - void setFinishCallback(int audioID, const std::function &callback); - void uncache(const std::string& filePath); - void uncacheAll(); - AudioCache* preload(const std::string& filePath, std::function callback); - void update(float dt); - - private: - void _play2d(AudioCache *cache, int audioID); - - private: - std::unordered_map _audioPlayers; - std::unordered_map _audioCaches; - std::vector _toRemoveCaches; - - std::mutex _threadMutex; - std::vector _toRemoveAudioIDs; - bool _lazyInitLoop; - int _currentAudioID; - }; -} - -NS_CC_END -#endif // __AUDIO_ENGINE_WINRT_H_ -#endif - diff --git a/cocos/audio/winrt/AudioSourceReader.cpp b/cocos/audio/winrt/AudioSourceReader.cpp deleted file mode 100644 index 28272242a9c2..000000000000 --- a/cocos/audio/winrt/AudioSourceReader.cpp +++ /dev/null @@ -1,639 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "base/ccMacros.h" -#include "platform/CCPlatformConfig.h" -#include "platform/CCFileUtils.h" - - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#include "platform/winrt/CCWinRTUtils.h" -#include "audio/winrt/AudioSourceReader.h" - -using namespace cocos2d; -using namespace cocos2d::experimental; -using namespace Microsoft::WRL; - - -// AudioFileReader -AudioSourceReader::AudioSourceReader() : -_isStreaming(false) -, _filePath("") -, _audioSize(0) -, _bytesRead(0) -, _isDirty(false) -{ - memset(&_wfx, 0, sizeof(_wfx)); -} - -AudioSourceReader::~AudioSourceReader() -{ - flushChunks(); -} - -void AudioSourceReader::flushChunks() -{ - _rwMutex.lock(); - while (!_chnkQ.empty()) { - _chnkQ.pop(); - } - _rwMutex.unlock(); -} - -void AudioSourceReader::seekTo(const float ratio) -{ - if (_isStreaming) { - auto newPos = ratio * _audioSize; - - if (!newPos && !_isDirty && _chnkQ.size()) // already in 0.0 position - return; - - _bytesRead = newPos; - flushChunks(); - auto alignment = _wfx.nChannels * _wfx.nBlockAlign; - _bytesRead = _bytesRead >= _audioSize ? (_audioSize - alignment) : _bytesRead - (_bytesRead % alignment); - - for (int i = 0; i < QUEUEBUFFER_NUM; i++) { - produceChunk(); - } - } -} - -// WAVFileReader -WAVReader::WAVReader() : -_streamer(nullptr) -{ -} - -WAVReader::~WAVReader() -{ -} - -bool WAVReader::initialize(const std::string& filePath) -{ - bool ret = false; - _isStreaming = false; - _filePath = filePath; - - do { - auto fileSize = FileUtils::getInstance()->getFileSize(_filePath); - - if (fileSize <= 0) - break; - - flushChunks(); - - _streamer = ref new MediaStreamer; - - _streamer->Initialize(StringUtf8ToWideChar(_filePath).c_str(), true); - _wfx = _streamer->GetOutputWaveFormatEx(); - size_t dataSize = _streamer->GetMaxStreamLengthInBytes(); - - if (dataSize <= 0) - break; - - _audioSize = dataSize; - if (_audioSize <= PCMDATA_CACHEMAXSIZE) { - produceChunk(); - } - else { - _isStreaming = true; - for (int i = 0; i < QUEUEBUFFER_NUM; i++) { - produceChunk(); - } - } - - ret = true; - } while (false); - - return ret; -} - -bool WAVReader::consumeChunk(AudioDataChunk& chunk) -{ - bool ret = false; - _isDirty = true; - - _rwMutex.lock(); - if (_chnkQ.size() > 0) { - chunk = _chnkQ.front(); - if (_isStreaming) { - _chnkQ.pop(); - } - ret = true; - } - _rwMutex.unlock(); - - return ret; -} - -void WAVReader::produceChunk() -{ - _rwMutex.lock(); - size_t chunkSize = _audioSize; - - do { - if (!_isStreaming && _chnkQ.size() || _chnkQ.size() >= QUEUEBUFFER_NUM) { - break; - } - - if (_isStreaming) { - chunkSize = std::min(CHUNK_SIZE_MAX, _audioSize - _bytesRead); - } - - if (!chunkSize && !_chnkQ.size()) { - auto alignment = _wfx.nChannels * _wfx.nBlockAlign; - _bytesRead -= alignment; - chunkSize = alignment; - } - - if (!chunkSize) { - break; - } - - unsigned int retSize = 0; - AudioDataChunk chunk = { 0 }; - chunk._data = std::make_shared(chunkSize); - _streamer->ReadChunk(chunk._data->data(), static_cast(_bytesRead), static_cast(chunkSize), &retSize); - _bytesRead += retSize; - chunk._dataSize = retSize; - chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); - chunk._endOfStream = (_bytesRead >= _audioSize); - _chnkQ.push(chunk); - } while (false); - _rwMutex.unlock(); -} - -void WAVReader::seekTo(const float ratio) -{ - AudioSourceReader::seekTo(ratio); -} - - -// MP3Reader -MP3Reader::MP3Reader() : -_mappedWavFile("") -, _largeFileSupport(true) -{ -} - -MP3Reader::~MP3Reader() -{ -} - -bool MP3Reader::initialize(const std::string& filePath) -{ - bool ret = false; - _filePath = filePath; - HRESULT hr = S_OK; - MFStartup(MF_VERSION); - - do { - ComPtr pReader; - ComPtr ppDecomprsdAudioType; - - if (FAILED(hr = MFCreateSourceReaderFromURL(StringUtf8ToWideChar(_filePath).c_str(), NULL, &pReader))) { - break; - } - - hr = configureSourceReader(pReader.Get(), &ppDecomprsdAudioType); - - if (FAILED(hr)) { - break; - } - - UINT32 cbFormat = 0; - WAVEFORMATEX *pWav = nullptr; - if (FAILED(hr = MFCreateWaveFormatExFromMFMediaType(ppDecomprsdAudioType.Get(), &pWav, &cbFormat))) { - break; - } - - CopyMemory(&_wfx, pWav, sizeof(WAVEFORMATEX)); - CoTaskMemFree(pWav); - - if (FAILED(hr = readAudioData(pReader.Get()))) { - break; - } - - ret = SUCCEEDED(hr); - } while (false); - - MFShutdown(); - return ret; -} - -bool MP3Reader::consumeChunk(AudioDataChunk& chunk) -{ - bool ret = false; - _isDirty = true; - - _rwMutex.lock(); - if (_chnkQ.size() > 0) { - chunk = _chnkQ.front(); - if (_isStreaming) { - _chnkQ.pop(); - } - ret = true; - } - _rwMutex.unlock(); - - return ret; -} - -void MP3Reader::produceChunk() -{ - _rwMutex.lock(); - size_t chunkSize = _audioSize; - - do { - if (!_isStreaming && _chnkQ.size() || _chnkQ.size() >= QUEUEBUFFER_NUM) { - break; - } - - if (_isStreaming) { - chunkSize = std::min(CHUNK_SIZE_MAX, _audioSize - _bytesRead); - } - - if (!chunkSize && !_chnkQ.size()) { - auto alignment = _wfx.nChannels * _wfx.nBlockAlign; - _bytesRead -= alignment; - chunkSize = alignment; - } - - if (!chunkSize) { - break; - } - - UINT retSize = 0; - AudioDataChunk chunk = { 0 }; - chunk._data = std::make_shared(chunkSize); - readFromMappedWavFile(chunk._data->data(), _bytesRead, chunkSize, &retSize); - _bytesRead += retSize; - chunk._dataSize = retSize; - chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); - chunk._endOfStream = (_bytesRead >= _audioSize); - _chnkQ.push(chunk); - } while (false); - _rwMutex.unlock(); -} - -void MP3Reader::seekTo(const float ratio) -{ - AudioSourceReader::seekTo(ratio); -} - -HRESULT MP3Reader::configureSourceReader(IMFSourceReader* pReader, IMFMediaType** ppDecomprsdAudioType) -{ - HRESULT hr = S_OK; - - do { - ComPtr pTmpMediaType; - ComPtr pRetMediaType; - pReader->SetStreamSelection(MF_SOURCE_READER_ALL_STREAMS, FALSE); - pReader->SetStreamSelection(MF_SOURCE_READER_FIRST_AUDIO_STREAM, TRUE); - - if (FAILED(hr = MFCreateMediaType(&pTmpMediaType))) { - break; - } - - if (FAILED(hr = pTmpMediaType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Audio))) { - break; - } - - if (FAILED(hr = pTmpMediaType->SetGUID(MF_MT_SUBTYPE, MFAudioFormat_PCM))) { - break; - } - - if (FAILED(hr = pReader->SetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, NULL, pTmpMediaType.Get()))) { - break; - } - - if (FAILED(hr = pReader->GetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, &pRetMediaType))) { - break; - } - - if (FAILED(hr = pReader->SetStreamSelection(MF_SOURCE_READER_FIRST_AUDIO_STREAM, TRUE))) { - break; - } - - *ppDecomprsdAudioType = pRetMediaType.Get(); - (*ppDecomprsdAudioType)->AddRef(); - } while (false); - - return hr; -} - -HRESULT MP3Reader::readAudioData(IMFSourceReader* pReader) -{ - HRESULT hr = S_OK; - - do { - PCMBuffer buffer; - - if (createMappedCacheFile(_filePath, _mappedWavFile, ".dat")) { - _isStreaming = _largeFileSupport; - _audioSize = FileUtils::getInstance()->getFileSize(_mappedWavFile); - if (!_largeFileSupport) { - buffer.resize(_audioSize); - readFromMappedWavFile(buffer.data(), 0, _audioSize, nullptr); - chunkify(buffer); - } - break; - } - - buffer.reserve(PCMDATA_CACHEMAXSIZE); - - while (SUCCEEDED(hr)) - { - DWORD flags = 0; - DWORD cbSize = 0; - BYTE* pAudioData = nullptr; - ComPtr pSample; - ComPtr pBuffer; - - if (FAILED(hr = pReader->ReadSample(MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, NULL, &flags, NULL, &pSample))) { - break; - } - - if (flags & MF_SOURCE_READERF_ENDOFSTREAM) { - break; - } - - if (FAILED(hr = pSample->ConvertToContiguousBuffer(&pBuffer))) { - break; - } - - if (FAILED(hr = pBuffer->Lock(&pAudioData, NULL, &cbSize))) { - break; - } - - if (_largeFileSupport && _audioSize + cbSize > PCMDATA_CACHEMAXSIZE) { - - if (!_isStreaming) { - _isStreaming = true; - chunkify(buffer); - appendToMappedWavFile(buffer); - buffer.clear(); - } - - buffer.resize(cbSize); - CopyMemory(buffer.data(), pAudioData, cbSize); - appendToMappedWavFile(buffer); - buffer.clear(); - } - else { - buffer.resize(_audioSize + cbSize); - CopyMemory(&buffer[_audioSize], pAudioData, cbSize); - } - - _audioSize += cbSize; - hr = pBuffer->Unlock(); - pAudioData = nullptr; - } - - if (FAILED(hr)) { - break; - } - - if (!_isStreaming) { - chunkify(buffer); - _audioSize > PCMDATA_CACHEMAXSIZE ? - appendToMappedWavFile(buffer) : - destroyMappedCacheFile(_filePath); - } - } while (false); - - return hr; -} - -void MP3Reader::chunkify(PCMBuffer& buffer) -{ - _rwMutex.lock(); - size_t offset = 0; - - if (buffer.size() && _chnkQ.size() < QUEUEBUFFER_NUM) - { - AudioDataChunk chunk = { 0 }; - size_t chunkSize = buffer.size(); - chunk._data = std::make_shared(buffer); - _bytesRead += chunkSize; - chunk._dataSize = chunkSize; - chunk._endOfStream = (!_isStreaming && _bytesRead >= _audioSize); - chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); - _chnkQ.push(chunk); - offset += chunkSize; - } - _rwMutex.unlock(); -} - -bool MP3Reader::appendToMappedWavFile(PCMBuffer& buffer) -{ - bool ret = false; - - _rwMutex.lock(); - do { - auto file = openFile(_mappedWavFile, true); - - if (file.Get() == INVALID_HANDLE_VALUE) { - break; - } - - LARGE_INTEGER li = { 0 }; - if (!SetFilePointerEx(file.Get(), li, nullptr, FILE_END)) { - break; - } - - ret = (TRUE == WriteFile(file.Get(), buffer.data(), static_cast(buffer.size()), nullptr, nullptr)); - } while (false); - _rwMutex.unlock(); - - return ret; -} - -void MP3Reader::readFromMappedWavFile(BYTE *data, size_t offset, size_t size, UINT *pRetSize) -{ - do { - auto file = openFile(_mappedWavFile); - - if (file.Get() == INVALID_HANDLE_VALUE) { - break; - } - - if (offset) { - LARGE_INTEGER li = { 0 }; - li.QuadPart = offset; - if (!SetFilePointerEx(file.Get(), li, nullptr, FILE_BEGIN)) { - break; - } - } - - ReadFile(file.Get(), data, static_cast(size), (LPDWORD)pRetSize, nullptr); - } while (false); -} - -Wrappers::FileHandle MP3Reader::openFile(const std::string& filePath, bool append) -{ - CREATEFILE2_EXTENDED_PARAMETERS extParams = { 0 }; - extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; - extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS; - extParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; - extParams.dwSize = sizeof(extParams); - extParams.hTemplateFile = nullptr; - extParams.lpSecurityAttributes = nullptr; - - DWORD access = append ? GENERIC_WRITE : GENERIC_READ; - DWORD creation = append ? OPEN_ALWAYS : OPEN_EXISTING; - return Microsoft::WRL::Wrappers::FileHandle(CreateFile2(StringUtf8ToWideChar(filePath).c_str(), access, FILE_SHARE_READ, creation, &extParams)); -} - - -// OGGReader -OGGReader::OGGReader() -{ -} - -OGGReader::~OGGReader() -{ - if (_vorbisFd) { - ov_clear(_vorbisFd.get()); - } -} - -bool OGGReader::initialize(const std::string& filePath) -{ - bool ret = false; - _filePath = filePath; - - do { - _vorbisFd = std::make_unique(); - if (ov_fopen(FileUtils::getInstance()->getSuitableFOpen(_filePath).c_str(), _vorbisFd.get())){ - break; - } - - auto vi = ov_info(_vorbisFd.get(), -1); - - if (!vi) { - break; - } - - auto totalFrames = ov_pcm_total(_vorbisFd.get(), -1); - auto bytesPerFrame = vi->channels * 2; - _audioSize = totalFrames * bytesPerFrame; - - _wfx.wFormatTag = WAVE_FORMAT_PCM; - _wfx.nChannels = vi->channels; - _wfx.nSamplesPerSec = vi->rate; - _wfx.nAvgBytesPerSec = vi->rate * bytesPerFrame; - _wfx.nBlockAlign = bytesPerFrame; - _wfx.wBitsPerSample = (bytesPerFrame / vi->channels) * 8; - _wfx.cbSize = 0; - - if (_audioSize <= PCMDATA_CACHEMAXSIZE) { - produceChunk(); - } - else { - _isStreaming = true; - for (int i = 0; i < QUEUEBUFFER_NUM; i++) { - produceChunk(); - } - } - - ret = true; - } while (false); - - return ret; -} - -bool OGGReader::consumeChunk(AudioDataChunk& chunk) -{ - bool ret = false; - _isDirty = true; - - _rwMutex.lock(); - if (_chnkQ.size() > 0) { - chunk = _chnkQ.front(); - if (_isStreaming) { - _chnkQ.pop(); - } - ret = true; - } - _rwMutex.unlock(); - - return ret; -} - -void OGGReader::produceChunk() -{ - _rwMutex.lock(); - size_t chunkSize = _audioSize; - - do { - if (!_isStreaming && _chnkQ.size() || _chnkQ.size() >= QUEUEBUFFER_NUM) { - break; - } - - if (_isStreaming) { - chunkSize = std::min(CHUNK_SIZE_MAX, _audioSize - _bytesRead); - } - - if (!chunkSize && !_chnkQ.size()) { - auto alignment = _wfx.nChannels * _wfx.nBlockAlign; - _bytesRead -= alignment; - chunkSize = alignment; - } - - if (!chunkSize) { - break; - } - - int retSize = 0; - AudioDataChunk chunk = { 0 }; - chunk._data = std::make_shared(chunkSize); - - auto newPos = (1.0f * _bytesRead / _audioSize) * ov_time_total(_vorbisFd.get(), -1); - if (ov_time_seek(_vorbisFd.get(), newPos)){ - break; - } - - do - { - long br = 0; - int current_section = 0; - if ((br = ov_read(_vorbisFd.get(), (char*)chunk._data->data() + retSize, static_cast(chunkSize) - retSize, 0, 2, 1, ¤t_section)) == 0) { - break; - } - retSize += br; - } while (retSize < chunkSize); - - _bytesRead += retSize; - chunk._dataSize = retSize; - chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); - chunk._endOfStream = (_bytesRead >= _audioSize); - _chnkQ.push(chunk); - } while (false); - _rwMutex.unlock(); -} - -void OGGReader::seekTo(const float ratio) -{ - AudioSourceReader::seekTo(ratio); -} - -#endif diff --git a/cocos/audio/winrt/AudioSourceReader.h b/cocos/audio/winrt/AudioSourceReader.h deleted file mode 100644 index b85da9b98f9f..000000000000 --- a/cocos/audio/winrt/AudioSourceReader.h +++ /dev/null @@ -1,159 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "base/ccMacros.h" -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#ifndef __AUDIO_SOURCE_READER_H_ -#define __AUDIO_SOURCE_READER_H_ - -#define NEAR near -#include -#include -#include -#include -#include -#include "audio/winrt/MediaStreamer.h" -#include "ogg/ogg.h" -#include "vorbis/vorbisfile.h" - -NS_CC_BEGIN -namespace experimental{ - -const size_t PCMDATA_CACHEMAXSIZE = 2621440; -const size_t QUEUEBUFFER_NUM = 4; -const size_t CHUNK_SIZE_MAX = PCMDATA_CACHEMAXSIZE / QUEUEBUFFER_NUM; - -typedef std::vector PCMBuffer; - -enum class FileFormat -{ - UNKNOWN, - WAV, - MP3, - OGG -}; - -typedef struct AudioDataChunk -{ - std::shared_ptr _data; - size_t _dataSize; - bool _endOfStream; - int _seqNo; -} AudioDataChunk; - - -class AudioSourceReader -{ -public: - AudioSourceReader(); - virtual ~AudioSourceReader(); - - bool isStreamingSource() { return _isStreaming; } - std::string getFilePath() { return _filePath; } - virtual size_t getTotalAudioBytes() { return _audioSize; } - - virtual bool initialize(const std::string& filePath) = 0; - virtual FileFormat getFileFormat() = 0; - virtual bool consumeChunk(AudioDataChunk& chunk) = 0; - virtual void produceChunk() = 0; - virtual void seekTo(const float ratio) = 0; - virtual const WAVEFORMATEX& getWaveFormatInfo() { return _wfx; } - -protected: - void flushChunks(); - -protected: - bool _isDirty; - size_t _bytesRead; - bool _isStreaming; - std::string _filePath; - size_t _audioSize; - WAVEFORMATEX _wfx; - std::mutex _rwMutex; - std::queue _chnkQ; -}; - -class WAVReader : public AudioSourceReader - { - public: - WAVReader(); - virtual ~WAVReader(); - - virtual bool initialize(const std::string& filePath) override; - virtual FileFormat getFileFormat() override { return FileFormat::WAV; } - virtual bool consumeChunk(AudioDataChunk& chunk) override; - virtual void produceChunk() override; - virtual void seekTo(const float ratio) override; - - private: - MediaStreamer^ _streamer; - }; - -class MP3Reader : public AudioSourceReader - { - public: - MP3Reader(); - virtual ~MP3Reader(); - - virtual bool initialize(const std::string& filePath) override; - virtual FileFormat getFileFormat() override { return FileFormat::WAV; } - virtual bool consumeChunk(AudioDataChunk& chunk) override; - virtual void produceChunk() override; - virtual void seekTo(const float ratio) override; - - // for backward compatibility with simple audio engine - void doLargeFileSupport(bool action) { _largeFileSupport = action; } - - protected: - HRESULT configureSourceReader(IMFSourceReader* pReader, IMFMediaType** ppDecomprsdAudioType); - HRESULT readAudioData(IMFSourceReader* pReader); - void chunkify(PCMBuffer& buffer); - bool appendToMappedWavFile(PCMBuffer& buffer); - void readFromMappedWavFile(BYTE *data, size_t offset, size_t size, UINT *pRetSize); - Microsoft::WRL::Wrappers::FileHandle openFile(const std::string& path, bool append = false); - - private: - bool _largeFileSupport; - std::string _mappedWavFile; - }; - -class OGGReader : public AudioSourceReader -{ -public: - OGGReader(); - virtual ~OGGReader(); - - virtual bool initialize(const std::string& filePath) override; - virtual FileFormat getFileFormat() override { return FileFormat::WAV; } - virtual bool consumeChunk(AudioDataChunk& chunk) override; - virtual void produceChunk() override; - virtual void seekTo(const float ratio) override; - -private: - std::unique_ptr _vorbisFd; -}; - -} -NS_CC_END -#endif // __AUDIO_SOURCE_READER_H_ -#endif - diff --git a/cocos/audio/winrt/MediaStreamer.cpp b/cocos/audio/winrt/MediaStreamer.cpp deleted file mode 100644 index c8cb7de62853..000000000000 --- a/cocos/audio/winrt/MediaStreamer.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "audio/winrt/MediaStreamer.h" - -#include -#include -#include - -#include -#include - -using namespace Microsoft::WRL; -using namespace Windows::Storage; -using namespace Windows::Storage::FileProperties; -using namespace Windows::Storage::Streams; -using namespace Windows::Foundation; -using namespace Windows::ApplicationModel; -using namespace Concurrency; - -#ifndef MAKEFOURCC - #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((uint32)(byte)(ch0) | ((uint32)(byte)(ch1) << 8) | \ - ((uint32)(byte)(ch2) << 16) | ((uint32)(byte)(ch3) << 24 )) -#endif /* defined(MAKEFOURCC) */ - -const int FMT_CHUNK_MAX = 256; - -inline void ThrowIfFailed(HRESULT hr) -{ - if (FAILED(hr)) - { - // Set a breakpoint on this line to catch DX API errors. - throw Platform::Exception::CreateException(hr); - } -} - -MediaStreamer::MediaStreamer() : - m_offset(0) - , m_dataLen(0) - , m_filename(nullptr) -{ - ZeroMemory(&m_waveFormat, sizeof(m_waveFormat)); - m_location = Package::Current->InstalledLocation; - m_locationPath = Platform::String::Concat(m_location->Path, "\\Assets\\Resources\\"); -} - -MediaStreamer::~MediaStreamer() -{ -} - -Platform::Array^ MediaStreamer::ReadData(_In_ Platform::String^ filename) -{ - return ReadData(filename, 0, 0); -} - -Platform::Array^ MediaStreamer::ReadData(_In_ Platform::String^ filename, uint32 from, uint32 length) -{ - CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0}; - extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); - extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; - extendedParams.dwFileFlags = from ? FILE_FLAG_RANDOM_ACCESS : FILE_FLAG_SEQUENTIAL_SCAN; - extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; - extendedParams.lpSecurityAttributes = nullptr; - extendedParams.hTemplateFile = nullptr; - - Wrappers::FileHandle file( - CreateFile2(filename->Data(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extendedParams) - ); - - if (file.Get()==INVALID_HANDLE_VALUE) - { - throw ref new Platform::FailureException(); - } - - FILE_STANDARD_INFO fileInfo = { 0 }; - if (!GetFileInformationByHandleEx(file.Get(), FileStandardInfo, &fileInfo, sizeof(fileInfo))) - { - throw ref new Platform::FailureException(); - } - - if (fileInfo.EndOfFile.HighPart != 0) - { - throw ref new Platform::OutOfMemoryException(); - } - - from += static_cast(m_offset); - length = (length == 0 || from + length > fileInfo.EndOfFile.LowPart) ? fileInfo.EndOfFile.LowPart - from : length; - Platform::Array^ fileData = ref new Platform::Array(length); - - if (from) - { - LARGE_INTEGER pos = { 0 }; - pos.QuadPart = from; - if (!SetFilePointerEx(file.Get(), pos, nullptr, FILE_BEGIN)) - { - throw ref new Platform::FailureException(); - } - } - - if (!ReadFile(file.Get(), fileData->Data, fileData->Length, nullptr, nullptr)) - { - throw ref new Platform::FailureException(); - } - - return fileData; -} - -void MediaStreamer::Initialize(__in const WCHAR* url, bool lazy) -{ - m_filename = ref new Platform::String(url); - WCHAR filePath[MAX_PATH] = {0}; - if ((wcslen(url) > 1 && url[1] == ':')) - { - // path start with "x:", is absolute path - wcscat_s(filePath, url); - } - else if (wcslen(url) > 0 - && (L'/' == url[0] || L'\\' == url[0])) - { - // path start with '/' or '\', is absolute path without driver name - wcscat_s(filePath, m_locationPath->Data()); - // remove '/' or '\\' - wcscat_s(filePath, (const WCHAR*)url[1]); - }else - { - wcscat_s(filePath, m_locationPath->Data()); - wcscat_s(filePath, url); - } - - Platform::Array^ data = lazy ? ReadData(ref new Platform::String(filePath), 0, FMT_CHUNK_MAX) : ReadData(ref new Platform::String(filePath)); - UINT32 length = data->Length; - const byte * dataPtr = data->Data; - UINT32 offset = 0; - - DWORD riffDataSize = 0; - - auto ReadChunk = [&length, &offset, &dataPtr, &riffDataSize](DWORD fourcc, DWORD& outChunkSize, DWORD& outChunkPos) -> HRESULT - { - while (true) - { - if (offset + sizeof(DWORD) * 2 >= length) - { - return E_FAIL; - } - - // Read two DWORDs. - DWORD chunkType = *reinterpret_cast(&dataPtr[offset]); - DWORD chunkSize = *reinterpret_cast(&dataPtr[offset + sizeof(DWORD)]); - offset += sizeof(DWORD) * 2; - - if (chunkType == MAKEFOURCC('R', 'I', 'F', 'F')) - { - riffDataSize = chunkSize; - chunkSize = sizeof(DWORD); - outChunkSize = sizeof(DWORD); - outChunkPos = offset; - } - else - { - outChunkSize = chunkSize; - outChunkPos = offset; - } - - offset += chunkSize; - - if (chunkType == fourcc) - { - return S_OK; - } - } - }; - - // Locate riff chunk, check the file type. - DWORD chunkSize = 0; - DWORD chunkPos = 0; - - ThrowIfFailed(ReadChunk(MAKEFOURCC('R', 'I', 'F', 'F'), chunkSize, chunkPos)); - if (*reinterpret_cast(&dataPtr[chunkPos]) != MAKEFOURCC('W', 'A', 'V', 'E')) ThrowIfFailed(E_FAIL); - - // Locate 'fmt ' chunk, copy to WAVEFORMATEXTENSIBLE. - ThrowIfFailed(ReadChunk(MAKEFOURCC('f', 'm', 't', ' '), chunkSize, chunkPos)); - ThrowIfFailed((chunkSize <= sizeof(m_waveFormat)) ? S_OK : E_FAIL); - CopyMemory(&m_waveFormat, &dataPtr[chunkPos], chunkSize); - - // Locate the 'data' chunk and copy its contents to a buffer. - ThrowIfFailed(ReadChunk(MAKEFOURCC('d', 'a', 't', 'a'), chunkSize, chunkPos)); - m_dataLen = chunkSize; - m_offset = chunkPos; - - if (!lazy) - { - m_data.resize(chunkSize); - CopyMemory(m_data.data(), &dataPtr[chunkPos], chunkSize); - m_offset = 0; - } -} - -void MediaStreamer::ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength) -{ - if (!m_data.size()) - { - ReadChunk(buffer, 0, static_cast(m_dataLen), bufferLength); - } - else - { - UINT32 toCopy = static_cast(m_data.size() - m_offset); - if (toCopy > maxBufferSize) toCopy = maxBufferSize; - - CopyMemory(buffer, m_data.data(), toCopy); - *bufferLength = toCopy; - - m_offset += toCopy; - if (m_offset > m_data.size()) m_offset = m_data.size(); - } -} - -void MediaStreamer::ReadChunk(uint8* buffer, uint32 from, uint32 length, uint32* bytesRead) -{ - Platform::Array^ data = ReadData(m_filename, from, length); - *bytesRead = data->Length; - - if (*bytesRead > 0) - { - CopyMemory(buffer, (byte*)data->Data, data->Length); - } -} - -void MediaStreamer::Restart() -{ - m_offset = 0; -} diff --git a/cocos/audio/winrt/MediaStreamer.h b/cocos/audio/winrt/MediaStreamer.h deleted file mode 100644 index ed0f1f892e09..000000000000 --- a/cocos/audio/winrt/MediaStreamer.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#pragma once - -#include -#include -#include - -ref class MediaStreamer -{ -private: - WAVEFORMATEX m_waveFormat; - uint32 m_maxStreamLengthInBytes; - std::vector m_data; - size_t m_offset; - size_t m_dataLen; - Platform::String^ m_filename; - - Platform::Array^ ReadData(_In_ Platform::String^ filename); - Platform::Array^ ReadData(_In_ Platform::String^ filename, uint32 from, uint32 length); - -internal: - Windows::Storage::StorageFolder^ m_location; - Platform::String^ m_locationPath; - -public: - virtual ~MediaStreamer(); - -internal: - MediaStreamer(); - - WAVEFORMATEX& GetOutputWaveFormatEx() - { - return m_waveFormat; - } - - size_t GetMaxStreamLengthInBytes() - { - return m_dataLen; - } - - void Initialize(_In_ const WCHAR* url, bool lazy = false); - void ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength); - void ReadChunk(uint8* buffer, uint32 from, uint32 length, uint32* bytesRead); - void Restart(); -}; diff --git a/cocos/audio/winrt/SimpleAudioEngine.cpp b/cocos/audio/winrt/SimpleAudioEngine.cpp deleted file mode 100644 index 82de442eda00..000000000000 --- a/cocos/audio/winrt/SimpleAudioEngine.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2011 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "audio/include/SimpleAudioEngine.h" -#include "audio/winrt/Audio.h" - -#include -#include "platform/CCPlatformMacros.h" -#include "platform/CCFileUtils.h" - -using namespace std; -USING_NS_CC; - -namespace CocosDenshion { - -Audio* s_audioController = nullptr; -bool s_initialized = false; - -SimpleAudioEngine* SimpleAudioEngine::getInstance() -{ - static SimpleAudioEngine s_SharedEngine; - return &s_SharedEngine; -} - - -static Audio* sharedAudioController() -{ - if (! s_audioController || !s_initialized) - { - if (s_audioController == nullptr) - { - s_audioController = new Audio; - } - s_audioController->Initialize(); - s_audioController->CreateResources(); - s_initialized = true; - } - - return s_audioController; -} - -SimpleAudioEngine::SimpleAudioEngine() -{ -} - -SimpleAudioEngine::~SimpleAudioEngine() -{ -} - - -void SimpleAudioEngine::end() -{ - sharedAudioController()->StopBackgroundMusic(true); - sharedAudioController()->StopAllSoundEffects(true); - sharedAudioController()->ReleaseResources(); - s_initialized = false; -} - - - -////////////////////////////////////////////////////////////////////////// -// BackgroundMusic -////////////////////////////////////////////////////////////////////////// - -void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) -{ - if (! pszFilePath) - { - return; - } - - string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop); -} - -void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) -{ - sharedAudioController()->StopBackgroundMusic(bReleaseData); -} - -void SimpleAudioEngine::pauseBackgroundMusic() -{ - sharedAudioController()->PauseBackgroundMusic(); -} - -void SimpleAudioEngine::resumeBackgroundMusic() -{ - sharedAudioController()->ResumeBackgroundMusic(); -} - -void SimpleAudioEngine::rewindBackgroundMusic() -{ - sharedAudioController()->RewindBackgroundMusic(); -} - -bool SimpleAudioEngine::willPlayBackgroundMusic() -{ - return false; -} - -bool SimpleAudioEngine::isBackgroundMusicPlaying() -{ - return sharedAudioController()->IsBackgroundMusicPlaying(); -} - -////////////////////////////////////////////////////////////////////////// -// effect function -////////////////////////////////////////////////////////////////////////// - -unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain) -{ - unsigned int sound; - string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound); // TODO: need to support playEffect parameters - return sound; -} - -void SimpleAudioEngine::stopEffect(unsigned int nSoundId) -{ - sharedAudioController()->StopSoundEffect(nSoundId); -} - -void SimpleAudioEngine::preloadEffect(const char* pszFilePath) -{ - string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - sharedAudioController()->PreloadSoundEffect(fullPath.c_str()); -} - -void SimpleAudioEngine::pauseEffect(unsigned int nSoundId) -{ - sharedAudioController()->PauseSoundEffect(nSoundId); -} - -void SimpleAudioEngine::resumeEffect(unsigned int nSoundId) -{ - sharedAudioController()->ResumeSoundEffect(nSoundId); -} - -void SimpleAudioEngine::pauseAllEffects() -{ - sharedAudioController()->PauseAllSoundEffects(); -} - -void SimpleAudioEngine::resumeAllEffects() -{ - sharedAudioController()->ResumeAllSoundEffects(); -} - -void SimpleAudioEngine::stopAllEffects() -{ - sharedAudioController()->StopAllSoundEffects(false); -} - -void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) -{ - UNUSED_PARAM(pszFilePath); -} - -void SimpleAudioEngine::unloadEffect(const char* pszFilePath) -{ - string fullPath = FileUtils::getInstance()->fullPathForFilename(pszFilePath); - sharedAudioController()->UnloadSoundEffect(fullPath.c_str()); -} - -////////////////////////////////////////////////////////////////////////// -// volume interface -////////////////////////////////////////////////////////////////////////// - -float SimpleAudioEngine::getBackgroundMusicVolume() -{ - return sharedAudioController()->GetBackgroundVolume(); -} - -void SimpleAudioEngine::setBackgroundMusicVolume(float volume) -{ - sharedAudioController()->SetBackgroundVolume((volume<=0.0f)? 0.0f : volume); -} - -float SimpleAudioEngine::getEffectsVolume() -{ - return sharedAudioController()->GetSoundEffectVolume(); -} - -void SimpleAudioEngine::setEffectsVolume(float volume) -{ - sharedAudioController()->SetSoundEffectVolume((volume<=0.0f)? 0.0f : volume); -} - -} // end of namespace CocosDenshion diff --git a/cocos/base/CCAsyncTaskPool.h b/cocos/base/CCAsyncTaskPool.h index be588ee27192..8d9989e30e01 100644 --- a/cocos/base/CCAsyncTaskPool.h +++ b/cocos/base/CCAsyncTaskPool.h @@ -74,9 +74,6 @@ class CC_DLL AsyncTaskPool */ static void destroyInstance(); - /** @deprecated Use method destroyInstance() instead. */ - CC_DEPRECATED_ATTRIBUTE static void destoryInstance() { return destroyInstance(); } - /** * Stop tasks. * diff --git a/cocos/base/CCAutoreleasePool.h b/cocos/base/CCAutoreleasePool.h index 1216186d9b39..c3d139acd877 100644 --- a/cocos/base/CCAutoreleasePool.h +++ b/cocos/base/CCAutoreleasePool.h @@ -154,10 +154,7 @@ class CC_DLL PoolManager { public: - CC_DEPRECATED_ATTRIBUTE static PoolManager* sharedPoolManager() { return getInstance(); } static PoolManager* getInstance(); - - CC_DEPRECATED_ATTRIBUTE static void purgePoolManager() { destroyInstance(); } static void destroyInstance(); /** diff --git a/cocos/base/CCConfiguration.cpp b/cocos/base/CCConfiguration.cpp index 28ad261b0b21..444a52f5efcc 100644 --- a/cocos/base/CCConfiguration.cpp +++ b/cocos/base/CCConfiguration.cpp @@ -111,6 +111,18 @@ std::string Configuration::getInfo() const return forDump.getDescription(); } +#ifdef CC_USE_METAL +void Configuration::gatherGPUInfo() +{ + //support PVRTC/EAC/ETC2/ASTC/BC/YUV +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + _supportsPVRTC = true; +#else + _supportsPVRTC = false; +#endif + _supportsETC1 = false; //support etc2; +} +#else void Configuration::gatherGPUInfo() { _valueDict["gl.vendor"] = Value((const char*)glGetString(GL_VENDOR)); @@ -172,6 +184,8 @@ void Configuration::gatherGPUInfo() CHECK_GL_ERROR_DEBUG(); } +#endif + Configuration* Configuration::getInstance() { if (! s_sharedConfiguration) @@ -188,18 +202,6 @@ void Configuration::destroyInstance() CC_SAFE_RELEASE_NULL(s_sharedConfiguration); } -// FIXME: deprecated -Configuration* Configuration::sharedConfiguration() -{ - return Configuration::getInstance(); -} - -// FIXME: deprecated -void Configuration::purgeConfiguration() -{ - Configuration::destroyInstance(); -} - bool Configuration::checkForGLExtension(const std::string &searchName) const { @@ -305,8 +307,6 @@ bool Configuration::supportsOESPackedDepthStencil() const return _supportsOESPackedDepthStencil; } - - int Configuration::getMaxSupportDirLightInShader() const { return _maxDirLightInShader; diff --git a/cocos/base/CCConfiguration.h b/cocos/base/CCConfiguration.h index 91bce875ca3f..c8641f0128a9 100644 --- a/cocos/base/CCConfiguration.h +++ b/cocos/base/CCConfiguration.h @@ -62,12 +62,6 @@ class CC_DLL Configuration : public Ref */ static void destroyInstance(); - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static Configuration *sharedConfiguration(); - - /** @deprecated Use destroyInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static void purgeConfiguration(); - public: /** Destructor * @js NA diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 133d62cb15a9..d7f0e0e15491 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -44,11 +44,6 @@ #include "platform/win32/inet_pton_mingw.h" #endif #define bzero(a, b) memset(a, 0, b); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#include "platform/winrt/inet_ntop_winrt.h" -#include "platform/winrt/inet_pton_winrt.h" -#include "platform/winrt/CCWinRTUtils.h" -#endif #else #include #include @@ -68,7 +63,6 @@ #include "renderer/CCTextureCache.h" #include "base/base64.h" #include "base/ccUtils.h" -#include "base/allocator/CCAllocatorDiagnostics.h" NS_CC_BEGIN extern const char* cocos2dVersion(void); @@ -120,10 +114,6 @@ namespace { (LPARAM)(LPVOID)&myCDS); } } -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - void SendLogToWindow(const char *log) - { - } #endif } @@ -172,7 +162,7 @@ void log(const char * format, ...) #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID __android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", "%s", buf); -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 int pos = 0; int len = nret; @@ -532,7 +522,7 @@ bool Console::listenOnTCP(int port) hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) WSADATA wsaData; n = WSAStartup(MAKEWORD(2, 2),&wsaData); #endif @@ -574,7 +564,7 @@ bool Console::listenOnTCP(int port) break; /* success */ /* bind error, close and try next one */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) closesocket(listenfd); #else close(listenfd); @@ -783,7 +773,7 @@ void Console::loop() //receive a SIGPIPE, which will cause linux system shutdown the sending process. //Add this ioctl code to check if the socket has been closed by peer. -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) u_long n = 0; ioctlsocket(fd, FIONREAD, &n); #else @@ -836,14 +826,14 @@ void Console::loop() // clean up: ignore stdin, stdout and stderr for(const auto &fd: _fds ) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) closesocket(fd); #else close(fd); #endif } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) closesocket(_listenfd); WSACleanup(); #else @@ -1207,7 +1197,7 @@ void Console::commandExit(int fd, const std::string& /*args*/) { FD_CLR(fd, &_read_set); _fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end()); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) closesocket(fd); #else close(fd); diff --git a/cocos/base/CCDataVisitor.cpp b/cocos/base/CCDataVisitor.cpp deleted file mode 100644 index ae2d20142dac..000000000000 --- a/cocos/base/CCDataVisitor.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "base/CCRef.h" -#include "deprecated/CCBool.h" -#include "deprecated/CCInteger.h" -#include "deprecated/CCFloat.h" -#include "deprecated/CCDouble.h" -#include "deprecated/CCString.h" -#include "deprecated/CCArray.h" -#include "deprecated/CCDictionary.h" -#include "deprecated/CCSet.h" - -NS_CC_BEGIN - -void DataVisitor::visit(const __Bool *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Integer *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Float *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Double *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __String *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Array *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Dictionary *value) -{ - visitObject(value); -} - -void DataVisitor::visit(const __Set *value) -{ - visitObject(value); -} - -// PrettyPrinter -PrettyPrinter::PrettyPrinter(int indentLevel/* = 0 */) -{ - setIndentLevel(indentLevel); -} - -void PrettyPrinter::clear() -{ - _result.clear(); -} - -std::string PrettyPrinter::getResult() -{ - return _result; -} - -void PrettyPrinter::visitObject(const Ref *p) -{ - char buf[50] = {0}; - sprintf(buf, "%p", p); - _result += buf; -} - -void PrettyPrinter::visit(const __Bool * p) -{ - char buf[50] = {0}; - sprintf(buf, "%s", p->getValue() ? "true" : "false"); - _result += buf; -} - -void PrettyPrinter::visit(const __Integer *p) -{ - char buf[50] = {0}; - sprintf(buf, "%d", p->getValue()); - _result += buf; -} - -void PrettyPrinter::visit(const __Float *p) -{ - char buf[50] = {0}; - sprintf(buf, "%f", p->getValue()); - _result += buf; -} - -void PrettyPrinter::visit(const __Double *p) -{ - char buf[50] = {0}; - sprintf(buf, "%lf", p->getValue()); - _result += buf; -} - -void PrettyPrinter::visit(const __String *p) -{ - _result += p->getCString(); -} - -void PrettyPrinter::visit(const __Array *p) -{ - _result += "\n"; - _result += _indentStr; - _result += "\n"; - - setIndentLevel(_indentLevel+1); - Ref* obj; - int i = 0; - char buf[50] = {0}; - CCARRAY_FOREACH(p, obj) - { - if (i > 0) { - _result += "\n"; - } - sprintf(buf, "%s%02d: ", _indentStr.c_str(), i); - _result += buf; - PrettyPrinter v(_indentLevel); -//FIXME:james obj->acceptVisitor(v); - _result += v.getResult(); - i++; - } - setIndentLevel(_indentLevel-1); - - _result += "\n"; - _result += _indentStr; - _result += ""; -} - -void PrettyPrinter::visit(const __Dictionary *p) -{ - _result += "\n"; - _result += _indentStr; - _result += "\n"; - - setIndentLevel(_indentLevel+1); - DictElement* element; - bool bFirstElement = true; - char buf[1000] = {0}; - CCDICT_FOREACH(p, element) - { - if (!bFirstElement) { - _result += "\n"; - } - sprintf(buf, "%s%s: ", _indentStr.c_str(),element->getStrKey()); - _result += buf; - PrettyPrinter v(_indentLevel); -//FIXME:james element->getObject()->acceptVisitor(v); - _result += v.getResult(); - bFirstElement = false; - } - setIndentLevel(_indentLevel-1); - - _result += "\n"; - _result += _indentStr; - _result += ""; -} - -void PrettyPrinter::visit(const __Set *p) -{ - _result += "\n"; - _result += _indentStr; - _result += "\n"; - - setIndentLevel(_indentLevel+1); - - __Set* tmp = const_cast<__Set*>(p); - - for (int i = 0, tmp_size = tmp->count(); i < tmp_size; ++i) { - if (i > 0) { - _result += "\n"; - } - _result += _indentStr.c_str(); - PrettyPrinter v(_indentLevel); -//FIXME:james (*it)->acceptVisitor(v); - _result += v.getResult(); - } - setIndentLevel(_indentLevel-1); - - _result += "\n"; - _result += _indentStr; - _result += "\n"; -} - -void PrettyPrinter::setIndentLevel(int indentLevel) -{ - _indentLevel = indentLevel; - _indentStr.clear(); - for (int i = 0; i < _indentLevel; ++i) { - _indentStr += "\t"; - } -} - -NS_CC_END diff --git a/cocos/base/CCDataVisitor.h b/cocos/base/CCDataVisitor.h deleted file mode 100644 index b6ae49a71687..000000000000 --- a/cocos/base/CCDataVisitor.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCDATAVISITOR_H__ -#define __CCDATAVISITOR_H__ -/// @cond DO_NOT_SHOW - -#include "platform/CCPlatformMacros.h" -#include - -NS_CC_BEGIN - -class Ref; -class __Bool; -class __Integer; -class __Float; -class __Double; -class __String; -class __Array; -class __Dictionary; -class __Set; - -/** - * Visitor that helps to perform action that depends on polymorphic object type - * - * Use cases: - * - data serialization, - * - pretty printing of Ref* - * - safe value reading from Array, __Dictionary, Set - * - * Usage: - * 1. subclass DataVisitor - * 2. overload visit() methods for object that you need to handle - * 3. handle other objects in visitObject() - * 4. pass your visitor to Object::acceptVisitor() - */ -class CC_DLL DataVisitor -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~DataVisitor() {} - - /** default method, called from non-overloaded methods and for unrecognized objects */ - virtual void visitObject(const Ref *p) = 0; - - virtual void visit(const __Bool *p); - virtual void visit(const __Integer *p); - virtual void visit(const __Float *p); - virtual void visit(const __Double *p); - virtual void visit(const __String *p); - virtual void visit(const __Array *p); - virtual void visit(const __Dictionary *p); - virtual void visit(const __Set *p); -}; - - -class CC_DLL PrettyPrinter : public DataVisitor -{ -public: - PrettyPrinter(int indentLevel = 0); - - virtual void clear(); - virtual std::string getResult(); - - virtual void visitObject(const Ref *p); - virtual void visit(const __Bool * p); - virtual void visit(const __Integer *p); - virtual void visit(const __Float *p); - virtual void visit(const __Double *p); - virtual void visit(const __String *p); - virtual void visit(const __Array *p); - virtual void visit(const __Dictionary *p); - virtual void visit(const __Set *p); -private: - void setIndentLevel(int indentLevel); - int _indentLevel; - std::string _indentStr; - std::string _result; -}; - -/** - * @endcond - */ - -NS_CC_END - -/// @endcond -#endif // __CCDATAVISITOR_H__ diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 496e89e7f5d6..d94c82715590 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -32,7 +32,6 @@ THE SOFTWARE. // standard includes #include -#include "2d/CCDrawingPrimitives.h" #include "2d/CCSpriteFrameCache.h" #include "platform/CCFileUtils.h" @@ -48,7 +47,6 @@ THE SOFTWARE. #include "renderer/CCTextureCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCRenderState.h" -#include "renderer/CCFrameBuffer.h" #include "2d/CCCamera.h" #include "base/CCUserDefault.h" #include "base/ccUtils.h" @@ -63,15 +61,12 @@ THE SOFTWARE. #include "base/CCAsyncTaskPool.h" #include "base/ObjectFactory.h" #include "platform/CCApplication.h" +#include "renderer/backend/ProgramCache.h" #if CC_ENABLE_SCRIPT_BINDING #include "base/CCScriptSupport.h" #endif -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h" -#endif - /** Position of the FPS @@ -161,9 +156,6 @@ bool Director::init(void) _renderer = new (std::nothrow) Renderer; RenderState::initialize(); -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID - EngineDataManager::init(); -#endif return true; } @@ -199,6 +191,14 @@ Director::~Director(void) ObjectFactory::destroyInstance(); s_SharedDirector = nullptr; + +#if CC_ENABLE_SCRIPT_BINDING + ScriptEngineManager::destroyInstance(); +#endif + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif } void Director::setDefaultValues(void) @@ -250,6 +250,8 @@ void Director::setGLDefaultValues() // Draw the Scene void Director::drawScene() { + _renderer->beginFrame(); + // calculate "global" dt calculateDeltaTime(); @@ -266,8 +268,7 @@ void Director::drawScene() _eventDispatcher->dispatchEvent(_eventAfterUpdate); } - _renderer->clear(); - experimental::FrameBuffer::clearAllFBOs(); + _renderer->clear(ClearFlag::ALL, _clearColor, 1, 0); _eventDispatcher->dispatchEvent(_eventBeforeDraw); @@ -311,7 +312,7 @@ void Director::drawScene() #endif } - _renderer->render(); + _renderer->render(); _eventDispatcher->dispatchEvent(_eventAfterDraw); @@ -324,6 +325,8 @@ void Director::drawScene() { _openGLView->swapBuffers(); } + + _renderer->endFrame(); if (_displayStats) { @@ -375,6 +378,7 @@ void Director::setOpenGLView(GLView *openGLView) { // Configuration. Gather GPU info Configuration *conf = Configuration::getInstance(); + //TODO: minggo conf->gatherGPUInfo(); CCLOG("%s\n",conf->getInfo().c_str()); @@ -393,9 +397,7 @@ void Director::setOpenGLView(GLView *openGLView) setGLDefaultValues(); } - _renderer->initGLView(); - - CHECK_GL_ERROR_DEBUG(); + _renderer->init(); if (_eventDispatcher) { @@ -449,7 +451,10 @@ void Director::initMatrixStack() _modelViewMatrixStack.pop(); } - _projectionMatrixStackList.clear(); + while (!_projectionMatrixStack.empty()) + { + _projectionMatrixStack.pop(); + } while (!_textureMatrixStack.empty()) { @@ -457,9 +462,7 @@ void Director::initMatrixStack() } _modelViewMatrixStack.push(Mat4::IDENTITY); - std::stack projectionMatrixStack; - projectionMatrixStack.push(Mat4::IDENTITY); - _projectionMatrixStackList.push_back(projectionMatrixStack); + _projectionMatrixStack.push(Mat4::IDENTITY); _textureMatrixStack.push(Mat4::IDENTITY); } @@ -468,20 +471,6 @@ void Director::resetMatrixStack() initMatrixStack(); } -void Director::initProjectionMatrixStack(size_t stackCount) -{ - _projectionMatrixStackList.clear(); - std::stack projectionMatrixStack; - projectionMatrixStack.push(Mat4::IDENTITY); - for (size_t i = 0; i < stackCount; ++i) - _projectionMatrixStackList.push_back(projectionMatrixStack); -} - -size_t Director::getProjectionMatrixStackSize() -{ - return _projectionMatrixStackList.size(); -} - void Director::popMatrix(MATRIX_STACK_TYPE type) { if(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW == type) @@ -490,7 +479,7 @@ void Director::popMatrix(MATRIX_STACK_TYPE type) } else if(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION == type) { - _projectionMatrixStackList[0].pop(); + _projectionMatrixStack.pop(); } else if(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE == type) { @@ -502,11 +491,6 @@ void Director::popMatrix(MATRIX_STACK_TYPE type) } } -void Director::popProjectionMatrix(size_t index) -{ - _projectionMatrixStackList[index].pop(); -} - void Director::loadIdentityMatrix(MATRIX_STACK_TYPE type) { if(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW == type) @@ -515,7 +499,7 @@ void Director::loadIdentityMatrix(MATRIX_STACK_TYPE type) } else if(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION == type) { - _projectionMatrixStackList[0].top() = Mat4::IDENTITY; + _projectionMatrixStack.top() = Mat4::IDENTITY; } else if(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE == type) { @@ -527,10 +511,6 @@ void Director::loadIdentityMatrix(MATRIX_STACK_TYPE type) } } -void Director::loadProjectionIdentityMatrix(size_t index) -{ - _projectionMatrixStackList[index].top() = Mat4::IDENTITY; -} void Director::loadMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) { @@ -540,7 +520,7 @@ void Director::loadMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) } else if(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION == type) { - _projectionMatrixStackList[0].top() = mat; + _projectionMatrixStack.top() = mat; } else if(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE == type) { @@ -552,11 +532,6 @@ void Director::loadMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) } } -void Director::loadProjectionMatrix(const Mat4& mat, size_t index) -{ - _projectionMatrixStackList[index].top() = mat; -} - void Director::multiplyMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) { if(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW == type) @@ -565,7 +540,7 @@ void Director::multiplyMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) } else if(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION == type) { - _projectionMatrixStackList[0].top() *= mat; + _projectionMatrixStack.top() *= mat; } else if(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE == type) { @@ -577,11 +552,6 @@ void Director::multiplyMatrix(MATRIX_STACK_TYPE type, const Mat4& mat) } } -void Director::multiplyProjectionMatrix(const Mat4& mat, size_t index) -{ - _projectionMatrixStackList[index].top() *= mat; -} - void Director::pushMatrix(MATRIX_STACK_TYPE type) { if(type == MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW) @@ -590,7 +560,7 @@ void Director::pushMatrix(MATRIX_STACK_TYPE type) } else if(type == MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION) { - _projectionMatrixStackList[0].push(_projectionMatrixStackList[0].top()); + _projectionMatrixStack.push(_projectionMatrixStack.top()); } else if(type == MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE) { @@ -602,11 +572,6 @@ void Director::pushMatrix(MATRIX_STACK_TYPE type) } } -void Director::pushProjectionMatrix(size_t index) -{ - _projectionMatrixStackList[index].push(_projectionMatrixStackList[index].top()); -} - const Mat4& Director::getMatrix(MATRIX_STACK_TYPE type) const { if(type == MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW) @@ -615,7 +580,7 @@ const Mat4& Director::getMatrix(MATRIX_STACK_TYPE type) const } else if(type == MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION) { - return _projectionMatrixStackList[0].top(); + return _projectionMatrixStack.top(); } else if(type == MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE) { @@ -626,11 +591,6 @@ const Mat4& Director::getMatrix(MATRIX_STACK_TYPE type) const return _modelViewMatrixStack.top(); } -const Mat4& Director::getProjectionMatrix(size_t index) const -{ - return _projectionMatrixStackList[index].top(); -} - void Director::setProjection(Projection projection) { Size size = _winSizeInPoints; @@ -710,27 +670,36 @@ float Director::getZEye(void) const } void Director::setAlphaBlending(bool on) +{ + //TODO: minggo +// if (on) +// { +// utils::setBlending(CC_BLEND_SRC, CC_BLEND_DST); +// } +// else +// { +// utils::setBlending(BlendFactor::ONE, BlendFactor::ZERO); +// } +// +// CHECK_GL_ERROR_DEBUG(); +} + +void Director::setDepthTest(bool on) { if (on) { - utils::setBlending(CC_BLEND_SRC, CC_BLEND_DST); + _renderer->setDepthTest(true); + _renderer->setDepthCompareFunction(backend::CompareFunction::LESS_EQUAL); } else - { - utils::setBlending(GL_ONE, GL_ZERO); - } + _renderer->setDepthTest(false); - CHECK_GL_ERROR_DEBUG(); -} - -void Director::setDepthTest(bool on) -{ - _renderer->setDepthTest(on); + _renderer->setDepthWrite(on); } void Director::setClearColor(const Color4F& clearColor) { - _renderer->setClearColor(clearColor); + _clearColor = clearColor; } static void GLToClipTransform(Mat4 *transformOut) @@ -1074,28 +1043,14 @@ void Director::reset() FontFreeType::shutdownFreeType(); // purge all managed caches - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif -//it will crash clang static analyzer so hide it if __clang_analyzer__ defined -#ifndef __clang_analyzer__ - DrawPrimitives::free(); -#endif -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif AnimationCache::destroyInstance(); SpriteFrameCache::destroyInstance(); GLProgramCache::destroyInstance(); GLProgramStateCache::destroyInstance(); FileUtils::destroyInstance(); AsyncTaskPool::destroyInstance(); + backend::ProgramCache::destroyInstance(); + // cocos2d-x specific data structures UserDefault::destroyInstance(); @@ -1109,7 +1064,7 @@ void Director::purgeDirector() { reset(); - CHECK_GL_ERROR_DEBUG(); +// CHECK_GL_ERROR_DEBUG(); // OpenGL view if (_openGLView) @@ -1118,9 +1073,6 @@ void Director::purgeDirector() _openGLView = nullptr; } -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID - EngineDataManager::destroy(); -#endif // delete Director release(); } @@ -1450,7 +1402,7 @@ void Director::startAnimation(SetIntervalReason reason) _cocos2d_thread_id = std::this_thread::get_id(); - Application::getInstance()->setAnimationInterval(_animationInterval, reason); + Application::getInstance()->setAnimationInterval(_animationInterval); // fix issue #3509, skip one fps to avoid incorrect time calculation. setNextDeltaTimeZero(true); diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index 6aaef8341e1b..4281466280c2 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -3,7 +3,7 @@ Copyright (c) 2010-2013 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -25,9 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCDIRECTOR_H__ -#define __CCDIRECTOR_H__ +#pragma once #include #include @@ -63,10 +61,6 @@ class Renderer; class Camera; class Console; -namespace experimental -{ - class FrameBuffer; -} /** * @brief Matrix stack type. @@ -142,12 +136,6 @@ class CC_DLL Director : public Ref */ static Director* getInstance(); - /** - * @deprecated Use getInstance() instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE static Director* sharedDirector() { return Director::getInstance(); } - /** * @js ctor */ @@ -475,35 +463,16 @@ class CC_DLL Director : public Ref */ void pushMatrix(MATRIX_STACK_TYPE type); - /** - * Clones a projection matrix and put it to the top of projection matrix stack. - * @param index The index of projection matrix stack. - * @js NA - */ - void pushProjectionMatrix(size_t index); - /** Pops the top matrix of the specified type of matrix stack. * @js NA */ void popMatrix(MATRIX_STACK_TYPE type); - /** Pops the top matrix of the projection matrix stack. - * @param index The index of projection matrix stack. - * @js NA - */ - void popProjectionMatrix(size_t index); - /** Adds an identity matrix to the top of specified type of matrix stack. * @js NA */ void loadIdentityMatrix(MATRIX_STACK_TYPE type); - /** Adds an identity matrix to the top of projection matrix stack. - * @param index The index of projection matrix stack. - * @js NA - */ - void loadProjectionIdentityMatrix(size_t index); - /** * Adds a matrix to the top of specified type of matrix stack. * @@ -513,15 +482,6 @@ class CC_DLL Director : public Ref */ void loadMatrix(MATRIX_STACK_TYPE type, const Mat4& mat); - /** - * Adds a matrix to the top of projection matrix stack. - * - * @param mat The matrix that to be added. - * @param index The index of projection matrix stack. - * @js NA - */ - void loadProjectionMatrix(const Mat4& mat, size_t index); - /** * Multiplies a matrix to the top of specified type of matrix stack. * @@ -531,47 +491,18 @@ class CC_DLL Director : public Ref */ void multiplyMatrix(MATRIX_STACK_TYPE type, const Mat4& mat); - /** - * Multiplies a matrix to the top of projection matrix stack. - * - * @param mat The matrix that to be multiplied. - * @param index The index of projection matrix stack. - * @js NA - */ - void multiplyProjectionMatrix(const Mat4& mat, size_t index); - /** * Gets the top matrix of specified type of matrix stack. * @js NA */ const Mat4& getMatrix(MATRIX_STACK_TYPE type) const; - /** - * Gets the top matrix of projection matrix stack. - * @param index The index of projection matrix stack. - * @js NA - */ - const Mat4& getProjectionMatrix(size_t index) const; - /** * Clear all types of matrix stack, and add identity matrix to these matrix stacks. * @js NA */ void resetMatrixStack(); - /** - * Init the projection matrix stack. - * @param stackCount The size of projection matrix stack. - * @js NA - */ - void initProjectionMatrixStack(size_t stackCount); - - /** - * Get the size of projection matrix stack. - * @js NA - */ - size_t getProjectionMatrixStackSize(); - /** * returns the cocos2d thread id. Useful to know if certain code is already running on the cocos2d thread @@ -616,11 +547,8 @@ class CC_DLL Director : public Ref void initMatrixStack(); std::stack _modelViewMatrixStack; - /** In order to support GL MultiView features, we need to use the matrix array, - but we don't know the number of MultiView, so using the vector instead. - */ - std::vector< std::stack > _projectionMatrixStackList; std::stack _textureMatrixStack; + std::stack _projectionMatrixStack; /** Scheduler associated with this director @since v2.0 @@ -710,6 +638,8 @@ class CC_DLL Director : public Ref /* Renderer for the Director */ Renderer *_renderer = nullptr; + Color4F _clearColor = {0, 0, 0, 1}; + /* Console for the director */ Console *_console = nullptr; @@ -725,15 +655,7 @@ class CC_DLL Director : public Ref friend class GLView; }; -// FIXME: Added for backward compatibility in case -// someone is subclassing it. -// Should be removed in v4.0 -class DisplayLinkDirector : public Director -{}; - // end of base group /** @} */ NS_CC_END - -#endif // __CCDIRECTOR_H__ diff --git a/cocos/base/CCEnumClass.h b/cocos/base/CCEnumClass.h new file mode 100644 index 000000000000..85eabdb04495 --- /dev/null +++ b/cocos/base/CCEnumClass.h @@ -0,0 +1,64 @@ +#pragma once + +#include + +namespace cocos2d{ + +template +struct EnableBitMaskOperators +{ + static const bool enable = false; +}; + +template +typename std::enable_if::enable, Enum>::type +operator |(Enum lhs, Enum rhs) +{ + using underlying = typename std::underlying_type::type; + return static_cast ( + static_cast(lhs) | + static_cast(rhs) + ); +} + +template +typename std::enable_if::enable, bool>::type +operator ==(Enum lhs, Enum rhs) +{ + using underlying = typename std::underlying_type::type; + static_cast(lhs) == static_cast(rhs); +} + +template +typename std::enable_if::enable, Enum>::type& +operator |=(Enum& lhs, Enum rhs) +{ + using underlying = typename std::underlying_type::type; + lhs = static_cast ( + static_cast(lhs) | + static_cast(rhs) + ); + + return lhs; +} + +template +typename std::enable_if::enable, unsigned int>::type +operator &(Enum lhs, Enum rhs) +{ + using underlying = typename std::underlying_type::type; + using impl_type = typename std::make_unsigned::type; + return impl_type ( + static_cast(lhs) & + static_cast(rhs) + ); +} + +#define ENABLE_BITMASK_OPERATORS(x) \ +template<> \ +struct EnableBitMaskOperators \ +{ \ + static const bool enable = true; \ +}; + +} // end of namespace cocos2d{ diff --git a/cocos/base/CCEventListenerController.cpp b/cocos/base/CCEventListenerController.cpp index e69dfa6df5d4..c32e761254a6 100644 --- a/cocos/base/CCEventListenerController.cpp +++ b/cocos/base/CCEventListenerController.cpp @@ -67,8 +67,6 @@ bool EventListenerController::init() break; case EventController::ControllerEventType::BUTTON_STATUS_CHANGED: { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) - const auto& keyStatus = evtController->_controller->_allKeyStatus[evtController->_keyCode]; const auto& keyPrevStatus = evtController->_controller->_allKeyPrevStatus[evtController->_keyCode]; @@ -84,7 +82,6 @@ bool EventListenerController::init() { this->onKeyRepeat(evtController->_controller, evtController->_keyCode, event); } -#endif } break; case EventController::ControllerEventType::AXIS_STATUS_CHANGED: diff --git a/cocos/base/CCNinePatchImageParser.cpp b/cocos/base/CCNinePatchImageParser.cpp index 6c21758ff0df..a59480987649 100644 --- a/cocos/base/CCNinePatchImageParser.cpp +++ b/cocos/base/CCNinePatchImageParser.cpp @@ -48,7 +48,7 @@ NinePatchImageParser::NinePatchImageParser(Image* image) ,_isRotated(false) { this->_imageFrame = Rect(0,0,image->getWidth(), image->getHeight()); - CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + CCASSERT(image->getPixelFormat()==Texture2D::PixelFormat::RGBA8888, "unsupported format, currently only supports rgba8888"); } @@ -57,7 +57,7 @@ NinePatchImageParser::NinePatchImageParser(Image* image, const Rect& frame, bool ,_imageFrame(frame) ,_isRotated(rotated) { - CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + CCASSERT(image->getPixelFormat()==Texture2D::PixelFormat::RGBA8888, "unsupported format, currently only supports rgba8888"); } @@ -192,7 +192,7 @@ Rect NinePatchImageParser::parseCapInset() const void NinePatchImageParser::setSpriteFrameInfo(Image* image, const cocos2d::Rect& frameRect, bool rotated ) { this->_image = image; - CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + CCASSERT(image->getPixelFormat()==Texture2D::PixelFormat::RGBA8888, "unsupported format, currently only supports rgba8888"); this->_imageFrame = frameRect; this->_isRotated = rotated; diff --git a/cocos/base/CCProfiling.cpp b/cocos/base/CCProfiling.cpp index 10803eb2d61d..93caeeffd565 100644 --- a/cocos/base/CCProfiling.cpp +++ b/cocos/base/CCProfiling.cpp @@ -50,12 +50,6 @@ Profiler* Profiler::getInstance() return g_sSharedProfiler; } -// FIXME:: deprecated -Profiler* Profiler::sharedProfiler(void) -{ - return Profiler::getInstance(); -} - ProfilingTimer* Profiler::createAndAddTimerWithName(const char* timerName) { ProfilingTimer *t = new (std::nothrow) ProfilingTimer(); diff --git a/cocos/base/CCProfiling.h b/cocos/base/CCProfiling.h index cb0ddecc4319..a3e521141217 100644 --- a/cocos/base/CCProfiling.h +++ b/cocos/base/CCProfiling.h @@ -76,11 +76,6 @@ class CC_DLL Profiler : public Ref */ static Profiler* getInstance(void); - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static Profiler* sharedProfiler(void); /** Creates and adds a new timer * @js NA diff --git a/cocos/base/CCProtocols.h b/cocos/base/CCProtocols.h index 7501a802854a..2c083b3bcc4a 100644 --- a/cocos/base/CCProtocols.h +++ b/cocos/base/CCProtocols.h @@ -177,7 +177,7 @@ class CC_DLL BlendProtocol * Sets the source blending function. * * @param blendFunc A structure with source and destination factor to specify pixel arithmetic, - * e.g. {GL_ONE, GL_ONE}, {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}. + * e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}. * @js NA * @lua NA */ @@ -197,9 +197,9 @@ class CC_DLL BlendProtocol * Node objects that uses a Texture2D to render the images. * The texture can have a blending function. * If the texture has alpha premultiplied the default blending function is: - * src=GL_ONE dst= GL_ONE_MINUS_SRC_ALPHA + * src=BlendFactor::ONE dst= BlendFactor::ONE_MINUS_SRC_ALPHA * else - * src=GL_SRC_ALPHA dst= GL_ONE_MINUS_SRC_ALPHA + * src=BlendFactor::SRC_ALPHA dst= BlendFactor::ONE_MINUS_SRC_ALPHA * But you can change the blending function at any time. */ class CC_DLL TextureProtocol : public BlendProtocol diff --git a/cocos/base/CCRef.cpp b/cocos/base/CCRef.cpp index d64b2181cc25..342582913ffc 100644 --- a/cocos/base/CCRef.cpp +++ b/cocos/base/CCRef.cpp @@ -64,15 +64,15 @@ Ref::Ref() Ref::~Ref() { #if CC_ENABLE_SCRIPT_BINDING - // if the object is referenced by Lua engine, remove it - if (_luaID) + ScriptEngineProtocol* pEngine = ScriptEngineManager::getInstance()->getScriptEngine(); + if (pEngine != nullptr && _luaID) { - ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptObjectByObject(this); + // if the object is referenced by Lua engine, remove it + pEngine->removeScriptObjectByObject(this); } #if !CC_ENABLE_GC_FOR_NATIVE_OBJECTS else { - ScriptEngineProtocol* pEngine = ScriptEngineManager::getInstance()->getScriptEngine(); if (pEngine != nullptr && pEngine->getScriptType() == kScriptTypeJavascript) { pEngine->removeScriptObjectByObject(this); diff --git a/cocos/base/CCRef.h b/cocos/base/CCRef.h index b7ab7f5fd5ca..b349198a228f 100644 --- a/cocos/base/CCRef.h +++ b/cocos/base/CCRef.h @@ -57,16 +57,6 @@ class CC_DLL Clonable * @lua NA */ virtual ~Clonable() {}; - - /** Returns a copy of the Ref. - * @deprecated Use clone() instead. - */ - CC_DEPRECATED_ATTRIBUTE Ref* copy() const - { - // use "clone" instead - CC_ASSERT(false); - return nullptr; - } }; /** @@ -187,16 +177,6 @@ typedef void (Ref::*SEL_SCHEDULE)(float); #define CC_MENU_SELECTOR(_SELECTOR) static_cast(&_SELECTOR) #define CC_SCHEDULE_SELECTOR(_SELECTOR) static_cast(&_SELECTOR) -// Deprecated -#define callfunc_selector(_SELECTOR) CC_CALLFUNC_SELECTOR(_SELECTOR) -#define callfuncN_selector(_SELECTOR) CC_CALLFUNCN_SELECTOR(_SELECTOR) -#define callfuncND_selector(_SELECTOR) CC_CALLFUNCND_SELECTOR(_SELECTOR) -#define callfuncO_selector(_SELECTOR) CC_CALLFUNCO_SELECTOR(_SELECTOR) -#define menu_selector(_SELECTOR) CC_MENU_SELECTOR(_SELECTOR) -#define schedule_selector(_SELECTOR) CC_SCHEDULE_SELECTOR(_SELECTOR) - - - NS_CC_END // end of base group /** @} */ diff --git a/cocos/base/CCScheduler.h b/cocos/base/CCScheduler.h index e10b72aeee4c..07a8a0a4d479 100644 --- a/cocos/base/CCScheduler.h +++ b/cocos/base/CCScheduler.h @@ -438,64 +438,6 @@ class CC_DLL Scheduler : public Ref */ void removeAllFunctionsToBePerformedInCocosThread(); - ///////////////////////////////////// - - // Deprecated methods: - - /** The scheduled method will be called every 'interval' seconds. - If paused is true, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. - If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. - repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously - delay is the amount of time the action will wait before it'll start - @deprecated Please use `Scheduler::schedule` instead. - @since v0.99.3, repeat and delay added in v1.1 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) - { - schedule(selector, target, interval, repeat, delay, paused); - } - - /** Calls scheduleSelector with CC_REPEAT_FOREVER and a 0 delay. - * @deprecated Please use `Scheduler::schedule` instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused) - { - schedule(selector, target, interval, paused); - } - - /** Schedules the 'update' selector for a given target with a given priority. - The 'update' selector will be called every frame. - The lower the priority, the earlier it is called. - @deprecated Please use 'Scheduler::scheduleUpdate' instead. - @since v0.99.3 - */ - template - CC_DEPRECATED_ATTRIBUTE void scheduleUpdateForTarget(T* target, int priority, bool paused) { scheduleUpdate(target, priority, paused); }; - - /** Unschedule a selector for a given target. - If you want to unschedule the "update", use unscheduleUpdateForTarget. - @deprecated Please use 'Scheduler::unschedule' instead. - @since v0.99.3 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE void unscheduleSelector(SEL_SCHEDULE selector, Ref *target) { unschedule(selector, target); }; - - /** Checks whether a selector for a given target is scheduled. - @deprecated Please use 'Scheduler::isScheduled' instead. - @since v0.99.3 - @js NA - */ - CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduled(selector, target); }; - - /** Unschedules the update selector for a given target - @deprecated Please use 'Scheduler::unscheduleUpdate' instead. - @since v0.99.3 - */ - CC_DEPRECATED_ATTRIBUTE void unscheduleUpdateForTarget(Ref *target) { return unscheduleUpdate(target); }; - protected: /** Schedules the 'callback' function for a given target with a given priority. diff --git a/cocos/base/CCScriptSupport.h b/cocos/base/CCScriptSupport.h index 68792e5a71c7..e7ae78cf9a32 100644 --- a/cocos/base/CCScriptSupport.h +++ b/cocos/base/CCScriptSupport.h @@ -901,20 +901,6 @@ class CC_DLL ScriptEngineManager * @js NA */ static void sendNodeEventToLua(Node* node, int action); - /** - * @deprecated Use getInstance() instead. - * - * @lua NA - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE static ScriptEngineManager* sharedManager() { return ScriptEngineManager::getInstance(); }; - /** - * @deprecated Use destroyInstance() instead. - * - * @lua NA - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedManager() { ScriptEngineManager::destroyInstance(); }; private: ScriptEngineManager(void) diff --git a/cocos/base/CCStencilStateManager.cpp b/cocos/base/CCStencilStateManager.cpp index c5742fa0a0f2..d1f2d62ef04b 100644 --- a/cocos/base/CCStencilStateManager.cpp +++ b/cocos/base/CCStencilStateManager.cpp @@ -23,79 +23,56 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "base/CCStencilStateManager.h" #include "base/CCDirector.h" -#include "renderer/CCGLProgramCache.h" #include "renderer/CCRenderer.h" -#include "renderer/CCRenderState.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) -#define CC_CLIPPING_NODE_OPENGLES 0 -#else -#define CC_CLIPPING_NODE_OPENGLES 1 -#endif +#include "renderer/ccShaders.h" +#include "renderer/backend/ProgramState.h" NS_CC_BEGIN -GLint StencilStateManager::s_layer = -1; +int StencilStateManager::s_layer = -1; StencilStateManager::StencilStateManager() -: _alphaThreshold(1.0f) -, _inverted(false) -, _currentStencilEnabled(GL_FALSE) -, _currentStencilWriteMask(~0) -, _currentStencilFunc(GL_ALWAYS) -, _currentStencilRef(0) -, _currentStencilValueMask(~0) -, _currentStencilFail(GL_KEEP) -, _currentStencilPassDepthFail(GL_KEEP) -, _currentStencilPassDepthPass(GL_KEEP) -, _currentDepthWriteMask(GL_TRUE) -, _currentAlphaTestEnabled(GL_FALSE) -, _currentAlphaTestFunc(GL_ALWAYS) -, _currentAlphaTestRef(1) - -{ -} - -void StencilStateManager::drawFullScreenQuadClearStencil() { - Director* director = Director::getInstance(); - CCASSERT(nullptr != director, "Director is null when setting matrix stack"); - - director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - director->loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - - director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - director->loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - - Vec2 vertices[] = { + auto& vertexLayout = _customCommand.getPipelineDescriptor().vertexLayout; + vertexLayout.setAtrribute("a_position", 0, backend::VertexFormat::FLOAT_R32G32, 0, false); + vertexLayout.setLayout(2 * sizeof(float), backend::VertexStepMode::VERTEX); + + auto& pipelineDescriptor = _customCommand.getPipelineDescriptor(); + _programState = new (std::nothrow) backend::ProgramState(positionUColor_vert, positionUColor_frag); + pipelineDescriptor.programState = _programState; + _mvpMatrixLocaiton = pipelineDescriptor.programState->getUniformLocation("u_MVPMatrix"); + _colorUniformLocation = pipelineDescriptor.programState->getUniformLocation("u_color"); + + + Vec2 vertices[4] = { Vec2(-1.0f, -1.0f), Vec2(1.0f, -1.0f), Vec2(1.0f, 1.0f), Vec2(-1.0f, 1.0f) }; - - auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_U_COLOR); - - int colorLocation = glProgram->getUniformLocation("u_color"); - CHECK_GL_ERROR_DEBUG(); - + _customCommand.createVertexBuffer(sizeof(Vec2), 4, CustomCommand::BufferUsage::STATIC); + _customCommand.updateVertexBuffer(vertices, sizeof(vertices)); + + unsigned short indices[6] = {0, 1, 2, 0, 2, 3}; + _customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, 6, CustomCommand::BufferUsage::STATIC); + _customCommand.updateIndexBuffer(indices, sizeof(indices)); + Color4F color(1, 1, 1, 1); - - glProgram->use(); - glProgram->setUniformsForBuiltins(); - glProgram->setUniformLocationWith4fv(colorLocation, (GLfloat*) &color.r, 1); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, 4); - - director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + pipelineDescriptor.programState->setUniform(_colorUniformLocation, &color, sizeof(color)); +} + +StencilStateManager::~StencilStateManager() +{ + CC_SAFE_RELEASE(_programState); +} + +void StencilStateManager::drawFullScreenQuadClearStencil(float globalZOrder) +{ + _customCommand.init(globalZOrder); + Director::getInstance()->getRenderer()->addCommand(&_customCommand); + _customCommand.getPipelineDescriptor().programState->setUniform(_mvpMatrixLocaiton, Mat4::IDENTITY.m, sizeof(Mat4::IDENTITY.m)); } @@ -119,132 +96,107 @@ bool StencilStateManager::isInverted()const return _inverted; } -void StencilStateManager::onBeforeVisit() +void StencilStateManager::onBeforeVisit(float globalZOrder) { - /////////////////////////////////// - // INIT - + auto renderer = Director::getInstance()->getRenderer(); + // increment the current layer s_layer++; - + // mask of the current layer (ie: for layer 3: 00000100) GLint mask_layer = 0x1 << s_layer; // mask of all layers less than the current (ie: for layer 3: 00000011) GLint mask_layer_l = mask_layer - 1; // mask of all layers less than or equal to the current (ie: for layer 3: 00000111) _mask_layer_le = mask_layer | mask_layer_l; - - // manually save the stencil state - - _currentStencilEnabled = glIsEnabled(GL_STENCIL_TEST); - glGetIntegerv(GL_STENCIL_WRITEMASK, (GLint *)&_currentStencilWriteMask); - glGetIntegerv(GL_STENCIL_FUNC, (GLint *)&_currentStencilFunc); - glGetIntegerv(GL_STENCIL_REF, &_currentStencilRef); - glGetIntegerv(GL_STENCIL_VALUE_MASK, (GLint *)&_currentStencilValueMask); - glGetIntegerv(GL_STENCIL_FAIL, (GLint *)&_currentStencilFail); - glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, (GLint *)&_currentStencilPassDepthFail); - glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, (GLint *)&_currentStencilPassDepthPass); - - // enable stencil use - glEnable(GL_STENCIL_TEST); - // RenderState::StateBlock::_defaultState->setStencilTest(true); - - // check for OpenGL error while enabling stencil test - CHECK_GL_ERROR_DEBUG(); - - // all bits on the stencil buffer are readonly, except the current layer bit, - // this means that operation like glClear or glStencilOp will be masked with this value - glStencilMask(mask_layer); - // RenderState::StateBlock::_defaultState->setStencilWrite(mask_layer); - - // manually save the depth test state - - glGetBooleanv(GL_DEPTH_WRITEMASK, &_currentDepthWriteMask); - - // disable depth test while drawing the stencil - //glDisable(GL_DEPTH_TEST); - // disable update to the depth buffer while drawing the stencil, - // as the stencil is not meant to be rendered in the real scene, - // it should never prevent something else to be drawn, - // only disabling depth buffer update should do - glDepthMask(GL_FALSE); - RenderState::StateBlock::_defaultState->setDepthWrite(false); - - /////////////////////////////////// - // CLEAR STENCIL BUFFER - - // manually clear the stencil buffer by drawing a fullscreen rectangle on it - // setup the stencil test func like this: - // for each pixel in the fullscreen rectangle - // never draw it into the frame buffer - // if not in inverted mode: set the current layer value to 0 in the stencil buffer - // if in inverted mode: set the current layer value to 1 in the stencil buffer - glStencilFunc(GL_NEVER, mask_layer, mask_layer); - glStencilOp(!_inverted ? GL_ZERO : GL_REPLACE, GL_KEEP, GL_KEEP); - + + _beforeDrawQuadCmd.init(globalZOrder); + _beforeDrawQuadCmd.func = [=]() -> void { + + // manually save the stencil state + _currentStencilEnabled = renderer->getStencilTest(); + _currentStencilWriteMask = renderer->getStencilWriteMask(); + _currentStencilFunc = renderer->getStencilCompareFunction(); + _currentStencilRef = renderer->getStencilReferenceValue(); + _currentStencilReadMask = renderer->getStencilReadMask(); + _currentStencilFail = renderer->getStencilFailureOperation(); + _currentStencilPassDepthFail = renderer->getStencilPassDepthFailureOperation(); + _currentStencilPassDepthPass = renderer->getStencilDepthPassOperation(); + + // enable stencil use + renderer->setStencilTest(true); + + // all bits on the stencil buffer are readonly, except the current layer bit, + // this means that operation like glClear or glStencilOp will be masked with this value + renderer->setStencilWriteMask(mask_layer); + + // manually save the depth test state + + _currentDepthWriteMask = renderer->getDepthWrite(); + + // disable update to the depth buffer while drawing the stencil, + // as the stencil is not meant to be rendered in the real scene, + // it should never prevent something else to be drawn, + // only disabling depth buffer update should do + renderer->setDepthWrite(false); + + /////////////////////////////////// + // CLEAR STENCIL BUFFER + + // manually clear the stencil buffer by drawing a fullscreen rectangle on it + // setup the stencil test func like this: + // for each pixel in the fullscreen rectangle + // never draw it into the frame buffer + // if not in inverted mode: set the current layer value to 0 in the stencil buffer + // if in inverted mode: set the current layer value to 1 in the stencil buffer + renderer->setStencilCompareFunction(backend::CompareFunction::NEVER, mask_layer, mask_layer); + renderer->setStencilOperation(!_inverted ? backend::StencilOperation::ZERO : backend::StencilOperation::REPLACE, + backend::StencilOperation::KEEP, + backend::StencilOperation::KEEP); + }; + renderer->addCommand(&_beforeDrawQuadCmd); + // draw a fullscreen solid rectangle to clear the stencil buffer - //ccDrawSolidRect(Vec2::ZERO, ccpFromSize([[Director sharedDirector] winSize]), Color4F(1, 1, 1, 1)); - drawFullScreenQuadClearStencil(); - - /////////////////////////////////// - // DRAW CLIPPING STENCIL - - // setup the stencil test func like this: - // for each pixel in the stencil node - // never draw it into the frame buffer - // if not in inverted mode: set the current layer value to 1 in the stencil buffer - // if in inverted mode: set the current layer value to 0 in the stencil buffer - glStencilFunc(GL_NEVER, mask_layer, mask_layer); - // RenderState::StateBlock::_defaultState->setStencilFunction(RenderState::STENCIL_NEVER, mask_layer, mask_layer); - - glStencilOp(!_inverted ? GL_REPLACE : GL_ZERO, GL_KEEP, GL_KEEP); - // RenderState::StateBlock::_defaultState->setStencilOperation( - // !_inverted ? RenderState::STENCIL_OP_REPLACE : RenderState::STENCIL_OP_ZERO, - // RenderState::STENCIL_OP_KEEP, - // RenderState::STENCIL_OP_KEEP); - - - // enable alpha test only if the alpha threshold < 1, - // indeed if alpha threshold == 1, every pixel will be drawn anyways - if (_alphaThreshold < 1) { -#if !CC_CLIPPING_NODE_OPENGLES - // manually save the alpha test state - _currentAlphaTestEnabled = glIsEnabled(GL_ALPHA_TEST); - glGetIntegerv(GL_ALPHA_TEST_FUNC, (GLint *)&_currentAlphaTestFunc); - glGetFloatv(GL_ALPHA_TEST_REF, &_currentAlphaTestRef); - // enable alpha testing - glEnable(GL_ALPHA_TEST); - // check for OpenGL error while enabling alpha test - CHECK_GL_ERROR_DEBUG(); - // pixel will be drawn only if greater than an alpha threshold - glAlphaFunc(GL_GREATER, _alphaThreshold); -#endif - } - - //Draw _stencil + drawFullScreenQuadClearStencil(globalZOrder); + + _afterDrawQuadCmd.init(globalZOrder); + _afterDrawQuadCmd.func = [=]() -> void { + // setup the stencil test func like this: + // for each pixel in the stencil node + // never draw it into the frame buffer + // if not in inverted mode: set the current layer value to 1 in the stencil buffer + // if in inverted mode: set the current layer value to 0 in the stencil buffer + auto renderer = Director::getInstance()->getRenderer(); + renderer->setStencilCompareFunction(backend::CompareFunction::NEVER, mask_layer, mask_layer); + + renderer->setStencilOperation(!_inverted ? backend::StencilOperation::REPLACE : backend::StencilOperation::ZERO, + backend::StencilOperation::KEEP, + backend::StencilOperation::KEEP); + }; + renderer->addCommand(&_afterDrawQuadCmd); } void StencilStateManager::onAfterDrawStencil() { - // restore alpha test state - if (_alphaThreshold < 1) - { -#if CC_CLIPPING_NODE_OPENGLES - // FIXME: we need to find a way to restore the shaders of the stencil node and its children -#else - // manually restore the alpha test state - glAlphaFunc(_currentAlphaTestFunc, _currentAlphaTestRef); - if (!_currentAlphaTestEnabled) - { - glDisable(GL_ALPHA_TEST); - } -#endif - } - +// // restore alpha test state +// if (_alphaThreshold < 1) +// { +//#if CC_CLIPPING_NODE_OPENGLES +// // FIXME: we need to find a way to restore the shaders of the stencil node and its children +//#else +// // manually restore the alpha test state +// glAlphaFunc(_currentAlphaTestFunc, _currentAlphaTestRef); +// if (!_currentAlphaTestEnabled) +// { +// glDisable(GL_ALPHA_TEST); +// } +//#endif +// } + // restore the depth test state - glDepthMask(_currentDepthWriteMask); - RenderState::StateBlock::_defaultState->setDepthWrite(_currentDepthWriteMask != 0); - +// glDepthMask(_currentDepthWriteMask); + auto renderer = Director::getInstance()->getRenderer(); + renderer->setDepthWrite(_currentDepthWriteMask); //if (currentDepthTestEnabled) { // glEnable(GL_DEPTH_TEST); //} @@ -258,12 +210,10 @@ void StencilStateManager::onAfterDrawStencil() // draw the pixel and keep the current layer in the stencil buffer // else // do not draw the pixel but keep the current layer in the stencil buffer - glStencilFunc(GL_EQUAL, _mask_layer_le, _mask_layer_le); - // RenderState::StateBlock::_defaultState->setStencilFunction(RenderState::STENCIL_EQUAL, _mask_layer_le, _mask_layer_le); - - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - // RenderState::StateBlock::_defaultState->setStencilOperation(RenderState::STENCIL_OP_KEEP, RenderState::STENCIL_OP_KEEP, RenderState::STENCIL_OP_KEEP); - + renderer->setStencilCompareFunction(backend::CompareFunction::EQUAL, _mask_layer_le, _mask_layer_le); + + renderer->setStencilOperation(backend::StencilOperation::KEEP, backend::StencilOperation::KEEP, backend::StencilOperation::KEEP); + // draw (according to the stencil test function) this node and its children } @@ -274,19 +224,15 @@ void StencilStateManager::onAfterVisit() // CLEANUP // manually restore the stencil state - glStencilFunc(_currentStencilFunc, _currentStencilRef, _currentStencilValueMask); - // RenderState::StateBlock::_defaultState->setStencilFunction((RenderState::StencilFunction)_currentStencilFunc, _currentStencilRef, _currentStencilValueMask); - - glStencilOp(_currentStencilFail, _currentStencilPassDepthFail, _currentStencilPassDepthPass); - // RenderState::StateBlock::_defaultState->setStencilOperation((RenderState::StencilOperation)_currentStencilFail, - // (RenderState::StencilOperation)_currentStencilPassDepthFail, - // (RenderState::StencilOperation)_currentStencilPassDepthPass); - - glStencilMask(_currentStencilWriteMask); + auto renderer = Director::getInstance()->getRenderer(); + renderer->setStencilCompareFunction(_currentStencilFunc, _currentStencilRef, _currentStencilReadMask); + + renderer->setStencilOperation(_currentStencilFail, _currentStencilPassDepthFail, _currentStencilPassDepthPass); + + renderer->setStencilWriteMask(_currentStencilWriteMask); if (!_currentStencilEnabled) { - glDisable(GL_STENCIL_TEST); - // RenderState::StateBlock::_defaultState->setStencilTest(false); + renderer->setStencilTest(false); } // we are done using this layer, decrement diff --git a/cocos/base/CCStencilStateManager.h b/cocos/base/CCStencilStateManager.h index 77fdcb1e272b..524ed0651de8 100644 --- a/cocos/base/CCStencilStateManager.h +++ b/cocos/base/CCStencilStateManager.h @@ -23,11 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef StencilStateManager_hpp -#define StencilStateManager_hpp +#pragma once + #include "base/ccConfig.h" #include "platform/CCPlatformMacros.h" -#include "platform/CCGL.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCCallbackCommand.h" /** * @addtogroup base @@ -39,42 +40,53 @@ class CC_DLL StencilStateManager { public: StencilStateManager(); - void onBeforeVisit(); + ~StencilStateManager(); + void onBeforeVisit(float globalZOrder); void onAfterDrawStencil(); void onAfterVisit(); void setAlphaThreshold(GLfloat alphaThreshold); void setInverted(bool inverted); bool isInverted()const; - GLfloat getAlphaThreshold()const; + float getAlphaThreshold()const; + private: CC_DISALLOW_COPY_AND_ASSIGN(StencilStateManager); - static GLint s_layer; + static int s_layer; /**draw fullscreen quad to clear stencil bits */ - void drawFullScreenQuadClearStencil(); + void drawFullScreenQuadClearStencil(float globalZOrder); - GLfloat _alphaThreshold; - bool _inverted; + float _alphaThreshold = 1.f; + bool _inverted = false; - GLboolean _currentStencilEnabled; - GLuint _currentStencilWriteMask; - GLenum _currentStencilFunc; - GLint _currentStencilRef; - GLuint _currentStencilValueMask; - GLenum _currentStencilFail; - GLenum _currentStencilPassDepthFail; - GLenum _currentStencilPassDepthPass; - GLboolean _currentDepthWriteMask; + bool _currentStencilEnabled = false; + unsigned int _currentStencilWriteMask = ~0; + backend::CompareFunction _currentStencilFunc = backend::CompareFunction::ALWAYS; + unsigned int _currentStencilRef = 0; + unsigned int _currentStencilReadMask = ~0; + backend::StencilOperation _currentStencilFail = backend::StencilOperation::KEEP; + backend::StencilOperation _currentStencilPassDepthFail = backend::StencilOperation::KEEP; + backend::StencilOperation _currentStencilPassDepthPass = backend::StencilOperation::KEEP; + bool _currentDepthWriteMask = true; - GLboolean _currentAlphaTestEnabled; - GLenum _currentAlphaTestFunc; - GLclampf _currentAlphaTestRef; + bool _currentAlphaTestEnabled = false; +// GLenum _currentAlphaTestFunc; +// GLclampf _currentAlphaTestRef; + + unsigned int _mask_layer_le = 0; + + CustomCommand _customCommand; + CallbackCommand _beforeDrawQuadCmd; + CallbackCommand _afterDrawQuadCmd; + CallbackCommand _afterDrawStencilCmd; + CallbackCommand _afterVisitCmd; - GLint _mask_layer_le; + backend::UniformLocation _mvpMatrixLocaiton; + backend::UniformLocation _colorUniformLocation; + backend::ProgramState* _programState = nullptr; }; NS_CC_END // end of base group /** @} */ -#endif /* StencilStateManager_hpp */ diff --git a/cocos/base/CCUserDefault-android.cpp b/cocos/base/CCUserDefault-android.cpp index 9d5a94741b26..d15f6d3f19a3 100644 --- a/cocos/base/CCUserDefault-android.cpp +++ b/cocos/base/CCUserDefault-android.cpp @@ -148,11 +148,7 @@ UserDefault::UserDefault() { } -// FIXME:: deprecated -void UserDefault::purgeSharedUserDefault() -{ - UserDefault::destroyInstance(); -} + void UserDefault::destroyInstance() { @@ -470,11 +466,6 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value) free(encodedData); } -// FIXME:: deprecated -UserDefault* UserDefault::sharedUserDefault() -{ - return UserDefault::getInstance(); -} UserDefault* UserDefault::getInstance() { diff --git a/cocos/base/CCUserDefault-apple.mm b/cocos/base/CCUserDefault-apple.mm index 341e7daa955f..ffa4b79e9e96 100644 --- a/cocos/base/CCUserDefault-apple.mm +++ b/cocos/base/CCUserDefault-apple.mm @@ -493,18 +493,6 @@ static void deleteNodeByKey(const char *pKey) CC_SAFE_DELETE(_userDefault); } -// FIXME:: deprecated -UserDefault* UserDefault::sharedUserDefault() -{ - return UserDefault::getInstance(); -} - -// FIXME:: deprecated -void UserDefault::purgeSharedUserDefault() -{ - UserDefault::destroyInstance(); -} - bool UserDefault::isXMLFileExist() { return FileUtils::getInstance()->isFileExist(_filePath); diff --git a/cocos/base/CCUserDefault-winrt.cpp b/cocos/base/CCUserDefault-winrt.cpp deleted file mode 100644 index 334300930fed..000000000000 --- a/cocos/base/CCUserDefault-winrt.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "base/CCUserDefault.h" -#include "platform/CCCommon.h" -#include "base/base64.h" -#include "base/ccUtils.h" -#include "platform/CCFileUtils.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#include "platform/winrt/CCWinRTUtils.h" - -using namespace Windows::Storage; -using namespace Windows::Foundation; -using namespace std; - -#define XML_FILE_NAME "UserDefault.xml" - -NS_CC_BEGIN - - -/** - * WinRT implementation of UserDefault - */ - -UserDefault* UserDefault::_userDefault = nullptr; -string UserDefault::_filePath = string(""); -bool UserDefault::_isFilePathInitialized = false; - -UserDefault::~UserDefault() -{ -} - -UserDefault::UserDefault() -{ -} - -Platform::Object^ getPlatformKeyValue(const char* pKey) -{ - // check key - if (!pKey) - { - return nullptr; - } - - ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings; - auto key = PlatformStringFromString(pKey); - auto values = localSettings->Values; - - if (values->HasKey(key)) - { - return values->Lookup(key); - } - - return nullptr; -} - -void setPlatformKeyValue(const char* pKey, PropertyValue^ value) -{ - // check key - if (!pKey) - { - return; - } - - ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings; - auto values = localSettings->Values; - values->Insert(PlatformStringFromString(pKey), value); -} - -bool UserDefault::getBoolForKey(const char* pKey) -{ - return getBoolForKey(pKey, false); -} - -bool UserDefault::getBoolForKey(const char* pKey, bool defaultValue) -{ - bool ret = defaultValue; - auto value = getPlatformKeyValue(pKey); - if (value) - { - ret = safe_cast(value); - } - return ret; -} - -int UserDefault::getIntegerForKey(const char* pKey) -{ - return getIntegerForKey(pKey, 0); -} - -int UserDefault::getIntegerForKey(const char* pKey, int defaultValue) -{ - int ret = defaultValue; - auto value = getPlatformKeyValue(pKey); - if (value) - { - ret = safe_cast(value); - } - return ret; -} - -float UserDefault::getFloatForKey(const char* pKey) -{ - return getFloatForKey(pKey, 0.0f); -} - -float UserDefault::getFloatForKey(const char* pKey, float defaultValue) -{ - float ret = (float)getDoubleForKey(pKey, (double)defaultValue); - - return ret; -} - -double UserDefault::getDoubleForKey(const char* pKey) -{ - return getDoubleForKey(pKey, 0.0); -} - -double UserDefault::getDoubleForKey(const char* pKey, double defaultValue) -{ - double ret = defaultValue; - auto value = getPlatformKeyValue(pKey); - if (value) - { - ret = safe_cast(value); - } - return ret; -} - -std::string UserDefault::getStringForKey(const char* pKey) -{ - return getStringForKey(pKey, ""); -} - -string UserDefault::getStringForKey(const char* pKey, const std::string & defaultValue) -{ - string ret = defaultValue; - auto value = getPlatformKeyValue(pKey); - if (value) - { - auto result = safe_cast(value); - ret = PlatformStringToString(result); - } - - return ret; -} - -Data UserDefault::getDataForKey(const char* pKey) -{ - return getDataForKey(pKey, Data::Null); -} - -Data UserDefault::getDataForKey(const char* pKey, const Data& defaultValue) -{ - Data ret = defaultValue; - std::string encodedData = getStringForKey(pKey,""); - - if (!encodedData.empty()) - { - unsigned char* decodedData = nullptr; - int decodedDataLen = base64Decode((unsigned char*) encodedData.c_str(), (unsigned int) encodedData.length(), &decodedData); - if (decodedData && decodedDataLen > 0) - { - ret.fastSet(decodedData, decodedDataLen); - } - } - - return ret; -} - -void UserDefault::setBoolForKey(const char* pKey, bool value) -{ - // check key - if (!pKey) - { - return; - } - - setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateBoolean(value))); -} - -void UserDefault::setIntegerForKey(const char* pKey, int value) -{ - // check key - if (! pKey) - { - return; - } - - setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateInt32(value))); -} - -void UserDefault::setFloatForKey(const char* pKey, float value) -{ - setDoubleForKey(pKey, value); -} - -void UserDefault::setDoubleForKey(const char* pKey, double value) -{ - // check key - if (! pKey) - { - return; - } - - setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateDouble(value))); -} - -void UserDefault::setStringForKey(const char* pKey, const std::string & value) -{ - // check key - if (! pKey) - { - return; - } - - setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateString(PlatformStringFromString(value)))); -} - -void UserDefault::setDataForKey(const char* pKey, const Data& value) { - // check key - if (! pKey) - { - return; - } - - char *encodedData = nullptr; - base64Encode(value.getBytes(), static_cast(value.getSize()), &encodedData); - - setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateString(PlatformStringFromString(encodedData)))); - - if (encodedData) - free(encodedData); -} - -UserDefault* UserDefault::getInstance() -{ - if (!_userDefault) - { - initXMLFilePath(); - - // only create xml file one time - // the file exists after the program exit - if ((!isXMLFileExist()) && (!createXMLFile())) - { - return nullptr; - } - - _userDefault = new (std::nothrow) UserDefault(); - } - - return _userDefault; -} - -void UserDefault::destroyInstance() -{ - CC_SAFE_DELETE(_userDefault); -} - -void UserDefault::setDelegate(UserDefault *delegate) -{ - if (_userDefault) - delete _userDefault; - - _userDefault = delegate; -} - - -// FIXME:: deprecated -UserDefault* UserDefault::sharedUserDefault() -{ - return UserDefault::getInstance(); -} - -// FIXME:: deprecated -void UserDefault::purgeSharedUserDefault() -{ - return UserDefault::destroyInstance(); -} - -bool UserDefault::isXMLFileExist() -{ - //return FileUtils::getInstance()->isFileExist(_filePath); - return true; -} - -void UserDefault::initXMLFilePath() -{ - if (! _isFilePathInitialized) - { - _filePath += FileUtils::getInstance()->getWritablePath() + XML_FILE_NAME; - _isFilePathInitialized = true; - } -} - -// create new xml file -bool UserDefault::createXMLFile() -{ - return false; -} - -const string& UserDefault::getXMLFilePath() -{ - return _filePath; -} - -void UserDefault::flush() -{ -} - -void UserDefault::deleteValueForKey(const char* key) -{ - // check the params - if (!key) - { - CCLOG("the key is invalid"); - } - - ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings; - auto values = localSettings->Values; - values->Remove(PlatformStringFromString(key)); - - flush(); -} - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/base/CCUserDefault.cpp b/cocos/base/CCUserDefault.cpp index 37467017beab..cb3f71394244 100644 --- a/cocos/base/CCUserDefault.cpp +++ b/cocos/base/CCUserDefault.cpp @@ -454,18 +454,6 @@ void UserDefault::setDelegate(UserDefault *delegate) } -// FIXME:: deprecated -UserDefault* UserDefault::sharedUserDefault() -{ - return UserDefault::getInstance(); -} - -// FIXME:: deprecated -void UserDefault::purgeSharedUserDefault() -{ - return UserDefault::destroyInstance(); -} - bool UserDefault::isXMLFileExist() { return FileUtils::getInstance()->isFileExist(_filePath); diff --git a/cocos/base/CCUserDefault.h b/cocos/base/CCUserDefault.h index b50af43d9cf7..a42ebb8d7819 100644 --- a/cocos/base/CCUserDefault.h +++ b/cocos/base/CCUserDefault.h @@ -235,20 +235,11 @@ class CC_DLL UserDefault */ static void setDelegate(UserDefault *delegate); - /** @deprecated Use getInstance() instead. - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static UserDefault* sharedUserDefault(); - /**@deprecated Use destroyInstance() instead. - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedUserDefault(); /** All supported platforms other iOS & Android use xml file to save values. This function is return the file path of the xml path. * @js NA */ static const std::string& getXMLFilePath(); - /** All supported platforms other iOS & Android and CC_PLATFORM_WINRT use xml file to save values. This function checks whether the xml file exists or not. + /** All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not. * @return True if the xml file exists, false if not. * @js NA */ diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index 4187875d5423..a4cbc7ea6d2a 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -35,6 +35,7 @@ set(COCOS_BASE_HEADER base/etc1.h base/CCGameController.h base/CCConsole.h + base/ccConstants.h base/CCEvent.h base/ccTypes.h base/CCAsyncTaskPool.h @@ -62,20 +63,10 @@ set(COCOS_BASE_HEADER base/CCMap.h base/ccUTF8.h base/CCScriptSupport.h - base/allocator/CCAllocatorBase.h - base/allocator/CCAllocatorDiagnostics.h - base/allocator/CCAllocatorMacros.h - base/allocator/CCAllocatorMutex.h - base/allocator/CCAllocatorStrategyGlobalSmallBlock.h - base/allocator/CCAllocatorStrategyDefault.h - base/allocator/CCAllocatorStrategyPool.h - base/allocator/CCAllocatorGlobal.h - base/allocator/CCAllocatorStrategyFixedBlock.h base/CCEventFocus.h base/CCConfiguration.h base/CCProtocols.h base/TGAlib.h - base/CCDataVisitor.h base/CCEventMouse.h base/CCIMEDelegate.h base/CCNS.h @@ -98,7 +89,6 @@ set(COCOS_BASE_SRC base/CCConsole.cpp base/CCController.cpp base/CCData.cpp - base/CCDataVisitor.cpp base/CCNinePatchImageParser.cpp base/CCDirector.cpp base/CCEvent.cpp @@ -132,9 +122,6 @@ set(COCOS_BASE_SRC base/CCStencilStateManager.cpp base/TGAlib.cpp base/ZipUtils.cpp - base/allocator/CCAllocatorDiagnostics.cpp - base/allocator/CCAllocatorGlobal.cpp - base/allocator/CCAllocatorGlobalNewDelete.cpp base/atitc.cpp base/base64.cpp base/ccCArray.cpp diff --git a/cocos/base/ZipUtils.h b/cocos/base/ZipUtils.h index 6980d248abea..ab8851a88b81 100644 --- a/cocos/base/ZipUtils.h +++ b/cocos/base/ZipUtils.h @@ -34,7 +34,7 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "platform/android/CCFileUtils-android.h" -#elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) // for import ssize_t on win32 platform #include "platform/CCStdC.h" #endif @@ -78,7 +78,6 @@ typedef struct unz_file_info_s unz_file_info; * @return The length of the deflated buffer. * @since v0.8.1 */ - CC_DEPRECATED_ATTRIBUTE static ssize_t ccInflateMemory(unsigned char *in, ssize_t inLength, unsigned char **out) { return inflateMemory(in, inLength, out); } static ssize_t inflateMemory(unsigned char *in, ssize_t inLength, unsigned char **out); /** @@ -89,7 +88,6 @@ typedef struct unz_file_info_s unz_file_info; * @return The length of the deflated buffer. * @since v1.0.0 */ - CC_DEPRECATED_ATTRIBUTE static ssize_t ccInflateMemoryWithHint(unsigned char *in, ssize_t inLength, unsigned char **out, ssize_t outLengthHint) { return inflateMemoryWithHint(in, inLength, out, outLengthHint); } static ssize_t inflateMemoryWithHint(unsigned char *in, ssize_t inLength, unsigned char **out, ssize_t outLengthHint); /** @@ -98,7 +96,6 @@ typedef struct unz_file_info_s unz_file_info; * @return The length of the deflated buffer. * @since v0.99.5 */ - CC_DEPRECATED_ATTRIBUTE static int ccInflateGZipFile(const char *filename, unsigned char **out) { return inflateGZipFile(filename, out); } static int inflateGZipFile(const char *filename, unsigned char **out); /** @@ -107,7 +104,6 @@ typedef struct unz_file_info_s unz_file_info; * @return True is a GZip format file. false is not. * @since v3.0 */ - CC_DEPRECATED_ATTRIBUTE static bool ccIsGZipFile(const char *filename) { return isGZipFile(filename); } static bool isGZipFile(const char *filename); /** @@ -116,7 +112,6 @@ typedef struct unz_file_info_s unz_file_info; * @return True is GZip format. false is not. * @since v3.0 */ - CC_DEPRECATED_ATTRIBUTE static bool ccIsGZipBuffer(const unsigned char *buffer, ssize_t len) { return isGZipBuffer(buffer, len); } static bool isGZipBuffer(const unsigned char *buffer, ssize_t len); /** @@ -125,7 +120,6 @@ typedef struct unz_file_info_s unz_file_info; * @return The length of the deflated buffer. * @since v0.99.5 */ - CC_DEPRECATED_ATTRIBUTE static int ccInflateCCZFile(const char *filename, unsigned char **out) { return inflateCCZFile(filename, out); } static int inflateCCZFile(const char *filename, unsigned char **out); /** @@ -134,7 +128,6 @@ typedef struct unz_file_info_s unz_file_info; * @return The length of the deflated buffer. * @since v3.0 */ - CC_DEPRECATED_ATTRIBUTE static int ccInflateCCZBuffer(const unsigned char *buffer, ssize_t len, unsigned char **out) { return inflateCCZBuffer(buffer, len, out); } static int inflateCCZBuffer(const unsigned char *buffer, ssize_t len, unsigned char **out); /** @@ -143,7 +136,6 @@ typedef struct unz_file_info_s unz_file_info; * @return True is a CCZ format file. false is not. * @since v3.0 */ - CC_DEPRECATED_ATTRIBUTE static bool ccIsCCZFile(const char *filename) { return isCCZFile(filename); } static bool isCCZFile(const char *filename); /** @@ -152,7 +144,6 @@ typedef struct unz_file_info_s unz_file_info; * @return True is CCZ format. false is not. * @since v3.0 */ - CC_DEPRECATED_ATTRIBUTE static bool ccIsCCZBuffer(const unsigned char *buffer, ssize_t len) { return isCCZBuffer(buffer, len); } static bool isCCZBuffer(const unsigned char *buffer, ssize_t len); /** @@ -180,7 +171,6 @@ typedef struct unz_file_info_s unz_file_info; * @param index Part of the key [0..3]. * @param value Value of the key part. */ - CC_DEPRECATED_ATTRIBUTE static void ccSetPvrEncryptionKeyPart(int index, unsigned int value) { setPvrEncryptionKeyPart(index, value); } static void setPvrEncryptionKeyPart(int index, unsigned int value); /** @@ -204,7 +194,6 @@ typedef struct unz_file_info_s unz_file_info; * @param keyPart3 The key value part 3. * @param keyPart4 The key value part 4. */ - CC_DEPRECATED_ATTRIBUTE static void ccSetPvrEncryptionKey(unsigned int keyPart1, unsigned int keyPart2, unsigned int keyPart3, unsigned int keyPart4) { setPvrEncryptionKey(keyPart1, keyPart2, keyPart3, keyPart4); } static void setPvrEncryptionKey(unsigned int keyPart1, unsigned int keyPart2, unsigned int keyPart3, unsigned int keyPart4); private: diff --git a/cocos/base/allocator/CCAllocatorBase.h b/cocos/base/allocator/CCAllocatorBase.h deleted file mode 100644 index 4b8736a6ced2..000000000000 --- a/cocos/base/allocator/CCAllocatorBase.h +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_BASE_H -#define CC_ALLOCATOR_BASE_H -/// @cond DO_NOT_SHOW - -#include - -#include "platform/CCPlatformMacros.h" -#include "base/allocator/CCAllocatorMacros.h" - - - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -// @brief -// AllocatorBase -// Provides a base that contains a few methods and definitions that are helpful to all allocation strategies. -// Also provides a common base that can be used to point to all allocators generically. -class AllocatorBase -{ -public: - - typedef void* pointer; - - enum { kDefaultAlignment = 16 }; - - // this must be true for SSE instructions to be 16 byte aligned - // we can now use kDefault alignment as our smallest alloc size - static_assert(sizeof(uintptr_t) <= kDefaultAlignment, "pointer size must be smaller than default alignment"); - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - AllocatorBase() - : _next_allocator(nullptr) - {} -#endif - - virtual ~AllocatorBase() - {} - - // @brief - // Given an address and alignment in bytes, returns an address aligned to the number of bytes - // For example, if the alignment is 4 which is standard, then the address is divisible evenly by 4. - CC_ALLOCATOR_INLINE pointer aligned(const pointer address, const size_t alignment = kDefaultAlignment) const - { - return (pointer) (((intptr_t)address + (alignment - 1)) & ~(alignment - 1)); - } - - // @brief Calculate the next power of two for a given size. - // Most blocks requested are already a power of two. For small block alloc - // this means we cannot add overhead, hence the slightly less performance - // searching of fixed block pages to determine size if none is specified. - CC_ALLOCATOR_INLINE size_t nextPow2BlockSize(size_t size) const - { - --size; - size |= size >> 1; - size |= size >> 2; - size |= size >> 4; - size |= size >> 8; - size |= size >> 16; - return ++size; - } - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - void setTag(const char* tag) - { - strncpy(_tag, tag, sizeof(_tag)-1); - } - - const char* tag() const - { - return _tag; - } - - // cannot use std::string as it allocates memory. - // for some allocator this tag is set before the new/delete allocator has finished initializing. - char _tag[1000]; - - // @brief return any diagnostic info for this allocator - virtual std::string diagnostics() const - { - return ""; - } - AllocatorBase* _next_allocator; -#endif//CC_ENABLE_ALLOCATOR_DIAGNOSTICS -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_BASE_H diff --git a/cocos/base/allocator/CCAllocatorDiagnostics.cpp b/cocos/base/allocator/CCAllocatorDiagnostics.cpp deleted file mode 100644 index 48a49fea5d4a..000000000000 --- a/cocos/base/allocator/CCAllocatorDiagnostics.cpp +++ /dev/null @@ -1,90 +0,0 @@ - -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "base/allocator/CCAllocatorDiagnostics.h" -#include "base/allocator/CCAllocatorGlobal.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS -AllocatorDiagnostics::AllocatorDiagnostics() - : _allocators(nullptr) -{} - -AllocatorDiagnostics* AllocatorDiagnostics::instance() -{ - static AllocatorDiagnostics* _this = nullptr; - if (nullptr == _this) - { - // have to use global allocator because none of the constructors will have been called. - _this = (AllocatorDiagnostics*)ccAllocatorGlobal.allocate(sizeof(AllocatorDiagnostics)); - new (_this) AllocatorDiagnostics(); - } - return _this; -} - -void AllocatorDiagnostics::trackAllocator(AllocatorBase* allocator) -{ - LOCK(_mutex); - auto p = _allocators; - for (; nullptr != p; p = p->_next_allocator) - { - CC_ASSERT(p != allocator); - } - allocator->_next_allocator = _allocators; - _allocators = allocator; - UNLOCK(_mutex); -} - -void AllocatorDiagnostics::untrackAllocator(AllocatorBase* allocator) -{ - LOCK(_mutex); - auto pp = &_allocators; - for (; *pp != allocator; pp = &(*pp)->_next_allocator); - if (*pp == allocator) - *pp = (*pp)->_next_allocator; - UNLOCK(_mutex); -} - -std::string AllocatorDiagnostics::diagnostics() -{ - std::string data; - LOCK(_mutex); - auto a = _allocators; - while (a) - { - data += a->diagnostics(); - a = a->_next_allocator; - } - UNLOCK(_mutex); - return data; -} -#endif//CC_ENABLE_ALLOCATOR_DIAGNOSTICS - -NS_CC_ALLOCATOR_END -NS_CC_END diff --git a/cocos/base/allocator/CCAllocatorDiagnostics.h b/cocos/base/allocator/CCAllocatorDiagnostics.h deleted file mode 100644 index 7bd70d01177d..000000000000 --- a/cocos/base/allocator/CCAllocatorDiagnostics.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_DIAGNOSTICS_H -#define CC_ALLOCATOR_DIAGNOSTICS_H -/// @cond DO_NOT_SHOW - -#include - -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorMutex.h" -#include "base/allocator/CCAllocatorBase.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS -class AllocatorBase; -class AllocatorDiagnostics -{ -public: - - AllocatorDiagnostics(); - static AllocatorDiagnostics* instance(); - void trackAllocator(AllocatorBase* allocator); - void untrackAllocator(AllocatorBase* allocator); - std::string diagnostics(); - -protected: - - AllocatorMutex _mutex; - AllocatorBase* _allocators; -}; -#endif//CC_ENABLE_ALLOCATOR_DIAGNOSTICS - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_DIAGNOSTICS_H diff --git a/cocos/base/allocator/CCAllocatorGlobal.cpp b/cocos/base/allocator/CCAllocatorGlobal.cpp deleted file mode 100644 index efbd9401c1df..000000000000 --- a/cocos/base/allocator/CCAllocatorGlobal.cpp +++ /dev/null @@ -1,41 +0,0 @@ - -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "base/allocator/CCAllocatorGlobal.h" - -#if CC_ENABLE_ALLOCATOR - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -// @brief Declare the global allocator instance -CC_ALLOCATOR_GLOBAL ccAllocatorGlobal; - -NS_CC_ALLOCATOR_END -NS_CC_END - -#endif // CC_ENABLE_ALLOCATOR diff --git a/cocos/base/allocator/CCAllocatorGlobal.h b/cocos/base/allocator/CCAllocatorGlobal.h deleted file mode 100644 index 1b928fe1ee89..000000000000 --- a/cocos/base/allocator/CCAllocatorGlobal.h +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_GLOBAL_H -#define CC_ALLOCATOR_GLOBAL_H -/// @cond DO_NOT_SHOW - -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorStrategyDefault.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -/** Make visible at the global scope.*/ -extern CC_ALLOCATOR_GLOBAL ccAllocatorGlobal; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_GLOBAL_H diff --git a/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp b/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp deleted file mode 100644 index 6e70fe6dea2a..000000000000 --- a/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp +++ /dev/null @@ -1,81 +0,0 @@ - -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "base/allocator/CCAllocatorStrategyGlobalSmallBlock.h" -#include -#include - -#include - -USING_NS_CC_ALLOCATOR; - -#if CC_ENABLE_ALLOCATOR -#if CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE - -namespace -{ - // @brief Declare the allocator for global new/delete - static CC_ALLOCATOR_GLOBAL_NEW_DELETE global; -} - -// @brief overrides global operator new array -void* operator new[] (std::size_t size) -{ - void* ptr = global.allocate(size); - assert(ptr && "No memory"); - - // disabling exceptions since cocos2d-x doesn't use them -//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID -// if (nullptr == ptr) -// throw std::bad_alloc(); -//#endif - return ptr; -} - -// @brief overrides global operator new -void* operator new(std::size_t size) -{ - void* ptr = global.allocate(size); - assert(ptr && "No memory"); - - // disabling exceptions since cocos2d-x doesn't use them -//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID -// if (nullptr == ptr) -// throw std::bad_alloc(); -//#endif - return ptr; -} - -// @brief overrides global operator delete -void operator delete(void* p) throw() -{ - if (p) - global.deallocate(p); -} - -#endif // CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE -#endif // CC_ENABLE_ALLOCATOR diff --git a/cocos/base/allocator/CCAllocatorMacros.h b/cocos/base/allocator/CCAllocatorMacros.h deleted file mode 100644 index 3d7bccac7c59..000000000000 --- a/cocos/base/allocator/CCAllocatorMacros.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_MACROS_H -#define CC_ALLOCATOR_MACROS_H -/// @cond DO_NOT_SHOW - -#include "base/ccConfig.h" -#include "platform/CCPlatformMacros.h" - -// namespace allocator {} -#ifdef __cplusplus - #define NS_CC_ALLOCATOR_BEGIN namespace allocator { - #define NS_CC_ALLOCATOR_END } - #define USING_NS_CC_ALLOCATOR using namespace cocos2d::allocator - #define NS_CC_ALLOCATOR ::cocos2d::allocator -#else - #define NS_CC_ALLOCATOR_BEGIN - #define NS_CC_ALLOCATOR_END - #define USING_NS_CC_ALLOCATOR - #define NS_CC_ALLOCATOR -#endif - -#if COCOS2D_DEBUG - - // @brief CC_ALLOCATOR_INLINE - // Turn off inlining of methods when debugging to make stack traces readable and stepping through code sane. - #define CC_ALLOCATOR_INLINE - - // printf is safe to use - #define LOG printf - -#else - - #define CC_ALLOCATOR_INLINE inline - #define LOG - -#endif - -// allocator macros -#if CC_ENABLE_ALLOCATOR - - // @brief macros for new/delete - // we let global new/delete handle these as they are overridden. - #define CC_NEW(klass, ...) new klass(__VAR_ARGS__) - #define CC_DELETE(object) delete object; - - // @brief macros for malloc/free - // these will use the global allocator - #define CC_MALLOC(size) ccAllocatorGlobal.allocate(size) - #define CC_FREE(address) ccAllocatorGlobal.deallocate(address) - - // alloc on the stack - #define CC_ALLOCA(size) alloca(size) - - // @brief helper macro for overriding new/delete operators for a class. - // This correctly passes the size in the deallocate method which is needed. - #define CC_USE_ALLOCATOR_POOL(T, A) \ - CC_ALLOCATOR_INLINE void* operator new (size_t size) \ - { \ - return (void*)A.allocate(size); \ - } \ - CC_ALLOCATOR_INLINE void operator delete (void* object, size_t size) \ - { \ - A.deallocate((T*)object, size); \ - } - -#else - - // macros for new/delete - // these will use a general thread safe allocator - #define CC_NEW(klass, ...) new klass(__VAR_ARGS__) - #define CC_DELETE(object) delete object - - // macros for malloc/free - // these will use a general thread safe allocator - #define CC_MALLOC(size) malloc(size) - #define CC_FREE(address) free(address) - - // alloc on the stack - #define CC_ALLOCA(size) alloca(size) - - // throw these away if not enabled - #define CC_USE_ALLOCATOR_POOL(...) - #define CC_OVERRIDE_GLOBAL_NEWDELETE_WITH_ALLOCATOR(...) - -#endif - -// @ brief Quick and dirty macro to dump an area of memory -// useful for debugging blocks of memory from allocators. -#define DUMP(a, l, C) \ -{ \ - LOG("> %p len %zu\n", a, l); \ - uint8_t* p = (uint8_t*)a; \ - uint8_t* e = p + l; \ - while (p < e) \ - { \ - LOG("%p ", p); \ - for (int i = 0; i < C && &p[i] < e; ++i) \ - LOG("%02x ", p[i]); \ - for (int i = 0; i < C && &p[i] < e; ++i) \ - LOG("%c ", isalnum(p[i]) ? p[i] : '.'); \ - LOG("\n"); \ - p = p + C > e ? e : p + C; \ - } \ -} - -/// @endcond -#endif//CC_ALLOCATOR_MACROS_H diff --git a/cocos/base/allocator/CCAllocatorMutex.h b/cocos/base/allocator/CCAllocatorMutex.h deleted file mode 100644 index 7b7b4d64b25c..000000000000 --- a/cocos/base/allocator/CCAllocatorMutex.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_MUTEX_H -#define CC_ALLOCATOR_MUTEX_H -/// @cond DO_NOT_SHOW - -#include "platform/CCPlatformMacros.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#include "pthread.h" -#define MUTEX pthread_mutex_t -#define MUTEX_INIT(m) \ - pthread_mutexattr_t mta; \ - pthread_mutexattr_init(&mta); \ - pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE); \ - pthread_mutex_init(&m, &mta) -#define MUTEX_LOCK(m) \ - pthread_mutex_lock(&m); -#define MUTEX_UNLOCK(m) \ - pthread_mutex_unlock(&m); -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "windows.h" -#define MUTEX HANDLE -#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 -#define MUTEX_INIT(m) \ - m = CreateMutex(0, FALSE, 0) -#define MUTEX_LOCK(m) \ - WaitForSingleObject(m, INFINITE) -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#define MUTEX_INIT(m) \ - m = CreateMutexEx(NULL,FALSE,0,NULL); -#define MUTEX_LOCK(m) \ - WaitForSingleObjectEx(m, INFINITE, false) -#endif -#define MUTEX_UNLOCK(m) \ - ReleaseMutex(m) -#else -#message "Unsupported platform for AllocatorMutex, Locking semantics will not be supported" -#define MUTEX -#define MUTEX_INIT(...) -#define MUTEX_LOCK(...) -#define MUTEX_UNLOCK(...) -#endif - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -// so we cannot use std::mutex because it allocates memory -// which causes an infinite loop of death and exceptions. -class AllocatorMutex -{ -public: - - AllocatorMutex() - { - MUTEX_INIT(_mutex); - } - - void lock() - { - MUTEX_LOCK(_mutex); - } - - void unlock() - { - MUTEX_UNLOCK(_mutex); - } - -protected: - - MUTEX _mutex; -}; - -#define LOCK(m) m.lock() -#define UNLOCK(m) m.unlock() - -// @param implementation that provides a mutex with locking semantics. -struct locking_semantics -{ - AllocatorMutex _mutex; - CC_ALLOCATOR_INLINE void lock() - { - LOCK(_mutex); - } - CC_ALLOCATOR_INLINE void unlock() - { - UNLOCK(_mutex); - } -}; - -// @param implementation that provides lockless semantics that should optimize away. -struct lockless_semantics -{ - CC_ALLOCATOR_INLINE void lock() {} - CC_ALLOCATOR_INLINE void unlock() {} -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_MUTEX_H diff --git a/cocos/base/allocator/CCAllocatorStrategyDefault.h b/cocos/base/allocator/CCAllocatorStrategyDefault.h deleted file mode 100644 index 62fd3d76a134..000000000000 --- a/cocos/base/allocator/CCAllocatorStrategyDefault.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_STRATEGY_DEFAULT_H -#define CC_ALLOCATOR_STRATEGY_DEFAULT_H -/// @cond DO_NOT_SHOW - -#include -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorBase.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -// @brief -// The default allocation strategy that just falls through to malloc and free -class AllocatorStrategyDefault - : public AllocatorBase -{ -public: - - CC_ALLOCATOR_INLINE void* allocate(size_t size) - { - return malloc(size); - } - - CC_ALLOCATOR_INLINE void deallocate(void* address, size_t size = 0) - { - if (nullptr != address) - free(address); - } -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_STRATEGY_DEFAULT_H diff --git a/cocos/base/allocator/CCAllocatorStrategyFixedBlock.h b/cocos/base/allocator/CCAllocatorStrategyFixedBlock.h deleted file mode 100644 index 7de8db4a6413..000000000000 --- a/cocos/base/allocator/CCAllocatorStrategyFixedBlock.h +++ /dev/null @@ -1,277 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H -#define CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H -/// @cond DO_NOT_SHOW - -/**************************************************************************** - WARNING! - Do not use Console::log or any other methods that use NEW inside of this - allocator. Failure to do so will result in recursive memory allocation. - ****************************************************************************/ - -#include -#include -#include -#include - -#include "base/allocator/CCAllocatorBase.h" -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorGlobal.h" -#include "base/allocator/CCAllocatorMutex.h" -#include "base/allocator/CCAllocatorDiagnostics.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -// @brief define this to cause this allocator to fallback to the global allocator -// this is just for testing purposes to see if this allocator is broken. -//#define FALLBACK_TO_GLOBAL - -// @brief -// Fixed sized block allocator strategy for allocating blocks -// of memory that are the same size. -// Optionally takes a page size which determines how many blocks -// are added when the allocator needs more storage. -// @param _block_size the size of the fixed block allocated by this allocator. -// @param _page_size the number of blocks to allocate when growing the free list. -// @param _alignment the alignment size in bytes of each block. -// @param locking_semantics which locking strategy to use. -template -class AllocatorStrategyFixedBlock - : public AllocatorBase - , public lock_traits -{ -public: - - static const size_t block_size = _block_size; - static const size_t alignment = _alignment; - - AllocatorStrategyFixedBlock(const char* tag = nullptr, size_t pageSize = 100) - : _list(nullptr) - , _pages(nullptr) - , _pageSize(pageSize) - , _allocated(0) - { -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - _highestCount = 0; - AllocatorDiagnostics::instance()->trackAllocator(this); - AllocatorBase::setTag(tag ? tag : typeid(AllocatorStrategyFixedBlock).name()); -#endif - } - - virtual ~AllocatorStrategyFixedBlock() - { -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - AllocatorDiagnostics::instance()->untrackAllocator(this); -#endif - - while (_pages) - { - intptr_t* page = (intptr_t*)_pages; - intptr_t* next = (intptr_t*)*page; - ccAllocatorGlobal.deallocate(page); - _pages = (void*)next; - } - } - - // @brief - // allocate a block of memory by returning the first item in the list or if empty - // then allocate a new page of blocks, and return the first element and store the rest. - // if _block_size does not match the requested size, then we assert. - CC_ALLOCATOR_INLINE void* allocate(size_t size) - { - CC_ASSERT(block_size == size); -#ifdef FALLBACK_TO_GLOBAL - return ccAllocatorGlobal.allocate(size); -#else - lock_traits::lock(); - auto r = pop_front(); - lock_traits::unlock(); - return r; -#endif - } - - // @brief Deallocate a block by pushing it on the head of a linked list of free blocks. - CC_ALLOCATOR_INLINE void deallocate(void* address, size_t size = 0) - { - CC_ASSERT(0 == size || block_size == size); -#ifdef FALLBACK_TO_GLOBAL - ccAllocatorGlobal.deallocate(address); -#else - lock_traits::lock(); - push_front(address); - lock_traits::unlock(); -#endif - } - - // @brief Checks allocated pages to determine whether or not a block - // is owned by this allocator. This should be reasonably fast - // for properly configured allocators with few large pages. - CC_ALLOCATOR_INLINE bool owns(const void* const address) - { -#ifdef FALLBACK_TO_GLOBAL - return true; // since everything uses the global allocator, we can just lie and say we own this address. -#else - lock_traits::lock(); - - const uint8_t* const a = (const uint8_t* const)address; - const uint8_t* p = (uint8_t*)_pages; - const size_t pSize = pageSize(); - while (p) - { - if (a >= p && a < (p + pSize)) - { - lock_traits::unlock(); - return true; - } - p = (uint8_t*)(*(uintptr_t*)p); - } - lock_traits::unlock(); - return false; -#endif - } - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - std::string diagnostics() const - { - std::stringstream s; - s << AllocatorBase::tag() << " initial:" << _pageSize << " count:" << _allocated << " highest:" << _highestCount << "\n"; - return s.str(); - } - size_t _highestCount; -#endif - -protected: - - // @brief Method to push an allocated block onto the free list. - // No check is made that the block hasn't been already added to this allocator. - CC_ALLOCATOR_INLINE void push_front(void* block) - { - CC_ASSERT(block); - CC_ASSERT(block_size < AllocatorBase::kDefaultAlignment || 0 == ((intptr_t)block & (AllocatorBase::kDefaultAlignment - 1))); - -#if COCOS2D_DEBUG - // additional debug build checks - CC_ASSERT(true == owns(block)); -#endif - - if (nullptr == _list) - { - _list = block; - *(uintptr_t*)block = 0; - } - else - { - uintptr_t* p = (uintptr_t*)(block); - *p = (uintptr_t)_list; - _list = block; - } - CC_ASSERT(_allocated > 0); - --_allocated; - } - - // @brief Method to pop a block off the free list. - // If no blocks are available, then the list is grown by _page_size - // Tuning of the page size is critical to getting good performance. - // Ideally you would use a page size that is around the high water mark - // for the number of blocks of this size being allocated. - CC_ALLOCATOR_INLINE void* pop_front() - { - if (nullptr == _list) - { - allocatePage(); - } - auto next = (void*)*(uintptr_t*)_list; - auto block = _list; - _list = next; - ++_allocated; - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - if (_allocated > _highestCount) - _highestCount = _allocated; -#endif - CC_ASSERT(block_size < AllocatorBase::kDefaultAlignment || 0 == ((intptr_t)block & (AllocatorBase::kDefaultAlignment - 1))); - return block; - } - -protected: - - // @brief Returns the size of a page in bytes + overhead. - size_t pageSize() const - { - return AllocatorBase::kDefaultAlignment + AllocatorBase::nextPow2BlockSize(block_size) * _pageSize; - } - - // @brief Allocates a new page from the global allocator, - // and adds all the blocks to the free list. - CC_ALLOCATOR_INLINE void allocatePage() - { - uint8_t* p = (uint8_t*)AllocatorBase::aligned(ccAllocatorGlobal.allocate(pageSize())); - intptr_t* page = (intptr_t*)p; - if (nullptr == _pages) - { - _pages = page; - *page = 0; - } - else - { - *page = (intptr_t)_pages; - _pages = page; - } - - p += AllocatorBase::kDefaultAlignment; // step past the linked list node - - _allocated += _pageSize; - size_t aligned_size = AllocatorBase::nextPow2BlockSize(block_size); - uint8_t* block = (uint8_t*)p; - for (unsigned int i = 0; i < _pageSize; ++i, block += aligned_size) - { - push_front(block); - } - } - -protected: - - // @brief Linked list of free blocks. - void* _list; - - // @brief Linked list of allocated pages. - void* _pages; - - // @brief number of blocks per page. - size_t _pageSize; - - // @brief Number of blocks that are currently allocated. - size_t _allocated; -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H diff --git a/cocos/base/allocator/CCAllocatorStrategyGlobalSmallBlock.h b/cocos/base/allocator/CCAllocatorStrategyGlobalSmallBlock.h deleted file mode 100644 index 4a3bd1acd21c..000000000000 --- a/cocos/base/allocator/CCAllocatorStrategyGlobalSmallBlock.h +++ /dev/null @@ -1,320 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H -#define CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H -/// @cond DO_NOT_SHOW - -/**************************************************************************** - WARNING! - Do not use Console::log or any other methods that use NEW inside of this - allocator. Failure to do so will result in recursive memory allocation. - ****************************************************************************/ -#include -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorBase.h" -#include "base/allocator/CCAllocatorGlobal.h" -#include "base/allocator/CCAllocatorStrategyFixedBlock.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS -#define TRACK(slot, size, op) _smallBlockAllocations[slot] op size -#else -#define TRACK(...) -#endif - -// @brief -class AllocatorStrategyGlobalSmallBlock - : public AllocatorBase -{ -public: - - // default number of block to allocate per page. - static const size_t kDefaultSmallBlockCount = 100; - - // default max small block size pool. - static const size_t kMaxSmallBlockPower = 13; // 2^13 8kb - - // @brief define for allocator strategy, cannot be typedef because we want to eval at use -#define SType(size) AllocatorStrategyFixedBlock - - void _lazy_init() - { - // this gets called before static constructors - // so make sure we only get called once. - static bool once = true; - if (once) - { - once = false; - - // call our own constructor. Global new can be called before the constructors are called. - // Make sure it gets called by having it done lazily in the call to allocate. - new (this) AllocatorStrategyGlobalSmallBlock(); - } - } - - AllocatorStrategyGlobalSmallBlock() - { - // this gets called before static constructors - // so make sure we only get called once. - static bool once = true; - if (once) - { - once = false; - - _maxBlockSize = 1 << kMaxSmallBlockPower; - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - AllocatorDiagnostics::instance()->trackAllocator(this); - AllocatorBase::setTag("GlobalSmallBlock"); -#endif - - memset(_smallBlockAllocators, 0, sizeof(_smallBlockAllocators)); -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - memset(_smallBlockAllocations, 0, sizeof(_smallBlockAllocations)); -#endif - // cannot call new on the allocator here because it will recurse - // so instead we allocate from the global allocator and construct in place. - #define SBA(n, size) \ - if (size <= _maxBlockSize) \ - { \ - auto v = ccAllocatorGlobal.allocate(sizeof(SType(size))); \ - _smallBlockAllocators[n] = (AllocatorBase*)(new (v) SType(size)("GlobalSmallBlock::"#size)); \ - } - - SBA(2, 4) - SBA(3, 8); - SBA(4, 16); - SBA(5, 32); - SBA(6, 64); - SBA(7, 128); - SBA(8, 256); - SBA(9, 512); - SBA(10, 1024); - SBA(11, 2048); - SBA(12, 4096); - SBA(13, 8192); - - #undef SBA - } - } - - virtual ~AllocatorStrategyGlobalSmallBlock() - { - for (int i = 0; i <= kMaxSmallBlockPower; ++i) - if (_smallBlockAllocators[i]) - ccAllocatorGlobal.deallocate(_smallBlockAllocators[i]); - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - AllocatorDiagnostics::instance()->untrackAllocator(this); -#endif - } - - // @brief Allocate a block of some size. If the block is <= 8192 it is allocated out of an array - // of fixed size block allocators. If larger, then we default back to the global allocator. - // @param size Size of block to allocate. This will be rounded to the next power of two. - CC_ALLOCATOR_INLINE void* allocate(size_t size) - { - _lazy_init(); - - if (size < sizeof(intptr_t)) // always allocate at least enough space to store a pointer. this is - size = sizeof(intptr_t); // so we can link the empty blocks together in the block allocator. - - // if the size is greater than what we determine to be a small block - // size then fall through to calling the global allocator instead. - if (size > _maxBlockSize) - return ccAllocatorGlobal.allocate(size); - - // make sure the size fits into one of the - // fixed sized block allocators we have above. - size_t adjusted_size = AllocatorBase::nextPow2BlockSize(size); - - #define ALLOCATE(slot, size) \ - case size: \ - { \ - void* v = _smallBlockAllocators[slot]; \ - CC_ASSERT(nullptr != v); \ - auto a = (SType(size)*)v; \ - address = a->allocate(adjusted_size); \ - TRACK(slot, size, +=); \ - } \ - break; - - void* address = nullptr; - - switch (adjusted_size) - { - ALLOCATE(2, 4); - ALLOCATE(3, 8); - ALLOCATE(4, 16); - ALLOCATE(5, 32); - ALLOCATE(6, 64); - ALLOCATE(7, 128); - ALLOCATE(8, 256); - ALLOCATE(9, 512); - ALLOCATE(10, 1024); - ALLOCATE(11, 2048); - ALLOCATE(12, 4096); - ALLOCATE(13, 8192); - default: - CC_ASSERT(false); - break; - } - - #undef ALLOCATE - - CC_ASSERT(adjusted_size < AllocatorBase::kDefaultAlignment || 0 == ((intptr_t)address & (AllocatorBase::kDefaultAlignment - 1))); - CC_ASSERT(nullptr != address); - - return address; - } - - // @brief Deallocate a block by choosing one of the fixed size block allocators - // or defaulting to the global allocator if we do not own this block. - CC_ALLOCATOR_INLINE void deallocate(void* address, size_t size = 0) - { - // if we didn't get a size, then we need to find the allocator - // by asking each if they own the block. For allocators that - // have few large pages, this is extremely fast. - if (0 == size) - { - #define OWNS(slot, S, address) \ - case S: \ - { \ - void* v = _smallBlockAllocators[slot]; \ - if (v) \ - { \ - auto a = (SType(S)*)v; \ - if (a->owns(address)) \ - { \ - size = SType(S)::block_size; \ - break; \ - } \ - } \ - } - - // falls through until found - switch (sizeof(uint32_t)) - { - OWNS(2, 4, address); - OWNS(3, 8, address); - OWNS(4, 16, address); - OWNS(5, 32, address); - OWNS(6, 64, address); - OWNS(7, 128, address); - OWNS(8, 256, address); - OWNS(9, 512, address); - OWNS(10, 1024, address); - OWNS(11, 2048, address); - OWNS(12, 4096, address); - OWNS(13, 8192, address); - } - } - - // if the size is greater than what we determine to be a small block - // size then default to calling the global allocator instead. - if (0 == size || size > _maxBlockSize) - return ccAllocatorGlobal.deallocate(address, size); - - if (size < sizeof(intptr_t)) // always allocate at least enough space to store a pointer. this is - size = sizeof(intptr_t); // so we can link the empty blocks together in the block allocator. - - // make sure the size fits into one of the - // fixed sized block allocators we have above. - size_t adjusted_size = AllocatorBase::nextPow2BlockSize(size); - - #define DEALLOCATE(slot, size, address) \ - case size: \ - { \ - void* v = _smallBlockAllocators[slot]; \ - CC_ASSERT(nullptr != v); \ - auto a = (SType(size)*)v; \ - a->deallocate(address, size); \ - TRACK(slot, size, -=); \ - } \ - break; - - switch (adjusted_size) - { - DEALLOCATE(2, 4, address); - DEALLOCATE(3, 8, address); - DEALLOCATE(4, 16, address); - DEALLOCATE(5, 32, address); - DEALLOCATE(6, 64, address); - DEALLOCATE(7, 128, address); - DEALLOCATE(8, 256, address); - DEALLOCATE(9, 512, address); - DEALLOCATE(10, 1024, address); - DEALLOCATE(11, 2048, address); - DEALLOCATE(12, 4096, address); - DEALLOCATE(13, 8192, address); - default: - CC_ASSERT(false); - } - - #undef DEALLOCATE - } - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - std::string diagnostics() const - { - std::stringstream s; - size_t total = 0; - for (auto i = 2; i <= kMaxSmallBlockPower; ++i) - { - auto a = _smallBlockAllocators[i]; - if (a) - { - total += _smallBlockAllocations[i]; - s << a->tag() << " allocated:" << _smallBlockAllocations[i] << "\n"; - } - } - s << "Total:" << total << "\n"; - return s.str(); - } - size_t _highestCount; -#endif - -protected: - - // @brief the max size of a block this allocator will pool before using global allocator - size_t _maxBlockSize; - - // @brief array of small block allocators from 2^0 -> 2^kMaxSmallBlockPower - AllocatorBase* _smallBlockAllocators[kMaxSmallBlockPower + 1]; - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - size_t _smallBlockAllocations[kMaxSmallBlockPower + 1]; -#endif -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H diff --git a/cocos/base/allocator/CCAllocatorStrategyPool.h b/cocos/base/allocator/CCAllocatorStrategyPool.h deleted file mode 100644 index cf42dd3341e8..000000000000 --- a/cocos/base/allocator/CCAllocatorStrategyPool.h +++ /dev/null @@ -1,173 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Author: Justin Graham (https://github.com/mannewalis) - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef CC_ALLOCATOR_STRATEGY_POOL_H -#define CC_ALLOCATOR_STRATEGY_POOL_H -/// @cond DO_NOT_SHOW - -#include -#include -#include - -#include "base/allocator/CCAllocatorMacros.h" -#include "base/allocator/CCAllocatorGlobal.h" -#include "base/allocator/CCAllocatorStrategyFixedBlock.h" -#include "base/allocator/CCAllocatorDiagnostics.h" -#include "base/CCConfiguration.h" - -NS_CC_BEGIN -NS_CC_ALLOCATOR_BEGIN - -/** - * ObjectTraits describes an allocatable object. - * - * Template class that represents a default allocatable object. - * Provide custom implementations to change the constructor/destructor behavior, - * or to change the default alignment of the object in memory. - * - * @param T Type of object. - * @param _alignment Alignment of object T. - */ -template -class ObjectTraits -{ -public: - - typedef T value_type; - - static const size_t alignment = _alignment; - - virtual ~ObjectTraits() - {} - - /** Constructor implementation for type T.*/ - void construct(T* address) - { - ::new(address) T(); - } - - /** Destructor implementation for type T.*/ - void destroy(T* address) - { - address->~T(); - } - - /** Returns the name of this object type T.*/ - const char* name() const - { - return typeid(T).name(); - } -}; - -/** - * Fixed sized pool allocator strategy for objects of type T. - * - * Optionally takes a page size which determines how many objects are added when the allocator needs more storage. - * ObjectTraits allows you to control the alignment, construction and destruction of an object in the pool. - * - * @param T Type of object. - * @param _page_size Number of objects of T in each page. - * @param O ObjectTraits for type T - * @see CC_USE_ALLOCATOR_POOL - */ -template , typename locking_traits = lockless_semantics> -class AllocatorStrategyPool - : public AllocatorStrategyFixedBlock - , public O -{ -public: - - typedef T value_type; - typedef value_type* pointer; - - /** Ugh wish I knew a way that I could declare this just once.*/ - typedef AllocatorStrategyFixedBlock tParentStrategy; - - AllocatorStrategyPool(const char* tag = nullptr, size_t poolSize = 100) - : tParentStrategy(tag) - { - poolSize = Configuration::getInstance()->getValue(tag, Value((int)poolSize)).asInt(); - tParentStrategy::_pageSize = poolSize; - } - - /** - * Allocate block of size T. - * - * If size does not match sizeof(T) then the global allocator is called instead. - * @see CC_USE_ALLOCATOR_POOL - */ - CC_ALLOCATOR_INLINE void* allocate(size_t size) - { - T* object; - if (sizeof(T) == size) - { - object = (pointer)tParentStrategy::allocate(sizeof(T)); - } - else - { - object = (T*)ccAllocatorGlobal.allocate(size); - } - O::construct(object); - return object; - } - - /** - * Deallocate block of size T. - * - * If size does not match sizeof(T) then the global allocator is called instead. - * @see CC_USE_ALLOCATOR_POOL - */ - CC_ALLOCATOR_INLINE void deallocate(void* address, size_t size = 0) - { - if (address) - { - O::destroy((T*)address); - if (sizeof(T) == size) - { - tParentStrategy::deallocate(address, sizeof(T)); - } - else - { - ccAllocatorGlobal.deallocate(address, size); - } - } - } - -#if CC_ENABLE_ALLOCATOR_DIAGNOSTICS - std::string diagnostics() const - { - std::stringstream s; - s << AllocatorBase::tag() << " initial:" << tParentStrategy::_pageSize << " count:" << tParentStrategy::_allocated << " highest:" << tParentStrategy::_highestCount << "\n"; - return s.str(); - } -#endif -}; - -NS_CC_ALLOCATOR_END -NS_CC_END - -/// @endcond -#endif//CC_ALLOCATOR_STRATEGY_POOL_H diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index cd21a413c24b..3813c7a6f0c6 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -25,9 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCCONFIG_H__ -#define __CCCONFIG_H__ +#pragma once #include "platform/CCPlatformConfig.h" @@ -254,26 +252,38 @@ THE SOFTWARE. /** Use physics integration API. */ #ifndef CC_USE_PHYSICS -#define CC_USE_PHYSICS 1 +#define CC_USE_PHYSICS 0 +#endif + +#if (CC_USE_PHYSICS) +/** Use chipmunk physics 2d engine. */ +#ifndef CC_ENABLE_CHIPMUNK_INTEGRATION +#define CC_ENABLE_CHIPMUNK_INTEGRATION 1 #endif +/** or use box2d physics 2d engine. */ +#ifndef CC_ENABLE_BOX2D_INTEGRATION +#define CC_ENABLE_BOX2D_INTEGRATION 0 +#endif +#endif // CC_USE_PHYSICS + /** Use 3d physics integration API. */ #ifndef CC_USE_3D_PHYSICS -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX /*|| CC_TARGET_PLATFORM == CC_PLATFORM_WINRT*/) -#define CC_USE_3D_PHYSICS 1 +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) +#define CC_USE_3D_PHYSICS 0 #endif #endif #if (CC_USE_3D_PHYSICS) /** Use bullet physics engine. */ #ifndef CC_ENABLE_BULLET_INTEGRATION -#define CC_ENABLE_BULLET_INTEGRATION 1 +#define CC_ENABLE_BULLET_INTEGRATION 0 #endif #endif /** Use 3D navigation API */ #ifndef CC_USE_NAVMESH -#define CC_USE_NAVMESH 1 +#define CC_USE_NAVMESH 0 #endif /** Use culling or not. */ @@ -302,22 +312,9 @@ THE SOFTWARE. /** Support webp or not. If your application don't use webp format picture, you can undefine this macro to save package size. */ #ifndef CC_USE_WEBP -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #define CC_USE_WEBP 1 -#endif #endif // CC_USE_WEBP -/** Support WIC (Windows Image Component) or not. Replaces PNG, TIFF and JPEG - */ -#ifndef CC_USE_WIC -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#define CC_USE_WIC 1 -#undef CC_USE_TIFF -#undef CC_USE_JPEG -#undef CC_USE_PNG -#endif -#endif // CC_USE_WIC - /** Enable Script binding. */ #ifndef CC_ENABLE_SCRIPT_BINDING #define CC_ENABLE_SCRIPT_BINDING 1 @@ -348,44 +345,6 @@ THE SOFTWARE. #endif #endif -/** @def CC_ENABLE_ALLOCATOR - * Turn on creation of global allocator and pool allocators - * as specified by CC_ALLOCATOR_GLOBAL below. - */ -#ifndef CC_ENABLE_ALLOCATOR -# define CC_ENABLE_ALLOCATOR 0 -#endif - -/** @def CC_ENABLE_ALLOCATOR_DIAGNOSTICS - * Turn on debugging of allocators. This is slower, uses - * more memory, and should not be used for production builds. - */ -#ifndef CC_ENABLE_ALLOCATOR_DIAGNOSTICS -# define CC_ENABLE_ALLOCATOR_DIAGNOSTICS CC_ENABLE_ALLOCATOR -#endif - -/** @def CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE - * Turn on override of global new and delete - * as specified by CC_ALLOCATOR_GLOBAL_NEW_DELETE below. - */ -#ifndef CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE -# define CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE 0 -# endif//CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE - -/** @def CC_ALLOCATOR_GLOBAL - * Specify allocator to use for global allocator. - */ -#ifndef CC_ALLOCATOR_GLOBAL -# define CC_ALLOCATOR_GLOBAL cocos2d::allocator::AllocatorStrategyDefault -#endif - -/** @def CC_ALLOCATOR_GLOBAL_NEW_DELETE - * Specify allocator to use when overriding of new and delete. - */ -#ifndef CC_ALLOCATOR_GLOBAL_NEW_DELETE -# define CC_ALLOCATOR_GLOBAL_NEW_DELETE cocos2d::allocator::AllocatorStrategyGlobalSmallBlock -#endif - #ifndef CC_FILEUTILS_APPLE_ENABLE_OBJC #define CC_FILEUTILS_APPLE_ENABLE_OBJC 1 #endif @@ -404,5 +363,3 @@ THE SOFTWARE. #ifndef CC_STRIP_FPS #define CC_STRIP_FPS 0 #endif - -#endif // __CCCONFIG_H__ diff --git a/cocos/platform/tizen/CCGL-tizen.h b/cocos/base/ccConstants.h similarity index 53% rename from cocos/platform/tizen/CCGL-tizen.h rename to cocos/base/ccConstants.h index 77abe2cba5fc..cd0b486003a0 100644 --- a/cocos/platform/tizen/CCGL-tizen.h +++ b/cocos/base/ccConstants.h @@ -1,7 +1,5 @@ /**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + Copyright (c) 2019 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,45 +21,28 @@ THE SOFTWARE. ****************************************************************************/ -#ifndef __CCGL_H__ -#define __CCGL_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include +#pragma once -#ifndef glGenVertexArrays - #define glGenVertexArrays glGenVertexArraysOES -#endif -#ifndef glDeleteVertexArrays - #define glDeleteVertexArrays glDeleteVertexArraysOES -#endif -#ifndef GL_WRITE_ONLY - #define GL_WRITE_ONLY GL_WRITE_ONLY_OES -#endif -#ifndef glMapBuffer - #define glMapBuffer glMapBufferOES -#endif -#ifndef glUnmapBuffer - #define glUnmapBuffer glUnmapBufferOES -#endif -#ifndef GL_BGRA - #define GL_BGRA GL_BGRA_EXT -#endif -#ifndef glBindVertexArray - #define glBindVertexArray glBindVertexArrayOES -#endif -#ifndef glClearDepth - #define glClearDepth glClearDepthf -#endif -#ifndef GL_DEPTH24_STENCIL8 - #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES -#endif +#include "base/ccMacros.h" +NS_CC_BEGIN -ELEMENTARY_GLVIEW_GLOBAL_DECLARE(); +namespace GLBlendConst { + const int ZERO = 0; //GL_ZERO; + const int ONE = 1; //GL_ONE; + const int SRC_COLOR = 0x0300; //GL_SRC_COLOR; + const int ONE_MINUS_SRC_COLOR = 0x0301; //GL_ONE_MINUS_SRC_COLOR; + const int DST_COLOR = 0x0306; //GL_DST_COLOR; + const int ONE_MINUS_DST_COLOR = 0x0307; //GL_ONE_MINUS_DST_COLOR; + const int SRC_ALPHA = 0x0302; //GL_SRC_ALPHA; + const int ONE_MINUS_SRC_ALPHA = 0x0303; //GL_ONE_MINUS_SRC_ALPHA; + const int DST_ALPHA = 0x0304; //GL_DST_ALPHA; + const int ONE_MINUS_DST_ALPHA = 0x0305; //GL_ONE_MINUS_DST_ALPHA; + const int CONSTANT_ALPHA = 0x8003; //GL_CONSTANT_ALPHA; + const int ONE_MINUS_CONSTANT_ALPHA = 0x8004; //GL_ONE_MINUS_CONSTANT_ALPHA; + const int SRC_ALPHA_SATURATE = 0x0308; //GL_SRC_ALPHA_SATURATE; + const int BLEND_COLOR = 0x8005; //GL_BLEND_COLOR +} -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#endif // __CCGL_H__ +NS_CC_END \ No newline at end of file diff --git a/cocos/base/ccFPSImages.h b/cocos/base/ccFPSImages.h index 73851bb5b09a..cb37ac57cce2 100644 --- a/cocos/base/ccFPSImages.h +++ b/cocos/base/ccFPSImages.h @@ -23,7 +23,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #pragma once #include "base/ccConfig.h" @@ -36,7 +35,7 @@ extern "C" { #if !CC_STRIP_FPS extern unsigned char cc_fps_images_png[]; -unsigned int cc_fps_images_len(); +extern unsigned int cc_fps_images_len(void); #endif #ifdef __cplusplus diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index 19ecd29eb688..74252ed50d08 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -62,15 +62,6 @@ THE SOFTWARE. #include "base/ccConfig.h" -/** @def CC_SWAP -simple macro that swaps 2 variables - @deprecated use std::swap() instead -*/ -#define CC_SWAP(x, y, type) \ -{ type temp = (x); \ - x = y; y = temp; \ -} - #include "base/ccRandom.h" /** @def CCRANDOM_MINUS1_1 @@ -99,8 +90,8 @@ simple macro that swaps 2 variables /** @def CC_BLEND_SRC default gl blend src function. Compatible with premultiplied alpha images. */ -#define CC_BLEND_SRC GL_ONE -#define CC_BLEND_DST GL_ONE_MINUS_SRC_ALPHA +#define CC_BLEND_SRC cocos2d::backend::BlendFactor::ONE +#define CC_BLEND_DST cocos2d::backend::BlendFactor::ONE_MINUS_SRC_ALPHA /** @def CC_NODE_DRAW_SETUP diff --git a/cocos/base/ccTypes.cpp b/cocos/base/ccTypes.cpp index 657086b6084d..dd8dc7d5c0e0 100644 --- a/cocos/base/ccTypes.cpp +++ b/cocos/base/ccTypes.cpp @@ -27,6 +27,7 @@ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. ****************************************************************************/ #include "base/ccTypes.h" +#include "renderer/backend/Types.h" NS_CC_BEGIN @@ -38,9 +39,6 @@ const ssize_t CC_INVALID_INDEX = -1; */ Color3B::Color3B() -: r(0) -, g(0) -, b(0) {} Color3B::Color3B(GLubyte _r, GLubyte _g, GLubyte _b) @@ -96,13 +94,9 @@ bool Color3B::operator!=(const Color4F& right) const */ Color4B::Color4B() -: r(0) -, g(0) -, b(0) -, a(0) {} -Color4B::Color4B(GLubyte _r, GLubyte _g, GLubyte _b, GLubyte _a) +Color4B::Color4B(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) : r(_r) , g(_g) , b(_b) @@ -158,10 +152,6 @@ bool Color4B::operator!=(const Color4F& right) const */ Color4F::Color4F() -: r(0.0f) -, g(0.0f) -, b(0.0f) -, a(0.0f) {} Color4F::Color4F(float _r, float _g, float _b, float _a) @@ -314,9 +304,9 @@ const Color4F Color4F::BLACK ( 0, 0, 0, 1); const Color4F Color4F::ORANGE ( 1, 0.5f, 0, 1); const Color4F Color4F::GRAY (0.65f, 0.65f, 0.65f, 1); -const BlendFunc BlendFunc::DISABLE = {GL_ONE, GL_ZERO}; -const BlendFunc BlendFunc::ALPHA_PREMULTIPLIED = {GL_ONE, GL_ONE_MINUS_SRC_ALPHA}; -const BlendFunc BlendFunc::ALPHA_NON_PREMULTIPLIED = {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}; -const BlendFunc BlendFunc::ADDITIVE = {GL_SRC_ALPHA, GL_ONE}; +const BlendFunc BlendFunc::DISABLE = {backend::BlendFactor::ONE, backend::BlendFactor::ZERO}; +const BlendFunc BlendFunc::ALPHA_PREMULTIPLIED = { backend::BlendFactor::ONE, backend::BlendFactor::ONE_MINUS_SRC_ALPHA}; +const BlendFunc BlendFunc::ALPHA_NON_PREMULTIPLIED = { backend::BlendFactor::SRC_ALPHA, backend::BlendFactor::ONE_MINUS_SRC_ALPHA}; +const BlendFunc BlendFunc::ADDITIVE = { backend::BlendFactor::SRC_ALPHA, backend::BlendFactor::ONE}; NS_CC_END diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index ae30d7939be5..a6ae73a2f980 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -25,9 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __BASE_CCTYPES_H__ -#define __BASE_CCTYPES_H__ +#pragma once #include @@ -35,6 +33,8 @@ THE SOFTWARE. #include "math/CCMath.h" #include "base/CCRef.h" #include "platform/CCGL.h" +#include "base/CCEnumClass.h" +#include "renderer/backend/Types.h" /** * @addtogroup base @@ -53,7 +53,7 @@ struct Color4F; struct CC_DLL Color3B { Color3B(); - Color3B(GLubyte _r, GLubyte _g, GLubyte _b); + Color3B(uint8_t _r, uint8_t _g, uint8_t _b); explicit Color3B(const Color4B& color); explicit Color3B(const Color4F& color); @@ -69,9 +69,9 @@ struct CC_DLL Color3B return (*this == other); } - GLubyte r; - GLubyte g; - GLubyte b; + uint8_t r = 0; + uint8_t g = 0; + uint8_t b = 0; static const Color3B WHITE; static const Color3B YELLOW; @@ -91,11 +91,11 @@ struct CC_DLL Color3B struct CC_DLL Color4B { Color4B(); - Color4B(GLubyte _r, GLubyte _g, GLubyte _b, GLubyte _a); - explicit Color4B(const Color3B& color, GLubyte _a = 255); + Color4B(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a); + explicit Color4B(const Color3B& color, uint8_t _a = 255); explicit Color4B(const Color4F& color); - inline void set(GLubyte _r, GLubyte _g, GLubyte _b, GLubyte _a) + inline void set(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) { r = _r; g = _g; @@ -110,10 +110,10 @@ struct CC_DLL Color4B bool operator!=(const Color3B& right) const; bool operator!=(const Color4F& right) const; - GLubyte r; - GLubyte g; - GLubyte b; - GLubyte a; + uint8_t r = 0; + uint8_t g = 0; + uint8_t b = 0; + uint8_t a = 0; static const Color4B WHITE; static const Color4B YELLOW; @@ -150,10 +150,10 @@ struct CC_DLL Color4F return (*this == other); } - GLfloat r; - GLfloat g; - GLfloat b; - GLfloat a; + float r = 0.f; + float g = 0.f; + float b = 0.f; + float a = 0.f; static const Color4F WHITE; static const Color4F YELLOW; @@ -222,10 +222,10 @@ Color4F operator/(Color4F lhs, float rhs); struct CC_DLL Tex2F { Tex2F(float _u, float _v): u(_u), v(_v) {} - Tex2F(): u(0.f), v(0.f) {} + Tex2F() {} - GLfloat u; - GLfloat v; + float u = 0.f; + float v = 0.f; }; /** @struct PointSprite @@ -233,9 +233,9 @@ struct CC_DLL Tex2F { */ struct CC_DLL PointSprite { - Vec2 pos; // 8 bytes + Vec2 pos; // 8 bytes Color4B color; // 4 bytes - GLfloat size; // 4 bytes + float size = 0.f; // 4 bytes }; /** @struct Quad2 @@ -282,7 +282,7 @@ struct V2F_C4B_PF /// colors (4B) Color4B colors; /// pointsize - float pointSize; + float pointSize = 0.f; }; /** @struct V2F_C4F_T2F @@ -324,6 +324,17 @@ struct CC_DLL V3F_T2F Tex2F texCoords; }; +/** @struct V3F_C4F +* A Vec3 with a vertex point, a color. +*/ +struct CC_DLL V3F_C4F +{ + /// vertices (3F) + Vec3 vertices; + /// vertices (4F) + Color4F colors; +}; + /** @struct V2F_C4B_T2F_Triangle * A Triangle of V2F_C4B_T2F. */ @@ -394,23 +405,28 @@ struct CC_DLL V3F_T2F_Quad V3F_T2F tr; }; + +namespace backend { + enum class BlendFactor: uint32_t; +} + /** @struct BlendFunc * Blend Function used for textures. */ struct CC_DLL BlendFunc { /** source blend function */ - GLenum src; + backend::BlendFactor src; /** destination blend function */ - GLenum dst; + backend::BlendFactor dst; - /** Blending disabled. Uses {GL_ONE, GL_ZERO} */ + /** Blending disabled. Uses {BlendFactor::ONE, BlendFactor::ZERO} */ static const BlendFunc DISABLE; - /** Blending enabled for textures with Alpha premultiplied. Uses {GL_ONE, GL_ONE_MINUS_SRC_ALPHA} */ + /** Blending enabled for textures with Alpha premultiplied. Uses {BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA} */ static const BlendFunc ALPHA_PREMULTIPLIED; - /** Blending enabled for textures with Alpha NON premultiplied. Uses {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA} */ + /** Blending enabled for textures with Alpha NON premultiplied. Uses {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA} */ static const BlendFunc ALPHA_NON_PREMULTIPLIED; - /** Enables Additive blending. Uses {GL_SRC_ALPHA, GL_ONE} */ + /** Enables Additive blending. Uses {BlendFactor::SRC_ALPHA, BlendFactor::ONE} */ static const BlendFunc ADDITIVE; bool operator==(const BlendFunc &a) const @@ -489,8 +505,8 @@ struct CC_DLL T2F_Quad struct CC_DLL AnimationFrameData { T2F_Quad texCoords; - float delay; Size size; + float delay = 0.f; }; /** @@ -502,23 +518,14 @@ struct CC_DLL AnimationFrameData */ struct CC_DLL FontShadow { -public: - - // shadow is not enabled by default - FontShadow() - : _shadowEnabled(false) - , _shadowBlur(0) - , _shadowOpacity(0) - {} - - /// true if shadow enabled - bool _shadowEnabled; /// shadow x and y offset Size _shadowOffset; /// shadow blurriness - float _shadowBlur; + float _shadowBlur = 0.f; /// shadow opacity - float _shadowOpacity; + float _shadowOpacity = 0.f; + /// true if shadow enabled + bool _shadowEnabled = false; }; /** @struct FontStroke @@ -526,24 +533,15 @@ struct CC_DLL FontShadow */ struct CC_DLL FontStroke { -public: - - // stroke is disabled by default - FontStroke() - : _strokeEnabled(false) - , _strokeColor(Color3B::BLACK) - , _strokeAlpha(255) - , _strokeSize(0) - {} - - /// true if stroke enabled - bool _strokeEnabled; /// stroke color - Color3B _strokeColor; - /// stroke alpha - GLubyte _strokeAlpha; + Color3B _strokeColor = Color3B::BLACK; /// stroke size - float _strokeSize; + float _strokeSize = 0.f; + /// true if stroke enabled + bool _strokeEnabled = false; + /// stroke alpha + uint8_t _strokeAlpha = 255; + }; @@ -552,47 +550,31 @@ struct CC_DLL FontStroke */ struct CC_DLL FontDefinition { -public: - /** - * @js NA - * @lua NA - */ - FontDefinition() - : _fontSize(0) - , _alignment(TextHAlignment::CENTER) - , _vertAlignment(TextVAlignment::TOP) - , _dimensions(Size::ZERO) - , _fontFillColor(Color3B::WHITE) - , _fontAlpha(255) - , _enableWrap(true) - , _overflow(0) - {} - /// font name std::string _fontName; /// font size - int _fontSize; + int _fontSize = 0; /// horizontal alignment - TextHAlignment _alignment; + TextHAlignment _alignment = TextHAlignment::CENTER; /// vertical alignment - TextVAlignment _vertAlignment; + TextVAlignment _vertAlignment = TextVAlignment::TOP; /// rendering box - Size _dimensions; + Size _dimensions = Size::ZERO; /// font color - Color3B _fontFillColor; + Color3B _fontFillColor = Color3B::WHITE; /// font alpha - GLubyte _fontAlpha; + uint8_t _fontAlpha = 255; /// font shadow FontShadow _shadow; /// font stroke FontStroke _stroke; /// enable text wrap - bool _enableWrap; + bool _enableWrap = true; /** There are 4 overflows: none, clamp, shrink and resize_height. * The corresponding integer values are 0, 1, 2, 3 respectively * For more information, please refer to Label::Overflow enum class. */ - int _overflow; + int _overflow = 0; }; /** @@ -615,17 +597,14 @@ enum class LabelEffect { /** @struct Acceleration * The device accelerometer reports values for each axis in units of g-force. */ -class CC_DLL Acceleration - : public Ref +class CC_DLL Acceleration: public Ref { public: - double x; - double y; - double z; + double x = 0; + double y = 0; + double z = 0; - double timestamp; - - Acceleration(): x(0), y(0), z(0), timestamp(0) {} + double timestamp = 0; }; extern const std::string CC_DLL STD_STRING_EMPTY; @@ -640,7 +619,45 @@ enum class SetIntervalReason : char BY_DIRECTOR_PAUSE }; +struct CC_DLL Viewport +{ + int x = 0; + int y = 0; + unsigned int w = 0; + unsigned int h = 0; +}; + +struct CC_DLL ScissorRect +{ + float x = 0; + float y = 0; + float width = 0; + float height = 0; +}; + +enum class ClearFlag : uint8_t +{ + NONE = 0, + COLOR = 1, + DEPTH = 1 << 1, + STENCIL = 1 << 2, + ALL = COLOR | DEPTH | STENCIL +}; +ENABLE_BITMASK_OPERATORS(ClearFlag) + +enum class RenderTargetFlag : uint8_t +{ + COLOR = 1, + DEPTH = 1 << 1, + STENCIL = 1 << 2, + ALL = COLOR | DEPTH | STENCIL +}; +ENABLE_BITMASK_OPERATORS(RenderTargetFlag) + +// export backend types to cocos2d namespance +using TextureFormat = backend::TextureFormat; +using TextureUsage = backend::TextureUsage; + NS_CC_END // end group /// @} -#endif //__BASE_CCTYPES_H__ diff --git a/cocos/base/ccUTF8.cpp b/cocos/base/ccUTF8.cpp index b4714493f93a..54d585d03f3d 100644 --- a/cocos/base/ccUTF8.cpp +++ b/cocos/base/ccUTF8.cpp @@ -478,133 +478,4 @@ bool StringUTF8::insert(std::size_t pos, const StringUTF8& insertStr) } //namespace StringUtils { -namespace { - inline int wcslen_internal(const unsigned short* str) - { - if (str == nullptr) - return -1; - int i=0; - while(*str++) i++; - return i; - } -} - - -int cc_wcslen(const unsigned short* str) -{ - return wcslen_internal(str); -} - -void cc_utf8_trim_ws(std::vector* str) -{ - if (str == nullptr) - return; - // unsigned short and char16_t are both 2 bytes - std::vector* ret = reinterpret_cast*>(str); - StringUtils::trimUTF16Vector(*ret); -} - -bool isspace_unicode(unsigned short ch) -{ - return StringUtils::isUnicodeSpace(static_cast(ch)); -} - - -bool iscjk_unicode(unsigned short ch) -{ - return StringUtils::isCJKUnicode(static_cast(ch)); -} - - -long cc_utf8_strlen (const char * p, int /*max*/) -{ - if (p == nullptr) - return -1; - return StringUtils::getCharacterCountInUTF8String(p); -} - -unsigned int cc_utf8_find_last_not_char(const std::vector& str, unsigned short c) -{ - std::vector char16Vector; - for (const auto& e : str) - { - char16Vector.push_back(e); - } - - return StringUtils::getIndexOfLastNotChar16(char16Vector, c); -} - -std::vector cc_utf16_vec_from_utf16_str(const unsigned short* str) -{ - std::vector str_new; - - if (str == nullptr) - return str_new; - - int len = wcslen_internal(str); - - for (int i = 0; i < len; ++i) - { - str_new.push_back(str[i]); - } - return str_new; -} - -unsigned short* cc_utf8_to_utf16(const char* str_old, int length/* = -1*/, int* rUtf16Size/* = nullptr*/) -{ - if (str_old == nullptr) - return nullptr; - - unsigned short* ret = nullptr; - - std::u16string outUtf16; - std::string inUtf8 = length == -1 ? std::string(str_old) : std::string(str_old, length); - bool succeed = StringUtils::UTF8ToUTF16(inUtf8, outUtf16); - - if (succeed) - { - ret = new (std::nothrow) unsigned short[outUtf16.length() + 1]; - ret[outUtf16.length()] = 0; - memcpy(ret, outUtf16.data(), outUtf16.length() * sizeof(unsigned short)); - if (rUtf16Size) - { - *rUtf16Size = static_cast(outUtf16.length()); - } - } - - return ret; -} - -char * cc_utf16_to_utf8 (const unsigned short *str, - int len, - long * /*items_read*/, - long * /*items_written*/) -{ - if (str == nullptr) - return nullptr; - - - std::u16string utf16; - int utf16Len = len < 0 ? wcslen_internal(str) : len; - - for (int i = 0; i < utf16Len; ++i) - { - utf16.push_back(str[i]); - } - - char* ret = nullptr; - std::string outUtf8; - bool succeed = StringUtils::UTF16ToUTF8(utf16, outUtf8); - - if (succeed) - { - ret = new (std::nothrow) char[outUtf8.length() + 1]; - ret[outUtf8.length()] = '\0'; - memcpy(ret, outUtf8.data(), outUtf8.length()); - } - - return ret; -} - - NS_CC_END diff --git a/cocos/base/ccUTF8.h b/cocos/base/ccUTF8.h index ac27f627385e..71017252ff9f 100644 --- a/cocos/base/ccUTF8.h +++ b/cocos/base/ccUTF8.h @@ -253,98 +253,6 @@ class CC_DLL StringUTF8 } // namespace StringUtils { -/** - * Returns the character count in UTF16 string. - * @param str Pointer to the start of a UTF-16 encoded string. It must be an NULL terminal UTF8 string. - * @deprecated Please use c++11 `std::u16string::length` instead, don't use `unsigned short*` directly. - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL int cc_wcslen(const unsigned short* str); - -/** Trims the space characters at the end of UTF8 string. - * @deprecated Please use `StringUtils::trimUTF16Vector` instead. - */ - -CC_DEPRECATED_ATTRIBUTE CC_DLL void cc_utf8_trim_ws(std::vector* str); - -/** - * Whether the character is a whitespace character. - * - * @param ch The unicode character. - * @returns Whether the character is a white space character. - * @deprecated Please use `StringUtils::isUnicodeSpace` instead. - * - * @see http://en.wikipedia.org/wiki/Whitespace_character#Unicode - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL bool isspace_unicode(unsigned short ch); - -/** - * Whether the character is a Chinese/Japanese/Korean character. - * - * @param ch The unicode character - * @returns Whether the character is a Chinese character. - * @deprecated Please use `StringUtils::isCJKUnicode` instead. - * - * @see http://www.searchtb.com/2012/04/chinese_encode.html - * @see http://tieba.baidu.com/p/748765987 - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL bool iscjk_unicode(unsigned short ch); - -/** - * Returns the length of the string in characters. - * - * @param p Pointer to the start of a UTF-8 encoded string. It must be an NULL terminal UTF8 string. - * @param max Not used from 3.1, just keep it for backward compatibility. - * @deprecated Please use `StringUtils::getCharacterCountInUTF8String` instead. - * @returns The length of the string in characters. - **/ -CC_DEPRECATED_ATTRIBUTE CC_DLL long cc_utf8_strlen (const char * p, int max = -1); - -/** - * Find the last character that is not equal to the character given. - * - * @param str The string to be searched. - * @param c The character to be searched for. - * @deprecated Please use `StringUtils::getIndexOfLastNotChar16` instead. - * @returns The index of the last character that is not \p c. - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL unsigned int cc_utf8_find_last_not_char(const std::vector& str, unsigned short c); - -/** - * @brief Gets `unsigned short` vector from a given utf16 string. - * @param str A given utf16 string. - * @deprecated Please use `StringUtils::getChar16VectorFromUTF16String` instead. - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL std::vector cc_utf16_vec_from_utf16_str(const unsigned short* str); - -/** - * Creates an utf8 string from a c string. The result will be null terminated. - * - * @param str_old Pointer to the start of a C string. It must be an NULL terminal UTF8 string. - * @param length Not used from 3.1, keep it just for backward compatibility. - * @param rUtf16Size The character count in the return UTF16 string. - * @deprecated Please use `StringUtils::UTF8ToUTF16` instead. - * @returns The newly created utf16 string, it must be released with `delete[]`, - * If an error occurs, %NULL will be returned. - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL unsigned short* cc_utf8_to_utf16(const char* str_old, int length = -1, int* rUtf16Size = nullptr); - -/** - * Converts a string from UTF-16 to UTF-8. The result will be null terminated. - * - * @param utf16 An UTF-16 encoded string, It must be an NULL terminal UTF16 string. - * @param len Not used from 3.1, keep it just for backward compatibility. - * @param items_read Not used from 3.1, keep it just for backward compatibility. - * @param items_written Not used from 3.1, keep it just for backward compatibility. - * @deprecated Please use `StringUtils::UTF16ToUTF8` instead. - * @returns A pointer to a newly allocated UTF-8 string. This value must be - * released with `delete[]`. If an error occurs, %NULL will be returned. - */ -CC_DEPRECATED_ATTRIBUTE CC_DLL char * cc_utf16_to_utf8 (const unsigned short *str, - int len = -1, - long *items_read = nullptr, - long *items_written = nullptr); - - NS_CC_END #endif /** defined(__cocos2dx__ccUTF8__) */ diff --git a/cocos/base/ccUtils.cpp b/cocos/base/ccUtils.cpp index 7d35ab5b7f1f..f9e1e1371b07 100644 --- a/cocos/base/ccUtils.cpp +++ b/cocos/base/ccUtils.cpp @@ -34,10 +34,12 @@ THE SOFTWARE. #include "base/CCAsyncTaskPool.h" #include "base/CCEventDispatcher.h" #include "base/base64.h" +#include "base/ccConstants.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCRenderer.h" #include "renderer/CCTextureCache.h" #include "renderer/CCRenderState.h" +#include "renderer/backend/Types.h" #include "platform/CCImage.h" #include "platform/CCFileUtils.h" @@ -189,7 +191,7 @@ Image* captureNode(Node* startNode, float scale) RenderTexture* finalRtx = nullptr; - auto rtx = RenderTexture::create(size.width, size.height, Texture2D::PixelFormat::RGBA8888, GL_DEPTH24_STENCIL8); + auto rtx = RenderTexture::create(size.width, size.height, Texture2D::PixelFormat::RGBA8888, TextureFormat::D24S8); // rtx->setKeepMatrix(true); Point savedPos = startNode->getPosition(); Point anchor; @@ -211,7 +213,7 @@ Image* captureNode(Node* startNode, float scale) sprite->setAnchorPoint(Point(0, 0)); sprite->setFlippedY(true); - finalRtx = RenderTexture::create(size.width * scale, size.height * scale, Texture2D::PixelFormat::RGBA8888, GL_DEPTH24_STENCIL8); + finalRtx = RenderTexture::create(size.width * scale, size.height * scale, Texture2D::PixelFormat::RGBA8888, TextureFormat::D24S8); sprite->setScale(scale); // or use finalRtx->setKeepMatrix(true); finalRtx->begin(); @@ -527,9 +529,9 @@ LanguageType getLanguageTypeByISO2(const char* code) return ret; } -void setBlending(GLenum sfactor, GLenum dfactor) +void setBlending(backend::BlendFactor sfactor, backend::BlendFactor dfactor) { - if (sfactor == GL_ONE && dfactor == GL_ZERO) + if (sfactor == backend::BlendFactor::ONE && dfactor == backend::BlendFactor::ZERO) { glDisable(GL_BLEND); RenderState::StateBlock::_defaultState->setBlend(false); @@ -537,13 +539,106 @@ void setBlending(GLenum sfactor, GLenum dfactor) else { glEnable(GL_BLEND); - glBlendFunc(sfactor, dfactor); + glBlendFunc(toGLBlendFactor(sfactor), toGLBlendFactor(dfactor)); RenderState::StateBlock::_defaultState->setBlend(true); RenderState::StateBlock::_defaultState->setBlendSrc((RenderState::Blend)sfactor); RenderState::StateBlock::_defaultState->setBlendDst((RenderState::Blend)dfactor); } } + +backend::BlendFactor toBackendBlendFactor(int factor) +{ + switch (factor) { + case GLBlendConst::ONE: + return backend::BlendFactor::ONE; + case GLBlendConst::ZERO: + return backend::BlendFactor::ZERO; + case GLBlendConst::SRC_COLOR: + return backend::BlendFactor::SRC_COLOR; + case GLBlendConst::ONE_MINUS_SRC_COLOR: + return backend::BlendFactor::ONE_MINUS_SRC_COLOR; + case GLBlendConst::SRC_ALPHA: + return backend::BlendFactor::SRC_ALPHA; + case GLBlendConst::ONE_MINUS_SRC_ALPHA: + return backend::BlendFactor::ONE_MINUS_SRC_ALPHA; + case GLBlendConst::DST_COLOR: + return backend::BlendFactor::DST_COLOR; + case GLBlendConst::ONE_MINUS_DST_COLOR: + return backend::BlendFactor::ONE_MINUS_DST_COLOR; + case GLBlendConst::DST_ALPHA: + return backend::BlendFactor::DST_ALPHA; + case GLBlendConst::ONE_MINUS_DST_ALPHA: + return backend::BlendFactor::ONE_MINUS_DST_ALPHA; + case GLBlendConst::SRC_ALPHA_SATURATE: + return backend::BlendFactor::SRC_ALPHA_SATURATE; + case GLBlendConst::BLEND_COLOR: + return backend::BlendFactor::BLEND_CLOLOR; + default: + assert(false); + break; + } + return backend::BlendFactor::ONE; +} + +int toGLBlendFactor(backend::BlendFactor blendFactor) +{ + int ret = GLBlendConst::ONE; + switch (blendFactor) + { + case backend::BlendFactor::ZERO: + ret = GLBlendConst::ZERO; + break; + case backend::BlendFactor::ONE: + ret = GLBlendConst::ONE; + break; + case backend::BlendFactor::SRC_COLOR: + ret = GLBlendConst::SRC_COLOR; + break; + case backend::BlendFactor::ONE_MINUS_SRC_COLOR: + ret = GLBlendConst::ONE_MINUS_SRC_COLOR; + break; + case backend::BlendFactor::SRC_ALPHA: + ret = GLBlendConst::SRC_ALPHA; + break; + case backend::BlendFactor::ONE_MINUS_SRC_ALPHA: + ret = GLBlendConst::ONE_MINUS_SRC_ALPHA; + break; + case backend::BlendFactor::DST_COLOR: + ret = GLBlendConst::DST_COLOR; + break; + case backend::BlendFactor::ONE_MINUS_DST_COLOR: + ret = GLBlendConst::ONE_MINUS_DST_COLOR; + break; + case backend::BlendFactor::DST_ALPHA: + ret = GLBlendConst::DST_ALPHA; + break; + case backend::BlendFactor::ONE_MINUS_DST_ALPHA: + ret = GLBlendConst::ONE_MINUS_DST_ALPHA; + break; + case backend::BlendFactor::SRC_ALPHA_SATURATE: + ret = GLBlendConst::SRC_ALPHA_SATURATE; + break; + case backend::BlendFactor::BLEND_CLOLOR: + ret = GLBlendConst::BLEND_COLOR; + break; + default: + break; + } + return ret; +} + +const Mat4& getAdjustMatrix() +{ + static cocos2d::Mat4 adjustMatrix = { + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 0.5, 0.5, + 0, 0, 0, 1 + }; + + return adjustMatrix; +} } diff --git a/cocos/base/ccUtils.h b/cocos/base/ccUtils.h index a3d11a4872f1..3132addb7c83 100644 --- a/cocos/base/ccUtils.h +++ b/cocos/base/ccUtils.h @@ -31,6 +31,7 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "base/ccMacros.h" #include "base/CCData.h" +#include "renderer/backend/Types.h" /** @file ccUtils.h Misc free functions @@ -189,7 +190,15 @@ namespace utils */ CC_DLL LanguageType getLanguageTypeByISO2(const char* code); - CC_DLL void setBlending(GLenum sfactor, GLenum dfactor); + CC_DLL void setBlending(backend::BlendFactor sfactor, backend::BlendFactor dfactor); + + //TODO: minggo: should remove it. + CC_DLL backend::BlendFactor toBackendBlendFactor(int factor); + + CC_DLL int toGLBlendFactor(backend::BlendFactor blendFactor); + + // Adjust matrix for metal. + CC_DLL const Mat4& getAdjustMatrix(); } NS_CC_END diff --git a/cocos/cocos2d.cpp b/cocos/cocos2d.cpp index 9e3de492d2cc..d7774ff207cb 100644 --- a/cocos/cocos2d.cpp +++ b/cocos/cocos2d.cpp @@ -32,7 +32,7 @@ NS_CC_BEGIN CC_DLL const char* cocos2dVersion() { - return "cocos2d-x-3.17"; + return "cocos2d-x-4.0alpha1"; } NS_CC_END diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 185c4a4d46d1..c195cb2a747a 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -31,7 +31,7 @@ THE SOFTWARE. // 0x00 HI ME LO // 00 03 08 00 -#define COCOS2D_VERSION 0x00031700 +#define COCOS2D_VERSION 0x00040001 // // all cocos2d include files @@ -116,12 +116,9 @@ THE SOFTWARE. #include "2d/CCClippingNode.h" #include "2d/CCClippingRectangleNode.h" #include "2d/CCDrawNode.h" -#include "2d/CCDrawingPrimitives.h" #include "2d/CCFontFNT.h" #include "2d/CCLabel.h" #include "2d/CCLabelAtlas.h" -#include "2d/CCLabelBMFont.h" -#include "2d/CCLabelTTF.h" #include "2d/CCLayer.h" #include "2d/CCMenu.h" #include "2d/CCMenuItem.h" @@ -143,7 +140,6 @@ THE SOFTWARE. // 2d utils #include "2d/CCCamera.h" #include "2d/CCCameraBackgroundBrush.h" -#include "2d/CCGrabber.h" #include "2d/CCGrid.h" #include "2d/CCLight.h" @@ -151,6 +147,7 @@ THE SOFTWARE. #include "base/CCProtocols.h" // renderer +#include "renderer/CCCallbackCommand.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCGLProgram.h" #include "renderer/CCGLProgramCache.h" @@ -159,8 +156,6 @@ THE SOFTWARE. #include "renderer/CCGroupCommand.h" #include "renderer/CCMaterial.h" #include "renderer/CCPass.h" -#include "renderer/CCPrimitive.h" -#include "renderer/CCPrimitiveCommand.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCRenderCommand.h" #include "renderer/CCRenderCommandPool.h" @@ -174,7 +169,6 @@ THE SOFTWARE. #include "renderer/CCVertexAttribBinding.h" #include "renderer/CCVertexIndexBuffer.h" #include "renderer/CCVertexIndexData.h" -#include "renderer/CCFrameBuffer.h" #include "renderer/ccShaders.h" // physics @@ -192,7 +186,6 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #include "platform/CCPlatformMacros.h" #include "platform/CCSAXParser.h" -#include "platform/CCThread.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "platform/ios/CCApplication-ios.h" @@ -211,13 +204,6 @@ THE SOFTWARE. //Enhance modification end #endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) - #include "platform/blackberry/CCApplication.h" - #include "platform/blackberry/CCGLViewImpl.h" - #include "platform/blackberry/CCGL.h" - #include "platform/blackberry/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY - #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "platform/win32/CCApplication-win32.h" #include "platform/desktop/CCGLViewImpl-desktop.h" @@ -239,20 +225,6 @@ THE SOFTWARE. #include "platform/linux/CCStdC-linux.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - #include "platform/winrt/CCApplication.h" - #include "platform/winrt/CCGLViewImpl-winrt.h" - #include "platform/winrt/CCGL.h" - #include "platform/winrt/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) - #include "platform/tizen/CCApplication-tizen.h" - #include "platform/tizen/CCGLViewImpl-tizen.h" - #include "platform/tizen/CCGL-tizen.h" - #include "platform/tizen/CCStdC-tizen.h" -#endif - // script_support #include "base/CCScriptSupport.h" @@ -305,17 +277,6 @@ THE SOFTWARE. #include "3d/CCSprite3DMaterial.h" #include "3d/CCTerrain.h" -// vr -#include "vr/CCVRGenericRenderer.h" - - -// Deprecated -// All deprecated features are include inside deprecated/CCDeprecated.h. -// It is recommended that you just include what is needed. -// eg. #include "deprecated/CCString.h" if you only need cocos2d::__String. -#include "deprecated/CCDeprecated.h" - - NS_CC_BEGIN CC_DLL const char* cocos2dVersion(); diff --git a/cocos/deprecated/CCArray.cpp b/cocos/deprecated/CCArray.cpp deleted file mode 100644 index 1349e55087b9..000000000000 --- a/cocos/deprecated/CCArray.cpp +++ /dev/null @@ -1,773 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "deprecated/CCArray.h" -#include "deprecated/CCString.h" -#include "base/ccUTF8.h" -#include "platform/CCFileUtils.h" - -NS_CC_BEGIN - -#if CC_USE_ARRAY_VECTOR - -// ---------------------------------------------------------------------------------- -// std::vector implementation -// ---------------------------------------------------------------------------------- - -__Array::__Array() -: data(nullptr) -{ - init(); -} - -__Array* __Array::create() -{ - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithCapacity(7)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::createWithObject(Ref* object) -{ - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithObject(object)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::create(Ref* object, ...) -{ - va_list args; - va_start(args,object); - - __Array* array = create(); - if (array && object) - { - array->addObject(object); - Ref* i = va_arg(args, Ref*); - while (i) - { - array->addObject(i); - i = va_arg(args, Ref*); - } - } - else - { - CC_SAFE_DELETE(array); - } - - va_end(args); - - return array; -} - -__Array* __Array::createWithArray(__Array* otherArray) -{ - return otherArray->clone(); -} - -__Array* __Array::createWithCapacity(int capacity) -{ - CCASSERT(capacity>=0, "Invalid capacity"); - - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithCapacity(capacity)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::createWithContentsOfFile(const std::string& fileName) -{ - __Array* ret = __Array::createWithContentsOfFileThreadSafe(fileName); - if (ret != nullptr) - { - ret->autorelease(); - } - return ret; -} - -__Array* __Array::createWithContentsOfFileThreadSafe(const std::string& fileName) -{ - return FileUtils::getInstance()->createArrayWithContentsOfFile(fileName); -} - -bool __Array::init() -{ - return initWithCapacity(7); -} - -bool __Array::initWithObject(Ref* object) -{ - bool ret = initWithCapacity(7); - if (ret) - { - addObject(object); - } - return ret; -} - -/** Initializes an array with some objects */ -bool __Array::initWithObjects(Ref* object, ...) -{ - bool ret = false; - do - { - CC_BREAK_IF(object == nullptr); - - va_list args; - va_start(args, object); - - if (object) - { - this->addObject(object); - Ref* i = va_arg(args, Ref*); - while (i) - { - this->addObject(i); - i = va_arg(args, Ref*); - } - ret = true; - } - va_end(args); - - } while (false); - - return ret; -} - -bool __Array::initWithCapacity(int capacity) -{ - CCASSERT(capacity>=0, "Invalid capacity"); - - data.reserve(capacity); - return true; -} - -bool __Array::initWithArray(__Array* otherArray) -{ - data = otherArray->data; - return true; -} - -ssize_t __Array::getIndexOfObject(Ref* object) const -{ - auto it = data.begin(); - - for (ssize_t i = 0; it != data.end(); ++it, ++i) - { - if (it->get() == object) - { - return i; - } - } - - return -1; -} - -Ref* __Array::getRandomObject() -{ - if (data.size()==0) - { - return nullptr; - } - - float r = CCRANDOM_0_1(); - - if (r == 1) // to prevent from accessing data-arr[data->num], out of range. - { - r = 0; - } - - r *= data.size(); - - return data[r].get(); -} - -bool __Array::containsObject(Ref* object) const -{ - ssize_t i = this->getIndexOfObject(object); - return (i >= 0); -} - -bool __Array::isEqualToArray(__Array* otherArray) -{ - for (ssize_t i = 0; i < this->count(); ++i) - { - if (!this->getObjectAtIndex(i)->isEqual(otherArray->getObjectAtIndex(i))) - { - return false; - } - } - return true; -} - -void __Array::addObject(Ref* object) -{ - data.push_back(RCPtr(object)); -} - -void __Array::addObjectsFromArray(__Array* otherArray) -{ - data.insert(data.end(), otherArray->data.begin(), otherArray->data.end()); -} - -void __Array::insertObject(Ref* object, int index) -{ - data.insert(std::begin(data) + index, RCPtr(object)); -} - -void __Array::setObject(Ref* object, int index) -{ - data[index] = RCPtr(object); -} - -void __Array::removeLastObject(bool releaseObj) -{ - CCASSERT(data.size(), "no objects added"); - data.pop_back(); -} - -void __Array::removeObject(Ref* object, bool releaseObj /* ignored */) -{ - data.erase(std::remove(data.begin(), data.end(), object)); -} - -void __Array::removeObjectAtIndex(ssize_t index, bool releaseObj /* ignored */) -{ - auto obj = data[index]; - data.erase(data.begin() + index); -} - -void __Array::removeObjectsInArray(__Array* otherArray) -{ - CCASSERT(false, "not implemented"); -} - -void __Array::removeAllObjects() -{ - data.erase(std::begin(data), std::end(data)); -} - -void __Array::fastRemoveObjectAtIndex(int index) -{ - removeObjectAtIndex(index); -} - -void __Array::fastRemoveObject(Ref* object) -{ - removeObject(object); -} - -void __Array::exchangeObject(Ref* object1, Ref* object2) -{ - ssize_t idx1 = getIndexOfObject(object1); - ssize_t idx2 = getIndexOfObject(object2); - - CCASSERT(idx1 >= 0 && idx2 >= 2, "invalid object index"); - - std::swap(data[idx1], data[idx2]); -} - -void __Array::exchangeObjectAtIndex(ssize_t index1, ssize_t index2) -{ - std::swap(data[index1], data[index2]); -} - -void __Array::replaceObjectAtIndex(int index, Ref* object, bool releaseObject /* ignored */) -{ - data[index] = object; -} - -void __Array::reverseObjects() -{ - std::reverse(std::begin(data), std::end(data)); -} - -void __Array::reduceMemoryFootprint() -{ - // N/A -} - -__Array::~Array() -{ - CCLOGINFO("deallocing Array: %p - len: %d", this, count() ); -} - -__Array* __Array::clone() const -{ - __Array* ret = new (std::nothrow) __Array(); - ret->autorelease(); - ret->initWithCapacity(this->data.size() > 0 ? this->data.size() : 1); - - Ref* obj = nullptr; - Ref* tmpObj = nullptr; - Clonable* clonable = nullptr; - const __Array* self( this ); - CCARRAY_FOREACH(self, obj) - { - clonable = dynamic_cast(obj); - if (clonable) - { - tmpObj = dynamic_cast(clonable->clone()); - if (tmpObj) - { - ret->addObject(tmpObj); - } - } - else - { - CCLOGWARN("%s isn't clonable.", typeid(*obj).name()); - } - } - return ret; -} - -void __Array::acceptVisitor(DataVisitor &visitor) -{ - visitor.visit(this); -} - -// ---------------------------------------------------------------------------------- -// ccArray implementation -// ---------------------------------------------------------------------------------- - -#else - -__Array::__Array() -: data(nullptr) -{ -// init(); -} - -__Array* __Array::create() -{ - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithCapacity(7)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::createWithObject(Ref* object) -{ - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithObject(object)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::create(Ref* object, ...) -{ - va_list args; - va_start(args,object); - - __Array* array = create(); - if (array && object) - { - array->addObject(object); - Ref *i = va_arg(args, Ref*); - while (i) - { - array->addObject(i); - i = va_arg(args, Ref*); - } - } - else - { - CC_SAFE_DELETE(array); - } - - va_end(args); - - return array; -} - -__Array* __Array::createWithArray(__Array* otherArray) -{ - return otherArray->clone(); -} - -__Array* __Array::createWithCapacity(ssize_t capacity) -{ - CCASSERT(capacity>=0, "Invalid capacity"); - - __Array* array = new (std::nothrow) __Array(); - - if (array && array->initWithCapacity(capacity)) - { - array->autorelease(); - } - else - { - CC_SAFE_DELETE(array); - } - - return array; -} - -__Array* __Array::createWithContentsOfFile(const std::string& fileName) -{ - __Array* ret = __Array::createWithContentsOfFileThreadSafe(fileName); - if (ret != nullptr) - { - ret->autorelease(); - } - return ret; -} - -__Array* __Array::createWithContentsOfFileThreadSafe(const std::string& fileName) -{ - ValueVector arr = FileUtils::getInstance()->getValueVectorFromFile(fileName); - - __Array* ret = __Array::createWithCapacity(static_cast(arr.size())); - - for(const auto &value : arr) { - ret->addObject(__String::create(value.asString())); - } - - return ret; -} - -bool __Array::init() -{ - CCASSERT(!data, "Array cannot be re-initialized"); - - return initWithCapacity(7); -} - -bool __Array::initWithObject(Ref* object) -{ - CCASSERT(!data, "Array cannot be re-initialized"); - - bool ret = initWithCapacity(7); - if (ret) - { - addObject(object); - } - return ret; -} - -/** Initializes an array with some objects */ -bool __Array::initWithObjects(Ref* object, ...) -{ - CCASSERT(!data, "Array cannot be re-initialized"); - - bool ret = false; - do - { - CC_BREAK_IF(object == nullptr); - CC_BREAK_IF(!initWithCapacity(1)); - - va_list args; - va_start(args, object); - - if (object) - { - this->addObject(object); - Ref* i = va_arg(args, Ref*); - while (i) - { - this->addObject(i); - i = va_arg(args, Ref*); - } - ret = true; - } - va_end(args); - - } while (false); - - return ret; -} - -bool __Array::initWithCapacity(ssize_t capacity) -{ - CCASSERT(capacity>=0 && !data, "Array cannot be re-initialized"); - - data = ccArrayNew(capacity); - return true; -} - -bool __Array::initWithArray(__Array* otherArray) -{ - CCASSERT(!data, "Array cannot be re-initialized"); - - bool ret = false; - do - { - CC_BREAK_IF(! initWithCapacity(otherArray->data->num)); - - addObjectsFromArray(otherArray); - ret = true; - } while (0); - - return ret; -} - -ssize_t __Array::getIndexOfObject(Ref* object) const -{ - return ccArrayGetIndexOfObject(data, object); -} - -Ref* __Array::getRandomObject() -{ - if (data->num == 0) - { - return nullptr; - } - - float r = CCRANDOM_0_1(); - - if (r == 1) // to prevent from accessing data-arr[data->num], out of range. - { - r = 0; - } - - return data->arr[static_cast(data->num * r)]; -} - -bool __Array::containsObject(Ref* object) const -{ - return ccArrayContainsObject(data, object); -} - -bool __Array::isEqualToArray(__Array* otherArray) -{ - for (int i = 0; i < this->count(); ++i) - { -//FIXME:james - if (this->getObjectAtIndex(i) != otherArray->getObjectAtIndex(i)) - { - return false; - } - } - return true; -} - -void __Array::addObject(Ref* object) -{ - CCASSERT(data, "Array not initialized"); - ccArrayAppendObjectWithResize(data, object); -} - -void __Array::addObjectsFromArray(__Array* otherArray) -{ - CCASSERT(data, "Array not initialized"); - ccArrayAppendArrayWithResize(data, otherArray->data); -} - -void __Array::insertObject(Ref* object, ssize_t index) -{ - CCASSERT(data, "Array not initialized"); - ccArrayInsertObjectAtIndex(data, object, index); -} - -void __Array::setObject(Ref* object, ssize_t index) -{ - CCASSERT(index >= 0 && index < count(), "Invalid index"); - - if (object != data->arr[index]) - { - data->arr[index]->release(); - data->arr[index] = object; - object->retain(); - } -} - -void __Array::removeLastObject(bool releaseObj) -{ - CCASSERT(data->num, "no objects added"); - ccArrayRemoveObjectAtIndex(data, data->num - 1, releaseObj); -} - -void __Array::removeObject(Ref* object, bool releaseObj/* = true*/) -{ - ccArrayRemoveObject(data, object, releaseObj); -} - -void __Array::removeObjectAtIndex(ssize_t index, bool releaseObj) -{ - ccArrayRemoveObjectAtIndex(data, index, releaseObj); -} - -void __Array::removeObjectsInArray(__Array* otherArray) -{ - ccArrayRemoveArray(data, otherArray->data); -} - -void __Array::removeAllObjects() -{ - ccArrayRemoveAllObjects(data); -} - -void __Array::fastRemoveObjectAtIndex(ssize_t index) -{ - ccArrayFastRemoveObjectAtIndex(data, index); -} - -void __Array::fastRemoveObject(Ref* object) -{ - ccArrayFastRemoveObject(data, object); -} - -void __Array::exchangeObject(Ref* object1, Ref* object2) -{ - auto index1 = ccArrayGetIndexOfObject(data, object1); - if (index1 == CC_INVALID_INDEX) - { - return; - } - - auto index2 = ccArrayGetIndexOfObject(data, object2); - if (index2 == CC_INVALID_INDEX) - { - return; - } - - ccArraySwapObjectsAtIndexes(data, index1, index2); -} - -void __Array::exchangeObjectAtIndex(ssize_t index1, ssize_t index2) -{ - ccArraySwapObjectsAtIndexes(data, index1, index2); -} - -void __Array::replaceObjectAtIndex(ssize_t index, Ref* object, bool releaseObject/* = true*/) -{ - ccArrayInsertObjectAtIndex(data, object, index); - ccArrayRemoveObjectAtIndex(data, index + 1, releaseObject); -} - -void __Array::reverseObjects() -{ - if (data->num > 1) - { - // floorf(), since in the case of an even number, the number of swaps stays the same - auto count = static_cast(floorf(data->num/2.f)); - ssize_t maxIndex = data->num - 1; - - for (ssize_t i = 0; i < count ; ++i) - { - ccArraySwapObjectsAtIndexes(data, i, maxIndex); - --maxIndex; - } - } -} - -void __Array::reduceMemoryFootprint() -{ - ccArrayShrink(data); -} - -__Array::~__Array() -{ - CCLOGINFO("deallocing Array: %p - len: %d", this, count() ); - - ccArrayFree(data); -} - -__Array* __Array::clone() const -{ - __Array* ret = new (std::nothrow) __Array(); - ret->autorelease(); - ret->initWithCapacity(this->data->num > 0 ? this->data->num : 1); - - if (data->num <= 0) { - return ret; - } - - Ref* obj = nullptr; - Ref* tmpObj = nullptr; - Clonable* clonable = nullptr; - CC_ASSERT(data->num > 0); - for (Ref** arr = data->arr, **end = data->arr + data->num - 1; - arr <= end && ((obj = *arr) != nullptr); arr++) - { - clonable = dynamic_cast(obj); - if (clonable) - { - tmpObj = dynamic_cast(clonable->clone()); - if (tmpObj) - { - ret->addObject(tmpObj); - } - } - else - { - CCLOGWARN("%s isn't clonable.", typeid(*obj).name()); - } - } - return ret; -} - -void __Array::acceptVisitor(DataVisitor &visitor) -{ - visitor.visit(this); -} - -#endif // uses ccArray - -NS_CC_END diff --git a/cocos/deprecated/CCArray.h b/cocos/deprecated/CCArray.h deleted file mode 100644 index 0e08c36cc6a1..000000000000 --- a/cocos/deprecated/CCArray.h +++ /dev/null @@ -1,563 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCARRAY_H__ -#define __CCARRAY_H__ -/// @cond DO_NOT_SHOW - -#define CC_USE_ARRAY_VECTOR 0 - -#if CC_USE_ARRAY_VECTOR -#include -#include -#include "base/CCRef.h" -#include "base/ccMacros.h" -#else -#include "base/ccCArray.h" -#endif - -#include "base/CCDataVisitor.h" - -#if CC_USE_ARRAY_VECTOR -/** - * A reference counting-managed pointer for classes derived from RCBase which can - * be used as C pointer - * Original code: http://www.codeproject.com/Articles/64111/Building-a-Quick-and-Handy-Reference-Counting-Clas - * License: http://www.codeproject.com/info/cpol10.aspx - */ -template < class T > -class RCPtr -{ -public: - //Construct using a C pointer - //e.g. RCPtr< T > x = new (std::nothrow) T(); - RCPtr(T* ptr = nullptr) - : _ptr(ptr) - { - if(ptr != nullptr) {ptr->retain();} - } - - //Copy constructor - RCPtr(const RCPtr &ptr) - : _ptr(ptr._ptr) - { -// printf("Array: copy constructor: %p\n", this); - if(_ptr != NULL) {_ptr->retain();} - } - - //Move constructor - RCPtr(RCPtr &&ptr) - : _ptr(ptr._ptr) - { -// printf("Array: Move Constructor: %p\n", this); - ptr._ptr = nullptr; - } - - ~RCPtr() - { -// printf("Array: Destructor: %p\n", this); - if(_ptr != nullptr) {_ptr->release();} - } - - //Assign a pointer - //e.g. x = new (std::nothrow) T(); - RCPtr &operator=(T* ptr) - { -// printf("Array: operator= T*: %p\n", this); - - //The following grab and release operations have to be performed - //in that order to handle the case where ptr == _ptr - //(See comment below by David Garlisch) - if(ptr != nullptr) {ptr->retain();} - if(_ptr != nullptr) {_ptr->release();} - _ptr = ptr; - return (*this); - } - - //Assign another RCPtr - RCPtr &operator=(const RCPtr &ptr) - { -// printf("Array: operator= const&: %p\n", this); - return (*this) = ptr._ptr; - } - - //Retrieve actual pointer - T* get() const - { - return _ptr; - } - - //Some overloaded operators to facilitate dealing with an RCPtr - //as a conventional C pointer. - //Without these operators, one can still use the less transparent - //get() method to access the pointer. - T* operator->() const {return _ptr;} //x->member - T &operator*() const {return *_ptr;} //*x, (*x).member - explicit operator T*() const {return _ptr;} //T* y = x; - explicit operator bool() const {return _ptr != nullptr;} //if(x) {/*x is not NULL*/} - bool operator==(const RCPtr &ptr) {return _ptr == ptr._ptr;} - bool operator==(const T *ptr) {return _ptr == ptr;} - -private: - T *_ptr; //Actual pointer -}; -#endif // CC_USE_ARRAY_VECTOR - - -/** - * @addtogroup data_structures - * @{ - */ - -/** @def CCARRAY_FOREACH -A convenience macro to iterate over a Array using. It is faster than the "fast enumeration" interface. -@since v0.99.4 -*/ - -/* -In cocos2d-iphone 1.0.0, This macro have been update to like this: - -#define CCARRAY_FOREACH(__array__, __object__) \ -if (__array__ && __array__->data->num > 0) \ -for(id *__arr__ = __array__->data->arr, *end = __array__->data->arr + __array__->data->num-1; \ -__arr__ <= end && ((__object__ = *__arr__) != nil || true); \ -__arr__++) - -I found that it's not work in C++. So it keep what it's look like in version 1.0.0-rc3. ---By Bin -*/ - -#if CC_USE_ARRAY_VECTOR -#define CCARRAY_FOREACH(__array__, __object__) \ - if (__array__) \ - for( auto __it__ = (__array__)->data.begin(); \ - __it__ != (__array__)->data.end() && ((__object__) = __it__->get()) != nullptr; \ - ++__it__) - - -#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \ - if (__array__) \ - for( auto __it__ = (__array__)->data.rbegin(); \ - __it__ != (__array__)->data.rend() && ((__object__) = __it__->get()) != nullptr; \ - ++__it__ ) - - -#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0) - -#else // ! CC_USE_ARRAY_VECTOR -------------------------- - -#define CCARRAY_FOREACH(__array__, __object__) \ - if ((__array__) && (__array__)->data->num > 0) \ - for(Ref** __arr__ = (__array__)->data->arr, **__end__ = (__array__)->data->arr + (__array__)->data->num-1; \ - __arr__ <= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ - __arr__++) - -#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \ - if ((__array__) && (__array__)->data->num > 0) \ - for(Ref** __arr__ = (__array__)->data->arr + (__array__)->data->num-1, **__end__ = (__array__)->data->arr; \ - __arr__ >= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ - __arr__--) - -#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0) -#define CCARRAY_VERIFY_TYPE(__array__, __type__) \ - do { \ - if ((__array__) && (__array__)->data->num > 0) \ - for(Ref** __arr__ = (__array__)->data->arr, \ - **__end__ = (__array__)->data->arr + (__array__)->data->num-1; __arr__ <= __end__; __arr__++) \ - CCASSERT(dynamic_cast<__type__>(*__arr__), "element type is wrong!"); \ - } while(false) -#else -#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0) -#endif - -#endif // ! CC_USE_ARRAY_VECTOR - - -// Common defines ----------------------------------------------------------------------------------------------- - -#define arrayMakeObjectsPerformSelector(pArray, func, elementType) \ -do { \ - if(pArray && pArray->count() > 0) \ - { \ - Ref* child; \ - CCARRAY_FOREACH(pArray, child) \ - { \ - elementType pNode = static_cast(child); \ - if(pNode) \ - { \ - pNode->func(); \ - } \ - } \ - } \ -} \ -while(false) - -#define arrayMakeObjectsPerformSelectorWithObject(pArray, func, object, elementType) \ -do { \ - if(pArray && pArray->count() > 0) \ - { \ - Ref* child; \ - CCARRAY_FOREACH(pArray, child) \ - { \ - elementType pNode = static_cast(child); \ - if(pNode) \ - { \ - pNode->func(object); \ - } \ - } \ - } \ -} \ -while(false) - - -NS_CC_BEGIN - -class CC_DLL __Array : public Ref, public Clonable -{ -public: - - /** Creates an empty array. Default capacity is 10 - * @js NA - * @lua NA - */ - static __Array* create(); - /** Create an array with objects - * @js NA - */ - static __Array* create(Ref* object, ...) CC_REQUIRES_NULL_TERMINATION; - /** Create an array with one object - * @js NA - */ - static __Array* createWithObject(Ref* object); - /** Create an array with a default capacity - * @js NA - */ - static __Array* createWithCapacity(ssize_t capacity); - /** Create an array with from an existing array - * @js NA - */ - static __Array* createWithArray(__Array* otherArray); - /** - @brief Generate a Array pointer by file - @param pFileName The file name of *.plist file - @return The Array pointer generated from the file - * @js NA - */ - static __Array* createWithContentsOfFile(const std::string& pFileName); - - /* - @brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the - invoker should call release(). - * @js NA - * @lua NA - */ - static __Array* createWithContentsOfFileThreadSafe(const std::string& pFileName); - /** - * @js NA - * @lua NA - */ - ~__Array(); - - /** Initializes an array - * @js NA - * @lua NA - */ - bool init(); - /** Initializes an array with one object - * @js NA - * @lua NA - */ - bool initWithObject(Ref* object); - /** Initializes an array with some objects - * @js NA - * @lua NA - */ - bool initWithObjects(Ref* object, ...) CC_REQUIRES_NULL_TERMINATION; - /** Initializes an array with capacity - * @js NA - * @lua NA - */ - bool initWithCapacity(ssize_t capacity); - /** Initializes an array with an existing array - * @js NA - * @lua NA - */ - bool initWithArray(__Array* otherArray); - - // Querying an Array - - /** Returns element count of the array - * @js NA - */ - ssize_t count() const - { -#if CC_USE_ARRAY_VECTOR - return data.size(); -#else - return data->num; -#endif - } - /** Returns capacity of the array - * @js NA - */ - ssize_t capacity() const - { -#if CC_USE_ARRAY_VECTOR - return data.capacity(); -#else - return data->max; -#endif - } - /** Returns index of a certain object, return UINT_MAX if doesn't contain the object - * @js NA - * @lua NA - */ - ssize_t getIndexOfObject(Ref* object) const; - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE ssize_t indexOfObject(Ref* object) const { return getIndexOfObject(object); } - - /** Returns an element with a certain index - * @js NA - * @lua NA - */ - Ref* getObjectAtIndex(ssize_t index) - { - CCASSERT(index>=0 && index < count(), "index out of range in getObjectAtIndex()"); -#if CC_USE_ARRAY_VECTOR - return data[index].get(); -#else - return data->arr[index]; -#endif - } - CC_DEPRECATED_ATTRIBUTE Ref* objectAtIndex(ssize_t index) { return getObjectAtIndex(index); } - /** Returns the last element of the array - * @js NA - */ - Ref* getLastObject() - { -#if CC_USE_ARRAY_VECTOR - return data.back().get(); -#else - if(data->num > 0) - return data->arr[data->num-1]; - - return nullptr; -#endif - } - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE Ref* lastObject() { return getLastObject(); } - /** Returns a random element - * @js NA - * @lua NA - */ - Ref* getRandomObject(); - /** - * @js NA - */ - CC_DEPRECATED_ATTRIBUTE Ref* randomObject() { return getRandomObject(); } - /** Returns a Boolean value that indicates whether object is present in array. - * @js NA - */ - bool containsObject(Ref* object) const; - /** @since 1.1 - * @js NA - */ - bool isEqualToArray(__Array* otherArray); - // Adding Objects - - /** Add a certain object - * @js NA - */ - void addObject(Ref* object); - /** - * @js NA - */ - /** Add all elements of an existing array - * @js NA - */ - void addObjectsFromArray(__Array* otherArray); - /** Insert a certain object at a certain index - * @js NA - */ - void insertObject(Ref* object, ssize_t index); - /** sets a certain object at a certain index - * @js NA - * @lua NA - */ - void setObject(Ref* object, ssize_t index); - /** sets a certain object at a certain index without retaining. Use it with caution - * @js NA - * @lua NA - */ - void fastSetObject(Ref* object, ssize_t index) - { -#if CC_USE_ARRAY_VECTOR - setObject(object, index); -#else - // no retain - data->arr[index] = object; -#endif - } - /** - * @js NA - * @lua NA - */ - void swap( ssize_t indexOne, ssize_t indexTwo ) - { - CCASSERT(indexOne >=0 && indexOne < count() && indexTwo >= 0 && indexTwo < count(), "Invalid indices"); -#if CC_USE_ARRAY_VECTOR - std::swap(data[indexOne], data[indexTwo]); -#else - std::swap(data->arr[indexOne], data->arr[indexTwo]); -#endif - } - - // Removing Objects - - /** Remove last object - * @js NA - */ - void removeLastObject(bool releaseObj = true); - /** Remove a certain object - * @js NA - */ - void removeObject(Ref* object, bool releaseObj = true); - /** Remove an element with a certain index - * @js NA - */ - void removeObjectAtIndex(ssize_t index, bool releaseObj = true); - /** Remove all elements - * @js NA - */ - void removeObjectsInArray(__Array* otherArray); - /** Remove all objects - * @js NA - */ - void removeAllObjects(); - /** Fast way to remove a certain object - * @js NA - */ - void fastRemoveObject(Ref* object); - /** Fast way to remove an element with a certain index - * @js NA - */ - void fastRemoveObjectAtIndex(ssize_t index); - - // Rearranging Content - - /** Swap two elements - * @js NA - */ - void exchangeObject(Ref* object1, Ref* object2); - /** Swap two elements with certain indexes - * @js NA - */ - void exchangeObjectAtIndex(ssize_t index1, ssize_t index2); - - /** Replace object at index with another object. - * @js NA - */ - void replaceObjectAtIndex(ssize_t index, Ref* object, bool releaseObject = true); - - /** Revers the array - * @js NA - */ - void reverseObjects(); - /* Shrinks the array so the memory footprint corresponds with the number of items - * @js NA - */ - void reduceMemoryFootprint(); - - /* override functions - * @js NA - */ - virtual void acceptVisitor(DataVisitor &visitor); - /** - * @js NA - * @lua NA - */ - virtual __Array* clone() const override; - - // ------------------------------------------ - // Iterators - // ------------------------------------------ -#if CC_USE_ARRAY_VECTOR - typedef std::vector>::iterator iterator; - typedef std::vector>::const_iterator const_iterator; - /** - * @js NA - * @lua NA - */ - iterator begin() { return data.begin(); } - /** - * @js NA - * @lua NA - */ - iterator end() { return data.end(); } - const_iterator cbegin() { return data.cbegin(); } - /** - * @js NA - * @lua NA - */ - const_iterator cend() { return data.cend(); } - - std::vector> data; - -#else - /** - * @js NA - * @lua NA - */ - Ref** begin() { return &data->arr[0]; } - /** - * @js NA - * @lua NA - */ - Ref** end() { return &data->arr[data->num]; } - - ccArray* data; - -#endif - -//protected: - /** - * @js NA - * @lua NA - */ - __Array(); -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif // __CCARRAY_H__ diff --git a/cocos/deprecated/CCBool.h b/cocos/deprecated/CCBool.h deleted file mode 100644 index c832443aced7..000000000000 --- a/cocos/deprecated/CCBool.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCBOOL_H__ -#define __CCBOOL_H__ -/// @cond DO_NOT_SHOW - -#include "base/CCRef.h" -#include "base/CCDataVisitor.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CC_DLL __Bool : public Ref, public Clonable -{ -public: - __Bool(bool v) - : _value(v) {} - bool getValue() const {return _value;} - - static __Bool* create(bool v) - { - __Bool* pRet = new (std::nothrow) __Bool(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } - - virtual __Bool* clone() const override - { - return __Bool::create(_value); - } -private: - bool _value; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif /* __CCBOOL_H__ */ diff --git a/cocos/deprecated/CCDeprecated.cpp b/cocos/deprecated/CCDeprecated.cpp deleted file mode 100644 index 45378c9f9688..000000000000 --- a/cocos/deprecated/CCDeprecated.cpp +++ /dev/null @@ -1,610 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#include "deprecated/CCDeprecated.h" - -#include "platform/CCPlatformMacros.h" -#include "math/Vec2.h" -#include "math/CCGeometry.h" -#include "base/ccTypes.h" -#include "renderer/CCGLProgram.h" -#include "2d/CCDrawingPrimitives.h" -#include "base/CCDirector.h" - - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -NS_CC_BEGIN - -const Vec2 CCPointZero; - -/* The "zero" size -- equivalent to Size(0, 0). */ -const Size CCSizeZero = Size::ZERO; - -/* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */ -const Rect CCRectZero = Rect::ZERO; - - -const Color3B ccWHITE = Color3B::WHITE; -const Color3B ccYELLOW = Color3B::YELLOW; -const Color3B ccGREEN = Color3B::GREEN; -const Color3B ccBLUE = Color3B::BLUE; -const Color3B ccRED = Color3B::RED; -const Color3B ccMAGENTA = Color3B::MAGENTA; -const Color3B ccBLACK = Color3B::BLACK; -const Color3B ccORANGE = Color3B::ORANGE; -const Color3B ccGRAY = Color3B::GRAY; - -const BlendFunc kCCBlendFuncDisable = BlendFunc::DISABLE; - -const char* kCCShader_PositionTextureColor = GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR; -const char* kCCShader_PositionTextureColorAlphaTest = GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST; -const char* kCCShader_PositionColor = GLProgram::SHADER_NAME_POSITION_COLOR; -const char* kCCShader_PositionTexture = GLProgram::SHADER_NAME_POSITION_TEXTURE; -const char* kCCShader_PositionTexture_uColor = GLProgram::SHADER_NAME_POSITION_TEXTURE_U_COLOR; -const char* kCCShader_PositionTextureA8Color = GLProgram::SHADER_NAME_POSITION_TEXTURE_A8_COLOR; -const char* kCCShader_Position_uColor = GLProgram::SHADER_NAME_POSITION_U_COLOR; -const char* kCCShader_PositionLengthTexureColor = GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR; - -// uniform names -const char* kCCUniformPMatrix_s = GLProgram::UNIFORM_NAME_P_MATRIX; -const char* kCCUniformMVMatrix_s = GLProgram::UNIFORM_NAME_MV_MATRIX; -const char* kCCUniformMVPMatrix_s = GLProgram::UNIFORM_NAME_MVP_MATRIX; -const char* kCCUniformTime_s = GLProgram::UNIFORM_NAME_TIME; -const char* kCCUniformSinTime_s = GLProgram::UNIFORM_NAME_SIN_TIME; -const char* kCCUniformCosTime_s = GLProgram::UNIFORM_NAME_COS_TIME; -const char* kCCUniformRandom01_s = GLProgram::UNIFORM_NAME_RANDOM01; -const char* kCCUniformSampler_s = GLProgram::UNIFORM_NAME_SAMPLER0; -const char* kCCUniformAlphaTestValue = GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE; - -// Attribute names -const char* kCCAttributeNameColor = GLProgram::ATTRIBUTE_NAME_COLOR; -const char* kCCAttributeNamePosition = GLProgram::ATTRIBUTE_NAME_POSITION; -const char* kCCAttributeNameTexCoord = GLProgram::ATTRIBUTE_NAME_TEX_COORD; - -void ccDrawInit() -{ - DrawPrimitives::init(); -} - -void ccDrawFree() -{ -//it will crash clang static analyzer so hide it if __clang_analyzer__ defined -#ifndef __clang_analyzer__ - DrawPrimitives::free(); -#endif -} - -void ccDrawPoint( const Vec2& point ) -{ - DrawPrimitives::drawPoint(point); -} - -void ccDrawPoints( const Vec2 *points, unsigned int numberOfPoints ) -{ - DrawPrimitives::drawPoints(points, numberOfPoints); -} - -void ccDrawLine( const Vec2& origin, const Vec2& destination ) -{ - DrawPrimitives::drawLine(origin, destination); -} - -void ccDrawRect( Vec2 origin, Vec2 destination ) -{ - DrawPrimitives::drawRect(origin, destination); -} - -void ccDrawSolidRect( Vec2 origin, Vec2 destination, Color4F color ) -{ - DrawPrimitives::drawSolidRect(origin, destination, color); -} - -void ccDrawPoly( const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon ) -{ - DrawPrimitives::drawPoly(vertices, numOfVertices, closePolygon); -} - -void ccDrawSolidPoly( const Vec2 *poli, unsigned int numberOfPoints, Color4F color ) -{ - DrawPrimitives::drawSolidPoly(poli, numberOfPoints, color); -} - -void ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY) -{ - DrawPrimitives::drawCircle(center, radius, angle, segments, drawLineToCenter, scaleX, scaleY); -} - -void ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter) -{ - DrawPrimitives::drawCircle(center, radius, angle, segments, drawLineToCenter); -} - -void ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY) -{ - DrawPrimitives::drawSolidCircle(center, radius, angle, segments, scaleX, scaleY); -} - -void ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments) -{ - DrawPrimitives::drawSolidCircle(center, radius, angle, segments); -} - -void ccDrawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments) -{ - DrawPrimitives::drawQuadBezier(origin, control, destination, segments); -} - -void ccDrawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments) -{ - DrawPrimitives::drawCubicBezier(origin, control1, control2, destination, segments); -} - -void ccDrawCatmullRom( PointArray *arrayOfControlPoints, unsigned int segments ) -{ - DrawPrimitives::drawCatmullRom(arrayOfControlPoints, segments); -} - -void ccDrawCardinalSpline( PointArray *config, float tension, unsigned int segments ) -{ - DrawPrimitives::drawCardinalSpline(config, tension, segments); -} - -void ccDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) -{ - DrawPrimitives::setDrawColor4B(r, g, b, a); -} - -void ccDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) -{ - DrawPrimitives::setDrawColor4F(r, g, b, a); -} - -void ccPointSize( GLfloat pointSize ) -{ - DrawPrimitives::setPointSize(pointSize); -} - -MATRIX_STACK_TYPE currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW; - -void CC_DLL kmGLFreeAll(void) -{ - Director::getInstance()->resetMatrixStack(); -} - -void CC_DLL kmGLPushMatrix(void) -{ - Director::getInstance()->pushMatrix(currentActiveStackType); -} - -void CC_DLL kmGLPopMatrix(void) -{ - Director::getInstance()->popMatrix(currentActiveStackType); -} - -void CC_DLL kmGLMatrixMode(unsigned int mode) -{ - if(KM_GL_MODELVIEW == mode) - currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW; - else if(KM_GL_PROJECTION == mode) - currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION; - else if(KM_GL_TEXTURE == mode) - currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE; - else - { - CC_ASSERT(false); - } -} - -void CC_DLL kmGLLoadIdentity(void) -{ - Director::getInstance()->loadIdentityMatrix(currentActiveStackType); -} - -void CC_DLL kmGLLoadMatrix(const Mat4* pIn) -{ - Director::getInstance()->loadMatrix(currentActiveStackType, *pIn); -} - -void CC_DLL kmGLMultMatrix(const Mat4* pIn) -{ - Director::getInstance()->multiplyMatrix(currentActiveStackType, *pIn); -} - -void CC_DLL kmGLTranslatef(float x, float y, float z) -{ - Mat4 mat; - Mat4::createTranslation(Vec3(x, y, z), &mat); - Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); -} - -void CC_DLL kmGLRotatef(float angle, float x, float y, float z) -{ - Mat4 mat; - Mat4::createRotation(Vec3(x, y, z), angle, &mat); - Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); -} - -void CC_DLL kmGLScalef(float x, float y, float z) -{ - Mat4 mat; - Mat4::createScale(x, y, z, &mat); - Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); -} - -void CC_DLL kmGLGetMatrix(unsigned int mode, Mat4* pOut) -{ - if(KM_GL_MODELVIEW == mode) - *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - else if(KM_GL_PROJECTION == mode) - *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - else if(KM_GL_TEXTURE == mode) - *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE); - else - { - CC_ASSERT(false); - } -} - -Mat4* kmMat4Fill(Mat4* pOut, const float* pMat) -{ - pOut->set(pMat); - return pOut; -} - -Mat4* kmMat4Assign(Mat4* pOut, const Mat4* pIn) -{ - pOut->set(pIn->m); - return pOut; -} - -Mat4* kmMat4Identity(Mat4* pOut) -{ - *pOut = Mat4::IDENTITY; - return pOut; -} - -Mat4* kmMat4Inverse(Mat4* pOut, const Mat4* pM) -{ - *pOut = pM->getInversed(); - return pOut; -} - -Mat4* kmMat4Transpose(Mat4* pOut, const Mat4* pIn) -{ - *pOut = pIn->getTransposed(); - return pOut; -} - -Mat4* kmMat4Multiply(Mat4* pOut, const Mat4* pM1, const Mat4* pM2) -{ - *pOut = (*pM1) * (*pM2); - return pOut; -} - -Mat4* kmMat4Translation(Mat4* pOut, const float x, const float y, const float z) -{ - Mat4::createTranslation(x, y, z, pOut); - return pOut; -} - -Mat4* kmMat4RotationX(Mat4* pOut, const float radians) -{ - Mat4::createRotationX(radians, pOut); - return pOut; -} - -Mat4* kmMat4RotationY(Mat4* pOut, const float radians) -{ - Mat4::createRotationY(radians, pOut); - return pOut; -} - -Mat4* kmMat4RotationZ(Mat4* pOut, const float radians) -{ - Mat4::createRotationZ(radians, pOut); - return pOut; -} - -Mat4* kmMat4RotationAxisAngle(Mat4* pOut, const Vec3* axis, float radians) -{ - Mat4::createRotation(*axis, radians, pOut); - return pOut; -} - -Mat4* kmMat4Scaling(Mat4* pOut, const float x, const float y, const float z) -{ - Mat4::createScale(x, y, z, pOut); - return pOut; -} - -Mat4* kmMat4PerspectiveProjection(Mat4* pOut, float fovY, float aspect, float zNear, float zFar) -{ - Mat4::createPerspective(fovY, aspect, zNear, zFar, pOut); - return pOut; -} - -Mat4* kmMat4OrthographicProjection(Mat4* pOut, float left, float right, float bottom, float top, float nearVal, float farVal) -{ - Mat4::createOrthographicOffCenter(left, right, bottom, top, nearVal, farVal, pOut); - return pOut; -} - -Mat4* kmMat4LookAt(Mat4* pOut, const Vec3* pEye, const Vec3* pCenter, const Vec3* pUp) -{ - Mat4::createLookAt(*pEye, *pCenter, *pUp, pOut); - return pOut; -} - -Vec3* kmVec3Fill(Vec3* pOut, float x, float y, float z) -{ - pOut->x = x; - pOut->y = y; - pOut->z = z; - return pOut; -} - -float kmVec3Length(const Vec3* pIn) -{ - return pIn->length(); -} - -float kmVec3LengthSq(const Vec3* pIn) -{ - return pIn->lengthSquared(); -} - -CC_DLL Vec3* kmVec3Lerp(Vec3* pOut, const Vec3* pV1, const Vec3* pV2, float t) -{ - pOut->x = pV1->x + t * ( pV2->x - pV1->x ); - pOut->y = pV1->y + t * ( pV2->y - pV1->y ); - pOut->z = pV1->z + t * ( pV2->z - pV1->z ); - return pOut; -} - -Vec3* kmVec3Normalize(Vec3* pOut, const Vec3* pIn) -{ - *pOut = pIn->getNormalized(); - return pOut; -} - -Vec3* kmVec3Cross(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) -{ - Vec3::cross(*pV1, *pV2, pOut); - return pOut; -} - -float kmVec3Dot(const Vec3* pV1, const Vec3* pV2) -{ - return Vec3::dot(*pV1, *pV2); -} - -Vec3* kmVec3Add(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) -{ - Vec3::add(*pV1, *pV2, pOut); - return pOut; -} - -Vec3* kmVec3Subtract(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) -{ - Vec3::subtract(*pV1, *pV2, pOut); - return pOut; -} - -Vec3* kmVec3Transform(Vec3* pOut, const Vec3* pV1, const Mat4* pM) -{ - pM->transformPoint(*pV1, pOut); - return pOut; -} - -Vec3* kmVec3TransformNormal(Vec3* pOut, const Vec3* pV, const Mat4* pM) -{ - pM->transformVector(*pV, pOut); - return pOut; -} - -Vec3* kmVec3TransformCoord(Vec3* pOut, const Vec3* pV, const Mat4* pM) -{ - Vec4 v(pV->x, pV->y, pV->z, 1); - pM->transformVector(&v); - v = v * (1/v.w); - pOut->set(v.x, v.y, v.z); - return pOut; -} - -Vec3* kmVec3Scale(Vec3* pOut, const Vec3* pIn, const float s) -{ - *pOut = *pIn * s; - return pOut; -} - -Vec3* kmVec3Assign(Vec3* pOut, const Vec3* pIn) -{ - *pOut = *pIn; - return pOut; -} - -Vec3* kmVec3Zero(Vec3* pOut) -{ - pOut->set(0, 0, 0); - return pOut; -} - -Vec2* kmVec2Fill(Vec2* pOut, float x, float y) -{ - pOut->set(x, y); - return pOut; -} - -float kmVec2Length(const Vec2* pIn) -{ - return pIn->length(); -} - -float kmVec2LengthSq(const Vec2* pIn) -{ - return pIn->lengthSquared(); -} - -Vec2* kmVec2Normalize(Vec2* pOut, const Vec2* pIn) -{ - *pOut = pIn->getNormalized(); - return pOut; -} - -Vec2* kmVec2Lerp(Vec2* pOut, const Vec2* pV1, const Vec2* pV2, float t) -{ - pOut->x = pV1->x + t * ( pV2->x - pV1->x ); - pOut->y = pV1->y + t * ( pV2->y - pV1->y ); - return pOut; -} - -Vec2* kmVec2Add(Vec2* pOut, const Vec2* pV1, const Vec2* pV2) -{ - Vec2::add(*pV1, *pV2, pOut); - return pOut; -} - -float kmVec2Dot(const Vec2* pV1, const Vec2* pV2) -{ - return Vec2::dot(*pV1, *pV2); -} - -Vec2* kmVec2Subtract(Vec2* pOut, const Vec2* pV1, const Vec2* pV2) -{ - Vec2::subtract(*pV1, *pV2, pOut); - return pOut; -} - -Vec2* kmVec2Scale(Vec2* pOut, const Vec2* pIn, const float s) -{ - *pOut = *pIn * s; - return pOut; -} - -Vec2* kmVec2Assign(Vec2* pOut, const Vec2* pIn) -{ - *pOut = *pIn; - return pOut; -} - -Vec4* kmVec4Fill(Vec4* pOut, float x, float y, float z, float w) -{ - pOut->set(x, y, z, w); - return pOut; -} - -Vec4* kmVec4Add(Vec4* pOut, const Vec4* pV1, const Vec4* pV2) -{ - Vec4::add(*pV1, *pV2, pOut); - return pOut; -} - -float kmVec4Dot(const Vec4* pV1, const Vec4* pV2) -{ - return Vec4::dot(*pV1, *pV2); -} - -float kmVec4Length(const Vec4* pIn) -{ - return pIn->length(); -} - -float kmVec4LengthSq(const Vec4* pIn) -{ - return pIn->lengthSquared(); -} - -Vec4* kmVec4Lerp(Vec4* pOut, const Vec4* pV1, const Vec4* pV2, float t) -{ - pOut->x = pV1->x + t * ( pV2->x - pV1->x ); - pOut->y = pV1->y + t * ( pV2->y - pV1->y ); - pOut->z = pV1->z + t * ( pV2->z - pV1->z ); - pOut->w = pV1->w + t * ( pV2->w - pV1->w ); - return pOut; -} - -Vec4* kmVec4Normalize(Vec4* pOut, const Vec4* pIn) -{ - *pOut = pIn->getNormalized(); - return pOut; -} - -Vec4* kmVec4Scale(Vec4* pOut, const Vec4* pIn, const float s) -{ - *pOut = *pIn * s; - return pOut; -} - -Vec4* kmVec4Subtract(Vec4* pOut, const Vec4* pV1, const Vec4* pV2) -{ - Vec4::subtract(*pV1, *pV2, pOut); - return pOut; -} - -Vec4* kmVec4Assign(Vec4* pOut, const Vec4* pIn) -{ - *pOut = *pIn; - return pOut; -} - -Vec4* kmVec4MultiplyMat4(Vec4* pOut, const Vec4* pV, const Mat4* pM) -{ - pM->transformVector(*pV, pOut); - return pOut; -} - -Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV, const Mat4* pM) -{ - pM->transformVector(*pV, pOut); - return pOut; -} - -const Vec3 KM_VEC3_NEG_Z(0, 0, -1); -const Vec3 KM_VEC3_POS_Z(0, 0, 1); -const Vec3 KM_VEC3_POS_Y(0, 1, 0); -const Vec3 KM_VEC3_NEG_Y(0, -1, 0); -const Vec3 KM_VEC3_NEG_X(-1, 0, 0); -const Vec3 KM_VEC3_POS_X(1, 0, 0); -const Vec3 KM_VEC3_ZERO(0, 0, 0); - -const Vec2 KM_VEC2_POS_Y(0, 1); -const Vec2 KM_VEC2_NEG_Y(0, -1); -const Vec2 KM_VEC2_NEG_X(-1, 0); -const Vec2 KM_VEC2_POS_X(1, 0); -const Vec2 KM_VEC2_ZERO(0, 0); - -NS_CC_END - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif diff --git a/cocos/deprecated/CCDeprecated.h b/cocos/deprecated/CCDeprecated.h deleted file mode 100644 index 8eaa72fb3f15..000000000000 --- a/cocos/deprecated/CCDeprecated.h +++ /dev/null @@ -1,1201 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/// @cond DO_NOT_SHOW - -/** Add deprecated global functions and variables here - */ - -#ifndef __COCOS2D_CCDEPRECATED_H__ -#define __COCOS2D_CCDEPRECATED_H__ - -#include - -#include "2d/CCActionCamera.h" -#include "2d/CCActionCatmullRom.h" -#include "2d/CCActionEase.h" -#include "2d/CCActionGrid.h" -#include "2d/CCActionGrid3D.h" -#include "2d/CCActionInstant.h" -#include "2d/CCActionPageTurn3D.h" -#include "2d/CCActionProgressTimer.h" -#include "2d/CCActionTiledGrid.h" -#include "2d/CCActionTween.h" -#include "2d/CCAnimationCache.h" -#include "2d/CCAtlasNode.h" -#include "2d/CCClippingNode.h" -#include "2d/CCGrid.h" -#include "2d/CCLabelAtlas.h" -#include "2d/CCLabelBMFont.h" -#include "2d/CCLabelTTF.h" -#include "2d/CCLayer.h" -#include "2d/CCMenu.h" -#include "2d/CCMenuItem.h" -#include "2d/CCMotionStreak.h" -#include "2d/CCParallaxNode.h" -#include "2d/CCParticleBatchNode.h" -#include "2d/CCParticleExamples.h" -#include "2d/CCParticleSystemQuad.h" -#include "2d/CCProgressTimer.h" -#include "2d/CCSpriteFrameCache.h" -#include "2d/CCTMXLayer.h" -#include "2d/CCTMXObjectGroup.h" -#include "2d/CCTMXTiledMap.h" -#include "2d/CCTMXXMLParser.h" -#include "2d/CCTextFieldTTF.h" -#include "2d/CCTileMapAtlas.h" -#include "2d/CCTransition.h" -#include "2d/CCTransitionPageTurn.h" -#include "2d/CCTransitionProgress.h" -#include "base/CCConfiguration.h" -#include "base/CCDataVisitor.h" -#include "base/CCEvent.h" -#include "base/CCIMEDelegate.h" -#include "base/CCScheduler.h" -#include "base/CCUserDefault.h" -#include "base/ccTypes.h" -#include "deprecated/CCArray.h" -#include "deprecated/CCBool.h" -#include "deprecated/CCDictionary.h" -#include "deprecated/CCDouble.h" -#include "deprecated/CCFloat.h" -#include "deprecated/CCInteger.h" -#include "deprecated/CCNotificationCenter.h" -#include "deprecated/CCSet.h" -#include "math/CCAffineTransform.h" -#include "math/CCGeometry.h" -#include "platform/CCApplication.h" -#include "platform/CCFileUtils.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramCache.h" -#include "renderer/CCTextureAtlas.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -/** Helper macro that creates a Vec2 - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE inline Vec2 ccp(float x, float y) -{ - return Vec2(x, y); -} - -/** Returns opposite of point. - @return Vec2 - @since v0.7.2 - @deprecated please use Vec2::-, for example: -v1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpNeg(const Vec2& v) -{ - return -v; -} - -/** Calculates sum of two points. - @return Vec2 - @since v0.7.2 - @deprecated please use Vec2::+, for example: v1 + v2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpAdd(const Vec2& v1, const Vec2& v2) -{ - return v1 + v2; -} - -/** Calculates difference of two points. - @return Vec2 - @since v0.7.2 - @deprecated please use Vec2::-, for example: v1 - v2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpSub(const Vec2& v1, const Vec2& v2) -{ - return v1 - v2; -} - -/** Returns point multiplied by given factor. - @return Vec2 - @since v0.7.2 - @deprecated please use Vec2::*, for example: v1 * v2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpMult(const Vec2& v, const float s) -{ - return v * s; -} - -/** Calculates midpoint between two points. - @return Vec2 - @since v0.7.2 - @deprecated please use it like (v1 + v2) / 2.0f - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpMidpoint(const Vec2& v1, const Vec2& v2) -{ - return v1.getMidpoint(v2); -} - -/** Calculates dot product of two points. - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float -ccpDot(const Vec2& v1, const Vec2& v2) -{ - return v1.dot(v2); -} - -/** Calculates cross product of two points. - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float -ccpCross(const Vec2& v1, const Vec2& v2) -{ - return v1.cross(v2); -} - -/** Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpPerp(const Vec2& v) -{ - return v.getPerp(); -} - -/** Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpRPerp(const Vec2& v) -{ - return v.getRPerp(); -} - -/** Calculates the projection of v1 over v2. - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpProject(const Vec2& v1, const Vec2& v2) -{ - return v1.project(v2); -} - -/** Rotates two points. - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpRotate(const Vec2& v1, const Vec2& v2) -{ - return v1.rotate(v2); -} - -/** Unrotates two points. - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 -ccpUnrotate(const Vec2& v1, const Vec2& v2) -{ - return v1.unrotate(v2); -} - -/** Calculates the square length of a Vec2 (not calling sqrt() ) - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float -ccpLengthSQ(const Vec2& v) -{ - return v.getLengthSq(); -} - - -/** Calculates the square distance between two points (not calling sqrt() ) - @return float - @since v1.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline float -ccpDistanceSQ(const Vec2 p1, const Vec2 p2) -{ - return (p1 - p2).getLengthSq(); -} - - -/** Calculates distance between point an origin - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float ccpLength(const Vec2& v) -{ - return v.getLength(); -} - -/** Calculates the distance between two points - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float ccpDistance(const Vec2& v1, const Vec2& v2) -{ - return v1.getDistance(v2); -} - -/** Returns point multiplied to a length of 1. - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpNormalize(const Vec2& v) -{ - return v.getNormalized(); -} - -/** Converts radians to a normalized vector. - @return Vec2 - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpForAngle(const float a) -{ - return Vec2::forAngle(a); -} - -/** Converts a vector to radians. - @return float - @since v0.7.2 - */ -CC_DEPRECATED_ATTRIBUTE static inline float ccpToAngle(const Vec2& v) -{ - return v.getAngle(); -} - - -/** Clamp a point between from and to. - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpClamp(const Vec2& p, const Vec2& from, const Vec2& to) -{ - return p.getClampPoint(from, to); -} - -/** Quickly convert Size to a Vec2 - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpFromSize(const Size& s) -{ - return Vec2(s); -} - -/** Run a math operation function on each point component - * absf, floorf, ceilf, roundf - * any function that has the signature: float func(float); - * For example: let's try to take the floor of x,y - * ccpCompOp(p,floorf); - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpCompOp(const Vec2& p, float (*opFunc)(float)) -{ - return p.compOp(opFunc); -} - -/** Linear Interpolation between two points a and b - @returns - alpha == 0 ? a - alpha == 1 ? b - otherwise a value between a..b - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpLerp(const Vec2& a, const Vec2& b, float alpha) -{ - return a.lerp(b, alpha); -} - - -/** @returns if points have fuzzy equality which means equal with some degree of variance. - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline bool ccpFuzzyEqual(const Vec2& a, const Vec2& b, float variance) -{ - return a.fuzzyEquals(b, variance); -} - - -/** Multiplies a and b components, a.x*b.x, a.y*b.y - @returns a component-wise multiplication - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpCompMult(const Vec2& a, const Vec2& b) -{ - return Vec2(a.x * b.x, a.y * b.y); -} - -/** @returns the signed angle in radians between two vector directions - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline float ccpAngleSigned(const Vec2& a, const Vec2& b) -{ - return a.getAngle(b); -} - -/** @returns the angle in radians between two vector directions - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline float ccpAngle(const Vec2& a, const Vec2& b) -{ - return a.getAngle(b); -} - -/** Rotates a point counter clockwise by the angle around a pivot - @param v is the point to rotate - @param pivot is the pivot, naturally - @param angle is the angle of rotation cw in radians - @returns the rotated point - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpRotateByAngle(const Vec2& v, const Vec2& pivot, float angle) -{ - return v.rotateByAngle(pivot, angle); -} - -/** A general line-line intersection test - @param p1 - is the startpoint for the first line P1 = (p1 - p2) - @param p2 - is the endpoint for the first line P1 = (p1 - p2) - @param p3 - is the startpoint for the second line P2 = (p3 - p4) - @param p4 - is the endpoint for the second line P2 = (p3 - p4) - @param s - is the range for a hitpoint in P1 (pa = p1 + s*(p2 - p1)) - @param t - is the range for a hitpoint in P3 (pa = p2 + t*(p4 - p3)) - @return bool - indicating successful intersection of a line - note that to truly test intersection for segments we have to make - sure that s & t lie within [0..1] and for rays, make sure s & t > 0 - the hit point is p3 + t * (p4 - p3); - the hit point also is p1 + s * (p2 - p1); - @since v0.99.1 - */ -CC_DEPRECATED_ATTRIBUTE static inline bool ccpLineIntersect(const Vec2& p1, const Vec2& p2, - const Vec2& p3, const Vec2& p4, - float *s, float *t) -{ - return Vec2::isLineIntersect(p1, p2, p3, p4, s, t); -} - -/* - ccpSegmentIntersect returns true if Segment A-B intersects with segment C-D - @since v1.0.0 - */ -CC_DEPRECATED_ATTRIBUTE static inline bool ccpSegmentIntersect(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) -{ - return Vec2::isSegmentIntersect(A, B, C, D); -} - -/* - ccpIntersectPoint returns the intersection point of line A-B, C-D - @since v1.0.0 - */ -CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpIntersectPoint(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) -{ - return Vec2::getIntersectPoint(A, B, C, D); -} - -CC_DEPRECATED_ATTRIBUTE inline Vec2 CCPointMake(float x, float y) -{ - return Vec2(x, y); -} - -CC_DEPRECATED_ATTRIBUTE inline Size CCSizeMake(float width, float height) -{ - return Size(width, height); -} - -CC_DEPRECATED_ATTRIBUTE inline Rect CCRectMake(float x, float y, float width, float height) -{ - return Rect(x, y, width, height); -} - - -CC_DEPRECATED_ATTRIBUTE extern const Vec2 CCPointZero; - -/* The "zero" size -- equivalent to Size(0, 0). */ -CC_DEPRECATED_ATTRIBUTE extern const Size CCSizeZero; - -/* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */ -CC_DEPRECATED_ATTRIBUTE extern const Rect CCRectZero; - - -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccWHITE; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccYELLOW; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccGREEN; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccBLUE; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccRED; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccMAGENTA; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccBLACK; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccORANGE; -CC_DEPRECATED_ATTRIBUTE extern const Color3B ccGRAY; - -CC_DEPRECATED_ATTRIBUTE extern const BlendFunc kCCBlendFuncDisable; - -CC_DEPRECATED_ATTRIBUTE static inline Color3B ccc3(GLubyte r, GLubyte g, GLubyte b) -{ - return Color3B(r, g, b); -} - -CC_DEPRECATED_ATTRIBUTE static inline bool ccc3BEqual(const Color3B &col1, const Color3B &col2) -{ - return col1.r == col2.r && col1.g == col2.g && col1.b == col2.b; -} - -CC_DEPRECATED_ATTRIBUTE static inline Color4B -ccc4(const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o) -{ - return Color4B(r, g, b, o); -} - -CC_DEPRECATED_ATTRIBUTE static inline Color4F ccc4FFromccc3B(Color3B c) -{ - return Color4F(c.r/255.f, c.g/255.f, c.b/255.f, 1.f); -} - -CC_DEPRECATED_ATTRIBUTE static inline Color4F -ccc4f(const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a) -{ - return Color4F(r, g, b, a); -} - -CC_DEPRECATED_ATTRIBUTE static inline Color4F ccc4FFromccc4B(Color4B c) -{ - return Color4F(c.r/255.f, c.g/255.f, c.b/255.f, c.a/255.f); -} - -CC_DEPRECATED_ATTRIBUTE static inline Color4B ccc4BFromccc4F(Color4F c) -{ - return Color4B((GLubyte)(c.r*255), (GLubyte)(c.g*255), (GLubyte)(c.b*255), (GLubyte)(c.a*255)); -} - -CC_DEPRECATED_ATTRIBUTE static inline bool ccc4FEqual(Color4F a, Color4F b) -{ - return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; -} - -CC_DEPRECATED_ATTRIBUTE static inline Vec2 vertex2(const float x, const float y) -{ - Vec2 c(x, y); - return c; -} - -CC_DEPRECATED_ATTRIBUTE static inline Vec3 vertex3(const float x, const float y, const float z) -{ - Vec3 c(x, y, z); - return c; -} - -CC_DEPRECATED_ATTRIBUTE static inline Tex2F tex2(const float u, const float v) -{ - Tex2F t(u , v); - return t; -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty) -{ - return AffineTransformMake(a, b, c, d, tx, ty); -} - -CC_DEPRECATED_ATTRIBUTE static inline Vec2 CCPointApplyAffineTransform(const Vec2& point, const AffineTransform& t) -{ - return PointApplyAffineTransform(point, t); -} - -CC_DEPRECATED_ATTRIBUTE static inline Size CCSizeApplyAffineTransform(const Size& size, const AffineTransform& t) -{ - return SizeApplyAffineTransform(size, t); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformMakeIdentity() -{ - return AffineTransformMakeIdentity(); -} - -CC_DEPRECATED_ATTRIBUTE static inline Rect CCRectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform) -{ - return RectApplyAffineTransform(rect, anAffineTransform); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformTranslate(const AffineTransform& t, float tx, float ty) -{ - return AffineTransformTranslate(t, tx, ty); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformRotate(const AffineTransform& aTransform, float anAngle) -{ - return AffineTransformRotate(aTransform, anAngle); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformScale(const AffineTransform& t, float sx, float sy) -{ - return AffineTransformScale(t, sx, sy); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformConcat(const AffineTransform& t1, const AffineTransform& t2) -{ - return AffineTransformConcat(t1, t2); -} - -CC_DEPRECATED_ATTRIBUTE static inline bool CCAffineTransformEqualToTransform(const AffineTransform& t1, const AffineTransform& t2) -{ - return AffineTransformEqualToTransform(t1, t2); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformInvert(const AffineTransform& t) -{ - return AffineTransformInvert(t); -} - -CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformIdentity() -{ - return AffineTransformMakeIdentity(); -} - -// CC prefix compatibility -CC_DEPRECATED_ATTRIBUTE typedef Ref CCObject; -CC_DEPRECATED_ATTRIBUTE typedef Ref Object; -CC_DEPRECATED_ATTRIBUTE typedef Event CCEvent; -CC_DEPRECATED_ATTRIBUTE typedef DataVisitor CCDataVisitor; -CC_DEPRECATED_ATTRIBUTE typedef PrettyPrinter CCPrettyPrinter; -CC_DEPRECATED_ATTRIBUTE typedef Acceleration CCAcceleration; -CC_DEPRECATED_ATTRIBUTE typedef TextureAtlas CCTextureAtlas; -CC_DEPRECATED_ATTRIBUTE typedef Configuration CCConfiguration; -CC_DEPRECATED_ATTRIBUTE typedef PointArray CCPointArray; -CC_DEPRECATED_ATTRIBUTE typedef RemoveSelf CCRemoveSelf; -CC_DEPRECATED_ATTRIBUTE typedef IMEDelegate CCIMEDelegate; -CC_DEPRECATED_ATTRIBUTE typedef IMEKeyboardNotificationInfo CCIMEKeyboardNotificationInfo; -CC_DEPRECATED_ATTRIBUTE typedef TextFieldDelegate CCTextFieldDelegate; -CC_DEPRECATED_ATTRIBUTE typedef TextFieldTTF CCTextFieldTTF; -CC_DEPRECATED_ATTRIBUTE typedef __NotificationCenter CCNotificationCenter; -CC_DEPRECATED_ATTRIBUTE typedef __NotificationCenter NotificationCenter; -//CC_DEPRECATED_ATTRIBUTE typedef TargetedTouchDelegate CCTargetedTouchDelegate; -//CC_DEPRECATED_ATTRIBUTE typedef StandardTouchDelegate CCStandardTouchDelegate; -//CC_DEPRECATED_ATTRIBUTE typedef TouchDelegate CCTouchDelegate; -CC_DEPRECATED_ATTRIBUTE typedef Image CCImage; -CC_DEPRECATED_ATTRIBUTE typedef UserDefault CCUserDefault; - -CC_DEPRECATED_ATTRIBUTE typedef Action CCAction; -CC_DEPRECATED_ATTRIBUTE typedef FiniteTimeAction CCFiniteTimeAction; -CC_DEPRECATED_ATTRIBUTE typedef Speed CCSpeed; -CC_DEPRECATED_ATTRIBUTE typedef Follow CCFollow; -CC_DEPRECATED_ATTRIBUTE typedef GLProgram CCGLProgram; -CC_DEPRECATED_ATTRIBUTE typedef Touch CCTouch; -CC_DEPRECATED_ATTRIBUTE typedef Texture2D CCTexture2D; -CC_DEPRECATED_ATTRIBUTE typedef Node CCNode; -CC_DEPRECATED_ATTRIBUTE typedef Node CCNodeRGBA; -CC_DEPRECATED_ATTRIBUTE typedef Node CCRGBAProtocol; -CC_DEPRECATED_ATTRIBUTE typedef SpriteFrame CCSpriteFrame; -CC_DEPRECATED_ATTRIBUTE typedef AnimationFrame CCAnimationFrame; -CC_DEPRECATED_ATTRIBUTE typedef Animation CCAnimation; -CC_DEPRECATED_ATTRIBUTE typedef ActionInterval CCActionInterval; -CC_DEPRECATED_ATTRIBUTE typedef Sequence CCSequence; -CC_DEPRECATED_ATTRIBUTE typedef Repeat CCRepeat; -CC_DEPRECATED_ATTRIBUTE typedef RepeatForever CCRepeatForever; -CC_DEPRECATED_ATTRIBUTE typedef Spawn CCSpawn; -CC_DEPRECATED_ATTRIBUTE typedef RotateTo CCRotateTo; -CC_DEPRECATED_ATTRIBUTE typedef RotateBy CCRotateBy; -CC_DEPRECATED_ATTRIBUTE typedef MoveBy CCMoveBy; -CC_DEPRECATED_ATTRIBUTE typedef MoveTo CCMoveTo; -CC_DEPRECATED_ATTRIBUTE typedef SkewTo CCSkewTo; -CC_DEPRECATED_ATTRIBUTE typedef SkewBy CCSkewBy; -CC_DEPRECATED_ATTRIBUTE typedef JumpBy CCJumpBy; -CC_DEPRECATED_ATTRIBUTE typedef JumpTo CCJumpTo; -CC_DEPRECATED_ATTRIBUTE typedef BezierBy CCBezierBy; -CC_DEPRECATED_ATTRIBUTE typedef BezierTo CCBezierTo; -CC_DEPRECATED_ATTRIBUTE typedef ScaleTo CCScaleTo; -CC_DEPRECATED_ATTRIBUTE typedef ScaleBy CCScaleBy; -CC_DEPRECATED_ATTRIBUTE typedef Blink CCBlink; -CC_DEPRECATED_ATTRIBUTE typedef FadeIn CCFadeIn; -CC_DEPRECATED_ATTRIBUTE typedef FadeOut CCFadeOut; -CC_DEPRECATED_ATTRIBUTE typedef FadeTo CCFadeTo; -CC_DEPRECATED_ATTRIBUTE typedef TintTo CCTintTo; -CC_DEPRECATED_ATTRIBUTE typedef TintBy CCTintBy; -CC_DEPRECATED_ATTRIBUTE typedef DelayTime CCDelayTime; -CC_DEPRECATED_ATTRIBUTE typedef Animate CCAnimate; -CC_DEPRECATED_ATTRIBUTE typedef TargetedAction CCTargetedAction; -CC_DEPRECATED_ATTRIBUTE typedef ActionCamera CCActionCamera; -CC_DEPRECATED_ATTRIBUTE typedef OrbitCamera CCOrbitCamera; -CC_DEPRECATED_ATTRIBUTE typedef ActionManager CCActionManager; -CC_DEPRECATED_ATTRIBUTE typedef ActionEase CCActionEase; -CC_DEPRECATED_ATTRIBUTE typedef EaseRateAction CCEaseRateAction; -CC_DEPRECATED_ATTRIBUTE typedef EaseIn CCEaseIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseOut CCEaseOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseInOut CCEaseInOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialIn CCEaseExponentialIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialOut CCEaseExponentialOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialInOut CCEaseExponentialInOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseSineIn CCEaseSineIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseSineOut CCEaseSineOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseSineInOut CCEaseSineInOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseElastic CCEaseElastic; -CC_DEPRECATED_ATTRIBUTE typedef EaseElasticIn CCEaseElasticIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseElasticOut CCEaseElasticOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseElasticInOut CCEaseElasticInOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseBounce CCEaseBounce; -CC_DEPRECATED_ATTRIBUTE typedef EaseBounceIn CCEaseBounceIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseBounceOut CCEaseBounceOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseBounceInOut CCEaseBounceInOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseBackIn CCEaseBackIn; -CC_DEPRECATED_ATTRIBUTE typedef EaseBackOut CCEaseBackOut; -CC_DEPRECATED_ATTRIBUTE typedef EaseBackInOut CCEaseBackInOut; -CC_DEPRECATED_ATTRIBUTE typedef ActionInstant CCActionInstant; -CC_DEPRECATED_ATTRIBUTE typedef Show CCShow; -CC_DEPRECATED_ATTRIBUTE typedef Hide CCHide; -CC_DEPRECATED_ATTRIBUTE typedef ToggleVisibility CCToggleVisibility; -CC_DEPRECATED_ATTRIBUTE typedef FlipX CCFlipX; -CC_DEPRECATED_ATTRIBUTE typedef FlipY CCFlipY; -CC_DEPRECATED_ATTRIBUTE typedef Place CCPlace; -CC_DEPRECATED_ATTRIBUTE typedef CallFunc CCCallFunc; -CC_DEPRECATED_ATTRIBUTE typedef CallFuncN CCCallFuncN; -CC_DEPRECATED_ATTRIBUTE typedef __CCCallFuncND CCCallFuncND; -CC_DEPRECATED_ATTRIBUTE typedef __CCCallFuncO CCCallFuncO; -CC_DEPRECATED_ATTRIBUTE typedef GridAction CCGridAction; -CC_DEPRECATED_ATTRIBUTE typedef Grid3DAction CCGrid3DAction; -CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3DAction CCTiledGrid3DAction; -CC_DEPRECATED_ATTRIBUTE typedef StopGrid CCStopGrid; -CC_DEPRECATED_ATTRIBUTE typedef ReuseGrid CCReuseGrid; -CC_DEPRECATED_ATTRIBUTE typedef Waves3D CCWaves3D; -CC_DEPRECATED_ATTRIBUTE typedef FlipX3D CCFlipX3D; -CC_DEPRECATED_ATTRIBUTE typedef FlipY3D CCFlipY3D; -CC_DEPRECATED_ATTRIBUTE typedef Lens3D CCLens3D; -CC_DEPRECATED_ATTRIBUTE typedef Ripple3D CCRipple3D; -CC_DEPRECATED_ATTRIBUTE typedef Shaky3D CCShaky3D; -CC_DEPRECATED_ATTRIBUTE typedef Liquid CCLiquid; -CC_DEPRECATED_ATTRIBUTE typedef Waves CCWaves; -CC_DEPRECATED_ATTRIBUTE typedef Twirl CCTwirl; -CC_DEPRECATED_ATTRIBUTE typedef PageTurn3D CCPageTurn3D; -CC_DEPRECATED_ATTRIBUTE typedef ProgressTo CCProgressTo; -CC_DEPRECATED_ATTRIBUTE typedef ProgressFromTo CCProgressFromTo; -CC_DEPRECATED_ATTRIBUTE typedef ShakyTiles3D CCShakyTiles3D; -CC_DEPRECATED_ATTRIBUTE typedef ShatteredTiles3D CCShatteredTiles3D; -CC_DEPRECATED_ATTRIBUTE typedef ShuffleTiles CCShuffleTiles; -CC_DEPRECATED_ATTRIBUTE typedef FadeOutTRTiles CCFadeOutTRTiles; -CC_DEPRECATED_ATTRIBUTE typedef FadeOutBLTiles CCFadeOutBLTiles; -CC_DEPRECATED_ATTRIBUTE typedef FadeOutUpTiles CCFadeOutUpTiles; -CC_DEPRECATED_ATTRIBUTE typedef FadeOutDownTiles CCFadeOutDownTiles; -CC_DEPRECATED_ATTRIBUTE typedef TurnOffTiles CCTurnOffTiles; -CC_DEPRECATED_ATTRIBUTE typedef WavesTiles3D CCWavesTiles3D; -CC_DEPRECATED_ATTRIBUTE typedef JumpTiles3D CCJumpTiles3D; -CC_DEPRECATED_ATTRIBUTE typedef SplitRows CCSplitRows; -CC_DEPRECATED_ATTRIBUTE typedef SplitCols CCSplitCols; -CC_DEPRECATED_ATTRIBUTE typedef ActionTween CCActionTween; -CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineTo CCCardinalSplineTo; -CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineBy CCCardinalSplineBy; -CC_DEPRECATED_ATTRIBUTE typedef CatmullRomTo CCCatmullRomTo; -CC_DEPRECATED_ATTRIBUTE typedef CatmullRomBy CCCatmullRomBy; -CC_DEPRECATED_ATTRIBUTE typedef AtlasNode CCAtlasNode; -CC_DEPRECATED_ATTRIBUTE typedef TextureProtocol CCTextureProtocol; -CC_DEPRECATED_ATTRIBUTE typedef BlendProtocol CCBlendProtocol; -CC_DEPRECATED_ATTRIBUTE typedef DrawNode CCDrawNode; -CC_DEPRECATED_ATTRIBUTE typedef Camera CCCamera; -CC_DEPRECATED_ATTRIBUTE typedef LabelAtlas CCLabelAtlas; -CC_DEPRECATED_ATTRIBUTE typedef LabelProtocol CCLabelProtocol; -CC_DEPRECATED_ATTRIBUTE typedef Director CCDirector; -CC_DEPRECATED_ATTRIBUTE typedef GridBase CCGridBase; -CC_DEPRECATED_ATTRIBUTE typedef Grid3D CCGrid3D; -CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3D CCTiledGrid3D; -CC_DEPRECATED_ATTRIBUTE typedef Sprite CCSprite; -#define CCLabelTTF LabelTTF -CC_DEPRECATED_ATTRIBUTE typedef SpriteBatchNode CCSpriteBatchNode; -#define CCLabelBMFont LabelBMFont -CC_DEPRECATED_ATTRIBUTE typedef Layer CCLayer; -//CC_DEPRECATED_ATTRIBUTE typedef KeypadDelegate CCKeypadDelegate; -CC_DEPRECATED_ATTRIBUTE typedef Layer CCLayerRGBA; -CC_DEPRECATED_ATTRIBUTE typedef LayerColor CCLayerColor; -CC_DEPRECATED_ATTRIBUTE typedef LayerGradient CCLayerGradient; -CC_DEPRECATED_ATTRIBUTE typedef LayerMultiplex CCLayerMultiplex; -CC_DEPRECATED_ATTRIBUTE typedef Scene CCScene; -CC_DEPRECATED_ATTRIBUTE typedef TransitionEaseScene CCTransitionEaseScene; -CC_DEPRECATED_ATTRIBUTE typedef TransitionScene CCTransitionScene; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSceneOriented CCTransitionSceneOriented; -CC_DEPRECATED_ATTRIBUTE typedef TransitionRotoZoom CCTransitionRotoZoom; -CC_DEPRECATED_ATTRIBUTE typedef TransitionJumpZoom CCTransitionJumpZoom; -CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInL CCTransitionMoveInL; -CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInR CCTransitionMoveInR; -CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInT CCTransitionMoveInT; -CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInB CCTransitionMoveInB; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInL CCTransitionSlideInL; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInR CCTransitionSlideInR; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInB CCTransitionSlideInB; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInT CCTransitionSlideInT; -CC_DEPRECATED_ATTRIBUTE typedef TransitionShrinkGrow CCTransitionShrinkGrow; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipX CCTransitionFlipX; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipY CCTransitionFlipY; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipAngular CCTransitionFlipAngular; -CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipX CCTransitionZoomFlipX; -CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipY CCTransitionZoomFlipY; -CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipAngular CCTransitionZoomFlipAngular; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFade CCTransitionFade; -CC_DEPRECATED_ATTRIBUTE typedef TransitionCrossFade CCTransitionCrossFade; -CC_DEPRECATED_ATTRIBUTE typedef TransitionTurnOffTiles CCTransitionTurnOffTiles; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitCols CCTransitionSplitCols; -CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitRows CCTransitionSplitRows; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeTR CCTransitionFadeTR; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeBL CCTransitionFadeBL; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeUp CCTransitionFadeUp; -CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeDown CCTransitionFadeDown; -CC_DEPRECATED_ATTRIBUTE typedef TransitionPageTurn CCTransitionPageTurn; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgress CCTransitionProgress; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCCW CCTransitionProgressRadialCCW; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCW CCTransitionProgressRadialCW; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressHorizontal CCTransitionProgressHorizontal; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressVertical CCTransitionProgressVertical; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressInOut CCTransitionProgressInOut; -CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressOutIn CCTransitionProgressOutIn; -CC_DEPRECATED_ATTRIBUTE typedef MenuItem CCMenuItem; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemLabel CCMenuItemLabel; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemAtlasFont CCMenuItemAtlasFont; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemFont CCMenuItemFont; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemSprite CCMenuItemSprite; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemImage CCMenuItemImage; -CC_DEPRECATED_ATTRIBUTE typedef MenuItemToggle CCMenuItemToggle; -CC_DEPRECATED_ATTRIBUTE typedef Menu CCMenu; -CC_DEPRECATED_ATTRIBUTE typedef ClippingNode CCClippingNode; -CC_DEPRECATED_ATTRIBUTE typedef MotionStreak CCMotionStreak; -CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer CCProgressTimer; -CC_DEPRECATED_ATTRIBUTE typedef RenderTexture CCRenderTexture; -CC_DEPRECATED_ATTRIBUTE typedef ParticleBatchNode CCParticleBatchNode; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSystem CCParticleSystem; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSystemQuad CCParticleSystemQuad; -CC_DEPRECATED_ATTRIBUTE typedef ParticleFire CCParticleFire; -CC_DEPRECATED_ATTRIBUTE typedef ParticleFireworks CCParticleFireworks; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSun CCParticleSun; -CC_DEPRECATED_ATTRIBUTE typedef ParticleGalaxy CCParticleGalaxy; -CC_DEPRECATED_ATTRIBUTE typedef ParticleFlower CCParticleFlower; -CC_DEPRECATED_ATTRIBUTE typedef ParticleMeteor CCParticleMeteor; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSpiral CCParticleSpiral; -CC_DEPRECATED_ATTRIBUTE typedef ParticleExplosion CCParticleExplosion; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSmoke CCParticleSmoke; -CC_DEPRECATED_ATTRIBUTE typedef ParticleSnow CCParticleSnow; -CC_DEPRECATED_ATTRIBUTE typedef ParticleRain CCParticleRain; -CC_DEPRECATED_ATTRIBUTE typedef FileUtils CCFileUtils; -CC_DEPRECATED_ATTRIBUTE typedef Application CCApplication; -CC_DEPRECATED_ATTRIBUTE typedef GLProgramCache CCShaderCache; -CC_DEPRECATED_ATTRIBUTE typedef GLProgramCache ShaderCache; -CC_DEPRECATED_ATTRIBUTE typedef AnimationCache CCAnimationCache; -CC_DEPRECATED_ATTRIBUTE typedef SpriteFrameCache CCSpriteFrameCache; -CC_DEPRECATED_ATTRIBUTE typedef TextureCache CCTextureCache; -CC_DEPRECATED_ATTRIBUTE typedef ParallaxNode CCParallaxNode; -CC_DEPRECATED_ATTRIBUTE typedef TMXObjectGroup CCTMXObjectGroup; -CC_DEPRECATED_ATTRIBUTE typedef TMXLayerInfo CCTMXLayerInfo; -CC_DEPRECATED_ATTRIBUTE typedef TMXTilesetInfo CCTMXTilesetInfo; -CC_DEPRECATED_ATTRIBUTE typedef TMXMapInfo CCTMXMapInfo; -CC_DEPRECATED_ATTRIBUTE typedef TMXLayer CCTMXLayer; -CC_DEPRECATED_ATTRIBUTE typedef TMXTiledMap CCTMXTiledMap; -CC_DEPRECATED_ATTRIBUTE typedef TileMapAtlas CCTileMapAtlas; -CC_DEPRECATED_ATTRIBUTE typedef Timer CCTimer; -CC_DEPRECATED_ATTRIBUTE typedef Scheduler CCScheduler; -CC_DEPRECATED_ATTRIBUTE typedef GLView CCEGLView; - -CC_DEPRECATED_ATTRIBUTE typedef Component CCComponent; -CC_DEPRECATED_ATTRIBUTE typedef AffineTransform CCAffineTransform; -CC_DEPRECATED_ATTRIBUTE typedef Vec2 CCPoint; -CC_DEPRECATED_ATTRIBUTE typedef Size CCSize; -CC_DEPRECATED_ATTRIBUTE typedef Rect CCRect; -CC_DEPRECATED_ATTRIBUTE typedef Color3B ccColor3B; -CC_DEPRECATED_ATTRIBUTE typedef Color4F ccColor4F; -CC_DEPRECATED_ATTRIBUTE typedef Color4B ccColor4B; -CC_DEPRECATED_ATTRIBUTE typedef Vec2 ccVertex2F; -CC_DEPRECATED_ATTRIBUTE typedef Vec2 Vertex2F; -CC_DEPRECATED_ATTRIBUTE typedef Vec3 ccVertex3F; -CC_DEPRECATED_ATTRIBUTE typedef Vec3 Vertex3F; -CC_DEPRECATED_ATTRIBUTE typedef Tex2F ccTex2F; -CC_DEPRECATED_ATTRIBUTE typedef PointSprite ccPointSprite; -CC_DEPRECATED_ATTRIBUTE typedef Quad2 ccQuad2; -CC_DEPRECATED_ATTRIBUTE typedef Quad3 ccQuad3; -CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F ccV2F_C4B_T2F; -CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F ccV2F_C4F_T2F; -CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F ccV3F_C4B_T2F; -CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Triangle ccV2F_C4B_T2F_Triangle; -CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Quad ccV2F_C4B_T2F_Quad; -CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F_Quad ccV3F_C4B_T2F_Quad; -CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F_Quad ccV2F_C4F_T2F_Quad; -CC_DEPRECATED_ATTRIBUTE typedef BlendFunc ccBlendFunc; -CC_DEPRECATED_ATTRIBUTE typedef T2F_Quad ccT2F_Quad; -CC_DEPRECATED_ATTRIBUTE typedef AnimationFrameData ccAnimationFrameData; -CC_DEPRECATED_ATTRIBUTE typedef FontShadow ccFontShadow; -CC_DEPRECATED_ATTRIBUTE typedef FontStroke ccFontStroke; -CC_DEPRECATED_ATTRIBUTE typedef FontDefinition ccFontDefinition; - -CC_DEPRECATED_ATTRIBUTE typedef TextVAlignment CCVerticalTextAlignment; -CC_DEPRECATED_ATTRIBUTE typedef TextHAlignment CCTextAlignment; -CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer::Type CCProgressTimerType; - -CC_DEPRECATED_ATTRIBUTE typedef void* CCZone; - -CC_DEPRECATED_ATTRIBUTE const int kCCVertexAttrib_Position = GLProgram::VERTEX_ATTRIB_POSITION; -CC_DEPRECATED_ATTRIBUTE const int kCCVertexAttrib_Color = GLProgram::VERTEX_ATTRIB_COLOR; -CC_DEPRECATED_ATTRIBUTE const int kCCVertexAttrib_TexCoords = GLProgram::VERTEX_ATTRIB_TEX_COORD; -CC_DEPRECATED_ATTRIBUTE const int kCCVertexAttrib_MAX = GLProgram::VERTEX_ATTRIB_MAX; - -CC_DEPRECATED_ATTRIBUTE const int kCCUniformPMatrix = GLProgram::UNIFORM_P_MATRIX; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformMVMatrix = GLProgram::UNIFORM_MV_MATRIX; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformMVPMatrix = GLProgram::UNIFORM_MVP_MATRIX; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformTime = GLProgram::UNIFORM_TIME; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformSinTime = GLProgram::UNIFORM_SIN_TIME; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformCosTime = GLProgram::UNIFORM_COS_TIME; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformRandom01 = GLProgram::UNIFORM_RANDOM01; -CC_DEPRECATED_ATTRIBUTE const int kCCUniformSampler = GLProgram::UNIFORM_SAMPLER0; -CC_DEPRECATED_ATTRIBUTE const int kCCUniform_MAX = GLProgram::UNIFORM_MAX; - -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionTextureColor; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionTextureColorAlphaTest; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionColor; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionTexture; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionTexture_uColor; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionTextureA8Color; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_Position_uColor; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCShader_PositionLengthTexureColor; - -// uniform names -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformPMatrix_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformMVMatrix_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformMVPMatrix_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformTime_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformSinTime_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformCosTime_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformRandom01_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformSampler_s; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCUniformAlphaTestValue; - -// Attribute names -CC_DEPRECATED_ATTRIBUTE extern const char* kCCAttributeNameColor; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCAttributeNamePosition; -CC_DEPRECATED_ATTRIBUTE extern const char* kCCAttributeNameTexCoord; - -CC_DEPRECATED_ATTRIBUTE const ProgressTimer::Type kCCProgressTimerTypeRadial = ProgressTimer::Type::RADIAL; -CC_DEPRECATED_ATTRIBUTE const ProgressTimer::Type kCCProgressTimerTypeBar = ProgressTimer::Type::BAR; -CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer::Type ProgressTimerType; - -CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjection2D = Director::Projection::_2D; -CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjection3D = Director::Projection::_3D; -CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjectionCustom = Director::Projection::CUSTOM; -CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjectionDefault = Director::Projection::DEFAULT; -CC_DEPRECATED_ATTRIBUTE typedef Director::Projection ccDirectorProjection; - -CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentTop = TextVAlignment::TOP; -CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentCenter = TextVAlignment::CENTER; -CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentBottom = TextVAlignment::BOTTOM; - -CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentLeft = TextHAlignment::LEFT; -CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentCenter = TextHAlignment::CENTER; -CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentRight = TextHAlignment::RIGHT; - -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGBA8888 = Texture2D::PixelFormat::RGBA8888; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB888 = Texture2D::PixelFormat::RGB888; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB565 = Texture2D::PixelFormat::RGB565; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_A8 = Texture2D::PixelFormat::A8; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_I8 = Texture2D::PixelFormat::I8; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_AI88 = Texture2D::PixelFormat::AI88; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGBA4444 = Texture2D::PixelFormat::RGBA4444; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB5A1 = Texture2D::PixelFormat::RGB5A1; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_PVRTC4 = Texture2D::PixelFormat::PVRTC4; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_PVRTC2 = Texture2D::PixelFormat::PVRTC2; -CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_Default = Texture2D::PixelFormat::DEFAULT; - -CC_DEPRECATED_ATTRIBUTE typedef Texture2D::PixelFormat CCTexture2DPixelFormat; - - -CC_DEPRECATED_ATTRIBUTE const int kCCParticleDurationInfinity = ParticleSystem::DURATION_INFINITY; -CC_DEPRECATED_ATTRIBUTE const int kCCParticleStartSizeEqualToEndSize = ParticleSystem::START_SIZE_EQUAL_TO_END_SIZE; -CC_DEPRECATED_ATTRIBUTE const int kCCParticleStartRadiusEqualToEndRadius = ParticleSystem::START_RADIUS_EQUAL_TO_END_RADIUS; - -CC_DEPRECATED_ATTRIBUTE const int kParticleDurationInfinity = ParticleSystem::DURATION_INFINITY; -CC_DEPRECATED_ATTRIBUTE const int kParticleStartSizeEqualToEndSize = ParticleSystem::START_SIZE_EQUAL_TO_END_SIZE; -CC_DEPRECATED_ATTRIBUTE const int kParticleStartRadiusEqualToEndRadius = ParticleSystem::START_RADIUS_EQUAL_TO_END_RADIUS; - -CC_DEPRECATED_ATTRIBUTE const ParticleSystem::Mode kCCParticleModeGravity = ParticleSystem::Mode::GRAVITY; -CC_DEPRECATED_ATTRIBUTE const ParticleSystem::Mode kCCParticleModeRadius = ParticleSystem::Mode::RADIUS; -CC_DEPRECATED_ATTRIBUTE const int kCCParticleDefaultCapacity = kParticleDefaultCapacity; - -CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeFree = ParticleSystem::PositionType::FREE; -CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeRelative = ParticleSystem::PositionType::RELATIVE; -CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeGrouped = ParticleSystem::PositionType::GROUPED; - -CC_DEPRECATED_ATTRIBUTE typedef ParticleSystem::PositionType tPositionType; - -#define kCCLabelAutomaticWidth kLabelAutomaticWidth - - -CC_DEPRECATED_ATTRIBUTE const Menu::State kCCMenuStateWaiting = Menu::State::WAITING; -CC_DEPRECATED_ATTRIBUTE const Menu::State kCCMenuStateTrackingTouch = Menu::State::TRACKING_TOUCH; - -CC_DEPRECATED_ATTRIBUTE typedef Menu::State tMenuState; - -CC_DEPRECATED_ATTRIBUTE const Touch::DispatchMode kCCTouchesOneByOne = Touch::DispatchMode::ONE_BY_ONE; -CC_DEPRECATED_ATTRIBUTE const Touch::DispatchMode kCCTouchesAllAtOnce = Touch::DispatchMode::ALL_AT_ONCE; - -CC_DEPRECATED_ATTRIBUTE typedef Touch::DispatchMode ccTouchesMode; - -CC_DEPRECATED_ATTRIBUTE const Image::Format kCCImageFormatPNG = Image::Format::PNG; -CC_DEPRECATED_ATTRIBUTE const Image::Format kCCImageFormatJPEG = Image::Format::JPG; - -CC_DEPRECATED_ATTRIBUTE typedef Image::Format tImageFormat; - -CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationLeftOver = TransitionScene::Orientation::LEFT_OVER; -CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationRightOver = TransitionScene::Orientation::RIGHT_OVER; -CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationUpOver = TransitionScene::Orientation::UP_OVER; -CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationDownOver = TransitionScene::Orientation::DOWN_OVER; - -CC_DEPRECATED_ATTRIBUTE typedef TransitionScene::Orientation tOrientation; - -CC_DEPRECATED_ATTRIBUTE const int kCCPrioritySystem = Scheduler::PRIORITY_SYSTEM; -CC_DEPRECATED_ATTRIBUTE const int kCCPriorityNonSystemMin = Scheduler::PRIORITY_NON_SYSTEM_MIN; - -CC_DEPRECATED_ATTRIBUTE const int kCCActionTagInvalid = Action::INVALID_TAG; -CC_DEPRECATED_ATTRIBUTE const int kCCNodeTagInvalid = Node::INVALID_TAG; - -CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnEnter = kNodeOnEnter; -CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnExit = kNodeOnExit; -CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnEnterTransitionDidFinish = kNodeOnEnterTransitionDidFinish; -CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnExitTransitionDidStart = kNodeOnExitTransitionDidStart; -CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnCleanup = kNodeOnCleanup; - - -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageEnglish = LanguageType::ENGLISH; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageChinese = LanguageType::CHINESE; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageFrench = LanguageType::FRENCH; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageItalian = LanguageType::ITALIAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageGerman = LanguageType::GERMAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageSpanish = LanguageType::SPANISH; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageRussian = LanguageType::RUSSIAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageKorean = LanguageType::KOREAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageJapanese = LanguageType::JAPANESE; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageHungarian = LanguageType::HUNGARIAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguagePortuguese = LanguageType::PORTUGUESE; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageArabic = LanguageType::ARABIC; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageNorwegian = LanguageType::NORWEGIAN; -CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguagePolish = LanguageType::POLISH; -CC_DEPRECATED_ATTRIBUTE typedef LanguageType ccLanguageType; - - -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetWindows = Application::Platform::OS_WINDOWS; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetLinux = Application::Platform::OS_LINUX; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetMacOS = Application::Platform::OS_MAC; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetAndroid = Application::Platform::OS_ANDROID; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetIphone = Application::Platform::OS_IPHONE; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetIpad = Application::Platform::OS_IPAD; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetBlackBerry = Application::Platform::OS_BLACKBERRY; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetNaCl = Application::Platform::OS_NACL; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetEmscripten = Application::Platform::OS_EMSCRIPTEN; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetTizen = Application::Platform::OS_TIZEN; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetWinRT = Application::Platform::OS_WINRT; -CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetWP8 = Application::Platform::OS_WP8; -CC_DEPRECATED_ATTRIBUTE typedef Application::Platform TargetPlatform; - -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionExactFit = ResolutionPolicy::EXACT_FIT; -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionNoBorder = ResolutionPolicy::NO_BORDER; -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionShowAll = ResolutionPolicy::SHOW_ALL; -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionFixedHeight = ResolutionPolicy::FIXED_HEIGHT; -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionFixedWidth = ResolutionPolicy::FIXED_WIDTH; -CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionUnKnown = ResolutionPolicy::UNKNOWN; - - -#define kCCTMXTileHorizontalFlag kTMXTileHorizontalFlag -#define kCCTMXTileVerticalFlag kTMXTileVerticalFlag -#define kCCTMXTileDiagonalFlag kTMXTileDiagonalFlag -#define kCCFlipedAll kFlipedAll -#define kCCFlippedMask kTMXFlippedMask - - -/** use log() instead */ -CC_DEPRECATED_ATTRIBUTE void CC_DLL CCLog(const char * pszFormat, ...) CC_FORMAT_PRINTF(1, 2); - -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawInit(); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawFree(); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoint( const Vec2& point ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoints( const Vec2 *points, unsigned int numberOfPoints ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawLine( const Vec2& origin, const Vec2& destination ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawRect( Vec2 origin, Vec2 destination ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidRect( Vec2 origin, Vec2 destination, Color4F color ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoly( const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidPoly( const Vec2 *poli, unsigned int numberOfPoints, Color4F color ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCatmullRom( PointArray *arrayOfControlPoints, unsigned int segments ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCardinalSpline( PointArray *config, float tension, unsigned int segments ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a ); -CC_DEPRECATED_ATTRIBUTE void CC_DLL ccPointSize( GLfloat pointSize ); - - -CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLEnable( int flags ) { /* ignore */ }; -CC_DEPRECATED_ATTRIBUTE typedef int ccGLServerState; - -CC_DEPRECATED_ATTRIBUTE typedef Data CCData; -CC_DEPRECATED_ATTRIBUTE typedef __Set CCSet; -CC_DEPRECATED_ATTRIBUTE typedef __SetIterator CCSetIterator; -CC_DEPRECATED_ATTRIBUTE typedef __Set Set; -CC_DEPRECATED_ATTRIBUTE typedef __SetIterator SetIterator; - -CC_DEPRECATED_ATTRIBUTE typedef __Array CCArray; -CC_DEPRECATED_ATTRIBUTE typedef __Array Array; - -CC_DEPRECATED_ATTRIBUTE typedef __Dictionary Dictionary; -CC_DEPRECATED_ATTRIBUTE typedef __Dictionary CCDictionary; - -CC_DEPRECATED_ATTRIBUTE typedef __Double Double; -CC_DEPRECATED_ATTRIBUTE typedef __Double CCDouble; -CC_DEPRECATED_ATTRIBUTE typedef __Float Float; -CC_DEPRECATED_ATTRIBUTE typedef __Float CCFloat; -CC_DEPRECATED_ATTRIBUTE typedef __Integer Integer; -CC_DEPRECATED_ATTRIBUTE typedef __Integer CCInteger; -CC_DEPRECATED_ATTRIBUTE typedef __Bool Bool; -CC_DEPRECATED_ATTRIBUTE typedef __Bool CCBool; -CC_DEPRECATED_ATTRIBUTE typedef __String CCString; -CC_DEPRECATED_ATTRIBUTE typedef __String String; - -CC_DEPRECATED_ATTRIBUTE typedef __RGBAProtocol RGBAProtocol; -CC_DEPRECATED_ATTRIBUTE typedef __NodeRGBA NodeRGBA; -CC_DEPRECATED_ATTRIBUTE typedef __LayerRGBA LayerRGBA; - -//deprecated attributes and methods for kazMath -CC_DEPRECATED_ATTRIBUTE typedef float kmScalar; - -//kmMat4 and kmMat4 stack -CC_DEPRECATED_ATTRIBUTE typedef Mat4 kmMat4; -CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_MODELVIEW = 0x1700; -CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_PROJECTION = 0x1701; -CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_TEXTURE = 0x1702; - -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLFreeAll(void); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLPushMatrix(void); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLPopMatrix(void); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLMatrixMode(unsigned int mode); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLLoadIdentity(void); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLLoadMatrix(const Mat4* pIn); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLMultMatrix(const Mat4* pIn); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLTranslatef(float x, float y, float z); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLRotatef(float angle, float x, float y, float z); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLScalef(float x, float y, float z); -CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLGetMatrix(unsigned int mode, Mat4* pOut); - -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Fill(Mat4* pOut, const float* pMat); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Assign(Mat4* pOut, const Mat4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Identity(Mat4* pOut); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Inverse(Mat4* pOut, const Mat4* pM); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Transpose(Mat4* pOut, const Mat4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Multiply(Mat4* pOut, const Mat4* pM1, const Mat4* pM2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Translation(Mat4* pOut, const float x, const float y, const float z); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationX(Mat4* pOut, const float radians); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationY(Mat4* pOut, const float radians); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationZ(Mat4* pOut, const float radians); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationAxisAngle(Mat4* pOut, const Vec3* axis, float radians); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Scaling(Mat4* pOut, const float x, const float y, const float z); - -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4PerspectiveProjection(Mat4* pOut, float fovY, float aspect, float zNear, float zFar); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4OrthographicProjection(Mat4* pOut, float left, float right, float bottom, float top, float nearVal, float farVal); -CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4LookAt(Mat4* pOut, const Vec3* pEye, const Vec3* pCenter, const Vec3* pUp); - -//kmVec3 -CC_DEPRECATED_ATTRIBUTE typedef Vec3 kmVec3; -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Fill(Vec3* pOut, float x, float y, float z); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3Length(const Vec3* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3LengthSq(const Vec3* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Lerp(Vec3* pOut, const Vec3* pV1, const Vec3* pV2, float t); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Normalize(Vec3* pOut, const Vec3* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Cross(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3Dot(const Vec3* pV1, const Vec3* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Add(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Subtract(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); - -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Transform(Vec3* pOut, const Vec3* pV1, const Mat4* pM); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3TransformNormal(Vec3* pOut, const Vec3* pV, const Mat4* pM); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3TransformCoord(Vec3* pOut, const Vec3* pV, const Mat4* pM); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Scale(Vec3* pOut, const Vec3* pIn, const float s); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Assign(Vec3* pOut, const Vec3* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Zero(Vec3* pOut); - -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_Z; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_Z; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_Y; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_Y; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_X; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_X; -CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_ZERO; - -//kmVec2 -CC_DEPRECATED_ATTRIBUTE typedef Vec2 kmVec2; -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Fill(Vec2* pOut, float x, float y); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2Length(const Vec2* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2LengthSq(const Vec2* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Normalize(Vec2* pOut, const Vec2* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Lerp(Vec2* pOut, const Vec2* pV1, const Vec2* pV2, float t); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Add(Vec2* pOut, const Vec2* pV1, const Vec2* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2Dot(const Vec2* pV1, const Vec2* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Subtract(Vec2* pOut, const Vec2* pV1, const Vec2* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Scale(Vec2* pOut, const Vec2* pIn, const float s); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Assign(Vec2* pOut, const Vec2* pIn); - -CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_POS_Y; -CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_NEG_Y; -CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_NEG_X; -CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_POS_X; -CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_ZERO; - -//kmVec4 -CC_DEPRECATED_ATTRIBUTE typedef Vec4 kmVec4; -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Fill(Vec4* pOut, float x, float y, float z, float w); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Add(Vec4* pOut, const Vec4* pV1, const Vec4* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4Dot(const Vec4* pV1, const Vec4* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4Length(const Vec4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4LengthSq(const Vec4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Lerp(Vec4* pOut, const Vec4* pV1, const Vec4* pV2, float t); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Normalize(Vec4* pOut, const Vec4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Scale(Vec4* pOut, const Vec4* pIn, const float s); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Subtract(Vec4* pOut, const Vec4* pV1, const Vec4* pV2); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Assign(Vec4* pOut, const Vec4* pIn); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4MultiplyMat4(Vec4* pOut, const Vec4* pV, const Mat4* pM); -CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV, const Mat4* pM); - -//end of deprecated attributes and methods for kazMath - -NS_CC_END - -/// @endcond -#endif // __COCOS2D_CCDEPRECATED_H__ diff --git a/cocos/deprecated/CCDictionary.cpp b/cocos/deprecated/CCDictionary.cpp deleted file mode 100644 index 35d389b843dd..000000000000 --- a/cocos/deprecated/CCDictionary.cpp +++ /dev/null @@ -1,617 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "deprecated/CCDictionary.h" -#include -#include "base/ccUTF8.h" -#include "platform/CCFileUtils.h" -#include "deprecated/CCString.h" -#include "deprecated/CCBool.h" -#include "deprecated/CCInteger.h" -#include "deprecated/CCFloat.h" -#include "deprecated/CCDouble.h" -#include "deprecated/CCArray.h" - -using namespace std; - -NS_CC_BEGIN - -// ----------------------------------------------------------------------- -// DictElement - -DictElement::DictElement(const char* pszKey, Ref* pObject) -{ - CCASSERT(pszKey && strlen(pszKey) > 0, "Invalid key value."); - _intKey = 0; - const char* pStart = pszKey; - - size_t len = strlen(pszKey); - if (len > MAX_KEY_LEN ) - { - char* pEnd = (char*)&pszKey[len-1]; - pStart = pEnd - (MAX_KEY_LEN-1); - } - - strcpy(_strKey, pStart); - - _object = pObject; - memset(&hh, 0, sizeof(hh)); -} - -DictElement::DictElement(intptr_t iKey, Ref* pObject) -{ - _strKey[0] = '\0'; - _intKey = iKey; - _object = pObject; - memset(&hh, 0, sizeof(hh)); -} - -DictElement::~DictElement() -{ - CCLOGINFO("deallocing DictElement: %p", this); -} - -// ----------------------------------------------------------------------- -// __Dictionary - -__Dictionary::__Dictionary() -: _elements(nullptr) -, _dictType(kDictUnknown) -{ - -} - -__Dictionary::~__Dictionary() -{ - CCLOGINFO("deallocing __Dictionary: %p", this); - removeAllObjects(); -} - -unsigned int __Dictionary::count() -{ - return HASH_COUNT(_elements); -} - -__Array* __Dictionary::allKeys() -{ - int iKeyCount = this->count(); - if (iKeyCount <= 0) return nullptr; - - __Array* array = __Array::createWithCapacity(iKeyCount); - - DictElement *pElement, *tmp; - if (_dictType == kDictStr) - { - HASH_ITER(hh, _elements, pElement, tmp) - { - __String* pOneKey = new (std::nothrow) __String(pElement->_strKey); - array->addObject(pOneKey); - CC_SAFE_RELEASE(pOneKey); - } - } - else if (_dictType == kDictInt) - { - HASH_ITER(hh, _elements, pElement, tmp) - { - __Integer* pOneKey = new (std::nothrow) __Integer(static_cast(pElement->_intKey)); - array->addObject(pOneKey); - CC_SAFE_RELEASE(pOneKey); - } - } - - return array; -} - -__Array* __Dictionary::allKeysForObject(Ref* object) -{ - int iKeyCount = this->count(); - if (iKeyCount <= 0) return nullptr; - __Array* array = __Array::create(); - - DictElement *pElement, *tmp; - - if (_dictType == kDictStr) - { - HASH_ITER(hh, _elements, pElement, tmp) - { - if (object == pElement->_object) - { - __String* pOneKey = new (std::nothrow) __String(pElement->_strKey); - array->addObject(pOneKey); - CC_SAFE_RELEASE(pOneKey); - } - } - } - else if (_dictType == kDictInt) - { - HASH_ITER(hh, _elements, pElement, tmp) - { - if (object == pElement->_object) - { - __Integer* pOneKey = new (std::nothrow) __Integer(static_cast(pElement->_intKey)); - array->addObject(pOneKey); - CC_SAFE_RELEASE(pOneKey); - } - } - } - return array; -} - -Ref* __Dictionary::objectForKey(const std::string& key) -{ - // if dictionary wasn't initialized, return nullptr directly. - if (_dictType == kDictUnknown) return nullptr; - // __Dictionary only supports one kind of key, string or integer. - // This method uses string as key, therefore we should make sure that the key type of this __Dictionary is string. - CCASSERT(_dictType == kDictStr, "this dictionary does not use string as key."); - - Ref* pRetObject = nullptr; - DictElement *pElement = nullptr; - HASH_FIND_STR(_elements, key.c_str(), pElement); - if (pElement != nullptr) - { - pRetObject = pElement->_object; - } - return pRetObject; -} - -Ref* __Dictionary::objectForKey(intptr_t key) -{ - // if dictionary wasn't initialized, return nullptr directly. - if (_dictType == kDictUnknown) return nullptr; - // __Dictionary only supports one kind of key, string or integer. - // This method uses integer as key, therefore we should make sure that the key type of this __Dictionary is integer. - CCASSERT(_dictType == kDictInt, "this dictionary does not use integer as key."); - - Ref* pRetObject = nullptr; - DictElement *pElement = nullptr; - HASH_FIND_PTR(_elements, &key, pElement); - if (pElement != nullptr) - { - pRetObject = pElement->_object; - } - return pRetObject; -} - -const __String* __Dictionary::valueForKey(const std::string& key) -{ - __String* pStr = dynamic_cast<__String*>(objectForKey(key)); - if (pStr == nullptr) - { - pStr = __String::create(""); - } - return pStr; -} - -const __String* __Dictionary::valueForKey(intptr_t key) -{ - __String* pStr = dynamic_cast<__String*>(objectForKey(key)); - if (pStr == nullptr) - { - pStr = __String::create(""); - } - return pStr; -} - -void __Dictionary::setObject(Ref* pObject, const std::string& key) -{ - CCASSERT(!key.empty() && pObject != nullptr, "Invalid Argument!"); - if (_dictType == kDictUnknown) - { - _dictType = kDictStr; - } - - CCASSERT(_dictType == kDictStr, "this dictionary doesn't use string as key."); - - DictElement *pElement = nullptr; - HASH_FIND_STR(_elements, key.c_str(), pElement); - if (pElement == nullptr) - { - setObjectUnSafe(pObject, key); - } - else if (pElement->_object != pObject) - { - Ref* pTmpObj = pElement->_object; - pTmpObj->retain(); - removeObjectForElememt(pElement); - setObjectUnSafe(pObject, key); - pTmpObj->release(); - } -} - -void __Dictionary::setObject(Ref* pObject, intptr_t key) -{ - CCASSERT(pObject != nullptr, "Invalid Argument!"); - if (_dictType == kDictUnknown) - { - _dictType = kDictInt; - } - - CCASSERT(_dictType == kDictInt, "this dictionary doesn't use integer as key."); - - DictElement *pElement = nullptr; - HASH_FIND_PTR(_elements, &key, pElement); - if (pElement == nullptr) - { - setObjectUnSafe(pObject, key); - } - else if (pElement->_object != pObject) - { - Ref* pTmpObj = pElement->_object; - pTmpObj->retain(); - removeObjectForElememt(pElement); - setObjectUnSafe(pObject, key); - pTmpObj->release(); - } - -} - -void __Dictionary::removeObjectForKey(const std::string& key) -{ - if (_dictType == kDictUnknown) - { - return; - } - - CCASSERT(_dictType == kDictStr, "this dictionary doesn't use string as its key"); - CCASSERT(!key.empty(), "Invalid Argument!"); - DictElement *pElement = nullptr; - HASH_FIND_STR(_elements, key.c_str(), pElement); - removeObjectForElememt(pElement); -} - -void __Dictionary::removeObjectForKey(intptr_t key) -{ - if (_dictType == kDictUnknown) - { - return; - } - - CCASSERT(_dictType == kDictInt, "this dictionary doesn't use integer as its key"); - DictElement *pElement = nullptr; - HASH_FIND_PTR(_elements, &key, pElement); - removeObjectForElememt(pElement); -} - -void __Dictionary::setObjectUnSafe(Ref* pObject, const std::string& key) -{ - pObject->retain(); - DictElement* pElement = new (std::nothrow) DictElement(key.c_str(), pObject); - HASH_ADD_STR(_elements, _strKey, pElement); -} - -void __Dictionary::setObjectUnSafe(Ref* pObject, const intptr_t key) -{ - pObject->retain(); - DictElement* pElement = new (std::nothrow) DictElement(key, pObject); - HASH_ADD_PTR(_elements, _intKey, pElement); -} - -void __Dictionary::removeObjectsForKeys(__Array* pKey__Array) -{ - Ref* pObj = nullptr; - CCARRAY_FOREACH(pKey__Array, pObj) - { - __String* pStr = static_cast<__String*>(pObj); - removeObjectForKey(pStr->getCString()); - } -} - -void __Dictionary::removeObjectForElememt(DictElement* pElement) -{ - if (pElement != nullptr) - { - HASH_DEL(_elements, pElement); - pElement->_object->release(); - CC_SAFE_DELETE(pElement); - } -} - -void __Dictionary::removeAllObjects() -{ - DictElement *pElement, *tmp; - HASH_ITER(hh, _elements, pElement, tmp) - { - HASH_DEL(_elements, pElement); - pElement->_object->release(); - CC_SAFE_DELETE(pElement); - - } -} - -Ref* __Dictionary::randomObject() -{ - if (_dictType == kDictUnknown) - { - return nullptr; - } - - Ref* key = allKeys()->getRandomObject(); - - if (_dictType == kDictInt) - { - return objectForKey( static_cast<__Integer*>(key)->getValue()); - } - else if (_dictType == kDictStr) - { - return objectForKey( static_cast<__String*>(key)->getCString()); - } - else - { - return nullptr; - } -} - -__Dictionary* __Dictionary::create() -{ - __Dictionary* ret = new (std::nothrow) __Dictionary(); - if (ret && ret->init() ) - { - ret->autorelease(); - } - return ret; -} - -bool __Dictionary::init() -{ - return true; -} - -__Dictionary* __Dictionary::createWithDictionary(__Dictionary* srcDict) -{ - return srcDict->clone(); -} - -static __Array* visitArray(const ValueVector& array); - -static __Dictionary* visitDict(const ValueMap& dict) -{ - __Dictionary* ret = new (std::nothrow) __Dictionary(); - ret->init(); - - for (auto iter = dict.begin(); iter != dict.end(); ++iter) - { - if (iter->second.getType() == Value::Type::MAP) - { - const ValueMap& subDict = iter->second.asValueMap(); - auto sub = visitDict(subDict); - ret->setObject(sub, iter->first); - sub->release(); - } - else if (iter->second.getType() == Value::Type::VECTOR) - { - const ValueVector& arr = iter->second.asValueVector(); - auto sub = visitArray(arr); - ret->setObject(sub, iter->first); - sub->release(); - } - else - { - auto str = new (std::nothrow) __String(iter->second.asString()); - ret->setObject(str, iter->first); - str->release(); - } - } - return ret; -} - -static __Array* visitArray(const ValueVector& array) -{ - __Array* ret = new (std::nothrow) __Array(); - ret->init(); - - for(const auto &value : array) { - if (value.getType() == Value::Type::MAP) - { - const ValueMap& subDict = value.asValueMap(); - auto sub = visitDict(subDict); - ret->addObject(sub); - sub->release(); - } - else if (value.getType() == Value::Type::VECTOR) - { - const ValueVector& arr = value.asValueVector(); - auto sub = visitArray(arr); - ret->addObject(sub); - sub->release(); - } - else - { - auto str = new (std::nothrow) __String(value.asString()); - ret->addObject(str); - str->release(); - } - } - - return ret; -} - -__Dictionary* __Dictionary::createWithContentsOfFileThreadSafe(const char *pFileName) -{ - return visitDict(FileUtils::getInstance()->getValueMapFromFile(pFileName)); -} - -void __Dictionary::acceptVisitor(DataVisitor &visitor) -{ - return visitor.visit(this); -} - -__Dictionary* __Dictionary::createWithContentsOfFile(const char *pFileName) -{ - auto ret = createWithContentsOfFileThreadSafe(pFileName); - if (ret != nullptr) - { - ret->autorelease(); - } - return ret; -} - -static ValueMap ccdictionary_to_valuemap(__Dictionary* dict); - -static ValueVector ccarray_to_valuevector(__Array* arr) -{ - ValueVector ret; - - Ref* obj; - CCARRAY_FOREACH(arr, obj) - { - Value arrElement; - - __String* strVal = nullptr; - __Dictionary* dictVal = nullptr; - __Array* arrVal = nullptr; - __Double* doubleVal = nullptr; - __Bool* boolVal = nullptr; - __Float* floatVal = nullptr; - __Integer* intVal = nullptr; - - if ((strVal = dynamic_cast<__String *>(obj))) { - arrElement = Value(strVal->getCString()); - } else if ((dictVal = dynamic_cast<__Dictionary*>(obj))) { - arrElement = ccdictionary_to_valuemap(dictVal); - } else if ((arrVal = dynamic_cast<__Array*>(obj))) { - arrElement = ccarray_to_valuevector(arrVal); - } else if ((doubleVal = dynamic_cast<__Double*>(obj))) { - arrElement = Value(doubleVal->getValue()); - } else if ((floatVal = dynamic_cast<__Float*>(obj))) { - arrElement = Value(floatVal->getValue()); - } else if ((intVal = dynamic_cast<__Integer*>(obj))) { - arrElement = Value(intVal->getValue()); - } else if ((boolVal = dynamic_cast<__Bool*>(obj))) { - arrElement = boolVal->getValue() ? Value(true) : Value(false); - } else { - CCASSERT(false, "the type isn't supported."); - } - - ret.push_back(arrElement); - } - return ret; -} - -static ValueMap ccdictionary_to_valuemap(__Dictionary* dict) -{ - ValueMap ret; - DictElement* pElement = nullptr; - CCDICT_FOREACH(dict, pElement) - { - Ref* obj = pElement->getObject(); - - __String* strVal = nullptr; - __Dictionary* dictVal = nullptr; - __Array* arrVal = nullptr; - __Double* doubleVal = nullptr; - __Bool* boolVal = nullptr; - __Float* floatVal = nullptr; - __Integer* intVal = nullptr; - - Value dictElement; - - if ((strVal = dynamic_cast<__String *>(obj))) { - dictElement = Value(strVal->getCString()); - } else if ((dictVal = dynamic_cast<__Dictionary*>(obj))) { - dictElement = ccdictionary_to_valuemap(dictVal); - } else if ((arrVal = dynamic_cast<__Array*>(obj))) { - dictElement = ccarray_to_valuevector(arrVal); - } else if ((doubleVal = dynamic_cast<__Double*>(obj))) { - dictElement = Value(doubleVal->getValue()); - } else if ((floatVal = dynamic_cast<__Float*>(obj))) { - dictElement = Value(floatVal->getValue()); - } else if ((intVal = dynamic_cast<__Integer*>(obj))) { - dictElement = Value(intVal->getValue()); - } else if ((boolVal = dynamic_cast<__Bool*>(obj))) { - dictElement = boolVal->getValue() ? Value(true) : Value(false); - } else { - CCASSERT(false, "the type isn't supported."); - } - - const char* key = pElement->getStrKey(); - if (key && strlen(key) > 0) - { - ret[key] = dictElement; - } - } - return ret; -} - - -bool __Dictionary::writeToFile(const char *fullPath) -{ - ValueMap dict = ccdictionary_to_valuemap(this); - return FileUtils::getInstance()->writeToFile(dict, fullPath); -} - -__Dictionary* __Dictionary::clone() const -{ - __Dictionary* newDict = __Dictionary::create(); - - DictElement* element = nullptr; - Ref* tmpObj = nullptr; - Clonable* obj = nullptr; - if (_dictType == kDictInt) - { - DictElement* tmp = nullptr; - HASH_ITER(hh, _elements, element, tmp) - { - obj = dynamic_cast(element->getObject()); - if (obj) - { - tmpObj = dynamic_cast(obj->clone()); - if (tmpObj) - { - newDict->setObject(tmpObj, element->getIntKey()); - } - } - else - { - CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointergetObject())>::type).name()); - } - } - } - else if (_dictType == kDictStr) - { - DictElement* tmp = nullptr; - HASH_ITER(hh, _elements, element, tmp) - { - obj = dynamic_cast(element->getObject()); - if (obj) - { - tmpObj = dynamic_cast(obj->clone()); - if (tmpObj) - { - newDict->setObject(tmpObj, element->getStrKey()); - } - } - else - { - CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointergetObject())>::type).name()); - } - } - } - - return newDict; -} - -NS_CC_END diff --git a/cocos/deprecated/CCDictionary.h b/cocos/deprecated/CCDictionary.h deleted file mode 100644 index 0f7126ca16f2..000000000000 --- a/cocos/deprecated/CCDictionary.h +++ /dev/null @@ -1,462 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDICTIONARY_H__ -#define __CCDICTIONARY_H__ -/// @cond DO_NOT_SHOW - -#include "base/uthash.h" -#include "base/CCRef.h" -#include "deprecated/CCArray.h" -#include "deprecated/CCString.h" - -NS_CC_BEGIN - -class __Dictionary; - -/** - * @addtogroup data_structures - * @{ - */ - - -/** - * DictElement is used for traversing Dictionary. - * - * A DictElement is one element of Dictionary, it contains two properties, key and object. - * Its key has two different type (integer and string). - * - * @note The key type is unique, all the elements in Dictionary has the same key type(integer or string). - * @code - * DictElement* pElement; - * CCDICT_FOREACH(dict, pElement) - * { - * const char*key = pElement->getStrKey(); - * // You certainly know the type of value, so we assume that it's a Sprite. - * Sprite* pSprite = static_cast(pElement->getObject()); - * // ...... - * } - * @endcode - * - */ -class CC_DLL DictElement -{ -private: - /** - * Constructor of DictElement. It's only for internal usage. Dictionary is its friend class. - * - * @param pszKey The string key of this element. - * @param pObject The object of this element. - */ - DictElement(const char* pszKey, Ref* pObject); - - /** - * Constructor of DictElement. It's only for internal usage. Dictionary is its friend class. - * - * @param iKey The integer key of this element. - * @param pObject The object of this element. - */ - DictElement(intptr_t iKey, Ref* pObject); - -public: - /** - * The destructor of DictElement. - * @js NA - * @lua NA - */ - ~DictElement(); - - // Inline functions need to be implemented in header file on Android. - - /** - * Get the string key of this element. - * @note This method assumes you know the key type in the element. - * If the element's key type is integer, invoking this method will cause an assert. - * - * @return The string key of this element. - */ - const char* getStrKey() const - { - CCASSERT(_strKey[0] != '\0', "Should not call this function for integer dictionary"); - return _strKey; - } - - /** - * Get the integer key of this element. - * @note This method assumes you know the key type in the element. - * If the element's key type is string, invoking this method will cause an assert. - * - * @return The integer key of this element. - */ - intptr_t getIntKey() const - { - CCASSERT(_strKey[0] == '\0', "Should not call this function for string dictionary"); - return _intKey; - } - - /** - * Get the object of this element. - * - * @return The object of this element. - */ - Ref* getObject() const { return _object; } - -private: - // The max length of string key. - #define MAX_KEY_LEN 256 - // char array is needed for HASH_ADD_STR in UT_HASH. - // So it's a pain that all elements will allocate 256 bytes for this array. - char _strKey[MAX_KEY_LEN]; // hash key of string type - intptr_t _intKey; // hash key of integer type - Ref* _object; // hash value -public: - UT_hash_handle hh; // makes this class hashable - friend class __Dictionary; // declare Dictionary as friend class -}; - -/** The macro for traversing dictionary - * - * @note It's faster than getting all keys and traversing keys to get objects by objectForKey. - * It's also safe to remove elements while traversing. - */ -#define CCDICT_FOREACH(__dict__, __el__) \ - DictElement* pTmp##__dict__##__el__ = nullptr; \ - if (__dict__) \ - HASH_ITER(hh, (__dict__)->_elements, __el__, pTmp##__dict__##__el__) - - - -/** - * Dictionary is a class like NSDictionary in Obj-C . - * - * @note Only the pointer of Object or its subclass can be inserted to Dictionary. - * @code - * // Create a dictionary, return an autorelease object. - * Dictionary* pDict = Dictionary::create(); - * - * // Insert objects to dictionary - * String* pValue1 = String::create("100"); - * String* pValue2 = String::create("120"); - * Integer* pValue3 = Integer::create(200); - * pDict->setObject(pValue1, "key1"); - * pDict->setObject(pValue2, "key2"); - * pDict->setObject(pValue3, "key3"); - * - * // Get the object for key - * String* pStr1 = static_cast(pDict->objectForKey("key1")); - * log("{ key1: %s }", pStr1->getCString()); - * Integer* pInteger = static_cast(pDict->objectForKey("key3")); - * log("{ key3: %d }", pInteger->getValue()); - * @endcode - * - */ - -class CC_DLL __Dictionary : public Ref, public Clonable -{ -public: - /** - * The constructor of Dictionary. - * @js NA - * @lua NA - */ - __Dictionary(); - - /** - * The destructor of Dictionary - * @js NA - * @lua NA - */ - ~__Dictionary(); - - /** Initializes the dictionary. It returns true if the initializations was successful. - * @js NA - * @lua NA - */ - bool init(); - /** - * Get the count of elements in Dictionary. - * - * @return The count of elements. - * @js NA - */ - unsigned int count(); - - /** - * Return all keys of elements. - * - * @return The array contains all keys of elements. It's an autorelease object yet. - * @js NA - */ - __Array* allKeys(); - - /** - * Get all keys according to the specified object. - * @warning We use '==' to compare two objects - * @return The array contains all keys for the specified object. It's an autorelease object yet. - * @js NA - */ - __Array* allKeysForObject(Ref* object); - - /** - * Get the object according to the specified string key. - * - * @note The dictionary needs to use string as key. If integer is passed, an assert will appear. - * @param key The string key for searching. - * @return The object matches the key. You need to force convert it to the type you know. - * @code - * // Assume that the elements are String* pointers. Convert it by following code. - * String* pStr = static_cast(pDict->objectForKey("key1")); - * // Do something about pStr. - * // If you don't know the object type, properly you need to use dynamic_cast to check it. - * String* pStr2 = dynamic_cast(pDict->objectForKey("key1")); - * if (pStr2 != NULL) { - * // Do something about pStr2 - * } - * @endcode - * @see objectForKey(intptr_t) - * @js NA - */ - Ref* objectForKey(const std::string& key); - - /** - * Get the object according to the specified integer key. - * - * @note The dictionary needs to use integer as key. If string is passed, an assert will appear. - * @param key The integer key for searching. - * @return The object matches the key. - * @see objectForKey(const std::string&) - * @js NA - */ - Ref* objectForKey(intptr_t key); - - /** Get the value according to the specified string key. - * - * @note Be careful to use this function since it assumes the objects in the dictionary are __String pointer. - * @param key The string key for searching - * @return An instance of String. - * It will return an empty string if the objects aren't __String pointer or the key wasn't found. - * @see valueForKey(intptr_t) - * @js NA - */ - const __String* valueForKey(const std::string& key); - - /** Get the value according to the specified integer key. - * - * @note Be careful to use this function since it assumes the objects in the dictionary are __String pointer. - * @param key The string key for searching. - * @return An instance of String. - * It will return an empty string if the objects aren't __String pointer or the key wasn't found. - * @see valueForKey(intptr_t) - * @js NA - */ - const __String* valueForKey(intptr_t key); - - /** Insert an object to dictionary, and match it with the specified string key. - * - * @note When the first time this method is invoked, the key type will be set to string. - * After that you can't setObject with an integer key. - * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. - * Then the new object will be inserted after that. - * - * @param pObject The Object to be inserted. - * @param key The string key for searching. - * @see setObject(Ref*, intptr_t) - * @js NA - */ - void setObject(Ref* pObject, const std::string& key); - - /** Insert an object to dictionary, and match it with the specified string key. - * - * @note Then the first time this method is invoked, the key type will be set to string. - * After that you can't setObject with an integer key. - * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. - * Then the new object will be inserted after that. - * @param pObject The Object to be inserted. - * @param key The string key for searching. - * @see setObject(Ref*, const std::string&) - * @js NA - */ - void setObject(Ref* pObject, intptr_t key); - - /** - * Remove an object by the specified string key. - * - * @param key The string key for searching. - * @see removeObjectForKey(intptr_t), removeObjectsForKeys(__Array*), - * removeObjectForElememt(DictElement*), removeAllObjects(). - * @js NA - */ - void removeObjectForKey(const std::string& key); - - /** - * Remove an object by the specified integer key. - * - * @param key The integer key for searching. - * @see removeObjectForKey(const std::string&), removeObjectsForKeys(__Array*), - * removeObjectForElememt(DictElement*), removeAllObjects(). - * @js NA - */ - void removeObjectForKey(intptr_t key); - - /** - * Remove objects by an array of keys. - * - * @param pKeyArray The array contains keys to be removed. - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectForElememt(DictElement*), removeAllObjects(). - * @js NA - */ - void removeObjectsForKeys(__Array* pKey__Array); - - /** - * Remove an object by an element. - * - * @param pElement The element need to be removed. - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectsForKeys(__Array*), removeAllObjects(). - * @js NA - * @lua NA - */ - void removeObjectForElememt(DictElement* pElement); - - /** - * Remove all objects in the dictionary. - * - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectsForKeys(__Array*), removeObjectForElememt(DictElement*). - * @js NA - */ - void removeAllObjects(); - - /** - * Return a random object in the dictionary. - * - * @return The random object. - * @see objectForKey(intptr_t), objectForKey(const std::string&) - * @js NA - * @lua NA - */ - Ref* randomObject(); - - /** - * Create a dictionary. - * @return A dictionary which is an autorelease object. - * @see createWithDictionary(Dictionary*), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). - * @js NA - */ - static __Dictionary* create(); - - /** - * Create a dictionary with an existing dictionary. - * - * @param srcDict The exist dictionary. - * @return A dictionary which is an autorelease object. - * @see create(), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). - * @js NA - */ - static __Dictionary* createWithDictionary(__Dictionary* srcDict); - - /** - * Create a dictionary with a plist file. - * @param pFileName The name of the plist file. - * @return A dictionary which is an autorelease object. - * @see create(), createWithDictionary(Dictionary*), createWithContentsOfFileThreadSafe(const char*). - * @js NA - */ - static __Dictionary* createWithContentsOfFile(const char *pFileName); - - /** - * Write a dictionary to a plist file. - * @param fullPath The full path of the plist file. You can get writable path by getWritablePath() - * @return true if succeeded, false if failed - * @js NA - * @lua NA - */ - bool writeToFile(const char *fullPath); - - /** - * Create a dictionary with a plist file. - * - * @note the return object isn't an autorelease object. - * This can make sure not using autorelease pool in a new thread. - * Therefore, you need to manage the lifecycle of the return object. - * It means that when you don't need it, CC_SAFE_RELEASE needs to be invoked. - * - * @param pFileName The name of the plist file. - * @return A dictionary which isn't an autorelease object. - * @js NA - * @lua NA - */ - static __Dictionary* createWithContentsOfFileThreadSafe(const char *pFileName); - - /* override functions - * @js NA - * @lua NA - */ - virtual void acceptVisitor(DataVisitor &visitor); - /** - * @js NA - * @lua NA - */ - virtual __Dictionary* clone() const override; - -private: - /** - * For internal usage, invoked by setObject. - */ - void setObjectUnSafe(Ref* pObject, const std::string& key); - void setObjectUnSafe(Ref* pObject, const intptr_t key); - -public: - /** - * All the elements in dictionary. - * - * @note For internal usage, we need to declare this member variable as public since it's used in UT_HASH. - */ - DictElement* _elements; -private: - - /** The support type of dictionary, it's confirmed when setObject is invoked. */ - enum DictType - { - kDictUnknown = 0, - kDictStr, - kDictInt - }; - - /** - * The type of dictionary, it's assigned to kDictUnknown by default. - */ - DictType _dictType; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif /* __CCDICTIONARY_H__ */ diff --git a/cocos/deprecated/CCDouble.h b/cocos/deprecated/CCDouble.h deleted file mode 100644 index 54e03f62dcc9..000000000000 --- a/cocos/deprecated/CCDouble.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2017 Chukong Technologies - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCDOUBLE_H__ -#define __CCDOUBLE_H__ -/// @cond DO_NOT_SHOW - -#include "base/CCRef.h" -#include "base/CCDataVisitor.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CC_DLL __Double : public Ref, public Clonable -{ -public: - __Double(double v) - : _value(v) {} - double getValue() const {return _value;} - - static __Double* create(double v) - { - __Double* pRet = new (std::nothrow) __Double(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } - - virtual __Double* clone() const override - { - return __Double::create(_value); - } -private: - double _value; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif /* __CCDOUBLE_H__ */ diff --git a/cocos/deprecated/CCFloat.h b/cocos/deprecated/CCFloat.h deleted file mode 100644 index d79ebed9b787..000000000000 --- a/cocos/deprecated/CCFloat.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2017 Chukong Technologies - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCFLOAT_H__ -#define __CCFLOAT_H__ -/// @cond DO_NOT_SHOW - -#include "base/CCRef.h" -#include "base/CCDataVisitor.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CC_DLL __Float : public Ref, public Clonable -{ -public: - __Float(float v) - : _value(v) {} - float getValue() const {return _value;} - - static __Float* create(float v) - { - __Float* pRet = new (std::nothrow) __Float(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } - - virtual __Float* clone() const override - { - return __Float::create(_value); - } - -private: - float _value; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif /* __CCFLOAT_H__ */ diff --git a/cocos/deprecated/CCInteger.h b/cocos/deprecated/CCInteger.h deleted file mode 100644 index 00929f8a5980..000000000000 --- a/cocos/deprecated/CCInteger.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2017 Chukong Technologies - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCINTEGER_H__ -#define __CCINTEGER_H__ -/// @cond DO_NOT_SHOW - -#include "base/CCRef.h" -#include "base/CCConsole.h" -#include "base/CCDataVisitor.h" -#include "platform/CCCommon.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CC_DLL __Integer : public Ref, public Clonable -{ -public: - static __Integer* create(int v) - { - __Integer* pRet = new (std::nothrow) __Integer(v); - pRet->autorelease(); - return pRet; - } - /** - * @js NA - */ - __Integer(int v) - : _value(v) {} - int getValue() const {return _value;} - /** - * @js NA - * @lua NA - */ - virtual ~__Integer() { - CCLOGINFO("deallocing ~__Integer: %p", this); - } - - /* override functions */ - virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } - - // overrides - virtual __Integer* clone() const override - { - return __Integer::create(_value); - } - -private: - int _value; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif /* __CCINTEGER_H__ */ diff --git a/cocos/deprecated/CCNotificationCenter.cpp b/cocos/deprecated/CCNotificationCenter.cpp deleted file mode 100644 index 77a814130c5a..000000000000 --- a/cocos/deprecated/CCNotificationCenter.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/**************************************************************************** -Copyright (c) 2011 Erawppa -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "deprecated/CCNotificationCenter.h" - -#include - -#include "base/CCScriptSupport.h" -#include "deprecated/CCArray.h" - -using namespace std; - -NS_CC_BEGIN - -static __NotificationCenter *s_sharedNotifCenter = nullptr; - -__NotificationCenter::__NotificationCenter() -: _scriptHandler(0) -{ - _observers = __Array::createWithCapacity(3); - _observers->retain(); -} - -__NotificationCenter::~__NotificationCenter() -{ - _observers->release(); -} - -__NotificationCenter *__NotificationCenter::getInstance() -{ - if (!s_sharedNotifCenter) - { - s_sharedNotifCenter = new (std::nothrow) __NotificationCenter; - } - return s_sharedNotifCenter; -} - -void __NotificationCenter::destroyInstance() -{ - CC_SAFE_RELEASE_NULL(s_sharedNotifCenter); -} - -// FIXME:: deprecated -__NotificationCenter *__NotificationCenter::sharedNotificationCenter(void) -{ - return __NotificationCenter::getInstance(); -} - -// FIXME:: deprecated -void __NotificationCenter::purgeNotificationCenter(void) -{ - __NotificationCenter::destroyInstance(); -} - -// -// internal functions -// -bool __NotificationCenter::observerExisted(Ref *target, const std::string& name, Ref *sender) -{ - Ref* obj = nullptr; - CCARRAY_FOREACH(_observers, obj) - { - NotificationObserver* observer = (NotificationObserver*) obj; - if (!observer) - continue; - - if (observer->getName() == name && observer->getTarget() == target && observer->getSender() == sender) - return true; - } - return false; -} - -// -// observer functions -// -void __NotificationCenter::addObserver(Ref *target, - SEL_CallFuncO selector, - const std::string& name, - Ref *sender) -{ - if (this->observerExisted(target, name, sender)) - return; - - NotificationObserver *observer = new (std::nothrow) NotificationObserver(target, selector, name, sender); - if (!observer) - return; - - observer->autorelease(); - _observers->addObject(observer); -} - -void __NotificationCenter::removeObserver(Ref *target, const std::string& name) -{ - Ref* obj = nullptr; - CCARRAY_FOREACH(_observers, obj) - { - NotificationObserver* observer = static_cast(obj); - if (!observer) - continue; - - if (observer->getName() == name && observer->getTarget() == target) - { - _observers->removeObject(observer); - return; - } - } -} - -int __NotificationCenter::removeAllObservers(Ref *target) -{ - Ref *obj = nullptr; - __Array *toRemove = __Array::create(); - - CCARRAY_FOREACH(_observers, obj) - { - NotificationObserver *observer = static_cast(obj); - if (!observer) - continue; - - if (observer->getTarget() == target) - { - toRemove->addObject(observer); - } - } - - _observers->removeObjectsInArray(toRemove); - return static_cast(toRemove->count()); -} - -void __NotificationCenter::registerScriptObserver(Ref *target, int handler,const std::string& name) -{ - - if (this->observerExisted(target, name, nullptr)) - return; - - NotificationObserver *observer = new (std::nothrow) NotificationObserver(target, nullptr, name, nullptr); - if (!observer) - return; - - observer->setHandler(handler); - observer->autorelease(); - _observers->addObject(observer); -} - -void __NotificationCenter::unregisterScriptObserver(Ref *target,const std::string& name) -{ - Ref* obj = nullptr; - CCARRAY_FOREACH(_observers, obj) - { - NotificationObserver* observer = static_cast(obj); - if (!observer) - continue; - - if ( observer->getName() == name && observer->getTarget() == target) - { - _observers->removeObject(observer); - } - } -} - -void __NotificationCenter::postNotification(const std::string& name, Ref *sender) -{ - __Array* ObserversCopy = __Array::createWithCapacity(_observers->count()); - ObserversCopy->addObjectsFromArray(_observers); - Ref* obj = nullptr; - CCARRAY_FOREACH(ObserversCopy, obj) - { - NotificationObserver* observer = static_cast(obj); - if (!observer) - continue; - - if (observer->getName() == name && (observer->getSender() == sender || observer->getSender() == nullptr || sender == nullptr)) - { - if (0 == observer->getHandler()) - { - observer->performSelector(sender); - } - } - } -} - -void __NotificationCenter::postNotification(const std::string& name) -{ - this->postNotification(name,nullptr); -} - -int __NotificationCenter::getObserverHandlerByName(const std::string& name) -{ - if (name.empty()) - { - return 0; - } - - Ref* obj = nullptr; - CCARRAY_FOREACH(_observers, obj) - { - NotificationObserver* observer = static_cast(obj); - if (nullptr == observer) - continue; - - if ( observer->getName() == name ) - { - return observer->getHandler(); - break; - } - } - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// -/// NotificationObserver -/// -//////////////////////////////////////////////////////////////////////////////// -NotificationObserver::NotificationObserver(Ref *target, - SEL_CallFuncO selector, - const std::string& name, - Ref *sender) -{ - _target = target; - _selector = selector; - _sender = sender; - - _name = name; - _handler = 0; -} - -NotificationObserver::~NotificationObserver() -{ - -} - -void NotificationObserver::performSelector(Ref *sender) -{ - if (_target) - { - if (sender) { - (_target->*_selector)(sender); - } else { - (_target->*_selector)(_sender); - } - } -} - -Ref *NotificationObserver::getTarget() const -{ - return _target; -} - -SEL_CallFuncO NotificationObserver::getSelector() const -{ - return _selector; -} - -const std::string& NotificationObserver::getName() const -{ - return _name; -} - -Ref* NotificationObserver::getSender() const -{ - return _sender; -} - -int NotificationObserver::getHandler() const -{ - return _handler; -} - -void NotificationObserver::setHandler(int var) -{ - _handler = var; -} - -NS_CC_END diff --git a/cocos/deprecated/CCNotificationCenter.h b/cocos/deprecated/CCNotificationCenter.h deleted file mode 100644 index 2e4a61e886ad..000000000000 --- a/cocos/deprecated/CCNotificationCenter.h +++ /dev/null @@ -1,214 +0,0 @@ -/**************************************************************************** -Copyright (c) 2011 Erawppa -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCNOTIFICATIONCENTER_H__ -#define __CCNOTIFICATIONCENTER_H__ -/// @cond DO_NOT_SHOW - -#include "base/CCRef.h" -#include "base/ccTypes.h" - -NS_CC_BEGIN - -class __Array; -class ScriptHandlerMgr; - -/** - * @cond DO_NOT_SHOW - * @{ - */ - -class CC_DLL __NotificationCenter : public Ref -{ - friend class ScriptHandlerMgr; -public: - /** __NotificationCenter constructor - * @js ctor - */ - __NotificationCenter(); - - /** __NotificationCenter destructor - * @js NA - * @lua NA - */ - ~__NotificationCenter(); - - /** Gets the single instance of __NotificationCenter. */ - static __NotificationCenter *getInstance(); - - /** Destroys the single instance of __NotificationCenter. */ - static void destroyInstance(); - - /** @deprecated use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static __NotificationCenter *sharedNotificationCenter(void); - - /** @deprecated use destroyInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static void purgeNotificationCenter(void); - - - /** @brief Adds an observer for the specified target. - * @param target The target which wants to observe notification events. - * @param selector The callback function which will be invoked when the specified notification event was posted. - * @param name The name of this notification. - * @param sender The object whose notifications the target wants to receive. Only notifications sent by this sender are delivered to the target. nullptr means that the sender is not used to decide whether to deliver the notification to target. - */ - void addObserver(Ref *target, - SEL_CallFuncO selector, - const std::string& name, - Ref *sender); - - /** @brief Removes the observer by the specified target and name. - * @param target The target of this notification. - * @param name The name of this notification. - */ - void removeObserver(Ref *target,const std::string& name); - - /** @brief Removes all notifications registered by this target - * @param target The target of this notification. - * @returns the number of observers removed - */ - int removeAllObservers(Ref *target); - - /** @brief Registers one hander for script binding. - * @note Only supports Lua Binding now. - * @param handler The lua handler. - */ - void registerScriptObserver(Ref *target,int handler,const std::string& name); - - /** Unregisters script observer */ - void unregisterScriptObserver(Ref *target,const std::string& name); - - /** @brief Posts one notification event by name. - * @param name The name of this notification. - */ - void postNotification(const std::string& name); - - /** @brief Posts one notification event by name. - * @param name The name of this notification. - * @param sender The object posting the notification. Can be nullptr - */ - void postNotification(const std::string& name, Ref *sender); - - /** @brief Gets script handler. - * @note Only supports Lua Binding now. - * @return The script handle. - */ - int getScriptHandler() const { return _scriptHandler; } - - /** @brief Gets observer script handler. - * @param name The name of this notification. - * @return The observer script handle. - */ - int getObserverHandlerByName(const std::string& name); -private: - // internal functions - - // Check whether the observer exists by the specified target and name. - bool observerExisted(Ref *target,const std::string& name, Ref *sender); - - // variables - // - __Array *_observers; - int _scriptHandler; -}; - -class CC_DLL NotificationObserver : public Ref -{ -public: - /** @brief NotificationObserver constructor - * @param target The target which wants to observer notification events. - * @param selector The callback function which will be invoked when the specified notification event was posted. - * @param name The name of this notification. - * @param sender The object whose notifications the target wants to receive. Only notifications sent by this sender are delivered to the target. nullptr means that the sender is not used to decide whether to deliver the notification to target. - * @js NA - * @lua NA - */ - NotificationObserver(Ref *target, - SEL_CallFuncO selector, - const std::string& name, - Ref *sender); - - /** NotificationObserver destructor function - * @js NA - * @lua NA - */ - ~NotificationObserver(); - - /** Invokes the callback function of this observer - * @js NA - * @lua NA - */ - void performSelector(Ref *sender); - - // Getters / Setters - /** - * @js NA - * @lua NA - */ - Ref* getTarget() const; - /** - * @js NA - * @lua NA - */ - SEL_CallFuncO getSelector() const; - /** - * @js NA - * @lua NA - */ - const std::string& getName() const; - /** - * @js NA - * @lua NA - */ - Ref* getSender() const; - /** - * @js NA - * @lua NA - */ - int getHandler() const; - /** - * @js NA - * @lua NA - */ - void setHandler(int handler); - -private: - Ref* _target; - SEL_CallFuncO _selector; - std::string _name; - Ref* _sender; - int _handler; -}; - -/** - * @} - */ - -NS_CC_END - -/// @endcond -#endif//__CCNOTIFICATIONCENTER_H__ diff --git a/cocos/deprecated/CCSet.cpp b/cocos/deprecated/CCSet.cpp deleted file mode 100644 index e602d1de5af5..000000000000 --- a/cocos/deprecated/CCSet.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2017 Chukong Technologies -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "deprecated/CCSet.h" - -using namespace std; - -NS_CC_BEGIN - -__Set::__Set(void) -{ - _set = new (std::nothrow) set; -} - -__Set::__Set(const __Set &other) -{ - _set = new (std::nothrow) set(*other._set); - - // call retain of members - __SetIterator iter; - for (iter = _set->begin(); iter != _set->end(); ++iter) - { - if (! (*iter)) - { - break; - } - - (*iter)->retain(); - } -} - -__Set::~__Set(void) -{ - removeAllObjects(); - CC_SAFE_DELETE(_set); -} - -void __Set::acceptVisitor(DataVisitor &visitor) -{ - visitor.visit(this); -} - -__Set * __Set::create() -{ - __Set * pRet = new (std::nothrow) __Set(); - - if (pRet != nullptr) - { - pRet->autorelease(); - } - - return pRet; -} - -__Set* __Set::copy(void) -{ - __Set *p__Set = new (std::nothrow) __Set(*this); - - return p__Set; -} - -__Set* __Set::mutableCopy(void) -{ - return copy(); -} - -int __Set::count(void) -{ - return (int)_set->size(); -} - -void __Set::addObject(Ref *pObject) -{ - if (_set->count(pObject) == 0) - { - CC_SAFE_RETAIN(pObject); - _set->insert(pObject); - } -} - -void __Set::removeObject(Ref *pObject) -{ - if (_set->erase(pObject) > 0) - { - CC_SAFE_RELEASE(pObject); - } -} - -void __Set::removeAllObjects() -{ - __SetIterator it = _set->begin(); - __SetIterator tmp; - - while (it != _set->end()) - { - if (!(*it)) - { - break; - } - - tmp = it; - ++tmp; - Ref * obj = *it; - _set->erase(it); - CC_SAFE_RELEASE(obj); - it = tmp; - } -} - -bool __Set::containsObject(Ref *pObject) -{ - return _set->find(pObject) != _set->end(); -} - -__SetIterator __Set::begin(void) -{ - return _set->begin(); -} - -__SetIterator __Set::end(void) -{ - return _set->end(); -} - -Ref* __Set::anyObject() -{ - if (!_set || _set->empty()) - { - return 0; - } - - __SetIterator it; - - for( it = _set->begin(); it != _set->end(); ++it) - { - if (*it) - { - return (*it); - } - } - - return 0; -} - -NS_CC_END diff --git a/cocos/deprecated/CCSet.h b/cocos/deprecated/CCSet.h deleted file mode 100644 index f920cf3b345f..000000000000 --- a/cocos/deprecated/CCSet.h +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2017 Chukong Technologies -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_SET_H__ -#define __CC_SET_H__ -/// @cond DO_NOT_SHOW - -#include -#include "base/CCRef.h" -#include "base/CCDataVisitor.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -typedef std::set::iterator __SetIterator; - -class CC_DLL __Set : public Ref -{ -public: - /** - * @js ctor - */ - __Set(void); - __Set(const __Set &rSetObject); - /** - * @js NA - * @lua NA - */ - virtual ~__Set(void); - - /** - * @brief Create and return a new empty set. - */ - static __Set * create(); - - /** - *@brief Return a copy of the Set, it will copy all the elements. - */ - __Set* copy(); - /** - *@brief It is the same as copy(). - */ - __Set* mutableCopy(); - /** - *@brief Return the number of elements the Set contains. - */ - int count(); - /** - *@brief Add a element into Set, it will retain the element. - */ - void addObject(Ref *pObject); - /** - *@brief Remove the given element, nothing todo if no element equals pObject. - */ - void removeObject(Ref *pObject); - /** - *@brief Remove all elements of the set - */ - void removeAllObjects(); - /** - *@brief Check if Set contains a element equals pObject. - */ - bool containsObject(Ref *pObject); - /** - *@brief Return the iterator that points to the first element. - * @js NA - * @lua NA - */ - __SetIterator begin(); - /** - *@brief Return the iterator that points to the position after the last element. - * @js NA - * @lua NA - */ - __SetIterator end(); - /** - *@brief Return the first element if it contains elements, or null if it doesn't contain any element. - */ - Ref* anyObject(); - /** - * @js NA - * @lua NA - */ - virtual void acceptVisitor(DataVisitor &visitor); - -private: - std::set *_set; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif // __CC_SET_H__ diff --git a/cocos/deprecated/CCString.cpp b/cocos/deprecated/CCString.cpp deleted file mode 100644 index 143fb73b678d..000000000000 --- a/cocos/deprecated/CCString.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2017 Chukong Technologies -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "deprecated/CCString.h" -#include "platform/CCFileUtils.h" -#include "base/ccMacros.h" -#include -#include -#include "deprecated/CCArray.h" -#include "base/ccUtils.h" - -NS_CC_BEGIN - -#define kMaxStringLen (1024*100) - -__String::__String() - :_string("") -{} - -__String::__String(const char * str) - :_string(str) -{} - -__String::__String(const std::string& str) - :_string(str) -{} - -__String::__String(const __String& str) - :_string(str.getCString()) -{} - -__String::~__String() -{ - CCLOGINFO("deallocing __String: %p", this); - - _string.clear(); -} - -__String& __String::operator= (const __String& other) -{ - if (this != &other) { - _string = other._string; - } - return *this; -} - -bool __String::initWithFormatAndValist(const char* format, va_list ap) -{ - bool bRet = false; - char* pBuf = (char*)malloc(kMaxStringLen); - if (pBuf != nullptr) - { - vsnprintf(pBuf, kMaxStringLen, format, ap); - _string = pBuf; - free(pBuf); - bRet = true; - } - return bRet; -} - -bool __String::initWithFormat(const char* format, ...) -{ - _string.clear(); - - va_list ap; - va_start(ap, format); - - bool bRet = initWithFormatAndValist(format, ap); - - va_end(ap); - - return bRet; -} - -int __String::intValue() const -{ - if (length() == 0) - { - return 0; - } - return atoi(_string.c_str()); -} - -unsigned int __String::uintValue() const -{ - if (length() == 0) - { - return 0; - } - return (unsigned int)atoi(_string.c_str()); -} - -float __String::floatValue() const -{ - if (length() == 0) - { - return 0.0f; - } - return (float)utils::atof(_string.c_str()); -} - -double __String::doubleValue() const -{ - if (length() == 0) - { - return 0.0; - } - return utils::atof(_string.c_str()); -} - -bool __String::boolValue() const -{ - if (length() == 0) - { - return false; - } - - if (0 == strcmp(_string.c_str(), "0") || 0 == strcmp(_string.c_str(), "false")) - { - return false; - } - return true; -} - -const char* __String::getCString() const -{ - return _string.c_str(); -} - -int __String::length() const -{ - return static_cast(_string.length()); -} - -int __String::compare(const char * pStr) const -{ - return strcmp(getCString(), pStr); -} - -void __String::append(const std::string& str) -{ - _string.append(str); -} - -void __String::appendWithFormat(const char* format, ...) -{ - va_list ap; - va_start(ap, format); - - char* pBuf = (char*)malloc(kMaxStringLen); - if (pBuf != nullptr) - { - vsnprintf(pBuf, kMaxStringLen, format, ap); - _string.append(pBuf); - free(pBuf); - } - - va_end(ap); - -} - -__Array* __String::componentsSeparatedByString(const char *delimiter) -{ - __Array* result = __Array::create(); - std::string strTmp = _string; - size_t cutAt; - while( (cutAt = strTmp.find_first_of(delimiter)) != strTmp.npos ) - { - if(cutAt > 0) - { - result->addObject(__String::create(strTmp.substr(0, cutAt))); - } - strTmp = strTmp.substr(cutAt + 1); - } - - if(!strTmp.empty()) - { - result->addObject(__String::create(strTmp)); - } - - return result; -} - -bool __String::isEqual(const Ref* pObject) -{ - bool bRet = false; - const __String* pStr = dynamic_cast(pObject); - if (pStr != nullptr) - { - if (0 == _string.compare(pStr->_string)) - { - bRet = true; - } - } - return bRet; -} - -__String* __String::create(const std::string& str) -{ - __String* ret = new (std::nothrow) __String(str); - ret->autorelease(); - return ret; -} - -__String* __String::createWithData(const unsigned char* data, size_t nLen) -{ - __String* ret = nullptr; - if (data != nullptr) - { - char* pStr = (char*)malloc(nLen+1); - if (pStr != nullptr) - { - pStr[nLen] = '\0'; - if (nLen > 0) - { - memcpy(pStr, data, nLen); - } - - ret = __String::create(pStr); - free(pStr); - } - } - return ret; -} - -__String* __String::createWithFormat(const char* format, ...) -{ - __String* ret = __String::create(""); - va_list ap; - va_start(ap, format); - ret->initWithFormatAndValist(format, ap); - va_end(ap); - - return ret; -} - -__String* __String::createWithContentsOfFile(const std::string &filename) -{ - std::string str = FileUtils::getInstance()->getStringFromFile(filename); - return __String::create(std::move(str)); -} - -void __String::acceptVisitor(DataVisitor &visitor) -{ - visitor.visit(this); -} - -__String* __String::clone() const -{ - return __String::create(_string); -} - -NS_CC_END diff --git a/cocos/deprecated/CCString.h b/cocos/deprecated/CCString.h deleted file mode 100644 index eea27514fd28..000000000000 --- a/cocos/deprecated/CCString.h +++ /dev/null @@ -1,220 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2017 Chukong Technologies -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCSTRING_H__ -#define __CCSTRING_H__ -/// @cond DO_NOT_SHOW - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) -#include -#endif - -#include -#include -#include -#include "deprecated/CCArray.h" -#include "base/CCRef.h" - -// We need to include `StringUtils::format()` and `StringUtils::toString()` -// for keeping the backward compatibility -#include "base/ccUTF8.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CC_DLL __String : public Ref, public Clonable -{ -public: - /** - * @js NA - * @lua NA - */ - __String(); - /** - * @js NA - * @lua NA - */ - __String(const char* str); - /** - * @js NA - * @lua NA - */ - __String(const std::string& str); - /** - * @js NA - * @lua NA - */ - __String(const __String& str); - /** - * @js NA - * @lua NA - */ - virtual ~__String(); - - /* override assignment operator - * @js NA - * @lua NA - */ - __String& operator= (const __String& other); - - /** init a string with format, it's similar with the c function 'sprintf' - * @js NA - * @lua NA - */ - bool initWithFormat(const char* format, ...) CC_FORMAT_PRINTF(2, 3); - - /** convert to int value - * @js NA - */ - int intValue() const; - - /** convert to unsigned int value - * @js NA - */ - unsigned int uintValue() const; - - /** convert to float value - * @js NA - */ - float floatValue() const; - - /** convert to double value - * @js NA - */ - double doubleValue() const; - - /** convert to bool value - * @js NA - */ - bool boolValue() const; - - /** get the C string - * @js NA - */ - const char* getCString() const; - - /** get the length of string - * @js NA - */ - int length() const; - - /** compare to a c string - * @js NA - */ - int compare(const char *) const; - - /** append additional characters at the end of its current value - * @js NA - * @lua NA - */ - void append(const std::string& str); - - /** append(w/ format) additional characters at the end of its current value - * @js NA - * @lua NA - */ - void appendWithFormat(const char* format, ...); - - /** split a string - * @js NA - * @lua NA - */ - __Array* componentsSeparatedByString(const char *delimiter); - - /* override functions - * @js NA - */ - virtual bool isEqual(const Ref* pObject); - - /** create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer. - * @return A String pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - * @js NA - */ - static __String* create(const std::string& str); - - /** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes, - * if you want to change it, you should modify the kMax__StringLen macro in __String.cpp file. - * @return A String pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - * @js NA - */ - static __String* createWithFormat(const char* format, ...) CC_FORMAT_PRINTF(1, 2); - - /** create a string with binary data - * @return A String pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - * @js NA - */ - static __String* createWithData(const unsigned char* pData, size_t nLen); - - /** create a string with a file, - * @return A String pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - * @js NA - */ - static __String* createWithContentsOfFile(const std::string& filename); - /** - * @js NA - * @lua NA - */ - virtual void acceptVisitor(DataVisitor &visitor); - /** - * @js NA - * @lua NA - */ - virtual __String* clone() const override; - -private: - - /** only for internal use */ - bool initWithFormatAndValist(const char* format, va_list ap); - -public: - std::string _string; -}; - -struct StringCompare : public std::function { - public: - bool operator() (__String * a, __String * b) const { - return strcmp(a->getCString(), b->getCString()) < 0; - } -}; - -#define StringMake(str) String::create(str) -#define ccs StringMake - -// end of data_structure group -/// @} - -NS_CC_END - -/// @endcond -#endif //__CCSTRING_H__ diff --git a/cocos/deprecated/CMakeLists.txt b/cocos/deprecated/CMakeLists.txt deleted file mode 100644 index abac83fdff03..000000000000 --- a/cocos/deprecated/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set(COCOS_DEPRECATED_HEADER - - deprecated/CCDictionary.h - deprecated/CCDouble.h - deprecated/CCBool.h - deprecated/CCDeprecated.h - deprecated/CCNotificationCenter.h - deprecated/CCString.h - deprecated/CCFloat.h - deprecated/CCSet.h - deprecated/CCInteger.h - deprecated/CCArray.h - ) - -set(COCOS_DEPRECATED_SRC - - deprecated/CCArray.cpp - deprecated/CCDeprecated.cpp - deprecated/CCDictionary.cpp - deprecated/CCNotificationCenter.cpp - deprecated/CCSet.cpp - deprecated/CCString.cpp - - ) diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk deleted file mode 100644 index 7afab08b8a77..000000000000 --- a/cocos/editor-support/cocosbuilder/Android.mk +++ /dev/null @@ -1,41 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := ccb - -LOCAL_MODULE_FILENAME := libccb - -LOCAL_ARM_MODE := arm - -LOCAL_SRC_FILES := CCBAnimationManager.cpp \ -CCBFileLoader.cpp \ -CCBKeyframe.cpp \ -CCBReader.cpp \ -CCBSequence.cpp \ -CCBSequenceProperty.cpp \ -CCControlButtonLoader.cpp \ -CCControlLoader.cpp \ -CCLabelBMFontLoader.cpp \ -CCLabelTTFLoader.cpp \ -CCLayerColorLoader.cpp \ -CCLayerGradientLoader.cpp \ -CCLayerLoader.cpp \ -CCMenuItemImageLoader.cpp \ -CCMenuItemLoader.cpp \ -CCNode+CCBRelativePositioning.cpp \ -CCNodeLoader.cpp \ -CCNodeLoaderLibrary.cpp \ -CCParticleSystemQuadLoader.cpp \ -CCScale9SpriteLoader.cpp \ -CCScrollViewLoader.cpp \ -CCSpriteLoader.cpp - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../../2d \ - - -LOCAL_STATIC_LIBRARIES := ccets - -include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp deleted file mode 100644 index 2905d876418d..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp +++ /dev/null @@ -1,1338 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCBAnimationManager.h" - -#include "editor-support/cocosbuilder/CCBReader.h" -#include "editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h" -#include "audio/include/SimpleAudioEngine.h" -#include "editor-support/cocosbuilder/CCBSelectorResolver.h" - -#include -#include -#include - -using namespace cocos2d; -using namespace std; -using namespace cocos2d::extension; - -namespace cocosbuilder { - -// Implementation of CCBAinmationManager - -CCBAnimationManager::CCBAnimationManager() -: _jsControlled(false) -, _owner(nullptr) -, _autoPlaySequenceId(0) -, _rootNode(nullptr) -, _rootContainerSize(Size::ZERO) -, _delegate(nullptr) -, _runningSequence(nullptr) -{ - init(); -} - -bool CCBAnimationManager::init() -{ - _target = nullptr; - _animationCompleteCallbackFunc = nullptr; - - return true; -} - -CCBAnimationManager::~CCBAnimationManager() -{ -// DictElement *pElement = nullptr; -// CCDICT_FOREACH(_nodeSequences, pElement) -// { -// Node *node = (Node*)pElement->getIntKey(); -// node->release(); -// } -// -// CCDICT_FOREACH(_baseValues, pElement) -// { -// Node *node = (Node*)pElement->getIntKey(); -// node->release(); -// } - if (_rootNode) - { - _rootNode->stopAllActions(); - } - - setRootNode(nullptr); - setDelegate(nullptr); - - for (auto iter = _objects.begin(); iter != _objects.end(); ++iter) - { - for (auto iter2 = iter->second.begin(); iter2 != iter->second.end(); ++iter2) - { - iter2->second->release(); - } - } - - CC_SAFE_RELEASE(_target); -} - -Vector& CCBAnimationManager::getSequences() -{ - return _sequences; -} - -void CCBAnimationManager::setSequences(const Vector& seq) -{ - _sequences = seq; -} - -int CCBAnimationManager::getAutoPlaySequenceId() -{ - return _autoPlaySequenceId; -} - -void CCBAnimationManager::setAutoPlaySequenceId(int autoPlaySequenceId) -{ - _autoPlaySequenceId = autoPlaySequenceId; -} - -Node* CCBAnimationManager::getRootNode() -{ - return _rootNode; -} - -void CCBAnimationManager::setRootNode(Node *pRootNode) -{ - _rootNode = pRootNode; -} - -void CCBAnimationManager::setDocumentControllerName(const std::string &name) -{ - _documentControllerName = name; -} - - -std::string CCBAnimationManager::getDocumentControllerName() -{ - return _documentControllerName; -} - -void CCBAnimationManager::addDocumentCallbackNode(Node *node) -{ - _documentCallbackNodes.pushBack(node); -} - -void CCBAnimationManager::addDocumentCallbackName(std::string name) -{ - _documentCallbackNames.push_back(Value(name)); -} - -void CCBAnimationManager::addDocumentCallbackControlEvents(Control::EventType eventType) -{ - _documentCallbackControlEvents.push_back(Value(static_cast(eventType))); -} - -ValueVector& CCBAnimationManager::getDocumentCallbackNames() -{ - return _documentCallbackNames; -} - -Vector& CCBAnimationManager::getDocumentCallbackNodes() -{ - return _documentCallbackNodes; -} - -ValueVector& CCBAnimationManager::getDocumentCallbackControlEvents() -{ - return _documentCallbackControlEvents; -} - -void CCBAnimationManager::addDocumentOutletNode(Node *node) -{ - _documentOutletNodes.pushBack(node); -} - -void CCBAnimationManager::addDocumentOutletName(std::string name) -{ - _documentOutletNames.push_back(Value(name)); -} - -ValueVector& CCBAnimationManager::getDocumentOutletNames() -{ - return _documentOutletNames; -} - -Vector& CCBAnimationManager::getDocumentOutletNodes() -{ - return _documentOutletNodes; -} - -std::string CCBAnimationManager::getLastCompletedSequenceName() -{ - return _lastCompletedSequenceName; -} - -ValueVector& CCBAnimationManager::getKeyframeCallbacks() -{ - return _keyframeCallbacks; -} - -const Size& CCBAnimationManager::getRootContainerSize() -{ - return _rootContainerSize; -} - -void CCBAnimationManager::setRootContainerSize(const Size &rootContainerSize) -{ - _rootContainerSize.setSize(rootContainerSize.width, rootContainerSize.height); -} - -CCBAnimationManagerDelegate* CCBAnimationManager::getDelegate() -{ - return _delegate; -} - -void CCBAnimationManager::setDelegate(CCBAnimationManagerDelegate *pDelegate) -{ - CC_SAFE_RELEASE(dynamic_cast(_delegate)); - _delegate = pDelegate; - CC_SAFE_RETAIN(dynamic_cast(_delegate)); -} - -const char* CCBAnimationManager::getRunningSequenceName() -{ - if (_runningSequence) - { - return _runningSequence->getName(); - } - return nullptr; -} - -const Size& CCBAnimationManager::getContainerSize(Node *pNode) -{ - if (pNode) - { - return pNode->getContentSize(); - } - else - { - return _rootContainerSize; - } -} - -// refer to CCBReader::readNodeGraph() for data structure of pSeq -void CCBAnimationManager::addNode(Node *pNode, const std::unordered_map>& seq) -{ - // pNode->retain(); - - _nodeSequences[pNode] = seq; -} - -void CCBAnimationManager::setBaseValue(const Value& value, Node *pNode, const std::string& propName) -{ - auto& props = _baseValues[pNode]; - props[propName] = value; -} - -const Value& CCBAnimationManager::getBaseValue(Node *pNode, const std::string& propName) -{ - auto& props = _baseValues[pNode]; - return props[propName]; -} - -void CCBAnimationManager::setObject(Ref* obj, Node *pNode, const std::string& propName) -{ - auto& props = _objects[pNode]; - auto iter = props.find(propName); - if (iter != props.end()) - iter->second->release(); - - props[propName] = obj; - obj->retain(); -} - -Ref* CCBAnimationManager::getObject(Node *pNode, const std::string& propName) -{ - auto& props = _objects[pNode]; - auto iter = props.find(propName); - if (iter != props.end()) - return iter->second; - - return nullptr; -} - -int CCBAnimationManager::getSequenceId(const char* pSequenceName) -{ - string seqName(pSequenceName); - for (auto& seq : _sequences) - { - if (seqName.compare(seq->getName()) == 0) - { - return seq->getSequenceId(); - } - } - return -1; -} - -CCBSequence* CCBAnimationManager::getSequence(int nSequenceId) -{ - for (auto& seq : _sequences) - { - if (seq->getSequenceId() == nSequenceId) - { - return seq; - } - } - return nullptr; -} - -float CCBAnimationManager::getSequenceDuration(const char *pSequenceName) -{ - int id = getSequenceId(pSequenceName); - if (id != -1) - return getSequence(id)->getDuration(); - return 0; -} - - -void CCBAnimationManager::moveAnimationsFromNode(Node* fromNode, Node* toNode) -{ - // Move base values - auto baseValueIter = _baseValues.find(fromNode); - if(baseValueIter != _baseValues.end()) - { - _baseValues[toNode] = baseValueIter->second; - _baseValues.erase(baseValueIter); -// fromNode->release(); -// toNode->retain(); - } - - auto objIter = _objects.find(fromNode); - if (objIter != _objects.end()) - { - _objects[toNode] = objIter->second; - _objects.erase(objIter); - } - - - // Move seqs - auto seqsIter = _nodeSequences.find(fromNode); - if (seqsIter != _nodeSequences.end()) - { - _nodeSequences[toNode] = seqsIter->second; - _nodeSequences.erase(seqsIter); -// fromNode->release(); -// toNode->retain(); - } -} - -// Refer to CCBReader::readKeyframe() for the real type of value -ActionInterval* CCBAnimationManager::getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const std::string& propName, Node *pNode) -{ - float duration = pKeyframe1->getTime() - (pKeyframe0 ? pKeyframe0->getTime() : 0); - - if (propName == "rotationX") - { - return CCBRotateXTo::create(duration, pKeyframe1->getValue().asFloat()); - } - else if (propName == "rotationY") - { - return CCBRotateYTo::create(duration, pKeyframe1->getValue().asFloat()); - } - else if (propName == "rotation") - { - return CCBRotateTo::create(duration, pKeyframe1->getValue().asFloat()); - } - else if (propName == "opacity") - { - return FadeTo::create(duration, pKeyframe1->getValue().asByte()); - } - else if (propName == "color") - { - auto c = pKeyframe1->getValue().asValueMap(); - unsigned char r = c["r"].asByte(); - unsigned char g = c["g"].asByte(); - unsigned char b = c["b"].asByte(); - return TintTo::create(duration, r, g, b); - } - else if (propName == "visible") - { - if (pKeyframe1->getValue().asBool()) - { - return Sequence::createWithTwoActions(DelayTime::create(duration), Show::create()); - } - else - { - return Sequence::createWithTwoActions(DelayTime::create(duration), Hide::create()); - } - } - else if (propName == "displayFrame") - { - return Sequence::createWithTwoActions(DelayTime::create(duration), - CCBSetSpriteFrame::create(static_cast(pKeyframe1->getObject()))); - } - else if (propName == "position") - { - // Get position type - auto& array = getBaseValue(pNode, propName).asValueVector(); - CCBReader::PositionType type = (CCBReader::PositionType)array[2].asInt(); - - // Get relative position - auto value = pKeyframe1->getValue().asValueVector(); - float x = value[0].asFloat(); - float y = value[1].asFloat(); - - Size containerSize = getContainerSize(pNode->getParent()); - - Vec2 absPos = getAbsolutePosition(Vec2(x,y), type, containerSize, propName); - - return MoveTo::create(duration, absPos); - } - else if (propName == "scale") - { - // Get position type - auto& array = getBaseValue(pNode, propName).asValueVector(); - CCBReader::ScaleType type = (CCBReader::ScaleType)array[2].asInt(); - - // Get relative scale - auto value = pKeyframe1->getValue().asValueVector(); - float x = value[0].asFloat(); - float y = value[1].asFloat(); - - if (type == CCBReader::ScaleType::MULTIPLY_RESOLUTION) - { - float resolutionScale = CCBReader::getResolutionScale(); - x *= resolutionScale; - y *= resolutionScale; - } - - return ScaleTo::create(duration, x, y); - } - else if (propName == "skew") - { - // Get relative skew - auto& value = pKeyframe1->getValue().asValueVector(); - float x = value[0].asFloat(); - float y = value[1].asFloat(); - - return SkewTo::create(duration, x, y); - } - else - { - log("CCBReader: Failed to create animation for property: %s", propName.c_str()); - } - - return nullptr; -} - -void CCBAnimationManager::setAnimatedProperty(const std::string& propName, Node *pNode, const Value& value, Ref* obj, float fTweenDuration) -{ - if (fTweenDuration > 0) - { - // Create a fake keyframe to generate the action from - CCBKeyframe *kf1 = new (std::nothrow) CCBKeyframe(); - kf1->autorelease(); - - kf1->setObject(obj); - kf1->setValue(value); - kf1->setTime(fTweenDuration); - kf1->setEasingType(CCBKeyframe::EasingType::LINEAR); - - // Animate - ActionInterval *tweenAction = getAction(nullptr, kf1, propName, pNode); - pNode->runAction(tweenAction); - } - else - { - // Just set the value - - if (propName == "position") - { - // Get position type - auto& array = getBaseValue(pNode, propName).asValueVector(); - CCBReader::PositionType type = (CCBReader::PositionType)array[2].asInt(); - // Get relative position - auto& valueVector = value.asValueVector(); - float x = valueVector[0].asFloat(); - float y = valueVector[1].asFloat(); - - pNode->setPosition(getAbsolutePosition(Vec2(x,y), type, getContainerSize(pNode->getParent()), propName)); - } - else if (propName == "scale") - { - // Get scale type - auto& array = getBaseValue(pNode, propName).asValueVector(); - CCBReader::ScaleType type = (CCBReader::ScaleType)array[2].asInt(); - - // Get relative scale - auto& valueVector = value.asValueVector(); - float x = valueVector[0].asFloat(); - float y = valueVector[1].asFloat(); - - setRelativeScale(pNode, x, y, type, propName); - } - else if(propName == "skew") - { - // Get relative scale - auto& valueVector = value.asValueVector(); - float x = valueVector[0].asFloat(); - float y = valueVector[1].asFloat(); - - pNode->setSkewX(x); - pNode->setSkewY(y); - } - else - { - // [node setValue:value forKey:name]; - - // TODO: only handle rotation, opacity, displayFrame, color - if (propName == "rotation") - { - float rotate = value.asFloat(); - pNode->setRotation(rotate); - } else if(propName == "rotationX") - { - float rotate = value.asFloat(); - pNode->setRotationSkewX(rotate); - }else if(propName == "rotationY") - { - float rotate = value.asFloat(); - pNode->setRotationSkewY(rotate); - } - else if (propName == "opacity") - { - unsigned char opacity = value.asByte(); - pNode->setOpacity(opacity); - } - else if (propName == "displayFrame") - { - static_cast(pNode)->setSpriteFrame(static_cast(obj)); - } - else if (propName == "color") - { - auto c = value.asValueMap(); - unsigned char r = c["r"].asByte(); - unsigned char g = c["g"].asByte(); - unsigned char b = c["b"].asByte(); - pNode->setColor(Color3B(r, g, b)); - } - else if (propName == "visible") - { - bool visible = value.asBool(); - pNode->setVisible(visible); - } - else - { - log("unsupported property name is %s", propName.c_str()); - CCASSERT(false, "unsupported property now"); - } - } - } -} - -void CCBAnimationManager::setFirstFrame(Node *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration) -{ - auto& keyframes = pSeqProp->getKeyframes(); - - if (keyframes.empty()) - { - // Use base value (no animation) - auto& baseValue = getBaseValue(pNode, pSeqProp->getName()); - auto obj = getObject(pNode, pSeqProp->getName()); - CCASSERT(!baseValue.isNull(), "No baseValue found for property"); - setAnimatedProperty(pSeqProp->getName(), pNode, baseValue, obj, fTweenDuration); - } - else - { - // Use first keyframe - CCBKeyframe *keyframe = keyframes.at(0); - setAnimatedProperty(pSeqProp->getName(), pNode, keyframe->getValue(), keyframe->getObject(), fTweenDuration); - } -} - -ActionInterval* CCBAnimationManager::getEaseAction(ActionInterval *pAction, CCBKeyframe::EasingType easingType, float fEasingOpt) -{ - if (dynamic_cast(pAction)) - { - return pAction; - } - - if (easingType == CCBKeyframe::EasingType::LINEAR) - { - return pAction; - } - else if (easingType == CCBKeyframe::EasingType::INSTANT) - { - return CCBEaseInstant::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::CUBIC_IN) - { - return EaseIn::create(pAction, fEasingOpt); - } - else if (easingType == CCBKeyframe::EasingType::CUBIC_OUT) - { - return EaseOut::create(pAction, fEasingOpt); - } - else if (easingType == CCBKeyframe::EasingType::CUBIC_INOUT) - { - return EaseInOut::create(pAction, fEasingOpt); - } - else if (easingType == CCBKeyframe::EasingType::BACK_IN) - { - return EaseBackIn::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::BACK_OUT) - { - return EaseBackOut::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::BACK_INOUT) - { - return EaseBackInOut::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::BOUNCE_IN) - { - return EaseBounceIn::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::BOUNCE_OUT) - { - return EaseBounceOut::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::BOUNCE_INOUT) - { - return EaseBounceInOut::create(pAction); - } - else if (easingType == CCBKeyframe::EasingType::ELASTIC_IN) - { - return EaseElasticIn::create(pAction, fEasingOpt); - } - else if (easingType == CCBKeyframe::EasingType::ELASTIC_OUT) - { - return EaseElasticOut::create(pAction, fEasingOpt); - } - else if (easingType == CCBKeyframe::EasingType::ELASTIC_INOUT) - { - return EaseElasticInOut::create(pAction, fEasingOpt); - } - else - { - log("CCBReader: Unknown easing type %d", static_cast(easingType)); - return pAction; - } -} - -Sequence* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* channel) { - - float lastKeyframeTime = 0; - - Vector actions; - auto& keyframes = channel->getKeyframes(); - ssize_t numKeyframes = keyframes.size(); - - for (long i = 0; i < numKeyframes; ++i) - { - - CCBKeyframe *keyframe = keyframes.at(i); - float timeSinceLastKeyframe = keyframe->getTime() - lastKeyframeTime; - lastKeyframeTime = keyframe->getTime(); - if(timeSinceLastKeyframe > 0) { - actions.pushBack(DelayTime::create(timeSinceLastKeyframe)); - } - - auto& keyVal = keyframe->getValue().asValueVector(); - std::string selectorName = keyVal[0].asString(); - CCBReader::TargetType selectorTarget = (CCBReader::TargetType)keyVal[1].asInt(); - - if(_jsControlled) { - std::stringstream callbackName; - callbackName << static_cast(selectorTarget); - callbackName << ":" + selectorName; - - auto callback = _keyframeCallFuncs.at(callbackName.str()); - if (nullptr != callback) - { - CallFunc* callbackClone = callback->clone(); - - if (callbackClone != nullptr) - { - actions.pushBack(callbackClone); - } - } - } - else - { - Ref* target = nullptr; - - if(selectorTarget == CCBReader::TargetType::DOCUMENT_ROOT) - target = _rootNode; - else if (selectorTarget == CCBReader::TargetType::OWNER) - target = _owner; - - if(target != nullptr) - { - if(!selectorName.empty()) - { - SEL_CallFuncN selCallFunc = 0; - - CCBSelectorResolver* targetAsCCBSelectorResolver = dynamic_cast(target); - - if(targetAsCCBSelectorResolver != nullptr) - { - selCallFunc = targetAsCCBSelectorResolver->onResolveCCBCCCallFuncSelector(target, selectorName.c_str ()); - } - - if(selCallFunc == 0) - { - CCLOG("Skipping selector '%s' since no CCBSelectorResolver is present.", selectorName.c_str()); - } - else - { - auto savedTarget = std::make_shared>(); - savedTarget->pushBack(target); - - auto callback = CallFuncN::create([savedTarget, selCallFunc](Node* sender){ - auto t = savedTarget->at(0); - (t->*selCallFunc)(sender); - }); - - actions.pushBack(callback); - } - } - else - { - CCLOG("Unexpected empty selector."); - } - } - } - } - if(actions.size() < 1) return nullptr; - - return Sequence::create(actions); -} - -Sequence* CCBAnimationManager::actionForSoundChannel(CCBSequenceProperty* channel) { - - float lastKeyframeTime = 0; - - Vector actions; - auto& keyframes = channel->getKeyframes(); - ssize_t numKeyframes = keyframes.size(); - - for (int i = 0; i < numKeyframes; ++i) - { - CCBKeyframe *keyframe = keyframes.at(i); - float timeSinceLastKeyframe = keyframe->getTime() - lastKeyframeTime; - lastKeyframeTime = keyframe->getTime(); - if(timeSinceLastKeyframe > 0) { - actions.pushBack(DelayTime::create(timeSinceLastKeyframe)); - } - - stringstream ss (stringstream::in | stringstream::out); - auto& keyVal = keyframe->getValue().asValueVector(); - std::string soundFile = keyVal[0].asString(); - - float pitch = 0.0f, pan = 0.0f, gain = 0.0f; - ss << keyVal[1].asString(); - ss >> pitch; - ss.flush(); - - ss << keyVal[2].asString(); - ss >> pan; - ss.flush(); - - ss << keyVal[3].asString(); - ss >> gain; - ss.flush(); - - actions.pushBack(CCBSoundEffect::actionWithSoundFile(soundFile, pitch, pan, gain)); - } - - if(actions.size() < 1) return nullptr; - - return Sequence::create(actions); -} - - - -void CCBAnimationManager::runAction(Node *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration) -{ - auto& keyframes = pSeqProp->getKeyframes(); - ssize_t numKeyframes = keyframes.size(); - - if (numKeyframes > 1) - { - // Make an animation! - Vector actions; - - CCBKeyframe *keyframeFirst = keyframes.at(0); - float timeFirst = keyframeFirst->getTime() + fTweenDuration; - - if (timeFirst > 0) - { - actions.pushBack(DelayTime::create(timeFirst)); - } - - for (ssize_t i = 0; i < numKeyframes - 1; ++i) - { - CCBKeyframe *kf0 = keyframes.at(i); - CCBKeyframe *kf1 = keyframes.at(i+1); - - ActionInterval *action = getAction(kf0, kf1, pSeqProp->getName(), pNode); - if (action) - { - // Apply easing - action = getEaseAction(action, kf0->getEasingType(), kf0->getEasingOpt()); - - actions.pushBack(action); - } - } - - auto seq = Sequence::create(actions); - pNode->runAction(seq); - } -} - -void CCBAnimationManager::runAnimations(const char *pName, float fTweenDuration) -{ - runAnimationsForSequenceNamedTweenDuration(pName, fTweenDuration); -} - -void CCBAnimationManager::runAnimations(const char *pName) -{ - runAnimationsForSequenceNamed(pName); -} - -void CCBAnimationManager::runAnimations(int nSeqId, float fTweenDuraiton) -{ - runAnimationsForSequenceIdTweenDuration(nSeqId, fTweenDuraiton); -} - -void CCBAnimationManager::runAnimationsForSequenceIdTweenDuration(int nSeqId, float fTweenDuration) -{ - CCASSERT(nSeqId != -1, "Sequence id couldn't be found"); - - _rootNode->stopAllActions(); - - for (auto nodeSeqIter = _nodeSequences.begin(); nodeSeqIter != _nodeSequences.end(); ++nodeSeqIter) - { - Node *node = nodeSeqIter->first; - node->stopAllActions(); - - // Refer to CCBReader::readKeyframe() for the real type of value - auto seqs = nodeSeqIter->second; - auto seqNodeProps = seqs[nSeqId]; - - std::set seqNodePropNames; - - if (!seqNodeProps.empty()) - { - // Reset nodes that have sequence node properties, and run actions on them - for (auto iter = seqNodeProps.begin(); iter != seqNodeProps.end(); ++iter) - { - const std::string propName = iter->first; - CCBSequenceProperty *seqProp = iter->second; - seqNodePropNames.insert(propName); - - setFirstFrame(node, seqProp, fTweenDuration); - runAction(node, seqProp, fTweenDuration); - } - } - - // Reset the nodes that may have been changed by other timelines - auto& nodeBaseValues = _baseValues[node]; - - if (!nodeBaseValues.empty()) - { - for (auto iter = nodeBaseValues.begin(); iter != nodeBaseValues.end(); ++iter) - { - if (seqNodePropNames.find(iter->first) == seqNodePropNames.end()) - { - setAnimatedProperty(iter->first, node, iter->second, nullptr, fTweenDuration); - } - } - } - - auto& nodeObject = _objects[node]; - - if (!nodeObject.empty()) - { - for (auto iter = nodeObject.begin(); iter != nodeObject.end(); ++iter) - { - if (seqNodePropNames.find(iter->first) == seqNodePropNames.end()) - { - setAnimatedProperty(iter->first, node, Value(), iter->second, fTweenDuration); - } - } - } - } - - // Make callback at end of sequence - CCBSequence *seq = getSequence(nSeqId); - Action *completeAction = Sequence::createWithTwoActions(DelayTime::create(seq->getDuration() + fTweenDuration), - CallFunc::create( CC_CALLBACK_0(CCBAnimationManager::sequenceCompleted,this))); - _rootNode->runAction(completeAction); - - // Set the running scene - - if(seq->getCallbackChannel() != nullptr) { - Action* action = (Action *)actionForCallbackChannel(seq->getCallbackChannel()); - if(action != nullptr) { - _rootNode->runAction(action); - } - } - - if(seq->getSoundChannel() != nullptr) { - Action* action = (Action *)actionForSoundChannel(seq->getSoundChannel()); - if(action != nullptr) { - _rootNode->runAction(action); - } - } - - _runningSequence = getSequence(nSeqId); -} - -void CCBAnimationManager::runAnimationsForSequenceNamedTweenDuration(const char *pName, float fTweenDuration) -{ - int seqId = getSequenceId(pName); - runAnimationsForSequenceIdTweenDuration(seqId, fTweenDuration); -} - -void CCBAnimationManager::runAnimationsForSequenceNamed(const char *pName) -{ - runAnimationsForSequenceNamedTweenDuration(pName, 0); -} - -void CCBAnimationManager::debug() -{ - -} - -void CCBAnimationManager::setAnimationCompletedCallback(Ref *target, SEL_CallFunc callbackFunc) { - if (target) - { - target->retain(); - } - - if (_target) - { - _target->release(); - } - - _target = target; - _animationCompleteCallbackFunc = callbackFunc; -} - -void CCBAnimationManager::setCallFunc(CallFunc* callFunc, const std::string &callbackNamed) -{ - _keyframeCallFuncs.insert(callbackNamed, callFunc); -} - -void CCBAnimationManager::sequenceCompleted() -{ - const char *runningSequenceName = _runningSequence->getName(); - int nextSeqId = _runningSequence->getChainedSequenceId(); - _runningSequence = nullptr; - - if(_lastCompletedSequenceName != runningSequenceName) { - _lastCompletedSequenceName = runningSequenceName; - } - - if (nextSeqId != -1) - { - runAnimationsForSequenceIdTweenDuration(nextSeqId, 0); - } - - if (_delegate) - { - // There may be another runAnimation() call in this delegate method - // which will assign _runningSequence - _delegate->completedAnimationSequenceNamed(runningSequenceName); - } - - if (_target && _animationCompleteCallbackFunc) { - (_target->*_animationCompleteCallbackFunc)(); - } -} - -// Custom actions - -/************************************************************ - CCBSetSpriteFrame - ************************************************************/ - -CCBSetSpriteFrame* CCBSetSpriteFrame::create(SpriteFrame *pSpriteFrame) -{ - CCBSetSpriteFrame *ret = new (std::nothrow) CCBSetSpriteFrame(); - if (ret) - { - if (ret->initWithSpriteFrame(pSpriteFrame)) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - } - - return ret; -} - -bool CCBSetSpriteFrame::initWithSpriteFrame(SpriteFrame *pSpriteFrame) -{ - _spriteFrame = pSpriteFrame; - CC_SAFE_RETAIN(_spriteFrame); - - return true; -} - -CCBSetSpriteFrame::~CCBSetSpriteFrame() -{ - CC_SAFE_RELEASE_NULL(_spriteFrame); -} - -CCBSetSpriteFrame* CCBSetSpriteFrame::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBSetSpriteFrame(); - a->initWithSpriteFrame(_spriteFrame); - a->autorelease(); - return a; -} - -CCBSetSpriteFrame* CCBSetSpriteFrame::reverse() const -{ - // returns a copy of itself - return this->clone(); -} - -void CCBSetSpriteFrame::update(float /*time*/) -{ - static_cast(_target)->setSpriteFrame(_spriteFrame); -} - - -/************************************************************ - CCBSoundEffect - ************************************************************/ - -CCBSoundEffect* CCBSoundEffect::actionWithSoundFile(const std::string &filename, float pitch, float pan, float gain) { - CCBSoundEffect* pRet = new (std::nothrow) CCBSoundEffect(); - if (pRet != nullptr && pRet->initWithSoundFile(filename, pitch, pan, gain)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - - -CCBSoundEffect::~CCBSoundEffect() -{ -} - -bool CCBSoundEffect::initWithSoundFile(const std::string &filename, float pitch, float pan, float gain) { - _soundFile = filename; - _pitch = pitch; - _pan = pan; - _gain = gain; - return true; -} - -CCBSoundEffect* CCBSoundEffect::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBSoundEffect(); - a->initWithSoundFile(_soundFile, _pitch, _pan, _gain); - a->autorelease(); - return a; -} - -CCBSoundEffect* CCBSoundEffect::reverse() const -{ - // returns a copy of itself - return this->clone(); -} - -void CCBSoundEffect::update(float /*time*/) -{ - CocosDenshion::SimpleAudioEngine::getInstance()->playEffect(_soundFile.c_str()); -} - - -/************************************************************ - CCBRotateTo - ************************************************************/ - -CCBRotateTo* CCBRotateTo::create(float fDuration, float fAngle) -{ - CCBRotateTo *ret = new (std::nothrow) CCBRotateTo(); - if (ret) - { - if (ret->initWithDuration(fDuration, fAngle)) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - } - - return ret; -} - -bool CCBRotateTo::initWithDuration(float fDuration, float fAngle) -{ - if (ActionInterval::initWithDuration(fDuration)) - { - _dstAngle = fAngle; - - return true; - } - else - { - return false; - } -} - -CCBRotateTo* CCBRotateTo::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBRotateTo(); - a->initWithDuration(_duration, _dstAngle); - a->autorelease(); - return a; -} - -CCBRotateTo* CCBRotateTo::reverse() const -{ - CCASSERT(false, "reverse() is not supported in CCBRotateTo"); - return nullptr; -} - -void CCBRotateTo::startWithTarget(Node *pNode) -{ - ActionInterval::startWithTarget(pNode); - _startAngle = _target->getRotation(); - _diffAngle = _dstAngle - _startAngle; -} - -void CCBRotateTo::update(float time) -{ - _target->setRotation(_startAngle + (_diffAngle * time)) - ; -} - - - - -/************************************************************ - CCBRotateXTO - ************************************************************/ - - -CCBRotateXTo* CCBRotateXTo::create(float fDuration, float fAngle) -{ - CCBRotateXTo *ret = new (std::nothrow) CCBRotateXTo(); - if (ret) - { - if (ret->initWithDuration(fDuration, fAngle)) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - } - - return ret; -} - -bool CCBRotateXTo::initWithDuration(float fDuration, float fAngle) -{ - if (ActionInterval::initWithDuration(fDuration)) - { - _dstAngle = fAngle; - - return true; - } - else - { - return false; - } -} - - -void CCBRotateXTo::startWithTarget(Node *pNode) -{ - //CCActionInterval::startWithTarget(pNode); - _originalTarget = pNode; - _target = pNode; - _elapsed = 0.0f; - _firstTick = true; - _startAngle = _target->getRotationSkewX(); - _diffAngle = _dstAngle - _startAngle; -} - -CCBRotateXTo* CCBRotateXTo::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBRotateXTo(); - a->initWithDuration(_duration, _dstAngle); - a->autorelease(); - return a; -} - -CCBRotateXTo* CCBRotateXTo::reverse() const -{ - CCASSERT(false, "reverse() is not supported in CCBRotateXTo"); - return nullptr; -} - -void CCBRotateXTo::update(float time) -{ - _target->setRotationSkewX(_startAngle + (_diffAngle * time)); -} - - - -/************************************************************ - CCBRotateYTO - ************************************************************/ - - - -CCBRotateYTo* CCBRotateYTo::create(float fDuration, float fAngle) -{ - CCBRotateYTo *ret = new (std::nothrow) CCBRotateYTo(); - if (ret) - { - if (ret->initWithDuration(fDuration, fAngle)) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - } - - return ret; -} - -bool CCBRotateYTo::initWithDuration(float fDuration, float fAngle) -{ - if (ActionInterval::initWithDuration(fDuration)) - { - _dstAngle = fAngle; - - return true; - } - else - { - return false; - } -} - -CCBRotateYTo* CCBRotateYTo::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBRotateYTo(); - a->initWithDuration(_duration, _dstAngle); - a->autorelease(); - return a; -} - -CCBRotateYTo* CCBRotateYTo::reverse() const -{ - CCASSERT(false, "reverse() is not supported in CCBRotateXTo"); - return nullptr; -} - - -void CCBRotateYTo::startWithTarget(Node *pNode) -{ - // ActionInterval::startWithTarget(pNode); - _originalTarget = pNode; - _target = pNode; - _elapsed = 0.0f; - _firstTick = true; - _startAngle = _target->getRotationSkewY(); - _diffAngle = _dstAngle - _startAngle; -} - -void CCBRotateYTo::update(float time) -{ - _target->setRotationSkewY(_startAngle + (_diffAngle * time)); -} - - - -/************************************************************ - CCBEaseInstant - ************************************************************/ -CCBEaseInstant* CCBEaseInstant::create(ActionInterval *pAction) -{ - CCBEaseInstant *pRet = new (std::nothrow) CCBEaseInstant(); - if (pRet && pRet->initWithAction(pAction)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_RELEASE_NULL(pRet); - } - - return pRet; -} - -CCBEaseInstant* CCBEaseInstant::clone() const -{ - // no copy constructor - auto a = new (std::nothrow) CCBEaseInstant(); - a->initWithAction(_inner); - a->autorelease(); - return a; -} - -CCBEaseInstant* CCBEaseInstant::reverse() const -{ - return CCBEaseInstant::create(_inner->reverse()); -} - -void CCBEaseInstant::update(float dt) -{ - if (dt < 0) - { - _inner->update(0); - } - else - { - _inner->update(1); - } -} - - -} diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.h b/cocos/editor-support/cocosbuilder/CCBAnimationManager.h deleted file mode 100644 index 474e8449f1e0..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.h +++ /dev/null @@ -1,303 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCB_CCBANIMATION_MANAGER_H__ -#define __CCB_CCBANIMATION_MANAGER_H__ - -#include "base/CCMap.h" -#include "2d/CCActionInterval.h" -#include "2d/CCActionInstant.h" -#include "2d/CCActionEase.h" - -#include "extensions/ExtensionMacros.h" -#include "editor-support/cocosbuilder/CCBSequence.h" -#include "editor-support/cocosbuilder/CCBKeyframe.h" -#include "editor-support/cocosbuilder/CCBSequenceProperty.h" -#include "extensions/GUI/CCControlExtension/CCControl.h" - -namespace cocosbuilder { - -class CC_DLL CCBAnimationManagerDelegate -{ -public: - virtual ~CCBAnimationManagerDelegate() {} - virtual void completedAnimationSequenceNamed(const char *name) = 0; -}; - -class CC_DLL CCBAnimationManager : public cocos2d::Ref -{ -public: - bool _jsControlled; - /** - * @js ctor - */ - CCBAnimationManager(); - /** - * @js NA - * @lua NA - */ - ~CCBAnimationManager(); - - - cocos2d::Ref *_owner; - - virtual bool init(); - - cocos2d::Vector& getSequences(); - void setSequences(const cocos2d::Vector& seq); - - - int getAutoPlaySequenceId(); - void setAutoPlaySequenceId(int autoPlaySequenceId); - - cocos2d::Node* getRootNode(); - void setRootNode(cocos2d::Node* pRootNode); // weak reference - - - void addDocumentCallbackNode(cocos2d::Node *node); - void addDocumentCallbackName(std::string name); - void addDocumentCallbackControlEvents(cocos2d::extension::Control::EventType eventType); - - void addDocumentOutletNode(cocos2d::Node *node); - void addDocumentOutletName(std::string name); - - void setDocumentControllerName(const std::string &name); - - std::string getDocumentControllerName(); - cocos2d::ValueVector& getDocumentCallbackNames(); - cocos2d::Vector& getDocumentCallbackNodes(); - cocos2d::ValueVector& getDocumentCallbackControlEvents(); - - cocos2d::ValueVector& getDocumentOutletNames(); - cocos2d::Vector& getDocumentOutletNodes(); - std::string getLastCompletedSequenceName(); - - cocos2d::ValueVector& getKeyframeCallbacks(); - - const cocos2d::Size& getRootContainerSize(); - void setRootContainerSize(const cocos2d::Size &rootContainerSize); - - CCBAnimationManagerDelegate* getDelegate(); - void setDelegate(CCBAnimationManagerDelegate* pDelegate); // retain - - const char* getRunningSequenceName(); - - const cocos2d::Size& getContainerSize(cocos2d::Node* pNode); - - void addNode(cocos2d::Node *pNode, const std::unordered_map>& seq); - void setBaseValue(const cocos2d::Value& value, cocos2d::Node *pNode, const std::string& propName); - void setObject(cocos2d::Ref* obj, cocos2d::Node *pNode, const std::string& propName); - - void moveAnimationsFromNode(cocos2d::Node* fromNode, cocos2d::Node* toNode); - - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(const char *pName, float fTweenDuration); - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(const char *pName); - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(int nSeqId, float fTweenDuraiton); - - void runAnimationsForSequenceNamedTweenDuration(const char *pName, float fTweenDuration); - void runAnimationsForSequenceNamed(const char *pName); - void runAnimationsForSequenceIdTweenDuration(int nSeqId, float fTweenDuraiton); - /** - * when this function bound to js ,the second param are callfunc_selector - * @lua NA - */ - void setAnimationCompletedCallback(cocos2d::Ref *target, cocos2d::SEL_CallFunc callbackFunc); - - void debug(); - /** - * @js setCallFuncForJSCallbackNamed - */ - void setCallFunc(cocos2d::CallFunc *callFunc, const std::string &callbackNamed); - - cocos2d::Sequence* actionForCallbackChannel(CCBSequenceProperty* channel); - cocos2d::Sequence* actionForSoundChannel(CCBSequenceProperty* channel); - - // return -1 if timeline not exist - int getSequenceId(const char* pSequenceName); - - // get timeline duration - float getSequenceDuration(const char* pSequenceName); - -private: - const cocos2d::Value& getBaseValue(cocos2d::Node *pNode, const std::string& propName); - Ref* getObject(cocos2d::Node *pNode, const std::string& propName); - - CCBSequence* getSequence(int nSequenceId); - cocos2d::ActionInterval* getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const std::string& propName, cocos2d::Node *pNode); - void setAnimatedProperty(const std::string& propName, cocos2d::Node *pNode, const cocos2d::Value& value, Ref* obj, float fTweenDuration); - void setFirstFrame(cocos2d::Node *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration); - cocos2d::ActionInterval* getEaseAction(cocos2d::ActionInterval *pAction, CCBKeyframe::EasingType easingType, float fEasingOpt); - void runAction(cocos2d::Node *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration); - void sequenceCompleted(); - -private: - cocos2d::Vector _sequences; - std::unordered_map>> _nodeSequences; - std::unordered_map> _baseValues; - std::unordered_map> _objects; - - int _autoPlaySequenceId; - - cocos2d::Node *_rootNode; - - cocos2d::Size _rootContainerSize; - - CCBAnimationManagerDelegate *_delegate; - CCBSequence *_runningSequence; - - cocos2d::ValueVector _documentOutletNames; - cocos2d::Vector _documentOutletNodes; - cocos2d::ValueVector _documentCallbackNames; - cocos2d::Vector _documentCallbackNodes; - cocos2d::ValueVector _documentCallbackControlEvents; - cocos2d::ValueVector _keyframeCallbacks; - cocos2d::Map _keyframeCallFuncs; - - std::string _documentControllerName; - std::string _lastCompletedSequenceName; - - cocos2d::SEL_CallFunc _animationCompleteCallbackFunc; - cocos2d::Ref *_target; - -}; - -class CC_DLL CCBSetSpriteFrame : public cocos2d::ActionInstant -{ -public: - /** creates a Place action with a position */ - static CCBSetSpriteFrame* create(cocos2d::SpriteFrame *pSpriteFrame); - /** - * @js NA - * @lua NA - */ - ~CCBSetSpriteFrame(); - - bool initWithSpriteFrame(cocos2d::SpriteFrame *pSpriteFrame); - - // Overrides - virtual void update(float time) override; - virtual CCBSetSpriteFrame* clone() const override; - virtual CCBSetSpriteFrame* reverse() const override; - -private: - cocos2d::SpriteFrame *_spriteFrame; -}; - - -class CC_DLL CCBSoundEffect : public cocos2d::ActionInstant -{ -public: - static CCBSoundEffect* actionWithSoundFile(const std::string &file, float pitch, float pan, float gain); - /** - * @js NA - * @lua NA - */ - ~CCBSoundEffect(); - bool initWithSoundFile(const std::string &file, float pitch, float pan, float gain); - - // Overrides - virtual void update(float time) override; - virtual CCBSoundEffect* clone() const override; - virtual CCBSoundEffect* reverse() const override; - -private: - std::string _soundFile; - float _pitch, _pan, _gain; -}; - - -class CC_DLL CCBRotateTo : public cocos2d::ActionInterval -{ -public: - static CCBRotateTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - - // Override - virtual void update(float time) override; - virtual CCBRotateTo* clone() const override; - virtual CCBRotateTo* reverse() const override; - virtual void startWithTarget(cocos2d::Node *pNode) override; - -private: - float _startAngle; - float _dstAngle; - float _diffAngle; -}; - - -class CC_DLL CCBRotateXTo: public cocos2d::ActionInterval -{ -public: - static CCBRotateXTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - - // Overrides - virtual void startWithTarget(cocos2d::Node *pNode) override; - virtual CCBRotateXTo* clone() const override; - virtual CCBRotateXTo* reverse() const override; - virtual void update(float time) override; - -private: - float _startAngle; - float _dstAngle; - float _diffAngle; -}; - - -class CC_DLL CCBRotateYTo: public cocos2d::ActionInterval -{ -public: - static CCBRotateYTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - - // Override - virtual void startWithTarget(cocos2d::Node *pNode) override; - virtual CCBRotateYTo* clone() const override; - virtual CCBRotateYTo* reverse() const override; - virtual void update(float time) override; - -private: - float _startAngle; - float _dstAngle; - float _diffAngle; -}; - - -class CC_DLL CCBEaseInstant : public cocos2d::ActionEase -{ -public: - static CCBEaseInstant* create(cocos2d::ActionInterval *pAction); - - virtual CCBEaseInstant* clone() const override; - virtual CCBEaseInstant* reverse() const override; - virtual void update(float dt) override; -}; - - -} - -#endif // __CCB_CCBANIMATION_MANAGER_H__ diff --git a/cocos/editor-support/cocosbuilder/CCBFileLoader.cpp b/cocos/editor-support/cocosbuilder/CCBFileLoader.cpp deleted file mode 100644 index 9e5cfa3d5eff..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBFileLoader.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCBFileLoader.h" - -using namespace cocos2d; - - -namespace cocosbuilder { - -#define PROPERTY_CCBFILE "ccbFile" - -void CCBFileLoader::onHandlePropTypeCCBFile(Node * pNode, Node * pParent, const char * pPropertyName, Node * pCCBFileNode, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CCBFILE) == 0) { - ((CCBFile*)pNode)->setCCBFileNode(pCCBFileNode); - } else { - NodeLoader::onHandlePropTypeCCBFile(pNode, pParent, pPropertyName, pCCBFileNode, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCBFileLoader.h b/cocos/editor-support/cocosbuilder/CCBFileLoader.h deleted file mode 100644 index 5df3d0c18f55..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBFileLoader.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCBFILELOADER_H_ -#define _CCB_CCBFILELOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL CCBFileLoader : public NodeLoader { - public: - /** - * @js NA - * @lua NA - */ - virtual ~CCBFileLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCBFile); - - virtual void onHandlePropTypeCCBFile(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Node * pCCBFileNode, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCBKeyframe.cpp b/cocos/editor-support/cocosbuilder/CCBKeyframe.cpp deleted file mode 100644 index fbd404398d69..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBKeyframe.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCBKeyframe.h" - -using namespace cocos2d; - -namespace cocosbuilder { - -CCBKeyframe::CCBKeyframe() -: _object(nullptr) -, _time(0.0f) -, _easingType(EasingType::INSTANT) -, _easingOpt(0.0f) -{} - -CCBKeyframe::~CCBKeyframe() -{ - CC_SAFE_RELEASE(_object); -} - -const Value& CCBKeyframe::getValue() const -{ - return _value; -} - -void CCBKeyframe::setValue(const Value& value) -{ - _value = value; -} - -Ref* CCBKeyframe::getObject() const -{ - return _object; -} - -void CCBKeyframe::setObject(Ref* obj) -{ - CC_SAFE_RETAIN(obj); - CC_SAFE_RELEASE(_object); - _object = obj; -} - -float CCBKeyframe::getTime() -{ - return _time; -} - -void CCBKeyframe::setTime(float fTime) -{ - _time = fTime; -} - -CCBKeyframe::EasingType CCBKeyframe::getEasingType() -{ - return _easingType; -} - -void CCBKeyframe::setEasingType(CCBKeyframe::EasingType easingType) -{ - _easingType = easingType; -} - -float CCBKeyframe::getEasingOpt() -{ - return _easingOpt; -} - -void CCBKeyframe::setEasingOpt(float fEasingOpt) -{ - _easingOpt = fEasingOpt; -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCBKeyframe.h b/cocos/editor-support/cocosbuilder/CCBKeyframe.h deleted file mode 100644 index f08c5e27133a..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBKeyframe.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCB_KEYFRAME_H__ -#define __CCB_KEYFRAME_H__ - -#include "base/CCRef.h" -#include "base/CCValue.h" - - -namespace cocosbuilder { - -class CC_DLL CCBKeyframe : public cocos2d::Ref -{ -public: - enum class EasingType - { - INSTANT, - - LINEAR, - - CUBIC_IN, - CUBIC_OUT, - CUBIC_INOUT, - - ELASTIC_IN, - ELASTIC_OUT, - ELASTIC_INOUT, - - BOUNCE_IN, - BOUNCE_OUT, - BOUNCE_INOUT, - - BACK_IN, - BACK_OUT, - BACK_INOUT, - }; - /** - * @js ctor - */ - CCBKeyframe(); - /** - * @js NA - * @lua NA - */ - ~CCBKeyframe(); - - const cocos2d::Value& getValue() const; - void setValue(const cocos2d::Value& value); - - cocos2d::Ref* getObject() const; - void setObject(cocos2d::Ref* obj); - - float getTime(); - void setTime(float fTime); - - EasingType getEasingType(); - void setEasingType(EasingType easingType); - - float getEasingOpt(); - void setEasingOpt(float fEasingOpt); - -private: - cocos2d::Value _value; - cocos2d::Ref* _object; - float _time; - EasingType _easingType; - float _easingOpt; -}; - -} - -#endif // __CCB_KEYFRAME_H__ diff --git a/cocos/editor-support/cocosbuilder/CCBMemberVariableAssigner.h b/cocos/editor-support/cocosbuilder/CCBMemberVariableAssigner.h deleted file mode 100644 index b1f0f6383b52..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBMemberVariableAssigner.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCBMEMBERVARIABLEASSIGNER_H_ -#define _CCB_CCBMEMBERVARIABLEASSIGNER_H_ - - -namespace cocosbuilder { - -#define CCB_MEMBERVARIABLEASSIGNER_GLUE(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE) \ - if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, (MEMBERVARIABLENAME))) { \ - MEMBERVARIABLETYPE pOldVar = MEMBERVARIABLE; \ - MEMBERVARIABLE = dynamic_cast(pNode); \ - CC_ASSERT(MEMBERVARIABLE); \ - if (pOldVar != MEMBERVARIABLE) { \ - CC_SAFE_RELEASE(pOldVar); \ - MEMBERVARIABLE->retain(); \ - } \ - return true; \ - } - -#define CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE) \ - if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, MEMBERVARIABLENAME)) { \ - MEMBERVARIABLE = dynamic_cast(pNode); \ - CC_ASSERT(MEMBERVARIABLE); \ - return true; \ - } - -class CC_DLL CCBMemberVariableAssigner { - public: - /** - * @js NA - * @lua NA - */ - virtual ~CCBMemberVariableAssigner() {}; - - /** - * The callback function of assigning member variable. - * @note The member variable must be Node or its subclass. - * @param target The custom class. - * @param memberVariableName The name of the member variable. - * @param node The member variable. - * @return Whether the assignment was successful. - */ - virtual bool onAssignCCBMemberVariable(cocos2d::Ref* target, const char* memberVariableName, cocos2d::Node* node) = 0; - - /** - * The callback function of assigning custom properties. - * @note The member variable must be Integer, Float, Boolean or String. - * @param target The custom class. - * @param memberVariableName The name of the member variable. - * @param value The value of the property. - * @return Whether the assignment was successful. - */ - virtual bool onAssignCCBCustomProperty(cocos2d::Ref* target, const char* memberVariableName, const cocos2d::Value& value) { return false; }; -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCBReader.cpp b/cocos/editor-support/cocosbuilder/CCBReader.cpp deleted file mode 100644 index 2a2cc68f5611..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBReader.cpp +++ /dev/null @@ -1,1101 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include -#include - -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" -#include "2d/CCScene.h" -#include "2d/CCSpriteFrameCache.h" -#include "renderer/CCTextureCache.h" - -#include "editor-support/cocosbuilder/CCBReader.h" -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "editor-support/cocosbuilder/CCNodeLoaderLibrary.h" -#include "editor-support/cocosbuilder/CCNodeLoaderListener.h" -#include "editor-support/cocosbuilder/CCBMemberVariableAssigner.h" -#include "editor-support/cocosbuilder/CCBSelectorResolver.h" -#include "editor-support/cocosbuilder/CCBAnimationManager.h" -#include "editor-support/cocosbuilder/CCBSequenceProperty.h" -#include "editor-support/cocosbuilder/CCBKeyframe.h" -#include - -using namespace cocos2d; -using namespace cocos2d::extension; - -namespace cocosbuilder { - -/************************************************************************* - Implementation of CCBFile - *************************************************************************/ - -CCBFile::CCBFile():_CCBFileNode(nullptr) {} - -CCBFile* CCBFile::create() -{ - CCBFile *ret = new (std::nothrow) CCBFile(); - - if (ret) - { - ret->autorelease(); - } - - return ret; -} - -Node* CCBFile::getCCBFileNode() -{ - return _CCBFileNode; -} - -void CCBFile::setCCBFileNode(Node *pNode) -{ - CC_SAFE_RELEASE(_CCBFileNode); - _CCBFileNode = pNode; - CC_SAFE_RETAIN(_CCBFileNode); -} - -/************************************************************************* - Implementation of CCBReader - *************************************************************************/ - -CCBReader::CCBReader(NodeLoaderLibrary * pNodeLoaderLibrary, CCBMemberVariableAssigner * pCCBMemberVariableAssigner, CCBSelectorResolver * pCCBSelectorResolver, NodeLoaderListener * pNodeLoaderListener) -: _data(nullptr) -, _bytes(nullptr) -, _currentByte(-1) -, _currentBit(-1) -, _owner(nullptr) -, _animationManager(nullptr) -, _animatedProps(nullptr) -{ - this->_nodeLoaderLibrary = pNodeLoaderLibrary; - this->_nodeLoaderLibrary->retain(); - this->_CCBMemberVariableAssigner = pCCBMemberVariableAssigner; - this->_CCBSelectorResolver = pCCBSelectorResolver; - this->_nodeLoaderListener = pNodeLoaderListener; - init(); -} - -CCBReader::CCBReader(CCBReader * ccbReader) -: _data(nullptr) -, _bytes(nullptr) -, _currentByte(-1) -, _currentBit(-1) -, _owner(nullptr) -, _animationManager(nullptr) -, _animatedProps(nullptr) -{ - this->_loadedSpriteSheets = ccbReader->_loadedSpriteSheets; - this->_nodeLoaderLibrary = ccbReader->_nodeLoaderLibrary; - this->_nodeLoaderLibrary->retain(); - - this->_CCBMemberVariableAssigner = ccbReader->_CCBMemberVariableAssigner; - this->_CCBSelectorResolver = ccbReader->_CCBSelectorResolver; - this->_nodeLoaderListener = ccbReader->_nodeLoaderListener; - - this->_CCBRootPath = ccbReader->getCCBRootPath(); - - init(); -} - -CCBReader::CCBReader() -: _data(nullptr) -, _bytes(nullptr) -, _currentByte(-1) -, _currentBit(-1) -, _owner(nullptr) -, _animationManager(nullptr) -, _nodeLoaderLibrary(nullptr) -, _nodeLoaderListener(nullptr) -, _CCBMemberVariableAssigner(nullptr) -, _CCBSelectorResolver(nullptr) -{ - init(); -} - -CCBReader::~CCBReader() -{ - CC_SAFE_RELEASE_NULL(_owner); - - this->_nodeLoaderLibrary->release(); - - _ownerOutletNames.clear(); - _ownerCallbackNames.clear(); - - // Clear string cache. - this->_stringCache.clear(); - - setAnimationManager(nullptr); -} - -void CCBReader::setCCBRootPath(const char* ccbRootPath) -{ - CCASSERT(ccbRootPath != nullptr, "ccbRootPath can't be nullptr!"); - _CCBRootPath = ccbRootPath; -} - -const std::string& CCBReader::getCCBRootPath() const -{ - return _CCBRootPath; -} - -bool CCBReader::init() -{ - // Setup action manager - CCBAnimationManager *pActionManager = new (std::nothrow) CCBAnimationManager(); - setAnimationManager(pActionManager); - pActionManager->release(); - - // Setup resolution scale and container size - _animationManager->setRootContainerSize(Director::getInstance()->getWinSize()); - - return true; -} - -CCBAnimationManager* CCBReader::getAnimationManager() -{ - return _animationManager; -} - -void CCBReader::setAnimationManager(CCBAnimationManager *pAnimationManager) -{ - CC_SAFE_RELEASE(_animationManager); - _animationManager = pAnimationManager; - CC_SAFE_RETAIN(_animationManager); -} - -CCBReader::CCBAnimationManagerMapPtr CCBReader::getAnimationManagers() -{ - return _animationManagers; -} - -void CCBReader::setAnimationManagers(CCBAnimationManagerMapPtr x) -{ - _animationManagers = x; -} - -CCBMemberVariableAssigner * CCBReader::getCCBMemberVariableAssigner() { - return this->_CCBMemberVariableAssigner; -} - -CCBSelectorResolver * CCBReader::getCCBSelectorResolver() { - return this->_CCBSelectorResolver; -} - -std::set* CCBReader::getAnimatedProperties() -{ - return _animatedProps; -} - -std::set& CCBReader::getLoadedSpriteSheet() -{ - return _loadedSpriteSheets; -} - -Ref* CCBReader::getOwner() -{ - return _owner; -} - -Node* CCBReader::readNodeGraphFromFile(const char *pCCBFileName) -{ - return this->readNodeGraphFromFile(pCCBFileName, nullptr); -} - -Node* CCBReader::readNodeGraphFromFile(const char* pCCBFileName, Ref* pOwner) -{ - return this->readNodeGraphFromFile(pCCBFileName, pOwner, Director::getInstance()->getWinSize()); -} - -Node* CCBReader::readNodeGraphFromFile(const char *pCCBFileName, Ref *pOwner, const Size &parentSize) -{ - if (nullptr == pCCBFileName || strlen(pCCBFileName) == 0) - { - return nullptr; - } - - std::string strCCBFileName(pCCBFileName); - std::string strSuffix(".ccbi"); - // Add ccbi suffix - if (!CCBReader::endsWith(strCCBFileName.c_str(), strSuffix.c_str())) - { - strCCBFileName += strSuffix; - } - - std::string strPath = FileUtils::getInstance()->fullPathForFilename(strCCBFileName); - - auto dataPtr = std::make_shared(FileUtils::getInstance()->getDataFromFile(strPath)); - - Node *ret = this->readNodeGraphFromData(dataPtr, pOwner, parentSize); - - return ret; -} - -Node* CCBReader::readNodeGraphFromData(std::shared_ptr data, Ref *pOwner, const Size &parentSize) -{ - _data = data; - _bytes =_data->getBytes(); - _currentByte = 0; - _currentBit = 0; - _owner = pOwner; - CC_SAFE_RETAIN(_owner); - - _animationManager->setRootContainerSize(parentSize); - _animationManager->_owner = _owner; - - Node *pNodeGraph = readFileWithCleanUp(true, std::make_shared()); - - if (pNodeGraph && _animationManager->getAutoPlaySequenceId() != -1) - { - // Auto play animations - _animationManager->runAnimationsForSequenceIdTweenDuration(_animationManager->getAutoPlaySequenceId(), 0); - } - - // Assign actionManagers to userObject - for (auto iter = _animationManagers->begin(); iter != _animationManagers->end(); ++iter) - { - Node* pNode = iter->first; - CCBAnimationManager* manager = iter->second; - - pNode->setUserObject(manager); - - if (_jsControlled) - { - _nodesWithAnimationManagers.pushBack(pNode); - _animationManagersForNodes.pushBack(manager); - } - } - - return pNodeGraph; -} - -Scene* CCBReader::createSceneWithNodeGraphFromFile(const char *pCCBFileName) -{ - return createSceneWithNodeGraphFromFile(pCCBFileName, nullptr); -} - -Scene* CCBReader::createSceneWithNodeGraphFromFile(const char *pCCBFileName, Ref *pOwner) -{ - return createSceneWithNodeGraphFromFile(pCCBFileName, pOwner, Director::getInstance()->getWinSize()); -} - -Scene* CCBReader::createSceneWithNodeGraphFromFile(const char *pCCBFileName, Ref *pOwner, const Size &parentSize) -{ - Node *pNode = readNodeGraphFromFile(pCCBFileName, pOwner, parentSize); - Scene *pScene = Scene::create(); - pScene->addChild(pNode); - - return pScene; -} - -void CCBReader::cleanUpNodeGraph(Node *node) -{ - node->setUserObject(nullptr); - - auto& children = node->getChildren(); - for(const auto &obj : children) { - cleanUpNodeGraph(obj); - } -} - -Node* CCBReader::readFileWithCleanUp(bool bCleanUp, CCBAnimationManagerMapPtr am) -{ - if (! readHeader()) - { - return nullptr; - } - - if (! readStringCache()) - { - return nullptr; - } - - if (! readSequences()) - { - return nullptr; - } - - setAnimationManagers(am); - - Node *pNode = readNodeGraph(nullptr); - - _animationManagers->insert(pNode, _animationManager); - - if (bCleanUp) - { - cleanUpNodeGraph(pNode); - } - - return pNode; -} - -bool CCBReader::readStringCache() { - int numStrings = this->readInt(false); - - for(int i = 0; i < numStrings; i++) { - this->_stringCache.push_back(this->readUTF8()); - } - - return true; -} - -bool CCBReader::readHeader() -{ - /* If no bytes loaded, don't crash about it. */ - if(this->_bytes == nullptr) { - return false; - } - - /* Read magic bytes */ - int magicBytes = *((int*)(this->_bytes + this->_currentByte)); - this->_currentByte += 4; - - if(CC_SWAP_INT32_BIG_TO_HOST(magicBytes) != (*reinterpret_cast("ccbi"))) { - return false; - } - - /* Read version. */ - int version = this->readInt(false); - if(version != CCB_VERSION) { - log("WARNING! Incompatible ccbi file version (file: %d reader: %d)", version, CCB_VERSION); - return false; - } - - // Read JS check - _jsControlled = this->readBool(); - _animationManager->_jsControlled = _jsControlled; - - return true; -} - -unsigned char CCBReader::readByte() -{ - unsigned char byte = this->_bytes[this->_currentByte]; - this->_currentByte++; - return byte; -} - -bool CCBReader::readBool() -{ - return 0 == this->readByte() ? false : true; -} - -std::string CCBReader::readUTF8() -{ - std::string ret; - - int b0 = this->readByte(); - int b1 = this->readByte(); - - int numBytes = b0 << 8 | b1; - - char* pStr = (char*)malloc(numBytes+1); - memcpy(pStr, _bytes+_currentByte, numBytes); - pStr[numBytes] = '\0'; - ret = pStr; - free(pStr); - - _currentByte += numBytes; - - return ret; -} - -bool CCBReader::getBit() { - bool bit; - unsigned char byte = *(this->_bytes + this->_currentByte); - if(byte & (1 << this->_currentBit)) { - bit = true; - } else { - bit = false; - } - - this->_currentBit++; - - if(this->_currentBit >= 8) { - this->_currentBit = 0; - this->_currentByte++; - } - - return bit; -} - -void CCBReader::alignBits() { - if(this->_currentBit) { - this->_currentBit = 0; - this->_currentByte++; - } -} - -int CCBReader::readInt(bool pSigned) { - // Read encoded int - int numBits = 0; - while(!this->getBit()) { - numBits++; - } - - long long current = 0; - for(int a = numBits - 1; a >= 0; a--) { - if(this->getBit()) { - current |= 1LL << a; - } - } - current |= 1LL << numBits; - - int num; - if(pSigned) { - int s = current % 2; - if(s) { - num = static_cast(current / 2); - } else { - num = static_cast(-current / 2); - } - } else { - num = static_cast(current - 1); - } - - this->alignBits(); - - return num; -} - - -float CCBReader::readFloat() -{ - FloatType type = static_cast(this->readByte()); - - switch (type) - { - case FloatType::_0: - return 0; - case FloatType::_1: - return 1; - case FloatType::MINUS1: - return -1; - case FloatType::_05: - return 0.5f; - case FloatType::INTEGER: - return (float)this->readInt(true); - default: - { - /* using a memcpy since the compiler isn't - * doing the float ptr math correctly on device. - * TODO: still applies in C++ ? */ - unsigned char* pF = (this->_bytes + this->_currentByte); - float f = 0; - - // N.B - in order to avoid an unaligned memory access crash on 'memcpy()' the the (void*) casts of the source and - // destination pointers are EXTREMELY important for the ARM compiler. - // - // Without a (void*) cast, the ARM compiler makes the assumption that the float* pointer is naturally aligned - // according to it's type size (aligned along 4 byte boundaries) and thus tries to call a more optimized - // version of memcpy() which makes this alignment assumption also. When reading back from a file of course our pointers - // may not be aligned, hence we need to avoid the compiler making this assumption. The (void*) cast serves this purpose, - // and causes the ARM compiler to choose the slower, more generalized (unaligned) version of memcpy() - // - // For more about this compiler behavior, see: - // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3934.html - memcpy((void*) &f, (const void*) pF, sizeof(float)); - - this->_currentByte += sizeof(float); - return f; - } - } -} - -std::string CCBReader::readCachedString() -{ - int n = this->readInt(false); - return this->_stringCache[n]; -} - -Node * CCBReader::readNodeGraph(Node * pParent) -{ - /* Read class name. */ - std::string className = this->readCachedString(); - - std::string _jsControlledName; - - if(_jsControlled) { - _jsControlledName = this->readCachedString(); - } - - // Read assignment type and name - TargetType memberVarAssignmentType = static_cast(this->readInt(false)); - std::string memberVarAssignmentName; - if(memberVarAssignmentType != TargetType::NONE) - { - memberVarAssignmentName = this->readCachedString(); - } - - NodeLoader *ccNodeLoader = this->_nodeLoaderLibrary->getNodeLoader(className.c_str()); - - if (! ccNodeLoader) - { - log("no corresponding node loader for %s", className.c_str()); - return nullptr; - } - - Node *node = ccNodeLoader->loadNode(pParent, this); - - // Set root node - if (! _animationManager->getRootNode()) - { - _animationManager->setRootNode(node); - } - - // Assign controller - if(_jsControlled && node == _animationManager->getRootNode()) - { - _animationManager->setDocumentControllerName(_jsControlledName); - } - - // Read animated properties - std::unordered_map> seqs; - _animatedProps = new std::set(); - - int numSequence = readInt(false); - for (int i = 0; i < numSequence; ++i) - { - int seqId = readInt(false); - Map seqNodeProps; - - int numProps = readInt(false); - - for (int j = 0; j < numProps; ++j) - { - CCBSequenceProperty *seqProp = new (std::nothrow) CCBSequenceProperty(); - seqProp->autorelease(); - - seqProp->setName(readCachedString().c_str()); - seqProp->setType(readInt(false)); - _animatedProps->insert(seqProp->getName()); - - int numKeyframes = readInt(false); - - for (int k = 0; k < numKeyframes; ++k) - { - CCBKeyframe *keyframe = readKeyframe(static_cast(seqProp->getType())); - - seqProp->getKeyframes().pushBack(keyframe); - } - - seqNodeProps.insert(seqProp->getName(), seqProp); - } - - seqs[seqId] = seqNodeProps; - } - - if (!seqs.empty()) - { - _animationManager->addNode(node, seqs); - } - - // Read properties - ccNodeLoader->parseProperties(node, pParent, this); - - bool isCCBFileNode = (nullptr == dynamic_cast(node)) ? false : true; - // Handle sub ccb files (remove middle node) - if (isCCBFileNode) - { - CCBFile *ccbFileNode = (CCBFile*)node; - - Node *embeddedNode = ccbFileNode->getCCBFileNode(); - embeddedNode->setPosition(ccbFileNode->getPosition()); - embeddedNode->setRotation(ccbFileNode->getRotation()); - embeddedNode->setScaleX(ccbFileNode->getScaleX()); - embeddedNode->setScaleY(ccbFileNode->getScaleY()); - embeddedNode->setTag(ccbFileNode->getTag()); - embeddedNode->setVisible(true); - //embeddedNode->setIgnoreAnchorPointForPosition(ccbFileNode->isIgnoreAnchorPointForPosition()); - - _animationManager->moveAnimationsFromNode(ccbFileNode, embeddedNode); - - ccbFileNode->setCCBFileNode(nullptr); - - node = embeddedNode; - } - - if (memberVarAssignmentType != TargetType::NONE) - { - if(!_jsControlled) - { - Ref* target = nullptr; - if(memberVarAssignmentType == TargetType::DOCUMENT_ROOT) - { - target = _animationManager->getRootNode(); - } - else if(memberVarAssignmentType == TargetType::OWNER) - { - target = this->_owner; - } - - if(target != nullptr) - { - CCBMemberVariableAssigner * targetAsCCBMemberVariableAssigner = dynamic_cast(target); - - bool assigned = false; - if (memberVarAssignmentType != TargetType::NONE) - { - if(targetAsCCBMemberVariableAssigner != nullptr) - { - assigned = targetAsCCBMemberVariableAssigner->onAssignCCBMemberVariable(target, memberVarAssignmentName.c_str(), node); - } - - if(!assigned && this->_CCBMemberVariableAssigner != nullptr) - { - assigned = this->_CCBMemberVariableAssigner->onAssignCCBMemberVariable(target, memberVarAssignmentName.c_str(), node); - } - } - } - } - else - { - if(memberVarAssignmentType == TargetType::DOCUMENT_ROOT) - { - _animationManager->addDocumentOutletName(memberVarAssignmentName); - _animationManager->addDocumentOutletNode(node); - } - else - { - _ownerOutletNames.push_back(memberVarAssignmentName); - _ownerOutletNodes.pushBack(node); - } - } - } - - // Assign custom properties. - if (!ccNodeLoader->getCustomProperties().empty()) - { - bool customAssigned = false; - - if(!_jsControlled) - { - Ref* target = node; - if(target != nullptr) - { - CCBMemberVariableAssigner * targetAsCCBMemberVariableAssigner = dynamic_cast(target); - if(targetAsCCBMemberVariableAssigner != nullptr) - { - auto& customPropeties = ccNodeLoader->getCustomProperties(); - - for (auto iter = customPropeties.begin(); iter != customPropeties.end(); ++iter) - { - customAssigned = targetAsCCBMemberVariableAssigner->onAssignCCBCustomProperty(target, iter->first.c_str(), iter->second); - - if(!customAssigned && this->_CCBMemberVariableAssigner != nullptr) - { - customAssigned = this->_CCBMemberVariableAssigner->onAssignCCBCustomProperty(target, iter->first.c_str(), iter->second); - } - } - } - } - } - } - - delete _animatedProps; - _animatedProps = nullptr; - - /* Read and add children. */ - int numChildren = this->readInt(false); - for(int i = 0; i < numChildren; i++) - { - Node * child = this->readNodeGraph(node); - node->addChild(child); - } - - // FIX ISSUE #1860: "onNodeLoaded will be called twice if ccb was added as a CCBFile". - // If it's a sub-ccb node, skip notification to NodeLoaderListener since it will be - // notified at LINE #734: Node * child = this->readNodeGraph(node); - if (!isCCBFileNode) - { - // Call onNodeLoaded - NodeLoaderListener * nodeAsNodeLoaderListener = dynamic_cast(node); - if(nodeAsNodeLoaderListener != nullptr) - { - nodeAsNodeLoaderListener->onNodeLoaded(node, ccNodeLoader); - } - else if(this->_nodeLoaderListener != nullptr) - { - this->_nodeLoaderListener->onNodeLoaded(node, ccNodeLoader); - } - } - return node; -} - -CCBKeyframe* CCBReader::readKeyframe(PropertyType type) -{ - CCBKeyframe *keyframe = new (std::nothrow) CCBKeyframe(); - keyframe->autorelease(); - - keyframe->setTime(readFloat()); - - CCBKeyframe::EasingType easingType = static_cast(readInt(false)); - float easingOpt = 0; - Value value; - - if (easingType == CCBKeyframe::EasingType::CUBIC_IN - || easingType == CCBKeyframe::EasingType::CUBIC_OUT - || easingType == CCBKeyframe::EasingType::CUBIC_INOUT - || easingType == CCBKeyframe::EasingType::ELASTIC_IN - || easingType == CCBKeyframe::EasingType::ELASTIC_OUT - || easingType == CCBKeyframe::EasingType::ELASTIC_INOUT) - { - easingOpt = readFloat(); - } - keyframe->setEasingType(easingType); - keyframe->setEasingOpt(easingOpt); - - if (type == PropertyType::CHECK) - { - value = readBool(); - } - else if (type == PropertyType::BYTE) - { - value = readByte(); - } - else if (type == PropertyType::COLOR3) - { - unsigned char r = readByte(); - unsigned char g = readByte(); - unsigned char b = readByte(); - - ValueMap colorMap; - colorMap["r"] = r; - colorMap["g"] = g; - colorMap["b"] = b; - - value = colorMap; - } - else if (type == PropertyType::DEGREES) - { - value = readFloat(); - } - else if (type == PropertyType::SCALE_LOCK || type == PropertyType::POSITION - || type == PropertyType::FLOAT_XY) - { - float a = readFloat(); - float b = readFloat(); - - ValueVector ab; - ab.push_back(Value(a)); - ab.push_back(Value(b)); - - value = ab; - } - else if (type == PropertyType::SPRITEFRAME) - { - std::string spriteSheet = readCachedString(); - std::string spriteFile = readCachedString(); - - SpriteFrame* spriteFrame; - - if (spriteSheet.empty()) - { - spriteFile = _CCBRootPath + spriteFile; - - Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(spriteFile); - Rect bounds = Rect(0, 0, texture->getContentSize().width, texture->getContentSize().height); - - spriteFrame = SpriteFrame::createWithTexture(texture, bounds); - } - else - { - spriteSheet = _CCBRootPath + spriteSheet; - SpriteFrameCache* frameCache = SpriteFrameCache::getInstance(); - - // Load the sprite sheet only if it is not loaded - if (_loadedSpriteSheets.find(spriteSheet) == _loadedSpriteSheets.end()) - { - frameCache->addSpriteFramesWithFile(spriteSheet); - _loadedSpriteSheets.insert(spriteSheet); - } - - spriteFrame = frameCache->getSpriteFrameByName(spriteFile); - } - - keyframe->setObject(spriteFrame); - } - - if (!value.isNull()) - keyframe->setValue(value); - - return keyframe; -} - - -bool CCBReader::readCallbackKeyframesForSeq(CCBSequence* seq) -{ - int numKeyframes = readInt(false); - if(!numKeyframes) return true; - - CCBSequenceProperty* channel = new (std::nothrow) CCBSequenceProperty(); - channel->autorelease(); - - for(int i = 0; i < numKeyframes; ++i) { - - float time = readFloat(); - std::string callbackName = readCachedString(); - - int callbackType = readInt(false); - - ValueVector valueVector; - valueVector.push_back(Value(callbackName)); - valueVector.push_back(Value(callbackType)); - - CCBKeyframe* keyframe = new (std::nothrow) CCBKeyframe(); - keyframe->autorelease(); - - keyframe->setTime(time); - keyframe->setValue(Value(valueVector)); - - if(_jsControlled) { - std::stringstream callbackIdentifier; - callbackIdentifier << callbackType; - callbackIdentifier << ":" + callbackName; - _animationManager->getKeyframeCallbacks().push_back(Value(callbackIdentifier.str())); - } - - channel->getKeyframes().pushBack(keyframe); - } - - seq->setCallbackChannel(channel); - - return true; -} - -bool CCBReader::readSoundKeyframesForSeq(CCBSequence* seq) { - int numKeyframes = readInt(false); - if(!numKeyframes) return true; - - CCBSequenceProperty* channel = new (std::nothrow) CCBSequenceProperty(); - channel->autorelease(); - - for(int i = 0; i < numKeyframes; ++i) { - - float time = readFloat(); - std::string soundFile = readCachedString(); - float pitch = readFloat(); - float pan = readFloat(); - float gain = readFloat(); - - ValueVector vec; - vec.push_back(Value(soundFile)); - vec.push_back(Value(pitch)); - vec.push_back(Value(pan)); - vec.push_back(Value(gain)); - - CCBKeyframe* keyframe = new (std::nothrow) CCBKeyframe(); - keyframe->setTime(time); - keyframe->setValue(Value(vec)); - channel->getKeyframes().pushBack(keyframe); - keyframe->release(); - } - - seq->setSoundChannel(channel); - - return true; -} - - -Node * CCBReader::readNodeGraph() { - return this->readNodeGraph(nullptr); -} - -bool CCBReader::readSequences() -{ - auto& sequences = _animationManager->getSequences(); - - int numSeqs = readInt(false); - - for (int i = 0; i < numSeqs; i++) - { - CCBSequence *seq = new (std::nothrow) CCBSequence(); - seq->autorelease(); - - seq->setDuration(readFloat()); - seq->setName(readCachedString().c_str()); - seq->setSequenceId(readInt(false)); - seq->setChainedSequenceId(readInt(true)); - - if(!readCallbackKeyframesForSeq(seq)) return false; - if(!readSoundKeyframesForSeq(seq)) return false; - - sequences.pushBack(seq); - } - - _animationManager->setAutoPlaySequenceId(readInt(true)); - return true; -} - -std::string CCBReader::lastPathComponent(const char* pPath) { - std::string path(pPath); - size_t slashPos = path.find_last_of("/"); - if(slashPos != std::string::npos) { - return path.substr(slashPos + 1, path.length() - slashPos); - } - return path; -} - -std::string CCBReader::deletePathExtension(const char* pPath) { - std::string path(pPath); - size_t dotPos = path.find_last_of("."); - if(dotPos != std::string::npos) { - return path.substr(0, dotPos); - } - return path; -} - -std::string CCBReader::toLowerCase(const char* pString) { - std::string copy(pString); - std::transform(copy.begin(), copy.end(), copy.begin(), ::tolower); - return copy; -} - -bool CCBReader::endsWith(const char* pString, const char* pEnding) { - std::string string(pString); - std::string ending(pEnding); - if(string.length() >= ending.length()) { - return (string.compare(string.length() - ending.length(), ending.length(), ending) == 0); - } else { - return false; - } -} - -bool CCBReader::isJSControlled() -{ - return _jsControlled; -} - -void CCBReader::addOwnerCallbackName(const std::string& name) -{ - _ownerCallbackNames.push_back(name); -} - -void CCBReader::addOwnerCallbackNode(Node *node) -{ - _ownerCallbackNodes.pushBack(node); -} - -void CCBReader::addOwnerCallbackControlEvents(Control::EventType type) -{ - _ownerOwnerCallbackControlEvents.push_back(Value((int)type)); -} - -void CCBReader::addDocumentCallbackName(const std::string& name) -{ - _animationManager->addDocumentCallbackName(name); -} - -void CCBReader::addDocumentCallbackNode(Node *node) -{ - _animationManager->addDocumentCallbackNode(node); -} - -void CCBReader::addDocumentCallbackControlEvents(Control::EventType eventType) -{ - _animationManager->addDocumentCallbackControlEvents(eventType); -} - -ValueVector CCBReader::getOwnerCallbackNames() -{ - ValueVector ret; - ret.reserve(_ownerCallbackNames.size()); - - std::vector::iterator it = _ownerCallbackNames.begin(); - for (; it != _ownerCallbackNames.end(); ++it) - { - ret.push_back(Value(*it)); - } - - return ret; -} - -Vector& CCBReader::getOwnerCallbackNodes() -{ - return _ownerCallbackNodes; -} - -ValueVector& CCBReader::getOwnerCallbackControlEvents() -{ - return _ownerOwnerCallbackControlEvents; -} - -ValueVector CCBReader::getOwnerOutletNames() -{ - ValueVector ret; - ret.reserve(_ownerOutletNames.size()); - std::vector::iterator it = _ownerOutletNames.begin(); - for (; it != _ownerOutletNames.end(); ++it) - { - ret.push_back(Value(*it)); - } - return ret; -} - -Vector& CCBReader::getOwnerOutletNodes() -{ - return _ownerOutletNodes; -} - -Vector& CCBReader::getNodesWithAnimationManagers() -{ - return _nodesWithAnimationManagers; -} - -Vector& CCBReader::getAnimationManagersForNodes() -{ - return _animationManagersForNodes; -} - -void CCBReader::addOwnerOutletName(std::string name) -{ - _ownerOutletNames.push_back(name); -} - -void CCBReader::addOwnerOutletNode(Node *node) -{ - if (nullptr == node) - return; - - _ownerOutletNodes.pushBack(node); -} - -/************************************************************************ - Static functions - ************************************************************************/ - -static float __ccbResolutionScale = 1.0f; - -float CCBReader::getResolutionScale() -{ - return __ccbResolutionScale; -} - -void CCBReader::setResolutionScale(float scale) -{ - __ccbResolutionScale = scale; -} - -}; diff --git a/cocos/editor-support/cocosbuilder/CCBReader.h b/cocos/editor-support/cocosbuilder/CCBReader.h deleted file mode 100644 index 22208f88fe46..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBReader.h +++ /dev/null @@ -1,435 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCBREADER_H_ -#define _CCB_CCBREADER_H_ - -#include -#include -#include -#include "2d/CCNode.h" -#include "base/CCData.h" -#include "base/CCMap.h" -#include "editor-support/cocosbuilder/CCBSequence.h" -#include "extensions/GUI/CCControlExtension/CCControl.h" -#include "editor-support/cocosbuilder/CCBAnimationManager.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#ifdef ABSOLUTE -#undef ABSOLUTE -#endif -#endif - -#define CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(T, METHOD) static T * METHOD() { \ - T * ptr = new (std::nothrow) T(); \ - if(ptr != NULL) { \ - ptr->autorelease(); \ - return ptr; \ - } \ - CC_SAFE_DELETE(ptr); \ - return NULL; \ -} - -#define CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(T, METHOD) static T * METHOD() { \ - T * ptr = new (std::nothrow) T(); \ - if(ptr != NULL && ptr->init()) { \ - ptr->autorelease(); \ - return ptr; \ - } \ - CC_SAFE_DELETE(ptr); \ - return NULL; \ -} - -#define CCB_VERSION 5 - -namespace cocosbuilder { - -/** - * @addtogroup cocosbuilder - * @{ - */ - -class CCBFile : public cocos2d::Node -{ -private: - cocos2d::Node *_CCBFileNode; - -public: - CCBFile(); - - static CCBFile* create(); - - cocos2d::Node* getCCBFileNode(); - void setCCBFileNode(Node *pNode); // retain -}; - -/* Forward declaration. */ -class NodeLoader; -class NodeLoaderLibrary; -class NodeLoaderListener; -class CCBMemberVariableAssigner; -class CCBSelectorResolver; -class CCBAnimationManager; -class CCBKeyframe; - -/** - * @brief Parse CCBI file which is generated by CocosBuilder - */ -class CC_DLL CCBReader : public cocos2d::Ref -{ -public: - enum class PropertyType { - POSITION = 0, - SIZE, - POINT, - POINT_LOCK, - SCALE_LOCK, - DEGREES, - INTEGER, - FLOAT, - FLOAT_VAR, - CHECK, - SPRITEFRAME, - TEXTURE, - BYTE, - COLOR3, - COLOR4F_VAR, - FLIP, - BLEND_MODE, - FNT_FILE, - TEXT, - FONT_TTF, - INTEGER_LABELED, - BLOCK, - ANIMATION, - CCB_FILE, - STRING, - BLOCK_CONTROL, - FLOAT_SCALE, - FLOAT_XY - }; - - enum class FloatType { - _0 = 0, - _1, - MINUS1, - _05, - INTEGER, - FULL - }; - - enum class PlatformType { - ALL = 0, - IOS, - MAC - }; - - enum class TargetType { - NONE = 0, - DOCUMENT_ROOT = 1, - OWNER = 2, - }; - - enum class PositionType - { - RELATIVE_BOTTOM_LEFT, - RELATIVE_TOP_LEFT, - RELATIVE_TOP_RIGHT, - RELATIVE_BOTTOM_RIGHT, - PERCENT, - MULTIPLY_RESOLUTION, - }; - - enum class SizeType - { - ABSOLUTE, - PERCENT, - RELATIVE_CONTAINER, - HORIZONTAL_PERCENT, - VERTICAL_PERCENT, - MULTIPLY_RESOLUTION, - }; - - enum class ScaleType - { - ABSOLUTE, - MULTIPLY_RESOLUTION - }; - /** - * @js NA - * @lua NA - */ - CCBReader(NodeLoaderLibrary *pNodeLoaderLibrary, CCBMemberVariableAssigner *pCCBMemberVariableAssigner = NULL, CCBSelectorResolver *pCCBSelectorResolver = NULL, NodeLoaderListener *pNodeLoaderListener = NULL); - /** - * @js NA - * @lua NA - */ - CCBReader(CCBReader *ccbReader); - /** - * @js NA - * @lua NA - */ - virtual ~CCBReader(); - /** - * @js NA - * @lua NA - */ - CCBReader(); - - void setCCBRootPath(const char* ccbRootPath); - const std::string& getCCBRootPath() const; - - cocos2d::Node* readNodeGraphFromFile(const char *pCCBFileName); - cocos2d::Node* readNodeGraphFromFile(const char *pCCBFileName, cocos2d::Ref *pOwner); - cocos2d::Node* readNodeGraphFromFile(const char *pCCBFileName, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize); - /** - * @js NA - * @lua NA - */ - cocos2d::Node* readNodeGraphFromData(std::shared_ptr data, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize); - - /** - @lua NA - */ - cocos2d::Scene* createSceneWithNodeGraphFromFile(const char *pCCBFileName); - /** - @lua NA - */ - cocos2d::Scene* createSceneWithNodeGraphFromFile(const char *pCCBFileName, cocos2d::Ref *pOwner); - /** - @lua NA - */ - cocos2d::Scene* createSceneWithNodeGraphFromFile(const char *pCCBFileName, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize); - - /** - * @js NA - * @lua NA - */ - CCBMemberVariableAssigner* getCCBMemberVariableAssigner(); - /** - * @js NA - * @lua NA - */ - CCBSelectorResolver* getCCBSelectorResolver(); - - /** - * @js getActionManager - * @lua getActionManager - */ - CCBAnimationManager* getAnimationManager(); - /** - * @js setActionManager - * @lua setActionManager - */ - void setAnimationManager(CCBAnimationManager *pAnimationManager); - - /** Used in NodeLoader::parseProperties() - * @js NA - * @lua NA - */ - std::set* getAnimatedProperties(); - /** - * @js NA - * @lua NA - */ - std::set& getLoadedSpriteSheet(); - /** - * @js NA - * @lua NA - */ - cocos2d::Ref* getOwner(); - - /* Utility methods. - * @js NA - * @lua NA - */ - static std::string lastPathComponent(const char* pString); - /** - * @js NA - * @lua NA - */ - static std::string deletePathExtension(const char* pString); - /** - * @js NA - * @lua NA - */ - static std::string toLowerCase(const char* pString); - /** - * @js NA - * @lua NA - */ - static bool endsWith(const char* pString, const char* pEnding); - - /* Parse methods. - * @js NA - * @lua NA - */ - int readInt(bool pSigned); - /** - * @js NA - * @lua NA - */ - unsigned char readByte(); - /** - * @js NA - * @lua NA - */ - bool readBool(); - std::string readUTF8(); - /** - * @js NA - * @lua NA - */ - float readFloat(); - /** - * @js NA - * @lua NA - */ - std::string readCachedString(); - /** - * @js NA - * @lua NA - */ - bool isJSControlled(); - - bool readCallbackKeyframesForSeq(CCBSequence* seq); - bool readSoundKeyframesForSeq(CCBSequence* seq); - - cocos2d::ValueVector getOwnerCallbackNames(); - cocos2d::Vector& getOwnerCallbackNodes(); - cocos2d::ValueVector& getOwnerCallbackControlEvents(); - - cocos2d::ValueVector getOwnerOutletNames(); - cocos2d::Vector& getOwnerOutletNodes(); - cocos2d::Vector& getNodesWithAnimationManagers(); - cocos2d::Vector& getAnimationManagersForNodes(); - - typedef cocos2d::Map CCBAnimationManagerMap; - typedef std::shared_ptr CCBAnimationManagerMapPtr; - - /** - * @js NA - * @lua NA - */ - CCBAnimationManagerMapPtr getAnimationManagers(); - /** - * @js NA - * @lua NA - */ - void setAnimationManagers(CCBAnimationManagerMapPtr x); - /** - * @js NA - * @lua NA - */ - void addOwnerCallbackName(const std::string& name); - /** - * @js NA - * @lua NA - */ - void addOwnerCallbackNode(cocos2d::Node *node); - void addOwnerCallbackControlEvents(cocos2d::extension::Control::EventType type); - /** - * @js NA - * @lua NA - */ - void addDocumentCallbackName(const std::string& name); - /** - * @js NA - * @lua NA - */ - void addDocumentCallbackNode(cocos2d::Node *node); - void addDocumentCallbackControlEvents(cocos2d::extension::Control::EventType eventType); - /** - * @js NA - * @lua NA - */ - static float getResolutionScale(); - static void setResolutionScale(float scale); - /** - * @js NA - * @lua NA - */ - cocos2d::Node* readFileWithCleanUp(bool bCleanUp, CCBAnimationManagerMapPtr am); - - void addOwnerOutletName(std::string name); - void addOwnerOutletNode(cocos2d::Node *node); - -private: - void cleanUpNodeGraph(cocos2d::Node *pNode); - bool readSequences(); - CCBKeyframe* readKeyframe(PropertyType type); - - bool readHeader(); - bool readStringCache(); - //void readStringCacheEntry(); - cocos2d::Node* readNodeGraph(); - cocos2d::Node* readNodeGraph(cocos2d::Node * pParent); - - bool getBit(); - void alignBits(); - - bool init(); - - friend class NodeLoader; - -private: - std::shared_ptr _data; - unsigned char *_bytes; - int _currentByte; - int _currentBit; - - std::vector _stringCache; - std::set _loadedSpriteSheets; - - cocos2d::Ref *_owner; - - CCBAnimationManager* _animationManager; //retain - CCBAnimationManagerMapPtr _animationManagers; - - std::set *_animatedProps; - - NodeLoaderLibrary *_nodeLoaderLibrary; - NodeLoaderListener *_nodeLoaderListener; - CCBMemberVariableAssigner *_CCBMemberVariableAssigner; - CCBSelectorResolver *_CCBSelectorResolver; - - std::vector _ownerOutletNames; - cocos2d::Vector _ownerOutletNodes; - cocos2d::Vector _nodesWithAnimationManagers; - cocos2d::Vector _animationManagersForNodes; - - std::vector _ownerCallbackNames; - cocos2d::Vector _ownerCallbackNodes; - cocos2d::ValueVector _ownerOwnerCallbackControlEvents; - std::string _CCBRootPath; - - bool _jsControlled; -}; - -// end of effects group -/// @} - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCBSelectorResolver.h b/cocos/editor-support/cocosbuilder/CCBSelectorResolver.h deleted file mode 100644 index cf48bb2a7caf..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBSelectorResolver.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCBSELECTORRESOLVER_H_ -#define _CCB_CCBSELECTORRESOLVER_H_ - -#include "extensions//GUI/CCControlExtension/CCInvocation.h" - - -namespace cocosbuilder { - -#define CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return CC_MENU_SELECTOR(METHOD); \ -} - -#define CCB_SELECTORRESOLVER_CCCONTROL_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return cccontrol_selector(METHOD); \ -} - -#define CCB_SELECTORRESOLVER_CALLFUNC_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return CC_CALLFUNCN_SELECTOR(METHOD); \ -} - -class CC_DLL CCBSelectorResolver { - public: - /** - * @js NA - * @lua NA - */ - virtual ~CCBSelectorResolver() {}; - virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Ref * pTarget, const char* pSelectorName) = 0; - virtual cocos2d::SEL_CallFuncN onResolveCCBCCCallFuncSelector(cocos2d::Ref * pTarget, const char* pSelectorName) { return NULL; }; - virtual cocos2d::extension::Control::Handler onResolveCCBCCControlSelector(cocos2d::Ref * pTarget, const char* pSelectorName) = 0; -}; - - -class CC_DLL CCBScriptOwnerProtocol { -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCBScriptOwnerProtocol() {}; - virtual CCBSelectorResolver * createNew() = 0; -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCBSequence.cpp b/cocos/editor-support/cocosbuilder/CCBSequence.cpp deleted file mode 100644 index 09a3d83cfe93..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBSequence.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCBSequence.h" - -using namespace cocos2d; -using namespace std; - - -namespace cocosbuilder { - -CCBSequence::CCBSequence() -: _duration(0.0f) -, _name("") -, mSequenceId(0) -, mChainedSequenceId(0) -, mCallbackChannel(nullptr) -, mSoundChannel(nullptr) -{} - -CCBSequence::~CCBSequence() { - CC_SAFE_RELEASE(mCallbackChannel); - CC_SAFE_RELEASE(mSoundChannel); -} - -float CCBSequence::getDuration() -{ - return _duration; -} - -void CCBSequence::setDuration(float fDuration) -{ - _duration = fDuration; -} - -const char* CCBSequence::getName() -{ - return _name.c_str(); -} - -void CCBSequence::setName(const char *pName) -{ - _name = pName; -} - -int CCBSequence::getSequenceId() -{ - return mSequenceId; -} - -void CCBSequence::setSequenceId(int nSequenceId) -{ - mSequenceId = nSequenceId; -} - -CCBSequenceProperty* CCBSequence::getCallbackChannel() -{ - return mCallbackChannel; -} - -void CCBSequence::setCallbackChannel(CCBSequenceProperty* callbackChannel) -{ - CC_SAFE_RELEASE(mCallbackChannel); - mCallbackChannel = callbackChannel; - CC_SAFE_RETAIN(mCallbackChannel); -} - - -CCBSequenceProperty* CCBSequence::getSoundChannel() -{ - return mSoundChannel; -} - -void CCBSequence::setSoundChannel(CCBSequenceProperty* soundChannel) -{ - CC_SAFE_RELEASE(mSoundChannel); - mSoundChannel = soundChannel; - CC_SAFE_RETAIN(mSoundChannel); -} - - -int CCBSequence::getChainedSequenceId() -{ - return mChainedSequenceId; -} - -void CCBSequence::setChainedSequenceId(int nChainedSequenceId) -{ - mChainedSequenceId = nChainedSequenceId; -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCBSequence.h b/cocos/editor-support/cocosbuilder/CCBSequence.h deleted file mode 100644 index 83da7efb92ad..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBSequence.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCB_CCSEQUENCE_H__ -#define __CCB_CCSEQUENCE_H__ - -#include - -#include "base/CCRef.h" -#include "editor-support/cocosbuilder/CCBSequenceProperty.h" - -namespace cocosbuilder { - -class CC_DLL CCBSequence : public cocos2d::Ref -{ -public: - CCBSequence(); - /** - * @js NA - * @lua NA - */ - ~CCBSequence(); - float getDuration(); - void setDuration(float fDuration); - - CCBSequenceProperty* getCallbackChannel(); - void setCallbackChannel(CCBSequenceProperty* callbackChannel); - - CCBSequenceProperty* getSoundChannel(); - void setSoundChannel(CCBSequenceProperty* soundChannel); - - const char* getName(); - void setName(const char *pName); - - int getSequenceId(); - void setSequenceId(int nSequenceId); - - int getChainedSequenceId(); - void setChainedSequenceId(int nChainedSequenceId); - -private: - float _duration; - std::string _name; - int mSequenceId; - int mChainedSequenceId; - CCBSequenceProperty* mCallbackChannel; - CCBSequenceProperty* mSoundChannel; -}; - - -} - - -#endif // __CCB_CCSEQUENCE_H__ diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp deleted file mode 100644 index c2b3edc1aedb..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCBSequenceProperty.h" - -using namespace cocos2d; -using namespace std; - -namespace cocosbuilder { - -CCBSequenceProperty::CCBSequenceProperty() -: _name("") -, _type(0) -{ - init(); -} - -bool CCBSequenceProperty::init() -{ - return true; -} - -CCBSequenceProperty::~CCBSequenceProperty() -{ -} - -const char* CCBSequenceProperty::getName() -{ - return _name.c_str(); -} - -void CCBSequenceProperty::setName(const char *pName) -{ - _name = pName; -} - -int CCBSequenceProperty::getType() -{ - return _type; -} - -void CCBSequenceProperty::setType(int type) -{ - _type = type; -} - -cocos2d::Vector& CCBSequenceProperty::getKeyframes() -{ - return _keyframes; -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h deleted file mode 100644 index 4fb8cef43801..000000000000 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCB_SEQUENCE_PROPERTY_H__ -#define __CCB_SEQUENCE_PROPERTY_H__ - -#include "base/CCRef.h" -#include "base/CCVector.h" -#include "editor-support/cocosbuilder/CCBKeyframe.h" - -namespace cocosbuilder { - -class CC_DLL CCBSequenceProperty : public cocos2d::Ref -{ -public: - /** - * @js ctor - */ - CCBSequenceProperty(); - /** - * @js NA - * @lua NA - */ - ~CCBSequenceProperty(); - - virtual bool init(); - - const char* getName(); - void setName(const char* pName); - - int getType(); - void setType(int type); - - cocos2d::Vector& getKeyframes(); - -private: - std::string _name; - int _type; - cocos2d::Vector _keyframes; -}; - -} - -#endif // __CCB_SEQUENCE_PROPERTY_H__ diff --git a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp b/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp deleted file mode 100644 index f621f0176022..000000000000 --- a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCControlButtonLoader.h" - -using namespace cocos2d; -using namespace cocos2d::extension; - -namespace cocosbuilder {; - -#define PROPERTY_ZOOMONTOUCHDOWN "zoomOnTouchDown" -#define PROPERTY_TITLE_NORMAL "title|1" -#define PROPERTY_TITLE_HIGHLIGHTED "title|2" -#define PROPERTY_TITLE_DISABLED "title|3" -#define PROPERTY_TITLECOLOR_NORMAL "titleColor|1" -#define PROPERTY_TITLECOLOR_HIGHLIGHTED "titleColor|2" -#define PROPERTY_TITLECOLOR_DISABLED "titleColor|3" -#define PROPERTY_TITLETTF_NORMAL "titleTTF|1" -#define PROPERTY_TITLETTF_HIGHLIGHTED "titleTTF|2" -#define PROPERTY_TITLETTF_DISABLED "titleTTF|3" -#define PROPERTY_TITLETTFSIZE_NORMAL "titleTTFSize|1" -#define PROPERTY_TITLETTFSIZE_HIGHLIGHTED "titleTTFSize|2" -#define PROPERTY_TITLETTFSIZE_DISABLED "titleTTFSize|3" -#define PROPERTY_LABELANCHORPOINT "labelAnchorPoint" -// TODO: Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! -#define PROPERTY_PREFEREDSIZE "preferedSize" -#define PROPERTY_BACKGROUNDSPRITEFRAME_NORMAL "backgroundSpriteFrame|1" -#define PROPERTY_BACKGROUNDSPRITEFRAME_HIGHLIGHTED "backgroundSpriteFrame|2" -#define PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED "backgroundSpriteFrame|3" - -void ControlButtonLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_ZOOMONTOUCHDOWN) == 0) { - ((ControlButton *)pNode)->setZoomOnTouchDown(pCheck); - } else { - ControlLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeString(Node * pNode, Node * pParent, const char * pPropertyName, const char * pString, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TITLE_NORMAL) == 0) { - ((ControlButton *)pNode)->setTitleForState(pString, Control::State::NORMAL); - } else if(strcmp(pPropertyName, PROPERTY_TITLE_HIGHLIGHTED) == 0) { - ((ControlButton *)pNode)->setTitleForState(pString, Control::State::HIGH_LIGHTED); - } else if(strcmp(pPropertyName, PROPERTY_TITLE_DISABLED) == 0) { - ((ControlButton *)pNode)->setTitleForState(pString, Control::State::DISABLED); - } else { - ControlLoader::onHandlePropTypeString(pNode, pParent, pPropertyName, pString, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeFontTTF(Node * pNode, Node * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TITLETTF_NORMAL) == 0) { - ((ControlButton *)pNode)->setTitleTTFForState(pFontTTF, Control::State::NORMAL); - } else if(strcmp(pPropertyName, PROPERTY_TITLETTF_HIGHLIGHTED) == 0) { - ((ControlButton *)pNode)->setTitleTTFForState(pFontTTF, Control::State::HIGH_LIGHTED); - } else if(strcmp(pPropertyName, PROPERTY_TITLETTF_DISABLED) == 0) { - ((ControlButton *)pNode)->setTitleTTFForState(pFontTTF, Control::State::DISABLED); - } else { - ControlLoader::onHandlePropTypeFontTTF(pNode, pParent, pPropertyName, pFontTTF, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeFloatScale(Node * pNode, Node * pParent, const char * pPropertyName, float pFloatScale, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TITLETTFSIZE_NORMAL) == 0) { - ((ControlButton *)pNode)->setTitleTTFSizeForState(pFloatScale, Control::State::NORMAL); - } else if(strcmp(pPropertyName, PROPERTY_TITLETTFSIZE_HIGHLIGHTED) == 0) { - ((ControlButton *)pNode)->setTitleTTFSizeForState(pFloatScale, Control::State::HIGH_LIGHTED); - } else if(strcmp(pPropertyName, PROPERTY_TITLETTFSIZE_DISABLED) == 0) { - ((ControlButton *)pNode)->setTitleTTFSizeForState(pFloatScale, Control::State::DISABLED); - } else { - ControlLoader::onHandlePropTypeFloatScale(pNode, pParent, pPropertyName, pFloatScale, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypePoint(Node * pNode, Node * pParent, const char * pPropertyName, Vec2 pPoint, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_LABELANCHORPOINT) == 0) { - ((ControlButton *)pNode)->setLabelAnchorPoint(pPoint); - } else { - ControlLoader::onHandlePropTypePoint(pNode, pParent, pPropertyName, pPoint, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, const char * pPropertyName, Size pSize, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_PREFEREDSIZE) == 0) { - ((ControlButton *)pNode)->setPreferredSize(pSize); - } else { - ControlLoader::onHandlePropTypeSize(pNode, pParent, pPropertyName, pSize, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BACKGROUNDSPRITEFRAME_NORMAL) == 0) { - if(pSpriteFrame != nullptr) { - ((ControlButton *)pNode)->setBackgroundSpriteFrameForState(pSpriteFrame, Control::State::NORMAL); - } - } else if(strcmp(pPropertyName, PROPERTY_BACKGROUNDSPRITEFRAME_HIGHLIGHTED) == 0) { - if(pSpriteFrame != nullptr) { - ((ControlButton *)pNode)->setBackgroundSpriteFrameForState(pSpriteFrame, Control::State::HIGH_LIGHTED); - } - } else if(strcmp(pPropertyName, PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED) == 0) { - if(pSpriteFrame != nullptr) { - ((ControlButton *)pNode)->setBackgroundSpriteFrameForState(pSpriteFrame, Control::State::DISABLED); - } - } else { - ControlLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pSpriteFrame, ccbReader); - } -} - -void ControlButtonLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TITLECOLOR_NORMAL) == 0) { - ((ControlButton *)pNode)->setTitleColorForState(pColor3B, Control::State::NORMAL); - } else if(strcmp(pPropertyName, PROPERTY_TITLECOLOR_HIGHLIGHTED) == 0) { - ((ControlButton *)pNode)->setTitleColorForState(pColor3B, Control::State::HIGH_LIGHTED); - } else if(strcmp(pPropertyName, PROPERTY_TITLECOLOR_DISABLED) == 0) { - ((ControlButton *)pNode)->setTitleColorForState(pColor3B, Control::State::DISABLED); - } else { - ControlLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -}; diff --git a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.h b/cocos/editor-support/cocosbuilder/CCControlButtonLoader.h deleted file mode 100644 index 1ff8a1fe6153..000000000000 --- a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCCONTROLBUTTONLOADER_H_ -#define _CCB_CCCONTROLBUTTONLOADER_H_ - -#include "editor-support/cocosbuilder/CCControlLoader.h" -#include "extensions//GUI/CCControlExtension/CCControlButton.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL ControlButtonLoader : public ControlLoader { - public: - /** - * @js NA - * @lua NA - */ - virtual ~ControlButtonLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(ControlButtonLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::extension::ControlButton); - - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader); - virtual void onHandlePropTypeString(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char * pString, CCBReader * ccbReader); - virtual void onHandlePropTypeFontTTF(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * ccbReader); - virtual void onHandlePropTypeFloatScale(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float pFloatScale, CCBReader * ccbReader); - virtual void onHandlePropTypePoint(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Vec2 pPoint, CCBReader * ccbReader); - virtual void onHandlePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Size pSize, CCBReader * ccbReader); - virtual void onHandlePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::SpriteFrame * pSpriteFrame, CCBReader * ccbReader); - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCControlLoader.cpp b/cocos/editor-support/cocosbuilder/CCControlLoader.cpp deleted file mode 100644 index fb590d5dabbc..000000000000 --- a/cocos/editor-support/cocosbuilder/CCControlLoader.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCControlLoader.h" - -using namespace cocos2d; -using namespace cocos2d::extension; - -namespace cocosbuilder { - -#define PROPERTY_ENABLED "enabled" -#define PROPERTY_SELECTED "selected" -#define PROPERTY_CCCONTROL "ccControl" - -void ControlLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_ENABLED) == 0) { - ((Control *)pNode)->setEnabled(pCheck); - } else if(strcmp(pPropertyName, PROPERTY_SELECTED) == 0) { - ((Control *)pNode)->setSelected(pCheck); - } else { - NodeLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader); - } -} - -void ControlLoader::onHandlePropTypeBlockControl(Node * pNode, Node * pParent, const char * pPropertyName, BlockControlData * pBlockControlData, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CCCONTROL) == 0) { - ((Control *)pNode)->addTargetWithActionForControlEvents(pBlockControlData->_target, pBlockControlData->mSELControlHandler, pBlockControlData->mControlEvents); - } else { - NodeLoader::onHandlePropTypeBlockControl(pNode, pParent, pPropertyName, pBlockControlData, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCControlLoader.h b/cocos/editor-support/cocosbuilder/CCControlLoader.h deleted file mode 100644 index 5265cd58360f..000000000000 --- a/cocos/editor-support/cocosbuilder/CCControlLoader.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCCONTROLLOADER_H_ -#define _CCB_CCCONTROLLOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "extensions/GUI/CCControlExtension/CCControl.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL ControlLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~ControlLoader() {}; - -protected: - CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::extension::Control); - - virtual void onHandlePropTypeBlockControl(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, BlockControlData * pBlockControlData, CCBReader * ccbReader); - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.cpp b/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.cpp deleted file mode 100644 index 01aeea56458f..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCLabelBMFontLoader.h" - -using namespace cocos2d; - -namespace cocosbuilder { - -#define PROPERTY_COLOR "color" -#define PROPERTY_OPACITY "opacity" -#define PROPERTY_BLENDFUNC "blendFunc" -#define PROPERTY_FNTFILE "fntFile" -#define PROPERTY_STRING "string" - -void LabelBMFontLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((Label *)pNode)->setColor(pColor3B); - } else { - NodeLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void LabelBMFontLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((Label *)pNode)->setOpacity(pByte); - } else { - NodeLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void LabelBMFontLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((Label *)pNode)->setBlendFunc(pBlendFunc); - } else { - NodeLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -void LabelBMFontLoader::onHandlePropTypeFntFile(Node * pNode, Node * pParent, const char * pPropertyName, const char* pFntFile, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_FNTFILE) == 0) { - ((Label *)pNode)->setBMFontFilePath(pFntFile); - } else { - NodeLoader::onHandlePropTypeFntFile(pNode, pParent, pPropertyName, pFntFile, ccbReader); - } -} - -void LabelBMFontLoader::onHandlePropTypeText(Node * pNode, Node * pParent, const char * pPropertyName, const char* pText, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_STRING) == 0) { - ((Label *)pNode)->setString(pText); - } else { - NodeLoader::onHandlePropTypeText(pNode, pParent, pPropertyName, pText, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.h b/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.h deleted file mode 100644 index 9abf808ba24e..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLabelBMFontLoader.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCLABELBMFONTLOADER_H_ -#define _CCB_CCLABELBMFONTLOADER_H_ - -#include "base/CCRef.h" -#include "2d/CCLabel.h" - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL LabelBMFontLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~LabelBMFontLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(LabelBMFontLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Label); - - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); - virtual void onHandlePropTypeFntFile(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char* pFntFile, CCBReader * ccbReader); - virtual void onHandlePropTypeText(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char* pText, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.cpp b/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.cpp deleted file mode 100644 index 7264f6bdfffb..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCLabelTTFLoader.h" - -using namespace cocos2d; - -#define PROPERTY_COLOR "color" -#define PROPERTY_OPACITY "opacity" -#define PROPERTY_BLENDFUNC "blendFunc" -#define PROPERTY_FONTNAME "fontName" -#define PROPERTY_FONTSIZE "fontSize" -#define PROPERTY_HORIZONTALALIGNMENT "horizontalAlignment" -#define PROPERTY_VERTICALALIGNMENT "verticalAlignment" -#define PROPERTY_STRING "string" -#define PROPERTY_DIMENSIONS "dimensions" - -namespace cocosbuilder { - -void LabelTTFLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((Label *)pNode)->setColor(pColor3B); - } else { - NodeLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((Label *)pNode)->setOpacity(pByte); - } else { - NodeLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((Label *)pNode)->setBlendFunc(pBlendFunc); - } else { - NodeLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeFontTTF(Node * pNode, Node * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_FONTNAME) == 0) { - ((Label *)pNode)->setSystemFontName(pFontTTF); - } else { - NodeLoader::onHandlePropTypeFontTTF(pNode, pParent, pPropertyName, pFontTTF, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeText(Node * pNode, Node * pParent, const char * pPropertyName, const char * pText, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_STRING) == 0) { - ((Label *)pNode)->setString(pText); - } else { - NodeLoader::onHandlePropTypeText(pNode, pParent, pPropertyName, pText, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeFloatScale(Node * pNode, Node * pParent, const char * pPropertyName, float pFloatScale, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_FONTSIZE) == 0) { - ((Label *)pNode)->setSystemFontSize(pFloatScale); - } else { - NodeLoader::onHandlePropTypeFloatScale(pNode, pParent, pPropertyName, pFloatScale, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeIntegerLabeled(Node * pNode, Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_HORIZONTALALIGNMENT) == 0) { - ((Label *)pNode)->setHorizontalAlignment(TextHAlignment(pIntegerLabeled)); - } else if(strcmp(pPropertyName, PROPERTY_VERTICALALIGNMENT) == 0) { - ((Label *)pNode)->setVerticalAlignment(TextVAlignment(pIntegerLabeled)); - } else { - NodeLoader::onHandlePropTypeFloatScale(pNode, pParent, pPropertyName, pIntegerLabeled, ccbReader); - } -} - -void LabelTTFLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, const char * pPropertyName, Size size, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_DIMENSIONS) == 0) { - ((Label *)pNode)->setDimensions(size.width,size.height); - } else { - NodeLoader::onHandlePropTypeSize(pNode, pParent, pPropertyName, size, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.h b/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.h deleted file mode 100644 index 645f6a4cb7bb..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLabelTTFLoader.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCLABELTTFLOADER_H_ -#define _CCB_CCLABELTTFLOADER_H_ - -#include "base/CCRef.h" -#include "2d/CCLabel.h" - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL LabelTTFLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~LabelTTFLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(LabelTTFLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Label); - - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); - virtual void onHandlePropTypeFontTTF(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * ccbReader); - virtual void onHandlePropTypeText(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, const char * pText, CCBReader * ccbReader); - virtual void onHandlePropTypeFloatScale(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float pFloatScale, CCBReader * ccbReader); - virtual void onHandlePropTypeIntegerLabeled(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader); - virtual void onHandlePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Size pSize, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLayerColorLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerColorLoader.cpp deleted file mode 100644 index 8bcff9c20241..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerColorLoader.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCLayerColorLoader.h" - -using namespace cocos2d; - -namespace cocosbuilder { - -#define PROPERTY_COLOR "color" -#define PROPERTY_OPACITY "opacity" -#define PROPERTY_BLENDFUNC "blendFunc" - -void LayerColorLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((LayerColor *)pNode)->setColor(pColor3B); - } else { - LayerLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void LayerColorLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((LayerColor *)pNode)->setOpacity(pByte); - } else { - LayerLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void LayerColorLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((LayerColor *)pNode)->setBlendFunc(pBlendFunc); - } else { - LayerLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCLayerColorLoader.h b/cocos/editor-support/cocosbuilder/CCLayerColorLoader.h deleted file mode 100644 index 3e97f02e5ed4..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerColorLoader.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCLAYERCOLORLOADER_H_ -#define _CCB_CCLAYERCOLORLOADER_H_ - -#include "editor-support/cocosbuilder/CCLayerLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL LayerColorLoader : public LayerLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~LayerColorLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(LayerColorLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::LayerColor); - - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp deleted file mode 100644 index e5c410437dac..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCLayerGradientLoader.h" - -using namespace cocos2d; - -#define PROPERTY_STARTCOLOR "startColor" -#define PROPERTY_ENDCOLOR "endColor" -#define PROPERTY_STARTOPACITY "startOpacity" -#define PROPERTY_ENDOPACITY "endOpacity" -#define PROPERTY_VECTOR "vector" -#define PROPERTY_BLENDFUNC "blendFunc" - -namespace cocosbuilder { - -void LayerGradientLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_STARTCOLOR) == 0) { - ((LayerGradient *)pNode)->setStartColor(pColor3B); - } else if(strcmp(pPropertyName, PROPERTY_ENDCOLOR) == 0) { - ((LayerGradient *)pNode)->setEndColor(pColor3B); - } else { - LayerLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void LayerGradientLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_STARTOPACITY) == 0) { - ((LayerGradient *)pNode)->setStartOpacity(pByte); - } else if(strcmp(pPropertyName, PROPERTY_ENDOPACITY) == 0) { - ((LayerGradient *)pNode)->setEndOpacity(pByte); - } else { - LayerLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void LayerGradientLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((LayerGradient *)pNode)->setBlendFunc(pBlendFunc); - } else { - LayerLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - - -void LayerGradientLoader::onHandlePropTypePoint(Node * pNode, Node * pParent, const char * pPropertyName, Vec2 pPoint, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_VECTOR) == 0) { - ((LayerGradient *)pNode)->setVector(pPoint); - - // TODO: Not passed along the ccbi file. - // ((LayerGradient *)pNode)->setCompressedInterpolation(true); - } else { - LayerLoader::onHandlePropTypePoint(pNode, pParent, pPropertyName, pPoint, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.h b/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.h deleted file mode 100644 index 03ad1712dfba..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCLAYERGRADIENTLOADER_H_ -#define _CCB_CCLAYERGRADIENTLOADER_H_ - -#include "editor-support/cocosbuilder/CCLayerLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL LayerGradientLoader : public LayerLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~LayerGradientLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(LayerGradientLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::LayerGradient); - - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypePoint(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Vec2 pPoint, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp deleted file mode 100644 index fb59b5731b3c..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCLayerLoader.h" - - -using namespace cocos2d; - -#define PROPERTY_TOUCH_ENABLED "isTouchEnabled" -#define PROPERTY_ACCELEROMETER_ENABLED "isAccelerometerEnabled" -#define PROPERTY_MOUSE_ENABLED "isMouseEnabled" -#define PROPERTY_KEYBOARD_ENABLED "isKeyboardEnabled" - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (push) -#pragma warning (disable: 4996) -#endif - -using namespace cocos2d; - -namespace cocosbuilder { - -void LayerLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TOUCH_ENABLED) == 0) { - ((Layer *)pNode)->setTouchEnabled(pCheck); - } else if(strcmp(pPropertyName, PROPERTY_ACCELEROMETER_ENABLED) == 0) { - ((Layer *)pNode)->setAccelerometerEnabled(pCheck); - } else if(strcmp(pPropertyName, PROPERTY_MOUSE_ENABLED) == 0) { - // TODO: Not supported - CCLOG("The property '%s' is not supported!", PROPERTY_MOUSE_ENABLED); - } else if(strcmp(pPropertyName, PROPERTY_KEYBOARD_ENABLED) == 0) { - // TODO: Not supported - CCLOG("The property '%s' is not supported!", PROPERTY_KEYBOARD_ENABLED); - // This comes closest: ((Layer *)pNode)->setKeypadEnabled(pCheck); - } else { - NodeLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader); - } -} - -} - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#pragma GCC diagnostic warning "-Wdeprecated-declarations" -#elif _MSC_VER >= 1400 //vs 2005 or higher -#pragma warning (pop) -#endif diff --git a/cocos/editor-support/cocosbuilder/CCLayerLoader.h b/cocos/editor-support/cocosbuilder/CCLayerLoader.h deleted file mode 100644 index 9a427c473e9b..000000000000 --- a/cocos/editor-support/cocosbuilder/CCLayerLoader.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCLAYERLOADER_H_ -#define _CCB_CCLAYERLOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL LayerLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~LayerLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(LayerLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Layer); - - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.cpp b/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.cpp deleted file mode 100644 index 753f82932d69..000000000000 --- a/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCMenuItemImageLoader.h" - -using namespace cocos2d; - -#define PROPERTY_NORMALDISPLAYFRAME "normalSpriteFrame" -#define PROPERTY_SELECTEDDISPLAYFRAME "selectedSpriteFrame" -#define PROPERTY_DISABLEDDISPLAYFRAME "disabledSpriteFrame" - -namespace cocosbuilder { - -void MenuItemImageLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_NORMALDISPLAYFRAME) == 0) { - if(pSpriteFrame != nullptr) { - ((MenuItemImage *)pNode)->setNormalSpriteFrame(pSpriteFrame); - } - } else if(strcmp(pPropertyName, PROPERTY_SELECTEDDISPLAYFRAME) == 0) { - if(pSpriteFrame != nullptr) { - ((MenuItemImage *)pNode)->setSelectedSpriteFrame(pSpriteFrame); - } - } else if(strcmp(pPropertyName, PROPERTY_DISABLEDDISPLAYFRAME) == 0) { - if(pSpriteFrame != nullptr) { - ((MenuItemImage *)pNode)->setDisabledSpriteFrame(pSpriteFrame); - } - } else { - MenuItemLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pSpriteFrame, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.h b/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.h deleted file mode 100644 index e0de6b2b77a4..000000000000 --- a/cocos/editor-support/cocosbuilder/CCMenuItemImageLoader.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCMENUITEMIMAGELOADER_H_ -#define _CCB_CCMENUITEMIMAGELOADER_H_ - -#include "editor-support/cocosbuilder/CCMenuItemLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL MenuItemImageLoader : public MenuItemLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~MenuItemImageLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(MenuItemImageLoader, loader); - -protected: - /** - * @js NA - * @lua NA - */ - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::MenuItemImage); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::SpriteFrame * pSpriteFrame, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCMenuItemLoader.cpp b/cocos/editor-support/cocosbuilder/CCMenuItemLoader.cpp deleted file mode 100644 index 3aee3c0ccf87..000000000000 --- a/cocos/editor-support/cocosbuilder/CCMenuItemLoader.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCMenuItemLoader.h" - -using namespace cocos2d; - -#define PROPERTY_BLOCK "block" -#define PROPERTY_ISENABLED "isEnabled" - -namespace cocosbuilder { - -void MenuItemLoader::onHandlePropTypeBlock(Node * pNode, Node * pParent, const char * pPropertyName, BlockData * pBlockData, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLOCK) == 0) { - if (nullptr != pBlockData) // Add this condition to allow MenuItemImage without target/selector predefined - { - ((MenuItem *)pNode)->setCallback( std::bind( pBlockData->mSELMenuHandler, pBlockData->_target, std::placeholders::_1) ); -// ((MenuItem *)pNode)->setTarget(pBlockData->_target, pBlockData->mSELMenuHandler); - } - } else { - NodeLoader::onHandlePropTypeBlock(pNode, pParent, pPropertyName, pBlockData, ccbReader); - } -} - -void MenuItemLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_ISENABLED) == 0) { - ((MenuItem *)pNode)->setEnabled(pCheck); - } else { - NodeLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCMenuItemLoader.h b/cocos/editor-support/cocosbuilder/CCMenuItemLoader.h deleted file mode 100644 index 10d2fbb65491..000000000000 --- a/cocos/editor-support/cocosbuilder/CCMenuItemLoader.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCMENUITEMLOADER_H_ -#define _CCB_CCMENUITEMLOADER_H_ - -#include "base/CCRef.h" -#include "2d/CCMenuItem.h" - -#include "editor-support/cocosbuilder/CCLayerLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL MenuItemLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~MenuItemLoader() {}; - -protected: - /** - * @js NA - * @lua NA - */ - CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::MenuItem); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeBlock(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, BlockData * pBlockData, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode,cocos2d:: Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCMenuLoader.h b/cocos/editor-support/cocosbuilder/CCMenuLoader.h deleted file mode 100644 index 08459eab91d5..000000000000 --- a/cocos/editor-support/cocosbuilder/CCMenuLoader.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCMENULOADER_H_ -#define _CCB_CCMENULOADER_H_ - -#include "editor-support/cocosbuilder/CCLayerLoader.h" -#include "base/CCRef.h" -#include "2d/CCMenu.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL MenuLoader : public LayerLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~MenuLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(MenuLoader, loader); - -protected: - virtual cocos2d::Menu * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) - { - cocos2d::Menu * pMenu = cocos2d::Menu::create(); - - pMenu->setContentSize(cocos2d::Size::ZERO); - - return pMenu; - } -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp b/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp deleted file mode 100644 index ad5a1e3c36a1..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h" -#include "editor-support/cocosbuilder/CCBReader.h" - -using namespace cocos2d; - -namespace cocosbuilder { - -CC_DLL Vec2 getAbsolutePosition(const Vec2 &pt, CCBReader::PositionType type, const Size &containerSize, const std::string& /*propName*/) -{ - Vec2 absPt; - if (type == CCBReader::PositionType::RELATIVE_BOTTOM_LEFT) - { - absPt = pt; - } - else if (type == CCBReader::PositionType::RELATIVE_TOP_LEFT) - { - absPt.x = pt.x; - absPt.y = containerSize.height - pt.y; - } - else if (type == CCBReader::PositionType::RELATIVE_TOP_RIGHT) - { - absPt.x = containerSize.width - pt.x; - absPt.y = containerSize.height - pt.y; - } - else if (type == CCBReader::PositionType::RELATIVE_BOTTOM_RIGHT) - { - absPt.x = containerSize.width - pt.x; - absPt.y = pt.y; - } - else if (type == CCBReader::PositionType::PERCENT) - { - absPt.x = (int)(containerSize.width * pt.x / 100.0f); - absPt.y = (int)(containerSize.height * pt.y / 100.0f); - } - else if (type == CCBReader::PositionType::MULTIPLY_RESOLUTION) - { - float resolutionScale = CCBReader::getResolutionScale(); - - absPt.x = pt.x * resolutionScale; - absPt.y = pt.y * resolutionScale; - } - - return absPt; -} - -CC_DLL void setRelativeScale(Node *pNode, float scaleX, float scaleY, CCBReader::ScaleType type, const std::string& /*propName*/) -{ - CCASSERT(pNode, "pNode should not be null"); - - if (type == CCBReader::ScaleType::MULTIPLY_RESOLUTION) - { - float resolutionScale = CCBReader::getResolutionScale(); - - scaleX *= resolutionScale; - scaleY *= resolutionScale; - } - - pNode->setScaleX(scaleX); - pNode->setScaleY(scaleY); -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h b/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h deleted file mode 100644 index 7120aeda6ef6..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCB_CCNODE_RELATIVEPOSITIONING_H__ -#define __CCB_CCNODE_RELATIVEPOSITIONING_H__ - -#include "editor-support/cocosbuilder/CCBReader.h" - -namespace cocosbuilder { - -extern CC_DLL cocos2d::Vec2 getAbsolutePosition(const cocos2d::Vec2 &pt, CCBReader::PositionType type, const cocos2d::Size &containerSize, const std::string&propName); - -extern CC_DLL void setRelativeScale(cocos2d::Node *node, float scaleX, float scaleY, CCBReader::ScaleType type, const std::string& propName); - -} - -#endif // __CCB_CCNODE_RELATIVEPOSITIONING_H__ diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp b/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp deleted file mode 100644 index 2dfce1199266..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp +++ /dev/null @@ -1,1194 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "editor-support/cocosbuilder/CCBSelectorResolver.h" -#include "editor-support/cocosbuilder/CCBMemberVariableAssigner.h" -#include "editor-support/cocosbuilder/CCBAnimationManager.h" -#include "editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h" -#include "deprecated/CCArray.h" -#include "deprecated/CCString.h" -#include "base/CCDirector.h" -#include "renderer/CCTextureCache.h" -#include "2d/CCSpriteFrameCache.h" -#include "2d/CCAnimationCache.h" -#include "platform/CCFileUtils.h" - - -using namespace std; -using namespace cocos2d; -using namespace cocos2d::extension; - -namespace cocosbuilder { - -NodeLoader::NodeLoader() -{ -} - -NodeLoader::~NodeLoader() -{ -} - -ValueMap& NodeLoader::getCustomProperties() -{ - return _customProperties; -} - -Node * NodeLoader::loadNode(Node * pParent, CCBReader * ccbReader) -{ - Node * ccNode = this->createNode(pParent, ccbReader); - - //clear _customProperties, ready for load next node. - _customProperties.clear(); - - return ccNode; -} - -void NodeLoader::parseProperties(Node * pNode, Node * pParent, CCBReader * ccbReader) -{ - int numRegularProps = ccbReader->readInt(false); - int numExturaProps = ccbReader->readInt(false); - int propertyCount = numRegularProps + numExturaProps; - - for(int i = 0; i < propertyCount; i++) { - bool isExtraProp = (i >= numRegularProps); - CCBReader::PropertyType type = (CCBReader::PropertyType)ccbReader->readInt(false); - std::string propertyName = ccbReader->readCachedString(); - - // Check if the property can be set for this platform - bool setProp = false; - - CCBReader::PlatformType platform = (CCBReader::PlatformType)ccbReader->readByte(); - if(platform == CCBReader::PlatformType::ALL) - { - setProp = true; - } - // Cocos2d-x is using touch event callback for all platforms, - // it's different from cocos2d-iphone which uses mouse event for Mac port. - // So we just need to touch event by using CCBReader::PlatformType::IOS. -//#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - if(platform == CCBReader::PlatformType::IOS) - { - setProp = true; - } -// #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) -// if(platform == CCBReader::PlatformType::MAC) -// { -// setProp = true; -// } -// #endif - - // Forward properties for sub ccb files - if (dynamic_cast(pNode) != nullptr) - { - CCBFile *ccbNode = (CCBFile*)pNode; - if (ccbNode->getCCBFileNode() && isExtraProp) - { - pNode = ccbNode->getCCBFileNode(); - - // Skip properties that doesn't have a value to override - __Array *extraPropsNames = (__Array*)pNode->getUserObject(); - Ref* pObj = nullptr; - bool bFound = false; - CCARRAY_FOREACH(extraPropsNames, pObj) - { - __String* pStr = static_cast<__String*>(pObj); - if (0 == pStr->compare(propertyName.c_str())) - { - bFound = true; - break; - } - } - setProp &= bFound; - } - } - else if (isExtraProp && pNode == ccbReader->getAnimationManager()->getRootNode()) - { - __Array *extraPropsNames = static_cast<__Array*>(pNode->getUserObject()); - if (! extraPropsNames) - { - extraPropsNames = __Array::create(); - pNode->setUserObject(extraPropsNames); - } - - extraPropsNames->addObject(__String::create(propertyName)); - } - - switch(type) - { - case CCBReader::PropertyType::POSITION: - { - Vec2 position = this->parsePropTypePosition(pNode, pParent, ccbReader, propertyName.c_str()); - if (setProp) - { - this->onHandlePropTypePosition(pNode, pParent, propertyName.c_str(), position, ccbReader); - } - break; - } - case CCBReader::PropertyType::POINT: - { - Vec2 point = this->parsePropTypePoint(pNode, pParent, ccbReader); - if (setProp) - { - this->onHandlePropTypePoint(pNode, pParent, propertyName.c_str(), point, ccbReader); - } - break; - } - case CCBReader::PropertyType::POINT_LOCK: - { - Vec2 pointLock = this->parsePropTypePointLock(pNode, pParent, ccbReader); - if (setProp) - { - this->onHandlePropTypePointLock(pNode, pParent, propertyName.c_str(), pointLock, ccbReader); - } - break; - } - case CCBReader::PropertyType::SIZE: - { - Size size = this->parsePropTypeSize(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeSize(pNode, pParent, propertyName.c_str(), size, ccbReader); - } - break; - } - case CCBReader::PropertyType::SCALE_LOCK: - { - float * scaleLock = this->parsePropTypeScaleLock(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeScaleLock(pNode, pParent, propertyName.c_str(), scaleLock, ccbReader); - } - CC_SAFE_DELETE_ARRAY(scaleLock); - break; - } - case CCBReader::PropertyType::FLOAT: - { - float f = this->parsePropTypeFloat(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeFloat(pNode, pParent, propertyName.c_str(), f, ccbReader); - } - break; - } - case CCBReader::PropertyType::FLOAT_XY: - { - float * xy = this->parsePropTypeFloatXY(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeFloatXY(pNode, pParent, propertyName.c_str(), xy, ccbReader); - } - CC_SAFE_DELETE_ARRAY(xy); - break; - } - - case CCBReader::PropertyType::DEGREES: - { - float degrees = this->parsePropTypeDegrees(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeDegrees(pNode, pParent, propertyName.c_str(), degrees, ccbReader); - } - break; - } - case CCBReader::PropertyType::FLOAT_SCALE: - { - float floatScale = this->parsePropTypeFloatScale(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeFloatScale(pNode, pParent, propertyName.c_str(), floatScale, ccbReader); - } - break; - } - case CCBReader::PropertyType::INTEGER: - { - int integer = this->parsePropTypeInteger(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeInteger(pNode, pParent, propertyName.c_str(), integer, ccbReader); - } - break; - } - case CCBReader::PropertyType::INTEGER_LABELED: - { - int integerLabeled = this->parsePropTypeIntegerLabeled(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeIntegerLabeled(pNode, pParent, propertyName.c_str(), integerLabeled, ccbReader); - } - break; - } - case CCBReader::PropertyType::FLOAT_VAR: - { - float * floatVar = this->parsePropTypeFloatVar(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeFloatVar(pNode, pParent, propertyName.c_str(), floatVar, ccbReader); - } - CC_SAFE_DELETE_ARRAY(floatVar); - break; - } - case CCBReader::PropertyType::CHECK: - { - bool check = this->parsePropTypeCheck(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeCheck(pNode, pParent, propertyName.c_str(), check, ccbReader); - } - break; - } - case CCBReader::PropertyType::SPRITEFRAME: - { - SpriteFrame * ccSpriteFrame = this->parsePropTypeSpriteFrame(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeSpriteFrame(pNode, pParent, propertyName.c_str(), ccSpriteFrame, ccbReader); - } - break; - } - case CCBReader::PropertyType::ANIMATION: - { - Animation * ccAnimation = this->parsePropTypeAnimation(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeAnimation(pNode, pParent, propertyName.c_str(), ccAnimation, ccbReader); - } - break; - } - case CCBReader::PropertyType::TEXTURE: - { - Texture2D * ccTexture2D = this->parsePropTypeTexture(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeTexture(pNode, pParent, propertyName.c_str(), ccTexture2D, ccbReader); - } - break; - } - case CCBReader::PropertyType::BYTE: - { - unsigned char byte = this->parsePropTypeByte(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeByte(pNode, pParent, propertyName.c_str(), byte, ccbReader); - } - break; - } - case CCBReader::PropertyType::COLOR3: - { - Color3B color3B = this->parsePropTypeColor3(pNode, pParent, ccbReader, propertyName.c_str()); - if(setProp) - { - this->onHandlePropTypeColor3(pNode, pParent, propertyName.c_str(), color3B, ccbReader); - } - break; - } - case CCBReader::PropertyType::COLOR4F_VAR: - { - Color4F * color4FVar = this->parsePropTypeColor4FVar(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeColor4FVar(pNode, pParent, propertyName.c_str(), color4FVar, ccbReader); - } - CC_SAFE_DELETE_ARRAY(color4FVar); - break; - } - case CCBReader::PropertyType::FLIP: - { - bool * flip = this->parsePropTypeFlip(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeFlip(pNode, pParent, propertyName.c_str(), flip, ccbReader); - } - CC_SAFE_DELETE_ARRAY(flip); - break; - } - case CCBReader::PropertyType::BLEND_MODE: - { - BlendFunc blendFunc = this->parsePropTypeBlendFunc(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeBlendFunc(pNode, pParent, propertyName.c_str(), blendFunc, ccbReader); - } - break; - } - case CCBReader::PropertyType::FNT_FILE: - { - std::string fntFile = ccbReader->getCCBRootPath() + this->parsePropTypeFntFile(pNode, pParent, ccbReader); - if(setProp) - { - this->onHandlePropTypeFntFile(pNode, pParent, propertyName.c_str(), fntFile.c_str(), ccbReader); - } - break; - } - case CCBReader::PropertyType::FONT_TTF: - { - std::string fontTTF = this->parsePropTypeFontTTF(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeFontTTF(pNode, pParent, propertyName.c_str(), fontTTF.c_str(), ccbReader); - } - break; - } - case CCBReader::PropertyType::STRING: - { - std::string string = this->parsePropTypeString(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeString(pNode, pParent, propertyName.c_str(), string.c_str(), ccbReader); - } - break; - } - case CCBReader::PropertyType::TEXT: - { - std::string text = this->parsePropTypeText(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeText(pNode, pParent, propertyName.c_str(), text.c_str(), ccbReader); - } - break; - } - case CCBReader::PropertyType::BLOCK: - { - BlockData * blockData = this->parsePropTypeBlock(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeBlock(pNode, pParent, propertyName.c_str(), blockData, ccbReader); - } - CC_SAFE_DELETE(blockData); - break; - } - case CCBReader::PropertyType::BLOCK_CONTROL: - { - BlockControlData * blockControlData = this->parsePropTypeBlockControl(pNode, pParent, ccbReader); - if(setProp && blockControlData != nullptr) { - this->onHandlePropTypeBlockControl(pNode, pParent, propertyName.c_str(), blockControlData, ccbReader); - } - CC_SAFE_DELETE(blockControlData); - break; - } - case CCBReader::PropertyType::CCB_FILE: - { - Node * ccbFileNode = this->parsePropTypeCCBFile(pNode, pParent, ccbReader); - if(setProp) { - this->onHandlePropTypeCCBFile(pNode, pParent, propertyName.c_str(), ccbFileNode, ccbReader); - } - break; - } - default: - ASSERT_FAIL_UNEXPECTED_PROPERTYTYPE(static_cast(type)); - break; - } - } -} - -Vec2 NodeLoader::parsePropTypePosition(Node * pNode, Node * pParent, CCBReader * ccbReader, const char *pPropertyName) -{ - float x = ccbReader->readFloat(); - float y = ccbReader->readFloat(); - - CCBReader::PositionType type = static_cast(ccbReader->readInt(false)); - - Size containerSize = ccbReader->getAnimationManager()->getContainerSize(pParent); - - Vec2 pt = getAbsolutePosition(Vec2(x,y), type, containerSize, pPropertyName); - pNode->setPosition(pt); - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ValueVector vec; - vec.push_back(Value(x)); - vec.push_back(Value(y)); - vec.push_back(Value((int)type)); - - ccbReader->getAnimationManager()->setBaseValue(Value(vec), pNode, pPropertyName); - } - - return pt; -} - -Vec2 NodeLoader::parsePropTypePoint(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - float x = ccbReader->readFloat(); - float y = ccbReader->readFloat(); - - return Vec2(x, y); -} - -Vec2 NodeLoader::parsePropTypePointLock(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - float x = ccbReader->readFloat(); - float y = ccbReader->readFloat(); - - return Vec2(x, y); -} - -Size NodeLoader::parsePropTypeSize(Node * /*pNode*/, Node * pParent, CCBReader * ccbReader) { - float width = ccbReader->readFloat(); - float height = ccbReader->readFloat(); - - CCBReader::SizeType type = static_cast(ccbReader->readInt(false)); - - Size containerSize = ccbReader->getAnimationManager()->getContainerSize(pParent); - - switch (type) - { - case CCBReader::SizeType::ABSOLUTE: - { - /* Nothing. */ - break; - } - case CCBReader::SizeType::RELATIVE_CONTAINER: - { - width = containerSize.width - width; - height = containerSize.height - height; - break; - } - case CCBReader::SizeType::PERCENT: - { - width = (int)(containerSize.width * width / 100.0f); - height = (int)(containerSize.height * height / 100.0f); - break; - } - case CCBReader::SizeType::HORIZONTAL_PERCENT: - { - width = (int)(containerSize.width * width / 100.0f); - break; - } - case CCBReader::SizeType::VERTICAL_PERCENT: - { - height = (int)(containerSize.height * height / 100.0f); - break; - } - case CCBReader::SizeType::MULTIPLY_RESOLUTION: - { - float resolutionScale = CCBReader::getResolutionScale(); - - width *= resolutionScale; - height *= resolutionScale; - break; - } - default: - { - log("Unknown CCB type."); - } - break; - } - - return Size(width, height); -} - - - -float * NodeLoader::parsePropTypeFloatXY(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - float x = ccbReader->readFloat(); - float y = ccbReader->readFloat(); - - float * floatXY = new (std::nothrow) float[2]; - floatXY[0] = x; - floatXY[1] = y; - - return floatXY; -} - -float * NodeLoader::parsePropTypeScaleLock(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) { - float x = ccbReader->readFloat(); - float y = ccbReader->readFloat(); - - CCBReader::ScaleType type = static_cast(ccbReader->readInt(false)); - - setRelativeScale(pNode, x, y, type, pPropertyName); - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ValueVector baseValue; - baseValue.push_back(Value(x)); - baseValue.push_back(Value(y)); - baseValue.push_back(Value((int)type)); - - ccbReader->getAnimationManager()->setBaseValue(Value(baseValue), pNode, pPropertyName); - } - - if (type == CCBReader::ScaleType::MULTIPLY_RESOLUTION) - { - x *= ccbReader->getResolutionScale(); - y *= ccbReader->getResolutionScale(); - } - - float * scaleLock = new (std::nothrow) float[2]; - scaleLock[0] = x; - scaleLock[1] = y; - - return scaleLock; -} - -float NodeLoader::parsePropTypeFloat(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - return ccbReader->readFloat(); -} - -float NodeLoader::parsePropTypeDegrees(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) { - float ret = ccbReader->readFloat(); - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ccbReader->getAnimationManager()->setBaseValue(Value(ret), pNode, pPropertyName); - } - - return ret; -} - -float NodeLoader::parsePropTypeFloatScale(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - float f = ccbReader->readFloat(); - - CCBReader::ScaleType type = static_cast(ccbReader->readInt(false)); - - if(type == CCBReader::ScaleType::MULTIPLY_RESOLUTION) - { - f *= ccbReader->getResolutionScale(); - } - - return f; -} - -int NodeLoader::parsePropTypeInteger(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - return ccbReader->readInt(true); -} - -int NodeLoader::parsePropTypeIntegerLabeled(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - return ccbReader->readInt(true); -} - -float * NodeLoader::parsePropTypeFloatVar(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - float f = ccbReader->readFloat(); - float fVar = ccbReader->readFloat(); - - float * arr = new (std::nothrow) float[2]; - arr[0] = f; - arr[1] = fVar; - - return arr; -} - -bool NodeLoader::parsePropTypeCheck(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) -{ - bool ret = ccbReader->readBool(); - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ccbReader->getAnimationManager()->setBaseValue(Value(ret), pNode, pPropertyName); - } - - return ret; -} - - -SpriteFrame * NodeLoader::parsePropTypeSpriteFrame(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) -{ - std::string spriteSheet = ccbReader->readCachedString(); - std::string spriteFile = ccbReader->readCachedString(); - - SpriteFrame *spriteFrame = nullptr; - if (!spriteFile.empty()) - { - if (spriteSheet.empty()) - { - spriteFile = ccbReader->getCCBRootPath() + spriteFile; - Texture2D * texture = Director::getInstance()->getTextureCache()->addImage(spriteFile); - if(texture != nullptr) { - Rect bounds = Rect(0, 0, texture->getContentSize().width, texture->getContentSize().height); - spriteFrame = SpriteFrame::createWithTexture(texture, bounds); - } - } - else - { - SpriteFrameCache * frameCache = SpriteFrameCache::getInstance(); - spriteSheet = ccbReader->getCCBRootPath() + spriteSheet; - // Load the sprite sheet only if it is not loaded - if (ccbReader->getLoadedSpriteSheet().find(spriteSheet) == ccbReader->getLoadedSpriteSheet().end()) - { - frameCache->addSpriteFramesWithFile(spriteSheet); - ccbReader->getLoadedSpriteSheet().insert(spriteSheet); - } - - spriteFrame = frameCache->getSpriteFrameByName(spriteFile); - } - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ccbReader->getAnimationManager()->setObject(spriteFrame, pNode, pPropertyName); - } - } - - return spriteFrame; -} - -Animation * NodeLoader::parsePropTypeAnimation(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - std::string animationFile = ccbReader->getCCBRootPath() + ccbReader->readCachedString(); - std::string animation = ccbReader->readCachedString(); - - Animation * ccAnimation = nullptr; - - // Support for stripping relative file paths, since ios doesn't currently - // know what to do with them, since its pulling from bundle. - // Eventually this should be handled by a client side asset manager - // interface which figured out what resources to load. - // TODO: Does this problem exist in C++? - animation = CCBReader::lastPathComponent(animation.c_str()); - animationFile = CCBReader::lastPathComponent(animationFile.c_str()); - - if (!animation.empty()) - { - AnimationCache * animationCache = AnimationCache::getInstance(); - animationCache->addAnimationsWithFile(animationFile); - - ccAnimation = animationCache->getAnimation(animation); - } - return ccAnimation; -} - -Texture2D * NodeLoader::parsePropTypeTexture(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - std::string spriteFile = ccbReader->getCCBRootPath() + ccbReader->readCachedString(); - - if (!spriteFile.empty()) - { - return Director::getInstance()->getTextureCache()->addImage(spriteFile); - } - else - { - return nullptr; - } -} - -unsigned char NodeLoader::parsePropTypeByte(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) -{ - unsigned char ret = ccbReader->readByte(); - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ccbReader->getAnimationManager()->setBaseValue(Value(ret), pNode, pPropertyName); - } - - return ret; -} - -Color3B NodeLoader::parsePropTypeColor3(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader, const char *pPropertyName) { - unsigned char r = ccbReader->readByte(); - unsigned char g = ccbReader->readByte(); - unsigned char b = ccbReader->readByte(); - - Color3B color(r, g, b); - - ValueMap colorMap; - colorMap["r"] = r; - colorMap["g"] = g; - colorMap["b"] = b; - - if (ccbReader->getAnimatedProperties()->find(pPropertyName) != ccbReader->getAnimatedProperties()->end()) - { - ccbReader->getAnimationManager()->setBaseValue(Value(colorMap), pNode, pPropertyName); - } - return color; -} - -Color4F * NodeLoader::parsePropTypeColor4FVar(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - float red = ccbReader->readFloat(); - float green = ccbReader->readFloat(); - float blue = ccbReader->readFloat(); - float alpha = ccbReader->readFloat(); - float redVar = ccbReader->readFloat(); - float greenVar = ccbReader->readFloat(); - float blueVar = ccbReader->readFloat(); - float alphaVar = ccbReader->readFloat(); - - Color4F * colors = new (std::nothrow) Color4F[2]; - colors[0].r = red; - colors[0].g = green; - colors[0].b = blue; - colors[0].a = alpha; - - colors[1].r = redVar; - colors[1].g = greenVar; - colors[1].b = blueVar; - colors[1].a = alphaVar; - - return colors; -} - -bool * NodeLoader::parsePropTypeFlip(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - bool flipX = ccbReader->readBool(); - bool flipY = ccbReader->readBool(); - - bool * arr = new (std::nothrow) bool[2]; - arr[0] = flipX; - arr[1] = flipY; - - return arr; -} - -BlendFunc NodeLoader::parsePropTypeBlendFunc(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - int source = ccbReader->readInt(false); - int destination = ccbReader->readInt(false); - - BlendFunc blendFunc; - blendFunc.src = source; - blendFunc.dst = destination; - - return blendFunc; -} - -std::string NodeLoader::parsePropTypeFntFile(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) -{ - return ccbReader->readCachedString(); -} - -std::string NodeLoader::parsePropTypeString(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - return ccbReader->readCachedString(); -} - -std::string NodeLoader::parsePropTypeText(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - return ccbReader->readCachedString(); -} - -std::string NodeLoader::parsePropTypeFontTTF(Node * /*pNode*/, Node * /*pParent*/, CCBReader * ccbReader) { - std::string fontTTF = ccbReader->readCachedString(); - - // String * ttfEnding = String::create(".ttf"); - - // TODO: Fix me if it is wrong - /* If the fontTTF comes with the ".ttf" extension, prepend the absolute path. - * System fonts come without the ".ttf" extension and do not need the path prepended. */ - /* - if(CCBReader::endsWith(CCBReader::toLowerCase(fontTTF), ttfEnding)){ - fontTTF = CCBReader::concat(ccbReader->getCCBRootPath(), fontTTF); - } - */ - - return fontTTF; -} - -BlockData * NodeLoader::parsePropTypeBlock(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader) -{ - std::string selectorName = ccbReader->readCachedString(); - CCBReader::TargetType selectorTarget = static_cast(ccbReader->readInt(false)); - - if(selectorTarget != CCBReader::TargetType::NONE) - { - Ref* target = nullptr; - if(!ccbReader->isJSControlled()) - { - if(selectorTarget == CCBReader::TargetType::DOCUMENT_ROOT) - { - target = ccbReader->getAnimationManager()->getRootNode(); - } - else if(selectorTarget == CCBReader::TargetType::OWNER) - { - target = ccbReader->getOwner(); - } - - if(target != nullptr) - { - if(!selectorName.empty()) - { - SEL_MenuHandler selMenuHandler = 0; - - CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast(target); - - if(targetAsCCBSelectorResolver != nullptr) - { - selMenuHandler = targetAsCCBSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str()); - } - - if(selMenuHandler == 0) - { - CCBSelectorResolver * ccbSelectorResolver = ccbReader->getCCBSelectorResolver(); - if(ccbSelectorResolver != nullptr) - { - selMenuHandler = ccbSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str()); - } - } - - if(selMenuHandler == 0) { - CCLOG("Skipping selector '%s' since no CCBSelectorResolver is present.", selectorName.c_str()); - } else { - BlockData * blockData = new (std::nothrow) BlockData(); - blockData->mSELMenuHandler = selMenuHandler; - - blockData->_target = target; - - return blockData; - } - } else { - CCLOG("Unexpected empty selector."); - } - } else { - CCLOG("Unexpected nullptr target for selector."); - } - } - else - { - if (selectorTarget == CCBReader::TargetType::DOCUMENT_ROOT) - { - ccbReader->addDocumentCallbackNode(pNode); - ccbReader->addDocumentCallbackName(selectorName); - // Since there isn't a Control::EventType::NONE, add a TOUCH_DOWN type as a placeholder. - ccbReader->addDocumentCallbackControlEvents(Control::EventType::TOUCH_DOWN); - } - else if (selectorTarget == CCBReader::TargetType::OWNER) - { - ccbReader->addOwnerCallbackNode(pNode); - ccbReader->addOwnerCallbackName(selectorName); - // Since there isn't a Control::EventType::NONE, add a TOUCH_DOWN type as a placeholder. - ccbReader->addOwnerCallbackControlEvents(Control::EventType::TOUCH_DOWN); - } - } - } - - return nullptr; -} - -BlockControlData * NodeLoader::parsePropTypeBlockControl(Node * pNode, Node * /*pParent*/, CCBReader * ccbReader) -{ - std::string selectorName = ccbReader->readCachedString(); - CCBReader::TargetType selectorTarget = static_cast(ccbReader->readInt(false)); - int controlEvents = ccbReader->readInt(false); - - if(selectorTarget != CCBReader::TargetType::NONE) - { - if(!ccbReader->isJSControlled()) - { - Ref* target = nullptr; - if(selectorTarget == CCBReader::TargetType::DOCUMENT_ROOT) - { - target = ccbReader->getAnimationManager()->getRootNode(); - } - else if(selectorTarget == CCBReader::TargetType::OWNER) - { - target = ccbReader->getOwner(); - } - - if(target != nullptr) - { - if(!selectorName.empty()) - { - Control::Handler selControlHandler = 0; - - CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast(target); - - if(targetAsCCBSelectorResolver != nullptr) - { - selControlHandler = targetAsCCBSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str()); - } - - if(selControlHandler == 0) - { - CCBSelectorResolver * ccbSelectorResolver = ccbReader->getCCBSelectorResolver(); - if(ccbSelectorResolver != nullptr) - { - selControlHandler = ccbSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str()); - } - } - - if(selControlHandler == 0) - { - CCLOG("Skipping selector '%s' since no CCBSelectorResolver is present.", selectorName.c_str()); - } - else - { - BlockControlData * blockControlData = new (std::nothrow) BlockControlData(); - blockControlData->mSELControlHandler = selControlHandler; - - blockControlData->_target = target; - blockControlData->mControlEvents = (Control::EventType)controlEvents; - - return blockControlData; - } - } else { - CCLOG("Unexpected empty selector."); - } - } else { - CCLOG("Unexpected nullptr target for selector."); - } - } - else - { - if(selectorTarget == CCBReader::TargetType::DOCUMENT_ROOT) - { - ccbReader->addDocumentCallbackNode(pNode); - ccbReader->addDocumentCallbackName(selectorName); - ccbReader->addDocumentCallbackControlEvents((Control::EventType)controlEvents); - } - else - { - ccbReader->addOwnerCallbackNode(pNode); - ccbReader->addOwnerCallbackName(selectorName); - ccbReader->addOwnerCallbackControlEvents((Control::EventType)controlEvents); - } - } - } - - return nullptr; -} - -Node * NodeLoader::parsePropTypeCCBFile(Node * /*pNode*/, Node * pParent, CCBReader * pCCBReader) { - std::string ccbFileName = pCCBReader->getCCBRootPath() + pCCBReader->readCachedString(); - - /* Change path extension to .ccbi. */ - std::string ccbFileWithoutPathExtension = CCBReader::deletePathExtension(ccbFileName.c_str()); - ccbFileName = ccbFileWithoutPathExtension + ".ccbi"; - - // Load sub file - std::string path = FileUtils::getInstance()->fullPathForFilename(ccbFileName); - - auto dataPtr = std::make_shared(FileUtils::getInstance()->getDataFromFile(path)); - - CCBReader * reader = new (std::nothrow) CCBReader(pCCBReader); - reader->autorelease(); - reader->getAnimationManager()->setRootContainerSize(pParent->getContentSize()); - - - reader->_data = dataPtr; - reader->_bytes = dataPtr->getBytes(); - reader->_currentByte = 0; - reader->_currentBit = 0; - CC_SAFE_RETAIN(pCCBReader->_owner); - reader->_owner = pCCBReader->_owner; - - reader->getAnimationManager()->_owner = reader->_owner; - - // The assignments below are done in the CCBReader constructor. -// reader->_ownerOutletNames = pCCBReader->_ownerOutletNames; -// reader->_ownerOutletNodes = pCCBReader->_ownerOutletNodes; -// reader->_ownerOutletNodes->retain(); -// reader->_ownerCallbackNames = pCCBReader->_ownerCallbackNames; -// reader->_ownerCallbackNodes = pCCBReader->_ownerCallbackNodes; -// reader->_ownerCallbackNodes->retain(); - - - Node * ccbFileNode = reader->readFileWithCleanUp(false, pCCBReader->getAnimationManagers()); - - if (ccbFileNode && reader->getAnimationManager()->getAutoPlaySequenceId() != -1) - { - // Auto play animations - reader->getAnimationManager()->runAnimationsForSequenceIdTweenDuration(reader->getAnimationManager()->getAutoPlaySequenceId(), 0); - } - - if (reader->isJSControlled() && pCCBReader->isJSControlled() && nullptr == reader->_owner) - { - //set variables and callback to owner - //set callback - auto ownerCallbackNames = reader->getOwnerCallbackNames(); - auto& ownerCallbackNodes = reader->getOwnerCallbackNodes(); - if (!ownerCallbackNames.empty() && !ownerCallbackNodes.empty()) - { - CCASSERT(ownerCallbackNames.size() == ownerCallbackNodes.size(), - "ownerCallbackNames size should equal to ownerCallbackNodes size."); - ssize_t nCount = ownerCallbackNames.size(); - - for (ssize_t i = 0 ; i < nCount; i++) - { - pCCBReader->addOwnerCallbackName(ownerCallbackNames[i].asString()); - pCCBReader->addOwnerCallbackNode(ownerCallbackNodes.at(i)); - } - } - //set variables - auto ownerOutletNames = reader->getOwnerOutletNames(); - auto ownerOutletNodes = reader->getOwnerOutletNodes(); - if (!ownerOutletNames.empty() && !ownerOutletNodes.empty()) - { - CCASSERT(ownerOutletNames.size() == ownerOutletNodes.size(), - "ownerOutletNames size should be equal to ownerOutletNodes's size."); - ssize_t nCount = ownerOutletNames.size(); - - for (ssize_t i = 0 ; i < nCount; i++) - { - pCCBReader->addOwnerOutletName(ownerOutletNames.at(i).asString()); - pCCBReader->addOwnerOutletNode(ownerOutletNodes.at(i)); - } - } - } - return ccbFileNode; -} - - - -void NodeLoader::onHandlePropTypePosition(Node * pNode, Node * /*pParent*/, const char* pPropertyName, Vec2 pPosition, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_POSITION) == 0) { - pNode->setPosition(pPosition); - } else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - -void NodeLoader::onHandlePropTypePoint(Node * pNode, Node * /*pParent*/, const char* pPropertyName, Vec2 pPoint, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_ANCHORPOINT) == 0) { - pNode->setAnchorPoint(pPoint); - } else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - -void NodeLoader::onHandlePropTypePointLock(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Vec2 /*pPointLock*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeSize(Node * pNode, Node * /*pParent*/, const char* pPropertyName, Size pSize, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_CONTENTSIZE) == 0) { - pNode->setContentSize(pSize); - } else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - -void NodeLoader::onHandlePropTypeFloatXY(Node * pNode, Node * /*pParent*/, const char* pPropertyName, float * pFloat, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_SKEW) == 0) { - pNode->setSkewX(pFloat[0]); - pNode->setSkewY(pFloat[1]); - } else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - - -void NodeLoader::onHandlePropTypeScaleLock(Node * pNode, Node * /*pParent*/, const char* pPropertyName, float * pScaleLock, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_SCALE) == 0) { - pNode->setScaleX(pScaleLock[0]); - pNode->setScaleY(pScaleLock[1]); - } else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - -void NodeLoader::onHandlePropTypeFloat(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, float pFloat, CCBReader * /*ccbReader*/) { -// ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - // It may be a custom property, add it to custom property dictionary. - _customProperties[pPropertyName] = Value(pFloat); -} - - -void NodeLoader::onHandlePropTypeDegrees(Node * pNode, Node * /*pParent*/, const char* pPropertyName, float pDegrees, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_ROTATION) == 0) { - pNode->setRotation(pDegrees); - } else if(strcmp(pPropertyName, PROPERTY_ROTATIONX) == 0) { - pNode->setRotationSkewX(pDegrees); - } else if(strcmp(pPropertyName, PROPERTY_ROTATIONY) == 0) { - pNode->setRotationSkewY(pDegrees); - } - else { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - } -} - -void NodeLoader::onHandlePropTypeFloatScale(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, float /*pFloatScale*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeInteger(Node * pNode, Node * /*pParent*/, const char* pPropertyName, int pInteger, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_TAG) == 0) { - pNode->setTag(pInteger); - } else { - // ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - // It may be a custom property, add it to custom property dictionary. - _customProperties[pPropertyName] = Value(pInteger); - } -} - -void NodeLoader::onHandlePropTypeIntegerLabeled(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, int /*pIntegerLabeled*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeFloatVar(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, float * /*pFloatVar*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeCheck(Node * pNode, Node * /*pParent*/, const char* pPropertyName, bool pCheck, CCBReader * /*ccbReader*/) { - if(strcmp(pPropertyName, PROPERTY_VISIBLE) == 0) { - pNode->setVisible(pCheck); - } else if(strcmp(pPropertyName, PROPERTY_IGNOREANCHORPOINTFORPOSITION) == 0) { - pNode->setIgnoreAnchorPointForPosition(pCheck); - } else { - //ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - // It may be a custom property, add it to custom property dictionary. - _customProperties[pPropertyName] = Value(pCheck); - } -} - -void NodeLoader::onHandlePropTypeSpriteFrame(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, SpriteFrame * /*pSpriteFrame*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeAnimation(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Animation * /*pAnimation*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeTexture(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Texture2D * /*pTexture2D*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeByte(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, unsigned char /*pByte*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeColor3(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Color3B /*pColor3B*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeColor4FVar(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Color4F * /*pColor4FVar*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeFlip(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, bool * /*pFlip*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeBlendFunc(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, BlendFunc /*pBlendFunc*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeFntFile(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, const char* /*pFntFile*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeString(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, const char * pString, CCBReader * /*ccbReader*/) { -// ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); - // It may be a custom property, add it to custom property dictionary. - _customProperties[pPropertyName] = Value(pString); -} - -void NodeLoader::onHandlePropTypeText(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, const char * /*pText*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeFontTTF(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, const char * /*pFontTTF*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeBlock(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, BlockData * /*pBlockData*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeBlockControl(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, BlockControlData * /*pBlockControlData*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -void NodeLoader::onHandlePropTypeCCBFile(Node * /*pNode*/, Node * /*pParent*/, const char* pPropertyName, Node * /*pCCBFileNode*/, CCBReader * /*ccbReader*/) { - ASSERT_FAIL_UNEXPECTED_PROPERTY(pPropertyName); -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoader.h b/cocos/editor-support/cocosbuilder/CCNodeLoader.h deleted file mode 100644 index 3601b3fa513a..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNodeLoader.h +++ /dev/null @@ -1,171 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCNODELOADER_H_ -#define _CCB_CCNODELOADER_H_ - -#include "extensions/GUI/CCControlExtension/CCInvocation.h" -#include "editor-support/cocosbuilder/CCBReader.h" -#include "extensions/GUI/CCControlExtension/CCControl.h" - -namespace cocosbuilder { - -#define PROPERTY_POSITION "position" -#define PROPERTY_CONTENTSIZE "contentSize" -#define PROPERTY_SKEW "skew" -#define PROPERTY_ANCHORPOINT "anchorPoint" -#define PROPERTY_SCALE "scale" -#define PROPERTY_ROTATION "rotation" -#define PROPERTY_ROTATIONX "rotationX" -#define PROPERTY_ROTATIONY "rotationY" -#define PROPERTY_TAG "tag" -#define PROPERTY_IGNOREANCHORPOINTFORPOSITION "ignoreAnchorPointForPosition" -#define PROPERTY_VISIBLE "visible" - -#define ASSERT_FAIL_UNEXPECTED_PROPERTY(PROPERTY) cocos2d::log("Unexpected property: '%s'!\n", PROPERTY); assert(false) -#define ASSERT_FAIL_UNEXPECTED_PROPERTYTYPE(PROPERTYTYPE) cocos2d::log("Unexpected property type: '%d'!\n", PROPERTYTYPE); assert(false) - -#define CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) { \ - return T::create(); \ -} - -#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) = 0 - -struct BlockData { - cocos2d::SEL_MenuHandler mSELMenuHandler; - cocos2d::Ref * _target; -}; - -struct BlockControlData { - cocos2d::extension::Control::Handler mSELControlHandler; - cocos2d::Ref * _target; - cocos2d::extension::Control::EventType mControlEvents; -}; - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL NodeLoader : public cocos2d::Ref { - public: - /** - * @js NA - * @lua NA - */ - NodeLoader(); - /** - * @js NA - * @lua NA - */ - virtual ~NodeLoader(); - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(NodeLoader, loader); - /** - * @js NA - * @lua NA - */ - virtual cocos2d::Node * loadNode(cocos2d::Node *, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void parseProperties(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual cocos2d::ValueMap& getCustomProperties(); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Node); - - virtual cocos2d::Vec2 parsePropTypePosition(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual cocos2d::Vec2 parsePropTypePoint(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual cocos2d::Vec2 parsePropTypePointLock(cocos2d::Node * pNode,cocos2d:: Node * pParent, CCBReader * ccbReader); - virtual cocos2d::Size parsePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual float * parsePropTypeScaleLock(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual float parsePropTypeFloat(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual float parsePropTypeDegrees(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual float parsePropTypeFloatScale(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual int parsePropTypeInteger(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual int parsePropTypeIntegerLabeled(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual float * parsePropTypeFloatVar(cocos2d::Node * pNode,cocos2d::Node * pParent, CCBReader * ccbReader); - virtual bool parsePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual cocos2d::SpriteFrame * parsePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual cocos2d::Animation * parsePropTypeAnimation(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual cocos2d::Texture2D * parsePropTypeTexture(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual unsigned char parsePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual cocos2d::Color3B parsePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader, const char *pPropertyName); - virtual cocos2d::Color4F * parsePropTypeColor4FVar(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual bool * parsePropTypeFlip(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual cocos2d::BlendFunc parsePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual std::string parsePropTypeFntFile(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual std::string parsePropTypeString(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual std::string parsePropTypeText(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual std::string parsePropTypeFontTTF(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual BlockData * parsePropTypeBlock(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual BlockControlData * parsePropTypeBlockControl(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual cocos2d::Node * parsePropTypeCCBFile(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - virtual float * parsePropTypeFloatXY(cocos2d::Node * pNode, cocos2d::Node * pParent, CCBReader * ccbReader); - - - virtual void onHandlePropTypePosition(cocos2d::Node * pNode,cocos2d:: Node * pParent, const char* pPropertyName, cocos2d::Vec2 pPosition, CCBReader * ccbReader); - virtual void onHandlePropTypePoint(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Vec2 pPoint, CCBReader * ccbReader); - virtual void onHandlePropTypePointLock(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Vec2 pPointLock, CCBReader * ccbReader); - virtual void onHandlePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Size pSize, CCBReader * ccbReader); - virtual void onHandlePropTypeScaleLock(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float * pScaleLock, CCBReader * ccbReader); - virtual void onHandlePropTypeFloat(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float pFloat, CCBReader * ccbReader); - virtual void onHandlePropTypeDegrees(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float pDegrees, CCBReader * ccbReader); - virtual void onHandlePropTypeFloatScale(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float pFloatScale, CCBReader * ccbReader); - virtual void onHandlePropTypeInteger(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, int pInteger, CCBReader * ccbReader); - virtual void onHandlePropTypeIntegerLabeled(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, int pIntegerLabeled, CCBReader * ccbReader); - virtual void onHandlePropTypeFloatVar(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float * pFoatVar, CCBReader * ccbReader); - virtual void onHandlePropTypeFloatXY(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, float * pFoatVar, CCBReader * ccbReader); - - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, bool pCheck, CCBReader * ccbReader); - virtual void onHandlePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::SpriteFrame * pSpriteFrame, CCBReader * ccbReader); - virtual void onHandlePropTypeAnimation(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Animation * pAnimation, CCBReader * ccbReader); - virtual void onHandlePropTypeTexture(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Texture2D * pTexture2D, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeColor4FVar(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Color4F * pColor4FVar, CCBReader * ccbReader); - virtual void onHandlePropTypeFlip(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, bool * pFlip, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); - virtual void onHandlePropTypeFntFile(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, const char * pFntFile, CCBReader * ccbReader); - virtual void onHandlePropTypeString(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, const char * pString, CCBReader * ccbReader); - virtual void onHandlePropTypeText(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, const char * pText, CCBReader * ccbReader); - virtual void onHandlePropTypeFontTTF(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, const char * pFontTTF, CCBReader * ccbReader); - virtual void onHandlePropTypeBlock(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, BlockData * pBlockData, CCBReader * ccbReader); - virtual void onHandlePropTypeBlockControl(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, BlockControlData * pBlockControlData, CCBReader * ccbReader); - virtual void onHandlePropTypeCCBFile(cocos2d::Node * pNode, cocos2d::Node * pParent, const char* pPropertyName, cocos2d::Node * pCCBFileNode, CCBReader * ccbReader); - -protected: - cocos2d::ValueMap _customProperties; -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp b/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp deleted file mode 100644 index 389518cbe42c..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCNodeLoaderLibrary.h" - -#include "editor-support/cocosbuilder/CCLayerLoader.h" -#include "editor-support/cocosbuilder/CCLayerColorLoader.h" -#include "editor-support/cocosbuilder/CCLayerGradientLoader.h" -#include "editor-support/cocosbuilder/CCLabelBMFontLoader.h" -#include "editor-support/cocosbuilder/CCLabelTTFLoader.h" -#include "editor-support/cocosbuilder/CCSpriteLoader.h" -#include "editor-support/cocosbuilder/CCScale9SpriteLoader.h" -#include "editor-support/cocosbuilder/CCBFileLoader.h" -#include "editor-support/cocosbuilder/CCMenuLoader.h" -#include "editor-support/cocosbuilder/CCMenuItemLoader.h" -#include "editor-support/cocosbuilder/CCMenuItemImageLoader.h" -#include "editor-support/cocosbuilder/CCControlButtonLoader.h" -#include "editor-support/cocosbuilder/CCParticleSystemQuadLoader.h" -#include "editor-support/cocosbuilder/CCScrollViewLoader.h" - -using namespace cocos2d; - -namespace cocosbuilder { - -NodeLoaderLibrary::NodeLoaderLibrary() { - -} - -NodeLoaderLibrary::~NodeLoaderLibrary() { - this->purge(true); -} - -void NodeLoaderLibrary::registerDefaultNodeLoaders() { - this->registerNodeLoader("CCNode", NodeLoader::loader()); - this->registerNodeLoader("CCLayer", LayerLoader::loader()); - this->registerNodeLoader("CCLayerColor", LayerColorLoader::loader()); - this->registerNodeLoader("CCLayerGradient", LayerGradientLoader::loader()); - this->registerNodeLoader("CCSprite", SpriteLoader::loader()); - this->registerNodeLoader("CCLabelBMFont", LabelBMFontLoader::loader()); - this->registerNodeLoader("CCLabelTTF", LabelTTFLoader::loader()); - this->registerNodeLoader("CCScale9Sprite", Scale9SpriteLoader::loader()); - this->registerNodeLoader("CCScrollView", ScrollViewLoader::loader()); - this->registerNodeLoader("CCBFile", CCBFileLoader::loader()); - this->registerNodeLoader("CCMenu", MenuLoader::loader()); - this->registerNodeLoader("CCMenuItemImage", MenuItemImageLoader::loader()); - this->registerNodeLoader("CCControlButton", ControlButtonLoader::loader()); - this->registerNodeLoader("CCParticleSystemQuad", ParticleSystemQuadLoader::loader()); -} - -void NodeLoaderLibrary::registerNodeLoader(const char * pClassName, NodeLoader * pNodeLoader) { - pNodeLoader->retain(); - this->_nodeLoaders.insert(NodeLoaderMapEntry(pClassName, pNodeLoader)); -} - -void NodeLoaderLibrary::unregisterNodeLoader(const char * pClassName) { - NodeLoaderMap::iterator ccNodeLoadersIterator = this->_nodeLoaders.find(pClassName); - if (ccNodeLoadersIterator != this->_nodeLoaders.end()) - { - ccNodeLoadersIterator->second->release(); - _nodeLoaders.erase(ccNodeLoadersIterator); - } - else - { - CCLOG("The loader (%s) doesn't exist", pClassName); - } -} - -NodeLoader * NodeLoaderLibrary::getNodeLoader(const char* pClassName) { - NodeLoaderMap::iterator ccNodeLoadersIterator = this->_nodeLoaders.find(pClassName); - assert(ccNodeLoadersIterator != this->_nodeLoaders.end()); - return ccNodeLoadersIterator->second; -} - -void NodeLoaderLibrary::purge(bool pReleaseNodeLoaders) { - if(pReleaseNodeLoaders) { - for(auto& it : this->_nodeLoaders) { - it.second->release(); - } - } - this->_nodeLoaders.clear(); -} - - - -static NodeLoaderLibrary * sSharedNodeLoaderLibrary = nullptr; - -NodeLoaderLibrary * NodeLoaderLibrary::getInstance() { - if(sSharedNodeLoaderLibrary == nullptr) { - sSharedNodeLoaderLibrary = new (std::nothrow) NodeLoaderLibrary(); - - sSharedNodeLoaderLibrary->registerDefaultNodeLoaders(); - } - return sSharedNodeLoaderLibrary; -} - -void NodeLoaderLibrary::destroyInstance() { - CC_SAFE_DELETE(sSharedNodeLoaderLibrary); -} - -NodeLoaderLibrary * NodeLoaderLibrary::newDefaultNodeLoaderLibrary() { - NodeLoaderLibrary * ccNodeLoaderLibrary = NodeLoaderLibrary::library(); - - ccNodeLoaderLibrary->registerDefaultNodeLoaders(); - - return ccNodeLoaderLibrary; -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.h b/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.h deleted file mode 100644 index db7dfa0cc461..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNodeLoaderLibrary.h +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCNODELOADERLIBRARY_H_ -#define _CCB_CCNODELOADERLIBRARY_H_ - -#include "editor-support/cocosbuilder/CCBReader.h" - -namespace cocosbuilder { - -class NodeLoader; - -typedef std::map NodeLoaderMap; -typedef std::pair NodeLoaderMapEntry; - -class CC_DLL NodeLoaderLibrary : public cocos2d::Ref -{ -public: - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(NodeLoaderLibrary, library); - /** - * @js NA - * @lua NA - */ - NodeLoaderLibrary(); - /** - * @js NA - * @lua NA - */ - virtual ~NodeLoaderLibrary(); - /** - * @js NA - * @lua NA - */ - void registerDefaultNodeLoaders(); - /** - * @js NA - * @lua NA - */ - void registerNodeLoader(const char * pClassName, NodeLoader * pNodeLoader); - //void registerNodeLoader(String * pClassName, NodeLoader * pNodeLoader); - /** - * @js NA - * @lua NA - */ - void unregisterNodeLoader(const char * pClassName); - //void unregisterNodeLoader(String * pClassName); - /** - * @js NA - * @lua NA - */ - NodeLoader * getNodeLoader(const char * pClassName); - //CCNodeLoader * getNodeLoader(String * pClassName); - /** - * @js NA - * @lua NA - */ - void purge(bool pDelete); - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void registerDefaultCCNodeLoaders() { registerDefaultNodeLoaders(); } - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void registerCCNodeLoader(const char * pClassName, NodeLoader * pNodeLoader) { registerNodeLoader(pClassName, pNodeLoader); }; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE void unregisterCCNodeLoader(const char * pClassName) { unregisterNodeLoader(pClassName); }; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE NodeLoader * getCCNodeLoader(const char * pClassName) { return getNodeLoader(pClassName); }; - -public: - /** - * @js NA - * @lua NA - */ - static NodeLoaderLibrary * getInstance(); - /** - * @js NA - * @lua NA - */ - static void destroyInstance(); - /** - * @js NA - * @lua NA - */ - static NodeLoaderLibrary * newDefaultNodeLoaderLibrary(); - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * sharedNodeLoaderLibrary() { return NodeLoaderLibrary::getInstance(); }; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedNodeLoaderLibrary() { NodeLoaderLibrary::destroyInstance(); }; - /** - * @js NA - * @lua NA - */ - CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * newDefaultCCNodeLoaderLibrary() { return NodeLoaderLibrary::newDefaultNodeLoaderLibrary(); }; - -private: - NodeLoaderMap _nodeLoaders; -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoaderListener.h b/cocos/editor-support/cocosbuilder/CCNodeLoaderListener.h deleted file mode 100644 index c7dcf2f240cc..000000000000 --- a/cocos/editor-support/cocosbuilder/CCNodeLoaderListener.h +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCNODELOADERLISTENER_H_ -#define _CCB_CCNODELOADERLISTENER_H_ - - -namespace cocosbuilder { - -class CC_DLL NodeLoaderListener { - public: - /** - * @js NA - * @lua NA - */ - virtual ~NodeLoaderListener() {}; - /** - * @js NA - * @lua NA - */ - virtual void onNodeLoaded(cocos2d::Node * pNode, NodeLoader * pNodeLoader) = 0; -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp b/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp deleted file mode 100644 index 36747b23a50c..000000000000 --- a/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCParticleSystemQuadLoader.h" - -using namespace cocos2d; - -#define PROPERTY_EMITERMODE "emitterMode" -#define PROPERTY_POSVAR "posVar" -#define PROPERTY_EMISSIONRATE "emissionRate" -#define PROPERTY_DURATION "duration" -#define PROPERTY_TOTALPARTICLES "totalParticles" -#define PROPERTY_LIFE "life" -#define PROPERTY_STARTSIZE "startSize" -#define PROPERTY_ENDSIZE "endSize" -#define PROPERTY_STARTSPIN "startSpin" -#define PROPERTY_ENDSPIN "endSpin" -#define PROPERTY_ANGLE "angle" -#define PROPERTY_STARTCOLOR "startColor" -#define PROPERTY_ENDCOLOR "endColor" -#define PROPERTY_BLENDFUNC "blendFunc" -#define PROPERTY_GRAVITY "gravity" -#define PROPERTY_SPEED "speed" -#define PROPERTY_TANGENTIALACCEL "tangentialAccel" -#define PROPERTY_RADIALACCEL "radialAccel" -#define PROPERTY_TEXTURE "texture" -#define PROPERTY_STARTRADIUS "startRadius" -#define PROPERTY_ENDRADIUS "endRadius" -#define PROPERTY_ROTATEPERSECOND "rotatePerSecond" - -namespace cocosbuilder { - -void ParticleSystemQuadLoader::onHandlePropTypeIntegerLabeled(Node * pNode, Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_EMITERMODE) == 0) { - ((ParticleSystemQuad *)pNode)->setEmitterMode((ParticleSystem::Mode)pIntegerLabeled); - } else { - NodeLoader::onHandlePropTypeIntegerLabeled(pNode, pParent, pPropertyName, pIntegerLabeled, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypePoint(Node * pNode, Node * pParent, const char * pPropertyName, Vec2 pPoint, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_POSVAR) == 0) { - ((ParticleSystemQuad *)pNode)->setPosVar(pPoint); - } else if(strcmp(pPropertyName, PROPERTY_GRAVITY) == 0) { - ((ParticleSystemQuad *)pNode)->setGravity(pPoint); - } else { - NodeLoader::onHandlePropTypePoint(pNode, pParent, pPropertyName, pPoint, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeFloat(Node * pNode, Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_EMISSIONRATE) == 0) { - ((ParticleSystemQuad *)pNode)->setEmissionRate(pFloat); - } else if(strcmp(pPropertyName, PROPERTY_DURATION) == 0) { - ((ParticleSystemQuad *)pNode)->setDuration(pFloat); - } else { - NodeLoader::onHandlePropTypeFloat(pNode, pParent, pPropertyName, pFloat, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeInteger(Node * pNode, Node * pParent, const char * pPropertyName, int pInteger, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TOTALPARTICLES) == 0) { - ((ParticleSystemQuad *)pNode)->setTotalParticles(pInteger); - } else { - NodeLoader::onHandlePropTypeInteger(pNode, pParent, pPropertyName, pInteger, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeFloatVar(Node * pNode, Node * pParent, const char * pPropertyName, float * pFloatVar, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_LIFE) == 0) { - ((ParticleSystemQuad *)pNode)->setLife(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setLifeVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_STARTSIZE) == 0) { - ((ParticleSystemQuad *)pNode)->setStartSize(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setStartSizeVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ENDSIZE) == 0) { - ((ParticleSystemQuad *)pNode)->setEndSize(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setEndSizeVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_STARTSPIN) == 0) { - ((ParticleSystemQuad *)pNode)->setStartSpin(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setStartSpinVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ENDSPIN) == 0) { - ((ParticleSystemQuad *)pNode)->setEndSpin(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setEndSpinVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ANGLE) == 0) { - ((ParticleSystemQuad *)pNode)->setAngle(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setAngleVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_SPEED) == 0) { - ((ParticleSystemQuad *)pNode)->setSpeed(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setSpeedVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_TANGENTIALACCEL) == 0) { - ((ParticleSystemQuad *)pNode)->setTangentialAccel(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setTangentialAccelVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_RADIALACCEL) == 0) { - ((ParticleSystemQuad *)pNode)->setRadialAccel(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setRadialAccelVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_STARTRADIUS) == 0) { - ((ParticleSystemQuad *)pNode)->setStartRadius(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setStartRadiusVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ENDRADIUS) == 0) { - ((ParticleSystemQuad *)pNode)->setEndRadius(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setEndRadiusVar(pFloatVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ROTATEPERSECOND) == 0) { - ((ParticleSystemQuad *)pNode)->setRotatePerSecond(pFloatVar[0]); - ((ParticleSystemQuad *)pNode)->setRotatePerSecondVar(pFloatVar[1]); - } else { - NodeLoader::onHandlePropTypeFloatVar(pNode, pParent, pPropertyName, pFloatVar, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeColor4FVar(Node * pNode, Node * pParent, const char * pPropertyName, Color4F * pColor4FVar, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_STARTCOLOR) == 0) { - ((ParticleSystemQuad *)pNode)->setStartColor(pColor4FVar[0]); - ((ParticleSystemQuad *)pNode)->setStartColorVar(pColor4FVar[1]); - } else if(strcmp(pPropertyName, PROPERTY_ENDCOLOR) == 0) { - ((ParticleSystemQuad *)pNode)->setEndColor(pColor4FVar[0]); - ((ParticleSystemQuad *)pNode)->setEndColorVar(pColor4FVar[1]); - } else { - NodeLoader::onHandlePropTypeColor4FVar(pNode, pParent, pPropertyName, pColor4FVar, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((ParticleSystemQuad *)pNode)->setBlendFunc(pBlendFunc); - } else { - NodeLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -void ParticleSystemQuadLoader::onHandlePropTypeTexture(Node * pNode, Node * pParent, const char * pPropertyName, Texture2D * pTexture2D, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_TEXTURE) == 0) { - static_cast(pNode)->setTexture(pTexture2D); - if(pTexture2D) - { - static_cast(pNode)->setBlendAdditive(true); - } - } else { - NodeLoader::onHandlePropTypeTexture(pNode, pParent, pPropertyName, pTexture2D, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.h b/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.h deleted file mode 100644 index 5417bff043bb..000000000000 --- a/cocos/editor-support/cocosbuilder/CCParticleSystemQuadLoader.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCPARTICLESYSTEMQUADLOADER_H_ -#define _CCB_CCPARTICLESYSTEMQUADLOADER_H_ - -#include "base/CCRef.h" -#include "2d/CCParticleSystemQuad.h" - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL ParticleSystemQuadLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~ParticleSystemQuadLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(cocosbuilder::ParticleSystemQuadLoader, loader); - -protected: - /** - * @js NA - * @lua NA - */ - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::ParticleSystemQuad); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeIntegerLabeled(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypePoint(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Vec2 pPoint, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeFloat(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeInteger(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, int pInteger, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeFloatVar(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float * pFloatVar, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeColor4FVar(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color4F * pColor4FVar, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeTexture(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Texture2D * pTexture2D, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp deleted file mode 100644 index 8959572edf99..000000000000 --- a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCScale9SpriteLoader.h" - -using namespace cocos2d; -using namespace cocos2d::extension; - -#define PROPERTY_CONTENTSIZE "contentSize" -#define PROPERTY_SPRITEFRAME "spriteFrame" -#define PROPERTY_COLOR "color" -#define PROPERTY_OPACITY "opacity" -#define PROPERTY_BLENDFUNC "blendFunc" -// TODO: Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! -#define PROPERTY_PREFEREDSIZE "preferedSize" -#define PROPERTY_INSETLEFT "insetLeft" -#define PROPERTY_INSETTOP "insetTop" -#define PROPERTY_INSETRIGHT "insetRight" -#define PROPERTY_INSETBOTTOM "insetBottom" - -namespace cocosbuilder { - -ui::Scale9Sprite* Scale9SpriteLoader::createNode(cocos2d::Node* /*pParent*/, cocosbuilder::CCBReader* /*ccbReader*/) { - cocos2d::ui::Scale9Sprite* pNode = cocos2d::ui::Scale9Sprite::create(); - pNode->setAnchorPoint(cocos2d::Vec2::ZERO); - return pNode; -} - -void Scale9SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_SPRITEFRAME) == 0) { - static_cast(pNode)->setSpriteFrame(pSpriteFrame); - } else { - NodeLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pSpriteFrame, ccbReader); - } -} - -void Scale9SpriteLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setColor(pColor3B); - } else { - NodeLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void Scale9SpriteLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setOpacity(pByte); - } else { - NodeLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void Scale9SpriteLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - // TODO Not exported by CocosBuilder yet! - // ((Scale9Sprite *)pNode)->setBlendFunc(pBlendFunc); - } else { - NodeLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -void Scale9SpriteLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, const char * pPropertyName, Size pSize, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CONTENTSIZE) == 0) { - //((Scale9Sprite *)pNode)->setContentSize(pSize); - } else if(strcmp(pPropertyName, PROPERTY_PREFEREDSIZE) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setPreferredSize(pSize); - } else { - NodeLoader::onHandlePropTypeSize(pNode, pParent, pPropertyName, pSize, ccbReader); - } -} - -void Scale9SpriteLoader::onHandlePropTypeFloat(Node * pNode, Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_INSETLEFT) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetLeft(pFloat); - } else if(strcmp(pPropertyName, PROPERTY_INSETTOP) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetTop(pFloat); - } else if(strcmp(pPropertyName, PROPERTY_INSETRIGHT) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetRight(pFloat); - } else if(strcmp(pPropertyName, PROPERTY_INSETBOTTOM) == 0) { - ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetBottom(pFloat); - } else { - NodeLoader::onHandlePropTypeFloat(pNode, pParent, pPropertyName, pFloat, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h deleted file mode 100644 index e8bce179fb7f..000000000000 --- a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCSCALE9SPRITELOADER_H_ -#define _CCB_CCSCALE9SPRITELOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "editor-support/cocosbuilder/CCScale9SpriteLoader.h" -#include "ui/UIScale9Sprite.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL Scale9SpriteLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~Scale9SpriteLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(Scale9SpriteLoader, loader); - -protected: - /** - * @js NA - * @lua NA - */ - virtual cocos2d::ui::Scale9Sprite* createNode(cocos2d::Node* pParent, cocosbuilder::CCBReader* ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pBlendFunc, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::SpriteFrame * pSpriteFrame, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Size pSize, CCBReader * ccbReader); - /** - * @js NA - * @lua NA - */ - virtual void onHandlePropTypeFloat(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCScrollViewLoader.cpp b/cocos/editor-support/cocosbuilder/CCScrollViewLoader.cpp deleted file mode 100644 index 31f8d2242a09..000000000000 --- a/cocos/editor-support/cocosbuilder/CCScrollViewLoader.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCScrollViewLoader.h" - -using namespace cocos2d; -using namespace cocos2d::extension; - -#define PROPERTY_CONTAINER "container" -#define PROPERTY_DIRECTION "direction" -#define PROPERTY_CLIPSTOBOUNDS "clipsToBounds" -#define PROPERTY_BOUNCES "bounces" -#define PROPERTY_SCALE "scale" - -namespace cocosbuilder { - -void ScrollViewLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, const char * pPropertyName, Size pSize, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CONTENTSIZE) == 0) { - ((ScrollView *)pNode)->setViewSize(pSize); - } else { - NodeLoader::onHandlePropTypeSize(pNode, pParent, pPropertyName, pSize, ccbReader); - } -} - -void ScrollViewLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CLIPSTOBOUNDS) == 0) { - ((ScrollView *)pNode)->setClippingToBounds(pCheck); - } else if(strcmp(pPropertyName, PROPERTY_BOUNCES) == 0) { - ((ScrollView *)pNode)->setBounceable(pCheck); - } else { - NodeLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader); - } -} - -void ScrollViewLoader::onHandlePropTypeCCBFile(Node * pNode, Node * pParent, const char * pPropertyName, Node * pCCBFileNode, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_CONTAINER) == 0) { - ((ScrollView *)pNode)->setContainer(pCCBFileNode); - ((ScrollView *)pNode)->updateInset(); - } else { - NodeLoader::onHandlePropTypeCCBFile(pNode, pParent, pPropertyName, pCCBFileNode, ccbReader); - } -} - -void ScrollViewLoader::onHandlePropTypeFloat(Node * pNode, Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_SCALE) == 0) { - ((ScrollView *)pNode)->setScale(pFloat); - } else { - NodeLoader::onHandlePropTypeFloat(pNode, pParent, pPropertyName, pFloat, ccbReader); - } -} - -void ScrollViewLoader::onHandlePropTypeIntegerLabeled(Node * pNode, Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_DIRECTION) == 0) { - ((ScrollView *)pNode)->setDirection(ScrollView::Direction(pIntegerLabeled)); - } else { - NodeLoader::onHandlePropTypeFloatScale(pNode, pParent, pPropertyName, pIntegerLabeled, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCScrollViewLoader.h b/cocos/editor-support/cocosbuilder/CCScrollViewLoader.h deleted file mode 100644 index ffeb90ab4c9f..000000000000 --- a/cocos/editor-support/cocosbuilder/CCScrollViewLoader.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCSCROLLVIEWLOADER_H_ -#define _CCB_CCSCROLLVIEWLOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "extensions/GUI/CCScrollView/CCScrollView.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL ScrollViewLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~ScrollViewLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(ScrollViewLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::extension::ScrollView); - virtual void onHandlePropTypeSize(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Size pSize, CCBReader * ccbReader); - virtual void onHandlePropTypeCCBFile(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Node * pCCBFileNode, CCBReader * ccbReader); - virtual void onHandlePropTypeCheck(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader); - virtual void onHandlePropTypeFloat(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader); - virtual void onHandlePropTypeIntegerLabeled(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CCSpriteLoader.cpp b/cocos/editor-support/cocosbuilder/CCSpriteLoader.cpp deleted file mode 100644 index 647c46a67fc2..000000000000 --- a/cocos/editor-support/cocosbuilder/CCSpriteLoader.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "editor-support/cocosbuilder/CCSpriteLoader.h" - -using namespace cocos2d; - -#define PROPERTY_FLIP "flip" -#define PROPERTY_DISPLAYFRAME "displayFrame" -#define PROPERTY_COLOR "color" -#define PROPERTY_OPACITY "opacity" -#define PROPERTY_BLENDFUNC "blendFunc" - -namespace cocosbuilder { - -void SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) { - if(pSpriteFrame != nullptr) { - ((Sprite *)pNode)->setSpriteFrame(pSpriteFrame); - } else { - CCLOG("ERROR: SpriteFrame nullptr"); - } - } else { - NodeLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pSpriteFrame, ccbReader); - } -} - -void SpriteLoader::onHandlePropTypeFlip(Node * pNode, Node * pParent, const char * pPropertyName, bool * pFlip, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_FLIP) == 0) { - ((Sprite *)pNode)->setFlippedX(pFlip[0]); - ((Sprite *)pNode)->setFlippedY(pFlip[1]); - } else { - NodeLoader::onHandlePropTypeFlip(pNode, pParent, pPropertyName, pFlip, ccbReader); - } -} - -void SpriteLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((Sprite *)pNode)->setColor(pColor3B); - } else { - NodeLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); - } -} - -void SpriteLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((Sprite *)pNode)->setOpacity(pByte); - } else { - NodeLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); - } -} - -void SpriteLoader::onHandlePropTypeBlendFunc(Node * pNode, Node * pParent, const char * pPropertyName, BlendFunc pBlendFunc, CCBReader * ccbReader) { - if(strcmp(pPropertyName, PROPERTY_BLENDFUNC) == 0) { - ((Sprite *)pNode)->setBlendFunc(pBlendFunc); - } else { - NodeLoader::onHandlePropTypeBlendFunc(pNode, pParent, pPropertyName, pBlendFunc, ccbReader); - } -} - -} diff --git a/cocos/editor-support/cocosbuilder/CCSpriteLoader.h b/cocos/editor-support/cocosbuilder/CCSpriteLoader.h deleted file mode 100644 index 808f405c359f..000000000000 --- a/cocos/editor-support/cocosbuilder/CCSpriteLoader.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CCB_CCSPRITELOADER_H_ -#define _CCB_CCSPRITELOADER_H_ - -#include "editor-support/cocosbuilder/CCNodeLoader.h" - -namespace cocosbuilder { - -/* Forward declaration. */ -class CCBReader; - -class CC_DLL SpriteLoader : public NodeLoader { -public: - /** - * @js NA - * @lua NA - */ - virtual ~SpriteLoader() {}; - /** - * @js NA - * @lua NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(SpriteLoader, loader); - -protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Sprite); - - virtual void onHandlePropTypeColor3(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::Color3B pColor3B, CCBReader * ccbReader); - virtual void onHandlePropTypeByte(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader); - virtual void onHandlePropTypeBlendFunc(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::BlendFunc pCCBBlendFunc, CCBReader * ccbReader); - virtual void onHandlePropTypeSpriteFrame(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, cocos2d::SpriteFrame * pSpriteFrame, CCBReader * ccbReader); - virtual void onHandlePropTypeFlip(cocos2d::Node * pNode, cocos2d::Node * pParent, const char * pPropertyName, bool * pFlip, CCBReader * ccbReader); -}; - -} - -#endif diff --git a/cocos/editor-support/cocosbuilder/CMakeLists.txt b/cocos/editor-support/cocosbuilder/CMakeLists.txt deleted file mode 100644 index 31269377837a..000000000000 --- a/cocos/editor-support/cocosbuilder/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -set(COCOS_CCB_HEADER - editor-support/cocosbuilder/CCControlButtonLoader.h - editor-support/cocosbuilder/CCMenuLoader.h - editor-support/cocosbuilder/CCMenuItemImageLoader.h - editor-support/cocosbuilder/CCMenuItemLoader.h - editor-support/cocosbuilder/CCLabelBMFontLoader.h - editor-support/cocosbuilder/CCBMemberVariableAssigner.h - editor-support/cocosbuilder/CCBSequence.h - editor-support/cocosbuilder/CCNodeLoaderListener.h - editor-support/cocosbuilder/CCNodeLoader.h - editor-support/cocosbuilder/CCLayerColorLoader.h - editor-support/cocosbuilder/CCBAnimationManager.h - editor-support/cocosbuilder/CCLayerLoader.h - editor-support/cocosbuilder/CCBSequenceProperty.h - editor-support/cocosbuilder/CCLayerGradientLoader.h - editor-support/cocosbuilder/CCScrollViewLoader.h - editor-support/cocosbuilder/CCScale9SpriteLoader.h - editor-support/cocosbuilder/CCControlLoader.h - editor-support/cocosbuilder/CCLabelTTFLoader.h - editor-support/cocosbuilder/CCBKeyframe.h - editor-support/cocosbuilder/CocosBuilder.h - editor-support/cocosbuilder/CCBFileLoader.h - editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h - editor-support/cocosbuilder/CCNodeLoaderLibrary.h - editor-support/cocosbuilder/CCBReader.h - editor-support/cocosbuilder/CCParticleSystemQuadLoader.h - editor-support/cocosbuilder/CCBSelectorResolver.h - editor-support/cocosbuilder/CCSpriteLoader.h - ) - -set(COCOS_CCB_SRC - editor-support/cocosbuilder/CCBAnimationManager.cpp - editor-support/cocosbuilder/CCBFileLoader.cpp - editor-support/cocosbuilder/CCBKeyframe.cpp - editor-support/cocosbuilder/CCBReader.cpp - editor-support/cocosbuilder/CCBSequence.cpp - editor-support/cocosbuilder/CCBSequenceProperty.cpp - editor-support/cocosbuilder/CCControlButtonLoader.cpp - editor-support/cocosbuilder/CCControlLoader.cpp - editor-support/cocosbuilder/CCLabelBMFontLoader.cpp - editor-support/cocosbuilder/CCLabelTTFLoader.cpp - editor-support/cocosbuilder/CCLayerColorLoader.cpp - editor-support/cocosbuilder/CCLayerGradientLoader.cpp - editor-support/cocosbuilder/CCLayerLoader.cpp - editor-support/cocosbuilder/CCMenuItemImageLoader.cpp - editor-support/cocosbuilder/CCMenuItemLoader.cpp - editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp - editor-support/cocosbuilder/CCNodeLoader.cpp - editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp - editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp - editor-support/cocosbuilder/CCScale9SpriteLoader.cpp - editor-support/cocosbuilder/CCScrollViewLoader.cpp - editor-support/cocosbuilder/CCSpriteLoader.cpp - ) diff --git a/cocos/editor-support/cocosbuilder/CocosBuilder.h b/cocos/editor-support/cocosbuilder/CocosBuilder.h deleted file mode 100644 index c3de1612a452..000000000000 --- a/cocos/editor-support/cocosbuilder/CocosBuilder.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __EDITOR_SUPPORT_COCOSBUILDER_H__ -#define __EDITOR_SUPPORT_COCOSBUILDER_H__ - -#include "editor-support/cocosbuilder/CCBAnimationManager.h" -#include "editor-support/cocosbuilder/CCBFileLoader.h" -#include "editor-support/cocosbuilder/CCBKeyframe.h" -#include "editor-support/cocosbuilder/CCBMemberVariableAssigner.h" -#include "editor-support/cocosbuilder/CCBReader.h" -#include "editor-support/cocosbuilder/CCBSelectorResolver.h" -#include "editor-support/cocosbuilder/CCBSequence.h" -#include "editor-support/cocosbuilder/CCBSequenceProperty.h" -#include "editor-support/cocosbuilder/CCControlButtonLoader.h" -#include "editor-support/cocosbuilder/CCControlLoader.h" -#include "editor-support/cocosbuilder/CCLabelBMFontLoader.h" -#include "editor-support/cocosbuilder/CCLabelTTFLoader.h" -#include "editor-support/cocosbuilder/CCLayerColorLoader.h" -#include "editor-support/cocosbuilder/CCLayerGradientLoader.h" -#include "editor-support/cocosbuilder/CCLayerLoader.h" -#include "editor-support/cocosbuilder/CCMenuItemImageLoader.h" -#include "editor-support/cocosbuilder/CCMenuItemLoader.h" -#include "editor-support/cocosbuilder/CCMenuLoader.h" -#include "editor-support/cocosbuilder/CCNode+CCBRelativePositioning.h" -#include "editor-support/cocosbuilder/CCNodeLoader.h" -#include "editor-support/cocosbuilder/CCNodeLoaderLibrary.h" -#include "editor-support/cocosbuilder/CCNodeLoaderListener.h" -#include "editor-support/cocosbuilder/CCParticleSystemQuadLoader.h" -#include "editor-support/cocosbuilder/CCScale9SpriteLoader.h" -#include "editor-support/cocosbuilder/CCScrollViewLoader.h" -#include "editor-support/cocosbuilder/CCSpriteLoader.h" - -#endif // __EDITOR_SUPPORT_COCOSBUILDER_H__ diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 1f62595425ab..30150cf98f2f 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -31,6 +31,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "2d/CCSpriteFrameCache.h" #include "2d/CCSpriteFrame.h" +#include "base/ccUtils.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" @@ -916,12 +917,12 @@ Frame* ActionTimelineCache::loadBlendFrameWithFlatBuffers(const flatbuffers::Ble { BlendFuncFrame* frame = BlendFuncFrame::create(); cocos2d::BlendFunc blend; - blend.src = GL_ONE; - blend.dst = GL_ONE_MINUS_SRC_ALPHA; + blend.src = backend::BlendFactor::ONE; + blend.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; if (nullptr != flatbuffers->blendFunc()) { - blend.src = flatbuffers->blendFunc()->src(); - blend.dst = flatbuffers->blendFunc()->dst(); + blend.src = utils::toBackendBlendFactor(flatbuffers->blendFunc()->src()); + blend.dst = utils::toBackendBlendFactor(flatbuffers->blendFunc()->dst()); } frame->setBlendFunc(blend); diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk deleted file mode 100644 index 00480c6e5e43..000000000000 --- a/cocos/editor-support/cocostudio/Android.mk +++ /dev/null @@ -1,103 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := ccs - -LOCAL_MODULE_FILENAME := libccs - -LOCAL_ARM_MODE := arm - -LOCAL_SRC_FILES := CCActionFrame.cpp \ -CCActionFrameEasing.cpp \ -CCActionManagerEx.cpp \ -CCActionNode.cpp \ -CCActionObject.cpp \ -CCArmature.cpp \ -CCBone.cpp \ -CCArmatureAnimation.cpp \ -CCProcessBase.cpp \ -CCTween.cpp \ -CCDatas.cpp \ -CCBatchNode.cpp \ -CCDecorativeDisplay.cpp \ -CCDisplayFactory.cpp \ -CCDisplayManager.cpp \ -CCSkin.cpp \ -CCColliderDetector.cpp \ -CCArmatureDataManager.cpp \ -CCArmatureDefine.cpp \ -CCDataReaderHelper.cpp \ -CCSpriteFrameCacheHelper.cpp \ -CCTransformHelp.cpp \ -CCUtilMath.cpp \ -CCComAttribute.cpp \ -CCComAudio.cpp \ -CCComController.cpp \ -CCComRender.cpp \ -CCInputDelegate.cpp \ -DictionaryHelper.cpp \ -LocalizationManager.cpp \ -CCSGUIReader.cpp \ -CCSSceneReader.cpp \ -TriggerBase.cpp \ -TriggerMng.cpp \ -TriggerObj.cpp \ -CocoLoader.cpp \ -WidgetReader/NodeReader/NodeReader.cpp \ -WidgetReader/SingleNodeReader/SingleNodeReader.cpp \ -WidgetReader/SpriteReader/SpriteReader.cpp \ -WidgetReader/ParticleReader/ParticleReader.cpp \ -WidgetReader/GameMapReader/GameMapReader.cpp \ -WidgetReader/ProjectNodeReader/ProjectNodeReader.cpp \ -WidgetReader/ComAudioReader/ComAudioReader.cpp \ -WidgetReader/WidgetReader.cpp \ -WidgetReader/ButtonReader/ButtonReader.cpp \ -WidgetReader/CheckBoxReader/CheckBoxReader.cpp \ -WidgetReader/ImageViewReader/ImageViewReader.cpp \ -WidgetReader/LayoutReader/LayoutReader.cpp \ -WidgetReader/ListViewReader/ListViewReader.cpp \ -WidgetReader/LoadingBarReader/LoadingBarReader.cpp \ -WidgetReader/PageViewReader/PageViewReader.cpp \ -WidgetReader/ScrollViewReader/ScrollViewReader.cpp \ -WidgetReader/SliderReader/SliderReader.cpp \ -WidgetReader/TextAtlasReader/TextAtlasReader.cpp \ -WidgetReader/TextBMFontReader/TextBMFontReader.cpp \ -WidgetReader/TextFieldReader/TextFieldReader.cpp \ -WidgetReader/TextReader/TextReader.cpp \ -WidgetReader/Node3DReader/Node3DReader.cpp \ -WidgetReader/Sprite3DReader/Sprite3DReader.cpp \ -WidgetReader/UserCameraReader/UserCameraReader.cpp \ -WidgetReader/Particle3DReader/Particle3DReader.cpp \ -WidgetReader/SkeletonReader/BoneNodeReader.cpp \ -WidgetReader/SkeletonReader/SkeletonNodeReader.cpp \ -WidgetReader/GameNode3DReader/GameNode3DReader.cpp \ -WidgetReader/Light3DReader/Light3DReader.cpp \ -ActionTimeline/CCActionTimelineCache.cpp \ -ActionTimeline/CCFrame.cpp \ -ActionTimeline/CCTimeLine.cpp \ -ActionTimeline/CCActionTimeline.cpp \ -ActionTimeline/CCActionTimelineNode.cpp \ -ActionTimeline/CSLoader.cpp \ -ActionTimeline/CCBoneNode.cpp \ -ActionTimeline/CCSkeletonNode.cpp \ -ActionTimeline/CCSkinNode.cpp \ -FlatBuffersSerialize.cpp \ -WidgetCallBackHandlerProtocol.cpp \ -WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp \ -WidgetReader/TabControlReader/TabControlReader.cpp \ -CCComExtensionData.cpp \ -CocoStudio.cpp - - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/WidgetReader - -LOCAL_CFLAGS += -fexceptions - -LOCAL_STATIC_LIBRARIES := ccui -LOCAL_STATIC_LIBRARIES += ccds -LOCAL_STATIC_LIBRARIES += ext_flatbuffers - -include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index 11b6c928a763..74cc374ddb76 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -33,7 +33,6 @@ THE SOFTWARE. #include "renderer/CCRenderer.h" #include "renderer/CCGroupCommand.h" #include "renderer/CCGLProgramState.h" -#include "2d/CCDrawingPrimitives.h" #include "base/CCDirector.h" #if ENABLE_PHYSICS_BOX2D_DETECT @@ -627,7 +626,9 @@ void Armature::drawContour() #pragma warning (disable: 4996) #endif - DrawPrimitives::drawPoly( points, (unsigned int)length, true ); + //TODO coulsonwang + cocos2d::log("TODO in %s %s %d", __FILE__, __FUNCTION__, __LINE__); +// DrawPrimitives::drawPoly( points, (unsigned int)length, true ); #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #pragma GCC diagnostic warning "-Wdeprecated-declarations" diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 87d90b8652ce..487e299c0378 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -1040,20 +1040,20 @@ FrameData *DataReaderHelper::decodeFrame(tinyxml2::XMLElement *frameXML, tinyxm break; case BLEND_ADD: { - frameData->blendFunc.src = GL_SRC_ALPHA; - frameData->blendFunc.dst = GL_ONE; + frameData->blendFunc.src = backend::BlendFactor::SRC_ALPHA; + frameData->blendFunc.dst = backend::BlendFactor::ONE; } break; case BLEND_MULTIPLY: { - frameData->blendFunc.src = GL_DST_COLOR; - frameData->blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; + frameData->blendFunc.src = backend::BlendFactor::DST_COLOR; + frameData->blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; } break; case BLEND_SCREEN: { - frameData->blendFunc.src = GL_ONE; - frameData->blendFunc.dst = GL_ONE_MINUS_SRC_COLOR; + frameData->blendFunc.src = backend::BlendFactor::ONE; + frameData->blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_COLOR; } break; default: @@ -1608,8 +1608,8 @@ FrameData *DataReaderHelper::decodeFrame(const rapidjson::Value& json, DataInfo frameData->tweenEasing = (TweenType)(DICTOOL->getIntValue_json(json, A_TWEEN_EASING, cocos2d::tweenfunc::Linear)); frameData->displayIndex = DICTOOL->getIntValue_json(json, A_DISPLAY_INDEX); - frameData->blendFunc.src = (GLenum)(DICTOOL->getIntValue_json(json, A_BLEND_SRC, BlendFunc::ALPHA_PREMULTIPLIED.src)); - frameData->blendFunc.dst = (GLenum)(DICTOOL->getIntValue_json(json, A_BLEND_DST, BlendFunc::ALPHA_PREMULTIPLIED.dst)); + frameData->blendFunc.src = utils::toBackendBlendFactor(DICTOOL->getIntValue_json(json, A_BLEND_SRC, utils::toGLBlendFactor(BlendFunc::ALPHA_PREMULTIPLIED.src))); + frameData->blendFunc.dst = utils::toBackendBlendFactor(DICTOOL->getIntValue_json(json, A_BLEND_DST, utils::toGLBlendFactor(BlendFunc::ALPHA_PREMULTIPLIED.dst))); frameData->isTween = DICTOOL->getBooleanValue_json(json, A_TWEEN_FRAME, true); const char *event = DICTOOL->getStringValue_json(json, A_EVENT); @@ -2315,14 +2315,14 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, { if(str != nullptr) { - frameData->blendFunc.src = (GLenum)(atoi(str)); + frameData->blendFunc.src = utils::toBackendBlendFactor(atoi(str)); } } else if (key.compare(A_BLEND_DST) == 0) { if(str != nullptr) { - frameData->blendFunc.dst = (GLenum)(atoi(str)); + frameData->blendFunc.dst = utils::toBackendBlendFactor(atoi(str)); } } else if (key.compare(A_TWEEN_FRAME) == 0) diff --git a/cocos/editor-support/cocostudio/CMakeLists.txt b/cocos/editor-support/cocostudio/CMakeLists.txt index da192aaa51b1..30d7ee7163d7 100644 --- a/cocos/editor-support/cocostudio/CMakeLists.txt +++ b/cocos/editor-support/cocostudio/CMakeLists.txt @@ -1,10 +1,3 @@ - -if(WINDOWS AND BUILD_SHARED_LIBS) - add_definitions(-D_USRSTUDIODLL) -endif() - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ") - set(COCOS_CS_HEADER editor-support/cocostudio/CCProcessBase.h diff --git a/cocos/editor-support/cocostudio/CocosStudioExport.h b/cocos/editor-support/cocostudio/CocosStudioExport.h index eee489c246d7..d67c062debef 100644 --- a/cocos/editor-support/cocostudio/CocosStudioExport.h +++ b/cocos/editor-support/cocostudio/CocosStudioExport.h @@ -25,7 +25,7 @@ #ifndef __CCCOCOSSTUDIO_H__ #define __CCCOCOSSTUDIO_H__ -#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8) +#if (defined(WIN32) && defined(_WINDOWS)) #ifdef __MINGW32__ #include #endif diff --git a/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp index 28da60915fe5..bc281af75b3c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp @@ -29,7 +29,6 @@ #include "2d/CCTMXXMLParser.h" #include "2d/CCTMXTiledMap.h" #include "platform/CCFileUtils.h" -#include "deprecated/CCString.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" #include "editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.h" @@ -230,7 +229,9 @@ namespace cocostudio Node* node = Node::create(); setPropsWithFlatBuffers(node, (Table*)gameMapOptions); auto label = Label::create(); - label->setString(__String::createWithFormat("Some error of gid are in TMX Layer '%s'", layerName.c_str())->getCString()); + //TODO couslonwang + cocos2d::log("TODO in %s %s %d", __FILE__, __FUNCTION__, __LINE__); +// label->setString(__String::createWithFormat("Some error of gid are in TMX Layer '%s'", layerName.c_str())->getCString()); node->setScale(1.0f); node->addChild(label); return node; diff --git a/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp index 5eb6f0c301bc..47c25aa9d418 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp @@ -26,6 +26,7 @@ #include "editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.h" #include "base/ccTypes.h" +#include "base/ccUtils.h" #include "2d/CCParticleSystemQuad.h" #include "platform/CCFileUtils.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" @@ -127,11 +128,11 @@ namespace cocostudio if (name == "Src") { - blendFunc.src = atoi(value.c_str()); + blendFunc.src = utils::toBackendBlendFactor(atoi(value.c_str())); } else if (name == "Dst") { - blendFunc.dst = atoi(value.c_str()); + blendFunc.dst = utils::toBackendBlendFactor(atoi(value.c_str())); } attribute = attribute->Next(); @@ -141,7 +142,7 @@ namespace cocostudio child = child->NextSiblingElement(); } - flatbuffers::BlendFunc f_blendFunc(blendFunc.src, blendFunc.dst); + flatbuffers::BlendFunc f_blendFunc(utils::toGLBlendFactor(blendFunc.src), utils::toGLBlendFactor(blendFunc.dst)); auto options = CreateParticleSystemOptions(*builder, nodeOptions, @@ -164,8 +165,8 @@ namespace cocostudio if (particle && f_blendFunc) { cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED; - blendFunc.src = f_blendFunc->src(); - blendFunc.dst = f_blendFunc->dst(); + blendFunc.src = utils::toBackendBlendFactor(f_blendFunc->src()); + blendFunc.dst = utils::toBackendBlendFactor(f_blendFunc->dst()); particle->setBlendFunc(blendFunc); } diff --git a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp index adaceb9525d8..0026d9b6f7eb 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "editor-support/cocostudio/WidgetReader/SkeletonReader/CSBoneBinary_generated.h" #include "editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.h" #include "editor-support/cocostudio/ActionTimeline/CCBoneNode.h" - +#include "base/ccUtils.h" USING_NS_CC; USING_NS_TIMELINE; @@ -103,11 +103,11 @@ Offset BoneNodeReader::createOptionsWithFlatBuffers(const tinyxml2::XMLEl if (name == "Src") { - blendFunc.src = atoi(value.c_str()); + blendFunc.src = utils::toBackendBlendFactor(atoi(value.c_str())); } else if (name == "Dst") { - blendFunc.dst = atoi(value.c_str()); + blendFunc.dst = utils::toBackendBlendFactor(atoi(value.c_str())); } battribute = battribute->Next(); @@ -116,7 +116,7 @@ Offset
BoneNodeReader::createOptionsWithFlatBuffers(const tinyxml2::XMLEl child = child->NextSiblingElement(); } - flatbuffers::BlendFunc f_blendFunc(blendFunc.src, blendFunc.dst); + flatbuffers::BlendFunc f_blendFunc(utils::toGLBlendFactor(blendFunc.src), utils::toGLBlendFactor(blendFunc.dst)); auto options = CreateBoneOptions(*builder, nodeOptions, @@ -140,8 +140,8 @@ void BoneNodeReader::setPropsWithFlatBuffers(cocos2d::Node *node, if (f_blendFunc) { cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED; - blendFunc.src = f_blendFunc->src(); - blendFunc.dst = f_blendFunc->dst(); + blendFunc.src = utils::toBackendBlendFactor(f_blendFunc->src()); + blendFunc.dst = utils::toBackendBlendFactor(f_blendFunc->dst()); bone->setBlendFunc(blendFunc); } } diff --git a/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp index b664d6b12cf9..dfec73378a8c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp @@ -25,6 +25,7 @@ #include "editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.h" +#include "base/ccUtils.h" #include "2d/CCSprite.h" #include "2d/CCSpriteFrameCache.h" #include "platform/CCFileUtils.h" @@ -140,11 +141,11 @@ namespace cocostudio if (name == "Src") { - blendFunc.src = atoi(value.c_str()); + blendFunc.src = utils::toBackendBlendFactor(atoi(value.c_str())); } else if (name == "Dst") { - blendFunc.dst = atoi(value.c_str()); + blendFunc.dst = utils::toBackendBlendFactor(atoi(value.c_str())); } attribute = attribute->Next(); @@ -154,7 +155,7 @@ namespace cocostudio child = child->NextSiblingElement(); } - flatbuffers::BlendFunc f_blendFunc(blendFunc.src, blendFunc.dst); + flatbuffers::BlendFunc f_blendFunc(utils::toGLBlendFactor(blendFunc.src), utils::toGLBlendFactor(blendFunc.dst)); auto options = CreateSpriteOptions(*builder, nodeOptions, @@ -234,8 +235,8 @@ namespace cocostudio if (f_blendFunc) { cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED; - blendFunc.src = f_blendFunc->src(); - blendFunc.dst = f_blendFunc->dst(); + blendFunc.src = utils::toBackendBlendFactor(f_blendFunc->src()); + blendFunc.dst = utils::toBackendBlendFactor(f_blendFunc->dst()); sprite->setBlendFunc(blendFunc); } diff --git a/cocos/editor-support/spine/CMakeLists.txt b/cocos/editor-support/spine/CMakeLists.txt index 944e310e42da..0ccd0b188ad3 100644 --- a/cocos/editor-support/spine/CMakeLists.txt +++ b/cocos/editor-support/spine/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(editor-support) - set(COCOS_SPINE_HEADER editor-support/spine/Animation.h editor-support/spine/EventData.h diff --git a/cocos/editor-support/spine/SkeletonBatch.cpp b/cocos/editor-support/spine/SkeletonBatch.cpp index 7ac3ce419c10..1978abb0117c 100644 --- a/cocos/editor-support/spine/SkeletonBatch.cpp +++ b/cocos/editor-support/spine/SkeletonBatch.cpp @@ -133,7 +133,7 @@ void SkeletonBatch::deallocateIndices(uint32_t numIndices) { cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) { TrianglesCommand* command = nextFreeCommand(); - command->init(globalOrder, texture, glProgramState, blendType, triangles, mv, flags); + command->init(globalOrder, texture, blendType, triangles, mv, flags); renderer->addCommand(command); return command; } diff --git a/cocos/editor-support/spine/SkeletonRenderer.cpp b/cocos/editor-support/spine/SkeletonRenderer.cpp index 860ce3501101..9c3c0ba40a9f 100644 --- a/cocos/editor-support/spine/SkeletonRenderer.cpp +++ b/cocos/editor-support/spine/SkeletonRenderer.cpp @@ -299,20 +299,20 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t BlendFunc blendFunc; switch (slot->data->blendMode) { case SP_BLEND_MODE_ADDITIVE: - blendFunc.src = _premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA; - blendFunc.dst = GL_ONE; + blendFunc.src = _premultipliedAlpha ? backend::BlendFactor::ONE : backend::BlendFactor::SRC_ALPHA; + blendFunc.dst = backend::BlendFactor::ONE; break; case SP_BLEND_MODE_MULTIPLY: - blendFunc.src = GL_DST_COLOR; - blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; + blendFunc.src = backend::BlendFactor::DST_COLOR; + blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; break; case SP_BLEND_MODE_SCREEN: - blendFunc.src = GL_ONE; - blendFunc.dst = GL_ONE_MINUS_SRC_COLOR; + blendFunc.src = backend::BlendFactor::ONE; + blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_COLOR; break; default: - blendFunc.src = _premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA; - blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; + blendFunc.src = _premultipliedAlpha ? backend::BlendFactor::ONE : backend::BlendFactor::SRC_ALPHA; + blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; } if (!isTwoColorTint) { diff --git a/cocos/editor-support/spine/proj.win10/libSpine.vcxproj b/cocos/editor-support/spine/proj.win10/libSpine.vcxproj deleted file mode 100644 index c6d155f9324e..000000000000 --- a/cocos/editor-support/spine/proj.win10/libSpine.vcxproj +++ /dev/null @@ -1,559 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - false - false - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} - StaticLibrary - libSpine - libSpine - en-US - 14.0 - true - Windows Store - 8.2 - 10.0.10240.0 - 10.0.10240.0 - - - - StaticLibrary - true - v141 - - - StaticLibrary - true - v141 - - - StaticLibrary - true - v141 - - - StaticLibrary - false - true - v141 - - - StaticLibrary - false - true - v141 - - - StaticLibrary - false - true - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - false - - - false - - - false - - - false - - - - NotUsing - true - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - ProgramDatabase - $(IntDir)$(ProjectName).pdb - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - NotUsing - true - false - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - $(IntDir)$(ProjectName).pdb - ProgramDatabase - - - Console - false - false - - - false - /IGNORE:4264 %(AdditionalOptions) - - - - - NotUsing - true - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - ProgramDatabase - $(IntDir)$(ProjectName).pdb - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - NotUsing - true - false - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - ProgramDatabase - $(IntDir)$(ProjectName).pdb - - - Console - false - false - - - false - /IGNORE:4264 %(AdditionalOptions) - - - - - NotUsing - true - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - ProgramDatabase - $(IntDir)$(ProjectName).pdb - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - NotUsing - true - false - false - 4458;4456;4996;%(DisableSpecificWarnings) - $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) - $(IntDir)$(ProjectName).pdb - ProgramDatabase - - - Console - false - false - - - false - /IGNORE:4264 %(AdditionalOptions) - - - - - - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj deleted file mode 100644 index bf508ff83c81..000000000000 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} - libSpine - - - - StaticLibrary - true - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - Unicode - - - StaticLibrary - false - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - true - Unicode - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - - - - Level3 - Disabled - - - $(EngineRoot);$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - 4267;4251;4244;%(DisableSpecificWarnings) - false - - - true - - - - - Level3 - MinSpace - true - true - - - WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - $(EngineRoot);$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - None - false - - - true - true - true - - - - - - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters deleted file mode 100755 index eb38b7729a70..000000000000 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters +++ /dev/null @@ -1,302 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/cocos/math/Mat4.cpp b/cocos/math/Mat4.cpp index f9044c09d105..55c5d1ce44d7 100644 --- a/cocos/math/Mat4.cpp +++ b/cocos/math/Mat4.cpp @@ -128,6 +128,12 @@ void Mat4::createPerspective(float fieldOfView, float aspectRatio, dst->m[10] = (-(zFarPlane + zNearPlane)) * f_n; dst->m[11] = -1.0f; dst->m[14] = -2.0f * zFarPlane * zNearPlane * f_n; + +// https://metashapes.com/blog/opengl-metal-projection-matrix-problem/ +#ifdef CC_USE_METAL + dst->m[10] = -(zFarPlane) * f_n; + dst->m[14] = -(zFarPlane * zNearPlane) * f_n; +#endif } void Mat4::createOrthographic(float width, float height, float zNearPlane, float zFarPlane, Mat4* dst) @@ -154,6 +160,12 @@ void Mat4::createOrthographicOffCenter(float left, float right, float bottom, fl dst->m[13] = (top + bottom) / (bottom - top); dst->m[14] = (zNearPlane + zFarPlane) / (zNearPlane - zFarPlane); dst->m[15] = 1; + +//// https://metashapes.com/blog/opengl-metal-projection-matrix-problem/ +#ifdef CC_USE_METAL + dst->m[10] = 1 / (zNearPlane - zFarPlane); + dst->m[14] = zNearPlane / (zNearPlane - zFarPlane); +#endif } void Mat4::createBillboard(const Vec3& objectPosition, const Vec3& cameraPosition, diff --git a/cocos/math/Vec2.h b/cocos/math/Vec2.h index 18ab06efae64..75f0f08ed136 100644 --- a/cocos/math/Vec2.h +++ b/cocos/math/Vec2.h @@ -58,12 +58,12 @@ class CC_DLL Vec2 /** * The x coordinate. */ - float x; + float x = 0.f; /** * The y coordinate. */ - float y; + float y = 0.f; /** * Constructs a new vector initialized to all zeros. diff --git a/cocos/network/Android.mk b/cocos/network/Android.mk deleted file mode 100644 index dd419020e118..000000000000 --- a/cocos/network/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := ccnet - -LOCAL_MODULE_FILENAME := libnet - -LOCAL_ARM_MODE := arm - -LOCAL_SRC_FILES := HttpClient-android.cpp \ -SocketIO.cpp \ -WebSocket.cpp \ -CCDownloader.cpp \ -CCDownloader-android.cpp \ -Uri.cpp - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_STATIC_LIBRARIES := cc_core -LOCAL_STATIC_LIBRARIES += ext_websockets - -include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/network/HttpClient-winrt.cpp b/cocos/network/HttpClient-winrt.cpp deleted file mode 100644 index 56e18199fd0e..000000000000 --- a/cocos/network/HttpClient-winrt.cpp +++ /dev/null @@ -1,373 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 greathqy -Copyright (c) 2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "network/HttpClient.h" - -#include -#include -#include - -#include - -#include "base/CCVector.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" - -#include "platform/CCFileUtils.h" -#include "network/HttpConnection-winrt.h" - -NS_CC_BEGIN - -namespace network { - - static std::mutex s_requestQueueMutex; - static std::mutex s_responseQueueMutex; - - static std::condition_variable_any s_SleepCondition; - - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - typedef int int32_t; -#endif - - static Vector* s_requestQueue = nullptr; - static Vector* s_responseQueue = nullptr; - - static HttpClient *s_pHttpClient = nullptr; // pointer to singleton - - static std::string s_errorBuffer =""; - - static std::string s_cookieFilename = ""; - - static std::string s_sslCaFilename = ""; - - // function used to collect response/header data - static void writeData(std::vector *pFromBuffer, std::vector *pToBuffer) - { - if(nullptr == pFromBuffer || nullptr == pToBuffer) - return; - - pToBuffer->insert(pToBuffer->end(), pFromBuffer->begin(), pFromBuffer->end()); - } - - static void processHttpResponse(HttpResponse* response, std::string& errorStr); - - static HttpRequest *s_requestSentinel = new (std::nothrow) HttpRequest; - - // Worker thread - void HttpClient::networkThread() - { - auto scheduler = Director::getInstance()->getScheduler(); - - while (true) - { - HttpRequest *request; - - // step 1: send http request if the requestQueue isn't empty - { - std::lock_guard lock(s_requestQueueMutex); - while (s_requestQueue->empty()) { - s_SleepCondition.wait(s_requestQueueMutex); - } - request = s_requestQueue->at(0); - s_requestQueue->erase(0); - } - - if (request == s_requestSentinel) { - break; - } - - // step 2: libcurl sync access - - // Create a HttpResponse object, the default setting is http access failed - HttpResponse *response = new (std::nothrow) HttpResponse(request); - - processHttpResponse(response, s_errorBuffer); - - - // add response packet into queue - s_responseQueueMutex.lock(); - s_responseQueue->pushBack(response); - s_responseQueueMutex.unlock(); - - if (nullptr != s_pHttpClient) { - scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); - } - } - - // cleanup: if worker thread received quit signal, clean up un-completed request queue - s_requestQueueMutex.lock(); - s_requestQueue->clear(); - s_requestQueueMutex.unlock(); - - - if (s_requestQueue != nullptr) { - delete s_requestQueue; - s_requestQueue = nullptr; - delete s_responseQueue; - s_responseQueue = nullptr; - } - - } - - // Worker thread - void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) - { - std::string errorStr; - processHttpResponse(response, errorStr); - - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([response, request]{ - const ccHttpRequestCallback& callback = request->getCallback(); - Ref* pTarget = request->getTarget(); - SEL_HttpResponse pSelector = request->getSelector(); - - if (callback != nullptr) - { - callback(s_pHttpClient, response); - } - else if (pTarget && pSelector) - { - (pTarget->*pSelector)(s_pHttpClient, response); - } - response->release(); - // do not release in other thread - request->release(); - }); - } - - // Process Response - static void processHttpResponse(HttpResponse* response, std::string& errorStr) - { - auto request = response->getHttpRequest(); - long responseCode = -1; - int retValue = 0; - HttpConnection xhr; - bool ok = false; - bool manualAuthReqd = false; - - // Process the request -> get response packet - switch (request->getRequestType()) - { - case HttpRequest::Type::GET: // HTTP GET - ok = (xhr.init(request) && xhr.open("GET", manualAuthReqd, s_cookieFilename) && xhr.send()); - break; - - case HttpRequest::Type::POST: // HTTP POST - ok = (xhr.init(request) && xhr.open("POST", manualAuthReqd, s_cookieFilename) && xhr.send()); - break; - - case HttpRequest::Type::PUT: // HTTP PUT - ok = (xhr.init(request) && xhr.open("PUT", manualAuthReqd, s_cookieFilename) && xhr.send()); - break; - - case HttpRequest::Type::DELETE: // HTTP DELETE - ok = (xhr.init(request) && xhr.open("DELETE", manualAuthReqd, s_cookieFilename) && xhr.send()); - break; - - default: - CCASSERT(true, "CCHttpClient: unknown request type, only GET and POST are supported"); - break; - } - - writeData(xhr.getResponseHeader(), response->getResponseHeader()); - writeData(xhr.getResponseData(), response->getResponseData()); - retValue = ok ? 0 : 1; - errorStr = xhr.getErrorMessage(); - responseCode = xhr.getStatusCode(); - - // write data to HttpResponse - response->setResponseCode(responseCode); - - if (retValue != 0) - { - response->setSucceed(false); - response->setErrorBuffer(errorStr.c_str()); - } - else - { - response->setSucceed(true); - } - } - - // HttpClient implementation - HttpClient* HttpClient::getInstance() - { - if (s_pHttpClient == nullptr) { - s_pHttpClient = new (std::nothrow) HttpClient(); - } - - return s_pHttpClient; - } - - void HttpClient::destroyInstance() - { - CC_SAFE_DELETE(s_pHttpClient); - } - - void HttpClient::enableCookies(const char* cookieFile) { - if (cookieFile) { - s_cookieFilename = std::string(cookieFile); - } - else { - s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); - } - } - - void HttpClient::setSSLVerification(const std::string& caFile) - { - s_sslCaFilename = caFile; - } - - HttpClient::HttpClient() - : _timeoutForConnect(30) - , _timeoutForRead(60) - { - } - - HttpClient::~HttpClient() - { - if (s_requestQueue != nullptr) { - { - std::lock_guard lock(s_requestQueueMutex); - s_requestQueue->pushBack(s_requestSentinel); - } - s_SleepCondition.notify_one(); - } - - s_pHttpClient = nullptr; - } - - //Lazy create semaphore & mutex & thread - bool HttpClient::lazyInitThreadSemaphore() - { - if (s_requestQueue != nullptr) { - return true; - } - else { - - s_requestQueue = new (std::nothrow) Vector(); - s_responseQueue = new (std::nothrow) Vector(); - - auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); - t.detach(); - } - - return true; - } - - //Add a get task to queue - void HttpClient::send(HttpRequest* request) - { - if (false == lazyInitThreadSemaphore()) - { - return; - } - - if (!request) - { - return; - } - - request->retain(); - - if (nullptr != s_requestQueue) { - s_requestQueueMutex.lock(); - s_requestQueue->pushBack(request); - s_requestQueueMutex.unlock(); - - // Notify thread start to work - s_SleepCondition.notify_one(); - } - } - - void HttpClient::sendImmediate(HttpRequest* request) - { - if (!request) - { - return; - } - - request->retain(); - // Create a HttpResponse object, the default setting is http access failed - HttpResponse *response = new (std::nothrow) HttpResponse(request); - - auto t = std::thread(&HttpClient::networkThreadAlone, this, request, response); - t.detach(); - } - - // Poll and notify main thread if responses exists in queue - void HttpClient::dispatchResponseCallbacks() - { - // log("CCHttpClient::dispatchResponseCallbacks is running"); - //occurs when cocos thread fires but the network thread has already quited - if (nullptr == s_responseQueue) { - return; - } - HttpResponse* response = nullptr; - - s_responseQueueMutex.lock(); - - if (!s_responseQueue->empty()) - { - response = s_responseQueue->at(0); - s_responseQueue->erase(0); - } - - s_responseQueueMutex.unlock(); - - if (response) - { - HttpRequest *request = response->getHttpRequest(); - const ccHttpRequestCallback& callback = request->getCallback(); - Ref* pTarget = request->getTarget(); - SEL_HttpResponse pSelector = request->getSelector(); - - if (callback != nullptr) - { - callback(this, response); - } - else if (pTarget && pSelector) - { - (pTarget->*pSelector)(this, response); - } - - response->release(); - // do not release in other thread - request->release(); - } - } - - } - -NS_CC_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - diff --git a/cocos/network/HttpConnection-winrt.cpp b/cocos/network/HttpConnection-winrt.cpp deleted file mode 100644 index 22a02ba7305a..000000000000 --- a/cocos/network/HttpConnection-winrt.cpp +++ /dev/null @@ -1,747 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 greathqy -Copyright (c) 2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "network/HttpCookie.h" -#include "network/HttpConnection-winrt.h" - -NS_CC_BEGIN - -namespace network { - - // Format and add default headers (Platform specific approach) - static void formatHeaders(std::vector& headers) - { -#if defined(_XBOX_ONE) - for(auto& header : headers) - { - header += "\r\n"; - } - - // append default headers - headers.emplace_back("User-Agent: XB1_IXHR2_HTTP\r\n"); - headers.emplace_back("x-xbl-device-type: XboxOne\r\n"); - headers.emplace_back("x-xbl-client-type: Console\r\n"); - headers.emplace_back("x-xbl-client-version: 1.0\r\n"); - headers.emplace_back("x-xbl-contract-version: 1\r\n"); -#endif - } - - // Get user authentication token (Platform specific approach) - static bool getAuthenticationToken(const std::string& verb, const std::string& url, const std::string& headersXST, const std::string& bodyXST, std::string& token, std::string& signature) - { -#if defined(_XBOX_ONE) - using namespace Windows::Xbox::System; - - token = ""; - signature = ""; - User^ loggedInUser = nullptr; - int ind = 0; - - while(ind < User::Users->Size) - { - loggedInUser = User::Users->GetAt(ind++); - if(loggedInUser->IsSignedIn) - break; - - loggedInUser = nullptr; - } - - if(nullptr == loggedInUser) - return false; - - Platform::Array^ body; - - if(!bodyXST.empty()) { - body = ref new Platform::Array((unsigned char*)bodyXST.c_str(), bodyXST.size()); - } - else { - body = ref new Platform::Array(1); - body[0] = 0; - } - - // this method will crash if TitleId & PrimaryServiceConfigId not specified in Package.appxmanifest. - auto asynOp = loggedInUser->GetTokenAndSignatureAsync( - ref new Platform::String(std::wstring(verb.begin(), verb.end()).c_str()), - ref new Platform::String(std::wstring(url.begin(), url.end()).c_str()), - ref new Platform::String(std::wstring(headersXST.begin(), headersXST.end()).c_str()), body); - - bool bRet = false; - HRESULT hr = S_OK; - - asynOp->Completed = ref new Windows::Foundation::AsyncOperationCompletedHandler( - [&token, &signature, &bRet, &hr](Windows::Foundation::IAsyncOperation^ operation, Windows::Foundation::AsyncStatus status) - { - if(status == Windows::Foundation::AsyncStatus::Completed) { - try - { - auto result = operation->GetResults(); - - std::wstring tok = result->Token->Data(); - std::wstring sig = result->Signature->Data(); - token = std::string(tok.begin(), tok.end()); - signature = std::string(sig.begin(), sig.end()); - - bRet = true; - } - catch(Platform::Exception^ e) - { - bRet = false; - } - } - else { - hr = operation->ErrorCode.Value; - - if(hr == 0x87dd0021) //AM_E_NO_TOKEN_REQUIRED - bRet = true; - } - }); - - while(asynOp->Status == Windows::Foundation::AsyncStatus::Started) - { - ::Sleep(1); - } - - return bRet; -#else - return false; -#endif - } - - - // CXMLHTTPRequest2Callback - CXHR2Callback::CXHR2Callback() : - _statusCode(0), - _hWfC(nullptr), - _errorMsg("") - { - } - - CXHR2Callback::~CXHR2Callback() - { - if (nullptr != _hWfC) - { - CloseHandle(_hWfC); - _hWfC = nullptr; - } - } - - HRESULT CXHR2Callback::RuntimeClassInitialize() - { - _hWfC = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS); - return HRESULT_FROM_WIN32(GetLastError()); - } - - HRESULT CXHR2Callback::OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl) - { - UNREFERENCED_PARAMETER(pXHR); - UNREFERENCED_PARAMETER(pwszRedirectUrl); - - return S_OK; - } - - HRESULT CXHR2Callback::OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus) - { - _statusCode = dwStatus; - - if(nullptr == pXHR) { - return E_INVALIDARG; - } - - WCHAR *headers = nullptr; - HRESULT hr = pXHR->GetAllResponseHeaders(&headers); - - if(SUCCEEDED(hr)) { - std::wstring hdr = headers; - _headers.insert(_headers.end(), hdr.begin(), hdr.end()); - } - - if(headers != nullptr) { - CoTaskMemFree(headers); - headers = nullptr; - } - - return hr; - } - - HRESULT CXHR2Callback::OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) - { - UNREFERENCED_PARAMETER(pXHR); - - return ReadStreamData(pResponseStream); - } - - HRESULT CXHR2Callback::OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) - { - UNREFERENCED_PARAMETER(pXHR); - - HRESULT hr = ReadStreamData(pResponseStream); - - CompleteRequest(hr); - - return hr; - } - - HRESULT CXHR2Callback::OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError) - { - CompleteRequest(hrError); - - return hrError; - } - - HRESULT CXHR2Callback::WaitForComplete(PDWORD pdwStatus) - { - HRESULT hr = E_FAIL; - - if (NULL != _hWfC) - { - hr = S_OK; - DWORD error; - - error = WaitForSingleObjectEx(_hWfC, INFINITE, FALSE); - - if (error == WAIT_FAILED) { - hr = HRESULT_FROM_WIN32(GetLastError()); - } - - if (error != WAIT_OBJECT_0) { - hr = E_ABORT; - } - } - - if (SUCCEEDED(hr)) { - *pdwStatus = _statusCode; - } - - return hr; - } - - HRESULT CXHR2Callback::ReadStreamData(ISequentialStream* pResponseStream) - { - if(pResponseStream == NULL) { - return E_INVALIDARG; - } - - CCHAR buff[READ_BUFFER_MAX]; - DWORD totalBytes = 0; - DWORD bytesRead = 0; - HRESULT hr = S_OK; - - do - { - hr = pResponseStream->Read(buff, READ_BUFFER_MAX, &bytesRead); - - if(FAILED(hr)) { - break; - } - - _data.insert(_data.end(), &buff[0], buff + bytesRead); - totalBytes += bytesRead; - } - while(hr == S_OK); - - if(SUCCEEDED(hr)) { - hr = S_OK; - } - - return hr; - } - - void CXHR2Callback::CompleteRequest(HRESULT hrError) - { - if (NULL != _hWfC) { - SetEvent(_hWfC); - } - - switch (hrError) - { - case S_OK: - case S_FALSE: - _statusCode = 200; - break; - - case INET_E_AUTHENTICATION_REQUIRED: - _statusCode = 401; - _errorMsg = ERR_MSG_401; - break; - - case INET_E_DOWNLOAD_FAILURE: - _statusCode = 500; - _errorMsg = ERR_MSG_DL_FLD; - break; - - case INET_E_FORBIDFRAMING: - _statusCode = 403; - _errorMsg = ERR_MSG_403; - break; - - case INET_E_RESOURCE_NOT_FOUND: - _statusCode = 404; - _errorMsg = ERR_MSG_404; - break; - - case RPC_S_PROXY_ACCESS_DENIED: - _statusCode = 407; - _errorMsg = ERR_MSG_407; - break; - - case ERROR_RESOURCE_CALL_TIMED_OUT: - _statusCode = 408; - _errorMsg = ERR_MSG_408; - break; - - case INET_E_INVALID_REQUEST: - _statusCode = 400; - _errorMsg = ERR_MSG_400; - break; - - case E_ABORT: - _statusCode = 412; - _errorMsg = ERR_MSG_412; - break; - - default: - _statusCode = 500; - _errorMsg = ERR_MSG_500; - break; - } - } - - - //CXHR2DataStream - CXHR2DataStream::CXHR2DataStream() : - _pData(nullptr), - _dataSize(0), - _seekIndex(0), - _refCnt(1) - { - } - - CXHR2DataStream::~CXHR2DataStream() - { - if(nullptr != _pData) - delete[] _pData; - } - - ULONG CXHR2DataStream::Length() - { - return _dataSize; - } - - HRESULT CXHR2DataStream::Init(const void *psBuffer, ULONG cbBufferSize) - { - HRESULT hr = S_OK; - - if(psBuffer == nullptr || cbBufferSize > REQUEST_BUFFER_MAX) { - hr = E_INVALIDARG; - } - - if(SUCCEEDED(hr)) { - _dataSize = cbBufferSize; - _seekIndex = 0; - _pData = new (std::nothrow) BYTE[_dataSize]; - - if(_pData == nullptr) - hr = E_OUTOFMEMORY; - } - - if(SUCCEEDED(hr)) { - memcpy_s(_pData, _dataSize, psBuffer, cbBufferSize); - } - - return hr; - } - - HRESULT CXHR2DataStream::Read(void *pv, ULONG cb, ULONG *pcbRead) - { - HRESULT hr = S_OK; - - if(pv == nullptr) { - hr = E_INVALIDARG; - } - - if(SUCCEEDED(hr)) { - BYTE* pOutput = (BYTE*)pv; - BYTE* _pInput = _pData; - - for(*pcbRead = 0; *pcbRead < cb; (*pcbRead)++) - { - if(_seekIndex == _dataSize) { - hr = S_FALSE; - break; - } - - pOutput[*pcbRead] = _pInput[*pcbRead]; - _seekIndex++; - } - } - - return hr; - } - - HRESULT CXHR2DataStream::Write(const void *pv, ULONG cb, ULONG *pcbWritten) - { - HRESULT hr = E_NOTIMPL; - - UNREFERENCED_PARAMETER(pv); - UNREFERENCED_PARAMETER(cb); - UNREFERENCED_PARAMETER(pcbWritten); - - return hr; - } - - ULONG CXHR2DataStream::AddRef() - { - return ::InterlockedIncrement(&_refCnt); - } - - ULONG CXHR2DataStream::Release() - { - ULONG refCnt = ::InterlockedDecrement(&_refCnt); - - if(0 == refCnt) { - delete this; - } - - return refCnt; - } - - HRESULT CXHR2DataStream::QueryInterface(REFIID riid, void **ppvObject) - { - HRESULT hr = S_OK; - - if(ppvObject == nullptr) { - hr = E_INVALIDARG; - } - - void *pObject = nullptr; - - if(SUCCEEDED(hr)) { - - if(riid == IID_IUnknown) { - pObject = static_cast((IDispatch*)this); - } - else if(riid == IID_IDispatch) { - pObject = static_cast(this); - } - else if(riid == IID_ISequentialStream) { - pObject = static_cast(this); - } - else { - hr = E_NOINTERFACE; - } - } - - if(SUCCEEDED(hr)) { - AddRef(); - *ppvObject = pObject; - pObject = nullptr; - } - - return hr; - } - - HRESULT CXHR2DataStream::GetTypeInfoCount(unsigned int FAR* pctinfo) - { - HRESULT hr = E_NOTIMPL; - - if(pctinfo) - *pctinfo = 0; - - return hr; - } - - HRESULT CXHR2DataStream::GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo) - { - HRESULT hr = E_NOTIMPL; - - if(ppTInfo) - *ppTInfo = 0; - - UNREFERENCED_PARAMETER(iTInfo); - UNREFERENCED_PARAMETER(lcid); - - return hr; - } - - HRESULT CXHR2DataStream::GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId) - { - HRESULT hr = DISP_E_UNKNOWNNAME; - - UNREFERENCED_PARAMETER(riid); - UNREFERENCED_PARAMETER(rgszNames); - UNREFERENCED_PARAMETER(cNames); - UNREFERENCED_PARAMETER(lcid); - UNREFERENCED_PARAMETER(rgDispId); - - return hr; - } - - HRESULT CXHR2DataStream::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) - { - HRESULT hr = S_OK; - - UNREFERENCED_PARAMETER(dispIdMember); - UNREFERENCED_PARAMETER(riid); - UNREFERENCED_PARAMETER(lcid); - UNREFERENCED_PARAMETER(wFlags); - UNREFERENCED_PARAMETER(pDispParams); - UNREFERENCED_PARAMETER(pVarResult); - UNREFERENCED_PARAMETER(pExcepInfo); - UNREFERENCED_PARAMETER(puArgErr); - - return hr; - } - - - // HttpConnection - HttpConnection::HttpConnection() : - _isInitialized(false), - _spXhr(nullptr), - _spXhrCallback(nullptr), - _spXhrRequestData(nullptr), - _pRequest(nullptr), - _timeOutInMs(0) - { - } - - HttpConnection::~HttpConnection() - { - } - - bool HttpConnection::init(HttpRequest *pRequest, DWORD timeOutInMs) - { - if (_isInitialized || nullptr == pRequest) { - return _isInitialized; - } - - HRESULT hr = CoInitializeEx(NULL, NULL); - - if (SUCCEEDED(hr)) { - hr = CoCreateInstance(CLSID_FreeThreadedXMLHTTP60, NULL, CLSCTX_SERVER, IID_PPV_ARGS(&_spXhr)); - } - - if (SUCCEEDED(hr)) { - hr = MakeAndInitialize(&_spXhrCallback); - } - - if(SUCCEEDED(hr)) { - _pRequest = pRequest; - _timeOutInMs = timeOutInMs; - - LONG size = _pRequest->getRequestDataSize(); - - if(size > 0) { - _spXhrRequestData = Make(); - hr = _spXhrRequestData->Init(_pRequest->getRequestData(), size); - } - } - - return _isInitialized = SUCCEEDED(hr); - } - - bool HttpConnection::open(const std::string& verb) - { - return open(verb, false, ""); - } - - bool HttpConnection::open(const std::string& verb, bool userAuthentication) - { - return open(verb, userAuthentication, ""); - } - - bool HttpConnection::open(const std::string& verb, const std::string& cookieFile) - { - return open(verb, false, cookieFile); - } - - bool HttpConnection::open(const std::string& verb, bool userAuthentication, const std::string& cookieFile) - { - if (!_isInitialized) { - return false; - } - - std::wstring method(verb.begin(), verb.end()); - std::string url(_pRequest->getUrl()); - std::wstring wUrl(url.begin(), url.end()); - HRESULT hr = _spXhr->Open(method.c_str(), wUrl.c_str(), _spXhrCallback.Get(), NULL, NULL, NULL, NULL); - - if(SUCCEEDED(hr) && _timeOutInMs != 0) { - hr = _spXhr->SetProperty(XHR_PROP_TIMEOUT, _timeOutInMs); - } - -#if 0 - if(SUCCEEDED(hr)) { - hr = _spXhr->SetProperty(XHR_PROP_ONDATA_THRESHOLD, READ_BUFFER_MAX); - } -#endif - - auto headers = _pRequest->getHeaders(); - formatHeaders(headers); - - for(auto header : headers) - { - std::string key = header.substr(0, header.find_first_of(':')); - std::string value = header.substr(header.find_first_of(':') + 1, header.size() - 1); - if(SUCCEEDED(hr)) { - hr = _spXhr->SetRequestHeader(std::wstring(key.begin(), key.end()).c_str(), std::wstring(value.begin(), value.end()).c_str()); - } - } - - if(SUCCEEDED(hr) && userAuthentication) { - std::string authHeaders = std::accumulate(headers.begin(), headers.end(), std::string("")); - hr = authenticateUser(verb, url, authHeaders); - } - - if(SUCCEEDED(hr) && !cookieFile.empty()) { - hr = processCookieFile(url, cookieFile); - } - - if(FAILED(hr)) { - cancelRequest(hr); - } - - return SUCCEEDED(hr); - } - - HRESULT HttpConnection::authenticateUser(const std::string& verb, const std::string& url, const std::string& headers) - { - HRESULT hr = S_OK; - std::string authToken; - std::string authSig; - std::string authBody; - - if(_pRequest->getRequestDataSize() > 0) - authBody = _pRequest->getRequestData(); - - if(getAuthenticationToken(verb, url, headers, authBody, authToken, authSig)) { - hr = _spXhr->SetRequestHeader(L"Authorization", std::wstring(authToken.begin(), authToken.end()).c_str()); - - if(SUCCEEDED(hr)) { - hr = _spXhr->SetRequestHeader(L"Signature", std::wstring(authSig.begin(), authSig.end()).c_str()); - } - } - else - { - hr = INET_E_AUTHENTICATION_REQUIRED; - } - - return hr; - } - - HRESULT HttpConnection::processCookieFile(const std::string& url, const std::string& cookieFile) - { - HRESULT hr = S_OK; - - HttpCookie cookie; - cookie.setCookieFileName(cookieFile); - auto cookies = cookie.getCookies(); - std::string cookieInfo = ""; - int cCnt = 0; - - for(auto& cookie : *cookies) - { - if(url.find(cookie.domain) != std::string::npos) - { - std::string keyVal = cookie.name; - keyVal.append("="); - keyVal.append(cookie.value); - if(cCnt != 0) { - cookieInfo.append(";"); - } - cookieInfo.append(keyVal); - cCnt++; - } - } - - if(!cookieInfo.empty() && nullptr != _spXhr) { - hr = _spXhr->SetRequestHeader(L"Cookie", std::wstring(cookieInfo.begin(), cookieInfo.end()).c_str()); - } - - return hr; - } - - bool HttpConnection::send() - { - if (!_isInitialized) { - return false; - } - - HRESULT hr = E_FAIL; - - if(nullptr == _spXhrRequestData) { - hr = _spXhr->Send(NULL, 0); - } - else { - hr = _spXhr->Send(_spXhrRequestData.Get(), _spXhrRequestData->Length()); - } - - if(SUCCEEDED(hr)) { - DWORD status = 0; - hr = _spXhrCallback->WaitForComplete(&status); - } - else { - cancelRequest(hr); - } - - return SUCCEEDED(hr); - } - - DWORD HttpConnection::getStatusCode() - { - return _spXhrCallback != nullptr ? _spXhrCallback->_statusCode : 500; - } - - std::string HttpConnection::getErrorMessage() - { - return _spXhrCallback != nullptr ? _spXhrCallback->_errorMsg : ERR_MSG_500; - } - - std::vector* HttpConnection::getResponseHeader() - { - return _spXhrCallback != nullptr ? &_spXhrCallback->_headers : nullptr; - } - - std::vector* HttpConnection::getResponseData() - { - return _spXhrCallback != nullptr ? &_spXhrCallback->_data : nullptr; - } - - void HttpConnection::cancelRequest(HRESULT hrError) - { - if(nullptr != _spXhr) { - _spXhr->Abort(); - _spXhrCallback->CompleteRequest(hrError); - } - } -} - -NS_CC_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/network/HttpConnection-winrt.h b/cocos/network/HttpConnection-winrt.h deleted file mode 100644 index 2b4d063d38c3..000000000000 --- a/cocos/network/HttpConnection-winrt.h +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 greathqy -Copyright (c) 2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "network/HttpRequest.h" -#include "network/HttpClient.h" - -#include -#include -#include -#include - -#include - -#include -#if defined(_XBOX_ONE) -#include -#else -#include -#endif -using namespace Microsoft::WRL; -using namespace Microsoft::WRL::Details; - -#include "base/CCVector.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" - -#include "platform/CCFileUtils.h" - -NS_CC_BEGIN - -namespace network { - - const int READ_BUFFER_MAX = 16 * 1024; - const int REQUEST_BUFFER_MAX = 4 * 1024 * 1024; - - const char ERR_MSG_500[] = "Internal server error"; - const char ERR_MSG_400[] = "Invalid request"; - const char ERR_MSG_401[] = "Authentication is required to access this resource"; - const char ERR_MSG_403[] = "Forbidden"; - const char ERR_MSG_404[] = "Specified resource could not be found"; - const char ERR_MSG_407[] = "Proxy authentication failed"; - const char ERR_MSG_408[] = "Request timed out"; - const char ERR_MSG_412[] = "Request aborted"; - const char ERR_MSG_DL_FLD[] = "The download of the specified resource has failed"; - - class CXHR2Callback : public Microsoft::WRL::RuntimeClass, IXMLHTTPRequest2Callback> - { - public: - CXHR2Callback(); - ~CXHR2Callback(); - - HRESULT RuntimeClassInitialize(); - HRESULT ReadStreamData(ISequentialStream* pResponseStream); - STDMETHODIMP OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl); - STDMETHODIMP OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus); - STDMETHODIMP OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); - STDMETHODIMP OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); - STDMETHODIMP OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError); - STDMETHODIMP WaitForComplete(PDWORD pdwStatus); - - protected: - void CompleteRequest(HRESULT hrError); - - private: - HANDLE _hWfC; - DWORD _statusCode; - std::string _errorMsg; - std::vector _headers; - std::vector _data; - - friend class HttpConnection; - }; - - class CXHR2DataStream : public Microsoft::WRL::RuntimeClass, ISequentialStream, IDispatch> - { - public: - CXHR2DataStream(); - ~CXHR2DataStream(); - - STDMETHODIMP_(ULONG) Length(); - STDMETHODIMP Init(const void *psBuffer, ULONG cbBufferSize); - - STDMETHODIMP Read(void *pv, ULONG cb, ULONG *pcbRead); - STDMETHODIMP Write(const void *pv, ULONG cb, ULONG *pcbWritten); - - STDMETHODIMP_(ULONG) AddRef(); - STDMETHODIMP_(ULONG) Release(); - STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject); - - STDMETHODIMP GetTypeInfoCount(unsigned int FAR* pctinfo); - STDMETHODIMP GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo); - STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId); - STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr); - - private: - ULONG _refCnt; - BYTE* _pData; - ULONG _dataSize; - ULONG _seekIndex; - }; - - class HttpConnection - { - public: - HttpConnection(); - ~HttpConnection(); - - bool init(HttpRequest *pRequest, DWORD timeOutInMs = 0); - bool open(const std::string& verb); - bool open(const std::string& verb, bool userAuthentication); - bool open(const std::string& verb, const std::string& cookieFile); - bool open(const std::string& verb, bool userAuthentication, const std::string& cookieFile); - bool send(); - DWORD getStatusCode(); - std::string getErrorMessage(); - std::vector* getResponseHeader(); - std::vector* getResponseData(); - - protected: - void cancelRequest(HRESULT hrError); - HRESULT authenticateUser(const std::string& verb, const std::string& url, const std::string& headers); - HRESULT processCookieFile(const std::string& url, const std::string& cookieFile); - - private: - bool _isInitialized; - ComPtr _spXhr; - ComPtr _spXhrCallback; - ComPtr _spXhrRequestData; - DWORD _timeOutInMs; - cocos2d::network::HttpRequest* _pRequest; - }; -} - -NS_CC_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/network/HttpRequest.h b/cocos/network/HttpRequest.h index cde7c7fcce32..bba00aae1f39 100644 --- a/cocos/network/HttpRequest.h +++ b/cocos/network/HttpRequest.h @@ -56,12 +56,6 @@ typedef void (cocos2d::Ref::*SEL_HttpResponse)(HttpClient* client, HttpResponse* * @lua NA */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#ifdef DELETE -#undef DELETE -#endif -#endif - class CC_DLL HttpRequest : public Ref { public: @@ -237,18 +231,6 @@ class CC_DLL HttpRequest : public Ref return _pUserData; } - /** - * Set the target and related callback selector. - * When response come back, it would call (pTarget->*pSelector) to process something. - * - * @param pTarget the target object pointer. - * @param pSelector the callback function. - */ - CC_DEPRECATED_ATTRIBUTE void setResponseCallback(Ref* pTarget, SEL_CallFuncND pSelector) - { - doSetResponseCallback(pTarget, (SEL_HttpResponse)pSelector); - } - /** * Set the target and related callback selector of HttpRequest object. * When response come back, we would call (pTarget->*pSelector) to process response data. @@ -294,7 +276,6 @@ class CC_DLL HttpRequest : public Ref /** Destructor. */ ~_prxy(){}; operator SEL_HttpResponse() const { return _cb; } - CC_DEPRECATED_ATTRIBUTE operator SEL_CallFuncND() const { return (SEL_CallFuncND) _cb; } protected: SEL_HttpResponse _cb; }; diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index fab86d3889f0..70bcb82318f7 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -1189,11 +1189,6 @@ void SocketIO::destroyInstance() CC_SAFE_DELETE(_inst); } -SIOClient* SocketIO::connect(SocketIO::SIODelegate& delegate, const std::string& uri) -{ - return SocketIO::connect(uri, delegate); -} - SIOClient* SocketIO::connect(const std::string& uri, SocketIO::SIODelegate& delegate) { return SocketIO::connect(uri, delegate, ""); diff --git a/cocos/network/SocketIO.h b/cocos/network/SocketIO.h index 9bd191e33df2..20c1121ff1da 100644 --- a/cocos/network/SocketIO.h +++ b/cocos/network/SocketIO.h @@ -166,14 +166,6 @@ class CC_DLL SocketIO */ static SIOClient* connect(const std::string& uri, SocketIO::SIODelegate& delegate, const std::string& caFilePath); - /** - * Static client creation method, similar to socketio.connect(uri) in JS. - * @param delegate the delegate which want to receive events from the socket.io client. - * @param uri the URI of the socket.io server. - * @return SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr. - */ - CC_DEPRECATED_ATTRIBUTE static SIOClient* connect(SocketIO::SIODelegate& delegate, const std::string& uri); - private: SocketIO(); diff --git a/cocos/physics/CCPhysicsShape.cpp b/cocos/physics/CCPhysicsShape.cpp index fc01ff84efb3..c564323e87f1 100644 --- a/cocos/physics/CCPhysicsShape.cpp +++ b/cocos/physics/CCPhysicsShape.cpp @@ -296,11 +296,6 @@ Vec2 PhysicsShape::getPolygonCenter(const Vec2* points, int count) return PhysicsHelper::cpv2point(center); } -Vec2 PhysicsShape::getPolyonCenter(const Vec2* points, int count) -{ - return getPolygonCenter(points, count); -} - void PhysicsShape::setBody(PhysicsBody *body) { // already added diff --git a/cocos/physics/CCPhysicsShape.h b/cocos/physics/CCPhysicsShape.h index ab1d0836536a..e71a5207f265 100644 --- a/cocos/physics/CCPhysicsShape.h +++ b/cocos/physics/CCPhysicsShape.h @@ -274,9 +274,6 @@ class CC_DLL PhysicsShape : public Ref * @return A Vec2 object. */ static Vec2 getPolygonCenter(const Vec2* points, int count); - - /** @deprecated use getPolygonCenter() instead */ - CC_DEPRECATED_ATTRIBUTE static Vec2 getPolyonCenter(const Vec2* points, int count); /** * Set a mask that defines which categories this physics body belongs to. diff --git a/cocos/physics/CCPhysicsWorld.cpp b/cocos/physics/CCPhysicsWorld.cpp index cd6effd739f2..ba0656d6c27a 100644 --- a/cocos/physics/CCPhysicsWorld.cpp +++ b/cocos/physics/CCPhysicsWorld.cpp @@ -488,7 +488,7 @@ bool PhysicsWorld::init() { do { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 _cpSpace = cpSpaceNew(); #else _cpSpace = cpHastySpaceNew(); @@ -903,7 +903,7 @@ void PhysicsWorld::update(float delta, bool userCall/* = false*/) if (userCall) { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 cpSpaceStep(_cpSpace, delta); #else cpHastySpaceStep(_cpSpace, delta); @@ -919,7 +919,7 @@ void PhysicsWorld::update(float delta, bool userCall/* = false*/) while(_updateTime>step) { _updateTime-=step; -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 cpSpaceStep(_cpSpace, dt); #else cpHastySpaceStep(_cpSpace, dt); @@ -933,7 +933,7 @@ void PhysicsWorld::update(float delta, bool userCall/* = false*/) const float dt = _updateTime * _speed / _substeps; for (int i = 0; i < _substeps; ++i) { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 cpSpaceStep(_cpSpace, dt); #else cpHastySpaceStep(_cpSpace, dt); @@ -1000,7 +1000,7 @@ PhysicsWorld::~PhysicsWorld() removeAllBodies(); if (_cpSpace) { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 cpSpaceFree(_cpSpace); #else cpHastySpaceFree(_cpSpace); diff --git a/cocos/platform/CCApplication.h b/cocos/platform/CCApplication.h index 00950cc9e694..9c1b01d07f01 100644 --- a/cocos/platform/CCApplication.h +++ b/cocos/platform/CCApplication.h @@ -38,12 +38,8 @@ THE SOFTWARE. #include "platform/android/CCApplication-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCApplication-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCApplication.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCApplication-linux.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#include "platform/tizen/CCApplication-tizen.h" #endif /// @endcond diff --git a/cocos/platform/CCApplicationProtocol.h b/cocos/platform/CCApplicationProtocol.h index 09d5f39309ee..7020611d01b0 100644 --- a/cocos/platform/CCApplicationProtocol.h +++ b/cocos/platform/CCApplicationProtocol.h @@ -28,7 +28,6 @@ THE SOFTWARE. #define __CC_APPLICATION_PROTOCOL_H__ #include "platform/CCPlatformMacros.h" -#include "base/CCScriptSupport.h" #include "base/CCAutoreleasePool.h" #include "base/ccTypes.h" @@ -53,13 +52,13 @@ class CC_DLL ApplicationProtocol OS_MAC, /**< Mac OS X*/ OS_ANDROID, /**< Android */ OS_IPHONE, /**< iPhone */ - OS_IPAD, /**< iPad */ - OS_BLACKBERRY, /**< BlackBerry */ - OS_NACL, /**< Native Client in Chrome */ - OS_EMSCRIPTEN, /**< Emscripten */ - OS_TIZEN, /**< Tizen */ - OS_WINRT, /**< Windows Runtime Applications */ - OS_WP8 /**< Windows Phone 8 Applications */ + OS_IPAD /**< iPad */ + // OS_BLACKBERRY, /**< BlackBerry */ + // OS_NACL, /**< Native Client in Chrome */ + // OS_EMSCRIPTEN, /**< Emscripten */ + // OS_TIZEN, /**< Tizen */ + // OS_WINRT, /**< Windows Runtime Applications */ + // OS_WP8 /**< Windows Phone 8 Applications */ }; /** @@ -67,9 +66,6 @@ class CC_DLL ApplicationProtocol * @lua NA */ virtual ~ApplicationProtocol(){ -#if CC_ENABLE_SCRIPT_BINDING - ScriptEngineManager::destroyInstance(); -#endif /** clean auto release pool. */ PoolManager::destroyInstance(); } @@ -104,7 +100,6 @@ class CC_DLL ApplicationProtocol * @lua NA */ virtual void setAnimationInterval(float interval) = 0; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) = 0; /** Subclass override the function to set OpenGL context attribution instead of use default value. * And now can only set six attributions:redBits,greenBits,blueBits,alphaBits,depthBits,stencilBits. diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index 50e604f626b1..2bcfb1414dce 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -624,6 +624,7 @@ void FileUtils::purgeCachedEntries() { DECLARE_GUARD; _fullPathCache.clear(); + _fullPathCacheDir.clear(); } std::string FileUtils::getStringFromFile(const std::string& filename) const @@ -669,20 +670,21 @@ FileUtils::Status FileUtils::getContents(const std::string& filename, ResizableB if (fullPath.empty()) return Status::NotExists; - FILE *fp = fopen(fs->getSuitableFOpen(fullPath).c_str(), "rb"); - if (!fp) - return Status::OpenFailed; + std::string suitableFullPath = fs->getSuitableFOpen(fullPath); -#if defined(_MSC_VER) - auto descriptor = _fileno(fp); -#else - auto descriptor = fileno(fp); -#endif struct stat statBuf; - if (fstat(descriptor, &statBuf) == -1) { - fclose(fp); + if (stat(suitableFullPath.c_str(), &statBuf) == -1) { return Status::ReadFailed; } + + if (!(statBuf.st_mode & S_IFREG)) { + return Status::NotRegularFileType; + } + + FILE *fp = fopen(suitableFullPath.c_str(), "rb"); + if (!fp) + return Status::OpenFailed; + size_t size = statBuf.st_size; buffer->resize(size); @@ -697,20 +699,6 @@ FileUtils::Status FileUtils::getContents(const std::string& filename, ResizableB return Status::OK; } -unsigned char* FileUtils::getFileData(const std::string& filename, const char* mode, ssize_t *size) const -{ - CCASSERT(!filename.empty() && size != nullptr && mode != nullptr, "Invalid parameters."); - (void)(mode); // mode is unused, as we do not support text mode any more... - - Data d; - if (getContents(filename, &d) != Status::OK) { - *size = 0; - return nullptr; - } - - return d.takeBuffer(size); -} - unsigned char* FileUtils::getFileDataFromZip(const std::string& zipFilePath, const std::string& filename, ssize_t *size) const { unsigned char * buffer = nullptr; @@ -807,7 +795,7 @@ std::string FileUtils::getPathForFilename(const std::string& filename, const std path += file_path; path += resolutionDirectory; - path = getFullPathForDirectoryAndFilename(path, file); + path = getFullPathForFilenameWithinDirectory(path, file); return path; } @@ -863,6 +851,60 @@ std::string FileUtils::fullPathForFilename(const std::string &filename) const return ""; } + +std::string FileUtils::fullPathForDirectory(const std::string &dir) const +{ + DECLARE_GUARD; + + if (dir.empty()) + { + return ""; + } + + if (isAbsolutePath(dir)) + { + return dir; + } + + // Already Cached ? + auto cacheIter = _fullPathCacheDir.find(dir); + if(cacheIter != _fullPathCacheDir.end()) + { + return cacheIter->second; + } + std::string longdir = dir; + std::string fullpath; + + if(longdir[longdir.length() - 1] != '/') + { + longdir +="/"; + } + + for (const auto& searchIt : _searchPathArray) + { + for (const auto& resolutionIt : _searchResolutionsOrderArray) + { + fullpath = searchIt + longdir + resolutionIt; + auto exists = isDirectoryExistInternal(fullpath); + + if (exists && !fullpath.empty()) + { + // Using the filename passed in as key. + _fullPathCacheDir.emplace(dir, fullpath); + return fullpath; + } + + } + } + + if(isPopupNotify()){ + CCLOG("cocos2d: fullPathForDirectory: No directory found at %s. Possible missing directory.", dir.c_str()); + } + + // The file wasn't found, return empty string. + return ""; +} + std::string FileUtils::fullPathFromRelativeFile(const std::string &filename, const std::string &relativeFile) const { return relativeFile.substr(0, relativeFile.rfind('/')+1) + getNewFilename(filename); @@ -880,6 +922,7 @@ void FileUtils::setSearchResolutionsOrder(const std::vector& search bool existDefault = false; _fullPathCache.clear(); + _fullPathCacheDir.clear(); _searchResolutionsOrderArray.clear(); for(const auto& iter : searchResolutionsOrder) { @@ -955,6 +998,7 @@ void FileUtils::setDefaultResourceRootPath(const std::string& path) if (_defaultResRootPath != path) { _fullPathCache.clear(); + _fullPathCacheDir.clear(); _defaultResRootPath = path; if (!_defaultResRootPath.empty() && _defaultResRootPath[_defaultResRootPath.length()-1] != '/') { @@ -973,6 +1017,7 @@ void FileUtils::setSearchPaths(const std::vector& searchPaths) _originalSearchPaths = searchPaths; _fullPathCache.clear(); + _fullPathCacheDir.clear(); _searchPathArray.clear(); for (const auto& path : _originalSearchPaths) @@ -1029,6 +1074,7 @@ void FileUtils::setFilenameLookupDictionary(const ValueMap& filenameLookupDict) { DECLARE_GUARD; _fullPathCache.clear(); + _fullPathCacheDir.clear(); _filenameLookupDict = filenameLookupDict; } @@ -1052,7 +1098,7 @@ void FileUtils::loadFilenameLookupDictionaryFromFile(const std::string &filename } } -std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const +std::string FileUtils::getFullPathForFilenameWithinDirectory(const std::string& directory, const std::string& filename) const { // get directory+filename, safely adding '/' as necessary std::string ret = directory; @@ -1060,9 +1106,8 @@ std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& dir ret += '/'; } ret += filename; - // if the file doesn't exist, return an empty string - if (!isFileExistInternal(ret) && !isDirectoryExistInternal(ret)) { + if (!isFileExistInternal(ret)) { ret = ""; } return ret; @@ -1109,8 +1154,8 @@ bool FileUtils::isDirectoryExist(const std::string& dirPath) const } // Already Cached ? - auto cacheIter = _fullPathCache.find(dirPath); - if( cacheIter != _fullPathCache.end() ) + auto cacheIter = _fullPathCacheDir.find(dirPath); + if( cacheIter != _fullPathCacheDir.end() ) { return isDirectoryExistInternal(cacheIter->second); } @@ -1121,10 +1166,10 @@ bool FileUtils::isDirectoryExist(const std::string& dirPath) const for (const auto& resolutionIt : _searchResolutionsOrderArray) { // searchPath + file_path + resourceDirectory - fullpath = fullPathForFilename(searchIt + dirPath + resolutionIt); + fullpath = fullPathForDirectory(searchIt + dirPath + resolutionIt); if (isDirectoryExistInternal(fullpath)) { - _fullPathCache.emplace(dirPath, fullpath); + _fullPathCacheDir.emplace(dirPath, fullpath); return true; } } @@ -1187,7 +1232,7 @@ void FileUtils::getFileSize(const std::string &filepath, std::function)> callback) const { - auto fullPath = fullPathForFilename(dirPath); + auto fullPath = fullPathForDirectory(dirPath); performOperationOffthread([fullPath]() { return FileUtils::getInstance()->listFiles(fullPath); }, std::move(callback)); @@ -1195,7 +1240,7 @@ void FileUtils::listFilesAsync(const std::string& dirPath, std::function)> callback) const { - auto fullPath = fullPathForFilename(dirPath); + auto fullPath = fullPathForDirectory(dirPath); performOperationOffthread([fullPath]() { std::vector retval; FileUtils::getInstance()->listFilesRecursively(fullPath, &retval); @@ -1203,7 +1248,7 @@ void FileUtils::listFilesRecursivelyAsync(const std::string& dirPath, std::funct }, std::move(callback)); } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) // windows os implement should override in platform specific FileUtiles class bool FileUtils::isDirectoryExistInternal(const std::string& dirPath) const { @@ -1458,7 +1503,7 @@ long FileUtils::getFileSize(const std::string &filepath) const std::vector FileUtils::listFiles(const std::string& dirPath) const { std::vector files; - std::string fullpath = fullPathForFilename(dirPath); + std::string fullpath = fullPathForDirectory(dirPath); if (isDirectoryExist(fullpath)) { tinydir_dir dir; @@ -1496,7 +1541,7 @@ std::vector FileUtils::listFiles(const std::string& dirPath) const void FileUtils::listFilesRecursively(const std::string& dirPath, std::vector *files) const { - std::string fullpath = fullPathForFilename(dirPath); + std::string fullpath = fullPathForDirectory(dirPath); if (isDirectoryExist(fullpath)) { tinydir_dir dir; diff --git a/cocos/platform/CCFileUtils.h b/cocos/platform/CCFileUtils.h index b21e58818f32..9faffd83c0bf 100644 --- a/cocos/platform/CCFileUtils.h +++ b/cocos/platform/CCFileUtils.h @@ -147,12 +147,6 @@ class CC_DLL FileUtils */ static void setDelegate(FileUtils *delegate); - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static FileUtils* sharedFileUtils() { return getInstance(); } - - /** @deprecated Use destroyInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static void purgeFileUtils() { destroyInstance(); } - /** * The destructor of FileUtils. * @js NA @@ -203,7 +197,8 @@ class CC_DLL FileUtils ReadFailed = 3, // Read failed NotInitialized = 4, // FileUtils is not initializes TooLarge = 5, // The file is too large (great than 2^32-1) - ObtainSizeFailed = 6 // Failed to obtain the file size. + ObtainSizeFailed = 6, // Failed to obtain the file size. + NotRegularFileType = 7 // File type is not S_IFREG }; /** @@ -273,17 +268,6 @@ class CC_DLL FileUtils } virtual Status getContents(const std::string& filename, ResizableBuffer* buffer) const; - /** - * Gets resource file data - * - * @param[in] filename The resource file name which contains the path. - * @param[in] mode The read mode of the file. - * @param[out] size If the file read operation succeeds, it will be the data size, otherwise 0. - * @return Upon success, a pointer to the data is returned, otherwise NULL. - * @warning Recall: you are responsible for calling free() on any Non-NULL pointer returned. - */ - CC_DEPRECATED_ATTRIBUTE virtual unsigned char* getFileData(const std::string& filename, const char* mode, ssize_t *size) const; - /** * Gets resource file data from a zip file. * @@ -342,6 +326,7 @@ class CC_DLL FileUtils */ virtual std::string fullPathForFilename(const std::string &filename) const; + /** * Loads the filenameLookup dictionary from the contents of a filename. * @@ -904,8 +889,14 @@ class CC_DLL FileUtils * @param filename The name of the file. * @return The full path of the file, if the file can't be found, it will return an empty string. */ - virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const; + virtual std::string getFullPathForFilenameWithinDirectory(const std::string& directory, const std::string& filename) const; + + /** + * Returns the fullpath for a given dirname. + * @since 3.17.1 + */ + virtual std::string fullPathForDirectory(const std::string &dirname) const; /** * mutex used to protect fields. @@ -949,11 +940,17 @@ class CC_DLL FileUtils std::string _defaultResRootPath; /** - * The full path cache. When a file is found, it will be added into this cache. + * The full path cache for normal files. When a file is found, it will be added into this cache. * This variable is used for improving the performance of file search. */ mutable std::unordered_map _fullPathCache; + /** + * The full path cache for directories. When a diretory is found, it will be added into this cache. + * This variable is used for improving the performance of file search. + */ + mutable std::unordered_map _fullPathCacheDir; + /** * Writable path. */ diff --git a/cocos/platform/CCGL.h b/cocos/platform/CCGL.h index 013fe09e0973..cce37da89389 100644 --- a/cocos/platform/CCGL.h +++ b/cocos/platform/CCGL.h @@ -38,12 +38,8 @@ THE SOFTWARE. #include "platform/android/CCGL-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCGL-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCGL.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCGL-linux.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#include "platform/tizen/CCGL-tizen.h" #endif /// @endcond diff --git a/cocos/platform/CCGLView.cpp b/cocos/platform/CCGLView.cpp index 4e84bda09d35..33ab4794bc16 100644 --- a/cocos/platform/CCGLView.cpp +++ b/cocos/platform/CCGLView.cpp @@ -32,8 +32,6 @@ THE SOFTWARE. #include "2d/CCCamera.h" #include "2d/CCScene.h" #include "renderer/CCRenderer.h" -#include "vr/CCVRProtocol.h" -#include "vr/CCVRGenericRenderer.h" NS_CC_BEGIN @@ -110,7 +108,6 @@ GLView::GLView() , _scaleX(1.0f) , _scaleY(1.0f) , _resolutionPolicy(ResolutionPolicy::UNKNOWN) -, _vrImpl(nullptr) { } @@ -119,11 +116,6 @@ GLView::~GLView() } -void GLView::pollInputEvents() -{ - pollEvents(); -} - void GLView::pollEvents() { } @@ -173,7 +165,8 @@ void GLView::updateDesignResolutionSize() // A default viewport is needed in order to display the FPS, // since the FPS are rendered in the Director, and there is no viewport there. // Everything, including the FPS should renderer in the Scene. - glViewport(0, 0, _screenSize.width, _screenSize.height); + //TODO: minggo +// glViewport(0, 0, _screenSize.width, _screenSize.height); } } @@ -252,34 +245,38 @@ Vec2 GLView::getVisibleOrigin() const void GLView::setViewPortInPoints(float x , float y , float w , float h) { - experimental::Viewport vp((float)(x * _scaleX + _viewPortRect.origin.x), - (float)(y * _scaleY + _viewPortRect.origin.y), - (float)(w * _scaleX), - (float)(h * _scaleY)); + Viewport vp; + vp.x = x * _scaleX + _viewPortRect.origin.x; + vp.y = y * _scaleY + _viewPortRect.origin.y; + vp.w = w * _scaleX; + vp.h = h * _scaleY; Camera::setDefaultViewport(vp); } void GLView::setScissorInPoints(float x , float y , float w , float h) { - glScissor((GLint)(x * _scaleX + _viewPortRect.origin.x), - (GLint)(y * _scaleY + _viewPortRect.origin.y), - (GLsizei)(w * _scaleX), - (GLsizei)(h * _scaleY)); + auto renderer = Director::getInstance()->getRenderer(); + renderer->setScissorRect((GLint)(x * _scaleX + _viewPortRect.origin.x), + (GLint)(y * _scaleY + _viewPortRect.origin.y), + (GLsizei)(w * _scaleX), + (GLsizei)(h * _scaleY)); } bool GLView::isScissorEnabled() { - return (GL_FALSE == glIsEnabled(GL_SCISSOR_TEST)) ? false : true; + auto renderer = Director::getInstance()->getRenderer(); + return renderer->getScissorTest(); } Rect GLView::getScissorRect() const { - GLfloat params[4]; - glGetFloatv(GL_SCISSOR_BOX, params); - float x = (params[0] - _viewPortRect.origin.x) / _scaleX; - float y = (params[1] - _viewPortRect.origin.y) / _scaleY; - float w = params[2] / _scaleX; - float h = params[3] / _scaleY; + auto renderer = Director::getInstance()->getRenderer(); + auto& rect = renderer->getScissorRect(); + + float x = (rect.x - _viewPortRect.origin.x) / _scaleX; + float y = (rect.y- _viewPortRect.origin.y) / _scaleY; + float w = rect.width/ _scaleX; + float h = rect.height / _scaleY; return Rect(x, y, w, h); } @@ -494,35 +491,7 @@ void GLView::renderScene(Scene* scene, Renderer* renderer) CCASSERT(scene, "Invalid Scene"); CCASSERT(renderer, "Invalid Renderer"); - if (_vrImpl) - { - _vrImpl->render(scene, renderer); - } - else - { - scene->render(renderer, Mat4::IDENTITY, nullptr); - } -} - -VRIRenderer* GLView::getVR() const -{ - return _vrImpl; -} - -void GLView::setVR(VRIRenderer* vrRenderer) -{ - if (_vrImpl != vrRenderer) - { - if (_vrImpl) { - _vrImpl->cleanup(); - delete _vrImpl; - } - - if (vrRenderer) - vrRenderer->setup(this); - - _vrImpl = vrRenderer; - } + scene->render(renderer, Mat4::IDENTITY, nullptr); } NS_CC_END diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 5752ad4ba3ff..b3f75291ea33 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -94,7 +94,7 @@ NS_CC_BEGIN class Scene; class Renderer; -class VRIRenderer; +class RendererBackend; /** * @addtogroup platform @@ -155,12 +155,6 @@ class CC_DLL GLView : public Ref /** The OpenGL context attrs. */ static GLContextAttrs _glContextAttrs; - - /** @deprecated - * Polls input events. Subclass must implement methods if platform - * does not provide event callbacks. - */ - CC_DEPRECATED_ATTRIBUTE virtual void pollInputEvents(); /** Polls the events. */ virtual void pollEvents(); @@ -420,6 +414,7 @@ class CC_DLL GLView : public Ref #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) virtual id getCocoaWindow() = 0; + virtual id getNSGLContext() = 0; // stevetranby: added #endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) */ /** @@ -427,14 +422,7 @@ class CC_DLL GLView : public Ref * This method is called directly by the Director */ void renderScene(Scene* scene, Renderer* renderer); - - /** - * Sets a VR renderer. - * if `vrrenderer` is `nullptr` VR will be disabled - */ - void setVR(VRIRenderer* vrrenderer); - VRIRenderer* getVR() const; - + protected: void updateDesignResolutionSize(); @@ -452,9 +440,6 @@ class CC_DLL GLView : public Ref float _scaleX; float _scaleY; ResolutionPolicy _resolutionPolicy; - - // VR stuff - VRIRenderer* _vrImpl; }; // end of platform group diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index 8e5c225a2db5..46a5aa3347dc 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -488,7 +488,7 @@ Image::Image() , _height(0) , _unpack(false) , _fileType(Format::UNKNOWN) -, _renderFormat(Texture2D::PixelFormat::NONE) +, _pixelFormat(Texture2D::PixelFormat::NONE) , _numberOfMipmaps(0) , _hasPremultipliedAlpha(false) { @@ -755,17 +755,17 @@ Image::Format Image::detectFormat(const unsigned char * data, ssize_t dataLen) int Image::getBitPerPixel() { - return Texture2D::getPixelFormatInfoMap().at(_renderFormat).bpp; + return Texture2D::getPixelFormatInfoMap().at(_pixelFormat).bpp; } bool Image::hasAlpha() { - return Texture2D::getPixelFormatInfoMap().at(_renderFormat).alpha; + return Texture2D::getPixelFormatInfoMap().at(_pixelFormat).alpha; } bool Image::isCompressed() { - return Texture2D::getPixelFormatInfoMap().at(_renderFormat).compressed; + return Texture2D::getPixelFormatInfoMap().at(_pixelFormat).compressed; } namespace @@ -827,106 +827,9 @@ namespace #endif // CC_USE_JPEG } -#if CC_USE_WIC -bool Image::decodeWithWIC(const unsigned char *data, ssize_t dataLen) -{ - bool bRet = false; - WICImageLoader img; - - if (img.decodeImageData(data, dataLen)) - { - _width = img.getWidth(); - _height = img.getHeight(); - - WICPixelFormatGUID format = img.getPixelFormat(); - - if (memcmp(&format, &GUID_WICPixelFormat8bppGray, sizeof(WICPixelFormatGUID)) == 0) - { - _renderFormat = Texture2D::PixelFormat::I8; - } - - if (memcmp(&format, &GUID_WICPixelFormat8bppAlpha, sizeof(WICPixelFormatGUID)) == 0) - { - _renderFormat = Texture2D::PixelFormat::AI88; - } - - if (memcmp(&format, &GUID_WICPixelFormat24bppRGB, sizeof(WICPixelFormatGUID)) == 0) - { - _renderFormat = Texture2D::PixelFormat::RGB888; - } - - if (memcmp(&format, &GUID_WICPixelFormat32bppRGBA, sizeof(WICPixelFormatGUID)) == 0) - { - _renderFormat = Texture2D::PixelFormat::RGBA8888; - } - - if (memcmp(&format, &GUID_WICPixelFormat32bppBGRA, sizeof(WICPixelFormatGUID)) == 0) - { - _renderFormat = Texture2D::PixelFormat::BGRA8888; - } - - _dataLen = img.getImageDataSize(); - - CCASSERT(_dataLen > 0, "Image: Decompressed data length is invalid"); - - _data = new (std::nothrow) unsigned char[_dataLen]; - bRet = (img.getImageData(_data, _dataLen) > 0); - - if (_renderFormat == Texture2D::PixelFormat::RGBA8888) { - premultipliedAlpha(); - } - } - - return bRet; -} - -bool Image::encodeWithWIC(const std::string& filePath, bool isToRGB, GUID containerFormat) -{ - // Save formats supported by WIC - WICPixelFormatGUID targetFormat = isToRGB ? GUID_WICPixelFormat24bppBGR : GUID_WICPixelFormat32bppBGRA; - unsigned char *pSaveData = nullptr; - int saveLen = _dataLen; - int bpp = 4; - - if (targetFormat == GUID_WICPixelFormat24bppBGR && _renderFormat == Texture2D::PixelFormat::RGBA8888) - { - bpp = 3; - saveLen = _width * _height * bpp; - pSaveData = new (std::nothrow) unsigned char[saveLen]; - int indL = 0, indR = 0; - - while (indL < saveLen && indR < _dataLen) - { - memcpy(&pSaveData[indL], &_data[indR], 3); - indL += 3; - indR += 4; - } - } - else - { - pSaveData = new (std::nothrow) unsigned char[saveLen]; - memcpy(pSaveData, _data, saveLen); - } - - for (int ind = 2; ind < saveLen; ind += bpp) { - std::swap(pSaveData[ind - 2], pSaveData[ind]); - } - - WICImageLoader img; - bool bRet = img.encodeImageData(filePath, pSaveData, saveLen, targetFormat, _width, _height, containerFormat); - - delete[] pSaveData; - return bRet; -} - - -#endif //CC_USE_WIC - bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen) { -#if CC_USE_WIC - return decodeWithWIC(data, dataLen); -#elif CC_USE_JPEG +#if CC_USE_JPEG /* these are standard libjpeg structures for reading(decompression) */ struct jpeg_decompress_struct cinfo; /* We use our private extension JPEG error handler. @@ -967,16 +870,16 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen) jpeg_read_header(&cinfo, TRUE); #else jpeg_read_header(&cinfo, TRUE); -#endif +#endif //(JPEG_LIB_VERSION >= 90) // we only support RGB or grayscale if (cinfo.jpeg_color_space == JCS_GRAYSCALE) { - _renderFormat = Texture2D::PixelFormat::I8; + _pixelFormat = Texture2D::PixelFormat::I8; }else { cinfo.out_color_space = JCS_RGB; - _renderFormat = Texture2D::PixelFormat::RGB888; + _pixelFormat = Texture2D::PixelFormat::RGB888; } /* Start decompression jpeg here */ @@ -1019,9 +922,7 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen) bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen) { -#if CC_USE_WIC - return decodeWithWIC(data, dataLen); -#elif CC_USE_PNG +#if CC_USE_PNG // length of bytes to check if it is a valid png file #define PNGSIGSIZE 8 bool ret = false; @@ -1046,9 +947,7 @@ bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen) info_ptr = png_create_info_struct(png_ptr); CC_BREAK_IF(!info_ptr); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA && CC_TARGET_PLATFORM != CC_PLATFORM_NACL && CC_TARGET_PLATFORM != CC_PLATFORM_TIZEN) CC_BREAK_IF(setjmp(png_jmpbuf(png_ptr))); -#endif // set the read call back function tImageSource imageSource; @@ -1104,16 +1003,16 @@ bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen) switch (color_type) { case PNG_COLOR_TYPE_GRAY: - _renderFormat = Texture2D::PixelFormat::I8; + _pixelFormat = Texture2D::PixelFormat::I8; break; case PNG_COLOR_TYPE_GRAY_ALPHA: - _renderFormat = Texture2D::PixelFormat::AI88; + _pixelFormat = Texture2D::PixelFormat::AI88; break; case PNG_COLOR_TYPE_RGB: - _renderFormat = Texture2D::PixelFormat::RGB888; + _pixelFormat = Texture2D::PixelFormat::RGB888; break; case PNG_COLOR_TYPE_RGB_ALPHA: - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; break; default: break; @@ -1273,9 +1172,7 @@ namespace bool Image::initWithTiffData(const unsigned char * data, ssize_t dataLen) { -#if CC_USE_WIC - return decodeWithWIC(data, dataLen); -#elif CC_USE_TIFF +#if CC_USE_TIFF bool ret = false; do { @@ -1305,7 +1202,7 @@ bool Image::initWithTiffData(const unsigned char * data, ssize_t dataLen) npixels = w * h; - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; _width = w; _height = h; @@ -1434,7 +1331,7 @@ bool Image::initWithPVRv2Data(const unsigned char * data, ssize_t dataLen) return false; } - _renderFormat = it->first; + _pixelFormat = it->first; int bpp = it->second.bpp; //Reset num of mipmaps @@ -1578,7 +1475,7 @@ bool Image::initWithPVRv3Data(const unsigned char * data, ssize_t dataLen) return false; } - _renderFormat = it->first; + _pixelFormat = it->first; int bpp = it->second.bpp; // flags @@ -1729,7 +1626,7 @@ bool Image::initWithETCData(const unsigned char * data, ssize_t dataLen) { //old opengl version has no define for GL_ETC1_RGB8_OES, add macro to make compiler happy. #ifdef GL_ETC1_RGB8_OES - _renderFormat = Texture2D::PixelFormat::ETC; + _pixelFormat = Texture2D::PixelFormat::ETC; _dataLen = dataLen - ETC_PKM_HEADER_SIZE; _data = static_cast(malloc(_dataLen * sizeof(unsigned char))); memcpy(_data, static_cast(data) + ETC_PKM_HEADER_SIZE, _dataLen); @@ -1745,7 +1642,7 @@ bool Image::initWithETCData(const unsigned char * data, ssize_t dataLen) //if it is not gles or device do not support ETC, decode texture by software int bytePerPixel = 3; unsigned int stride = _width * bytePerPixel; - _renderFormat = Texture2D::PixelFormat::RGB888; + _pixelFormat = Texture2D::PixelFormat::RGB888; _dataLen = _width * _height * bytePerPixel; _data = static_cast(malloc(_dataLen * sizeof(unsigned char))); @@ -1780,15 +1677,15 @@ bool Image::initWithTGAData(tImageTGA* tgaData) // unsupported RGB555 if (tgaData->pixelDepth == 16) { - _renderFormat = Texture2D::PixelFormat::RGB5A1; + _pixelFormat = Texture2D::PixelFormat::RGB5A1; } else if(tgaData->pixelDepth == 24) { - _renderFormat = Texture2D::PixelFormat::RGB888; + _pixelFormat = Texture2D::PixelFormat::RGB888; } else if(tgaData->pixelDepth == 32) { - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; } else { @@ -1801,7 +1698,7 @@ bool Image::initWithTGAData(tImageTGA* tgaData) // gray if (8 == tgaData->pixelDepth) { - _renderFormat = Texture2D::PixelFormat::I8; + _pixelFormat = Texture2D::PixelFormat::I8; } else { @@ -1899,18 +1796,18 @@ bool Image::initWithS3TCData(const unsigned char * data, ssize_t dataLen) if (FOURCC_DXT1 == header->ddsd.DUMMYUNIONNAMEN4.ddpfPixelFormat.fourCC) { - _renderFormat = Texture2D::PixelFormat::S3TC_DXT1; + _pixelFormat = Texture2D::PixelFormat::S3TC_DXT1; } else if (FOURCC_DXT3 == header->ddsd.DUMMYUNIONNAMEN4.ddpfPixelFormat.fourCC) { - _renderFormat = Texture2D::PixelFormat::S3TC_DXT3; + _pixelFormat = Texture2D::PixelFormat::S3TC_DXT3; } else if (FOURCC_DXT5 == header->ddsd.DUMMYUNIONNAMEN4.ddpfPixelFormat.fourCC) { - _renderFormat = Texture2D::PixelFormat::S3TC_DXT5; + _pixelFormat = Texture2D::PixelFormat::S3TC_DXT5; } } else { //will software decode - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; } /* load the mipmaps */ @@ -2048,13 +1945,13 @@ bool Image::initWithATITCData(const unsigned char *data, ssize_t dataLen) switch (header->glInternalFormat) { case CC_GL_ATC_RGB_AMD: - _renderFormat = Texture2D::PixelFormat::ATC_RGB; + _pixelFormat = Texture2D::PixelFormat::ATC_RGB; break; case CC_GL_ATC_RGBA_EXPLICIT_ALPHA_AMD: - _renderFormat = Texture2D::PixelFormat::ATC_EXPLICIT_ALPHA; + _pixelFormat = Texture2D::PixelFormat::ATC_EXPLICIT_ALPHA; break; case CC_GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: - _renderFormat = Texture2D::PixelFormat::ATC_INTERPOLATED_ALPHA; + _pixelFormat = Texture2D::PixelFormat::ATC_INTERPOLATED_ALPHA; break; default: break; @@ -2071,7 +1968,7 @@ bool Image::initWithATITCData(const unsigned char *data, ssize_t dataLen) int bytePerPixel = 4; unsigned int stride = width * bytePerPixel; - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; std::vector decodeImageData(stride * height); switch (header->glInternalFormat) @@ -2114,9 +2011,6 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen) #if CC_USE_WEBP bool ret = false; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - CCLOG("WEBP image format not supported on WinRT or WP8"); -#else do { WebPDecoderConfig config; @@ -2125,7 +2019,7 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen) if (config.input.width == 0 || config.input.height == 0) break; config.output.colorspace = config.input.has_alpha?MODE_rgbA:MODE_RGB; - _renderFormat = config.input.has_alpha?Texture2D::PixelFormat::RGBA8888:Texture2D::PixelFormat::RGB888; + _pixelFormat = config.input.has_alpha?Texture2D::PixelFormat::RGBA8888:Texture2D::PixelFormat::RGB888; _width = config.input.width; _height = config.input.height; @@ -2149,7 +2043,6 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen) ret = true; } while (0); -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) return ret; #else CCLOG("webp is not enabled, please enable it in ccConfig.h"); @@ -2168,7 +2061,7 @@ bool Image::initWithRawData(const unsigned char * data, ssize_t /*dataLen*/, int _height = height; _width = width; _hasPremultipliedAlpha = preMulti; - _renderFormat = Texture2D::PixelFormat::RGBA8888; + _pixelFormat = Texture2D::PixelFormat::RGBA8888; // only RGBA8888 supported int bytesPerComponent = 4; @@ -2188,7 +2081,7 @@ bool Image::initWithRawData(const unsigned char * data, ssize_t /*dataLen*/, int bool Image::saveToFile(const std::string& filename, bool isToRGB) { //only support for Texture2D::PixelFormat::RGB888 or Texture2D::PixelFormat::RGBA8888 uncompressed data - if (isCompressed() || (_renderFormat != Texture2D::PixelFormat::RGB888 && _renderFormat != Texture2D::PixelFormat::RGBA8888)) + if (isCompressed() || (_pixelFormat != Texture2D::PixelFormat::RGB888 && _pixelFormat != Texture2D::PixelFormat::RGBA8888)) { CCLOG("cocos2d: Image: saveToFile is only support for Texture2D::PixelFormat::RGB888 or Texture2D::PixelFormat::RGBA8888 uncompressed data for now"); return false; @@ -2214,9 +2107,7 @@ bool Image::saveToFile(const std::string& filename, bool isToRGB) bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB) { -#if CC_USE_WIC - return encodeWithWIC(filePath, isToRGB, GUID_ContainerFormatPng); -#elif CC_USE_PNG +#if CC_USE_PNG bool ret = false; do { @@ -2243,14 +2134,12 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB) png_destroy_write_struct(&png_ptr, nullptr); break; } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA && CC_TARGET_PLATFORM != CC_PLATFORM_NACL && CC_TARGET_PLATFORM != CC_PLATFORM_TIZEN) if (setjmp(png_jmpbuf(png_ptr))) { fclose(fp); png_destroy_write_struct(&png_ptr, &info_ptr); break; } -#endif png_init_io(png_ptr, fp); if (!isToRGB && hasAlpha()) @@ -2359,9 +2248,7 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB) bool Image::saveImageToJPG(const std::string& filePath) { -#if CC_USE_WIC - return encodeWithWIC(filePath, false, GUID_ContainerFormatJpeg); -#elif CC_USE_JPEG +#if CC_USE_JPEG bool ret = false; do { @@ -2451,7 +2338,7 @@ void Image::premultipliedAlpha() _hasPremultipliedAlpha = false; return; #else - CCASSERT(_renderFormat == Texture2D::PixelFormat::RGBA8888, "The pixel format should be RGBA8888!"); + CCASSERT(_pixelFormat == Texture2D::PixelFormat::RGBA8888, "The pixel format should be RGBA8888!"); unsigned int* fourBytes = (unsigned int*)_data; for(int i = 0; i < _width * _height; i++) diff --git a/cocos/platform/CCImage.h b/cocos/platform/CCImage.h index 6a7cebf20a53..303d16e2b765 100644 --- a/cocos/platform/CCImage.h +++ b/cocos/platform/CCImage.h @@ -31,10 +31,6 @@ THE SOFTWARE. #include "base/CCRef.h" #include "renderer/CCTexture2D.h" -#if CC_USE_WIC -#include "platform/winrt/WICImageLoader-winrt.h" -#endif - // premultiply alpha, or the effect will be wrong when using other pixel formats in Texture2D, // such as RGB888, RGB5A1 #define CC_RGB_PREMULTIPLY_ALPHA(vr, vg, vb, va) \ @@ -140,13 +136,12 @@ class CC_DLL Image : public Ref unsigned char * getData() { return _data; } ssize_t getDataLen() { return _dataLen; } Format getFileType() { return _fileType; } - Texture2D::PixelFormat getRenderFormat() { return _renderFormat; } + Texture2D::PixelFormat getPixelFormat() { return _pixelFormat; } int getWidth() { return _width; } int getHeight() { return _height; } int getNumberOfMipmaps() { return _numberOfMipmaps; } MipmapInfo* getMipmaps() { return _mipmaps; } bool hasPremultipliedAlpha() { return _hasPremultipliedAlpha; } - CC_DEPRECATED_ATTRIBUTE bool isPremultipliedAlpha() { return _hasPremultipliedAlpha; } std::string getFilePath() const { return _filePath; } int getBitPerPixel(); @@ -162,10 +157,6 @@ class CC_DLL Image : public Ref bool saveToFile(const std::string &filename, bool isToRGB = true); protected: -#if CC_USE_WIC - bool encodeWithWIC(const std::string& filePath, bool isToRGB, GUID containerFormat); - bool decodeWithWIC(const unsigned char *data, ssize_t dataLen); -#endif bool initWithJpgData(const unsigned char * data, ssize_t dataLen); bool initWithPngData(const unsigned char * data, ssize_t dataLen); bool initWithTiffData(const unsigned char * data, ssize_t dataLen); @@ -200,7 +191,7 @@ class CC_DLL Image : public Ref int _height; bool _unpack; Format _fileType; - Texture2D::PixelFormat _renderFormat; + Texture2D::PixelFormat _pixelFormat; MipmapInfo _mipmaps[MIPMAP_MAX]; // pointer to mipmap images int _numberOfMipmaps; // false if we can't auto detect the image is premultiplied or not. diff --git a/cocos/platform/CCPlatformConfig.h b/cocos/platform/CCPlatformConfig.h index 1b835bd1209a..7985f2ed1dc6 100644 --- a/cocos/platform/CCPlatformConfig.h +++ b/cocos/platform/CCPlatformConfig.h @@ -43,16 +43,16 @@ THE SOFTWARE. #define CC_PLATFORM_IOS 1 #define CC_PLATFORM_ANDROID 2 #define CC_PLATFORM_WIN32 3 -#define CC_PLATFORM_MARMALADE 4 +// #define CC_PLATFORM_MARMALADE 4 #define CC_PLATFORM_LINUX 5 -#define CC_PLATFORM_BADA 6 -#define CC_PLATFORM_BLACKBERRY 7 +// #define CC_PLATFORM_BADA 6 +// #define CC_PLATFORM_BLACKBERRY 7 #define CC_PLATFORM_MAC 8 -#define CC_PLATFORM_NACL 9 -#define CC_PLATFORM_EMSCRIPTEN 10 -#define CC_PLATFORM_TIZEN 11 -#define CC_PLATFORM_QT5 12 -#define CC_PLATFORM_WINRT 13 +// #define CC_PLATFORM_NACL 9 +// #define CC_PLATFORM_EMSCRIPTEN 10 +// #define CC_PLATFORM_TIZEN 11 +// #define CC_PLATFORM_QT5 12 +// #define CC_PLATFORM_WINRT 13 // Determine target platform by compile environment macro. #define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN @@ -87,53 +87,6 @@ THE SOFTWARE. #define CC_TARGET_PLATFORM CC_PLATFORM_LINUX #endif -// marmalade -#if defined(MARMALADE) -#undef CC_TARGET_PLATFORM -#define CC_TARGET_PLATFORM CC_PLATFORM_MARMALADE -#endif - -// bada -#if defined(SHP) -#undef CC_TARGET_PLATFORM -#define CC_TARGET_PLATFORM CC_PLATFORM_BADA -#endif - -// qnx -#if defined(__QNX__) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_BLACKBERRY -#endif - -// native client -#if defined(__native_client__) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_NACL -#endif - -// Emscripten -#if defined(EMSCRIPTEN) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_EMSCRIPTEN -#endif - -// tizen -#if defined(TIZEN) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_TIZEN -#endif - -// qt5 -#if defined(CC_TARGET_QT5) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_QT5 -#endif - -// WinRT (Windows 8.1 Store/Phone App) -#if defined(WINRT) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_WINRT -#endif ////////////////////////////////////////////////////////////////////////// // post configure @@ -150,11 +103,19 @@ THE SOFTWARE. #endif #endif // CC_PLATFORM_WIN32 -#if ((CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)) +#if ((CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)) #define CC_PLATFORM_MOBILE #else #define CC_PLATFORM_PC #endif +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + #define CC_USE_METAL +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + #define CC_USE_GLES +#else + #define CC_USE_GL +#endif + /// @endcond #endif // __BASE_CC_PLATFORM_CONFIG_H__ diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h index 18f87a133046..d82438eabb35 100644 --- a/cocos/platform/CCPlatformDefine.h +++ b/cocos/platform/CCPlatformDefine.h @@ -38,12 +38,8 @@ THE SOFTWARE. #include "platform/android/CCPlatformDefine-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCPlatformDefine-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCPlatformDefine-winrt.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCPlatformDefine-linux.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#include "platform/tizen/CCPlatformDefine-tizen.h" #endif /// @endcond diff --git a/cocos/platform/CCPlatformMacros.h b/cocos/platform/CCPlatformMacros.h index d28c6035c7d2..2c719c584a9a 100644 --- a/cocos/platform/CCPlatformMacros.h +++ b/cocos/platform/CCPlatformMacros.h @@ -86,13 +86,13 @@ CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \ * * @since v0.99.5 */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #define CC_ENABLE_CACHE_TEXTURE_DATA 1 #else #define CC_ENABLE_CACHE_TEXTURE_DATA 0 #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) /** Application will crash in glDrawElements function on some win32 computers and some android devices. * Indices should be bound again while drawing to avoid this bug. */ diff --git a/cocos/platform/CCStdC.h b/cocos/platform/CCStdC.h index 52ec32087627..21604f116344 100644 --- a/cocos/platform/CCStdC.h +++ b/cocos/platform/CCStdC.h @@ -37,12 +37,8 @@ THE SOFTWARE. #include "platform/android/CCStdC-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCStdC-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCStdC.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCStdC-linux.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN -#include "platform/tizen/CCStdC-tizen.h" #endif #endif /* __PLATFORM_CCSTDC_H__*/ diff --git a/cocos/platform/CCThread.cpp b/cocos/platform/CCThread.cpp deleted file mode 100644 index 05f2911c2f9d..000000000000 --- a/cocos/platform/CCThread.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCThread.h" - -NS_CC_BEGIN - -// iOS and Mac already has a Thread.mm -#if (CC_TARGET_PLATFORM != CC_PLATFORM_IOS && CC_TARGET_PLATFORM != CC_PLATFORM_MAC) - - -void* ThreadHelper::createAutoreleasePool() -{ - return nullptr; -} - -void ThreadHelper::releaseAutoreleasePool(void* /*autoreleasePool*/) -{ - -} - -#endif - -NS_CC_END diff --git a/cocos/platform/CCThread.h b/cocos/platform/CCThread.h deleted file mode 100644 index 45ae598484c4..000000000000 --- a/cocos/platform/CCThread.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_PLATFORM_THREAD_H__ -#define __CC_PLATFORM_THREAD_H__ -/// @cond DO_NOT_SHOW - -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -/* On iOS, should create autorelease pool when create a new thread - * and release it when the thread end. - */ - -class CC_DLL ThreadHelper -{ -public: - - /** Create an autorelease pool for objective-c codes. - * @js NA - * @lua NA - */ - static void* createAutoreleasePool(); - - /** - * @js NA - * @lua NA - */ - static void releaseAutoreleasePool(void *autoreleasePool); -}; - -// end of platform group -/// @} - -NS_CC_END - -/// @endcond -#endif // __CC_PLATFORM_THREAD_H__ diff --git a/cocos/platform/CMakeLists.txt b/cocos/platform/CMakeLists.txt index 14a43d3f53ec..c5c8ce171cf7 100644 --- a/cocos/platform/CMakeLists.txt +++ b/cocos/platform/CMakeLists.txt @@ -63,38 +63,37 @@ elseif(APPLE) set(COCOS_PLATFORM_SPECIFIC_SRC platform/apple/CCLock-apple.cpp platform/apple/CCFileUtils-apple.mm - platform/apple/CCThread-apple.mm platform/apple/CCDevice-apple.mm ) if(MACOSX) set(COCOS_PLATFORM_SPECIFIC_HEADER ${COCOS_PLATFORM_SPECIFIC_HEADER} platform/mac/CCStdC-mac.h + platform/mac/CCGLViewImpl-mac.h platform/mac/CCPlatformDefine-mac.h platform/mac/CCApplication-mac.h platform/mac/CCGL-mac.h - platform/desktop/CCGLViewImpl-desktop.h + # platform/desktop/CCGLViewImpl-desktop.h ) set(COCOS_PLATFORM_SPECIFIC_SRC ${COCOS_PLATFORM_SPECIFIC_SRC} platform/mac/CCApplication-mac.mm + platform/mac/CCGLViewImpl-mac.mm platform/mac/CCCommon-mac.mm platform/mac/CCDevice-mac.mm - platform/desktop/CCGLViewImpl-desktop.cpp + # platform/desktop/CCGLViewImpl-desktop.cpp ) elseif(IOS) set(COCOS_PLATFORM_SPECIFIC_HEADER ${COCOS_PLATFORM_SPECIFIC_HEADER} - platform/ios/CCGL-ios.h platform/ios/CCApplication-ios.h platform/ios/CCDirectorCaller-ios.h - platform/ios/CCESRenderer-ios.h - platform/ios/OpenGL_Internal-ios.h - platform/ios/CCPlatformDefine-ios.h - platform/ios/CCStdC-ios.h platform/ios/CCEAGLView-ios.h + platform/ios/CCGL-ios.h platform/ios/CCGLViewImpl-ios.h - platform/ios/CCES2Renderer-ios.h + platform/ios/CCPlatformDefine-ios.h + platform/ios/CCStdC-ios.h + platform/ios/OpenGL_Internal-ios.h ) set(COCOS_PLATFORM_SPECIFIC_SRC ${COCOS_PLATFORM_SPECIFIC_SRC} @@ -103,7 +102,6 @@ elseif(APPLE) platform/ios/CCDevice-ios.mm platform/ios/CCDirectorCaller-ios.mm platform/ios/CCEAGLView-ios.mm - platform/ios/CCES2Renderer-ios.m platform/ios/CCGLViewImpl-ios.mm platform/ios/CCImage-ios.mm ) @@ -152,13 +150,11 @@ set(COCOS_PLATFORM_HEADER platform/CCPlatformMacros.h platform/CCSAXParser.h platform/CCStdC.h - platform/CCThread.h ) set(COCOS_PLATFORM_SRC ${COCOS_PLATFORM_SPECIFIC_SRC} platform/CCSAXParser.cpp - platform/CCThread.cpp platform/CCGLView.cpp platform/CCFileUtils.cpp platform/CCImage.cpp diff --git a/cocos/platform/android/Android.mk b/cocos/platform/android/Android.mk deleted file mode 100644 index 4adfd98351ca..000000000000 --- a/cocos/platform/android/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := ccandroid - -LOCAL_MODULE_FILENAME := libccandroid - -LOCAL_SRC_FILES := \ -CCApplication-android.cpp \ -CCCommon-android.cpp \ -CCDevice-android.cpp \ -CCGLViewImpl-android.cpp \ -CCFileUtils-android.cpp \ -javaactivity-android.cpp \ -CCEnhanceAPI-android.cpp \ -jni/Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp \ -jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp \ -jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp \ -jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp \ -jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.cpp \ -jni/JniHelper.cpp \ -jni/TouchesJni.cpp - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../.. - -LOCAL_EXPORT_LDLIBS := -lGLESv2 \ - -lEGL \ - -llog \ - -landroid - -include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/platform/android/CCApplication-android.cpp b/cocos/platform/android/CCApplication-android.cpp index cd1e1f1de93e..da71a1ba542f 100644 --- a/cocos/platform/android/CCApplication-android.cpp +++ b/cocos/platform/android/CCApplication-android.cpp @@ -27,7 +27,6 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h" #include "platform/android/jni/JniHelper.h" #include "platform/CCApplication.h" #include "base/CCDirector.h" @@ -79,12 +78,7 @@ int Application::run() void Application::setAnimationInterval(float interval) { - setAnimationInterval(interval, SetIntervalReason::BY_ENGINE); -} - -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - EngineDataManager::setAnimationInterval(interval, reason); + JniHelper::callStaticVoidMethod("org/cocos2dx/lib/Cocos2dxRenderer", "setAnimationInterval", interval); } ////////////////////////////////////////////////////////////////////////// diff --git a/cocos/platform/android/CCApplication-android.h b/cocos/platform/android/CCApplication-android.h index 3f7ee8b96dd0..c2278ce95825 100644 --- a/cocos/platform/android/CCApplication-android.h +++ b/cocos/platform/android/CCApplication-android.h @@ -53,7 +53,6 @@ class CC_DLL Application : public ApplicationProtocol @param interval The time, expressed in seconds, between current frame and next. */ virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; /** @brief Run the message loop. diff --git a/cocos/platform/android/CCFileUtils-android.cpp b/cocos/platform/android/CCFileUtils-android.cpp index cf27566406ae..0d2c5e1606a8 100644 --- a/cocos/platform/android/CCFileUtils-android.cpp +++ b/cocos/platform/android/CCFileUtils-android.cpp @@ -31,7 +31,6 @@ THE SOFTWARE. #include "platform/CCCommon.h" #include "platform/android/jni/JniHelper.h" #include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" -#include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h" #include "android/asset_manager.h" #include "android/asset_manager_jni.h" #include "base/ZipUtils.h" @@ -213,7 +212,13 @@ bool FileUtilsAndroid::isDirectoryExistInternal(const std::string& dirPath) cons return false; } - const char* s = dirPath.c_str(); + std::string dirPathCopy = dirPath; + if(dirPathCopy[dirPathCopy.length() - 1] == '/') + { + dirPathCopy.erase(dirPathCopy.length() - 1); + } + + const char* s = dirPathCopy.c_str(); // find absolute path in flash memory if (s[0] == '/') @@ -227,6 +232,8 @@ bool FileUtilsAndroid::isDirectoryExistInternal(const std::string& dirPath) cons } else { + + // find it in apk's assets dir // Found "assets/" at the beginning of the path and we don't want it CCLOG("find in apk dirPath(%s)", s); @@ -234,6 +241,7 @@ bool FileUtilsAndroid::isDirectoryExistInternal(const std::string& dirPath) cons { s += ASSETS_FOLDER_NAME_LENGTH; } + if (FileUtilsAndroid::assetmanager) { AAssetDir* aa = AAssetManager_openDir(FileUtilsAndroid::assetmanager, s); @@ -295,7 +303,7 @@ std::vector FileUtilsAndroid::listFiles(const std::string& dirPath) if(isAbsolutePath(dirPath)) return FileUtils::listFiles(dirPath); std::vector fileList; - string fullPath = fullPathForFilename(dirPath); + string fullPath = fullPathForDirectory(dirPath); static const std::string apkprefix("assets/"); string relativePath = ""; @@ -314,6 +322,11 @@ std::vector FileUtilsAndroid::listFiles(const std::string& dirPath) return fileList; } + if(relativePath[relativePath.length() - 1] == '/') + { + relativePath.erase(relativePath.length() - 1); + } + auto *dir = AAssetManager_openDir(assetmanager, relativePath.c_str()); if(nullptr == dir) { LOGD("... FileUtilsAndroid::failed to open dir %s", relativePath.c_str()); @@ -333,8 +346,6 @@ std::vector FileUtilsAndroid::listFiles(const std::string& dirPath) FileUtils::Status FileUtilsAndroid::getContents(const std::string& filename, ResizableBuffer* buffer) const { - EngineDataManager::onBeforeReadFile(); - static const std::string apkprefix("assets/"); if (filename.empty()) return FileUtils::Status::NotExists; diff --git a/cocos/platform/android/CCFileUtils-android.h b/cocos/platform/android/CCFileUtils-android.h index a20107548784..2153199b18ef 100644 --- a/cocos/platform/android/CCFileUtils-android.h +++ b/cocos/platform/android/CCFileUtils-android.h @@ -34,6 +34,8 @@ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. #include "base/ccTypes.h" #include #include +#include +#include #include "jni.h" #include "android/asset_manager.h" diff --git a/cocos/platform/android/CMakeLists.txt b/cocos/platform/android/CMakeLists.txt index 17cbd0d94b1d..609317806d08 100644 --- a/cocos/platform/android/CMakeLists.txt +++ b/cocos/platform/android/CMakeLists.txt @@ -14,7 +14,6 @@ set(${target_name}_src jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp - jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.cpp ) add_library(${target_name} STATIC diff --git a/cocos/platform/android/java/libs/EngineDataManager.jar b/cocos/platform/android/java/libs/EngineDataManager.jar deleted file mode 100644 index 74f326d937f2..000000000000 Binary files a/cocos/platform/android/java/libs/EngineDataManager.jar and /dev/null differ diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java index 77c29fcceb18..5ff21f46d75e 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java @@ -166,8 +166,6 @@ protected void onCreate(final Bundle savedInstanceState) { // Audio configuration this.setVolumeControlStream(AudioManager.STREAM_MUSIC); - - Cocos2dxEngineDataManager.init(this, mGLSurfaceView); } //native method,call GLViewImpl::getGLContextAttrs() to get the OpenGL ES context attributions @@ -190,8 +188,6 @@ protected void onResume() { Cocos2dxAudioFocusManager.registerAudioFocusListener(this); this.hideVirtualButton(); resumeIfHasFocus(); - - Cocos2dxEngineDataManager.resume(); } @Override @@ -224,7 +220,6 @@ protected void onPause() { Cocos2dxAudioFocusManager.unregisterAudioFocusListener(this); Cocos2dxHelper.onPause(); mGLSurfaceView.onPause(); - Cocos2dxEngineDataManager.pause(); } @Override @@ -232,8 +227,6 @@ protected void onDestroy() { if(gainAudioFocus) Cocos2dxAudioFocusManager.unregisterAudioFocusListener(this); super.onDestroy(); - - Cocos2dxEngineDataManager.destroy(); } @Override diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAudioFocusManager.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAudioFocusManager.java index 6286566a9ea6..ff3b77e4dde1 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAudioFocusManager.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAudioFocusManager.java @@ -52,7 +52,6 @@ public void onAudioFocusChange(int focusChange) { @Override public void run() { nativeOnAudioFocusChange(AUDIOFOCUS_LOST); - Cocos2dxHelper.setAudioFocus(false); } }); @@ -63,7 +62,6 @@ public void run() { @Override public void run() { nativeOnAudioFocusChange(AUDIOFOCUS_LOST_TRANSIENT); - Cocos2dxHelper.setAudioFocus(false); } }); } else if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) { @@ -73,7 +71,6 @@ public void run() { @Override public void run() { nativeOnAudioFocusChange(AUDIOFOCUS_LOST_TRANSIENT_CAN_DUCK); - Cocos2dxHelper.setAudioFocus(false); } }); } else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) { @@ -84,7 +81,6 @@ public void run() { @Override public void run() { nativeOnAudioFocusChange(AUDIOFOCUS_GAIN); - Cocos2dxHelper.setAudioFocus(true); } }); } @@ -122,7 +118,6 @@ static void unregisterAudioFocusListener(Context context) { Cocos2dxHelper.runOnGLThread(new Runnable() { @Override public void run() { - Cocos2dxHelper.setAudioFocus(true); nativeOnAudioFocusChange(AUDIOFOCUS_GAIN); } }); diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEngineDataManager.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEngineDataManager.java deleted file mode 100644 index 8d09a7ca9ba0..000000000000 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEngineDataManager.java +++ /dev/null @@ -1,263 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2016 Chukong Technologies Inc. - *

- * http://www.cocos2d-x.org - *

- * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - *

- * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ****************************************************************************/ - -package org.cocos2dx.lib; - -import android.content.Context; -import android.opengl.GLSurfaceView; -import android.os.Handler; -import android.util.Log; - -import org.cocos2dx.enginedata.EngineDataManager; -import org.cocos2dx.enginedata.IEngineDataManager; - -public class Cocos2dxEngineDataManager { - private static final String TAG = "CCEngineDataManager"; - private static EngineDataManager sManager = new EngineDataManager(); - private static boolean sIsEnabled = true; - private static boolean sIsInited = false; - - private Cocos2dxEngineDataManager() { - - } - - // Whether to disable Cocos2dxEngineDataManager, invoke it if you don't wanna - // this optimization. You could invoke `Cocos2dxEngineDataManager.disable` before - // `super.onCreate` in game's Activity. The following code snippet demonstrates how to disable it. - /* - public class AppActivity extends Cocos2dxActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - Cocos2dxEngineDataManager.disable(); // disable before `super.onCreate` - super.onCreate(savedInstanceState); - ... - ... - } - } - */ - // Currently, it only supports HuaWei mobile phones. - public static void disable() { - sIsEnabled = false; - } - - public static boolean isInited() { - return sIsInited; - } - - // Lifecycle functions - public static boolean init(Context context, final GLSurfaceView glSurfaceView) { - if (context == null) { - Log.e(TAG, "Context is null"); - return false; - } - - if (glSurfaceView == null) { - Log.e(TAG, "glSurfaceView is null"); - return false; - } - - final IEngineDataManager.OnSystemCommandListener listener = new IEngineDataManager.OnSystemCommandListener() { - - @Override - public void onQueryFps(final int[] expectedFps, final int[] realFps) { - //@note Query FPS should not post it to GL thread since `expectedFps` and `realFps` - // need to be filled immediately. -// glSurfaceView.queueEvent(new Runnable() { -// @Override -// public void run() { - nativeOnQueryFps(expectedFps, realFps); -// } -// }); - } - - @Override - public void onChangeContinuousFrameLostConfig(final int cycle, final int maxFrameMissed) { - glSurfaceView.queueEvent(new Runnable() { - @Override - public void run() { - nativeOnChangeContinuousFrameLostConfig(cycle, maxFrameMissed); - } - }); - } - - @Override - public void onChangeLowFpsConfig(final int cycle, final float maxFrameDx) { - glSurfaceView.queueEvent(new Runnable() { - @Override - public void run() { - nativeOnChangeLowFpsConfig(cycle, maxFrameDx); - } - }); - } - - @Override - public void onChangeExpectedFps(final int fps) { - glSurfaceView.queueEvent(new Runnable() { - @Override - public void run() { - nativeOnChangeExpectedFps(fps); - } - }); - } - - @Override - public void onChangeSpecialEffectLevel(final int level) { - glSurfaceView.queueEvent(new Runnable() { - @Override - public void run() { - nativeOnChangeSpecialEffectLevel(level); - } - }); - } - - @Override - public void onChangeMuteEnabled(final boolean enabled) { - glSurfaceView.queueEvent(new Runnable() { - @Override - public void run() { - nativeOnChangeMuteEnabled(enabled); - } - }); - } - }; - - if (sIsEnabled) { - sIsInited = sManager.init(listener); - } - - nativeSetSupportOptimization(sIsInited); - - return sIsInited; - } - - public static void destroy() { - if (sIsEnabled) { - sManager.destroy(); - } - } - - public static void pause() { - if (sIsEnabled) { - sManager.pause(); - } - } - - public static void resume() { - if (sIsEnabled) { - sManager.resume(); - } - } - // - - public static String getVendorInfo() { - if (sIsEnabled) { - return sManager.getVendorInfo(); - } - return ""; - } - - private static IEngineDataManager.GameStatus convertIntegerToGameStatus(int gameStatus) { - IEngineDataManager.GameStatus[] values = IEngineDataManager.GameStatus.values(); - for (IEngineDataManager.GameStatus status : values) { - if (gameStatus == status.ordinal()) { - return status; - } - } - - return IEngineDataManager.GameStatus.INVALID; - } - /* - * @brief Notify game overhead changed - * @param gameStatus Which situation current game is in - * @param cpuLevel Current game wastes how much CPU resources, the range is [0,10] - * @param gpuLevel Current game wastes how much GPU resources, the range is [0,10] - */ - public static void notifyGameStatus(int gameStatus, int cpuLevel, int gpuLevel) { - if (!sIsEnabled) { - nativeSetSupportOptimization(false); - return; - } - - IEngineDataManager.GameStatus status = convertIntegerToGameStatus(gameStatus); - if (status == IEngineDataManager.GameStatus.INVALID) { - Log.e(TAG, "Invalid game status: " + gameStatus); - return; - } - sManager.notifyGameStatus(status, cpuLevel, gpuLevel); - } - - /* - * @brief Notify an event that some frames are lost. - * @param cycle The statistic cycle of 'Continuous Frame Lost Event', value is in millisecond, default value is 5000ms - * @param continuousFrameLostThreshold The threshold of 'Continuous Frame Lost', default value is 3, - * if there're 3 times of frame lost in 100ms, then mark a - * 'continuous frame lost', it's set by system. - * @times How many times of `Continuous Frame Lost` event happens in a `cycle' - */ - public static void notifyContinuousFrameLost(int cycle, int continuousFrameLostThreshold, int times) { - if (!sIsEnabled) { - nativeSetSupportOptimization(false); - return; - } - - sManager.notifyContinuousFrameLost(cycle, continuousFrameLostThreshold, times); - } - - /* - * @brief Notify an event that game FPS is too low - * @param cycle The statistic cycle of 'FPS Too Low Event', value is in millisecond, default value is 1000ms - * @param lowFpsThreshold The threshold of fps rate to indicate low fps, 'fps rate' = 'real fps' / 'excepted fps', - * default value is 0.3. if 'fps rate' is larger than 0.3, mark a 'low fps', it's set by system. - * - * @param lostFrameCount How many frames are lost in a 'cycle' - */ - public static void notifyLowFps(int cycle, float lowFpsThreshold, int lostFrameCount) { - if (!sIsEnabled) { - nativeSetSupportOptimization(false); - return; - } - - sManager.notifyLowFps(cycle, lowFpsThreshold, lostFrameCount); - } - - public static void notifyFpsChanged(float oldFps, float newFps) { - if (!sIsEnabled) { - nativeSetSupportOptimization(false); - return; - } - - sManager.notifyFpsChanged(oldFps, newFps); - } - - // Native methods - private native static void nativeSetSupportOptimization(boolean isSupported); - private native static void nativeOnQueryFps(/*out*/ int[] expectedFps, /*out*/ int[] realFps); - private native static void nativeOnChangeContinuousFrameLostConfig(int cycle, int continuousFrameLostThreshold); - private native static void nativeOnChangeLowFpsConfig(int cycle, float lowFpsThreshold); - private native static void nativeOnChangeExpectedFps(int fps); - private native static void nativeOnChangeSpecialEffectLevel(int level); - private native static void nativeOnChangeMuteEnabled(boolean enabled); -} diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java index d8fc5ba68bf3..2ce41847425d 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java @@ -80,9 +80,6 @@ public class Cocos2dxHelper { // =========================================================== // Fields // =========================================================== - - private static Cocos2dxMusic sCocos2dMusic; - private static Cocos2dxSound sCocos2dSound = null; private static AssetManager sAssetManager; private static Cocos2dxAccelerometer sCocos2dxAccelerometer = null; private static boolean sAccelerometerEnabled; @@ -156,7 +153,6 @@ public static void init(final Activity activity) { Cocos2dxHelper.sPackageName = applicationInfo.packageName; - Cocos2dxHelper.sCocos2dMusic = new Cocos2dxMusic(activity); Cocos2dxHelper.sAssetManager = activity.getAssets(); Cocos2dxHelper.nativeSetContext((Context)activity, Cocos2dxHelper.sAssetManager); @@ -359,100 +355,6 @@ public static long[] getObbAssetFileDescriptor(final String path) { return array; } - public static void preloadBackgroundMusic(final String pPath) { - Cocos2dxHelper.sCocos2dMusic.preloadBackgroundMusic(pPath); - } - - public static void playBackgroundMusic(final String pPath, final boolean isLoop) { - Cocos2dxHelper.sCocos2dMusic.playBackgroundMusic(pPath, isLoop); - } - - public static void resumeBackgroundMusic() { - Cocos2dxHelper.sCocos2dMusic.resumeBackgroundMusic(); - } - - public static void pauseBackgroundMusic() { - Cocos2dxHelper.sCocos2dMusic.pauseBackgroundMusic(); - } - - public static void stopBackgroundMusic() { - Cocos2dxHelper.sCocos2dMusic.stopBackgroundMusic(); - } - - public static void rewindBackgroundMusic() { - Cocos2dxHelper.sCocos2dMusic.rewindBackgroundMusic(); - } - - public static boolean willPlayBackgroundMusic() { - return Cocos2dxHelper.sCocos2dMusic.willPlayBackgroundMusic(); - } - - public static boolean isBackgroundMusicPlaying() { - return Cocos2dxHelper.sCocos2dMusic.isBackgroundMusicPlaying(); - } - - public static float getBackgroundMusicVolume() { - return Cocos2dxHelper.sCocos2dMusic.getBackgroundVolume(); - } - - public static void setBackgroundMusicVolume(final float volume) { - Cocos2dxHelper.sCocos2dMusic.setBackgroundVolume(volume); - } - - public static void preloadEffect(final String path) { - Cocos2dxHelper.getSound().preloadEffect(path); - } - - public static int playEffect(final String path, final boolean isLoop, final float pitch, final float pan, final float gain) { - return Cocos2dxHelper.getSound().playEffect(path, isLoop, pitch, pan, gain); - } - - public static void resumeEffect(final int soundId) { - Cocos2dxHelper.getSound().resumeEffect(soundId); - } - - public static void pauseEffect(final int soundId) { - Cocos2dxHelper.getSound().pauseEffect(soundId); - } - - public static void stopEffect(final int soundId) { - Cocos2dxHelper.getSound().stopEffect(soundId); - } - - public static float getEffectsVolume() { - return Cocos2dxHelper.getSound().getEffectsVolume(); - } - - public static void setEffectsVolume(final float volume) { - Cocos2dxHelper.getSound().setEffectsVolume(volume); - } - - public static void unloadEffect(final String path) { - Cocos2dxHelper.getSound().unloadEffect(path); - } - - public static void pauseAllEffects() { - Cocos2dxHelper.getSound().pauseAllEffects(); - } - - public static void resumeAllEffects() { - Cocos2dxHelper.getSound().resumeAllEffects(); - } - - public static void stopAllEffects() { - Cocos2dxHelper.getSound().stopAllEffects(); - } - - static void setAudioFocus(boolean isAudioFocus) { - sCocos2dMusic.setAudioFocus(isAudioFocus); - getSound().setAudioFocus(isAudioFocus); - } - - public static void end() { - Cocos2dxHelper.sCocos2dMusic.end(); - Cocos2dxHelper.getSound().end(); - } - public static void onResume() { sActivityVisible = true; if (Cocos2dxHelper.sAccelerometerEnabled) { @@ -469,16 +371,6 @@ public static void onPause() { Cocos2dxHelper.getAccelerometer().disable(); } } - - public static void onEnterBackground() { - getSound().onEnterBackground(); - sCocos2dMusic.onEnterBackground(); - } - - public static void onEnterForeground() { - getSound().onEnterForeground(); - sCocos2dMusic.onEnterForeground(); - } public static void terminateProcess() { android.os.Process.killProcess(android.os.Process.myPid()); @@ -826,11 +718,4 @@ private static Cocos2dxAccelerometer getAccelerometer() { return sCocos2dxAccelerometer; } - - private static Cocos2dxSound getSound() { - if (null == sCocos2dSound) - sCocos2dSound = new Cocos2dxSound(sActivity); - - return sCocos2dSound; - } } diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java deleted file mode 100644 index eb5cec5e5d0e..000000000000 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ****************************************************************************/ - -package org.cocos2dx.lib; - -import android.content.Context; -import android.content.res.AssetFileDescriptor; -import android.media.AudioManager; -import android.media.MediaPlayer; -import android.util.Log; - -import java.io.FileInputStream; - -public class Cocos2dxMusic { - // =========================================================== - // Constants - // =========================================================== - - private static final String TAG = Cocos2dxMusic.class.getSimpleName(); - - // =========================================================== - // Fields - // =========================================================== - - private final Context mContext; - private MediaPlayer mBackgroundMediaPlayer; - private float mLeftVolume; - private float mRightVolume; - private boolean mPaused; // whether music is paused state. - private boolean mIsLoop = false; - private boolean mManualPaused = false; // whether music is paused manually before the program is switched to the background. - private boolean mIsAudioFocus = true; - private String mCurrentPath; - - // =========================================================== - // Constructors - // =========================================================== - - public Cocos2dxMusic(final Context context) { - this.mContext = context; - - this.initData(); - } - - // =========================================================== - // Getter & Setter - // =========================================================== - - // =========================================================== - // Methods for/from SuperClass/Interfaces - // =========================================================== - - // =========================================================== - // Methods - // =========================================================== - - public void preloadBackgroundMusic(final String path) { - if ((this.mCurrentPath == null) || (!this.mCurrentPath.equals(path))) { - // preload new background music - - // release old resource and create a new one - if (this.mBackgroundMediaPlayer != null) { - this.mBackgroundMediaPlayer.release(); - } - - this.mBackgroundMediaPlayer = this.createMediaPlayer(path); - - // record the path - this.mCurrentPath = path; - } - } - - public void playBackgroundMusic(final String path, final boolean isLoop) { - if (mCurrentPath == null) { - // it is the first time to play background music or end() was called - mBackgroundMediaPlayer = createMediaPlayer(path); - mCurrentPath = path; - } else { - if (!mCurrentPath.equals(path)) { - // play new background music - - // release old resource and create a new one - if (mBackgroundMediaPlayer != null) { - mBackgroundMediaPlayer.release(); - } - mBackgroundMediaPlayer = createMediaPlayer(path); - - // record the path - mCurrentPath = path; - } - } - - if (mBackgroundMediaPlayer == null) { - Log.e(Cocos2dxMusic.TAG, "playBackgroundMusic: background media player is null"); - } else { - try { - // if the music is playing or paused, stop it - if (mPaused) { - mBackgroundMediaPlayer.seekTo(0); - mBackgroundMediaPlayer.start(); - } else if (mBackgroundMediaPlayer.isPlaying()) { - mBackgroundMediaPlayer.seekTo(0); - } else { - mBackgroundMediaPlayer.start(); - } - mBackgroundMediaPlayer.setLooping(isLoop); - mPaused = false; - mIsLoop = isLoop; - } catch (final Exception e) { - Log.e(Cocos2dxMusic.TAG, "playBackgroundMusic: error state"); - } - } - } - - public void stopBackgroundMusic() { - if (this.mBackgroundMediaPlayer != null) { - mBackgroundMediaPlayer.release(); - mBackgroundMediaPlayer = createMediaPlayer(mCurrentPath); - - /** - * should set the state, if not, the following sequence will be error - * play -> pause -> stop -> resume - */ - this.mPaused = false; - } - } - - public void pauseBackgroundMusic() { - try { - if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) { - this.mBackgroundMediaPlayer.pause(); - this.mPaused = true; - this.mManualPaused = true; - } - } catch (IllegalStateException e) { - Log.e(TAG, "pauseBackgroundMusic, IllegalStateException was triggered!"); - } - } - - public void resumeBackgroundMusic() { - try { - if (this.mBackgroundMediaPlayer != null && this.mPaused) { - this.mBackgroundMediaPlayer.start(); - this.mPaused = false; - this.mManualPaused = false; - } - } catch (IllegalStateException e) { - Log.e(TAG, "resumeBackgroundMusic, IllegalStateException was triggered!"); - } - } - - public void rewindBackgroundMusic() { - if (this.mBackgroundMediaPlayer != null) { - playBackgroundMusic(mCurrentPath, mIsLoop); - } - } - - public boolean willPlayBackgroundMusic() { - // We will play our own background music, if there isn't already some - // music active from some other app (eg the user playing their own - // music). - AudioManager manager = - (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); - return !manager.isMusicActive(); - } - - public boolean isBackgroundMusicPlaying() { - boolean ret = false; - try { - if (this.mBackgroundMediaPlayer == null) { - ret = false; - } else { - ret = this.mBackgroundMediaPlayer.isPlaying(); - } - } catch (IllegalStateException e) { - Log.e(TAG, "isBackgroundMusicPlaying, IllegalStateException was triggered!"); - } - - return ret; - } - - public void end() { - if (this.mBackgroundMediaPlayer != null) { - this.mBackgroundMediaPlayer.release(); - } - - this.initData(); - } - - public float getBackgroundVolume() { - if (this.mBackgroundMediaPlayer != null) { - return (this.mLeftVolume + this.mRightVolume) / 2; - } else { - return 0.0f; - } - } - - public void setBackgroundVolume(float volume) { - if (volume < 0.0f) { - volume = 0.0f; - } - - if (volume > 1.0f) { - volume = 1.0f; - } - - this.mLeftVolume = this.mRightVolume = volume; - if (this.mBackgroundMediaPlayer != null && mIsAudioFocus) { - this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume); - } - } - - public void onEnterBackground(){ - try { - if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) { - this.mBackgroundMediaPlayer.pause(); - this.mPaused = true; - } - } catch (IllegalStateException e) { - Log.e(TAG, "onEnterBackground, IllegalStateException was triggered!"); - } - } - - public void onEnterForeground(){ - try { - if (!this.mManualPaused) { - if (this.mBackgroundMediaPlayer != null && this.mPaused) { - this.mBackgroundMediaPlayer.start(); - this.mPaused = false; - } - } - } catch (IllegalStateException e) { - Log.e(TAG, "onEnterForeground, IllegalStateException was triggered!"); - } - } - - private void initData() { - this.mLeftVolume = 0.5f; - this.mRightVolume = 0.5f; - this.mBackgroundMediaPlayer = null; - this.mPaused = false; - this.mCurrentPath = null; - } - - /** - * create MediaPlayer for music - * - * @param path The path relative to assets - * @return - */ - private MediaPlayer createMediaPlayer(final String path) { - MediaPlayer mediaPlayer = new MediaPlayer(); - - try { - if (path.startsWith("/")) { - final FileInputStream fis = new FileInputStream(path); - mediaPlayer.setDataSource(fis.getFD()); - fis.close(); - } else { - if (Cocos2dxHelper.getObbFile() != null) { - final AssetFileDescriptor assetFileDescriptor = Cocos2dxHelper.getObbFile().getAssetFileDescriptor(path); - mediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor(), assetFileDescriptor.getStartOffset(), assetFileDescriptor.getLength()); - } else { - final AssetFileDescriptor assetFileDescriptor = this.mContext.getAssets().openFd(path); - mediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor(), assetFileDescriptor.getStartOffset(), assetFileDescriptor.getLength()); - } - } - - mediaPlayer.prepare(); - - mediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume); - } catch (final Exception e) { - mediaPlayer = null; - Log.e(Cocos2dxMusic.TAG, "error: " + e.getMessage(), e); - } - - return mediaPlayer; - } - - void setAudioFocus(boolean isFocus) { - mIsAudioFocus = isFocus; - - if (mBackgroundMediaPlayer != null) { - float lVolume = mIsAudioFocus ? mLeftVolume : 0.0f; - float rVolume = mIsAudioFocus ? mRightVolume : 0.0f; - mBackgroundMediaPlayer.setVolume(lVolume, rVolume); - } - } - - // =========================================================== - // Inner and Anonymous Classes - // =========================================================== -} diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java index ed5cab3ab478..b9060bee86d4 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java @@ -157,12 +157,10 @@ public void handleOnPause() { if (! mNativeInitCompleted) return; - Cocos2dxHelper.onEnterBackground(); Cocos2dxRenderer.nativeOnPause(); } public void handleOnResume() { - Cocos2dxHelper.onEnterForeground(); Cocos2dxRenderer.nativeOnResume(); } diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java deleted file mode 100644 index 6d2eaccafedb..000000000000 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java +++ /dev/null @@ -1,462 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ****************************************************************************/ -package org.cocos2dx.lib; - -import android.content.Context; -import android.media.AudioManager; -import android.media.SoundPool; -import android.util.Log; -import android.content.res.AssetFileDescriptor; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -public class Cocos2dxSound { - // =========================================================== - // Constants - // =========================================================== - - private static final String TAG = "Cocos2dxSound"; - - // =========================================================== - // Fields - // =========================================================== - - private final Context mContext; - private SoundPool mSoundPool; - private float mLeftVolume; - private float mRightVolume; - private boolean mIsAudioFocus = true; - - // sound path and stream ids map - // a file may be played many times at the same time - // so there is an array map to a file path - private final HashMap> mPathStreamIDsMap = new HashMap>(); - // A lock for mPathStreamIDsMap operation to keep mPathStreamIDsMap being visited in only one thread at a time. - private final Object mLockPathStreamIDsMap = new Object(); - - private final HashMap mPathSoundIDMap = new HashMap(); - - // Key: SoundID, Value: SoundInfoForLoadedCompleted - private ConcurrentHashMap mPlayWhenLoadedEffects = - new ConcurrentHashMap(); - - private static final int MAX_SIMULTANEOUS_STREAMS_DEFAULT = 5; - private static final int MAX_SIMULTANEOUS_STREAMS_I9100 = 3; - private static final float SOUND_RATE = 1.0f; - private static final int SOUND_PRIORITY = 1; - private static final int SOUND_QUALITY = 5; - - private final static int INVALID_SOUND_ID = -1; - private final static int INVALID_STREAM_ID = -1; - - // =========================================================== - // Constructors - // =========================================================== - - public Cocos2dxSound(final Context context) { - this.mContext = context; - - this.initData(); - } - - private void initData() { - if (Cocos2dxHelper.getDeviceModel().contains("GT-I9100")) { - this.mSoundPool = new SoundPool(Cocos2dxSound.MAX_SIMULTANEOUS_STREAMS_I9100, AudioManager.STREAM_MUSIC, Cocos2dxSound.SOUND_QUALITY); - } - else { - this.mSoundPool = new SoundPool(Cocos2dxSound.MAX_SIMULTANEOUS_STREAMS_DEFAULT, AudioManager.STREAM_MUSIC, Cocos2dxSound.SOUND_QUALITY); - } - - this.mSoundPool.setOnLoadCompleteListener(new OnLoadCompletedListener()); - - this.mLeftVolume = 0.5f; - this.mRightVolume = 0.5f; - } - - /* - * @brief Preload a compressed audio file. - * @param path The path of the effect file. - */ - public int preloadEffect(final String path) { - Integer soundID = this.mPathSoundIDMap.get(path); - - if (soundID == null) { - soundID = this.createSoundIDFromAsset(path); - // save value just in case if file is really loaded - if (soundID != Cocos2dxSound.INVALID_SOUND_ID) { - this.mPathSoundIDMap.put(path, soundID); - } - } - - return soundID; - } - - - /* - * @brief Unload the preloaded effect from internal buffer. - * @param path The path of the effect file. - */ - public void unloadEffect(final String path) { - synchronized (mLockPathStreamIDsMap) { - // stop effects - final ArrayList streamIDs = this.mPathStreamIDsMap.get(path); - if (streamIDs != null) { - for (final Integer steamID : streamIDs) { - this.mSoundPool.stop(steamID); - } - } - this.mPathStreamIDsMap.remove(path); - } - - // unload effect - final Integer soundID = this.mPathSoundIDMap.get(path); - if (soundID != null) { - this.mSoundPool.unload(soundID); - this.mPathSoundIDMap.remove(path); - } - } - - private static final int LOAD_TIME_OUT = 500; - - /* - * @brief Play sound effect with a path, pitch, pan, and gain. - * @param path The path of the effect file. - * @param loop Determines whether to loop the effect playing or not. - * @param pitch Fequency, normal value is 1.0. will also change effect play time. - * @param pan Stereo effect, in the range of [-1..1] where -1 enables only left channel. - * @param gain Volume, in the range of [0..1]. The normal value is 1. - * @return Value of streamID from Java int method if it can preload effect; otherwise -1. - */ - public int playEffect(final String path, final boolean loop, float pitch, float pan, float gain){ - Integer soundID = this.mPathSoundIDMap.get(path); - int streamID = Cocos2dxSound.INVALID_STREAM_ID; - - if (soundID != null) { - // parameters; pan = -1 for left channel, 1 for right channel, 0 for both channels - - // play sound - streamID = this.doPlayEffect(path, soundID, loop, pitch, pan, gain); - } else { - // the effect is not prepared - soundID = this.preloadEffect(path); - if (soundID == Cocos2dxSound.INVALID_SOUND_ID) { - // can not preload effect - return Cocos2dxSound.INVALID_SOUND_ID; - } - - SoundInfoForLoadedCompleted info = new SoundInfoForLoadedCompleted(path, loop, pitch, pan, gain); - mPlayWhenLoadedEffects.putIfAbsent(soundID, info); - - synchronized(info) { - try { - info.wait(LOAD_TIME_OUT); - } catch (Exception e) { - e.printStackTrace(); - } - } - - streamID = info.effectID; - mPlayWhenLoadedEffects.remove(soundID); - } - - return streamID; - } - - /* - * @brief Stop playing sound effect. - * @param streamID The return value of function playEffect. - */ - public void stopEffect(final int steamID) { - this.mSoundPool.stop(steamID); - - synchronized (mLockPathStreamIDsMap) { - // remove record - for (final String pPath : this.mPathStreamIDsMap.keySet()) { - if (this.mPathStreamIDsMap.get(pPath).contains(steamID)) { - this.mPathStreamIDsMap.get(pPath).remove(this.mPathStreamIDsMap.get(pPath).indexOf(steamID)); - break; - } - } - } - } - - /* - * @brief Pause playing sound effect. - * @param streamID The return value of function playEffect. - */ - public void pauseEffect(final int steamID) { - this.mSoundPool.pause(steamID); - } - - /* - * @brief Resume playing sound effect. - * @param streamID The return value of function playEffect. - */ - public void resumeEffect(final int steamID) { - this.mSoundPool.resume(steamID); - } - - /* - * @brief Pause all playing sound effect. - */ - public void pauseAllEffects() { - synchronized (mLockPathStreamIDsMap) { - if (!this.mPathStreamIDsMap.isEmpty()) { - final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); - while (iter.hasNext()) { - final Entry> entry = iter.next(); - for (final int steamID : entry.getValue()) { - this.mSoundPool.pause(steamID); - } - } - } - } - } - - /* - * @brief Resume all playing sound effects. - */ - public void resumeAllEffects() { - synchronized (mLockPathStreamIDsMap) { - // can not only invoke SoundPool.autoResume() here, because - // it only resumes all effects paused by pauseAllEffects() - if (!this.mPathStreamIDsMap.isEmpty()) { - final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); - while (iter.hasNext()) { - final Entry> entry = iter.next(); - for (final int steamID : entry.getValue()) { - this.mSoundPool.resume(steamID); - } - } - } - } - } - - /* - * @brief Stop all playing sound effects. - */ - public void stopAllEffects() { - synchronized (mLockPathStreamIDsMap) { - // stop effects - if (!this.mPathStreamIDsMap.isEmpty()) { - final Iterator iter = this.mPathStreamIDsMap.entrySet().iterator(); - while (iter.hasNext()) { - final Map.Entry> entry = (Map.Entry>) iter.next(); - for (final int steamID : entry.getValue()) { - this.mSoundPool.stop(steamID); - } - } - } - - // remove records - this.mPathStreamIDsMap.clear(); - } - } - - /* - * @brief Get the volume of the effects. - * @return the range of 0.0 as the minimum and 1.0 as the maximum. - */ - public float getEffectsVolume() { - return (this.mLeftVolume + this.mRightVolume) / 2; - } - - /* - * @brief Set the volume of sound effects. - * @param volume must be range of 0.0 as the minimum and 1.0 as the maximum. - */ - public void setEffectsVolume(float volume) { - // volume should be in [0, 1.0] - if (volume < 0) { - volume = 0; - } - if (volume > 1) { - volume = 1; - } - - this.mLeftVolume = this.mRightVolume = volume; - - if (!mIsAudioFocus) - return; - - setEffectsVolumeInternal(mLeftVolume, mRightVolume); - } - - /* - * @brief Set the volume of sound effects internal. - * @param left Left volume that must be range of 0.0 as the minimum and 1.0 as the maximum. - * @param right Right volume that must be range of 0.0 as the minimum and 1.0 as the maximum. - */ - private void setEffectsVolumeInternal(float left, float right) { - synchronized (mLockPathStreamIDsMap) { - // change the volume of playing sounds - if (!this.mPathStreamIDsMap.isEmpty()) { - final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); - while (iter.hasNext()) { - final Entry> entry = iter.next(); - for (final int steamID : entry.getValue()) { - this.mSoundPool.setVolume(steamID, left, right); - } - } - } - } - } - - public void end() { - this.mSoundPool.release(); - synchronized (mLockPathStreamIDsMap) { - this.mPathStreamIDsMap.clear(); - } - this.mPathSoundIDMap.clear(); - this.mPlayWhenLoadedEffects.clear(); - - this.mLeftVolume = 0.5f; - this.mRightVolume = 0.5f; - - this.initData(); - } - - private int createSoundIDFromAsset(final String path) { - int soundID = Cocos2dxSound.INVALID_SOUND_ID; - - try { - if (path.startsWith("/")) { - soundID = this.mSoundPool.load(path, 0); - } else { - if (Cocos2dxHelper.getObbFile() != null) { - final AssetFileDescriptor assetFileDescriptor = Cocos2dxHelper.getObbFile().getAssetFileDescriptor(path); - soundID = mSoundPool.load(assetFileDescriptor, 0); - } else { - soundID = this.mSoundPool.load(this.mContext.getAssets().openFd(path), 0); - } - } - } catch (final Exception e) { - soundID = Cocos2dxSound.INVALID_SOUND_ID; - Log.e(Cocos2dxSound.TAG, "error: " + e.getMessage(), e); - } - - // mSoundPool.load returns 0 if something goes wrong, for example a file does not exist - if (soundID == 0) { - soundID = Cocos2dxSound.INVALID_SOUND_ID; - } - - return soundID; - } - - private float clamp(float value, float min, float max) { - return Math.max(min, (Math.min(value, max))); - } - - // Adds 'synchronized' keyword for doPlayeEffect since it's possible to be invoked in GL thread and main thread. - // In Cocos2dxSound.playEffect, it's in GL thread. - // In onLoadComplete callback, it's in main thread. - private synchronized int doPlayEffect(final String path, final int soundId, final boolean loop, float pitch, float pan, float gain) { - float leftVolume = this.mLeftVolume * gain * (1.0f - this.clamp(pan, 0.0f, 1.0f)); - float rightVolume = this.mRightVolume * gain * (1.0f - this.clamp(-pan, 0.0f, 1.0f)); - float soundRate = this.clamp(SOUND_RATE * pitch, 0.5f, 2.0f); - - // play sound - int streamID = this.mSoundPool.play(soundId, this.clamp(leftVolume, 0.0f, 1.0f), this.clamp(rightVolume, 0.0f, 1.0f), Cocos2dxSound.SOUND_PRIORITY, loop ? -1 : 0, soundRate); - - synchronized (mLockPathStreamIDsMap) { - // record stream id - ArrayList streamIDs = this.mPathStreamIDsMap.get(path); - if (streamIDs == null) { - streamIDs = new ArrayList(); - this.mPathStreamIDsMap.put(path, streamIDs); - } - streamIDs.add(streamID); - } - - return streamID; - } - - public void onEnterBackground(){ - this.mSoundPool.autoPause(); - } - - public void onEnterForeground(){ - this.mSoundPool.autoResume(); - } - - /* - * @brief Set audio focus. - * @param isAudioFocus Determines whether to set audio focused or not. - */ - void setAudioFocus(boolean isFocus) { - mIsAudioFocus = isFocus; - float leftVolume = mIsAudioFocus ? mLeftVolume : 0.0f; - float rightVolume = mIsAudioFocus ? mRightVolume : 0.0f; - - setEffectsVolumeInternal(leftVolume, rightVolume); - } - - // =========================================================== - // Inner and Anonymous Classes - // =========================================================== - - private class SoundInfoForLoadedCompleted { - boolean isLoop; - float pitch; - float pan; - float gain; - String path; - int effectID; - - SoundInfoForLoadedCompleted(String path, boolean isLoop, float pitch, float pan, float gain) { - this.path = path; - this.isLoop = isLoop; - this.pitch = pitch; - this.pan = pan; - this.gain = gain; - effectID = Cocos2dxSound.INVALID_SOUND_ID; - } - } - - public class OnLoadCompletedListener implements SoundPool.OnLoadCompleteListener { - - @Override - public void onLoadComplete(SoundPool soundPool, int sampleId, int status) { - // This callback is in main thread. - if (status == 0) - { - SoundInfoForLoadedCompleted info = mPlayWhenLoadedEffects.get(sampleId); - - if (info != null) { - info.effectID = doPlayEffect(info.path, sampleId, info.isLoop, info.pitch, info.pan, info.gain); - synchronized (info) { - info.notifyAll(); - } - } - } - } - } -} diff --git a/cocos/platform/android/javaactivity-android.cpp b/cocos/platform/android/javaactivity-android.cpp index a44b951820be..ccb49bf94ff1 100644 --- a/cocos/platform/android/javaactivity-android.cpp +++ b/cocos/platform/android/javaactivity-android.cpp @@ -34,7 +34,7 @@ THE SOFTWARE. #include "base/CCEventDispatcher.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCTextureCache.h" -#include "2d/CCDrawingPrimitives.h" +//#include "2d/CCDrawingPrimitives.h" #include "platform/android/jni/JniHelper.h" #include "network/CCDownloader-android.h" #include @@ -99,8 +99,8 @@ JNIEXPORT void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, j { cocos2d::Director::getInstance()->resetMatrixStack(); cocos2d::GLProgramCache::getInstance()->reloadDefaultGLPrograms(); - cocos2d::DrawPrimitives::init(); - cocos2d::VolatileTextureMgr::reloadAllTextures(); + //TODO new-renderer: method reloadAllTextures removal + //cocos2d::VolatileTextureMgr::reloadAllTextures(); cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED); director->getEventDispatcher()->dispatchEvent(&recreatedEvent); diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.cpp b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.cpp deleted file mode 100644 index 30018c9398ce..000000000000 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.cpp +++ /dev/null @@ -1,1682 +0,0 @@ -/**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h" -#include "platform/android/jni/JniHelper.h" -#include "platform/CCFileUtils.h" -#include "platform/android/CCApplication-android.h" -#include "base/CCDirector.h" -#include "base/CCEventDispatcher.h" -#include "base/CCEventType.h" -#include "renderer/CCRenderer.h" -#include "2d/CCParticleSystem.h" -#include "2d/CCActionManager.h" -#include "audio/include/AudioEngine.h" -#include -#include -#include - -#define LOG_TAG "EngineDataManager.cpp" -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) -#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) - -#define EDM_DEBUG 0 - -#define JNI_FUNC_PREFIX(func) Java_org_cocos2dx_lib_Cocos2dxEngineDataManager_##func - -using namespace cocos2d; - -#if EDM_DEBUG -#include "platform/android/jni/ProcessCpuTracker.h" - -namespace { - -std::string& trim(std::string& s) -{ - if (s.empty()) - return s; - - s.erase(0, s.find_first_not_of(" \t")); - s.erase(s.find_last_not_of(" \t") + 1); - return s; -} - -void split(const std::string& s, const std::string& delim, std::vector* ret) -{ - size_t last = 0; - size_t index = s.find(delim, last); - while (index != std::string::npos) - { - ret->push_back(s.substr(last, index - last)); - last = index + delim.length(); - index = s.find(delim, last); - } - if (index - last > 0) - { - ret->push_back(s.substr(last, index - last)); - } -} - -std::string& deleteChar(std::string& s, const char* toDeleteChar) -{ - if (s.empty()) - return s; - - size_t pos = s.find_first_of(toDeleteChar); - while (pos != std::string::npos) - { - s.erase(pos, 1); - pos = s.find_first_of(toDeleteChar); - } - - return s; -} - -bool getValueFromMap(const std::map& m, const std::string& key, std::string* outValue) -{ - if (m.empty() || outValue == NULL) - return false; - - std::map::const_iterator iter = m.find(key); - if (iter != m.end()) - { - *outValue = iter->second; - return true; - } - outValue->clear(); - return false; -} - -std::string& toLowercase(std::string& s) -{ - std::transform(s.begin(), s.end(), s.begin(), ::tolower); - return s; -} - -} // namespace { - -#endif - -namespace { - -const char* ENGINE_DATA_MANAGER_VERSION = "5"; -const char* CLASS_NAME_ENGINE_DATA_MANAGER = "org.cocos2dx.lib.Cocos2dxEngineDataManager"; -const char* CLASS_NAME_RENDERER = "org.cocos2dx.lib.Cocos2dxRenderer"; - -bool _isInitialized = false; -bool _isSupported = false; -bool _isFirstSetNextScene = true; -bool _isReplaceScene = false; -bool _isReadFile = false; -bool _isInBackground = false; - -uint32_t _drawCountInterval = 0; -const uint32_t _drawCountThreshold = 30; - -#if EDM_DEBUG -uint32_t _printCpuGpuLevelCounter = 0; -uint32_t _printCpuGpuLevelThreshold = UINT_MAX; // Print cpu/gpu level in every 60 frames even if levels aren't changed. - -uint32_t _printCpuUsageCounter = 0; -uint32_t _printCpuUsageThreshold = UINT_MAX; - -ProcessCpuTracker _cpuTracker; -bool _forceEnableOptimization = false; -#endif - -/* last time frame lost cycle was calculated */ -std::chrono::steady_clock::time_point _lastContinuousFrameLostUpdate; -std::chrono::steady_clock::time_point _lastFrameLost100msUpdate; - -/* last time low fps cycle was calculated */ -std::chrono::steady_clock::time_point _lastLowFpsUpdate; - -int _continuousFrameLostCycle = 5000; -int _continuousFrameLostThreshold = 3; -int _continuousFrameLostCount = 0; -int _frameLostCounter = 0; - -int _lowFpsCycle = 1000; -float _lowFpsThreshold = 0.3f; -int _lowFpsCounter = 0; - -int _oldCpuLevel = -1; -int _oldGpuLevel = -1; - -int _oldCpuLevelMulFactor = -1; -int _oldGpuLevelMulFactor = -1; - -float _levelDecreaseThreshold = 0.2f; - -float _cpuFpsFactor = 1.0f; -float _gpuFpsFactor = 1.0f; -bool _isFpsChanged = false; -float _oldRealFps = 60.0f; - -uint32_t _lowFpsCheckMode = 0; // 0: Continuous mode, 1: Average mode -float _lowRealFpsThreshold = 0.5f; // Unit: percentage (0 ~ 1) -std::chrono::steady_clock::time_point _lastTimeNotifyLevelByLowFps; // Only used in continuous mode -float _notifyLevelByLowFpsThreshold = 0.5f; // Unit: seconds, only used in continuous mode -int _minValueOfNotifyCpuLevelByLowFps = 4; -int _minValueOfNotifyGpuLevelByLowFps = 5; -uint32_t _continuousLowRealFpsCount = 0; // Only used in continuous mode -uint32_t _continuousLowRealFpsThreshold = 1; // Only used in continuous mode -uint32_t _calculateAvgFpsCount = 0; // Only used in average mode -float _calculateAvgFpsSum = 0.0f; // Only used in average mode -std::chrono::steady_clock::time_point _lastTimeCalculateAvgFps; // Only used in average mode - -const float DEFAULT_INTERVAL = (1.0f / 60.0f); -// The final animation interval which is used in 'onDrawFrame' -float _animationInterval = DEFAULT_INTERVAL; - -// The animation interval set by engine. -// It could be updated by 'Director::getInstance()->setAnimationInterval(value);' -// or 'Director::getInstance()->resume();', 'Director::getInstance()->startAnimation();'. -float _animationIntervalByEngineOrGame = DEFAULT_INTERVAL; - -// The animation interval set by system. -// System could set this variable through EngineDataManager to override the default FPS set by developer. -// By using this variable, system will be able to control temperature better -// and waste less power while device is in low battery mode, so game could be played longer when battery is nearly dead. -// setAnimationInterval will reset _animationIntervalBySystem to -1 since last change last takes effect. -// Currently, only HuaWei Android devices may use this variable. -float _animationIntervalBySystem = -1.0f; - -// The animation interval when scene is changing. -// _animationIntervalByEngineOrGame & _animationIntervalBySystem will not take effect -// while _animationIntervalBySceneChange is greater than 0, -// but _animationIntervalByEngineOrGame will be effective while -// Its priority is highest while it's valid ( > 0) , and it will be invalid (set to -1) after changing scene finishes. -// Currently, only HuaWei Android devices may use this variable. -float _animationIntervalBySceneChange = -1.0f; - -// The animation interval when director is paused. -// It could be updated by 'Director::getInstance()->pause();' -// Its priority is higher than _animationIntervalBySystem. -float _animationIntervalByDirectorPaused = -1.0f; - -#define CARRAY_SIZE(arr) ((int)(arr.size())) - -enum LevelChangeReason -{ - LEVEL_CHANGE_REASON_NONE = 0, - LEVEL_CHANGE_REASON_CPU = (1 << 0), - LEVEL_CHANGE_REASON_GPU = (1 << 1), - LEVEL_CHANGE_REASON_CPU_AND_GPU = (LEVEL_CHANGE_REASON_CPU | LEVEL_CHANGE_REASON_GPU) -}; - -// CPU Level - -struct CpuLevelInfo -{ - unsigned int nodeCount; - unsigned int particleCount; - unsigned int actionCount; - unsigned int audioCount; -}; - -std::vector _cpuLevelArr = { - {500 , 500, 500, 6}, - {1250, 1500, 2000, 20}, - {1750, 2000, 3000, 32}, - {2750, 2500, 7000, 50} -}; - -// GPU Level - -struct GpuLevelInfo -{ - unsigned int vertexCount; - unsigned int drawCount; -}; - -std::vector _gpuLevelArr = { - {2000, 400}, - {4000, 800}, - {6000, 1000}, - {8000, 1100}, - {10000, 1200}, - {15000, 1300}, - {22000, 1350}, - {30000, 1400}, - {40000, 1450} -}; - -// Particle Level -const std::vector _particleLevelArr = { - 0.0f, - 0.2f, - 0.4f, - 0.6f, - 0.8f, - 1.0f -}; - - -#if EDM_DEBUG -class FpsCollector -{ -public: - FpsCollector(float intervalInSeconds) - : _collectFpsInterval(intervalInSeconds) - {} - - void setCollectFpsInterval(float intervalInSeconds) - { - _collectFpsInterval = intervalInSeconds; - } - - inline float getCollectFpsInterval() const { return _collectFpsInterval; } - - void update(float fps) - { - auto now = std::chrono::steady_clock::now(); - // collect - _fpsContainer.push_back(fps); - - float duration = std::chrono::duration_cast(now - _lastTimeCollectFps).count() / 1000000.0f; - if (duration > _collectFpsInterval) - { - // output info - _lastTimeCollectFps = now; - print(); - } - } - - void reset(const std::chrono::steady_clock::time_point& time) - { - _lastTimeCollectFps = time; - _fpsContainer.clear(); - } - -private: - void print() - { - if (_fpsContainer.empty()) - return; - - std::stringstream ss; - ss.precision(3); - float sum = 0.0f; - float fps = 0.0f; - std::vector::iterator iter = _fpsContainer.begin(); - for (; iter != _fpsContainer.end(); ++iter) - { - fps = *iter; - ss << fps << ", "; - sum += fps; - } - std::string s = ss.str(); - LOGD("Collected FPS: %savg: %.01f, sum:%d", s.c_str(), sum/_fpsContainer.size(), (int)_fpsContainer.size()); - - _fpsContainer.clear(); - } -private: - float _collectFpsInterval; - std::chrono::steady_clock::time_point _lastTimeCollectFps; - std::vector _fpsContainer; -}; - -#endif - -class FpsUpdatedWatcher -{ -public: - FpsUpdatedWatcher(float threshold) - : _threshold(threshold) - , _updateCount(0) - , _isStarted(false) - { - _data.reserve(12); - } - - ~FpsUpdatedWatcher() - {} - - void start() - { - reset(); - _isStarted = true; - } - inline bool isStarted() { return _isStarted; } - - void update(float fps) - { - if (!_isStarted) - return; - - if (_data.size() >= 12) - _data.erase(_data.begin()); - - _data.push_back(fps); - ++_updateCount; - } - - void reset() - { - _data.clear(); - _updateCount = 0; - _isStarted = false; - } - - bool isStable() - { - if (_updateCount > 24) - return true; - - if (_data.size() < 12) - return false; - - float sum = 0.0f; - float average = 0.0f; - uint32_t stableCount = 0; - - std::vector::iterator iter = _data.begin(); - for (; iter != _data.end(); ++iter) - sum += *iter; - - average = sum / _data.size(); - - iter = _data.begin(); - for (; iter != _data.end(); ++iter) - { - if (fabs(*iter - average) < _threshold) - ++stableCount; - } - - return stableCount > 9; - } -private: - std::vector _data; // Collect 12 frames data - float _threshold; - int _updateCount; - bool _isStarted; -}; - -FpsUpdatedWatcher _fpsUpdatedWatcher(2.0f); - -#if EDM_DEBUG -FpsCollector _fpsCollector(0.2f); -bool _isCollectFpsEnabled = false; -#endif - -int cbCpuLevelNode(int i) { return _cpuLevelArr[i].nodeCount; } -int cbCpuLevelParticle(int i) { return _cpuLevelArr[i].particleCount; } -int cbCpuLevelAction(int i) { return _cpuLevelArr[i].actionCount; } -int cbCpuLevelAudio(int i) { return _cpuLevelArr[i].audioCount; } - -float toCpuLevelPerFactor(int value, int (*cb)(int i)) -{ - int len = CARRAY_SIZE(_cpuLevelArr); - int prevStep = 0; - int curStep = 0; - for (int i = 0; i < len; ++i) - { - curStep = cb(i); - if (value < curStep) - { - // The return value should be a float value. - // Do linear interpolation here - return i + (1.0f / (curStep - prevStep) * (value - prevStep)); - } - prevStep = curStep; - } - return len; -} - -int cbGpuLevelVertex(int i) { return _gpuLevelArr[i].vertexCount; } -int cbGpuLevelDraw(int i) { return _gpuLevelArr[i].drawCount; } - -float toGpuLevelPerFactor(int value, int (*cb)(int i)) -{ - int len = CARRAY_SIZE(_gpuLevelArr); - int prevStep = 0; - int curStep = 0; - - for (int i = 0; i < len; ++i) - { - curStep = cb(i); - if (value < curStep) - { - // The return value should be a float value. - // Do linear interpolation here - return i + (1.0f / (curStep - prevStep) * (value - prevStep)); - } - - prevStep = curStep; - - } - return len; -} - -void resetLastTime() -{ - _lastFrameLost100msUpdate = std::chrono::steady_clock::now(); - _lastContinuousFrameLostUpdate = _lastFrameLost100msUpdate; - _lastLowFpsUpdate = _lastFrameLost100msUpdate; - _lastTimeNotifyLevelByLowFps = _lastFrameLost100msUpdate; - _lastTimeCalculateAvgFps = _lastFrameLost100msUpdate; - -#if EDM_DEBUG - _fpsCollector.reset(_lastFrameLost100msUpdate); -#endif -} - -void parseDebugConfig() -{ -#if EDM_DEBUG - auto fileUtils = FileUtils::getInstance(); - - const char* configPath = "/sdcard/cc-res-level.json"; - - if (!fileUtils->isFileExist(configPath)) - { - return; - } - - LOGD("Using debug level config: %s", configPath); - - std::string buffer; - unsigned long size = 0; - unsigned char* resLevelConfig = fileUtils->getFileData(configPath, "rb", &size); - if (resLevelConfig != NULL && size > 0) - { - buffer.insert(0, (const char*)resLevelConfig, (size_t)size); - } - delete[] resLevelConfig; - - // Get std::map from config file - { - size_t pos = buffer.find_first_of('{'); - if (pos != std::string::npos) - { - buffer.replace(pos, 1, ""); - } - pos = buffer.find_last_of('}'); - - if (pos != std::string::npos) - { - buffer.replace(pos, 1, ""); - } - } - - deleteChar(buffer, "\r"); - deleteChar(buffer, "\n"); - deleteChar(buffer, "\t"); - deleteChar(buffer, " "); - - std::string cpuLevelBuffer; - { - const char* cpuLevelStartKey = "\"cpu_level\":["; - const size_t cpuLevelStartKeyLen = strlen(cpuLevelStartKey); - size_t cpuLevelStartPos = buffer.find(cpuLevelStartKey); - if (cpuLevelStartPos != std::string::npos) - { - cpuLevelStartPos += cpuLevelStartKeyLen; - size_t cpuLevelEndPos = buffer.find("]", cpuLevelStartPos); - cpuLevelBuffer = buffer.substr(cpuLevelStartPos, cpuLevelEndPos - cpuLevelStartPos); - buffer.erase(cpuLevelStartPos-cpuLevelStartKeyLen, cpuLevelBuffer.length() + cpuLevelStartKeyLen + 1); - } - } - - if (!cpuLevelBuffer.empty()) - { - LOGD("cpuLevelBuffer: %s", cpuLevelBuffer.c_str()); - } - - std::string gpuLevelBuffer; - { - const char* gpuLevelStartKey = "\"gpu_level\":["; - const size_t gpuLevelStartKeyLen = strlen(gpuLevelStartKey); - size_t gpuLevelStartPos = buffer.find(gpuLevelStartKey); - if (gpuLevelStartPos != std::string::npos) - { - gpuLevelStartPos += gpuLevelStartKeyLen; - size_t gpuLevelEndPos = buffer.find("]", gpuLevelStartPos); - gpuLevelBuffer = buffer.substr(gpuLevelStartPos, gpuLevelEndPos - gpuLevelStartPos); - buffer.erase(gpuLevelStartPos-gpuLevelStartKeyLen, gpuLevelBuffer.length() + gpuLevelStartKeyLen + 1); - } - } - - if (gpuLevelBuffer.empty()) - { - LOGD("gpuLevelBuffer: %s", gpuLevelBuffer.c_str()); - } - - LOGD("remain: %s", buffer.c_str()); - - std::vector keyValueArr; - split(buffer, ",", &keyValueArr); - - if (keyValueArr.empty()) - { - LOGE("Parse cc-res-level.json failed!"); - return; - } - - LOGD("element count: %d", (int)keyValueArr.size()); - - std::map configMap; - for (size_t i = 0, len = keyValueArr.size(); i < len; ++i) - { - std::string e = keyValueArr[i]; - if (e.empty()) - continue; - - std::vector keyValue; - split(e, ":", &keyValue); - if (keyValue.empty() || keyValue.size() != 2) - { - LOGE("Parse (%s) failed, size: %d", e.c_str(), (int)keyValue.size()); - return; - } - - deleteChar(keyValue[0], "\""); - - configMap.insert(std::make_pair(keyValue[0], keyValue[1])); - } - - std::string tmp; - if (getValueFromMap(configMap, "force_enable_optimization", &tmp)) - { - toLowercase(tmp); - if (tmp == "true") - { - _forceEnableOptimization = true; - } - LOGD("[changed] force_enable_optimization: %d", _forceEnableOptimization); - } - else - { - LOGD("[default] force_enable_optimization: %d", _forceEnableOptimization); - } - - - if (getValueFromMap(configMap, "level_log_freq", &tmp)) - { - _printCpuGpuLevelThreshold = (uint32_t)atoi(tmp.c_str()); - LOGD("[changed] level_log_freq: %u", _printCpuGpuLevelThreshold); - } - else - { - LOGD("[default] level_log_freq: %u", _printCpuGpuLevelThreshold); - } - - - if (getValueFromMap(configMap, "cpu_usage_log_freq", &tmp)) - { - _printCpuUsageThreshold = (uint32_t)atoi(tmp.c_str()); - LOGD("[changed] cpu_usage_log_freq: %u", _printCpuUsageThreshold); - } - else - { - LOGD("[default] cpu_usage_log_freq: %u", _printCpuUsageThreshold); - } - - if (getValueFromMap(configMap, "level_decrease_threshold", &tmp)) - { - _levelDecreaseThreshold = atof(tmp.c_str()); - LOGD("[changed] level_decrease_threshold: %f", _levelDecreaseThreshold); - } - else - { - LOGD("[default] level_decrease_threshold: %f", _levelDecreaseThreshold); - } - - if (getValueFromMap(configMap, "low_fps_check_mode", &tmp)) - { - _lowFpsCheckMode = (uint32_t)atoi(tmp.c_str()); - LOGD("[changed] low_fps_check_mode: %u", _lowFpsCheckMode); - } - else - { - LOGD("[default] low_fps_check_mode: %u", _lowFpsCheckMode); - } - - if (getValueFromMap(configMap, "low_realfps_threshold", &tmp)) - { - _lowRealFpsThreshold = atof(tmp.c_str()); - LOGD("[changed] low_realfps_threshold: %f", _lowRealFpsThreshold); - } - else - { - LOGD("[default] low_realfps_threshold: %f", _lowRealFpsThreshold); - } - - if (getValueFromMap(configMap, "notify_level_by_low_fps_threshold", &tmp)) - { - _notifyLevelByLowFpsThreshold = atof(tmp.c_str()); - LOGD("[changed] notify_level_by_low_fps_threshold: %f", _notifyLevelByLowFpsThreshold); - } - else - { - LOGD("[default] notify_level_by_low_fps_threshold: %f", _notifyLevelByLowFpsThreshold); - } - - if (getValueFromMap(configMap, "min_value_of_notify_cpu_level_by_low_fps", &tmp)) - { - _minValueOfNotifyCpuLevelByLowFps = atoi(tmp.c_str()); - if (_minValueOfNotifyCpuLevelByLowFps > CARRAY_SIZE(_cpuLevelArr)) - { - _minValueOfNotifyCpuLevelByLowFps = CARRAY_SIZE(_cpuLevelArr); - } - LOGD("[changed] min_value_of_notify_cpu_level_by_low_fps: %d", _minValueOfNotifyCpuLevelByLowFps); - } - else - { - LOGD("[default] min_value_of_notify_cpu_level_by_low_fps: %d", _minValueOfNotifyCpuLevelByLowFps); - } - - if (getValueFromMap(configMap, "min_value_of_notify_gpu_level_by_low_fps", &tmp)) - { - _minValueOfNotifyGpuLevelByLowFps = atoi(tmp.c_str()); - if (_minValueOfNotifyGpuLevelByLowFps > CARRAY_SIZE(_gpuLevelArr)) - { - _minValueOfNotifyGpuLevelByLowFps = CARRAY_SIZE(_gpuLevelArr); - } - LOGD("[changed] min_value_of_notify_gpu_level_by_low_fps: %d", _minValueOfNotifyGpuLevelByLowFps); - } - else - { - LOGD("[default] min_value_of_notify_gpu_level_by_low_fps: %d", _minValueOfNotifyGpuLevelByLowFps); - } - - if (getValueFromMap(configMap, "continuous_low_realfps_threshold", &tmp)) - { - _continuousLowRealFpsThreshold = (uint32_t)atoi(tmp.c_str()); - LOGD("[changed] continuous_low_realfps_threshold: %u", _continuousLowRealFpsThreshold); - } - else - { - LOGD("[default] continuous_low_realfps_threshold: %u", _continuousLowRealFpsThreshold); - } - - if (getValueFromMap(configMap, "enable_collect_fps", &tmp)) - { - toLowercase(tmp); - if (tmp == "true") - { - _isCollectFpsEnabled = true; - } - LOGD("[changed] enable_collect_fps: %d", (int)_isCollectFpsEnabled); - } - else - { - LOGD("[default] enable_collect_fps: %d", (int)_isCollectFpsEnabled); - } - - if (getValueFromMap(configMap, "collect_fps_interval", &tmp)) - { - _fpsCollector.setCollectFpsInterval(atof(tmp.c_str())); - LOGD("[changed] collect_fps_interval: %f", _fpsCollector.getCollectFpsInterval()); - } - else - { - LOGD("[default] collect_fps_interval: %f", _fpsCollector.getCollectFpsInterval()); - } - - if (!cpuLevelBuffer.empty()) - { - std::vector cpuObjectArray; - split(cpuLevelBuffer, "},", &cpuObjectArray); - if (!cpuObjectArray.empty()) - { - _cpuLevelArr.clear(); - CpuLevelInfo cpuLevelInfo; - - for (size_t i = 0, len = cpuObjectArray.size(); i < len; ++i) - { - std::string& e = cpuObjectArray[i]; - size_t pos = e.find_first_of('{'); - if (pos != std::string::npos) - { - e.replace(pos, 1, ""); - } - pos = e.find_last_of('}'); - - if (pos != std::string::npos) - { - e.replace(pos, 1, ""); - } - - LOGD("cpu level: %s", e.c_str()); - - std::vector cpuLevelElement; - split(e, ",", &cpuLevelElement); - - for (size_t j = 0; j < cpuLevelElement.size(); ++j) - { - std::map kvMap; - std::vector kvArr; - split(cpuLevelElement[j], ":", &kvArr); - if (kvArr.size() != 2) - { - LOGE("cpu level configuration error: %d", (int)kvArr.size()); - return; - } - deleteChar(kvArr[0], "\""); - - kvMap.insert(std::make_pair(kvArr[0], kvArr[1])); - - if (getValueFromMap(kvMap, "node", &tmp)) - { - cpuLevelInfo.nodeCount = (uint32_t)atoi(tmp.c_str()); - } - - if (getValueFromMap(kvMap, "particle", &tmp)) - { - cpuLevelInfo.particleCount = (uint32_t)atoi(tmp.c_str()); - } - if (getValueFromMap(kvMap, "action", &tmp)) - { - cpuLevelInfo.actionCount = (uint32_t)atoi(tmp.c_str()); - } - if (getValueFromMap(kvMap, "audio", &tmp)) - { - cpuLevelInfo.audioCount = (uint32_t)atoi(tmp.c_str()); - } - } - - _cpuLevelArr.push_back(cpuLevelInfo); - } - } - } - - if (!gpuLevelBuffer.empty()) - { - std::vector gpuObjectArray; - split(gpuLevelBuffer, "},", &gpuObjectArray); - if (!gpuObjectArray.empty()) - { - _gpuLevelArr.clear(); - GpuLevelInfo gpuLevelInfo; - - for (size_t i = 0, len = gpuObjectArray.size(); i < len; ++i) - { - std::string& e = gpuObjectArray[i]; - size_t pos = e.find_first_of('{'); - if (pos != std::string::npos) - { - e.replace(pos, 1, ""); - } - pos = e.find_last_of('}'); - - if (pos != std::string::npos) - { - e.replace(pos, 1, ""); - } - - LOGD("gpu level: %s", e.c_str()); - - std::vector gpuLevelElement; - split(e, ",", &gpuLevelElement); - - for (size_t j = 0; j < gpuLevelElement.size(); ++j) - { - std::map kvMap; - std::vector kvArr; - split(gpuLevelElement[j], ":", &kvArr); - if (kvArr.size() != 2) - { - LOGE("gpu level configuration error: %d", (int)kvArr.size()); - return; - } - deleteChar(kvArr[0], "\""); - - kvMap.insert(std::make_pair(kvArr[0], kvArr[1])); - - if (getValueFromMap(kvMap, "vertex", &tmp)) - { - gpuLevelInfo.vertexCount = (uint32_t)atoi(tmp.c_str()); - } - - if (getValueFromMap(kvMap, "draw", &tmp)) - { - gpuLevelInfo.drawCount = (uint32_t)atoi(tmp.c_str()); - } - } - - _gpuLevelArr.push_back(gpuLevelInfo); - } - } - } - - { - LOGD("-----------------------------------------"); - std::vector::iterator iter = _cpuLevelArr.begin(); - for (; iter != _cpuLevelArr.end(); ++iter) - { - CpuLevelInfo level = *iter; - LOGD("cpu level: %u, %u, %u, %u", level.nodeCount, level.particleCount, level.actionCount, level.audioCount); - } - LOGD("-----------------------------------------"); - } - - { - LOGD("========================================="); - std::vector::iterator iter = _gpuLevelArr.begin(); - for (; iter != _gpuLevelArr.end(); ++iter) - { - GpuLevelInfo level = *iter; - LOGD("gpu level: %u, %u", level.vertexCount, level.drawCount); - } - LOGD("========================================="); - } -#endif // EDM_DEBUG -} - -void setAnimationIntervalBySystem(float interval) -{ - if (!_isSupported) - return; - - LOGD("Set FPS %f by system", std::ceil(1.0f / interval)); - EngineDataManager::setAnimationInterval(interval, SetIntervalReason::BY_SYSTEM); -} - -void setAnimationIntervalBySceneChange(float interval) -{ - if (!_isSupported) - return; - - LOGD("Set FPS %f while changing scene", std::ceil(1.0f / interval)); - EngineDataManager::setAnimationInterval(interval, SetIntervalReason::BY_SCENE_CHANGE); -} - -} // namespace { - -namespace cocos2d { - -int EngineDataManager::getTotalParticleCount() -{ - auto& particleSystems = ParticleSystem::getAllParticleSystems(); - if (particleSystems.empty()) - { - return 0; - } - - int count = 0; - for (auto&& system : particleSystems) - { - count += system->getTotalParticles(); - } - - return count; -} - -// calculates frame lost event -// static -void EngineDataManager::calculateFrameLost() -{ - auto director = Director::getInstance(); - - if (_lowFpsThreshold > 0 && _continuousFrameLostThreshold > 0) - { - float frameRate = director->getFrameRate(); - - float expectedFps = 1.0f / _animationInterval; - float frameLostRate = (expectedFps - frameRate) * _animationInterval; - if (frameLostRate > _lowFpsThreshold) - { - ++_frameLostCounter; - ++_lowFpsCounter; -// LOGD("_frameLostCounter: %d, _lowFpsCounter=%d", _frameLostCounter, _lowFpsCounter); - } - - auto now = std::chrono::steady_clock::now(); - float interval = std::chrono::duration_cast(now - _lastFrameLost100msUpdate).count() / 1000000.0f; - if (interval > 0.1f) - { - _lastFrameLost100msUpdate = now; - // check lost frame count - if (_frameLostCounter >= _continuousFrameLostThreshold) - { - ++_continuousFrameLostCount; - } - // Reset frame lost counter after 100ms interval - // even it's smaller than _continuousFrameLostThreshold - _frameLostCounter = 0; - } - - interval = std::chrono::duration_cast(now - _lastContinuousFrameLostUpdate).count() / 1000000.0f; - if (interval > (_continuousFrameLostCycle / 1000.0f)) - { - _lastContinuousFrameLostUpdate = now; - if (_continuousFrameLostCount > 0) - { - // notify continuous frame lost event to system - notifyContinuousFrameLost(_continuousFrameLostCycle, _continuousFrameLostThreshold, _continuousFrameLostCount); - - // LOGD("continuous frame lost: %d", _continuousFrameLostCount); - _continuousFrameLostCount = 0; - } - } - - interval = std::chrono::duration_cast(now - _lastLowFpsUpdate).count() / 1000000.0f; - if (interval > (_lowFpsCycle / 1000.0f)) - { - _lastLowFpsUpdate = now; - if (_lowFpsCounter > 0) - { - // notify low fps event to system - notifyLowFps(_lowFpsCycle, _lowFpsThreshold, _lowFpsCounter); - // LOGD("low fps frame count: %d", _lowFpsCounter); - _lowFpsCounter = 0; - } - } - } -} - -// static -void EngineDataManager::onBeforeSetNextScene(EventCustom* event) -{ - // Reset the old status since we have changed CPU/GPU level manually. - // If the CPU level isn't 5 and GPU level isn't 0 in the next time of checking CPU/GPU level, - // Make sure that the changed CPU/GPU level will be notified. - _oldCpuLevel = -1; - _oldGpuLevel = -1; - _oldCpuLevelMulFactor = -1; - _oldGpuLevelMulFactor = -1; - - if (_isFirstSetNextScene) - { - _isFirstSetNextScene = false; - notifyGameStatus(GameStatus::LAUNCH_END, -1, -1); - } - else if (_isReplaceScene) - { - notifyGameStatus(GameStatus::SCENE_CHANGE_END, -1, -1); - } - - notifyGameStatus(GameStatus::SCENE_CHANGE_BEGIN, 5, 0); - - // SetAnimationIntervalBySceneChange to 1.0f/60.0f while there isn't in replacing scene. - if (!_isReplaceScene) - { - // Modify fps to 60 - setAnimationIntervalBySceneChange(DEFAULT_INTERVAL); - } - - _isReplaceScene = true; -} - -void EngineDataManager::onBeforeReadFile() -{ - _isReadFile = true; -} - -void EngineDataManager::notifyGameStatusIfCpuOrGpuLevelChanged() -{ - // calculate CPU & GPU levels - int cpuLevel = 0; - int gpuLevel = 0; - - int levelChangeReason = LEVEL_CHANGE_REASON_NONE; - - Director* director = Director::getInstance(); - int totalNodeCount = Node::getAttachedNodeCount(); - int totalParticleCount = getTotalParticleCount(); - int totalActionCount = director->getActionManager()->getNumberOfRunningActions(); - int totalPlayingAudioCount = experimental::AudioEngine::getPlayingAudioCount(); - - { - float cpuLevelNode = toCpuLevelPerFactor(totalNodeCount, cbCpuLevelNode); - float cpuLevelParticle = toCpuLevelPerFactor(totalParticleCount, cbCpuLevelParticle); - float cpuLevelAction = toCpuLevelPerFactor(totalActionCount, cbCpuLevelAction); - float cpuLevelAudio = toCpuLevelPerFactor(totalPlayingAudioCount, cbCpuLevelAudio); - float fCpuLevel = cpuLevelNode + cpuLevelParticle + cpuLevelAction + cpuLevelAudio; - float highestCpuLevel = CARRAY_SIZE(_cpuLevelArr) * 1.0f; - fCpuLevel = fCpuLevel > highestCpuLevel ? highestCpuLevel : fCpuLevel; - cpuLevel = std::floor(fCpuLevel); - -#if EDM_DEBUG - if (_printCpuGpuLevelCounter > _printCpuGpuLevelThreshold) - { - LOGD("DEBUG: cpu level: %d, node: (%f, %d), particle: (%f, %d), action: (%f, %d), audio: (%f, %d)", - cpuLevel, cpuLevelNode, totalNodeCount, cpuLevelParticle, totalParticleCount, cpuLevelAction, totalActionCount, cpuLevelAudio, totalPlayingAudioCount); - } -#endif - if (_oldCpuLevel < 0 - || fCpuLevel < (1.0f * _oldCpuLevel - _levelDecreaseThreshold) - || cpuLevel > _oldCpuLevel - ) - { - LOGD("NOTIFY: cpu level: %d, node: (%f, %d), particle: (%f, %d), action: (%f, %d), audio: (%f, %d)", - cpuLevel, cpuLevelNode, totalNodeCount, cpuLevelParticle, totalParticleCount, cpuLevelAction, totalActionCount, cpuLevelAudio, totalPlayingAudioCount); - levelChangeReason |= LEVEL_CHANGE_REASON_CPU; - _oldCpuLevel = cpuLevel; - } - else - { - // Adjust cpu level to old cpu level, it's necessary because we have a level decrease threshold. - // For instance, if threshold is 0.2, fCpuLevel = 1.9, cpuLevel = 1, _oldCpuLevel = 2, - // fCpuLevel is in the decrease threshold region, we need to still notify '2' to vendor. - // Therefore, reset cpuLevel to 2 here. - cpuLevel = _oldCpuLevel; - } - } - - { - auto renderer = director->getRenderer(); - int vertexCount = renderer->getDrawnVertices(); - int drawCount = renderer->getDrawnBatches(); - - float gpuLevelVertex = toGpuLevelPerFactor(vertexCount, cbGpuLevelVertex); - float gpuLevelDraw = toGpuLevelPerFactor(drawCount, cbGpuLevelDraw); - float fGpuLevel = gpuLevelVertex + gpuLevelDraw; - float highestGpuLevel = CARRAY_SIZE(_gpuLevelArr) * 1.0f; - fGpuLevel = fGpuLevel > highestGpuLevel ? highestGpuLevel : fGpuLevel; - gpuLevel = std::floor(fGpuLevel); - -#if EDM_DEBUG - if (_printCpuGpuLevelCounter > _printCpuGpuLevelThreshold) - { - LOGD("DEBUG: gpu level: %d, vertex: (%f, %d), draw: (%f, %d)", gpuLevel, gpuLevelVertex, vertexCount, gpuLevelDraw, drawCount); - } -#endif - if (_oldGpuLevel < 0 - || fGpuLevel < (1.0f * _oldGpuLevel - _levelDecreaseThreshold) - || gpuLevel > _oldGpuLevel - ) - { - LOGD("NOTIFY: gpu level: %d, vertex: (%f, %d), draw: (%f, %d)", gpuLevel, gpuLevelVertex, vertexCount, gpuLevelDraw, drawCount); - levelChangeReason |= LEVEL_CHANGE_REASON_GPU; - _oldGpuLevel = gpuLevel; - } - else - { - // Adjust gpu level to old gpu level, it's necessary because we have a level decrease threshold. - // For instance, if threshold is 0.2, fGpuLevel = 1.9, gpuLevel = 1, _oldGpuLevel = 2, - // fGpuLevel is in the decrease threshold region, we need to still notify '2' to vendor. - // Therefore, reset gpuLevel to 2 here. - gpuLevel = _oldGpuLevel; - } - } - - float expectedFps = 1.0f / _animationInterval; - float realFps = director->getFrameRate(); - bool isLowRealFps = false; - if (_fpsUpdatedWatcher.isStarted()) - { - _fpsUpdatedWatcher.update(realFps); - if (_fpsUpdatedWatcher.isStable()) - { - LOGD("FPS(%.01f) is stable now!", realFps); - _fpsUpdatedWatcher.reset(); - } - } - else - { -#if EDM_DEBUG - if (_isCollectFpsEnabled) - { - _fpsCollector.update(realFps); - } -#endif - if (0 == _lowFpsCheckMode) - { - // Low Real Fps definition: - // CurrentFrameTimeCost > ExpectedFrameTimeCost + ExpectedFrameTimeCost * LowRealFpsThreshold - isLowRealFps = (1.0f / realFps) > (_animationInterval + _animationInterval * _lowRealFpsThreshold); - if (isLowRealFps) - { - auto now = std::chrono::steady_clock::now(); - float lowFpsIntervalInSeconds = std::chrono::duration_cast(now - _lastTimeNotifyLevelByLowFps).count() / 1000000.0f; - - if (_continuousLowRealFpsCount >= _continuousLowRealFpsThreshold - && lowFpsIntervalInSeconds > _notifyLevelByLowFpsThreshold) - { - _continuousLowRealFpsCount = 0; - LOGD("Detected low fps (mode 0): real: %.01f, expected: %.01f, interval: %.03fs", realFps, expectedFps, lowFpsIntervalInSeconds); - _lastTimeNotifyLevelByLowFps = now; - } - else - { - // Reset this varible to false since it's smaller than notification threshold. - // In this way, we could avoid to notify vendor frequently. - isLowRealFps = false; - - ++_continuousLowRealFpsCount; - } - } - else - { - _continuousLowRealFpsCount = 0; - } - } - else - { - ++_calculateAvgFpsCount; - _calculateAvgFpsSum += realFps; - - auto now = std::chrono::steady_clock::now(); - float interval = std::chrono::duration_cast(now - _lastTimeCalculateAvgFps).count() / 1000000.0f; - - if (interval > _notifyLevelByLowFpsThreshold) - { - float avgFps = _calculateAvgFpsSum / _calculateAvgFpsCount; - // Low Real Fps definition: - // CurrentFrameTimeCost > ExpectedFrameTimeCost + ExpectedFrameTimeCost * LowRealFpsThreshold - isLowRealFps = (1.0f / avgFps) > (_animationInterval + _animationInterval * _lowRealFpsThreshold); - - if (isLowRealFps) - { - LOGD("Detected low fps (mode 1): avg: %.01f, expected: %.01f, interval: %.03fs, framecount: %u", avgFps, expectedFps, interval, _calculateAvgFpsCount); - } - - // Reset counter - _calculateAvgFpsCount = 0; - _calculateAvgFpsSum = 0.0f; - - // Reset last time of calculating average fps - _lastTimeCalculateAvgFps = now; - } - } - } - - if (levelChangeReason != LEVEL_CHANGE_REASON_NONE || _isFpsChanged || isLowRealFps) - { - _isFpsChanged = false; - - // LOGD("expectedFps: %f, realFps: %f", expectedFps, realFps); - if (isLowRealFps) - { - _cpuFpsFactor = _gpuFpsFactor = 1.0f; - } - else - { - _cpuFpsFactor = _gpuFpsFactor = expectedFps / 60.0f; - } - - int newCpuLevelMulFactor = std::ceil(cpuLevel * _cpuFpsFactor); - int newGpuLevelMulFactor = std::ceil(gpuLevel * _gpuFpsFactor); - - if (isLowRealFps - || newCpuLevelMulFactor != _oldCpuLevelMulFactor - || newGpuLevelMulFactor != _oldGpuLevelMulFactor) - { - const char* logPrefix = "[level changed]"; - if (isLowRealFps) - { - logPrefix = "[low fps]"; - if (newCpuLevelMulFactor < _minValueOfNotifyCpuLevelByLowFps) - { - newCpuLevelMulFactor = _minValueOfNotifyCpuLevelByLowFps; - } - - if (newGpuLevelMulFactor < _minValueOfNotifyGpuLevelByLowFps) - { - newGpuLevelMulFactor = _minValueOfNotifyGpuLevelByLowFps; - } - } - - int cpuLevelToNotify = newCpuLevelMulFactor; - int gpuLevelToNotify = newGpuLevelMulFactor; - - // Set CPU or GPU level to -2 only when fps isn't changed and isn't in low fps. - if (!_isFpsChanged && !isLowRealFps) - { - if (_oldGpuLevelMulFactor == newGpuLevelMulFactor) - { - gpuLevelToNotify = -2; // Only CPU level has been changed, pass -2 to GPU level. - } - else if (_oldCpuLevelMulFactor == newCpuLevelMulFactor) - { - cpuLevelToNotify = -2; // Only GPU level has been changed, pass -2 to CPU level. - } - } - - LOGD("%s notifyGameStatus: IN_SCENE(%d, %d), cpuLevel: %d->%d(%d), gpuLevel: %d->%d(%d), factor: %f", - logPrefix, - cpuLevel, gpuLevel, - _oldCpuLevelMulFactor, cpuLevelToNotify, newCpuLevelMulFactor, - _oldGpuLevelMulFactor, gpuLevelToNotify, newGpuLevelMulFactor, - _cpuFpsFactor); - - notifyGameStatus(GameStatus::IN_SCENE, cpuLevelToNotify, gpuLevelToNotify); - - _oldCpuLevelMulFactor = newCpuLevelMulFactor; - _oldGpuLevelMulFactor = newGpuLevelMulFactor; - } - } -} - -// static -void EngineDataManager::onAfterDrawScene(EventCustom* event) -{ - calculateFrameLost(); - -#if EDM_DEBUG - ++_printCpuGpuLevelCounter; - ++_printCpuUsageCounter; -#endif - - if (_isReplaceScene) - { - ++_drawCountInterval; - - if (_drawCountInterval > _drawCountThreshold) - { - _drawCountInterval = 0; - _isReplaceScene = false; - - // setAnimationIntervalBySceneChange to -1.0f to - // make developer's or huawei's FPS setting take effect. - setAnimationIntervalBySceneChange(-1.0f); - - _oldCpuLevel = -1; - _oldGpuLevel = -1; - _oldCpuLevelMulFactor = -1; - _oldGpuLevelMulFactor = -1; - notifyGameStatus(GameStatus::SCENE_CHANGE_END, -1, -1); - } - else if (_isReadFile) - { - _drawCountInterval = 0; - } - _isReadFile = false; - } - else - { - notifyGameStatusIfCpuOrGpuLevelChanged(); - } - -#if EDM_DEBUG - if (_printCpuUsageCounter > _printCpuUsageThreshold) - { - _printCpuUsageCounter = 0; - _cpuTracker.update(); - _cpuTracker.printCurrentState(); - } - - if (_printCpuGpuLevelCounter > _printCpuGpuLevelThreshold) - { - _printCpuGpuLevelCounter = 0; - } -#endif -} - -// static -void EngineDataManager::onEnterForeground(EventCustom* event) -{ - _isInBackground = false; - - static bool isFirstTime = true; - LOGD("onEnterForeground, isFirstTime: %d", isFirstTime); - - if (isFirstTime) - { - isFirstTime = false; - } - else - { - resetLastTime(); - // Reset the old status - _oldCpuLevel = -1; - _oldGpuLevel = -1; - _oldCpuLevelMulFactor = -1; - _oldGpuLevelMulFactor = -1; - // Notify CPU/GPU level to system since old levels have been changed. - notifyGameStatusIfCpuOrGpuLevelChanged(); - } -} - -void EngineDataManager::onEnterBackground(EventCustom* event) -{ - LOGD("EngineDataManager::onEnterBackground ..."); - _isInBackground = true; -} - -// static -void EngineDataManager::init() -{ - parseDebugConfig(); - -#if EDM_DEBUG - if (_forceEnableOptimization) - { - LOGD("init, force enable optimization!"); - _isSupported = true; - } -#endif - - if (!_isSupported) - return; - - if (_isInitialized) - return; - - resetLastTime(); - - LOGD("EngineDataManager version: %s", ENGINE_DATA_MANAGER_VERSION); - - auto dispatcher = Director::getInstance()->getEventDispatcher(); - dispatcher->addCustomEventListener(Director::EVENT_AFTER_DRAW, std::bind(onAfterDrawScene, std::placeholders::_1)); - dispatcher->addCustomEventListener(Director::EVENT_BEFORE_SET_NEXT_SCENE, std::bind(onBeforeSetNextScene, std::placeholders::_1)); - dispatcher->addCustomEventListener(EVENT_COME_TO_FOREGROUND, std::bind(onEnterForeground, std::placeholders::_1)); - dispatcher->addCustomEventListener(EVENT_COME_TO_BACKGROUND, std::bind(onEnterBackground, std::placeholders::_1)); - - notifyGameStatus(GameStatus::LAUNCH_BEGIN, 5, -1); - - -#if EDM_DEBUG - _cpuTracker.update(); -#endif - _isInitialized = true; -} - -// static -void EngineDataManager::destroy() -{ - if (!_isSupported) - return; -} - -// static -void EngineDataManager::notifyGameStatus(GameStatus type, int cpuLevel, int gpuLevel) -{ - if (!_isSupported) - return; - - JniMethodInfo methodInfo; - if (JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME_ENGINE_DATA_MANAGER, "notifyGameStatus", "(III)V")) - { - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)type, cpuLevel, gpuLevel); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } -} - -static void updateFinalAnimationInterval() -{ - if (_animationIntervalBySceneChange > 0.0f) { - _animationInterval = _animationIntervalBySceneChange; - } else if (_animationIntervalByDirectorPaused > 0.0f) { - _animationInterval = _animationIntervalByDirectorPaused; - } else if (_animationIntervalBySystem > 0.0f) { - _animationInterval = _animationIntervalBySystem; - } else { - _animationInterval = _animationIntervalByEngineOrGame; - } -} - -void EngineDataManager::setAnimationInterval(float interval, SetIntervalReason reason) -{ - float oldFps = 0.0f; - float newFps = 0.0f; - - if (reason == SetIntervalReason::BY_GAME) { - LOGD("setAnimationInterval by game: %.04f", interval); - - if (_isSupported) - { - float oldInterval = _animationIntervalBySystem > 0.0f ? _animationIntervalBySystem : _animationIntervalByEngineOrGame; - oldFps = (float)ceil(1.0f/oldInterval); - newFps = (float)ceil(1.0f/interval); - } - - _animationIntervalByDirectorPaused = -1.0f; - // Reset _animationIntervalBySystem to -1 to make developer's FPS configuration take effect. - _animationIntervalBySystem = -1.0f; - _animationIntervalByEngineOrGame = interval; - } else if (reason == SetIntervalReason::BY_ENGINE) { - LOGD("setAnimationInterval by engine: %.04f", interval); - _animationIntervalByDirectorPaused = -1.0f; - _animationIntervalByEngineOrGame = interval; - } else if (reason == SetIntervalReason::BY_SYSTEM) { - LOGD("setAnimationInterval by system: %.04f", interval); - if (interval > 0.0f) { - _animationIntervalBySystem = interval; - } else { - _animationIntervalBySystem = -1.0f; - } - } else if (reason == SetIntervalReason::BY_SCENE_CHANGE) { - LOGD("setAnimationInterval by scene change: %.04f", interval); - if (interval > 0.0f) { - _animationIntervalBySceneChange = interval; - } else { - _animationIntervalBySceneChange = -1.0f; - } - } else if (reason == SetIntervalReason::BY_DIRECTOR_PAUSE) { - LOGD("setAnimationInterval by director paused: %.04f", interval); - _animationIntervalByDirectorPaused = interval; - } else { - LOGD("setAnimationInterval by UNKNOWN reason: %.04f", interval); - } - updateFinalAnimationInterval(); - - LOGD("JNI setAnimationInterval: %f", _animationInterval); - JniHelper::callStaticVoidMethod(CLASS_NAME_RENDERER, "setAnimationInterval", _animationInterval); - - if (_isSupported) - { - // Notify system that FPS configuration has been changed by game. - // notifyFpsChanged has to be invoked at the end. - if (fabs(oldFps - newFps) > 1.0f) - { - _isFpsChanged = true; - notifyFpsChanged(oldFps, newFps); - _fpsUpdatedWatcher.start(); - } - } -} - -// static -void EngineDataManager::notifyContinuousFrameLost(int continueFrameLostCycle, int continueFrameLostThreshold, int times) -{ - if (!_isSupported) - return; - - JniMethodInfo methodInfo; - if (JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME_ENGINE_DATA_MANAGER, "notifyContinuousFrameLost", "(III)V")) - { - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, continueFrameLostCycle, continueFrameLostThreshold, times); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } -} - -// static -void EngineDataManager::notifyLowFps(int lowFpsCycle, float lowFpsThreshold, int frames) -{ - if (!_isSupported) - return; - - JniMethodInfo methodInfo; - if (JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME_ENGINE_DATA_MANAGER, "notifyLowFps", "(IFI)V")) - { - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, lowFpsCycle, lowFpsThreshold, frames); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } -} - -// static -void EngineDataManager::notifyFpsChanged(float oldFps, float newFps) -{ - if (!_isSupported) - return; - - LOGD("notifyFpsChanged: %.0f -> %.0f", oldFps, newFps); - JniMethodInfo methodInfo; - if (JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME_ENGINE_DATA_MANAGER, "notifyFpsChanged", "(FF)V")) - { - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, oldFps, newFps); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } -} - -void EngineDataManager::nativeOnQueryFps(JNIEnv* env, jobject thiz, jintArray arrExpectedFps, jintArray arrRealFps) -{ - if (!_isSupported) - return; - - jsize arrLenExpectedFps = env->GetArrayLength(arrExpectedFps); - jsize arrLenRealFps = env->GetArrayLength(arrRealFps); - - if (arrLenExpectedFps > 0 && arrLenRealFps > 0) - { - Director* director = Director::getInstance(); - jboolean isCopy = JNI_FALSE; - jint* expectedFps = env->GetIntArrayElements(arrExpectedFps, &isCopy); - float animationInterval = director->getAnimationInterval(); - *expectedFps = (int)std::ceil(1.0f / animationInterval); - - jint* realFps = env->GetIntArrayElements(arrRealFps, &isCopy); - *realFps = (int)std::ceil(director->getFrameRate()); - - // Log before expectedFps & realFps is released. - LOGD("nativeOnQueryFps, realFps: %d, expected: %d", *realFps, *expectedFps); - env->ReleaseIntArrayElements(arrExpectedFps, expectedFps, 0); - env->ReleaseIntArrayElements(arrRealFps, realFps, 0); - } - else - { - LOGE("Invalid array size, expectedFps.size=%d, realFps.size=%d", arrLenExpectedFps, arrLenRealFps); - } -} - -void EngineDataManager::nativeOnChangeContinuousFrameLostConfig(JNIEnv* env, jobject thiz, jint continueFrameLostCycle, jint continueFrameLostThreshold) -{ - if (!_isSupported) - return; - - LOGD("nativeOnChangeContinuousFrameLostConfig, continueFrameLostCycle: %d, continueFrameLostThreshold: %d", continueFrameLostCycle, continueFrameLostThreshold); - - _continuousFrameLostCycle = continueFrameLostCycle; - _continuousFrameLostThreshold = continueFrameLostThreshold; -} - -void EngineDataManager::nativeOnChangeLowFpsConfig(JNIEnv* env, jobject thiz, jint lowFpsCycle, jfloat lowFpsThreshold) -{ - if (!_isSupported) - return; - - LOGD("nativeOnChangeLowFpsConfig, lowFpsCycle: %d, lowFpsThreshold: %f", lowFpsCycle, lowFpsThreshold); - _lowFpsCycle = lowFpsCycle; - _lowFpsThreshold = lowFpsThreshold; -} - -void EngineDataManager::nativeOnChangeExpectedFps(JNIEnv* env, jobject thiz, jint fps) -{ - if (!_isSupported) - return; - - if (fps < -1 || fps > 60) - { - LOGE("Setting fps (%d) isn't supported!", fps); - return; - } - - auto director = cocos2d::Director::getInstance(); - float defaultAnimationInterval = director->getAnimationInterval(); - - int defaultFps = static_cast(std::ceil(1.0f/defaultAnimationInterval)); - - if (fps > defaultFps) - { - LOGD("nativeOnChangeExpectedFps, fps (%d) is greater than default fps (%d), reset it to default!", fps, defaultFps); - fps = -1; - } - - LOGD("nativeOnChangeExpectedFps, set fps: %d, default fps: %d", fps, defaultFps); - - if (fps > 0) - { - setAnimationIntervalBySystem(1.0f/fps); - LOGD("nativeOnChangeExpectedFps, fps (%d) was set successfuly!", fps); - } - else if (fps == -1) // -1 means to reset to default FPS - { - setAnimationIntervalBySystem(-1.0f); - LOGD("nativeOnChangeExpectedFps, fps (%d) was reset successfuly!", defaultFps); - } -} - -void EngineDataManager::nativeOnChangeSpecialEffectLevel(JNIEnv* env, jobject thiz, jint level) -{ - if (!_isSupported) - return; - - LOGD("nativeOnChangeSpecialEffectLevel, set level: %d", level); - - if (level < 0 || level >= CARRAY_SIZE(_particleLevelArr)) - { - LOGE("Pass a wrong level value: %d, only 0 ~ %d is supported!", level, CARRAY_SIZE(_particleLevelArr) - 1); - return; - } - - ParticleSystem::setTotalParticleCountFactor(_particleLevelArr[level]); -} - -void EngineDataManager::nativeOnChangeMuteEnabled(JNIEnv* env, jobject thiz, jboolean isMuteEnabled) -{ - if (!_isSupported) - return; - - LOGD("nativeOnChangeMuteEnabled, isMuteEnabled: %d", isMuteEnabled); - cocos2d::experimental::AudioEngine::setEnabled(!isMuteEnabled); -} - -} // namespace cocos2d { - -///////////////////////////// -extern "C" { - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeSetSupportOptimization)(JNIEnv* env, jobject thiz, jboolean isSupported) -{ - LOGD("nativeSetSupportOptimization: %d", isSupported); - _isSupported = (isSupported == JNI_TRUE); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnQueryFps)(JNIEnv* env, jobject thiz, jintArray arrExpectedFps, jintArray arrRealFps) -{ - EngineDataManager::nativeOnQueryFps(env, thiz, arrExpectedFps, arrRealFps); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnChangeContinuousFrameLostConfig)(JNIEnv* env, jobject thiz, jint continueFrameLostCycle, jint continueFrameLostThreshold) -{ - EngineDataManager::nativeOnChangeContinuousFrameLostConfig(env, thiz, continueFrameLostCycle, continueFrameLostThreshold); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnChangeLowFpsConfig)(JNIEnv* env, jobject thiz, jint lowFpsCycle, jfloat lowFpsThreshold) -{ - EngineDataManager::nativeOnChangeLowFpsConfig(env, thiz, lowFpsCycle, lowFpsThreshold); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnChangeExpectedFps)(JNIEnv* env, jobject thiz, jint fps) -{ - EngineDataManager::nativeOnChangeExpectedFps(env, thiz, fps); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnChangeSpecialEffectLevel)(JNIEnv* env, jobject thiz, jint level) -{ - EngineDataManager::nativeOnChangeSpecialEffectLevel(env, thiz, level); -} - -JNIEXPORT void JNICALL JNI_FUNC_PREFIX(nativeOnChangeMuteEnabled)(JNIEnv* env, jobject thiz, jboolean enabled) -{ - EngineDataManager::nativeOnChangeMuteEnabled(env, thiz, enabled); -} -///////////////////////////// - -} // extern "C" { diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h deleted file mode 100644 index c07db6f60cf8..000000000000 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxEngineDataManager.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#pragma once -#include "base/ccTypes.h" - -#include -#include -#include - -#include - -namespace cocos2d { - -class ParticleSystem; -class EventCustom; - -class EngineDataManager -{ -public: - static void init(); - static void destroy(); - - static std::string getVendorInfo(); - - enum class GameStatus - { - LAUNCH_BEGIN = 0, - LAUNCH_END, - SCENE_CHANGE_BEGIN, - SCENE_CHANGE_END, - IN_SCENE - }; - - static void notifyGameStatus(GameStatus type, int cpuLevel, int gpuLevel); - static void setAnimationInterval(float interval, SetIntervalReason reason); - // Used in FileUtilsAndroid::getContents - static void onBeforeReadFile(); - -private: - static void notifyContinuousFrameLost(int frameLostCycle, int continueFrameLostThreshold, int times); - static void notifyLowFps(int lowFpsCycle, float lowFpsThreshold, int frames); - static void notifyFpsChanged(float oldFps, float newFps); - static void notifyGameStatusIfCpuOrGpuLevelChanged(); - - static void calculateFrameLost(); - - static void onBeforeSetNextScene(EventCustom* event); - static void onAfterDrawScene(EventCustom* event); - static void onEnterForeground(EventCustom* event); - static void onEnterBackground(EventCustom* event); - - static int getTotalParticleCount(); - -// For JNI function use, should be public -public: - static void nativeOnQueryFps(JNIEnv* env, jobject thiz, jintArray arrExpectedFps, jintArray arrRealFps); - static void nativeOnChangeContinuousFrameLostConfig(JNIEnv* env, jobject thiz, jint continueFrameLostCycle, jint continueFrameLostThreshold); - static void nativeOnChangeLowFpsConfig(JNIEnv* env, jobject thiz, jint lowFpsCycle, jfloat lowFpsThreshold); - static void nativeOnChangeExpectedFps(JNIEnv* env, jobject thiz, jint fps); - static void nativeOnChangeSpecialEffectLevel(JNIEnv* env, jobject thiz, jint level); - static void nativeOnChangeMuteEnabled(JNIEnv* env, jobject thiz, jboolean enabled); -}; - -} // namespace cocos2d { \ No newline at end of file diff --git a/cocos/platform/android/jni/ProcessCpuTracker.cpp b/cocos/platform/android/jni/ProcessCpuTracker.cpp deleted file mode 100644 index 66acd2e2cf58..000000000000 --- a/cocos/platform/android/jni/ProcessCpuTracker.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/android/jni/ProcessCpuTracker.h" - -#ifdef ANDROID -#include -#include -#include -#endif -#include -#include -#include -#include -#include - -#ifdef ANDROID -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "ProcessCpuTracker", __VA_ARGS__) -#else -#define LOGD printf -#endif - -typedef struct _CpuInfo -{ - long userTime; // Unit: jiffies - long niceTime; - long systemTime; - long idleTime; - long ioWaitTime; - long irqTime; - long softIrqTime; -}CpuInfo; - -// Return 0 means the end of buffer -static bool readLine(char* p, const char* end, char** next) -{ - if (p == NULL) - { - *next = NULL; - return false; - } - - while (*p != '\n' && p < end) - ++p; - - if (*p == '\n') - {// line break - *p = '\0'; // Set to \0 to make a sub-sequence string - *next = ++p; - return true; - } - else - {// end of buffer - *next = NULL; - return true; - } -} - -static std::vector readProcStat() -{ - std::vector cpuInfos; - cpuInfos.reserve(13); - char buffer[1024] = {0}; - -#ifdef ANDROID - int fd = open("/proc/stat", O_RDONLY); - - if (fd < 0) - { - return cpuInfos; - } - - const int len = read(fd, buffer, sizeof(buffer)-1); - close(fd); - - if (len < 0) { - LOGD("Unable to open process fd=%d", fd); - return cpuInfos; - } - buffer[len] = 0; -#else - FILE* fp = fopen("fonts/stat-huawei.txt", "rb"); - if (fp == NULL) - return cpuInfos; - fread(buffer, sizeof(buffer)-1, 1, fp); - fclose(fp); - size_t len = strlen(buffer); -#endif - - char* p = buffer; - const char* end = p + len; - char* next = NULL; - int cpuIndex; - const int COLUMN = sizeof(CpuInfo) / sizeof(long); - size_t i = 0; - - while (readLine(p, end, &next)) - { - // break if the line with no cpu prefix - if (p[0] != 'c' || p[1] != 'p' || p[2] != 'u') - break; - -// LOGD("%s\n", p); - // Removes 'cpu%d' prefix - p = p + 3; - - if (*p == ' ') - { // The first line means the average cpu usage - cpuIndex = 0; - } - else - { - cpuIndex = strtol(p, &p, 10) + 1; - } - -// LOGD("cpu index: %d\n", cpuIndex); - - cpuInfos.resize(cpuIndex + 1); - - for (i = 0; i < COLUMN; ++i) - { - long value = strtol(p, &p, 10); -// LOGD("%ld ", value); - - CpuInfo& info = cpuInfos[cpuIndex]; - long* e = (long*)&info + i; - *e = value; - } -// LOGD("%s", "\n"); - - p = next; - } - - return cpuInfos; -} - -void ProcessCpuTracker::update() -{ - static const int JIFFYMILLIS = 10; - std::vector cpuInfos = readProcStat(); - if (!cpuInfos.empty()) - { - if (_cpuTimeInfos.size() < cpuInfos.size()) - { - _cpuTimeInfos.resize(cpuInfos.size()); - } - -// LOGD("cpuInfo size: %d", (int)cpuInfos.size()); - - for (size_t i = 0, len = cpuInfos.size(); i < len; ++i) - { - CpuTimeInfo& cpuTimeInfo = _cpuTimeInfos[i]; - const CpuInfo& cpuInfo = cpuInfos[i]; - // Total user time is user + nice time. - const long usertime = (cpuInfo.userTime + cpuInfo.niceTime) * JIFFYMILLIS; - // Total system time is simply system time. - const long systemtime = cpuInfo.systemTime * JIFFYMILLIS; - // Total idle time is simply idle time. - const long idletime = cpuInfo.idleTime * JIFFYMILLIS; - // Total irq time is iowait + irq + softirq time. - const long iowaittime = cpuInfo.ioWaitTime * JIFFYMILLIS; - const long irqtime = cpuInfo.irqTime * JIFFYMILLIS; - const long softirqtime = cpuInfo.softIrqTime * JIFFYMILLIS; - // This code is trying to avoid issues with idle time going backwards, - // but currently it gets into situations where it triggers most of the time. :( - if (false || (usertime >= cpuTimeInfo.mBaseUserTime && systemtime >= cpuTimeInfo.mBaseSystemTime - && iowaittime >= cpuTimeInfo.mBaseIoWaitTime && irqtime >= cpuTimeInfo.mBaseIrqTime - && softirqtime >= cpuTimeInfo.mBaseSoftIrqTime && idletime >= cpuTimeInfo.mBaseIdleTime)) { - cpuTimeInfo.mRelUserTime = usertime - cpuTimeInfo.mBaseUserTime; - cpuTimeInfo.mRelSystemTime = systemtime - cpuTimeInfo.mBaseSystemTime; - cpuTimeInfo.mRelIoWaitTime = iowaittime - cpuTimeInfo.mBaseIoWaitTime; - cpuTimeInfo.mRelIrqTime = irqtime - cpuTimeInfo.mBaseIrqTime; - cpuTimeInfo.mRelSoftIrqTime = softirqtime - cpuTimeInfo.mBaseSoftIrqTime; - cpuTimeInfo.mRelIdleTime = idletime - cpuTimeInfo.mBaseIdleTime; -// if (true) { -// LOGD("CPU%d, Total U: %ld, N:%ld S:%ld I:%ld W:%ld Q:%ld O:%ld\n", -// (int)i, -// cpuInfo.userTime, -// cpuInfo.niceTime, -// cpuInfo.systemTime, -// cpuInfo.idleTime, -// cpuInfo.ioWaitTime, -// cpuInfo.irqTime, -// cpuInfo.softIrqTime -// ); -// LOGD("CPU%d, Rel U:%ld, S:%ld, I:%ld, Q:%ld\n", -// (int)i, -// cpuTimeInfo.mRelUserTime, -// cpuTimeInfo.mRelSystemTime, -// cpuTimeInfo.mRelIdleTime, -// cpuTimeInfo.mRelIrqTime -// ); -// if (cpuTimeInfo.mRelUserTime < 0 -// || cpuTimeInfo.mRelSystemTime < 0 -// || cpuTimeInfo.mRelIdleTime < 0 -// || cpuTimeInfo.mRelIrqTime < 0) -// { -// LOGD("CPU%d,base U:%ld, S:%ld, I:%ld, Q:%ld\n", -// (int)i, -// cpuTimeInfo.mBaseUserTime, -// cpuTimeInfo.mBaseSystemTime, -// cpuTimeInfo.mBaseIdleTime, -// cpuTimeInfo.mBaseIrqTime -// ); -// } -// } - cpuTimeInfo.mBaseUserTime = usertime; - cpuTimeInfo.mBaseSystemTime = systemtime; - cpuTimeInfo.mBaseIoWaitTime = iowaittime; - cpuTimeInfo.mBaseIrqTime = irqtime; - cpuTimeInfo.mBaseSoftIrqTime = softirqtime; - cpuTimeInfo.mBaseIdleTime = idletime; - } else { - -// if (usertime < cpuTimeInfo.mBaseUserTime) -// { -// LOGD("ERROR: usertime: %ld, base: %ld", usertime, cpuTimeInfo.mBaseUserTime); -// } -// -// if (systemtime < cpuTimeInfo.mBaseSystemTime) -// { -// LOGD("ERROR: systemtime: %ld, base: %ld", systemtime, cpuTimeInfo.mBaseSystemTime); -// } -// -// if (iowaittime < cpuTimeInfo.mBaseIoWaitTime) -// { -// LOGD("ERROR: iowaittime: %ld, base: %ld", iowaittime, cpuTimeInfo.mBaseIoWaitTime); -// } -// -// if (irqtime < cpuTimeInfo.mBaseIrqTime) -// { -// LOGD("ERROR: irqtime: %ld, base: %ld", irqtime, cpuTimeInfo.mBaseIrqTime); -// } -// -// if (softirqtime < cpuTimeInfo.mBaseSoftIrqTime) -// { -// LOGD("ERROR: softirqtime: %ld, base: %ld", softirqtime, cpuTimeInfo.mBaseSoftIrqTime); -// } -// -// if (idletime < cpuTimeInfo.mBaseIdleTime) -// { -// LOGD("ERROR: idletime: %ld, base: %ld", idletime, cpuTimeInfo.mBaseIdleTime); -// } - - if (usertime > 0 || idletime > 0) - { - cpuTimeInfo.mBaseUserTime = usertime; - cpuTimeInfo.mBaseSystemTime = systemtime; - cpuTimeInfo.mBaseIoWaitTime = iowaittime; - cpuTimeInfo.mBaseIrqTime = irqtime; - cpuTimeInfo.mBaseSoftIrqTime = softirqtime; - cpuTimeInfo.mBaseIdleTime = idletime; - } - - cpuTimeInfo.mRelUserTime = 0; - cpuTimeInfo.mRelSystemTime = 0; - cpuTimeInfo.mRelIoWaitTime = 0; - cpuTimeInfo.mRelIrqTime = 0; - cpuTimeInfo.mRelSoftIrqTime = 0; - cpuTimeInfo.mRelIdleTime = 0; - LOGD("CPU: %d, /proc/stats has gone backwards; skipping CPU update\n", (int)i); - } - } - } -} - -static long printRatio(std::stringstream& ss, long numerator, long denominator) { - long hundreds = 0; - if (denominator > 0) - { - long thousands = (numerator*1000)/denominator; - hundreds = thousands/10; - ss << hundreds; - if (hundreds < 10) { - long remainder = thousands - (hundreds*10); - - if (remainder != 0) { - ss << '.'; - ss << remainder; - } - } - } - else - { - ss << '0'; - } - ss << " "; - - return hundreds; -} - -static long printProcessCPU(std::stringstream& ss, long totalTime, long user) -{ - return printRatio(ss, user, totalTime); -} - -void ProcessCpuTracker::printCurrentState() -{ - std::stringstream ss; - long totalCpuUsage = 0; - for (size_t i = 0, len = _cpuTimeInfos.size(); i < len; ++i) - { - CpuTimeInfo& cpuTimeInfo = _cpuTimeInfos[i]; - const long totalTime = cpuTimeInfo.mRelUserTime + cpuTimeInfo.mRelSystemTime + cpuTimeInfo.mRelIoWaitTime - + cpuTimeInfo.mRelIrqTime + cpuTimeInfo.mRelSoftIrqTime + cpuTimeInfo.mRelIdleTime; - -// if (totalTime <= 0) -// { -// LOGD("cjh totalTime, i=%d: %ld mRelUserTime: %ld, mRelSystemTime: %ld, mRelIoWaitTime: %ld, mRelIrqTime: %ld, mRelSoftIrqTime: %ld, mRelIdleTime: %ld", -// (int)i, -// totalTime, -// cpuTimeInfo.mRelUserTime, -// cpuTimeInfo.mRelSystemTime, -// cpuTimeInfo.mRelIoWaitTime, -// cpuTimeInfo.mRelIrqTime, -// cpuTimeInfo.mRelSoftIrqTime, -// cpuTimeInfo.mRelIdleTime -// ); -// } - - const long preCoreUsage = printProcessCPU(ss, totalTime, cpuTimeInfo.mRelUserTime); - if (i > 0) - { - totalCpuUsage += preCoreUsage; - } - } - - ss << "T:"; - ss << totalCpuUsage; - std::string str = ss.str(); - LOGD("CPU: %s", str.c_str()); -} - - diff --git a/cocos/platform/android/jni/ProcessCpuTracker.h b/cocos/platform/android/jni/ProcessCpuTracker.h deleted file mode 100644 index eae84ab8474e..000000000000 --- a/cocos/platform/android/jni/ProcessCpuTracker.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#pragma once - -#include - -class ProcessCpuTracker -{ -public: - void update(); - void printCurrentState(); - -private: - struct CpuTimeInfo - { - CpuTimeInfo() - : mBaseUserTime(0) - , mBaseSystemTime(0) - , mBaseIoWaitTime(0) - , mBaseIrqTime(0) - , mBaseSoftIrqTime(0) - , mBaseIdleTime(0) - , mRelUserTime(0) - , mRelSystemTime(0) - , mRelIoWaitTime(0) - , mRelIrqTime(0) - , mRelSoftIrqTime(0) - , mRelIdleTime(0) - { - } - // All times are in milliseconds. They are converted from jiffies to milliseconds - // when extracted from the kernel. - long mBaseUserTime; - long mBaseSystemTime; - long mBaseIoWaitTime; - long mBaseIrqTime; - long mBaseSoftIrqTime; - long mBaseIdleTime; - - long mRelUserTime; - long mRelSystemTime; - long mRelIoWaitTime; - long mRelIrqTime; - long mRelSoftIrqTime; - long mRelIdleTime; - }; - - std::vector _cpuTimeInfos; -}; - - diff --git a/cocos/platform/android/jni/TouchesJni.cpp b/cocos/platform/android/jni/TouchesJni.cpp index 3331aa25256b..3b2c1946c54a 100644 --- a/cocos/platform/android/jni/TouchesJni.cpp +++ b/cocos/platform/android/jni/TouchesJni.cpp @@ -101,9 +101,7 @@ extern "C" { }; - JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyEvent(JNIEnv * env, jobject thiz, jint keyCode, jboolean isPressed) { - Director* pDirector = Director::getInstance(); - + JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyEvent(JNIEnv * env, jobject thiz, jint keyCode, jboolean isPressed) { auto iterKeyCode = g_keyCodeMap.find(keyCode); if (iterKeyCode == g_keyCodeMap.end()) { return JNI_FALSE; diff --git a/cocos/platform/apple/CCFileUtils-apple.h b/cocos/platform/apple/CCFileUtils-apple.h index 5e700d6cdb14..8c659689f829 100644 --- a/cocos/platform/apple/CCFileUtils-apple.h +++ b/cocos/platform/apple/CCFileUtils-apple.h @@ -50,7 +50,7 @@ class CC_DLL FileUtilsApple : public FileUtils virtual ~FileUtilsApple(); /* override functions */ virtual std::string getWritablePath() const override; - virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const override; + virtual std::string getFullPathForFilenameWithinDirectory(const std::string& directory, const std::string& filename) const override; virtual ValueMap getValueMapFromFile(const std::string& filename) const override; virtual ValueMap getValueMapFromData(const char* filedata, int filesize) const override; diff --git a/cocos/platform/apple/CCFileUtils-apple.mm b/cocos/platform/apple/CCFileUtils-apple.mm index 92bbfb45a8b0..e0d2274d8155 100644 --- a/cocos/platform/apple/CCFileUtils-apple.mm +++ b/cocos/platform/apple/CCFileUtils-apple.mm @@ -315,7 +315,7 @@ static int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, str return true; } -std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const +std::string FileUtilsApple::getFullPathForFilenameWithinDirectory(const std::string& directory, const std::string& filename) const { if (directory[0] != '/') { diff --git a/cocos/platform/apple/CCThread-apple.mm b/cocos/platform/apple/CCThread-apple.mm deleted file mode 100644 index b5816fdfe88e..000000000000 --- a/cocos/platform/apple/CCThread-apple.mm +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -#include "platform/CCThread.h" - -NS_CC_BEGIN - -void* ThreadHelper::createAutoreleasePool() -{ - id pool = [[NSAutoreleasePool alloc] init]; - return pool; -} - -void ThreadHelper::releaseAutoreleasePool(void *autoreleasePool) -{ - [(NSAutoreleasePool*)autoreleasePool release]; -} - -NS_CC_END diff --git a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp index b16cf473746b..6319dbf51cae 100644 --- a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp +++ b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp @@ -43,6 +43,8 @@ THE SOFTWARE. #include "platform/CCImage.h" #endif /* CC_ICON_SET_SUPPORT */ +#include "renderer/CCRenderer.h" + NS_CC_BEGIN GLViewImpl* GLFWEventHandler::_view = nullptr; @@ -294,6 +296,11 @@ bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float fram glfwWindowHint(GLFW_STENCIL_BITS,_glContextAttrs.stencilBits); glfwWindowHint(GLFW_SAMPLES, _glContextAttrs.multisamplingCount); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + // Don't create gl context. + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); +#endif int neededWidth = rect.size.width * _frameZoomFactor; int neededHeight = rect.size.height * _frameZoomFactor; @@ -349,6 +356,8 @@ bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float fram setFrameSize(rect.size.width, rect.size.height); +#if (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) + // check OpenGL version at first const GLubyte* glVersion = glGetString(GL_VERSION); @@ -373,6 +382,7 @@ bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float fram // // GLFW v3.2 no longer emits "onGLFWWindowSizeFunCallback" at creation time. Force default viewport: // setViewPortInPoints(0, 0, neededWidth, neededHeight); // +#endif return true; } @@ -440,18 +450,18 @@ void GLViewImpl::pollEvents() void GLViewImpl::enableRetina(bool enabled) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - _isRetinaEnabled = enabled; - if (_isRetinaEnabled) - { - _retinaFactor = 1; - } - else - { - _retinaFactor = 2; - } - updateFrameSize(); -#endif +// #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +// _isRetinaEnabled = enabled; +// if (_isRetinaEnabled) +// { +// _retinaFactor = 1; +// } +// else +// { +// _retinaFactor = 2; +// } +// updateFrameSize(); +// #endif } @@ -620,21 +630,21 @@ void GLViewImpl::updateFrameSize() int frameBufferW = 0, frameBufferH = 0; glfwGetFramebufferSize(_mainWindow, &frameBufferW, &frameBufferH); - if (frameBufferW == 2 * w && frameBufferH == 2 * h) - { - if (_isRetinaEnabled) - { - _retinaFactor = 1; - } - else - { - _retinaFactor = 2; - } - glfwSetWindowSize(_mainWindow, _screenSize.width/2 * _retinaFactor * _frameZoomFactor, _screenSize.height/2 * _retinaFactor * _frameZoomFactor); - - _isInRetinaMonitor = true; - } - else + // if (frameBufferW == 2 * w && frameBufferH == 2 * h) + // { + // if (_isRetinaEnabled) + // { + // _retinaFactor = 1; + // } + // else + // { + // _retinaFactor = 2; + // } + // glfwSetWindowSize(_mainWindow, _screenSize.width/2 * _retinaFactor * _frameZoomFactor, _screenSize.height/2 * _retinaFactor * _frameZoomFactor); + + // _isInRetinaMonitor = true; + // } + // else { if (_isInRetinaMonitor) { @@ -655,29 +665,34 @@ void GLViewImpl::setFrameSize(float width, float height) void GLViewImpl::setViewPortInPoints(float x , float y , float w , float h) { - experimental::Viewport vp((float)(x * _scaleX * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor), - (float)(y * _scaleY * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor), - (float)(w * _scaleX * _retinaFactor * _frameZoomFactor), - (float)(h * _scaleY * _retinaFactor * _frameZoomFactor)); + Viewport vp; + vp.x = x * _scaleX * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor; + vp.y = y * _scaleY * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor; + vp.w = w * _scaleX * _retinaFactor * _frameZoomFactor; + vp.h = h * _scaleY * _retinaFactor * _frameZoomFactor; Camera::setDefaultViewport(vp); } void GLViewImpl::setScissorInPoints(float x , float y , float w , float h) { - glScissor((GLint)(x * _scaleX * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor), - (GLint)(y * _scaleY * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor), - (GLsizei)(w * _scaleX * _retinaFactor * _frameZoomFactor), - (GLsizei)(h * _scaleY * _retinaFactor * _frameZoomFactor)); + auto x1 = (int)(x * _scaleX * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor); + auto y1 = (int)(y * _scaleY * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor); + auto width1 = (unsigned int)(w * _scaleX * _retinaFactor * _frameZoomFactor); + auto height1 = (unsigned int)(h * _scaleY * _retinaFactor * _frameZoomFactor); + auto renderer = Director::getInstance()->getRenderer(); + renderer->setScissorRect(x1, y1, width1, height1); + } Rect GLViewImpl::getScissorRect() const { - GLfloat params[4]; - glGetFloatv(GL_SCISSOR_BOX, params); - float x = (params[0] - _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor) / (_scaleX * _retinaFactor * _frameZoomFactor); - float y = (params[1] - _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor) / (_scaleY * _retinaFactor * _frameZoomFactor); - float w = params[2] / (_scaleX * _retinaFactor * _frameZoomFactor); - float h = params[3] / (_scaleY * _retinaFactor * _frameZoomFactor); + auto renderer = Director::getInstance()->getRenderer(); + auto& rect = renderer->getScissorRect(); + + float x = (rect.x - _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor) / (_scaleX * _retinaFactor * _frameZoomFactor); + float y = (rect.y - _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor) / (_scaleY * _retinaFactor * _frameZoomFactor); + float w = rect.width / (_scaleX * _retinaFactor * _frameZoomFactor); + float h = rect.height / (_scaleY * _retinaFactor * _frameZoomFactor); return Rect(x, y, w, h); } @@ -875,7 +890,7 @@ void GLViewImpl::onGLFWframebuffersize(GLFWwindow* window, int w, int h) _retinaFactor = 2; } - glfwSetWindowSize(window, static_cast(frameSizeW * 0.5f * _retinaFactor * _frameZoomFactor) , static_cast(frameSizeH * 0.5f * _retinaFactor * _frameZoomFactor)); + glfwSetWindowSize(window, static_cast(frameSizeW * 0.5f * _retinaFactor * _frameZoomFactor), static_cast(frameSizeH * 0.5f * _retinaFactor * _frameZoomFactor)); } else if (std::abs(factorX - 2.0f) < FLT_EPSILON && std::abs(factorY - 2.0f) < FLT_EPSILON) { @@ -992,7 +1007,10 @@ static bool glew_dynamic_binding() // helper bool GLViewImpl::initGlew() { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) + + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +//#if (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) GLenum GlewInitResult = glewInit(); if (GLEW_OK != GlewInitResult) { @@ -1018,7 +1036,7 @@ bool GLViewImpl::initGlew() log("OpenGL 2.0 not supported"); } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + if(glew_dynamic_binding() == false) { MessageBox("No OpenGL framebuffer support. Please upgrade the driver of your video card.", "OpenGL error"); @@ -1026,8 +1044,6 @@ bool GLViewImpl::initGlew() } #endif -#endif // (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) - return true; } diff --git a/cocos/platform/desktop/CCGLViewImpl-desktop.h b/cocos/platform/desktop/CCGLViewImpl-desktop.h index 6b493ff8dc57..3d2484114a8f 100644 --- a/cocos/platform/desktop/CCGLViewImpl-desktop.h +++ b/cocos/platform/desktop/CCGLViewImpl-desktop.h @@ -126,18 +126,19 @@ class CC_DLL GLViewImpl : public GLView #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) id getCocoaWindow() override { return glfwGetCocoaWindow(_mainWindow); } + id getNSGLContext() override { return glfwGetNSGLContext(_mainWindow); } // stevetranby: added #endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) protected: GLViewImpl(bool initglfw = true); virtual ~GLViewImpl(); + bool initGlew(); + bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor, bool resizable); bool initWithFullScreen(const std::string& viewName); bool initWithFullscreen(const std::string& viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor); - bool initGlew(); - void updateFrameSize(); // GLFW callbacks @@ -227,16 +228,17 @@ class CC_DLL GLFWEventHandler _view->onGLFWWindowPosCallback(windows, x, y); } - static void onGLFWframebuffersize(GLFWwindow* window, int w, int h) + static void onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int height) { if (_view) - _view->onGLFWframebuffersize(window, w, h); + _view->onGLFWWindowSizeFunCallback(window, width, height); } - static void onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int height) + + static void onGLFWframebuffersize(GLFWwindow *window, int width, int height) { if (_view) - _view->onGLFWWindowSizeFunCallback(window, width, height); + _view->onGLFWframebuffersize(window, width, height); } static void setGLViewImpl(GLViewImpl* view) @@ -260,6 +262,7 @@ class CC_DLL GLFWEventHandler } } + private: static GLViewImpl* _view; }; diff --git a/cocos/platform/ios/CCApplication-ios.h b/cocos/platform/ios/CCApplication-ios.h index 7120f4ab1b37..cb2ef487bacc 100644 --- a/cocos/platform/ios/CCApplication-ios.h +++ b/cocos/platform/ios/CCApplication-ios.h @@ -61,15 +61,11 @@ class CC_DLL Application : public ApplicationProtocol */ static Application* getInstance(); - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication(); - /** @brief Callback by Director for limit FPS. @param interval The time, expressed in seconds, between current frame and next. */ virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; /** @brief Get current language config diff --git a/cocos/platform/ios/CCApplication-ios.mm b/cocos/platform/ios/CCApplication-ios.mm index f9e666883d71..47b74c5e5e54 100644 --- a/cocos/platform/ios/CCApplication-ios.mm +++ b/cocos/platform/ios/CCApplication-ios.mm @@ -64,11 +64,6 @@ of this software and associated documentation files (the "Software"), to deal [[CCDirectorCaller sharedDirectorCaller] setAnimationInterval: interval ]; } -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - ///////////////////////////////////////////////////////////////////////////////////////////////// // static member function ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -79,12 +74,6 @@ of this software and associated documentation files (the "Software"), to deal return sm_pSharedApplication; } -// @deprecated Use getInstance() instead -Application* Application::sharedApplication() -{ - return Application::getInstance(); -} - const char * Application::getCurrentLanguageCode() { static char code[3]={0}; diff --git a/cocos/platform/ios/CCEAGLView-ios.h b/cocos/platform/ios/CCEAGLView-ios.h index bce94c3eb7fa..c1908e7dd3c0 100644 --- a/cocos/platform/ios/CCEAGLView-ios.h +++ b/cocos/platform/ios/CCEAGLView-ios.h @@ -71,8 +71,6 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. #import #import -#import "platform/ios/CCESRenderer-ios.h" - //CLASS INTERFACE: /** CCEAGLView Class. @@ -82,8 +80,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. */ @interface CCEAGLView : UIView { - id renderer_; - EAGLContext *context_; // weak ref +// id renderer_; +// EAGLContext *context_; // weak ref NSString *pixelformat_; GLuint depthFormat_; diff --git a/cocos/platform/ios/CCEAGLView-ios.mm b/cocos/platform/ios/CCEAGLView-ios.mm index 1f06a0f27484..c3f336b76a98 100644 --- a/cocos/platform/ios/CCEAGLView-ios.mm +++ b/cocos/platform/ios/CCEAGLView-ios.mm @@ -60,20 +60,15 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE Copyright (C) 2008 Apple Inc. All Rights Reserved. */ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS - #import "platform/ios/CCEAGLView-ios.h" #import +#import #import "base/CCDirector.h" #import "base/CCTouch.h" #import "base/CCIMEDispatcher.h" -#import "platform/ios/CCGLViewImpl-ios.h" -#import "platform/ios/CCES2Renderer-ios.h" -#import "platform/ios/OpenGL_Internal-ios.h" +#import "renderer/backend/metal/DeviceMTL.h" //CLASS IMPLEMENTATIONS: @@ -94,7 +89,7 @@ @implementation CCEAGLView @synthesize keyboardShowNotification = keyboardShowNotification_; + (Class) layerClass { - return [CAEAGLLayer class]; + return [CAMetalLayer class]; } + (id) viewWithFrame:(CGRect)frame @@ -132,17 +127,7 @@ - (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GL if((self = [super initWithFrame:frame])) { isUseUITextField = YES; - pixelformat_ = format; - depthFormat_ = depth; - multiSampling_ = sampling; - requestedSamples_ = nSamples; - preserveBackbuffer_ = retained; markedText_ = nil; - if( ! [self setupSurfaceWithSharegroup:sharegroup] ) { - [self release]; - return nil; - } - originalRect_ = self.frame; self.keyboardShowNotification = nil; @@ -152,6 +137,11 @@ - (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GL { self.contentScaleFactor = [[UIScreen mainScreen] scale]; } + + CAMetalLayer* metalLayer = (CAMetalLayer*)[self layer]; + metalLayer.device = MTLCreateSystemDefaultDevice(); + metalLayer.pixelFormat = MTLPixelFormatBGRA8Unorm; + cocos2d::backend::DeviceMTL::setCAMetalLayer(metalLayer); } return self; @@ -159,21 +149,10 @@ - (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GL -(id) initWithCoder:(NSCoder *)aDecoder { - if( (self = [super initWithCoder:aDecoder]) ) { - - CAEAGLLayer* eaglLayer = (CAEAGLLayer*)[self layer]; - - pixelformat_ = kEAGLColorFormatRGB565; - depthFormat_ = 0; // GL_DEPTH_COMPONENT24_OES; - multiSampling_= NO; - requestedSamples_ = 0; - size_ = [eaglLayer bounds].size; + if ( (self = [super initWithCoder:aDecoder]) ) + { + size_ = [self bounds].size; markedText_ = nil; - - if( ! [self setupSurfaceWithSharegroup:nil] ) { - [self release]; - return nil; - } } return self; @@ -211,44 +190,9 @@ -(int) getHeight return (int)bound.height * self.contentScaleFactor; } - --(BOOL) setupSurfaceWithSharegroup:(EAGLSharegroup*)sharegroup -{ - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - - eaglLayer.opaque = YES; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:preserveBackbuffer_], kEAGLDrawablePropertyRetainedBacking, - pixelformat_, kEAGLDrawablePropertyColorFormat, nil]; - - - renderer_ = [[CCES2Renderer alloc] initWithDepthFormat:depthFormat_ - withPixelFormat:[self convertPixelFormat:pixelformat_] - withSharegroup:sharegroup - withMultiSampling:multiSampling_ - withNumberOfSamples:requestedSamples_]; - - NSAssert(renderer_, @"OpenGL ES 2.O is required."); - if (!renderer_) - return NO; - - context_ = [renderer_ context]; - - #if GL_EXT_discard_framebuffer == 1 - discardFramebufferSupported_ = YES; - #else - discardFramebufferSupported_ = NO; - #endif - - CHECK_GL_ERROR(); - - return YES; -} - - (void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; // remove keyboard notification - [renderer_ release]; self.keyboardShowNotification = nullptr; // implicit release [super dealloc]; } @@ -256,23 +200,13 @@ - (void) dealloc - (void) layoutSubviews { if (!cocos2d::Director::getInstance()->isValid()) - { return; - } - - [renderer_ resizeFromLayer:(CAEAGLLayer*)self.layer]; - size_ = [renderer_ backingSize]; - // Issue #914 #924 -// Director *director = [Director sharedDirector]; -// [director reshapeProjection:size_]; - cocos2d::Size size; - size.width = size_.width; - size.height = size_.height; - //cocos2d::Director::getInstance()->reshapeProjection(size); + size_ = [self bounds].size; + size_.width *= self.contentScaleFactor; + size_.height *= self.contentScaleFactor; // Avoid flicker. Issue #350 - //[director performSelectorOnMainThread:@selector(drawScene) withObject:nil waitUntilDone:YES]; if ([NSThread isMainThread]) { cocos2d::Director::getInstance()->drawScene(); @@ -281,77 +215,6 @@ - (void) layoutSubviews - (void) swapBuffers { - // IMPORTANT: - // - preconditions - // -> context_ MUST be the OpenGL context - // -> renderbuffer_ must be the RENDER BUFFER - -#ifdef __IPHONE_4_0 - - if (multiSampling_) - { - /* Resolve from msaaFramebuffer to resolveFramebuffer */ - //glDisable(GL_SCISSOR_TEST); - glBindFramebuffer(GL_READ_FRAMEBUFFER_APPLE, [renderer_ msaaFrameBuffer]); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER_APPLE, [renderer_ defaultFrameBuffer]); - glResolveMultisampleFramebufferAPPLE(); - } - - if(discardFramebufferSupported_) - { - if (multiSampling_) - { - if (depthFormat_) - { - GLenum attachments[] = {GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT}; - glDiscardFramebufferEXT(GL_READ_FRAMEBUFFER_APPLE, 2, attachments); - } - else - { - GLenum attachments[] = {GL_COLOR_ATTACHMENT0}; - glDiscardFramebufferEXT(GL_READ_FRAMEBUFFER_APPLE, 1, attachments); - } - - glBindRenderbuffer(GL_RENDERBUFFER, [renderer_ colorRenderBuffer]); - - } - - // not MSAA - else if (depthFormat_ ) { - GLenum attachments[] = { GL_DEPTH_ATTACHMENT}; - glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, attachments); - } - } - -#endif // __IPHONE_4_0 - - if(![context_ presentRenderbuffer:GL_RENDERBUFFER]) - { -// CCLOG(@"cocos2d: Failed to swap renderbuffer in %s\n", __FUNCTION__); - } - -#if COCOS2D_DEBUG - CHECK_GL_ERROR(); -#endif - - // We can safely re-bind the framebuffer here, since this will be the - // 1st instruction of the new main loop - if( multiSampling_ ) - glBindFramebuffer(GL_FRAMEBUFFER, [renderer_ msaaFrameBuffer]); -} - -- (unsigned int) convertPixelFormat:(NSString*) pixelFormat -{ - // define the pixel format - GLenum pFormat; - - - if([pixelFormat isEqualToString:@"EAGLColorFormat565"]) - pFormat = GL_RGB565; - else - pFormat = GL_RGBA8_OES; - - return pFormat; } #pragma mark CCEAGLView - Point conversion @@ -942,5 +805,3 @@ -(void) doAnimationWhenAnotherEditBeClicked } @end - -#endif // CC_PLATFORM_IOS diff --git a/cocos/platform/ios/CCES2Renderer-ios.h b/cocos/platform/ios/CCES2Renderer-ios.h deleted file mode 100644 index d6d5a127bda7..000000000000 --- a/cocos/platform/ios/CCES2Renderer-ios.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 Ricardo Quesada - Copyright (c) 2010-2012 cocos2d-x.org - Corpyight (c) 2011 Zynga Inc. - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// Only compile this code on iOS. These files should NOT be included on your Mac project. -// But in case they are included, it won't be compiled. - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS - -#import "platform/ios/CCESRenderer-ios.h" - -#import -#import - -#import "platform/CCPlatformMacros.h" - -@interface CCES2Renderer : NSObject -{ - // The pixel dimensions of the CAEAGLLayer - GLint backingWidth_; - GLint backingHeight_; - - unsigned int samplesToUse_; - BOOL multiSampling_; - - unsigned int depthFormat_; - unsigned int pixelFormat_; - - // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view - GLuint defaultFramebuffer_; - GLuint colorRenderbuffer_; - GLuint depthBuffer_; - - - //buffers for MSAA - GLuint msaaFramebuffer_; - GLuint msaaColorbuffer_; - - EAGLContext *context_; -} - -/** Color Renderbuffer */ -@property (nonatomic,readonly) GLuint colorRenderbuffer; - -/** Default Renderbuffer */ -@property (nonatomic,readonly) GLuint defaultFramebuffer; - -/** MSAA Framebuffer */ -@property (nonatomic,readonly) GLuint msaaFramebuffer; - -/** MSAA Color Buffer */ -@property (nonatomic,readonly) GLuint msaaColorbuffer; - -/** EAGLContext */ -@property (nonatomic,readonly) EAGLContext* context; - -- (BOOL)resizeFromLayer:(CAEAGLLayer *)layer; -@end - - -#endif // CC_PLATFORM_IOS diff --git a/cocos/platform/ios/CCES2Renderer-ios.m b/cocos/platform/ios/CCES2Renderer-ios.m deleted file mode 100644 index c1f04ab98e83..000000000000 --- a/cocos/platform/ios/CCES2Renderer-ios.m +++ /dev/null @@ -1,257 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 Ricardo Quesada - Copyright (c) 2010-2012 cocos2d-x.org - Corpyight (c) 2011 Zynga Inc. - Copyright (c) 2013-2017 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// Only compile this code on iOS. These files should NOT be included on your Mac project. -// But in case they are included, it won't be compiled. - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS - -#import "platform/ios/CCES2Renderer-ios.h" -#import "platform/CCPlatformMacros.h" -#import "platform/ios/OpenGL_Internal-ios.h" - -#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 -#define NSLog(...) do {} while (0) -#endif - -@implementation CCES2Renderer - -@synthesize context=context_; -@synthesize defaultFramebuffer=defaultFramebuffer_; -@synthesize colorRenderbuffer=colorRenderbuffer_; -@synthesize msaaColorbuffer=msaaColorbuffer_; -@synthesize msaaFramebuffer=msaaFramebuffer_; - -// Create an OpenGL ES 2.0 context -- (id) initWithDepthFormat:(unsigned int)depthFormat withPixelFormat:(unsigned int)pixelFormat withSharegroup:(EAGLSharegroup*)sharegroup withMultiSampling:(BOOL) multiSampling withNumberOfSamples:(unsigned int) requestedSamples -{ - if (self = [super init]) - { - if (! sharegroup) - context_ = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; - else - context_ = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:sharegroup]; - - if (!context_ || ![EAGLContext setCurrentContext:context_] ) - { - [self release]; - return nil; - } - - depthFormat_ = depthFormat; - pixelFormat_ = pixelFormat; - multiSampling_ = multiSampling; - - // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer - glGenFramebuffers(1, &defaultFramebuffer_); - NSAssert( defaultFramebuffer_, @"Can't create default frame buffer"); - - glGenRenderbuffers(1, &colorRenderbuffer_); - NSAssert( colorRenderbuffer_, @"Can't create default render buffer"); - - glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer_); - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer_); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer_); - - if (multiSampling_) - { - GLint maxSamplesAllowed; - glGetIntegerv(GL_MAX_SAMPLES_APPLE, &maxSamplesAllowed); - samplesToUse_ = MIN(maxSamplesAllowed,requestedSamples); - - /* Create the MSAA framebuffer (offscreen) */ - glGenFramebuffers(1, &msaaFramebuffer_); - NSAssert( msaaFramebuffer_, @"Can't create default MSAA frame buffer"); - glBindFramebuffer(GL_FRAMEBUFFER, msaaFramebuffer_); - - } - - CHECK_GL_ERROR(); - } - - return self; -} - -- (BOOL)resizeFromLayer:(CAEAGLLayer *)layer -{ - // Allocate color buffer backing based on the current layer size - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer_); - - if( ! [context_ renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer] ) - { - NSLog(@"failed to call context"); - } - - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth_); - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight_); - - NSLog(@"cocos2d: surface size: %dx%d", (int)backingWidth_, (int)backingHeight_); - - if (multiSampling_) - { - if ( msaaColorbuffer_) { - glDeleteRenderbuffers(1, &msaaColorbuffer_); - msaaColorbuffer_ = 0; - } - - /* Create the offscreen MSAA color buffer. - After rendering, the contents of this will be blitted into ColorRenderbuffer */ - - //msaaFrameBuffer needs to be binded - glBindFramebuffer(GL_FRAMEBUFFER, msaaFramebuffer_); - glGenRenderbuffers(1, &msaaColorbuffer_); - NSAssert(msaaFramebuffer_, @"Can't create MSAA color buffer"); - - glBindRenderbuffer(GL_RENDERBUFFER, msaaColorbuffer_); - - glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, samplesToUse_, pixelFormat_ , backingWidth_, backingHeight_); - - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, msaaColorbuffer_); - - GLenum error; - if ( (error=glCheckFramebufferStatus(GL_FRAMEBUFFER)) != GL_FRAMEBUFFER_COMPLETE) - { - NSLog(@"Failed to make complete framebuffer object 0x%X", error); - return NO; - } - } - - CHECK_GL_ERROR(); - - if (depthFormat_) - { - if( ! depthBuffer_ ) { - glGenRenderbuffers(1, &depthBuffer_); - NSAssert(depthBuffer_, @"Can't create depth buffer"); - } - - glBindRenderbuffer(GL_RENDERBUFFER, depthBuffer_); - - if( multiSampling_ ) - glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, samplesToUse_, depthFormat_,backingWidth_, backingHeight_); - else - glRenderbufferStorage(GL_RENDERBUFFER, depthFormat_, backingWidth_, backingHeight_); - - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthBuffer_); - - if (depthFormat_ == GL_DEPTH24_STENCIL8_OES) { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, depthBuffer_); - } - - // bind color buffer - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer_); - } - - CHECK_GL_ERROR(); - - GLenum error; - if( (error=glCheckFramebufferStatus(GL_FRAMEBUFFER)) != GL_FRAMEBUFFER_COMPLETE) - { - NSLog(@"Failed to make complete framebuffer object 0x%X", error); - return NO; - } - - return YES; -} - --(CGSize) backingSize -{ - return CGSizeMake( backingWidth_, backingHeight_); -} - -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], (unsigned int)self, backingWidth_, backingHeight_]; -} - -- (unsigned int) colorRenderBuffer -{ - return colorRenderbuffer_; -} - -- (unsigned int) defaultFrameBuffer -{ - return defaultFramebuffer_; -} - -- (unsigned int) msaaFrameBuffer -{ - return msaaFramebuffer_; -} - -- (unsigned int) msaaColorBuffer -{ - return msaaColorbuffer_; -} - -- (void)dealloc -{ -// CCLOGINFO("deallocing CCES2Renderer: %p", self); - - // Tear down GL - if (defaultFramebuffer_) { - glDeleteFramebuffers(1, &defaultFramebuffer_); - defaultFramebuffer_ = 0; - } - - if (colorRenderbuffer_) { - glDeleteRenderbuffers(1, &colorRenderbuffer_); - colorRenderbuffer_ = 0; - } - - if( depthBuffer_ ) { - glDeleteRenderbuffers(1, &depthBuffer_ ); - depthBuffer_ = 0; - } - - if ( msaaColorbuffer_) - { - glDeleteRenderbuffers(1, &msaaColorbuffer_); - msaaColorbuffer_ = 0; - } - - if ( msaaFramebuffer_) - { - glDeleteRenderbuffers(1, &msaaFramebuffer_); - msaaFramebuffer_ = 0; - } - - // Tear down context - if ([EAGLContext currentContext] == context_) - [EAGLContext setCurrentContext:nil]; - - [context_ release]; - context_ = nil; - - [super dealloc]; -} - -@end - -#endif // CC_PLATFORM_IOS diff --git a/cocos/platform/ios/CCESRenderer-ios.h b/cocos/platform/ios/CCESRenderer-ios.h deleted file mode 100644 index e255c4152428..000000000000 --- a/cocos/platform/ios/CCESRenderer-ios.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 Ricardo Quesada - Copyright (c) 2010-2012 cocos2d-x.org - Corpyight (c) 2011 Zynga Inc. - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// Only compile this code on iOS. These files should NOT be included on your Mac project. -// But in case they are included, it won't be compiled. - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS - -#include "platform/CCPlatformMacros.h" -#import - -#import -#import - -@protocol CCESRenderer - -- (id) initWithDepthFormat:(unsigned int)depthFormat withPixelFormat:(unsigned int)pixelFormat withSharegroup:(EAGLSharegroup*)sharegroup withMultiSampling:(BOOL) multiSampling withNumberOfSamples:(unsigned int) requestedSamples; - -- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; - -- (EAGLContext*) context; -- (CGSize) backingSize; - -- (unsigned int) colorRenderBuffer; -- (unsigned int) defaultFrameBuffer; -- (unsigned int) msaaFrameBuffer; -- (unsigned int) msaaColorBuffer; -@end - -#endif // CC_PLATFORM_IOS diff --git a/cocos/platform/ios/CCImage-ios.mm b/cocos/platform/ios/CCImage-ios.mm index baad43f45aea..2e73553d8dc8 100644 --- a/cocos/platform/ios/CCImage-ios.mm +++ b/cocos/platform/ios/CCImage-ios.mm @@ -41,7 +41,7 @@ of this software and associated documentation files (the "Software"), to deal bool cocos2d::Image::saveToFile(const std::string& filename, bool isToRGB) { //only support for Texture2D::PixelFormat::RGB888 or Texture2D::PixelFormat::RGBA8888 uncompressed data - if (isCompressed() || (_renderFormat != Texture2D::PixelFormat::RGB888 && _renderFormat != Texture2D::PixelFormat::RGBA8888)) + if (isCompressed() || (_pixelFormat != Texture2D::PixelFormat::RGB888 && _pixelFormat != Texture2D::PixelFormat::RGBA8888)) { CCLOG("cocos2d: Image: saveToFile is only support for Texture2D::PixelFormat::RGB888 or Texture2D::PixelFormat::RGBA8888 uncompressed data for now"); return false; diff --git a/cocos/platform/linux/CCApplication-linux.cpp b/cocos/platform/linux/CCApplication-linux.cpp index 10b376ff41b3..2194a754dae9 100644 --- a/cocos/platform/linux/CCApplication-linux.cpp +++ b/cocos/platform/linux/CCApplication-linux.cpp @@ -115,11 +115,6 @@ void Application::setAnimationInterval(float interval) _animationInterval = interval*1000.0f; } -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - void Application::setResourceRootPath(const std::string& rootResDir) { _resourceRootPath = rootResDir; diff --git a/cocos/platform/linux/CCApplication-linux.h b/cocos/platform/linux/CCApplication-linux.h index 42f9817c7556..a9baba39ac99 100644 --- a/cocos/platform/linux/CCApplication-linux.h +++ b/cocos/platform/linux/CCApplication-linux.h @@ -55,7 +55,6 @@ class Application : public ApplicationProtocol @param interval The time, which expressed in second in second, between current frame and next. */ virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; /** @brief Run the message loop. diff --git a/cocos/platform/mac/CCApplication-mac.h b/cocos/platform/mac/CCApplication-mac.h index 9588e4b8a167..f95a17545e7c 100644 --- a/cocos/platform/mac/CCApplication-mac.h +++ b/cocos/platform/mac/CCApplication-mac.h @@ -27,9 +27,6 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_MAC_H__ #define __CC_APPLICATION_MAC_H__ -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC - #include "platform/CCCommon.h" #include "platform/CCApplicationProtocol.h" #include @@ -54,7 +51,6 @@ class CC_DLL Application : public ApplicationProtocol @param interval The time, which expressed in second in second, between current frame and next. */ virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; /** @brief Run the message loop. @@ -68,9 +64,6 @@ class CC_DLL Application : public ApplicationProtocol @return Current application instance pointer. */ static Application* getInstance(); - - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication(); /** @brief Get current language config @@ -100,18 +93,6 @@ class CC_DLL Application : public ApplicationProtocol @return true if the resource located by the URL was successfully opened; otherwise false. */ virtual bool openURL(const std::string &url) override; - - /** - * Sets the Resource root path. - * @deprecated Please use FileUtils::getInstance()->setSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE void setResourceRootPath(const std::string& rootResDir); - - /** - * Gets the Resource root path. - * @deprecated Please use FileUtils::getInstance()->getSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE const std::string& getResourceRootPath(void); void setStartupScriptFilename(const std::string& startupScriptFile); @@ -127,6 +108,4 @@ class CC_DLL Application : public ApplicationProtocol NS_CC_END -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC - #endif // end of __CC_APPLICATION_MAC_H__; diff --git a/cocos/platform/mac/CCApplication-mac.mm b/cocos/platform/mac/CCApplication-mac.mm index bbbf6dcde421..05c91fc5e15e 100644 --- a/cocos/platform/mac/CCApplication-mac.mm +++ b/cocos/platform/mac/CCApplication-mac.mm @@ -23,11 +23,8 @@ of this software and associated documentation files (the "Software"), to deal OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC - #import +#import #include #include "platform/CCApplication.h" @@ -35,6 +32,7 @@ of this software and associated documentation files (the "Software"), to deal #include "math/CCGeometry.h" #include "base/CCDirector.h" #include "base/ccUtils.h" +#include "renderer/backend/metal/DeviceMTL.h" NS_CC_BEGIN @@ -79,7 +77,7 @@ static long getCurrentMillSecond() // Retain glview to avoid glview being released in the while loop glview->retain(); - + while (!glview->windowShouldClose()) { lastTime = getCurrentMillSecond(); @@ -115,11 +113,6 @@ static long getCurrentMillSecond() _animationInterval = interval*1000.0f; } -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - Application::Platform Application::getTargetPlatform() { return Platform::OS_MAC; @@ -143,12 +136,6 @@ static long getCurrentMillSecond() return sm_pSharedApplication; } -// @deprecated Use getInstance() instead -Application* Application::sharedApplication() -{ - return Application::getInstance(); -} - const char * Application::getCurrentLanguageCode() { static char code[3]={0}; @@ -185,24 +172,6 @@ static long getCurrentMillSecond() return [[NSWorkspace sharedWorkspace] openURL:nsUrl]; } -void Application::setResourceRootPath(const std::string& rootResDir) -{ - _resourceRootPath = rootResDir; - if (_resourceRootPath[_resourceRootPath.length() - 1] != '/') - { - _resourceRootPath += '/'; - } - FileUtils* pFileUtils = FileUtils::getInstance(); - std::vector searchPaths = pFileUtils->getSearchPaths(); - searchPaths.insert(searchPaths.begin(), _resourceRootPath); - pFileUtils->setSearchPaths(searchPaths); -} - -const std::string& Application::getResourceRootPath(void) -{ - return _resourceRootPath; -} - void Application::setStartupScriptFilename(const std::string& startupScriptFile) { _startupScriptFilename = startupScriptFile; @@ -215,5 +184,3 @@ static long getCurrentMillSecond() } NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC diff --git a/cocos/platform/mac/CCGLViewImpl-mac.h b/cocos/platform/mac/CCGLViewImpl-mac.h new file mode 100644 index 000000000000..8b66861d54ae --- /dev/null +++ b/cocos/platform/mac/CCGLViewImpl-mac.h @@ -0,0 +1,264 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#ifndef __CC_EGLViewIMPL_DESKTOP_H__ +#define __CC_EGLViewIMPL_DESKTOP_H__ + +#include "base/CCRef.h" +#include "platform/CCCommon.h" +#include "platform/CCGLView.h" +#include "glfw3.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#ifndef GLFW_EXPOSE_NATIVE_WIN32 +#define GLFW_EXPOSE_NATIVE_WIN32 +#endif +#ifndef GLFW_EXPOSE_NATIVE_WGL +#define GLFW_EXPOSE_NATIVE_WGL +#endif +#include "glfw3native.h" +#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +#ifndef GLFW_EXPOSE_NATIVE_NSGL +#define GLFW_EXPOSE_NATIVE_NSGL +#endif +#ifndef GLFW_EXPOSE_NATIVE_COCOA +#define GLFW_EXPOSE_NATIVE_COCOA +#endif +#include "glfw3native.h" +#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + +NS_CC_BEGIN + + +class CC_DLL GLViewImpl : public GLView +{ +public: + static GLViewImpl* create(const std::string& viewName); + static GLViewImpl* create(const std::string& viewName, bool resizable); + static GLViewImpl* createWithRect(const std::string& viewName, Rect size, float frameZoomFactor = 1.0f, bool resizable = false); + static GLViewImpl* createWithFullScreen(const std::string& viewName); + static GLViewImpl* createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor); + + /* + *frameZoomFactor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop. + */ + + //void resize(int width, int height); + + float getFrameZoomFactor() const override; + //void centerWindow(); + + virtual void setViewPortInPoints(float x , float y , float w , float h) override; + virtual void setScissorInPoints(float x , float y , float w , float h) override; + virtual Rect getScissorRect() const override; + + bool windowShouldClose() override; + void pollEvents() override; + GLFWwindow* getWindow() const { return _mainWindow; } + + bool isFullscreen() const; + void setFullscreen(); + void setFullscreen(int monitorIndex); + void setFullscreen(const GLFWvidmode &videoMode, GLFWmonitor *monitor); + void setWindowed(int width, int height); + int getMonitorCount() const; + Size getMonitorSize() const; + + /* override functions */ + virtual bool isOpenGLReady() override; + virtual void end() override; + virtual void swapBuffers() override; + virtual void setFrameSize(float width, float height) override; + virtual void setIMEKeyboardState(bool bOpen) override; + +#if CC_ICON_SET_SUPPORT + virtual void setIcon(const std::string& filename) const override; + virtual void setIcon(const std::vector& filelist) const override; + virtual void setDefaultIcon() const override; +#endif /* CC_ICON_SET_SUPPORT */ + + /* + * Set zoom factor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop. + */ + void setFrameZoomFactor(float zoomFactor) override; + /** + * Hide or Show the mouse cursor if there is one. + */ + virtual void setCursorVisible(bool isVisible) override; + /** Retina support is disabled by default + * @note This method is only available on Mac. + */ + void enableRetina(bool enabled); + /** Check whether retina display is enabled. */ + bool isRetinaEnabled() const { return _isRetinaEnabled; }; + + /** Get retina factor */ + int getRetinaFactor() const override { return _retinaFactor; } + + id getCocoaWindow() override { return glfwGetCocoaWindow(_mainWindow); } + id getNSGLContext() override { return glfwGetNSGLContext(_mainWindow); } // stevetranby: added + +protected: + GLViewImpl(bool initglfw = true); + virtual ~GLViewImpl(); + + bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor, bool resizable); + bool initWithFullScreen(const std::string& viewName); + bool initWithFullscreen(const std::string& viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor); + + bool initGlew(); + + void updateFrameSize(); + + // GLFW callbacks + void onGLFWError(int errorID, const char* errorDesc); + void onGLFWMouseCallBack(GLFWwindow* window, int button, int action, int modify); + void onGLFWMouseMoveCallBack(GLFWwindow* window, double x, double y); + void onGLFWMouseScrollCallback(GLFWwindow* window, double x, double y); + void onGLFWKeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods); + void onGLFWCharCallback(GLFWwindow* window, unsigned int character); + void onGLFWWindowPosCallback(GLFWwindow* windows, int x, int y); + void onGLFWframebuffersize(GLFWwindow* window, int w, int h); + void onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int height); + void onGLFWWindowIconifyCallback(GLFWwindow* window, int iconified); + void onGLFWWindowFocusCallback(GLFWwindow* window, int focused); + + bool _captured; + bool _supportTouch; + bool _isInRetinaMonitor; + bool _isRetinaEnabled; + int _retinaFactor; // Should be 1 or 2 + + float _frameZoomFactor; + + GLFWwindow* _mainWindow; + GLFWmonitor* _monitor; + + std::string _glfwError; + + float _mouseX; + float _mouseY; + + friend class GLFWEventHandler; + +public: + // View will trigger an event when window is resized, gains or loses focus + static const std::string EVENT_WINDOW_RESIZED; + static const std::string EVENT_WINDOW_FOCUSED; + static const std::string EVENT_WINDOW_UNFOCUSED; + +private: + CC_DISALLOW_COPY_AND_ASSIGN(GLViewImpl); +}; + + +class CC_DLL GLFWEventHandler +{ +public: + static void onGLFWError(int errorID, const char* errorDesc) + { + if (_view) + _view->onGLFWError(errorID, errorDesc); + } + + static void onGLFWMouseCallBack(GLFWwindow* window, int button, int action, int modify) + { + if (_view) + _view->onGLFWMouseCallBack(window, button, action, modify); + } + + static void onGLFWMouseMoveCallBack(GLFWwindow* window, double x, double y) + { + if (_view) + _view->onGLFWMouseMoveCallBack(window, x, y); + } + + static void onGLFWMouseScrollCallback(GLFWwindow* window, double x, double y) + { + if (_view) + _view->onGLFWMouseScrollCallback(window, x, y); + } + + static void onGLFWKeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods) + { + if (_view) + _view->onGLFWKeyCallback(window, key, scancode, action, mods); + } + + static void onGLFWCharCallback(GLFWwindow* window, unsigned int character) + { + if (_view) + _view->onGLFWCharCallback(window, character); + } + + static void onGLFWWindowPosCallback(GLFWwindow* windows, int x, int y) + { + if (_view) + _view->onGLFWWindowPosCallback(windows, x, y); + } + + static void onGLFWframebuffersize(GLFWwindow* window, int w, int h) + { + if (_view) + _view->onGLFWframebuffersize(window, w, h); + } + + static void onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int height) + { + if (_view) + _view->onGLFWWindowSizeFunCallback(window, width, height); + } + + static void setGLViewImpl(GLViewImpl* view) + { + _view = view; + } + + static void onGLFWWindowIconifyCallback(GLFWwindow* window, int iconified) + { + if (_view) + { + _view->onGLFWWindowIconifyCallback(window, iconified); + } + } + + static void onGLFWWindowFocusCallback(GLFWwindow* window, int focused) + { + if (_view) + { + _view->onGLFWWindowFocusCallback(window, focused); + } + } + +private: + static GLViewImpl* _view; +}; + +NS_CC_END // end of namespace cocos2d + +#endif // end of __CC_EGLViewImpl_DESKTOP_H__ diff --git a/cocos/platform/mac/CCGLViewImpl-mac.mm b/cocos/platform/mac/CCGLViewImpl-mac.mm new file mode 100644 index 000000000000..90ebeda7e866 --- /dev/null +++ b/cocos/platform/mac/CCGLViewImpl-mac.mm @@ -0,0 +1,897 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#include "platform/desktop/CCGLViewImpl-desktop.h" + +#include +#include +#include + +#include "platform/CCApplication.h" +#include "base/CCDirector.h" +#include "base/CCTouch.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventMouse.h" +#include "base/CCIMEDispatcher.h" +#include "base/ccUtils.h" +#include "base/ccUTF8.h" +#include "2d/CCCamera.h" +#if CC_ICON_SET_SUPPORT +#include "platform/CCImage.h" +#endif /* CC_ICON_SET_SUPPORT */ +#include "renderer/backend/metal/DeviceMTL.h" +#include "renderer/CCRenderer.h" + +NS_CC_BEGIN + +GLViewImpl* GLFWEventHandler::_view = nullptr; + +const std::string GLViewImpl::EVENT_WINDOW_RESIZED = "glview_window_resized"; +const std::string GLViewImpl::EVENT_WINDOW_FOCUSED = "glview_window_focused"; +const std::string GLViewImpl::EVENT_WINDOW_UNFOCUSED = "glview_window_unfocused"; + +//////////////////////////////////////////////////// + +struct keyCodeItem +{ + int glfwKeyCode; + EventKeyboard::KeyCode keyCode; +}; + +static std::unordered_map g_keyCodeMap; + +static keyCodeItem g_keyCodeStructArray[] = { + /* The unknown key */ + { GLFW_KEY_UNKNOWN , EventKeyboard::KeyCode::KEY_NONE }, + + /* Printable keys */ + { GLFW_KEY_SPACE , EventKeyboard::KeyCode::KEY_SPACE }, + { GLFW_KEY_APOSTROPHE , EventKeyboard::KeyCode::KEY_APOSTROPHE }, + { GLFW_KEY_COMMA , EventKeyboard::KeyCode::KEY_COMMA }, + { GLFW_KEY_MINUS , EventKeyboard::KeyCode::KEY_MINUS }, + { GLFW_KEY_PERIOD , EventKeyboard::KeyCode::KEY_PERIOD }, + { GLFW_KEY_SLASH , EventKeyboard::KeyCode::KEY_SLASH }, + { GLFW_KEY_0 , EventKeyboard::KeyCode::KEY_0 }, + { GLFW_KEY_1 , EventKeyboard::KeyCode::KEY_1 }, + { GLFW_KEY_2 , EventKeyboard::KeyCode::KEY_2 }, + { GLFW_KEY_3 , EventKeyboard::KeyCode::KEY_3 }, + { GLFW_KEY_4 , EventKeyboard::KeyCode::KEY_4 }, + { GLFW_KEY_5 , EventKeyboard::KeyCode::KEY_5 }, + { GLFW_KEY_6 , EventKeyboard::KeyCode::KEY_6 }, + { GLFW_KEY_7 , EventKeyboard::KeyCode::KEY_7 }, + { GLFW_KEY_8 , EventKeyboard::KeyCode::KEY_8 }, + { GLFW_KEY_9 , EventKeyboard::KeyCode::KEY_9 }, + { GLFW_KEY_SEMICOLON , EventKeyboard::KeyCode::KEY_SEMICOLON }, + { GLFW_KEY_EQUAL , EventKeyboard::KeyCode::KEY_EQUAL }, + { GLFW_KEY_A , EventKeyboard::KeyCode::KEY_A }, + { GLFW_KEY_B , EventKeyboard::KeyCode::KEY_B }, + { GLFW_KEY_C , EventKeyboard::KeyCode::KEY_C }, + { GLFW_KEY_D , EventKeyboard::KeyCode::KEY_D }, + { GLFW_KEY_E , EventKeyboard::KeyCode::KEY_E }, + { GLFW_KEY_F , EventKeyboard::KeyCode::KEY_F }, + { GLFW_KEY_G , EventKeyboard::KeyCode::KEY_G }, + { GLFW_KEY_H , EventKeyboard::KeyCode::KEY_H }, + { GLFW_KEY_I , EventKeyboard::KeyCode::KEY_I }, + { GLFW_KEY_J , EventKeyboard::KeyCode::KEY_J }, + { GLFW_KEY_K , EventKeyboard::KeyCode::KEY_K }, + { GLFW_KEY_L , EventKeyboard::KeyCode::KEY_L }, + { GLFW_KEY_M , EventKeyboard::KeyCode::KEY_M }, + { GLFW_KEY_N , EventKeyboard::KeyCode::KEY_N }, + { GLFW_KEY_O , EventKeyboard::KeyCode::KEY_O }, + { GLFW_KEY_P , EventKeyboard::KeyCode::KEY_P }, + { GLFW_KEY_Q , EventKeyboard::KeyCode::KEY_Q }, + { GLFW_KEY_R , EventKeyboard::KeyCode::KEY_R }, + { GLFW_KEY_S , EventKeyboard::KeyCode::KEY_S }, + { GLFW_KEY_T , EventKeyboard::KeyCode::KEY_T }, + { GLFW_KEY_U , EventKeyboard::KeyCode::KEY_U }, + { GLFW_KEY_V , EventKeyboard::KeyCode::KEY_V }, + { GLFW_KEY_W , EventKeyboard::KeyCode::KEY_W }, + { GLFW_KEY_X , EventKeyboard::KeyCode::KEY_X }, + { GLFW_KEY_Y , EventKeyboard::KeyCode::KEY_Y }, + { GLFW_KEY_Z , EventKeyboard::KeyCode::KEY_Z }, + { GLFW_KEY_LEFT_BRACKET , EventKeyboard::KeyCode::KEY_LEFT_BRACKET }, + { GLFW_KEY_BACKSLASH , EventKeyboard::KeyCode::KEY_BACK_SLASH }, + { GLFW_KEY_RIGHT_BRACKET , EventKeyboard::KeyCode::KEY_RIGHT_BRACKET }, + { GLFW_KEY_GRAVE_ACCENT , EventKeyboard::KeyCode::KEY_GRAVE }, + { GLFW_KEY_WORLD_1 , EventKeyboard::KeyCode::KEY_GRAVE }, + { GLFW_KEY_WORLD_2 , EventKeyboard::KeyCode::KEY_NONE }, + + /* Function keys */ + { GLFW_KEY_ESCAPE , EventKeyboard::KeyCode::KEY_ESCAPE }, + { GLFW_KEY_ENTER , EventKeyboard::KeyCode::KEY_ENTER }, + { GLFW_KEY_TAB , EventKeyboard::KeyCode::KEY_TAB }, + { GLFW_KEY_BACKSPACE , EventKeyboard::KeyCode::KEY_BACKSPACE }, + { GLFW_KEY_INSERT , EventKeyboard::KeyCode::KEY_INSERT }, + { GLFW_KEY_DELETE , EventKeyboard::KeyCode::KEY_DELETE }, + { GLFW_KEY_RIGHT , EventKeyboard::KeyCode::KEY_RIGHT_ARROW }, + { GLFW_KEY_LEFT , EventKeyboard::KeyCode::KEY_LEFT_ARROW }, + { GLFW_KEY_DOWN , EventKeyboard::KeyCode::KEY_DOWN_ARROW }, + { GLFW_KEY_UP , EventKeyboard::KeyCode::KEY_UP_ARROW }, + { GLFW_KEY_PAGE_UP , EventKeyboard::KeyCode::KEY_PG_UP }, + { GLFW_KEY_PAGE_DOWN , EventKeyboard::KeyCode::KEY_PG_DOWN }, + { GLFW_KEY_HOME , EventKeyboard::KeyCode::KEY_HOME }, + { GLFW_KEY_END , EventKeyboard::KeyCode::KEY_END }, + { GLFW_KEY_CAPS_LOCK , EventKeyboard::KeyCode::KEY_CAPS_LOCK }, + { GLFW_KEY_SCROLL_LOCK , EventKeyboard::KeyCode::KEY_SCROLL_LOCK }, + { GLFW_KEY_NUM_LOCK , EventKeyboard::KeyCode::KEY_NUM_LOCK }, + { GLFW_KEY_PRINT_SCREEN , EventKeyboard::KeyCode::KEY_PRINT }, + { GLFW_KEY_PAUSE , EventKeyboard::KeyCode::KEY_PAUSE }, + { GLFW_KEY_F1 , EventKeyboard::KeyCode::KEY_F1 }, + { GLFW_KEY_F2 , EventKeyboard::KeyCode::KEY_F2 }, + { GLFW_KEY_F3 , EventKeyboard::KeyCode::KEY_F3 }, + { GLFW_KEY_F4 , EventKeyboard::KeyCode::KEY_F4 }, + { GLFW_KEY_F5 , EventKeyboard::KeyCode::KEY_F5 }, + { GLFW_KEY_F6 , EventKeyboard::KeyCode::KEY_F6 }, + { GLFW_KEY_F7 , EventKeyboard::KeyCode::KEY_F7 }, + { GLFW_KEY_F8 , EventKeyboard::KeyCode::KEY_F8 }, + { GLFW_KEY_F9 , EventKeyboard::KeyCode::KEY_F9 }, + { GLFW_KEY_F10 , EventKeyboard::KeyCode::KEY_F10 }, + { GLFW_KEY_F11 , EventKeyboard::KeyCode::KEY_F11 }, + { GLFW_KEY_F12 , EventKeyboard::KeyCode::KEY_F12 }, + { GLFW_KEY_F13 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F14 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F15 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F16 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F17 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F18 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F19 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F20 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F21 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F22 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F23 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F24 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_F25 , EventKeyboard::KeyCode::KEY_NONE }, + { GLFW_KEY_KP_0 , EventKeyboard::KeyCode::KEY_0 }, + { GLFW_KEY_KP_1 , EventKeyboard::KeyCode::KEY_1 }, + { GLFW_KEY_KP_2 , EventKeyboard::KeyCode::KEY_2 }, + { GLFW_KEY_KP_3 , EventKeyboard::KeyCode::KEY_3 }, + { GLFW_KEY_KP_4 , EventKeyboard::KeyCode::KEY_4 }, + { GLFW_KEY_KP_5 , EventKeyboard::KeyCode::KEY_5 }, + { GLFW_KEY_KP_6 , EventKeyboard::KeyCode::KEY_6 }, + { GLFW_KEY_KP_7 , EventKeyboard::KeyCode::KEY_7 }, + { GLFW_KEY_KP_8 , EventKeyboard::KeyCode::KEY_8 }, + { GLFW_KEY_KP_9 , EventKeyboard::KeyCode::KEY_9 }, + { GLFW_KEY_KP_DECIMAL , EventKeyboard::KeyCode::KEY_PERIOD }, + { GLFW_KEY_KP_DIVIDE , EventKeyboard::KeyCode::KEY_KP_DIVIDE }, + { GLFW_KEY_KP_MULTIPLY , EventKeyboard::KeyCode::KEY_KP_MULTIPLY }, + { GLFW_KEY_KP_SUBTRACT , EventKeyboard::KeyCode::KEY_KP_MINUS }, + { GLFW_KEY_KP_ADD , EventKeyboard::KeyCode::KEY_KP_PLUS }, + { GLFW_KEY_KP_ENTER , EventKeyboard::KeyCode::KEY_KP_ENTER }, + { GLFW_KEY_KP_EQUAL , EventKeyboard::KeyCode::KEY_EQUAL }, + { GLFW_KEY_LEFT_SHIFT , EventKeyboard::KeyCode::KEY_LEFT_SHIFT }, + { GLFW_KEY_LEFT_CONTROL , EventKeyboard::KeyCode::KEY_LEFT_CTRL }, + { GLFW_KEY_LEFT_ALT , EventKeyboard::KeyCode::KEY_LEFT_ALT }, + { GLFW_KEY_LEFT_SUPER , EventKeyboard::KeyCode::KEY_HYPER }, + { GLFW_KEY_RIGHT_SHIFT , EventKeyboard::KeyCode::KEY_RIGHT_SHIFT }, + { GLFW_KEY_RIGHT_CONTROL , EventKeyboard::KeyCode::KEY_RIGHT_CTRL }, + { GLFW_KEY_RIGHT_ALT , EventKeyboard::KeyCode::KEY_RIGHT_ALT }, + { GLFW_KEY_RIGHT_SUPER , EventKeyboard::KeyCode::KEY_HYPER }, + { GLFW_KEY_MENU , EventKeyboard::KeyCode::KEY_MENU }, + { GLFW_KEY_LAST , EventKeyboard::KeyCode::KEY_NONE } +}; + +////////////////////////////////////////////////////////////////////////// +// implement GLViewImpl +////////////////////////////////////////////////////////////////////////// + + +GLViewImpl::GLViewImpl(bool initglfw) +: _captured(false) +, _supportTouch(false) +, _isInRetinaMonitor(false) +, _isRetinaEnabled(false) +, _retinaFactor(1) +, _frameZoomFactor(1.0f) +, _mainWindow(nullptr) +, _monitor(nullptr) +, _mouseX(0.0f) +, _mouseY(0.0f) +{ + _viewName = "cocos2dx"; + g_keyCodeMap.clear(); + for (auto& item : g_keyCodeStructArray) + { + g_keyCodeMap[item.glfwKeyCode] = item.keyCode; + } + + GLFWEventHandler::setGLViewImpl(this); + if (initglfw) + { + glfwSetErrorCallback(GLFWEventHandler::onGLFWError); + glfwInit(); + } +} + +GLViewImpl::~GLViewImpl() +{ + CCLOGINFO("deallocing GLViewImpl: %p", this); + GLFWEventHandler::setGLViewImpl(nullptr); + glfwTerminate(); +} + +GLViewImpl* GLViewImpl::create(const std::string& viewName) +{ + return GLViewImpl::create(viewName, false); +} + +GLViewImpl* GLViewImpl::create(const std::string& viewName, bool resizable) +{ + auto ret = new (std::nothrow) GLViewImpl; + if(ret && ret->initWithRect(viewName, Rect(0, 0, 960, 640), 1.0f, resizable)) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +GLViewImpl* GLViewImpl::createWithRect(const std::string& viewName, Rect rect, float frameZoomFactor, bool resizable) +{ + auto ret = new (std::nothrow) GLViewImpl; + if(ret && ret->initWithRect(viewName, rect, frameZoomFactor, resizable)) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName) +{ + auto ret = new (std::nothrow) GLViewImpl(); + if(ret && ret->initWithFullScreen(viewName)) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor) +{ + auto ret = new (std::nothrow) GLViewImpl(); + if(ret && ret->initWithFullscreen(viewName, videoMode, monitor)) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor, bool resizable) +{ + setViewName(viewName); + + _frameZoomFactor = frameZoomFactor; + + glfwWindowHint(GLFW_RESIZABLE,resizable?GL_TRUE:GL_FALSE); + glfwWindowHint(GLFW_RED_BITS,_glContextAttrs.redBits); + glfwWindowHint(GLFW_GREEN_BITS,_glContextAttrs.greenBits); + glfwWindowHint(GLFW_BLUE_BITS,_glContextAttrs.blueBits); + glfwWindowHint(GLFW_ALPHA_BITS,_glContextAttrs.alphaBits); + glfwWindowHint(GLFW_DEPTH_BITS,_glContextAttrs.depthBits); + glfwWindowHint(GLFW_STENCIL_BITS,_glContextAttrs.stencilBits); + + glfwWindowHint(GLFW_SAMPLES, _glContextAttrs.multisamplingCount); + + // Don't create gl context. + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + + int neededWidth = rect.size.width * _frameZoomFactor; + int neededHeight = rect.size.height * _frameZoomFactor; + + _mainWindow = glfwCreateWindow(neededWidth, neededHeight, _viewName.c_str(), _monitor, nullptr); + + if (_mainWindow == nullptr) + { + std::string message = "Can't create window"; + if (!_glfwError.empty()) + { + message.append("\nMore info: \n"); + message.append(_glfwError); + } + + MessageBox(message.c_str(), "Error launch application"); + return false; + } + + // Initialize device. + NSView* contentView = [getCocoaWindow() contentView]; + [contentView setWantsLayer: YES]; + CGSize size; + size.width = rect.size.width; + size.height = rect.size.height; + CAMetalLayer* layer = [CAMetalLayer layer]; + [layer setDevice:MTLCreateSystemDefaultDevice()]; + [layer setPixelFormat:MTLPixelFormatBGRA8Unorm]; + [layer setFramebufferOnly:YES]; + [layer setDrawableSize:size]; + [contentView setLayer:layer]; + backend::DeviceMTL::setCAMetalLayer(layer); + + /* + * Note that the created window and context may differ from what you requested, + * as not all parameters and hints are + * [hard constraints](@ref window_hints_hard). This includes the size of the + * window, especially for full screen windows. To retrieve the actual + * attributes of the created window and context, use queries like @ref + * glfwGetWindowAttrib and @ref glfwGetWindowSize. + * + * see declaration glfwCreateWindow + */ + int realW = 0, realH = 0; + glfwGetWindowSize(_mainWindow, &realW, &realH); + if (realW != neededWidth) + { + rect.size.width = realW / _frameZoomFactor; + } + if (realH != neededHeight) + { + rect.size.height = realH / _frameZoomFactor; + } + + glfwSetMouseButtonCallback(_mainWindow, GLFWEventHandler::onGLFWMouseCallBack); + glfwSetCursorPosCallback(_mainWindow, GLFWEventHandler::onGLFWMouseMoveCallBack); + glfwSetScrollCallback(_mainWindow, GLFWEventHandler::onGLFWMouseScrollCallback); + glfwSetCharCallback(_mainWindow, GLFWEventHandler::onGLFWCharCallback); + glfwSetKeyCallback(_mainWindow, GLFWEventHandler::onGLFWKeyCallback); + glfwSetWindowPosCallback(_mainWindow, GLFWEventHandler::onGLFWWindowPosCallback); + glfwSetWindowSizeCallback(_mainWindow, GLFWEventHandler::onGLFWWindowSizeFunCallback); + glfwSetWindowIconifyCallback(_mainWindow, GLFWEventHandler::onGLFWWindowIconifyCallback); + glfwSetWindowFocusCallback(_mainWindow, GLFWEventHandler::onGLFWWindowFocusCallback); + + setFrameSize(rect.size.width, rect.size.height); + + return true; +} + +bool GLViewImpl::initWithFullScreen(const std::string& viewName) +{ + //Create fullscreen window on primary monitor at its current video mode. + _monitor = glfwGetPrimaryMonitor(); + if (nullptr == _monitor) + return false; + + const GLFWvidmode* videoMode = glfwGetVideoMode(_monitor); + return initWithRect(viewName, Rect(0, 0, videoMode->width, videoMode->height), 1.0f, false); +} + +bool GLViewImpl::initWithFullscreen(const std::string &viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor) +{ + //Create fullscreen on specified monitor at the specified video mode. + _monitor = monitor; + if (nullptr == _monitor) + return false; + + //These are soft constraints. If the video mode is retrieved at runtime, the resulting window and context should match these exactly. If invalid attribs are passed (eg. from an outdated cache), window creation will NOT fail but the actual window/context may differ. + glfwWindowHint(GLFW_REFRESH_RATE, videoMode.refreshRate); + glfwWindowHint(GLFW_RED_BITS, videoMode.redBits); + glfwWindowHint(GLFW_BLUE_BITS, videoMode.blueBits); + glfwWindowHint(GLFW_GREEN_BITS, videoMode.greenBits); + + return initWithRect(viewname, Rect(0, 0, videoMode.width, videoMode.height), 1.0f, false); +} + +bool GLViewImpl::isOpenGLReady() +{ + return nullptr != _mainWindow; +} + +void GLViewImpl::end() +{ + if(_mainWindow) + { + glfwSetWindowShouldClose(_mainWindow,1); + _mainWindow = nullptr; + } + // Release self. Otherwise, GLViewImpl could not be freed. + release(); +} + +void GLViewImpl::swapBuffers() +{ +// if(_mainWindow) +// glfwSwapBuffers(_mainWindow); +} + +bool GLViewImpl::windowShouldClose() +{ + if(_mainWindow) + return glfwWindowShouldClose(_mainWindow) ? true : false; + else + return true; +} + +void GLViewImpl::pollEvents() +{ + glfwPollEvents(); +} + +void GLViewImpl::enableRetina(bool enabled) +{ + //TODO coulsonwang +//#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +// _isRetinaEnabled = enabled; +// if (_isRetinaEnabled) +// { +// _retinaFactor = 1; +// } +// else +// { +// _retinaFactor = 2; +// } +// updateFrameSize(); +//#endif +} + + +void GLViewImpl::setIMEKeyboardState(bool /*bOpen*/) +{ + +} + +#if CC_ICON_SET_SUPPORT +void GLViewImpl::setIcon(const std::string& filename) const { + std::vector vec = {filename}; + this->setIcon(vec); +} + +void GLViewImpl::setIcon(const std::vector& filelist) const { + if (filelist.empty()) return; + std::vector icons; + for (auto const& filename: filelist) { + Image* icon = new (std::nothrow) Image(); + if (icon && icon->initWithImageFile(filename)) { + icons.push_back(icon); + } else { + CC_SAFE_DELETE(icon); + } + } + + if (icons.empty()) return; // No valid images + size_t iconsCount = icons.size(); + auto images = new GLFWimage[iconsCount]; + for (size_t i = 0; i < iconsCount; i++) { + auto& image = images[i]; + auto& icon = icons[i]; + image.width = icon->getWidth(); + image.height = icon->getHeight(); + image.pixels = icon->getData(); + }; + + GLFWwindow* window = this->getWindow(); + glfwSetWindowIcon(window, iconsCount, images); + + CC_SAFE_DELETE(images); + for (auto& icon: icons) { + CC_SAFE_DELETE(icon); + } +} + +void GLViewImpl::setDefaultIcon() const { + GLFWwindow* window = this->getWindow(); + glfwSetWindowIcon(window, 0, nullptr); +} +#endif /* CC_ICON_SET_SUPPORT */ + +void GLViewImpl::setCursorVisible( bool isVisible ) +{ + if( _mainWindow == NULL ) + return; + + if( isVisible ) + glfwSetInputMode(_mainWindow, GLFW_CURSOR, GLFW_CURSOR_NORMAL); + else + glfwSetInputMode(_mainWindow, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); +} + +void GLViewImpl::setFrameZoomFactor(float zoomFactor) +{ + CCASSERT(zoomFactor > 0.0f, "zoomFactor must be larger than 0"); + + if (std::abs(_frameZoomFactor - zoomFactor) < FLT_EPSILON) + { + return; + } + + _frameZoomFactor = zoomFactor; + updateFrameSize(); +} + +float GLViewImpl::getFrameZoomFactor() const +{ + return _frameZoomFactor; +} + +bool GLViewImpl::isFullscreen() const { + return (_monitor != nullptr); +} + +void GLViewImpl::setFullscreen() { + if (this->isFullscreen()) { + return; + } + _monitor = glfwGetPrimaryMonitor(); + if (nullptr == _monitor) { + return; + } + const GLFWvidmode* videoMode = glfwGetVideoMode(_monitor); + this->setFullscreen(*videoMode, _monitor); +} + +void GLViewImpl::setFullscreen(int monitorIndex) { + // set fullscreen on specific monitor + int count = 0; + GLFWmonitor** monitors = glfwGetMonitors(&count); + if (monitorIndex < 0 || monitorIndex >= count) { + return; + } + GLFWmonitor* monitor = monitors[monitorIndex]; + if (nullptr == monitor) { + return; + } + const GLFWvidmode* videoMode = glfwGetVideoMode(monitor); + this->setFullscreen(*videoMode, monitor); +} + +void GLViewImpl::setFullscreen(const GLFWvidmode &videoMode, GLFWmonitor *monitor) { + _monitor = monitor; + glfwSetWindowMonitor(_mainWindow, _monitor, 0, 0, videoMode.width, videoMode.height, videoMode.refreshRate); +} + +void GLViewImpl::setWindowed(int width, int height) { + if (!this->isFullscreen()) { + this->setFrameSize(width, height); + } else { + const GLFWvidmode* videoMode = glfwGetVideoMode(_monitor); + int xpos = 0, ypos = 0; + glfwGetMonitorPos(_monitor, &xpos, &ypos); + xpos += (videoMode->width - width) * 0.5; + ypos += (videoMode->height - height) * 0.5; + _monitor = nullptr; + glfwSetWindowMonitor(_mainWindow, nullptr, xpos, ypos, width, height, GLFW_DONT_CARE); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + // on mac window will sometimes lose title when windowed + glfwSetWindowTitle(_mainWindow, _viewName.c_str()); +#endif + } +} + +int GLViewImpl::getMonitorCount() const { + int count = 0; + glfwGetMonitors(&count); + return count; +} + +Size GLViewImpl::getMonitorSize() const { + GLFWmonitor* monitor = _monitor; + if (nullptr == monitor) { + GLFWwindow* window = this->getWindow(); + monitor = glfwGetWindowMonitor(window); + } + if (nullptr == monitor) { + monitor = glfwGetPrimaryMonitor(); + } + if (nullptr != monitor) { + const GLFWvidmode* videoMode = glfwGetVideoMode(monitor); + Size size = Size(videoMode->width, videoMode->height); + return size; + } + return Size::ZERO; +} + +void GLViewImpl::updateFrameSize() +{ + if (_screenSize.width > 0 && _screenSize.height > 0) + { + int w = 0, h = 0; + glfwGetWindowSize(_mainWindow, &w, &h); + + int frameBufferW = 0, frameBufferH = 0; + glfwGetFramebufferSize(_mainWindow, &frameBufferW, &frameBufferH); + + //TODO coulsonwang +// if (frameBufferW == 2 * w && frameBufferH == 2 * h) +// { +// if (_isRetinaEnabled) +// { +// _retinaFactor = 1; +// } +// else +// { +// _retinaFactor = 2; +// } +// glfwSetWindowSize(_mainWindow, _screenSize.width/2 * _retinaFactor * _frameZoomFactor, _screenSize.height/2 * _retinaFactor * _frameZoomFactor); +// _isInRetinaMonitor = true; +// } +// else + { + if (_isInRetinaMonitor) + { + _retinaFactor = 1; + } + glfwSetWindowSize(_mainWindow, _screenSize.width * _retinaFactor * _frameZoomFactor, _screenSize.height *_retinaFactor * _frameZoomFactor); + + _isInRetinaMonitor = false; + } + } +} + +void GLViewImpl::setFrameSize(float width, float height) +{ + GLView::setFrameSize(width, height); + updateFrameSize(); +} + +void GLViewImpl::setViewPortInPoints(float x , float y , float w , float h) +{ + Viewport vp; + vp.x = x * _scaleX * _frameZoomFactor + _viewPortRect.origin.x * _frameZoomFactor; + vp.y = y * _scaleY * _frameZoomFactor + _viewPortRect.origin.y * _frameZoomFactor; + vp.w = w * _scaleX * _frameZoomFactor; + vp.h = h * _scaleY * _frameZoomFactor; + Camera::setDefaultViewport(vp); +} + +void GLViewImpl::setScissorInPoints(float x , float y , float w , float h) +{ + auto x1 = (int)(x * _scaleX * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor); + auto y1 = (int)(y * _scaleY * _retinaFactor * _frameZoomFactor + _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor); + auto width1 = (unsigned int)(w * _scaleX * _retinaFactor * _frameZoomFactor); + auto height1 = (unsigned int)(h * _scaleY * _retinaFactor * _frameZoomFactor); + auto renderer = Director::getInstance()->getRenderer(); + renderer->setScissorRect(x1, y1, width1, height1); +} + +Rect GLViewImpl::getScissorRect() const +{ + auto renderer = Director::getInstance()->getRenderer(); + auto& rect = renderer->getScissorRect(); + + float x = (rect.x - _viewPortRect.origin.x * _retinaFactor * _frameZoomFactor) / (_scaleX * _retinaFactor * _frameZoomFactor); + float y = (rect.y - _viewPortRect.origin.y * _retinaFactor * _frameZoomFactor) / (_scaleY * _retinaFactor * _frameZoomFactor); + float w = rect.width / (_scaleX * _retinaFactor * _frameZoomFactor); + float h = rect.height / (_scaleY * _retinaFactor * _frameZoomFactor); + return Rect(x, y, w, h); +} + +void GLViewImpl::onGLFWError(int errorID, const char* errorDesc) +{ + if (_mainWindow) + { + _glfwError = StringUtils::format("GLFWError #%d Happen, %s", errorID, errorDesc); + } + else + { + _glfwError.append(StringUtils::format("GLFWError #%d Happen, %s\n", errorID, errorDesc)); + } + CCLOGERROR("%s", _glfwError.c_str()); +} + +void GLViewImpl::onGLFWMouseCallBack(GLFWwindow* /*window*/, int button, int action, int /*modify*/) +{ + if(GLFW_MOUSE_BUTTON_LEFT == button) + { + if(GLFW_PRESS == action) + { + _captured = true; + if (this->getViewPortRect().equals(Rect::ZERO) || this->getViewPortRect().containsPoint(Vec2(_mouseX,_mouseY))) + { + intptr_t id = 0; + this->handleTouchesBegin(1, &id, &_mouseX, &_mouseY); + } + } + else if(GLFW_RELEASE == action) + { + if (_captured) + { + _captured = false; + intptr_t id = 0; + this->handleTouchesEnd(1, &id, &_mouseX, &_mouseY); + } + } + } + + //Because OpenGL and cocos2d-x uses different Y axis, we need to convert the coordinate here + float cursorX = (_mouseX - _viewPortRect.origin.x) / _scaleX; + float cursorY = (_viewPortRect.origin.y + _viewPortRect.size.height - _mouseY) / _scaleY; + + if(GLFW_PRESS == action) + { + EventMouse event(EventMouse::MouseEventType::MOUSE_DOWN); + event.setCursorPosition(cursorX, cursorY); + event.setMouseButton(static_cast(button)); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + } + else if(GLFW_RELEASE == action) + { + EventMouse event(EventMouse::MouseEventType::MOUSE_UP); + event.setCursorPosition(cursorX, cursorY); + event.setMouseButton(static_cast(button)); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + } +} + +void GLViewImpl::onGLFWMouseMoveCallBack(GLFWwindow* window, double x, double y) +{ + _mouseX = (float)x; + _mouseY = (float)y; + + _mouseX /= this->getFrameZoomFactor(); + _mouseY /= this->getFrameZoomFactor(); + + if (_isInRetinaMonitor) + { + if (_retinaFactor == 1) + { + _mouseX *= 2; + _mouseY *= 2; + } + } + + if (_captured) + { + intptr_t id = 0; + this->handleTouchesMove(1, &id, &_mouseX, &_mouseY); + } + + //Because OpenGL and cocos2d-x uses different Y axis, we need to convert the coordinate here + float cursorX = (_mouseX - _viewPortRect.origin.x) / _scaleX; + float cursorY = (_viewPortRect.origin.y + _viewPortRect.size.height - _mouseY) / _scaleY; + + EventMouse event(EventMouse::MouseEventType::MOUSE_MOVE); + // Set current button + if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS) + { + event.setMouseButton(static_cast(GLFW_MOUSE_BUTTON_LEFT)); + } + else if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS) + { + event.setMouseButton(static_cast(GLFW_MOUSE_BUTTON_RIGHT)); + } + else if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS) + { + event.setMouseButton(static_cast(GLFW_MOUSE_BUTTON_MIDDLE)); + } + event.setCursorPosition(cursorX, cursorY); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void GLViewImpl::onGLFWMouseScrollCallback(GLFWwindow* /*window*/, double x, double y) +{ + EventMouse event(EventMouse::MouseEventType::MOUSE_SCROLL); + //Because OpenGL and cocos2d-x uses different Y axis, we need to convert the coordinate here + float cursorX = (_mouseX - _viewPortRect.origin.x) / _scaleX; + float cursorY = (_viewPortRect.origin.y + _viewPortRect.size.height - _mouseY) / _scaleY; + event.setScrollData((float)x, -(float)y); + event.setCursorPosition(cursorX, cursorY); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void GLViewImpl::onGLFWKeyCallback(GLFWwindow* /*window*/, int key, int /*scancode*/, int action, int /*mods*/) +{ + if (GLFW_REPEAT != action) + { + EventKeyboard event(g_keyCodeMap[key], GLFW_PRESS == action); + auto dispatcher = Director::getInstance()->getEventDispatcher(); + dispatcher->dispatchEvent(&event); + } + + if (GLFW_RELEASE != action) + { + switch (g_keyCodeMap[key]) + { + case EventKeyboard::KeyCode::KEY_BACKSPACE: + IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); + break; + case EventKeyboard::KeyCode::KEY_HOME: + case EventKeyboard::KeyCode::KEY_KP_HOME: + case EventKeyboard::KeyCode::KEY_DELETE: + case EventKeyboard::KeyCode::KEY_KP_DELETE: + case EventKeyboard::KeyCode::KEY_END: + case EventKeyboard::KeyCode::KEY_LEFT_ARROW: + case EventKeyboard::KeyCode::KEY_RIGHT_ARROW: + case EventKeyboard::KeyCode::KEY_ESCAPE: + IMEDispatcher::sharedDispatcher()->dispatchControlKey(g_keyCodeMap[key]); + break; + default: + break; + } + } +} + +void GLViewImpl::onGLFWCharCallback(GLFWwindow* /*window*/, unsigned int character) +{ + char16_t wcharString[2] = { (char16_t) character, 0 }; + std::string utf8String; + + StringUtils::UTF16ToUTF8( wcharString, utf8String ); + static std::set controlUnicode = { + "\xEF\x9C\x80", // up + "\xEF\x9C\x81", // down + "\xEF\x9C\x82", // left + "\xEF\x9C\x83", // right + "\xEF\x9C\xA8", // delete + "\xEF\x9C\xA9", // home + "\xEF\x9C\xAB", // end + "\xEF\x9C\xAC", // pageup + "\xEF\x9C\xAD", // pagedown + "\xEF\x9C\xB9" // clear + }; + // Check for send control key + if (controlUnicode.find(utf8String) == controlUnicode.end()) + { + IMEDispatcher::sharedDispatcher()->dispatchInsertText( utf8String.c_str(), utf8String.size() ); + } +} + +void GLViewImpl::onGLFWWindowPosCallback(GLFWwindow* /*window*/, int /*x*/, int /*y*/) +{ + Director::getInstance()->setViewport(); +} + +void GLViewImpl::onGLFWWindowSizeFunCallback(GLFWwindow* /*window*/, int width, int height) +{ + if (width && height && _resolutionPolicy != ResolutionPolicy::UNKNOWN) + { + Size baseDesignSize = _designResolutionSize; + ResolutionPolicy baseResolutionPolicy = _resolutionPolicy; + + int frameWidth = width / _frameZoomFactor; + int frameHeight = height / _frameZoomFactor; + setFrameSize(frameWidth, frameHeight); + setDesignResolutionSize(baseDesignSize.width, baseDesignSize.height, baseResolutionPolicy); + Director::getInstance()->setViewport(); + Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(GLViewImpl::EVENT_WINDOW_RESIZED, nullptr); + } +} + +void GLViewImpl::onGLFWWindowIconifyCallback(GLFWwindow* /*window*/, int iconified) +{ + if (iconified == GL_TRUE) + { + Application::getInstance()->applicationDidEnterBackground(); + } + else + { + Application::getInstance()->applicationWillEnterForeground(); + } +} + +void GLViewImpl::onGLFWWindowFocusCallback(GLFWwindow* /*window*/, int focused) +{ + if (focused == GL_TRUE) + { + Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(GLViewImpl::EVENT_WINDOW_FOCUSED, nullptr); + } + else + { + Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(GLViewImpl::EVENT_WINDOW_UNFOCUSED, nullptr); + } +} + +NS_CC_END // end of namespace cocos2d; diff --git a/cocos/platform/mac/CCPlatformDefine-mac.h b/cocos/platform/mac/CCPlatformDefine-mac.h index 4b659c7de67b..d8b757af4162 100644 --- a/cocos/platform/mac/CCPlatformDefine-mac.h +++ b/cocos/platform/mac/CCPlatformDefine-mac.h @@ -23,20 +23,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCPLATFORMDEFINE_H__ -#define __CCPLATFORMDEFINE_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC +#pragma once #include -#ifdef _USRDLL -#define CC_DLL __attribute__ ((visibility("default"))) -#else + #define CC_DLL -#endif #if CC_DISABLE_ASSERT > 0 #define CC_ASSERT(cond) @@ -54,7 +46,3 @@ THE SOFTWARE. #define NULL ((void *)0) #endif #endif - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC - -#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/tizen/CCApplication-tizen.cpp b/cocos/platform/tizen/CCApplication-tizen.cpp deleted file mode 100644 index d312e44a2941..000000000000 --- a/cocos/platform/tizen/CCApplication-tizen.cpp +++ /dev/null @@ -1,624 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/tizen/CCApplication-tizen.h" -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "platform/tizen/CCGLViewImpl-tizen.h" -#include "base/CCDirector.h" -#include "base/CCEventKeyboard.h" -#include "base/CCEventDispatcher.h" -#include "base/ccUtils.h" -#include "platform/CCFileUtils.h" - -#ifdef LOG_TAG -#undef LOG_TAG -#endif -#define LOG_TAG "cocos2d-x" - -ELEMENTARY_GLVIEW_GLOBAL_DEFINE(); - -NS_CC_BEGIN - -void stopAccelerometerSensor(); -void pauseAccelerometerSensor(); -void resumeAccelerometerSensor(); - -static void makeCurrent(void) -{ - Application* app = Application::getInstance(); - evas_gl_make_current(app->_evasGL, app->_sfc, app->_ctx); -} - - -static Eina_Bool _key_down_cb(void *data, int type, void *ev) -{ - makeCurrent(); - Ecore_Event_Key *event = (Ecore_Event_Key *)ev; - if (!strcmp("XF86Stop", event->key) || !strcmp("XF86Back", event->key)) - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_ESCAPE, true); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - } - else if (!strcmp("XF86Menu", event->key)) - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_MENU, true); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - } - - return ECORE_CALLBACK_PASS_ON; -} - -static Eina_Bool _key_up_cb(void *data, int type, void *ev) -{ - makeCurrent(); - Ecore_Event_Key *event = (Ecore_Event_Key *)ev; - if (!strcmp("XF86Stop", event->key) || !strcmp("XF86Back", event->key)) - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_ESCAPE, false); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - } - else if (!strcmp("XF86Menu", event->key)) - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_MENU, false); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - } - - return ECORE_CALLBACK_PASS_ON; -} - -static void draw_gl(Evas_Object *obj) -{ - auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - - director->mainLoop(); - glview->pollEvents(); -} - -static void del_gl(Evas_Object *obj) { - -} - -// sharedApplication pointer -Application* Application::__instance = nullptr; - -Application::Application() -: _win(nullptr) -, _conform(nullptr) -, _animationInterval(1.0f/60.0f*1000.0f) -, _paused(false) -{ - _orientation = APP_DEVICE_ORIENTATION_0; - CC_ASSERT(! __instance); - __instance = this; -} - -Application::~Application() -{ - CC_ASSERT(this == __instance); - __instance = nullptr; -} - -static void del_anim(void *data, Evas *evas, Evas_Object *obj, void *event_info) -{ - Ecore_Animator *ani = (Ecore_Animator *)evas_object_data_get(obj, "ani"); - ecore_animator_del(ani); -} - -static Eina_Bool anim(void *data) { - elm_glview_changed_set((Evas_Object*)data); - return EINA_TRUE; -} - -static void init_gl(Evas_Object *obj) { - Application *ad = Application::getInstance(); - - //save current ctx - ad->_evasGL = elm_glview_evas_gl_get(obj); - ad->_ctx = evas_gl_current_context_get(ad->_evasGL); - ad->_sfc = evas_gl_current_surface_get(ad->_evasGL); - - auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if (glview == nullptr) { - glview = GLViewImpl::create("Cocos2dxTizen"); - - int w, h; - elm_glview_size_get(obj, &w, &h); - glview->setFrameSize(w, h); - director->setOpenGLView(glview); - } - - ad->initGLContextAttrs(); - // Initialize instance and cocos2d. - if (! ad->applicationDidFinishLaunching()) - { - return; - } -} - -static void create_indicator(Application *ad) { - elm_win_conformant_set(ad->_win, EINA_TRUE); - - elm_win_indicator_mode_set(ad->_win, ELM_WIN_INDICATOR_SHOW); - elm_win_indicator_opacity_set(ad->_win, ELM_WIN_INDICATOR_TRANSPARENT); - - ad->_conform = elm_conformant_add(ad->_win); - evas_object_size_hint_weight_set(ad->_conform, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_win_resize_object_add(ad->_win, ad->_conform); - evas_object_show(ad->_conform); -} - -static Evas_Object* add_win(const char *name) { - Evas_Object *win; - - win = elm_win_util_standard_add(name, "tizen"); - - if (!win) - return nullptr; - //fix openURL tests not goes to another program issue - // elm_win_fullscreen_set(win, EINA_TRUE); - evas_object_show(win); - - return win; -} - -//touch call back -static void touches_down_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Multi_Down *)event_info; - int id = ev->device; - float x = ev->canvas.x; - float y = ev->canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesBegin(1, &id, &x, &y); -} - -static void touches_move_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Multi_Move *)event_info; - int id = ev->device; - float x = ev->cur.canvas.x; - float y = ev->cur.canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesMove(1, &id, &x, &y); -} - -static void touches_up_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Multi_Up *)event_info; - int id = ev->device; - float x = ev->canvas.x; - float y = ev->canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesEnd(1, &id, &x, &y); -} - -static void touch_down_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Mouse_Down *)event_info; - int id = ev->button; - float x = ev->canvas.x; - float y = ev->canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesBegin(1, &id, &x, &y); -} - -static void touch_move_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Mouse_Move *)event_info; - int id = ev->buttons; - float x = ev->cur.canvas.x; - float y = ev->cur.canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesMove(1, &id, &x, &y); -} - -static void touch_up_cb(void *data, Evas *e , Evas_Object *obj , void *event_info) -{ - auto ev = (Evas_Event_Mouse_Up *)event_info; - int id = ev->button; - float x = ev->canvas.x; - float y = ev->canvas.y; - - makeCurrent(); - cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesEnd(1, &id, &x, &y); -} - -static Elm_GLView_Mode get_glview_mode(const GLContextAttrs &attrs) -{ - /* for performance */ - Elm_GLView_Mode mode = ELM_GLVIEW_DIRECT; - - /* alpha */ - if (attrs.alphaBits > 0) - { - //fixme if enable this, cpp-test show white screen only. - //mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_ALPHA); - } - - /* depth */ - if (attrs.depthBits > 24) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_DEPTH_32); - } - else if (attrs.depthBits > 16) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_DEPTH_24); - } - else if (attrs.depthBits > 8) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_DEPTH_16); - } - else if (attrs.depthBits > 0) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_DEPTH_8); - } - - /* stencil */ - if (attrs.stencilBits > 8) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_STENCIL_16); - } - else if (attrs.stencilBits > 4) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_STENCIL_8); - } - else if (attrs.stencilBits > 2) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_STENCIL_4); - } - else if (attrs.stencilBits > 1) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_STENCIL_2); - } - else if (attrs.stencilBits > 0) - { - mode = (Elm_GLView_Mode)(mode | ELM_GLVIEW_STENCIL_1); - } - - return mode; -} - -static bool app_create(void *data) { - /* Hook to take necessary actions before main event loop starts - * Initialize UI resources and application's data - * If this function returns true, the main loop of application starts - * If this function returns false, the application is terminated. */ - - Evas_Object *gl; - Application *ad = (Application *)data; - - if (!data) - return false; - - /* Create and initialize GLView */ - elm_config_accel_preference_set("opengl"); - /* Create the window */ - ad->_win = add_win("cocos2d-x"); - - if (!ad->_win) - return false; - - int rots[2]; - rots[0] = ad->_orientation; - rots[1] = rots[0] + 180 % 360; - elm_win_wm_rotation_available_rotations_set(ad->_win, rots, 2); - - ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_down_cb, ad); - ecore_event_handler_add(ECORE_EVENT_KEY_UP, _key_up_cb, ad); - - gl = elm_glview_add(ad->_win); - elm_win_resize_object_add(ad->_win, gl); - ELEMENTARY_GLVIEW_GLOBAL_USE(gl); - evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - /* Create and initialize GLView */ - ad->initGLContextAttrs(); - auto attrs = GLView::getGLContextAttrs(); - auto mode = get_glview_mode(attrs); - elm_glview_mode_set(gl, mode); - - /* The resize policy tells GLView what to do with the surface when it - * resizes. ELM_GLVIEW_RESIZE_POLICY_RECREATE will tell it to - * destroy the current surface and recreate it to the new size. - */ - //elm_glview_resize_policy_set(gl, ELM_GLVIEW_RESIZE_POLICY_RECREATE); - - /* The render policy sets how GLView should render GL code. - * ELM_GLVIEW_RENDER_POLICY_ON_DEMAND will have the GL callback - * called only when the object is visible. - * ELM_GLVIEW_RENDER_POLICY_ALWAYS would cause the callback to be - * called even if the object were hidden. - */ - elm_glview_render_policy_set(gl, ELM_GLVIEW_RENDER_POLICY_ON_DEMAND); - - /* The initialize callback function gets registered here */ - elm_glview_init_func_set(gl, init_gl); - - /* The delete callback function gets registered here */ - elm_glview_del_func_set(gl, del_gl); - - /* The resize callback function gets registered here */ - // Cocos2d-x doesn't support to change orientation from portrait to landscape. - // So comment next line. -// elm_glview_resize_func_set(gl, resize_gl); - - /* The render callback function gets registered here */ - elm_glview_render_func_set(gl, draw_gl); - - /* Add the GLView to the box and show it */ - evas_object_show(gl); - - elm_object_focus_set(gl, EINA_TRUE); - - /* This adds an animator so that the app will regularly - * trigger updates of the GLView using elm_glview_changed_set(). - * - * NOTE: If you delete GL, this animator will keep running trying to access - * GL so this animator needs to be deleted with ecore_animator_del(). - */ - ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER); - ad->_ani = ecore_animator_add(anim, gl); - evas_object_data_set(gl, "ani", ad->_ani); - evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, del_anim, gl); - - /* Add Mouse Event Callbacks */ - evas_object_event_callback_add(gl, EVAS_CALLBACK_MOUSE_DOWN, touch_down_cb, ad); - evas_object_event_callback_add(gl, EVAS_CALLBACK_MOUSE_MOVE, touch_move_cb, ad); - evas_object_event_callback_add(gl, EVAS_CALLBACK_MOUSE_UP, touch_up_cb, ad); - - evas_object_event_callback_add(gl, EVAS_CALLBACK_MULTI_DOWN, touches_down_cb, ad); - evas_object_event_callback_add(gl, EVAS_CALLBACK_MULTI_MOVE, touches_move_cb, ad); - evas_object_event_callback_add(gl, EVAS_CALLBACK_MULTI_UP, touches_up_cb, ad); - - - - create_indicator(ad); - - return true; -} - -static void app_pause(void *data) -{ - /* Take necessary actions when application becomes invisible. */ - if(!data) - { - return; - } - pauseAccelerometerSensor(); - - Application* app = ((Application *)data); - app->applicationDidEnterBackground(); - - ecore_animator_freeze(app->_ani); - app->setPauseFlag(true); -} - -static void app_resume(void *data) -{ - /* Take necessary actions when application becomes visible. */ - if(!data) - { - return; - } - - Application* app = ((Application *)data); - app->applicationWillEnterForeground(); - resumeAccelerometerSensor(); - - ecore_animator_thaw(app->_ani); - app->setPauseFlag(false); -} - -static void app_terminate(void *data) -{ - /* Release all resources. */ - if(!data) - { - return; - } - stopAccelerometerSensor(); - Director::getInstance()->end(); - // Application* app = ((Application *)data); - // delete app; -} - -static void app_control(app_control_h app_control, void *data) -{ - /* Handle the launch request. */ -} - -int Application::run() -{ - ui_app_lifecycle_callback_s event_callback = { nullptr, }; - - event_callback.create = app_create; - event_callback.terminate = app_terminate; - event_callback.pause = app_pause; - event_callback.resume = app_resume; - event_callback.app_control = app_control; - -/* ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); - ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); - ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); - ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); - ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &ad); - ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]); -*/ - int ret = ui_app_main(_argc, _argv, &event_callback, this); - if (ret != APP_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "The application failed to start, and returned %d", ret); - } - - return ret; -} - -void Application::setAnimationInterval(float interval) -{ - _animationInterval = interval*1000.0f; - ecore_animator_frametime_set(interval); -} - -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - -void Application::setResourceRootPath(const std::string& rootResDir) -{ - _resourceRootPath = rootResDir; - if (_resourceRootPath[_resourceRootPath.length() - 1] != '/') - { - _resourceRootPath += '/'; - } - FileUtils* pFileUtils = FileUtils::getInstance(); - std::vector searchPaths = pFileUtils->getSearchPaths(); - searchPaths.insert(searchPaths.begin(), _resourceRootPath); - pFileUtils->setSearchPaths(searchPaths); -} - -const std::string& Application::getResourceRootPath(void) -{ - return _resourceRootPath; -} - -Application::Platform Application::getTargetPlatform() -{ - return Platform::OS_TIZEN; -} - -void Application::setDeviceOrientation(int orientation) -{ - _orientation = orientation; -} - -void Application::setMainArgs(int argc, char **argv) -{ - _argc = argc; - _argv = argv; -} -bool Application::openURL(const std::string &url) -{ - bool flag = false; - if(0==url.length()) - { - return flag; - } - app_control_h app_control; - - app_control_create(&app_control); - app_control_set_operation(app_control, APP_CONTROL_OPERATION_VIEW); - app_control_set_uri(app_control, url.c_str()); - - int ctrlError; - if ((ctrlError=app_control_send_launch_request(app_control, NULL, NULL)) == APP_CONTROL_ERROR_NONE) - { - flag = true; - } - else - { - dlog_print(DLOG_ERROR, LOG_TAG, "open url failed, and returned %d", ctrlError); - } - - app_control_destroy(app_control); - return flag; -} - -////////////////////////////////////////////////////////////////////////// -// static member function -////////////////////////////////////////////////////////////////////////// -Application* Application::getInstance() -{ - CC_ASSERT(__instance); - return __instance; -} - -// @deprecated Use getInstance() instead -Application* Application::sharedApplication() -{ - return Application::getInstance(); -} - -const char * Application::getCurrentLanguageCode() -{ - static char code[3]={0}; - char *pLanguageName = getenv("LANG"); - if (!pLanguageName) - return "en"; - strtok(pLanguageName, "_"); - if (!pLanguageName) - return "en"; - strncpy(code,pLanguageName,2); - code[2]='\0'; - return code; -} - -std::string Application::getVersion() -{ - //TODO - return ""; -} - -LanguageType Application::getCurrentLanguage() -{ - char *pLanguageName = getenv("LANG"); - if (!pLanguageName) - { - return LanguageType::ENGLISH; - } - strtok(pLanguageName, "_"); - if (!pLanguageName) - { - return LanguageType::ENGLISH; - } - - return utils::getLanguageTypeByISO2(pLanguageName); -} - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - diff --git a/cocos/platform/tizen/CCApplication-tizen.h b/cocos/platform/tizen/CCApplication-tizen.h deleted file mode 100644 index 76f4d23b3b91..000000000000 --- a/cocos/platform/tizen/CCApplication-tizen.h +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#ifndef CCAPLICATION_TIZEN_H_ -#define CCAPLICATION_TIZEN_H_ - -#include "platform/CCCommon.h" -#include "platform/CCApplicationProtocol.h" -#include - -#include - -NS_CC_BEGIN -class Rect; - -class Application : public ApplicationProtocol -{ -public: - /** - * @js ctor - */ - Application(); - /** - * @js NA - * @lua NA - */ - virtual ~Application(); - - /** - @brief Callback by Director for limit FPS. - @param interval The time, which expressed in second in second, between current frame and next. - */ - virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; - - /** - @brief Run the message loop. - */ - int run(); - - /** - @brief Get current application instance. - @return Current application instance pointer. - */ - static Application* getInstance(); - - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication(); - - /* override functions */ - virtual LanguageType getCurrentLanguage() override; - - std::string getVersion() override; - - /** - @brief Get current language iso 639-1 code - @return Current language iso 639-1 code - */ - virtual const char * getCurrentLanguageCode() override; - - /** - @brief Open url in default browser - @param String with url to open. - @return true if the resource located by the URL was successfully opened; otherwise false. - */ - virtual bool openURL(const std::string &url) override; - - /** - * Sets the Resource root path. - * @deprecated Please use FileUtils::getInstance()->setSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE void setResourceRootPath(const std::string& rootResDir); - - /** - * Gets the Resource root path. - * @deprecated Please use FileUtils::getInstance()->getSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE const std::string& getResourceRootPath(void); - - /** - @brief Get target platform - */ - virtual Platform getTargetPlatform() override; - - void setDeviceOrientation(int orientation); - void setMainArgs(int argc, char **argv); - void setPauseFlag(bool pause){_paused = pause;} - bool isPaused(){return _paused;} -public: - Evas_Object * _win; - Evas_Object * _conform; - - Evas_GL * _evasGL; - Evas_GL_Context * _ctx; - Evas_GL_Surface * _sfc; - Ecore_Animator * _ani; - - int _orientation; - int _argc; - char **_argv; -protected: - long _animationInterval; //micro second - std::string _resourceRootPath; - bool _paused; - static Application * __instance; -}; - -NS_CC_END - -#endif // CCAPLICATION_TIZEN_H_ - -#endif /* CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN */ diff --git a/cocos/platform/tizen/CCCommon-tizen.cpp b/cocos/platform/tizen/CCCommon-tizen.cpp deleted file mode 100644 index 4b4e60b5f0f0..000000000000 --- a/cocos/platform/tizen/CCCommon-tizen.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/CCCommon.h" -#include "platform/tizen/CCStdC-tizen.h" -#include "base/CCConsole.h" - -NS_CC_BEGIN - -void MessageBox(const char * msg, const char * title) -{ - log("%s: %s", title, msg); -} - -void LuaLog(const char * format) -{ - puts(format); -} - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN diff --git a/cocos/platform/tizen/CCDevice-tizen.cpp b/cocos/platform/tizen/CCDevice-tizen.cpp deleted file mode 100644 index 9e4381bb0001..000000000000 --- a/cocos/platform/tizen/CCDevice-tizen.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/CCDevice.h" - -#include -#include -#include -#include -#include -#include - -#include "base/CCEventDispatcher.h" -#include "base/CCEventAcceleration.h" -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" -#include "platform/tizen/CCApplication-tizen.h" - -using namespace std; -NS_CC_BEGIN - -static sensor_h s_sensorHandle = nullptr; -static sensor_listener_h s_sensorListener = nullptr; -static float s_sensorInterval = 30.0f; - -#define GRAVITY_EARTH 9.80665f - -static bool checkAccelerometerValues(sensor_event_s *sensor_data) -{ - for(int i = 0; i < sensor_data->value_count; ++i) - { - float value = sensor_data->values[i]; - - if(isnan(value))//or other limitations - { - return false; - } - } - return true; -} - -static void accelerometer_sensor_cb(sensor_h _sensor, sensor_event_s *sensor_data, void *user_data) -{ - if(!checkAccelerometerValues(sensor_data)) - { - CCLOG("sensor value is invalid!!"); - return; - } - if(3 != sensor_data->value_count) - { - return; - } - Acceleration *_acceleration = new Acceleration(); - _acceleration->x = sensor_data->values[0] / GRAVITY_EARTH; - _acceleration->y = sensor_data->values[1] / GRAVITY_EARTH; - _acceleration->z = sensor_data->values[2] / GRAVITY_EARTH; - _acceleration->timestamp = (double)sensor_data->timestamp / 1e6; - - double tmp = _acceleration->x; - Application *app = Application::getInstance(); - int orientation = elm_win_rotation_get(app->_win); - - switch (orientation) - { - case 0: - _acceleration->x = _acceleration->y; - _acceleration->y = tmp; - break; - - case 90: - _acceleration->x = -_acceleration->y; - _acceleration->y = tmp; - break; - - case 180: - _acceleration->x = -_acceleration->y; - _acceleration->y = -tmp; - break; - - case 270: - _acceleration->x = _acceleration->y; - _acceleration->y = -tmp; - break; - default: - CCLOG("unknown orientation"); - } - - cocos2d::EventAcceleration event(*_acceleration); - auto dispatcher = cocos2d::Director::getInstance()->getEventDispatcher(); - dispatcher->dispatchEvent(&event); -} - -void stopAccelerometerSensor() -{ - if (s_sensorListener) - { - sensor_listener_stop(s_sensorListener); - sensor_destroy_listener(s_sensorListener); - s_sensorListener = nullptr; - s_sensorHandle = nullptr; - } -} - -void startAccelerometerSensor() -{ - if (!s_sensorListener) - { - sensor_get_default_sensor(SENSOR_ACCELEROMETER, &s_sensorHandle); - auto err = sensor_create_listener(s_sensorHandle, &s_sensorListener); - if(SENSOR_ERROR_NONE != err) - { - CCLOG("create sensor failed!"); - } - sensor_listener_set_event_cb(s_sensorListener, s_sensorInterval, accelerometer_sensor_cb, NULL); - sensor_listener_start(s_sensorListener); - } -} - -static bool s_resumeAccelerometerSensor = false; - -void pauseAccelerometerSensor() -{ - if (s_sensorListener) - { - s_resumeAccelerometerSensor = true; - stopAccelerometerSensor(); - } - else - { - s_resumeAccelerometerSensor = false; - } -} - -void resumeAccelerometerSensor() -{ - if (s_resumeAccelerometerSensor) - { - startAccelerometerSensor(); - } -} - -void Device::setAccelerometerEnabled(bool isEnabled) -{ - if(isEnabled) - { - startAccelerometerSensor(); - } - else - { - stopAccelerometerSensor(); - } -} - -void Device::setAccelerometerInterval(float interval) -{ - s_sensorInterval = interval; - if(s_sensorListener) - { - sensor_listener_set_interval(s_sensorListener, s_sensorInterval); - } -} - -int Device::getDPI() -{ - static int dpi = -1; - if (dpi == -1) - { - auto ret = system_info_get_platform_int("tizen.org/feature/screen.dpi",&dpi); - if(ret != SYSTEM_INFO_ERROR_NONE) - { - //error handing - dpi = -1; - } - } - return dpi; -} - -static void getTextBitmapData(const char * text, const FontDefinition& textDefinition, Data& bitmapData, int &bitmapWidth, int &bitmapHeight) -{ - //create canvas object - auto method = evas_render_method_lookup("buffer"); - if (method <= 0) - { - log("ERROR: evas was not compiled with 'buffer' engine!"); - return ; - } - - //evas_init();//not necessary, removed when use Tizen 2.4. - auto canvas = evas_new(); - if(!canvas){ - log("ERROR: could not instantiate new evas canvas."); - return; - } - evas_output_method_set(canvas, method); - - std::string fontFullPath; - if(textDefinition._fontName.empty()) - { - fontFullPath = "Sans"; - } - else - { - fontFullPath= FileUtils::getInstance()->fullPathForFilename(textDefinition._fontName); - } - - const char* fontName = fontFullPath.c_str(); - const char* textAlign = "left"; - const char* textValign = "top"; - char richTextStyle[50]; - richTextStyle[0] = 0; - - if (textDefinition._stroke._strokeEnabled) - { - sprintf(richTextStyle,"style=outline outline_color=#%02X%02X%02X", - textDefinition._stroke._strokeColor.r, textDefinition._stroke._strokeColor.g, textDefinition._stroke._strokeColor.b); - } - - switch (textDefinition._alignment) - { - case TextHAlignment::CENTER: - textAlign = "center"; - break; - case TextHAlignment::RIGHT: - textAlign = "right"; - break; - default: - break; - } - double valignment = 0.0; - switch(textDefinition._vertAlignment) - { - case TextVAlignment::CENTER: - textValign = "center"; - valignment = 0.5; - break; - case TextVAlignment::BOTTOM: - textValign = "bottom"; - valignment = 1.0; - break; - default: - break; - } - - auto richText = (char*)malloc(strlen(text) + 150); - sprintf(richText,"DEFAULT='font=%s font_size=%d align=%s valign=%s %s color=#%02X%02X%02X wrap=word'", - fontName, textDefinition._fontSize, textAlign, textValign, richTextStyle, - textDefinition._fontFillColor.b, textDefinition._fontFillColor.g, textDefinition._fontFillColor.r); - - auto entry = evas_object_textblock_add(canvas); - auto st = evas_textblock_style_new(); - evas_textblock_style_set(st, richText); - evas_object_textblock_style_set(entry, st); - evas_textblock_style_free(st); - evas_object_textblock_valign_set(entry, valignment); - - evas_object_textblock_text_markup_set(entry, evas_textblock_text_utf8_to_markup(entry, text)); - free(richText); - - evas_object_resize(entry, 2048, 0);//allocate one default size first. - - Evas_Coord width = textDefinition._dimensions.width; - Evas_Coord height = textDefinition._dimensions.height; - if(0==width*height) - { - evas_object_textblock_size_formatted_get(entry, &width, &height); - } - - evas_object_resize(entry, width, height); - - //init canvas - evas_output_size_set(canvas, width, height); - evas_output_viewport_set(canvas, 0, 0, width, height); - - auto einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); - if (!einfo){ - log("ERROR: could not get evas engine info!"); - evas_free(canvas); - return ; - } - - // ARGB32 is sizeof(int), that is 4 bytes, per pixel - bitmapWidth = width; - bitmapHeight = height; - void* pixels = malloc(bitmapWidth * bitmapHeight * 4); - if (!pixels){ - log("ERROR: could not allocate canvas pixels!"); - evas_free(canvas); - return; - } - - einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; - einfo->info.dest_buffer = pixels; - einfo->info.dest_buffer_row_bytes = bitmapWidth * sizeof(int); - einfo->info.use_color_key = 0; - einfo->info.alpha_threshold = 0; - einfo->info.func.new_update_region = NULL; - einfo->info.func.free_update_region = NULL; - evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); - - //render - evas_object_show(entry); - auto updates = evas_render_updates(canvas); - evas_render_updates_free(updates); - - bitmapData.fastSet((unsigned char*)pixels,bitmapWidth * bitmapHeight * 4); - - evas_free(canvas); - //evas_shutdown();//not necessary, removed when use Tizen 2.4. -} - -Data Device::getTextureDataForText(const char * text, const FontDefinition& textDefinition, TextAlign align, int &width, int &height, bool& hasPremultipliedAlpha) -{ - Data ret; - do - { - getTextBitmapData(text, textDefinition, ret, width, height); - hasPremultipliedAlpha = true; - } while (0); - - return ret; -} - -void Device::setKeepScreenOn(bool value) -{ -} - -void Device::vibrate(float /*duration*/) -{ -} - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN diff --git a/cocos/platform/tizen/CCFileUtils-tizen.cpp b/cocos/platform/tizen/CCFileUtils-tizen.cpp deleted file mode 100644 index 504f81994d8c..000000000000 --- a/cocos/platform/tizen/CCFileUtils-tizen.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/tizen/CCFileUtils-tizen.h" -#include -#include - -using namespace std; -NS_CC_BEGIN - -FileUtils* FileUtils::getInstance() -{ - if (s_sharedFileUtils == nullptr) - { - s_sharedFileUtils = new FileUtilsTizen(); - if(!s_sharedFileUtils->init()) - { - delete s_sharedFileUtils; - s_sharedFileUtils = nullptr; - CCLOG("ERROR: Could not init FileUtilsTizen"); - } - } - - return s_sharedFileUtils; -} - -FileUtilsTizen::FileUtilsTizen() -{ - -} - -bool FileUtilsTizen::init() -{ - _defaultResRootPath = app_get_resource_path(); - _writablePath = app_get_data_path(); - - return FileUtils::init(); -} - -string FileUtilsTizen::getWritablePath() const -{ - return _writablePath; -} - -bool FileUtilsTizen::isFileExistInternal(const std::string& strFilePath) const -{ - if (strFilePath.empty()) - { - return false; - } - - std::string strPath = strFilePath; - if (!isAbsolutePath(strPath)) - { // Not absolute path, add the default root path at the beginning. - strPath.insert(0, _defaultResRootPath); - } - - struct stat sts; - return (stat(strPath.c_str(), &sts) != -1) ? true : false; -} - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN diff --git a/cocos/platform/tizen/CCFileUtils-tizen.h b/cocos/platform/tizen/CCFileUtils-tizen.h deleted file mode 100644 index e72d60eb34c2..000000000000 --- a/cocos/platform/tizen/CCFileUtils-tizen.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#ifndef __CC_FILEUTILS_TIZEN_H__ -#define __CC_FILEUTILS_TIZEN_H__ - -#include "platform/CCFileUtils.h" -#include "platform/CCPlatformMacros.h" -#include "base/ccTypes.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -//! @brief Helper class to handle file operations -class CC_DLL FileUtilsTizen : public FileUtils -{ -public: - /* override functions */ - virtual bool init() override; - - virtual std::string getWritablePath() const override; - -private: - FileUtilsTizen(); - - std::string _writablePath; - - virtual bool isFileExistInternal(const std::string& strFilePath) const override; - - friend class FileUtils; -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_FILEUTILS_TIZEN_H__ - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - diff --git a/cocos/platform/tizen/CCGLViewImpl-tizen.cpp b/cocos/platform/tizen/CCGLViewImpl-tizen.cpp deleted file mode 100644 index 53f474432c16..000000000000 --- a/cocos/platform/tizen/CCGLViewImpl-tizen.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/tizen/CCGLViewImpl-tizen.h" -#include -#include -#include -#include -#include "platform/CCApplication.h" -#include "base/CCIMEDispatcher.h" -#include "base/CCDirector.h" - -NS_CC_BEGIN - -GLViewImpl* GLViewImpl::createWithRect(const std::string& viewName, Rect rect, float frameZoomFactor) -{ - auto ret = new GLViewImpl; - if(ret && ret->initWithRect(viewName, rect, frameZoomFactor)) { - ret->autorelease(); - return ret; - } - - return nullptr; -} - -GLViewImpl* GLViewImpl::create(const std::string& viewName) -{ - auto ret = new GLViewImpl; - if(ret && ret->initWithFullScreen(viewName)) { - ret->autorelease(); - return ret; - } - - return nullptr; -} - -GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName) -{ - auto ret = new GLViewImpl(); - if(ret && ret->initWithFullScreen(viewName)) { - ret->autorelease(); - return ret; - } - - return nullptr; -} - -GLViewImpl::GLViewImpl() -{ - -} - -GLViewImpl::~GLViewImpl() -{ - -} - -bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor) -{ - return true; -} - -bool GLViewImpl::initWithFullScreen(const std::string& viewName) -{ - return true; -} - - -bool GLViewImpl::isOpenGLReady() -{ - return (_screenSize.width != 0 && _screenSize.height != 0); -} - -void GLViewImpl::end() -{ - ui_app_exit(); -} - -void GLViewImpl::swapBuffers() -{ -} - -//============================================================================================ -static Evas_Object * s_keypadWin = nullptr; -static Evas_Object * s_keypadEntry = nullptr; -Ecore_IMF_Context *s_imf = nullptr; - -static void imfEventCommitCallback(void *data, Ecore_IMF_Context *ctx, void *event_info) -{ - auto commit_str = (char *)event_info; - if (commit_str) - { - cocos2d::IMEDispatcher::sharedDispatcher()->dispatchInsertText(commit_str, strlen(commit_str)); - } -} - -static void entryKeyCallback(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - auto keyInfo = (Evas_Event_Key_Up*)event_info; - if (keyInfo->key && !strcmp(keyInfo->key,"BackSpace")) - { - cocos2d::IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); - } -} - -static void stateChangedCallback(void *data, Ecore_IMF_Context *ctx, int value) -{ - if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) - { - evas_object_del(s_keypadWin); - s_keypadWin = nullptr; - s_imf = nullptr; - } -} - -static void closeKeypad() -{ - ecore_imf_context_input_panel_event_callback_add (s_imf, ECORE_IMF_INPUT_PANEL_STATE_EVENT, stateChangedCallback, NULL); - elm_entry_input_panel_hide(s_keypadEntry); -} - -static void entryActivatedCallback(void *data, Evas_Object *obj, void *event_info) -{ - closeKeypad(); -} - -static void keyPadBackCallback(void *data, Evas_Object *obj, void *event_info) -{ - closeKeypad(); -} - -static void blankAreaClickedCallback(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - closeKeypad(); -} - -void GLViewImpl::setIMEKeyboardState(bool open) -{ - if (open) - { - if (!s_keypadWin) - { - auto frameSize = Director::getInstance()->getOpenGLView()->getFrameSize(); - auto app = Application::getInstance(); - - s_keypadWin = elm_win_add(app->_win, "cocos2d-x textfield", ELM_WIN_BASIC); - elm_win_autodel_set(s_keypadWin, EINA_TRUE); - elm_win_conformant_set(s_keypadWin, EINA_TRUE); - elm_win_alpha_set(s_keypadWin, EINA_TRUE); - eext_object_event_callback_add(s_keypadWin, EEXT_CALLBACK_BACK, keyPadBackCallback, NULL); - evas_object_show(s_keypadWin); - - int rots[2]; - rots[0] = (int)elm_win_rotation_get(app->_win); - rots[1] = rots[0] + 180 % 360; - elm_win_wm_rotation_available_rotations_set(s_keypadWin, rots, 2); - - auto rectangle = elm_bg_add(s_keypadWin); - evas_object_resize(rectangle, frameSize.width, frameSize.height + 50); - evas_object_color_set(rectangle, 0xff, 0xff, 0xff, 0); - evas_object_move(rectangle, 0, -50); - evas_object_show(rectangle); - - evas_object_repeat_events_set(rectangle, EINA_TRUE); - evas_object_event_callback_add(rectangle, EVAS_CALLBACK_MOUSE_UP, blankAreaClickedCallback, NULL); - evas_object_event_callback_add(rectangle, EVAS_CALLBACK_MULTI_UP, blankAreaClickedCallback, NULL); - - s_keypadEntry = elm_entry_add(rectangle); - elm_entry_single_line_set(s_keypadEntry, EINA_TRUE); - evas_object_resize(s_keypadEntry, frameSize.width, 50); - evas_object_move(s_keypadEntry, 0, -50); - elm_entry_input_panel_return_key_type_set(s_keypadEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE); - elm_entry_prediction_allow_set(s_keypadEntry, EINA_FALSE); - evas_object_event_callback_add(s_keypadEntry, EVAS_CALLBACK_KEY_UP, entryKeyCallback, NULL); - evas_object_show(s_keypadEntry); - - elm_object_focus_set(s_keypadEntry, EINA_TRUE); - evas_object_smart_callback_add(s_keypadEntry, "activated", entryActivatedCallback, NULL); - elm_entry_input_panel_show(s_keypadEntry); - - s_imf = (Ecore_IMF_Context*)elm_entry_imf_context_get(s_keypadEntry); - ecore_imf_context_event_callback_add(s_imf, ECORE_IMF_CALLBACK_COMMIT, imfEventCommitCallback, s_keypadEntry); - } - } - else if (s_keypadWin) - { - closeKeypad(); - } -} - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN diff --git a/cocos/platform/tizen/CCGLViewImpl-tizen.h b/cocos/platform/tizen/CCGLViewImpl-tizen.h deleted file mode 100644 index b6718aceafcf..000000000000 --- a/cocos/platform/tizen/CCGLViewImpl-tizen.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CC_EGLVIEWIMPL_TIZEN_H__ -#define __CC_EGLVIEWIMPL_TIZEN_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/CCGLView.h" - -NS_CC_BEGIN - -class CC_DLL GLViewImpl : public GLView -{ -public: - - // static function - static GLViewImpl* create(const std::string &viewname); - static GLViewImpl* createWithRect(const std::string& viewName, Rect rect, float frameZoomFactor = 1.0f); - static GLViewImpl* createWithFullScreen(const std::string& viewName); - - bool isOpenGLReady() override; - void end() override; - void swapBuffers() override; - void setIMEKeyboardState(bool bOpen) override; - -protected: - GLViewImpl(); - virtual ~GLViewImpl(); - - bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor); - bool initWithFullScreen(const std::string& viewName); -}; - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#endif // end of __CC_EGLVIEWIMPL_TIZEN_H__ diff --git a/cocos/platform/tizen/CCPlatformDefine-tizen.h b/cocos/platform/tizen/CCPlatformDefine-tizen.h deleted file mode 100644 index acf92853af49..000000000000 --- a/cocos/platform/tizen/CCPlatformDefine-tizen.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCPLATFORMDEFINE_H__ -#define __CCPLATFORMDEFINE_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include - -#define CC_DLL - -#include -#define CC_ASSERT(cond) assert(cond) -#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam - -/* Define NULL pointer value */ -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/tizen/CCStdC-tizen.cpp b/cocos/platform/tizen/CCStdC-tizen.cpp deleted file mode 100644 index 330f0d401b24..000000000000 --- a/cocos/platform/tizen/CCStdC-tizen.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/tizen/CCStdC-tizen.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - -int CC_DLL gettimeofday(struct timeval * val, struct timezone *) -{ - if (val) - { - SYSTEMTIME wtm; - GetLocalTime(&wtm); - - struct tm tTm; - tTm.tm_year = wtm.wYear - 1900; - tTm.tm_mon = wtm.wMonth - 1; - tTm.tm_mday = wtm.wDay; - tTm.tm_hour = wtm.wHour; - tTm.tm_min = wtm.wMinute; - tTm.tm_sec = wtm.wSecond; - tTm.tm_isdst = -1; - - val->tv_sec = (long)mktime(&tTm); // time_t is 64-bit on win32 - val->tv_usec = wtm.wMilliseconds * 1000; - } - return 0; -} -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) - -using namespace Osp::System; - -int CC_DLL gettimeofday(struct timeval * val, struct timezone *) -{ - if (val) - { - long long curTick = 0; - SystemTime::GetTicks(curTick); - unsigned int ms = curTick; - val->tv_sec = ms / 1000; - val->tv_usec = (ms % 1000) * 1000; - } - return 0; -} - -#endif // CC_PLATFORM_WIN32 - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN diff --git a/cocos/platform/tizen/CCStdC-tizen.h b/cocos/platform/tizen/CCStdC-tizen.h deleted file mode 100644 index e553ece8c9bb..000000000000 --- a/cocos/platform/tizen/CCStdC-tizen.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CC_STD_C_H__ -#define __CC_STD_C_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#include "platform/CCPlatformMacros.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MIN -#define MIN(x,y) (((x) > (y)) ? (y) : (x)) -#endif // MIN - -#ifndef MAX -#define MAX(x,y) (((x) < (y)) ? (y) : (x)) -#endif // MAX - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -#endif // __CC_STD_C_H__ diff --git a/cocos/platform/win32/CCApplication-win32.cpp b/cocos/platform/win32/CCApplication-win32.cpp index ab5f918cc4e4..32129a7efc16 100644 --- a/cocos/platform/win32/CCApplication-win32.cpp +++ b/cocos/platform/win32/CCApplication-win32.cpp @@ -151,11 +151,6 @@ void Application::setAnimationInterval(float interval) _animationInterval.QuadPart = (LONGLONG)(interval * freq.QuadPart); } -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - ////////////////////////////////////////////////////////////////////////// // static member function ////////////////////////////////////////////////////////////////////////// @@ -165,12 +160,6 @@ Application* Application::getInstance() return sm_pSharedApplication; } -// @deprecated Use getInstance() instead -Application* Application::sharedApplication() -{ - return Application::getInstance(); -} - LanguageType Application::getCurrentLanguage() { LanguageType ret = LanguageType::ENGLISH; diff --git a/cocos/platform/win32/CCApplication-win32.h b/cocos/platform/win32/CCApplication-win32.h index 4b890b107dba..35fc0e07a4b6 100644 --- a/cocos/platform/win32/CCApplication-win32.h +++ b/cocos/platform/win32/CCApplication-win32.h @@ -61,13 +61,9 @@ class CC_DLL Application : public ApplicationProtocol @return Current application instance pointer. */ static Application* getInstance(); - - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication(); /* override functions */ virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; virtual LanguageType getCurrentLanguage(); diff --git a/cocos/platform/win32/CCFileUtils-win32.cpp b/cocos/platform/win32/CCFileUtils-win32.cpp index 42480c2c50f5..d0cc12ebae8e 100644 --- a/cocos/platform/win32/CCFileUtils-win32.cpp +++ b/cocos/platform/win32/CCFileUtils-win32.cpp @@ -36,6 +36,9 @@ THE SOFTWARE. #include #include +#include +#include + using namespace std; #define DECLARE_GUARD std::lock_guard mutexGuard(_mutex) @@ -104,7 +107,7 @@ bool FileUtilsWin32::init() { DECLARE_GUARD; _checkPath(); - _defaultResRootPath = s_resourcePath; + _defaultResRootPath = s_resourcePath + "Resources/"; return FileUtils::init(); } @@ -217,12 +220,12 @@ std::string FileUtilsWin32::getPathForFilename(const std::string& filename, cons return FileUtils::getPathForFilename(unixFileName, unixResolutionDirectory, unixSearchPath); } -std::string FileUtilsWin32::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const +std::string FileUtilsWin32::getFullPathForFilenameWithinDirectory(const std::string& strDirectory, const std::string& strFilename) const { std::string unixDirectory = convertPathFormatToUnixStyle(strDirectory); std::string unixFilename = convertPathFormatToUnixStyle(strFilename); - return FileUtils::getFullPathForDirectoryAndFilename(unixDirectory, unixFilename); + return FileUtils::getFullPathForFilenameWithinDirectory(unixDirectory, unixFilename); } void FileUtilsWin32::listFilesRecursively(const std::string& dirPath, std::vector *files) const @@ -271,9 +274,19 @@ void FileUtilsWin32::listFilesRecursively(const std::string& dirPath, std::vecto } } +long FileUtilsWin32::getFileSize(const std::string &filepath) const +{ + struct _stat tmp; + if (_stat(filepath.c_str(), &tmp) == 0) + { + return (long)tmp.st_size; + } + return 0; +} + std::vector FileUtilsWin32::listFiles(const std::string& dirPath) const { - std::string fullpath = fullPathForFilename(dirPath); + std::string fullpath = fullPathForDirectory(dirPath); std::vector files; if (isDirectoryExist(fullpath)) { diff --git a/cocos/platform/win32/CCFileUtils-win32.h b/cocos/platform/win32/CCFileUtils-win32.h index 8c11b14609ec..d1c2fccbef10 100644 --- a/cocos/platform/win32/CCFileUtils-win32.h +++ b/cocos/platform/win32/CCFileUtils-win32.h @@ -112,6 +112,8 @@ class CC_DLL FileUtilsWin32 : public FileUtils virtual FileUtils::Status getContents(const std::string& filename, ResizableBuffer* buffer) const override; + virtual long getFileSize(const std::string &filepath) const override; + /** * Gets full path for filename, resolution directory and search path. * @@ -132,7 +134,7 @@ class CC_DLL FileUtilsWin32 : public FileUtils * @param filename The name of the file. * @return The full path of the file, if the file can't be found, it will return an empty string. */ - virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const override; + virtual std::string getFullPathForFilenameWithinDirectory(const std::string& directory, const std::string& filename) const override; /** * List all files in a directory. diff --git a/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp b/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp deleted file mode 100644 index 89b709088f4f..000000000000 --- a/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "Cocos2dRenderer.h" -#include "AppDelegate.h" -#include "platform/winrt/CCGLViewImpl-winrt.h" -#include "platform/CCApplication.h" -#include "renderer/CCTextureCache.h" - -// These are used by the shader compilation methods. -#include -#include -#include - -using namespace Platform; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::Graphics::Display; -using namespace cocos2d; - -Cocos2dRenderer::Cocos2dRenderer(int width, int height, float dpi, DisplayOrientations orientation, CoreDispatcher^ dispatcher, Panel^ panel) - : m_app(nullptr) - , m_width(width) - , m_height(height) - , m_dpi(dpi) - , m_dispatcher(dispatcher) - , m_panel(panel) - , m_orientation(orientation) -{ - m_app = new AppDelegate(); -} - -Cocos2dRenderer::~Cocos2dRenderer() -{ - delete m_app; -} - -void Cocos2dRenderer::Resume() -{ - auto director = cocos2d::Director::getInstance(); - auto glview = director->getOpenGLView(); - - if (!glview) - { - GLViewImpl* glview = GLViewImpl::create("Test Cpp"); - glview->setDispatcher(m_dispatcher.Get()); - glview->setPanel(m_panel.Get()); - glview->Create(static_cast(m_width), static_cast(m_height), m_dpi, m_orientation); - director->setOpenGLView(glview); - CCApplication::getInstance()->run(); - } - else - { - Application::getInstance()->applicationWillEnterForeground(); - cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); - } -} - -void Cocos2dRenderer::Pause() -{ - if (Director::getInstance()->getOpenGLView()) { - Application::getInstance()->applicationDidEnterBackground(); - cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent); - } -} - -bool Cocos2dRenderer::AppShouldExit() -{ - return GLViewImpl::sharedOpenGLView()->AppShouldExit(); -} - -void Cocos2dRenderer::DeviceLost() -{ - Pause(); - - auto director = cocos2d::Director::getInstance(); - if (director->getOpenGLView()) { - cocos2d::GL::invalidateStateCache(); - cocos2d::GLProgramCache::getInstance()->reloadDefaultGLPrograms(); - cocos2d::DrawPrimitives::init(); - cocos2d::VolatileTextureMgr::reloadAllTextures(); - - cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED); - director->getEventDispatcher()->dispatchEvent(&recreatedEvent); - director->setGLDefaultValues(); - - Application::getInstance()->applicationWillEnterForeground(); - cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); - } -} - - - -void Cocos2dRenderer::Draw(GLsizei width, GLsizei height, float dpi, DisplayOrientations orientation) -{ - auto glView = GLViewImpl::sharedOpenGLView(); - - if (orientation != m_orientation) - { - m_orientation = orientation; - glView->UpdateOrientation(orientation); - } - - if (width != m_width || height != m_height) - { - m_width = width; - m_height = height; - glView->UpdateForWindowSizeChange(static_cast(width), static_cast(height)); - } - - if (dpi != m_dpi) - { - m_dpi = dpi; - glView->SetDPI(m_dpi); - } - - glView->ProcessEvents(); - glView->Render(); -} - -void Cocos2dRenderer::QueuePointerEvent(cocos2d::PointerEventType type, Windows::UI::Core::PointerEventArgs^ args) -{ - GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, args); -} - -void Cocos2dRenderer::QueueBackButtonEvent() -{ - GLViewImpl::sharedOpenGLView()->QueueBackKeyPress(); -} - -void Cocos2dRenderer::QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) -{ - GLViewImpl::sharedOpenGLView()->QueueWinRTKeyboardEvent(type, args); -} diff --git a/cocos/platform/win8.1-universal/Cocos2dRenderer.h b/cocos/platform/win8.1-universal/Cocos2dRenderer.h deleted file mode 100644 index 871452962453..000000000000 --- a/cocos/platform/win8.1-universal/Cocos2dRenderer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ -#pragma once - -#include - - - - -class AppDelegate; - -class Cocos2dRenderer -{ -public: - Cocos2dRenderer(int width, int height, float dpi, - Windows::Graphics::Display::DisplayOrientations orientation, - Windows::UI::Core::CoreDispatcher^ dispatcher, Windows::UI::Xaml::Controls::Panel^ panel); - ~Cocos2dRenderer(); - void Draw(GLsizei width, GLsizei height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation); - void QueuePointerEvent(cocos2d::PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); - void QueueKeyboardEvent(cocos2d::WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); - void QueueBackButtonEvent(); - void Pause(); - void Resume(); - void DeviceLost(); - bool AppShouldExit(); - -private: - - int m_width; - int m_height; - float m_dpi; - - // The AppDelegate for the Cocos2D app - AppDelegate* m_app; - Platform::Agile m_dispatcher; - Platform::Agile m_panel; - Windows::Graphics::Display::DisplayOrientations m_orientation; -}; diff --git a/cocos/platform/win8.1-universal/OpenGLES.cpp b/cocos/platform/win8.1-universal/OpenGLES.cpp deleted file mode 100644 index e1cda61ebe0d..000000000000 --- a/cocos/platform/win8.1-universal/OpenGLES.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "OpenGLES.h" -using namespace Platform; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; - -OpenGLES::OpenGLES() : - mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglConfig(nullptr) -{ - Initialize(); -} - -OpenGLES::~OpenGLES() -{ - Cleanup(); -} - -void OpenGLES::Initialize() -{ - const EGLint configAttributes[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 8, - EGL_STENCIL_SIZE, 8, - EGL_NONE - }; - - const EGLint contextAttributes[] = - { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE - }; - - const EGLint defaultDisplayAttributes[] = - { - // These are the default display attributes, used to request ANGLE's D3D11 renderer. - // eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+. - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - - // EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices. - // Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it. - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - - // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call - // the IDXGIDevice3::Trim method on behalf of the application when it gets suspended. - // Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement. - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, - EGL_NONE, - }; - - const EGLint fl9_3DisplayAttributes[] = - { - // These can be used to request ANGLE's D3D11 renderer, with D3D11 Feature Level 9_3. - // These attributes are used if the call to eglInitialize fails with the default display attributes. - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, - EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, - EGL_NONE, - }; - - const EGLint warpDisplayAttributes[] = - { - // These attributes can be used to request D3D11 WARP. - // They are used if eglInitialize fails with both the default display attributes and the 9_3 display attributes. - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, - EGL_NONE, - }; - - EGLConfig config = NULL; - - // eglGetPlatformDisplayEXT is an alternative to eglGetDisplay. It allows us to pass in display attributes, used to configure D3D11. - PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); - if (!eglGetPlatformDisplayEXT) - { - throw Exception::CreateException(E_FAIL, L"Failed to get function eglGetPlatformDisplayEXT"); - } - - // - // To initialize the display, we make three sets of calls to eglGetPlatformDisplayEXT and eglInitialize, with varying - // parameters passed to eglGetPlatformDisplayEXT: - // 1) The first calls uses "defaultDisplayAttributes" as a parameter. This corresponds to D3D11 Feature Level 10_0+. - // 2) If eglInitialize fails for step 1 (e.g. because 10_0+ isn't supported by the default GPU), then we try again - // using "fl9_3DisplayAttributes". This corresponds to D3D11 Feature Level 9_3. - // 3) If eglInitialize fails for step 2 (e.g. because 9_3+ isn't supported by the default GPU), then we try again - // using "warpDisplayAttributes". This corresponds to D3D11 Feature Level 11_0 on WARP, a D3D11 software rasterizer. - // - - // This tries to initialize EGL to D3D11 Feature Level 10_0+. See above comment for details. - mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, defaultDisplayAttributes); - if (mEglDisplay == EGL_NO_DISPLAY) - { - throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); - } - - if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) - { - // This tries to initialize EGL to D3D11 Feature Level 9_3, if 10_0+ is unavailable (e.g. on some mobile devices). - mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, fl9_3DisplayAttributes); - if (mEglDisplay == EGL_NO_DISPLAY) - { - throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); - } - - if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) - { - // This initializes EGL to D3D11 Feature Level 11_0 on WARP, if 9_3+ is unavailable on the default GPU. - mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, warpDisplayAttributes); - if (mEglDisplay == EGL_NO_DISPLAY) - { - throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); - } - - if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) - { - // If all of the calls to eglInitialize returned EGL_FALSE then an error has occurred. - throw Exception::CreateException(E_FAIL, L"Failed to initialize EGL"); - } - } - } - - EGLint numConfigs = 0; - if ((eglChooseConfig(mEglDisplay, configAttributes, &mEglConfig, 1, &numConfigs) == EGL_FALSE) || (numConfigs == 0)) - { - throw Exception::CreateException(E_FAIL, L"Failed to choose first EGLConfig"); - } - - mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttributes); - if (mEglContext == EGL_NO_CONTEXT) - { - throw Exception::CreateException(E_FAIL, L"Failed to create EGL context"); - } -} - -void OpenGLES::Cleanup() -{ - if (mEglDisplay != EGL_NO_DISPLAY && mEglContext != EGL_NO_CONTEXT) - { - eglDestroyContext(mEglDisplay, mEglContext); - mEglContext = EGL_NO_CONTEXT; - } - - if (mEglDisplay != EGL_NO_DISPLAY) - { - eglTerminate(mEglDisplay); - mEglDisplay = EGL_NO_DISPLAY; - } -} - -void OpenGLES::Reset() -{ - Cleanup(); - Initialize(); -} - -EGLSurface OpenGLES::CreateSurface(SwapChainPanel^ panel, const Size* renderSurfaceSize, const float* resolutionScale) -{ - if (!panel) - { - throw Exception::CreateException(E_INVALIDARG, L"SwapChainPanel parameter is invalid"); - } - - if (renderSurfaceSize != nullptr && resolutionScale != nullptr) - { - throw Exception::CreateException(E_INVALIDARG, L"A size and a scale can't both be specified"); - } - - EGLSurface surface = EGL_NO_SURFACE; - - const EGLint surfaceAttributes[] = - { - // EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER is part of the same optimization as EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER (see above). - // If you have compilation issues with it then please update your Visual Studio templates. - EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_NONE - }; - - // Create a PropertySet and initialize with the EGLNativeWindowType. - PropertySet^ surfaceCreationProperties = ref new PropertySet(); - surfaceCreationProperties->Insert(ref new String(EGLNativeWindowTypeProperty), panel); - - // If a render surface size is specified, add it to the surface creation properties - if (renderSurfaceSize != nullptr) - { - surfaceCreationProperties->Insert(ref new String(EGLRenderSurfaceSizeProperty), PropertyValue::CreateSize(*renderSurfaceSize)); - } - - // If a resolution scale is specified, add it to the surface creation properties - if (resolutionScale != nullptr) - { - surfaceCreationProperties->Insert(ref new String(EGLRenderResolutionScaleProperty), PropertyValue::CreateSingle(*resolutionScale)); - } - - surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, reinterpret_cast(surfaceCreationProperties), surfaceAttributes); - if (surface == EGL_NO_SURFACE) - { - throw Exception::CreateException(E_FAIL, L"Failed to create EGL surface"); - } - - return surface; -} - -void OpenGLES::GetSurfaceDimensions(const EGLSurface surface, EGLint* width, EGLint* height) -{ - eglQuerySurface(mEglDisplay, surface, EGL_WIDTH, width); - eglQuerySurface(mEglDisplay, surface, EGL_HEIGHT, height); -} - -void OpenGLES::DestroySurface(const EGLSurface surface) -{ - if (mEglDisplay != EGL_NO_DISPLAY && surface != EGL_NO_SURFACE) - { - eglDestroySurface(mEglDisplay, surface); - } -} - -void OpenGLES::MakeCurrent(const EGLSurface surface) -{ - if (eglMakeCurrent(mEglDisplay, surface, surface, mEglContext) == EGL_FALSE) - { - throw Exception::CreateException(E_FAIL, L"Failed to make EGLSurface current"); - } -} - -EGLBoolean OpenGLES::SwapBuffers(const EGLSurface surface) -{ - return (eglSwapBuffers(mEglDisplay, surface)); -} diff --git a/cocos/platform/win8.1-universal/OpenGLES.h b/cocos/platform/win8.1-universal/OpenGLES.h deleted file mode 100644 index c157ffabd06f..000000000000 --- a/cocos/platform/win8.1-universal/OpenGLES.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#pragma once - -// OpenGL ES includes -#include - -// EGL includes -#include -#include -#include -#include - -class OpenGLES -{ -public: - OpenGLES(); - ~OpenGLES(); - - EGLSurface CreateSurface(Windows::UI::Xaml::Controls::SwapChainPanel^ panel, const Windows::Foundation::Size* renderSurfaceSize, const float* renderResolutionScale); - void GetSurfaceDimensions(const EGLSurface surface, EGLint *width, EGLint *height); - void DestroySurface(const EGLSurface surface); - void MakeCurrent(const EGLSurface surface); - EGLBoolean SwapBuffers(const EGLSurface surface); - void Reset(); - void Cleanup(); - -private: - void Initialize(); - -private: - EGLDisplay mEglDisplay; - EGLContext mEglContext; - EGLConfig mEglConfig; -}; diff --git a/cocos/platform/win8.1-universal/OpenGLESPage.xaml b/cocos/platform/win8.1-universal/OpenGLESPage.xaml deleted file mode 100644 index b59232a2fa6f..000000000000 --- a/cocos/platform/win8.1-universal/OpenGLESPage.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp deleted file mode 100644 index e0d4ab2b887a..000000000000 --- a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp +++ /dev/null @@ -1,469 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#include "App.xaml.h" -#include "OpenGLESPage.xaml.h" - -using namespace CocosAppWinRT; -using namespace cocos2d; -using namespace Platform; -using namespace Concurrency; -using namespace Windows::Foundation; -using namespace Windows::Graphics::Display; -using namespace Windows::System::Threading; -using namespace Windows::UI::Core; -using namespace Windows::UI::Input; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Controls::Primitives; -using namespace Windows::UI::Xaml::Data; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Navigation; - -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 -using namespace Windows::Phone::UI::Input; -#endif - -OpenGLESPage::OpenGLESPage() : - OpenGLESPage(nullptr) -{ - -} - -OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : - mOpenGLES(openGLES), - mRenderSurface(EGL_NO_SURFACE), - mCoreInput(nullptr), - mDpi(0.0f), - mDeviceLost(false), - mCursorVisible(true), - mVisible(false), - mOrientation(DisplayOrientations::Landscape) -{ - InitializeComponent(); - - Windows::UI::Core::CoreWindow^ window = Windows::UI::Xaml::Window::Current->CoreWindow; - - window->VisibilityChanged += - ref new Windows::Foundation::TypedEventHandler(this, &OpenGLESPage::OnVisibilityChanged); - - window->KeyDown += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyPressed); - - window->KeyUp += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyReleased); - - window->CharacterReceived += ref new TypedEventHandler(this, &OpenGLESPage::OnCharacterReceived); - - - DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); - - currentDisplayInformation->OrientationChanged += - ref new TypedEventHandler(this, &OpenGLESPage::OnOrientationChanged); - - mOrientation = currentDisplayInformation->CurrentOrientation; - - this->Loaded += - ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); - -#if _MSC_VER >= 1900 - if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.UI.ViewManagement.StatusBar")) - { - Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); - } - - if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) - { - HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); - } -#else -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); - HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); -#else - // Disable all pointer visual feedback for better performance when touching. - // This is not supported on Windows Phone applications. - auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); - pointerVisualizationSettings->IsContactFeedbackEnabled = false; - pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; -#endif -#endif - - CreateInput(); -} - -void OpenGLESPage::CreateInput() -{ - // Register our SwapChainPanel to get independent input pointer events - auto workItemHandler = ref new WorkItemHandler([this](IAsyncAction ^) - { - // The CoreIndependentInputSource will raise pointer events for the specified device types on whichever thread it's created on. - mCoreInput = swapChainPanel->CreateCoreIndependentInputSource( - Windows::UI::Core::CoreInputDeviceTypes::Mouse | - Windows::UI::Core::CoreInputDeviceTypes::Touch | - Windows::UI::Core::CoreInputDeviceTypes::Pen - ); - - // Register for pointer events, which will be raised on the background thread. - mCoreInput->PointerPressed += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerPressed); - mCoreInput->PointerMoved += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerMoved); - mCoreInput->PointerReleased += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerReleased); - mCoreInput->PointerWheelChanged += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerWheelChanged); - - if (GLViewImpl::sharedOpenGLView() && !GLViewImpl::sharedOpenGLView()->isCursorVisible()) - { - mCoreInput->PointerCursor = nullptr; - } - - // Begin processing input messages as they're delivered. - mCoreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit); - }); - - // Run task on a dedicated high priority background thread. - mInputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); -} - -OpenGLESPage::~OpenGLESPage() -{ - StopRenderLoop(); - DestroyRenderSurface(); -} - -void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. - CreateRenderSurface(); - StartRenderLoop(); - mVisible = true; -} - -void OpenGLESPage::CreateRenderSurface() -{ - if (mOpenGLES && mRenderSurface == EGL_NO_SURFACE) - { - // The app can configure the SwapChainPanel which may boost performance. - // By default, this template uses the default configuration. - mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, nullptr, nullptr); - - // You can configure the SwapChainPanel to render at a lower resolution and be scaled up to - // the swapchain panel size. This scaling is often free on mobile hardware. - // - // One way to configure the SwapChainPanel is to specify precisely which resolution it should render at. - // Size customRenderSurfaceSize = Size(800, 600); - // mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, &customRenderSurfaceSize, nullptr); - // - // Another way is to tell the SwapChainPanel to render at a certain scale factor compared to its size. - // e.g. if the SwapChainPanel is 1920x1280 then setting a factor of 0.5f will make the app render at 960x640 - // float customResolutionScale = 0.5f; - // mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, nullptr, &customResolutionScale); - // - } -} - -void OpenGLESPage::DestroyRenderSurface() -{ - if (mOpenGLES) - { - mOpenGLES->DestroySurface(mRenderSurface); - } - mRenderSurface = EGL_NO_SURFACE; -} - -void OpenGLESPage::RecoverFromLostDevice() -{ - critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); - DestroyRenderSurface(); - mOpenGLES->Reset(); - CreateRenderSurface(); - std::unique_lock locker(mSleepMutex); - mDeviceLost = false; - mSleepCondition.notify_one(); -} - -void OpenGLESPage::TerminateApp() -{ - { - critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); - - if (mOpenGLES) - { - mOpenGLES->DestroySurface(mRenderSurface); - mOpenGLES->Cleanup(); - } - } - Windows::UI::Xaml::Application::Current->Exit(); -} - -void OpenGLESPage::StartRenderLoop() -{ - // If the render loop is already running then do not start another thread. - if (mRenderLoopWorker != nullptr && mRenderLoopWorker->Status == Windows::Foundation::AsyncStatus::Started) - { - return; - } - - DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); - mDpi = currentDisplayInformation->LogicalDpi; - - auto dispatcher = Windows::UI::Xaml::Window::Current->CoreWindow->Dispatcher; - - // Create a task for rendering that will be run on a background thread. - auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this, dispatcher](Windows::Foundation::IAsyncAction ^ action) - { - mOpenGLES->MakeCurrent(mRenderSurface); - - GLsizei panelWidth = 0; - GLsizei panelHeight = 0; - mOpenGLES->GetSurfaceDimensions(mRenderSurface, &panelWidth, &panelHeight); - - if (mRenderer.get() == nullptr) - { - mRenderer = std::make_shared(panelWidth, panelHeight, mDpi, mOrientation, dispatcher, swapChainPanel); - } - - mRenderer->Resume(); - - while (action->Status == Windows::Foundation::AsyncStatus::Started) - { - if (!mVisible) - { - mRenderer->Pause(); - } - - // wait until app is visible again or thread is cancelled - while (!mVisible) - { - std::unique_lock lock(mSleepMutex); - mSleepCondition.wait(lock); - - if (action->Status != Windows::Foundation::AsyncStatus::Started) - { - return; // thread was cancelled. Exit thread - } - - if (mVisible) - { - mRenderer->Resume(); - } - else // spurious wake up - { - continue; - } - } - - mOpenGLES->GetSurfaceDimensions(mRenderSurface, &panelWidth, &panelHeight); - mRenderer.get()->Draw(panelWidth, panelHeight, mDpi, mOrientation); - - // Recreate input dispatch - if (GLViewImpl::sharedOpenGLView() && mCursorVisible != GLViewImpl::sharedOpenGLView()->isCursorVisible()) - { - CreateInput(); - mCursorVisible = GLViewImpl::sharedOpenGLView()->isCursorVisible(); - } - - if (mRenderer->AppShouldExit()) - { - // run on main UI thread - swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new DispatchedHandler([=]() - { - TerminateApp(); - })); - - return; - } - - EGLBoolean result = GL_FALSE; - { - critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); - result = mOpenGLES->SwapBuffers(mRenderSurface); - } - - if (result != GL_TRUE) - { - // The call to eglSwapBuffers was not be successful (i.e. due to Device Lost) - // If the call fails, then we must reinitialize EGL and the GL resources. - mRenderer->Pause(); - mDeviceLost = true; - - // XAML objects like the SwapChainPanel must only be manipulated on the UI thread. - swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() - { - RecoverFromLostDevice(); - }, CallbackContext::Any)); - - // wait until OpenGL is reset or thread is cancelled - while (mDeviceLost) - { - std::unique_lock lock(mSleepMutex); - mSleepCondition.wait(lock); - - if (action->Status != Windows::Foundation::AsyncStatus::Started) - { - return; // thread was cancelled. Exit thread - } - - if (!mDeviceLost) - { - mOpenGLES->MakeCurrent(mRenderSurface); - // restart cocos2d-x - mRenderer->DeviceLost(); - } - else // spurious wake up - { - continue; - } - } - } - } - }); - - // Run task on a dedicated high priority background thread. - mRenderLoopWorker = Windows::System::Threading::ThreadPool::RunAsync(workItemHandler, Windows::System::Threading::WorkItemPriority::High, Windows::System::Threading::WorkItemOptions::TimeSliced); -} - -void OpenGLESPage::StopRenderLoop() -{ - if (mRenderLoopWorker) - { - mRenderLoopWorker->Cancel(); - std::unique_lock locker(mSleepMutex); - mSleepCondition.notify_one(); - mRenderLoopWorker = nullptr; - } -} - -void OpenGLESPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e) -{ - bool isMouseEvent = e->CurrentPoint->PointerDevice->PointerDeviceType == Windows::Devices::Input::PointerDeviceType::Mouse; - if (mRenderer) - { - mRenderer->QueuePointerEvent(isMouseEvent ? PointerEventType::MousePressed : PointerEventType::PointerPressed, e); - } -} - -void OpenGLESPage::OnPointerMoved(Object^ sender, PointerEventArgs^ e) -{ - bool isMouseEvent = e->CurrentPoint->PointerDevice->PointerDeviceType == Windows::Devices::Input::PointerDeviceType::Mouse; - if (mRenderer) - { - mRenderer->QueuePointerEvent(isMouseEvent ? PointerEventType::MouseMoved : PointerEventType::PointerMoved, e); - } -} - -void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ e) -{ - bool isMouseEvent = e->CurrentPoint->PointerDevice->PointerDeviceType == Windows::Devices::Input::PointerDeviceType::Mouse; - - if (mRenderer) - { - mRenderer->QueuePointerEvent(isMouseEvent ? PointerEventType::MouseReleased : PointerEventType::PointerReleased, e); - } -} - -void OpenGLESPage::OnPointerWheelChanged(Object^ sender, PointerEventArgs^ e) -{ - bool isMouseEvent = e->CurrentPoint->PointerDevice->PointerDeviceType == Windows::Devices::Input::PointerDeviceType::Mouse; - if (mRenderer && isMouseEvent) - { - mRenderer->QueuePointerEvent(PointerEventType::MouseWheelChanged, e); - } -} - -void OpenGLESPage::OnKeyPressed(CoreWindow^ sender, KeyEventArgs^ e) -{ - //log("OpenGLESPage::OnKeyPressed %d", e->VirtualKey); - if (mRenderer) - { - mRenderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyPressed, e); - } -} - -void OpenGLESPage::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ e) -{ -#if 0 - if (!e->KeyStatus.WasKeyDown) - { - log("OpenGLESPage::OnCharacterReceived %d", e->KeyCode); - } -#endif -} - -void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e) -{ - //log("OpenGLESPage::OnKeyReleased %d", e->VirtualKey); - if (mRenderer) - { - mRenderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyReleased, e); - } -} - - -void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args) -{ - mOrientation = sender->CurrentOrientation; -} - -void OpenGLESPage::SetVisibility(bool isVisible) -{ - if (isVisible && mRenderSurface != EGL_NO_SURFACE) - { - if (!mVisible) - { - std::unique_lock locker(mSleepMutex); - mVisible = true; - mSleepCondition.notify_one(); - } - } - else - { - mVisible = false; - } -} - -void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) -{ - if (args->Visible && mRenderSurface != EGL_NO_SURFACE) - { - SetVisibility(true); - } - else - { - SetVisibility(false); - } -} - -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 -/* -We set args->Handled = true to prevent the app from quitting when the back button is pressed. -This is because this back button event happens on the XAML UI thread and not the cocos2d-x UI thread. -We need to give the game developer a chance to decide to exit the app depending on where they -are in their game. They can receive the back button event by listening for the -EventKeyboard::KeyCode::KEY_ESCAPE event. - -The default behavior is to exit the app if the EventKeyboard::KeyCode::KEY_ESCAPE event -is not handled by the game. -*/ -void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args) -{ - if (mRenderer) - { - mRenderer->QueueBackButtonEvent(); - args->Handled = true; - } -} -#endif \ No newline at end of file diff --git a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h deleted file mode 100644 index 9fffbad9ca46..000000000000 --- a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -* cocos2d-x http://www.cocos2d-x.org -* -* Copyright (c) 2010-2014 - cocos2d-x community -* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -* -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and limitations under the License. -*/ - -#pragma once - -#include "OpenGLES.h" -#include "OpenGLESPage.g.h" -#include -#include -#include - -#include "Cocos2dRenderer.h" - -namespace CocosAppWinRT -{ - public ref class OpenGLESPage sealed - { - public: - OpenGLESPage(); - virtual ~OpenGLESPage(); - void SetVisibility(bool isVisible); - - internal: - OpenGLESPage(OpenGLES* openGLES); - - private: - void OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 - void OnBackButtonPressed(Platform::Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ args); -#endif - void CreateRenderSurface(); - void DestroyRenderSurface(); - void RecoverFromLostDevice(); - void TerminateApp(); - void StartRenderLoop(); - void StopRenderLoop(); - - void CreateInput(); - - OpenGLES* mOpenGLES; - std::shared_ptr mRenderer; - - EGLSurface mRenderSurface; // This surface is associated with a swapChainPanel on the page - Concurrency::critical_section mRenderSurfaceCriticalSection; - Windows::Foundation::IAsyncAction^ mRenderLoopWorker; - - // Track user input on a background worker thread. - Windows::Foundation::IAsyncAction^ mInputLoopWorker; - Windows::UI::Core::CoreIndependentInputSource^ mCoreInput; - - // Independent touch and pen handling functions. - void OnPointerPressed(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); - void OnPointerMoved(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); - void OnPointerReleased(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); - void OnPointerWheelChanged(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); - - // Independent keyboard handling functions. - void OnKeyPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - void OnKeyReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - - void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); - - void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); - - float mDpi; - bool mDeviceLost; - bool mVisible; - bool mCursorVisible; - Windows::Graphics::Display::DisplayOrientations mOrientation; - - std::mutex mSleepMutex; - std::condition_variable mSleepCondition; - }; -} diff --git a/cocos/platform/win8.1-universal/cocos2d-js/pch.h b/cocos/platform/win8.1-universal/cocos2d-js/pch.h deleted file mode 100644 index 6e3a12daa1fc..000000000000 --- a/cocos/platform/win8.1-universal/cocos2d-js/pch.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// -// pch.h -// Header for standard system include files. -// - -#pragma once - -#include "mozilla\Char16.h" -#include "cocos2d.h" -#include "cocos-ext.h" - - diff --git a/cocos/platform/win8.1-universal/pch.cpp b/cocos/platform/win8.1-universal/pch.cpp deleted file mode 100644 index b13a83b5cc02..000000000000 --- a/cocos/platform/win8.1-universal/pch.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "pch.h" diff --git a/cocos/platform/win8.1-universal/pch.h b/cocos/platform/win8.1-universal/pch.h deleted file mode 100644 index 1c4d7fa940d2..000000000000 --- a/cocos/platform/win8.1-universal/pch.h +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// -// pch.h -// Header for standard system include files. -// - -#pragma once - -#include -#include - -#include "cocos2d.h" -#include "cocos-ext.h" - - diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp deleted file mode 100644 index 18a1dcd36048..000000000000 --- a/cocos/platform/winrt/CCApplication.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCGLViewImpl-winrt.h" -using namespace Windows::UI::Core; -using namespace Windows::Foundation; - -#else -#include "platform/wp8/CCGLViewImpl-wp8.h" -#endif -#include "base/CCDirector.h" -#include -#include "platform/CCFileUtils.h" -#include "platform/winrt/CCWinRTUtils.h" -#include "platform/CCApplication.h" -#include "tinyxml2/tinyxml2.h" - -/** -@brief This function change the PVRFrame show/hide setting in register. -@param bEnable If true show the PVRFrame window, otherwise hide. -*/ - -NS_CC_BEGIN - -// sharedApplication pointer -Application * Application::sm_pSharedApplication = nullptr; - - - - - -//////////////////////////////////////////////////////////////////////////////// -// implement Application -//////////////////////////////////////////////////////////////////////////////// - -// sharedApplication pointer -Application * s_pSharedApplication = nullptr; - -Application::Application() : -m_openURLDelegate(nullptr) -{ - m_nAnimationInterval.QuadPart = 0; - CC_ASSERT(! sm_pSharedApplication); - sm_pSharedApplication = this; -} - -Application::~Application() -{ - CC_ASSERT(this == sm_pSharedApplication); - sm_pSharedApplication = nullptr; -} - -int Application::run() -{ - // Initialize instance and cocos2d. - if (!applicationDidFinishLaunching()) - { - return 0; - } - - GLViewImpl::sharedOpenGLView()->Run(); - return 0; -} - -void Application::setAnimationInterval(float interval) -{ - LARGE_INTEGER nFreq; - QueryPerformanceFrequency(&nFreq); - m_nAnimationInterval.QuadPart = (LONGLONG)(interval * nFreq.QuadPart); -} - -void Application::setAnimationInterval(float interval, SetIntervalReason reason) -{ - setAnimationInterval(interval); -} - -////////////////////////////////////////////////////////////////////////// -// static member function -////////////////////////////////////////////////////////////////////////// -Application* Application::getInstance() -{ - CC_ASSERT(sm_pSharedApplication); - return sm_pSharedApplication; -} - -const char * Application::getCurrentLanguageCode() -{ - static std::string code = "en"; - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - auto languages = Windows::System::UserProfile::GlobalizationPreferences::Languages; - code = PlatformStringToString(languages->GetAt(0)); -#else - ULONG numLanguages = 0; - DWORD cchLanguagesBuffer = 0; - BOOL result = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numLanguages, NULL, &cchLanguagesBuffer); - - if (result) { - WCHAR* pwszLanguagesBuffer = new WCHAR[cchLanguagesBuffer]; - result = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numLanguages, pwszLanguagesBuffer, &cchLanguagesBuffer); - if (result) { - - code = StringWideCharToUtf8(pwszLanguagesBuffer); - } - - if (pwszLanguagesBuffer) - { - delete [] pwszLanguagesBuffer; - } - } - - -#endif - return code.c_str(); -} - - -LanguageType Application::getCurrentLanguage() -{ - const char* code = getCurrentLanguageCode(); - - return utils::getLanguageTypeByISO2(code); -} - -Application::Platform Application::getTargetPlatform() -{ - if (isWindowsPhone()) - { - return Platform::OS_WP8; - } - else - { - return Platform::OS_WINRT; - } -} - -std::string Application::getVersion() -{ - std::string r(""); - std::string s = FileUtils::getInstance()->getStringFromFile("WMAppManifest.xml"); - if (!s.empty()) { - tinyxml2::XMLDocument doc; - if (!doc.Parse(s.c_str())) { - tinyxml2::XMLElement *app = doc.RootElement()->FirstChildElement("App"); - if (app) { - const char* version = app->Attribute("Version"); - if (version) { - r = version; - } - } - } - } - return r; -} - -bool Application::openURL(const std::string &url) -{ -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - auto dispatcher = cocos2d::GLViewImpl::sharedOpenGLView()->getDispatcher(); - dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([url]() { - auto uri = ref new Windows::Foundation::Uri(PlatformStringFromString(url)); - concurrency::task launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri)); - })); - return true; -#else - if (m_openURLDelegate) - { - m_openURLDelegate(PlatformStringFromString(url)); - return true; - } - else - { - return false; - } -#endif -} - -void Application::setResourceRootPath(const std::string& rootResDir) -{ - m_resourceRootPath = rootResDir; - std::replace(m_resourceRootPath.begin(), m_resourceRootPath.end(), '\\', '/'); - if (m_resourceRootPath[m_resourceRootPath.length() - 1] != '/') - { - m_resourceRootPath += '/'; - } - FileUtils* pFileUtils = FileUtils::getInstance(); - std::vector searchPaths = pFileUtils->getSearchPaths(); - searchPaths.insert(searchPaths.begin(), m_resourceRootPath); - pFileUtils->setSearchPaths(searchPaths); -} - -const std::string& Application::getResourceRootPath(void) -{ - return m_resourceRootPath; -} - -void Application::setStartupScriptFilename(const std::string& startupScriptFile) -{ - m_startupScriptFilename = startupScriptFile; - std::replace(m_startupScriptFilename.begin(), m_startupScriptFilename.end(), '\\', '/'); -} - -NS_CC_END - - diff --git a/cocos/platform/winrt/CCApplication.h b/cocos/platform/winrt/CCApplication.h deleted file mode 100644 index 182246061771..000000000000 --- a/cocos/platform/winrt/CCApplication.h +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_APPLICATION_WINRT_H__ -#define __CC_APPLICATION_WINRT_H__ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "platform/CCStdC.h" -#include "platform/CCCommon.h" -#include "platform/CCApplicationProtocol.h" -#include "platform/winrt/InputEvent.h" -#include - -NS_CC_BEGIN - - -class CC_DLL Application : public ApplicationProtocol -{ -public: - Application(); - virtual ~Application(); - - /** - @brief Run the message loop. - */ - int run(); - - /** - @brief Get current application instance. - @return Current application instance pointer. - */ - static Application* getInstance(); - - /* override functions */ - virtual void setAnimationInterval(float interval) override; - virtual void setAnimationInterval(float interval, SetIntervalReason reason) override; - - virtual LanguageType getCurrentLanguage() override; - virtual const char * getCurrentLanguageCode() override; - - /** - @brief Get target platform - */ - virtual Platform getTargetPlatform() override; - - /** - @brief Get application version - */ - virtual std::string getVersion() override; - - /** - @brief Open url in default browser - @param String with url to open. - @return true if the resource located by the URL was successfully opened; otherwise false. - */ - virtual bool openURL(const std::string &url); - - /** - @brief Set the callback responsible for opening a URL. - @param del The delegate that will handle opening a URL. We can't pass back a Platform::String due to name clash. - */ - void SetXamlOpenURLDelegate(const std::function& del) - { - m_openURLDelegate = del; - } - - /** - * Sets the Resource root path. - * @deprecated Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE void setResourceRootPath(const std::string& rootResDir); - - /** - * Gets the Resource root path. - * @deprecated Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead. - */ - CC_DEPRECATED_ATTRIBUTE const std::string& getResourceRootPath(void); - - void setStartupScriptFilename(const std::string& startupScriptFile); - - const std::string& getStartupScriptFilename(void) - { - return m_startupScriptFilename; - } - -protected: - LARGE_INTEGER m_nAnimationInterval; - std::string m_resourceRootPath; - std::string m_startupScriptFilename; - - std::function m_openURLDelegate; - - static Application * sm_pSharedApplication; -}; - -NS_CC_END - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#endif // __CC_APPLICATION_WINRT_H__ diff --git a/cocos/platform/winrt/CCCommon.cpp b/cocos/platform/winrt/CCCommon.cpp deleted file mode 100644 index 890cc8ef73b7..000000000000 --- a/cocos/platform/winrt/CCCommon.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/CCCommon.h" -#include "platform/CCStdC.h" -#include "platform/winrt/CCGLViewImpl-winrt.h" -#include "platform/winrt/CCWinRTUtils.h" - -#if defined(VLD_DEBUG_MEMORY) -#include -#endif - -NS_CC_BEGIN - - -void MessageBox(const char * pszMsg, const char * pszTitle) -{ - // Create the message dialog and set its content - Platform::String^ message = PlatformStringFromString(pszMsg); - Platform::String^ title = PlatformStringFromString(pszTitle); - GLViewImpl::sharedOpenGLView()->ShowMessageBox(title, message); -} - - -void CCLuaLog(const char *pszMsg) -{ -#if defined(COCOS2D_DEBUG) - int bufflen = MultiByteToWideChar(CP_UTF8, 0, pszMsg, -1, NULL, 0); - WCHAR* widebuff = new WCHAR[bufflen + 1]; - memset(widebuff, 0, sizeof(WCHAR) * (bufflen + 1)); - MultiByteToWideChar(CP_UTF8, 0, pszMsg, -1, widebuff, bufflen); - - - OutputDebugStringW(widebuff); - OutputDebugStringA("\n"); - - bufflen = WideCharToMultiByte(CP_ACP, 0, widebuff, -1, NULL, 0, NULL, NULL); - char* buff = new char[bufflen + 1]; - memset(buff, 0, sizeof(char) * (bufflen + 1)); - WideCharToMultiByte(CP_ACP, 0, widebuff, -1, buff, bufflen, NULL, NULL); - puts(buff); - - delete[] widebuff; - delete[] buff; -#endif -} - -NS_CC_END diff --git a/cocos/platform/winrt/CCDevice.cpp b/cocos/platform/winrt/CCDevice.cpp deleted file mode 100644 index 6ca544b8883d..000000000000 --- a/cocos/platform/winrt/CCDevice.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "platform/CCDevice.h" -#include "platform/CCFileUtils.h" -#include "platform/winrt/CCFreeTypeFont.h" -#include "platform/winrt/CCWinRTUtils.h" -#include "platform/CCStdC.h" -#include "platform/winrt/CCGLViewImpl-winrt.h" - -using namespace Windows::Graphics::Display; -using namespace Windows::Devices::Sensors; -using namespace Windows::Foundation; -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -using namespace Windows::Phone::Devices::Notification; -#endif // (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - -NS_CC_BEGIN - -CCFreeTypeFont sFT; - -int Device::getDPI() -{ - return cocos2d::GLViewImpl::sharedOpenGLView()->GetDPI(); -} - -static Accelerometer^ sAccelerometer = nullptr; - - -void Device::setAccelerometerEnabled(bool isEnabled) -{ - static Windows::Foundation::EventRegistrationToken sToken; - static bool sEnabled = false; - - // we always need to reset the accelerometer - if (sAccelerometer) - { - sAccelerometer->ReadingChanged -= sToken; - sAccelerometer = nullptr; - sEnabled = false; - } - - if (isEnabled) - { - sAccelerometer = Accelerometer::GetDefault(); - - if(sAccelerometer == nullptr) - { - // It's not a friendly experience and may cause crash. - //MessageBox("This device does not have an accelerometer.","Alert"); - log("This device does not have an accelerometer."); - return; - } - - setAccelerometerInterval(0.0f); - sEnabled = true; - - sToken = sAccelerometer->ReadingChanged += ref new TypedEventHandler - - ([](Accelerometer^ a, AccelerometerReadingChangedEventArgs^ e) - { - if (!sEnabled) - { - return; - } - - AccelerometerReading^ reading = e->Reading; - cocos2d::Acceleration acc; - acc.x = reading->AccelerationX; - acc.y = reading->AccelerationY; - acc.z = reading->AccelerationZ; - acc.timestamp = 0; - - auto orientation = GLViewImpl::sharedOpenGLView()->getDeviceOrientation(); - - if (isWindowsPhone()) - { - switch (orientation) - { - case DisplayOrientations::Portrait: - acc.x = reading->AccelerationX; - acc.y = reading->AccelerationY; - break; - - case DisplayOrientations::Landscape: - acc.x = -reading->AccelerationY; - acc.y = reading->AccelerationX; - break; - - case DisplayOrientations::PortraitFlipped: - acc.x = -reading->AccelerationX; - acc.y = reading->AccelerationY; - break; - - case DisplayOrientations::LandscapeFlipped: - acc.x = reading->AccelerationY; - acc.y = -reading->AccelerationX; - break; - - default: - acc.x = reading->AccelerationX; - acc.y = reading->AccelerationY; - break; - } - } - else // Windows Store App - { - // from http://msdn.microsoft.com/en-us/library/windows/apps/dn440593 - switch (orientation) - { - case DisplayOrientations::Portrait: - acc.x = reading->AccelerationY; - acc.y = -reading->AccelerationX; - break; - - case DisplayOrientations::Landscape: - acc.x = reading->AccelerationX; - acc.y = reading->AccelerationY; - break; - - case DisplayOrientations::PortraitFlipped: - acc.x = -reading->AccelerationY; - acc.y = reading->AccelerationX; - break; - - case DisplayOrientations::LandscapeFlipped: - acc.x = -reading->AccelerationX; - acc.y = -reading->AccelerationY; - break; - - default: - acc.x = reading->AccelerationY; - acc.y = -reading->AccelerationX; - break; - } - } - - std::shared_ptr event(new AccelerometerEvent(acc)); - cocos2d::GLViewImpl::sharedOpenGLView()->QueueEvent(event); - }); - } -} - -void Device::setAccelerometerInterval(float interval) -{ - if (sAccelerometer) - { - try { - int minInterval = sAccelerometer->MinimumReportInterval; - int reqInterval = (int) interval; - sAccelerometer->ReportInterval = reqInterval < minInterval ? minInterval : reqInterval; - } - catch (Platform::COMException^) - { - CCLOG("Device::setAccelerometerInterval not supported on this device"); - } - } - else - { - CCLOG("Device::setAccelerometerInterval: accelerometer not enabled."); - } -} - - - -Data Device::getTextureDataForText(const char * text, const FontDefinition& textDefinition, TextAlign align, int &width, int &height, bool& hasPremultipliedAlpha) -{ - Data ret; - ssize_t dataLen; - - unsigned char* data = sFT.initWithString(text, textDefinition, align, width, height, dataLen); - - if (data) - { - ret.fastSet(data, dataLen); - hasPremultipliedAlpha = false; - } - - return ret; -} - -void Device::setKeepScreenOn(bool /*value*/) -{ -} - -void Device::vibrate(float duration) -{ -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - Windows::Foundation::TimeSpan timespan; - // A time period expressed in 100-nanosecond units, see https://msdn.microsoft.com/en-us/library/windows/apps/windows.foundation.timespan.aspx - // The duration is limited to a maximum of 5 seconds, see https://msdn.microsoft.com/en-us/library/windows/apps/windows.phone.devices.notification.vibrationdevice.aspx - timespan.Duration = std::min(static_cast(duration * 10000), 50000); - - VibrationDevice^ testVibrationDevice = VibrationDevice::GetDefault(); - testVibrationDevice->Vibrate(timespan); -#endif // (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -} - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/CCFileUtilsWinRT.cpp b/cocos/platform/winrt/CCFileUtilsWinRT.cpp deleted file mode 100644 index afacc7fe4d68..000000000000 --- a/cocos/platform/winrt/CCFileUtilsWinRT.cpp +++ /dev/null @@ -1,472 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/winrt/CCFileUtilsWinRT.h" -#include -#include "platform/winrt/CCWinRTUtils.h" -#include "platform/CCCommon.h" -#include "tinydir/tinydir.h" -using namespace std; - -NS_CC_BEGIN - -static std::string s_pszResourcePath; - -// D:\aaa\bbb\ccc\ddd\abc.txt --> D:/aaa/bbb/ccc/ddd/abc.txt -static inline std::string convertPathFormatToUnixStyle(const std::string& path) -{ - std::string ret = path; - size_t len = ret.length(); - for (size_t i = 0; i < len; ++i) - { - if (ret[i] == '\\') - { - ret[i] = '/'; - } - } - return ret; -} - -static std::string UTF8StringToMultiByte(const std::string& strUtf8) -{ - std::string ret; - if (!strUtf8.empty()) - { - std::wstring strWideChar = StringUtf8ToWideChar(strUtf8); - int nNum = WideCharToMultiByte(CP_ACP, 0, strWideChar.c_str(), -1, nullptr, 0, nullptr, FALSE); - if (nNum) - { - char* ansiString = new char[nNum + 1]; - ansiString[0] = 0; - - nNum = WideCharToMultiByte(CP_ACP, 0, strWideChar.c_str(), -1, ansiString, nNum + 1, nullptr, FALSE); - - ret = ansiString; - delete[] ansiString; - } - else - { - CCLOG("Wrong convert to Ansi code:0x%x", GetLastError()); - } - } - - return ret; -} - -static void _checkPath() -{ - if (s_pszResourcePath.empty()) - { - // TODO: needs to be tested - s_pszResourcePath = convertPathFormatToUnixStyle(CCFileUtilsWinRT::getAppPath() + '\\' + "Assets\\Resources" + '\\'); - } -} - -FileUtils* FileUtils::getInstance() -{ - if (s_sharedFileUtils == nullptr) - { - s_sharedFileUtils = new CCFileUtilsWinRT(); - if(!s_sharedFileUtils->init()) - { - delete s_sharedFileUtils; - s_sharedFileUtils = nullptr; - CCLOG("ERROR: Could not init CCFileUtilsWinRT"); - } - } - return s_sharedFileUtils; -} - -CCFileUtilsWinRT::CCFileUtilsWinRT() -{ -} - -bool CCFileUtilsWinRT::init() -{ - _checkPath(); - _defaultResRootPath = s_pszResourcePath; - return FileUtils::init(); -} - -std::string CCFileUtilsWinRT::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const -{ - std::string unixFileName = convertPathFormatToUnixStyle(filename); - std::string unixResolutionDirectory = convertPathFormatToUnixStyle(resolutionDirectory); - std::string unixSearchPath = convertPathFormatToUnixStyle(searchPath); - - return FileUtils::getPathForFilename(unixFileName, unixResolutionDirectory, unixSearchPath); -} - -std::string CCFileUtilsWinRT::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const -{ - std::string unixDirectory = convertPathFormatToUnixStyle(strDirectory); - std::string unixFilename = convertPathFormatToUnixStyle(strFilename); - return FileUtils::getFullPathForDirectoryAndFilename(unixDirectory, unixFilename); -} - -std::string CCFileUtilsWinRT::getSuitableFOpen(const std::string& filenameUtf8) const -{ - return UTF8StringToMultiByte(filenameUtf8); -} - -long CCFileUtilsWinRT::getFileSize(const std::string &filepath) -{ - WIN32_FILE_ATTRIBUTE_DATA fad; - if (!GetFileAttributesEx(StringUtf8ToWideChar(filepath).c_str(), GetFileExInfoStandard, &fad)) - { - return 0; // error condition, could call GetLastError to find out more - } - LARGE_INTEGER size; - size.HighPart = fad.nFileSizeHigh; - size.LowPart = fad.nFileSizeLow; - return (long)size.QuadPart; -} - -FileUtils::Status CCFileUtilsWinRT::getContents(const std::string& filename, ResizableBuffer* buffer) -{ - if (filename.empty()) - return FileUtils::Status::NotExists; - - // read the file from hardware - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filename); - - HANDLE fileHandle = ::CreateFile2(StringUtf8ToWideChar(fullPath).c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING, nullptr); - if (fileHandle == INVALID_HANDLE_VALUE) - return FileUtils::Status::OpenFailed; - - FILE_STANDARD_INFO info = {0}; - if (::GetFileInformationByHandleEx(fileHandle, FileStandardInfo, &info, sizeof(info)) == 0) - { - ::CloseHandle(fileHandle); - return FileUtils::Status::OpenFailed; - } - - if (info.EndOfFile.HighPart > 0) - { - ::CloseHandle(fileHandle); - return FileUtils::Status::TooLarge; - } - - buffer->resize(info.EndOfFile.LowPart); - DWORD sizeRead = 0; - BOOL successed = ::ReadFile(fileHandle, buffer->buffer(), info.EndOfFile.LowPart, &sizeRead, nullptr); - ::CloseHandle(fileHandle); - - if (!successed) - { - buffer->resize(sizeRead); - CCLOG("Get data from file(%s) failed, error code is %s", filename.data(), std::to_string(::GetLastError()).data()); - return FileUtils::Status::ReadFailed; - } - return FileUtils::Status::OK; -} - -bool CCFileUtilsWinRT::isFileExistInternal(const std::string& strFilePath) const -{ - bool ret = false; - FILE * pf = nullptr; - - std::string strPath = strFilePath; - if (!isAbsolutePath(strPath)) - { // Not absolute path, add the default root path at the beginning. - strPath.insert(0, _defaultResRootPath); - } - - strPath = getSuitableFOpen(strPath); - - if (!strPath.empty() && (pf = fopen(strPath.c_str(), "rb"))) - { - ret = true; - fclose(pf); - } - return ret; -} - -bool CCFileUtilsWinRT::isDirectoryExistInternal(const std::string& dirPath) const -{ - WIN32_FILE_ATTRIBUTE_DATA wfad; - std::wstring wdirPath = StringUtf8ToWideChar(dirPath); - if (GetFileAttributesEx(wdirPath.c_str(), GetFileExInfoStandard, &wfad)) - { - return true; - } - return false; -} - -bool CCFileUtilsWinRT::createDirectory(const std::string& path) -{ - CCASSERT(!path.empty(), "Invalid path"); - - if (isDirectoryExist(path)) - return true; - - // Split the path - size_t start = 0; - size_t found = path.find_first_of("/\\", start); - std::string subpath; - std::vector dirs; - - if (found != std::string::npos) - { - while (true) - { - subpath = path.substr(start, found - start + 1); - if (!subpath.empty()) - dirs.push_back(subpath); - start = found + 1; - found = path.find_first_of("/\\", start); - if (found == std::string::npos) - { - if (start < path.length()) - { - dirs.push_back(path.substr(start)); - } - break; - } - } - } - - WIN32_FILE_ATTRIBUTE_DATA wfad; - - if (!(GetFileAttributesEx(StringUtf8ToWideChar(path).c_str(), GetFileExInfoStandard, &wfad))) - { - subpath = ""; - for (unsigned int i = 0, size = dirs.size(); i < size; ++i) - { - subpath += dirs[i]; - if (i > 0 && !isDirectoryExist(subpath)) - { - BOOL ret = CreateDirectory(StringUtf8ToWideChar(subpath).c_str(), NULL); - if (!ret && ERROR_ALREADY_EXISTS != GetLastError()) - { - return false; - } - } - } - } - return true; -} - -bool CCFileUtilsWinRT::removeDirectory(const std::string& path) -{ - std::wstring wpath = StringUtf8ToWideChar(path); - std::wstring files = wpath + L"*.*"; - WIN32_FIND_DATA wfd; - HANDLE search = FindFirstFileEx(files.c_str(), FindExInfoStandard, &wfd, FindExSearchNameMatch, NULL, 0); - bool ret = true; - if (search != INVALID_HANDLE_VALUE) - { - BOOL find = true; - while (find) - { - //. .. - if (wfd.cFileName[0] != '.') - { - std::wstring temp = wpath + wfd.cFileName; - if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - temp += '/'; - ret = ret && this->removeDirectory(StringWideCharToUtf8(temp)); - } - else - { - SetFileAttributes(temp.c_str(), FILE_ATTRIBUTE_NORMAL); - ret = ret && DeleteFile(temp.c_str()); - } - } - find = FindNextFile(search, &wfd); - } - FindClose(search); - } - if (ret && RemoveDirectory(wpath.c_str())) - { - return true; - } - return false; -} - -bool CCFileUtilsWinRT::isAbsolutePath(const std::string& strPath) const -{ - if ( strPath.length() > 2 - && ( (strPath[0] >= 'a' && strPath[0] <= 'z') || (strPath[0] >= 'A' && strPath[0] <= 'Z') ) - && strPath[1] == ':') - { - return true; - } - return false; -} - -bool CCFileUtilsWinRT::removeFile(const std::string &path) -{ - std::wstring wpath = StringUtf8ToWideChar(path); - if (DeleteFile(wpath.c_str())) - { - return true; - } - else - { - CCLOG("Remove file failed with error: %d", GetLastError()); - return false; - } -} - -bool CCFileUtilsWinRT::renameFile(const std::string &oldfullpath, const std::string& newfullpath) -{ - CCASSERT(!oldfullpath.empty(), "Invalid path"); - CCASSERT(!newfullpath.empty(), "Invalid path"); - - std::regex pat("\\/"); - std::string _oldfullpath = std::regex_replace(oldfullpath, pat, "\\"); - std::string _newfullpath = std::regex_replace(newfullpath, pat, "\\"); - - std::wstring _wNewfullpath = StringUtf8ToWideChar(_newfullpath); - - if (FileUtils::getInstance()->isFileExist(_newfullpath)) - { - if (!DeleteFile(_wNewfullpath.c_str())) - { - CCLOGERROR("Fail to delete file %s !Error code is 0x%x", newfullpath.c_str(), GetLastError()); - } - } - - if (MoveFileEx(StringUtf8ToWideChar(_oldfullpath).c_str(), _wNewfullpath.c_str(), - MOVEFILE_REPLACE_EXISTING & MOVEFILE_WRITE_THROUGH)) - { - return true; - } - else - { - CCLOGERROR("Fail to rename file %s to %s !Error code is 0x%x", oldfullpath.c_str(), newfullpath.c_str(), GetLastError()); - return false; - } -} - -bool CCFileUtilsWinRT::renameFile(const std::string &path, const std::string &oldname, const std::string &name) -{ - CCASSERT(!path.empty(), "Invalid path"); - std::string oldPath = path + oldname; - std::string newPath = path + name; - - return renameFile(oldPath, newPath); -} - -string CCFileUtilsWinRT::getWritablePath() const -{ - auto localFolderPath = Windows::Storage::ApplicationData::Current->LocalFolder->Path; - return convertPathFormatToUnixStyle(std::string(PlatformStringToString(localFolderPath)) + '\\'); -} - -void CCFileUtilsWinRT::listFilesRecursively(const std::string& dirPath, std::vector *files) const -{ - std::string fullpath = fullPathForFilename(dirPath); - if (isDirectoryExist(fullpath)) - { - tinydir_dir dir; - std::wstring fullpathstr = StringUtf8ToWideChar(fullpath); - - if (tinydir_open(&dir, &fullpathstr[0]) != -1) - { - while (dir.has_next) - { - tinydir_file file; - if (tinydir_readfile(&dir, &file) == -1) - { - // Error getting file - break; - } - std::string fileName = StringWideCharToUtf8(file.name); - - if (fileName != "." && fileName != "..") - { - std::string filepath = StringWideCharToUtf8(file.path); - if (file.is_dir) - { - filepath.append("/"); - files->push_back(filepath); - listFilesRecursively(filepath, files); - } - else - { - files->push_back(filepath); - } - } - - if (tinydir_next(&dir) == -1) - { - // Error getting next file - break; - } - } - } - tinydir_close(&dir); - } -} - -std::vector CCFileUtilsWinRT::listFiles(const std::string& dirPath) const -{ - std::string fullpath = fullPathForFilename(dirPath); - std::vector files; - if (isDirectoryExist(fullpath)) - { - tinydir_dir dir; - std::wstring fullpathstr = StringUtf8ToWideChar(fullpath); - - if (tinydir_open(&dir, &fullpathstr[0]) != -1) - { - while (dir.has_next) - { - tinydir_file file; - if (tinydir_readfile(&dir, &file) == -1) - { - // Error getting file - break; - } - - std::string filepath = StringWideCharToUtf8(file.path); - if (file.is_dir) - { - filepath.append("/"); - } - files.push_back(filepath); - - if (tinydir_next(&dir) == -1) - { - // Error getting next file - break; - } - } - } - tinydir_close(&dir); - } - return files; -} - -string CCFileUtilsWinRT::getAppPath() -{ - Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current; - return convertPathFormatToUnixStyle(std::string(PlatformStringToString(package->InstalledLocation->Path))); -} - -NS_CC_END diff --git a/cocos/platform/winrt/CCFileUtilsWinRT.h b/cocos/platform/winrt/CCFileUtilsWinRT.h deleted file mode 100644 index ff2c35c7f6e8..000000000000 --- a/cocos/platform/winrt/CCFileUtilsWinRT.h +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - Copyright (c) Microsoft Open Technologies, Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#ifndef __CC_FILEUTILS_WINRT_H__ -#define __CC_FILEUTILS_WINRT_H__ - -#include -#include - -#include "platform/CCFileUtils.h" -#include "platform/CCPlatformMacros.h" -#include "base/ccTypes.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -//! @brief Helper class to handle file operations -class CC_DLL CCFileUtilsWinRT : public FileUtils -{ - friend class FileUtils; -protected: - CCFileUtilsWinRT(); -public: - /* override functions */ - bool init(); - virtual std::string getWritablePath() const; - virtual bool isAbsolutePath(const std::string& strPath) const; - virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const override; - virtual std::string getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const override; - virtual std::string getSuitableFOpen(const std::string& filenameUtf8) const override; - virtual long getFileSize(const std::string &filepath) override; - virtual FileUtils::Status getContents(const std::string& filename, ResizableBuffer* buffer) override; - static std::string getAppPath(); - - /** - * List all files in a directory. - * - * @param dirPath The path of the directory, it could be a relative or an absolute path. - * @return File paths in a string vector - */ - virtual std::vector listFiles(const std::string& dirPath) const; - - /** - * List all files recursively in a directory. - * - * @param dirPath The path of the directory, it could be a relative or an absolute path. - * @return File paths in a string vector - */ - virtual void listFilesRecursively(const std::string& dirPath, std::vector *files) const; - -private: - virtual bool isFileExistInternal(const std::string& strFilePath) const override; - - /** - * Renames a file under the given directory. - * - * @param path The parent directory path of the file, it must be an absolute path. - * @param oldname The current name of the file. - * @param name The new name of the file. - * @return True if the file have been renamed successfully, false if not. - */ - virtual bool renameFile(const std::string &path, const std::string &oldname, const std::string &name) override; - - - /** - * Renames a file. - * - * @param oldfullpath The current name of the file, including path and name. - * @param newfullpath The new name of the file, including path and name - * @return True if the file have been renamed successfully, false if not. - */ - virtual bool renameFile(const std::string &oldfullpath, const std::string& newfullpath) override; - - /** - * Checks whether a directory exists without considering search paths and resolution orders. - * @param dirPath The directory (with absolute path) to look up for - * @return Returns true if the directory found at the given absolute path, otherwise returns false - */ - virtual bool isDirectoryExistInternal(const std::string& dirPath) const override; - - /** - * Removes a file. - * - * @param filepath The full path of the file, it must be an absolute path. - * @return True if the file have been removed successfully, false if not. - */ - virtual bool removeFile(const std::string &filepath) override; - - /** - * Creates a directory. - * - * @param dirPath The path of the directory, it must be an absolute path. - * @return True if the directory have been created successfully, false if not. - */ - virtual bool createDirectory(const std::string& dirPath) override; - - /** - * Removes a directory. - * - * @param dirPath The full path of the directory, it must be an absolute path. - * @return True if the directory have been removed successfully, false if not. - */ - virtual bool removeDirectory(const std::string& dirPath) override; -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_FILEUTILS_WINRT_H__ - diff --git a/cocos/platform/winrt/CCFreeTypeFont.cpp b/cocos/platform/winrt/CCFreeTypeFont.cpp deleted file mode 100644 index 9cfbf6bc2969..000000000000 --- a/cocos/platform/winrt/CCFreeTypeFont.cpp +++ /dev/null @@ -1,754 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org http://cocos2d-x.org - Copyright (c) Microsoft Open Technologies, Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "platform/winrt/CCFreeTypeFont.h" -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" - -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -NS_CC_BEGIN - -static map s_fontsNames; -static FT_Library s_FreeTypeLibrary = nullptr; - -const std::string CCFreeTypeFont::DEFAULT_FONT = "arial"; - -CCFreeTypeFont::CCFreeTypeFont() - :m_space(" ") - , m_face(nullptr) -{ - -} - -CCFreeTypeFont::~CCFreeTypeFont() -{ - reset(); -} - -void CCFreeTypeFont::reset() -{ - for(auto& line : m_lines) - { - line->glyphs.clear(); - delete line; - } - - m_lines.clear(); - - if(m_face) - { - FT_Done_Face(m_face); - m_face = nullptr; - } -} - -unsigned char* CCFreeTypeFont::initWithString(const char * text, const FontDefinition& textDefinition, Device::TextAlign align, int &width, int &height, ssize_t& dataLength) -{ - FT_Error error = 0; - ssize_t size = 0; - unsigned char* pBuffer = nullptr; - unsigned char* data = nullptr; - - Size winSize = Director::getInstance()->getWinSizeInPixels(); - m_windowWidth = (int)winSize.width; - - m_inWidth = textDefinition._dimensions.width; - m_inHeight = textDefinition._dimensions.height; - - m_fontFillColorR = textDefinition._fontFillColor.r; - m_fontFillColorG = textDefinition._fontFillColor.g; - m_fontFillColorB = textDefinition._fontFillColor.b; - m_fontFillColorA = textDefinition._fontAlpha; - -#if 0 - // check the cache for the font file buffer - auto ittFontNames = s_fontsNames.find(textDefinition._fontName); - if(ittFontNames != s_fontsNames.end()) - { - pBuffer = ittFontNames->second.pBuffer; - size = ittFontNames->second.size; - } -#endif // 0 - - - if(!pBuffer) - { - // attempt to load font from Resources fonts folder - pBuffer = loadFont(textDefinition._fontName.c_str(), &size); - if(!pBuffer) - { - // attempt to load font from System fonts folder - pBuffer = loadSystemFont(textDefinition._fontName.c_str(), &size); - } - if(!pBuffer) - { - // attempt to load default font from Resources fonts folder - pBuffer = loadFont(DEFAULT_FONT.c_str(), &size); - } - if(!pBuffer) - { - // attempt to load default font from System fonts folder - pBuffer = loadSystemFont(DEFAULT_FONT.c_str(), &size); - } - - if(!pBuffer) // font not found! - { - return false; - } - -#if 0 - // cache the font file buffer - FontBufferInfo info; - info.pBuffer = pBuffer; - info.size = size; - s_fontsNames[textDefinition._fontName]=info; -#endif // 0 - - } - - m_fontName = textDefinition._fontName; - m_text = text; - - if(!s_FreeTypeLibrary) - { - error = FT_Init_FreeType(&s_FreeTypeLibrary); - } - - if(!error && !m_face) - { - error = FT_New_Memory_Face(s_FreeTypeLibrary, pBuffer, size, 0, &m_face); - } - - if(!error) - { - error = FT_Select_Charmap(m_face, FT_ENCODING_UNICODE); - } - - - if(!error) - { - error = FT_Set_Char_Size(m_face, textDefinition._fontSize << 6, textDefinition._fontSize << 6, 72, 72); - } - - if(!error) - { - error = initGlyphs(text); - } - - if (!error) - { - data = getBitmap(align, width, height, dataLength); - } - - delete [] pBuffer; - - reset(); - - return data; -} - -unsigned char* CCFreeTypeFont::getBitmap(Device::TextAlign eAlignMask, int &width, int &height, ssize_t& dataLength) -{ - int lineNumber = 0; - int totalLines = static_cast(m_lines.size()); - - m_width = m_inWidth ? m_inWidth : m_textWidth; - m_height = m_inHeight ? m_inHeight : m_textHeight; - - unsigned int size = m_width * m_height * 4; - unsigned char* pBuffer = new unsigned char[size]; - dataLength = size; - if(!pBuffer) - { - dataLength = 0; - return nullptr; - } - memset(pBuffer, 0, size); - - for (auto& line : m_lines) - { - FT_Vector pen = getPenForAlignment(line, eAlignMask, lineNumber, totalLines); - drawText(line, pBuffer, &pen); - lineNumber++; - } - width = m_width; - height = m_height; - - return pBuffer; -} - -FT_Vector CCFreeTypeFont::getPenForAlignment(FTLineInfo* pInfo, Device::TextAlign eAlignMask,int lineNumber, int totalLines) -{ - FT_Error error = 0; - FT_Vector pen; - - int top; - int stringWidth = pInfo->bbox.xMax - pInfo->bbox.xMin; - int maxLineNumber = totalLines - 1; - pen.x = 0; - pen.y = 0; - - switch(eAlignMask) - { - case Device::TextAlign::TOP: // Horizontal center and vertical top. - pen.x = ((m_width - stringWidth) / 2) - pInfo->bbox.xMin; - pen.y = pInfo->bbox.yMax + (lineNumber * m_lineHeight); - break; - - case Device::TextAlign::TOP_LEFT: // Horizontal left and vertical top. - pen.x -=pInfo->bbox.xMin; - pen.y = pInfo->bbox.yMax + (lineNumber * m_lineHeight); - break; - - case Device::TextAlign::TOP_RIGHT: // Horizontal right and vertical top. - pen.x = m_width - stringWidth - pInfo->bbox.xMin; - pen.y = pInfo->bbox.yMax + (lineNumber * m_lineHeight); - break; - - case Device::TextAlign::BOTTOM_RIGHT: // Horizontal right and vertical bottom. - pen.x = m_width - stringWidth - pInfo->bbox.xMin; - pen.y = m_height + pInfo->bbox.yMin - ((maxLineNumber - lineNumber) * m_lineHeight); - break; - - case Device::TextAlign::BOTTOM: // Horizontal center and vertical bottom. - pen.x = ((m_width - stringWidth) / 2) - pInfo->bbox.xMin; - pen.y = m_height + pInfo->bbox.yMin - ((maxLineNumber - lineNumber) * m_lineHeight); - break; - - case Device::TextAlign::BOTTOM_LEFT: // Horizontal left and vertical bottom. - pen.x -=pInfo->bbox.xMin; - top = (m_height - m_textHeight) / 2; - pen.y = m_height + pInfo->bbox.yMin - ((maxLineNumber - lineNumber) * m_lineHeight); - break; - - case Device::TextAlign::CENTER: // Horizontal center and vertical center - pen.x = ((m_width - stringWidth) / 2) - pInfo->bbox.xMin; - top = (m_height - m_textHeight) / 2; - pen.y = top + (lineNumber * m_lineHeight) + pInfo->bbox.yMax; - break; - - case Device::TextAlign::RIGHT: // Horizontal right and vertical center. - pen.x = m_width - stringWidth - pInfo->bbox.xMin; - top = (m_height - m_textHeight) / 2; - pen.y = top + (lineNumber * m_lineHeight) + pInfo->bbox.yMax; - break; - - case Device::TextAlign::LEFT: // Horizontal left and vertical center. - default: - pen.x -=pInfo->bbox.xMin; - top = (m_height - m_textHeight) / 2; - pen.y = top + (lineNumber * m_lineHeight) + pInfo->bbox.yMax; - break; - } - - return pen; -} - -void CCFreeTypeFont::drawText(FTLineInfo* pInfo, unsigned char* pBuffer, FT_Vector *pen) -{ - - auto glyphs = pInfo->glyphs; - for (auto& glyph : glyphs) - { - FT_Glyph image = glyph.image; - FT_Error error = FT_Glyph_To_Bitmap(&image, FT_RENDER_MODE_NORMAL, 0, 1); - if (!error) - { - FT_BitmapGlyph bit = (FT_BitmapGlyph)image; - draw_bitmap(pBuffer, &bit->bitmap, pen->x + glyph.pos.x + bit->left,pen->y - bit->top); - FT_Done_Glyph(image); - } - } -} - - -void CCFreeTypeFont::draw_bitmap(unsigned char* pBuffer, FT_Bitmap* bitmap, FT_Int x, FT_Int y) -{ - FT_Int i, j, p, q; - FT_Int x_max = x + bitmap->width; - FT_Int y_max = y + bitmap->rows; - float fontAlpha = m_fontFillColorA / 255.0f; - - for (i = x, p = 0; i < x_max; i++, p++) - { - for ( j = y, q = 0; j < y_max; j++, q++ ) - { - if (i < 0 || j < 0 || i >= m_width || j >= m_height) - continue; - - unsigned char value = bitmap->buffer[q * bitmap->width + p]; - - if(value > 0) - { - FT_Int index = (j * m_width * 4) + (i * 4); - pBuffer[index++] = m_fontFillColorR; - pBuffer[index++] = m_fontFillColorG; - pBuffer[index++] = m_fontFillColorB; - pBuffer[index++] = value * fontAlpha; - } - } - } -} - -void CCFreeTypeFont::endLine() -{ - if(m_currentLine) - { - m_lines.push_back(m_currentLine); - m_textWidth = std::max((long)m_textWidth,m_currentLine->bbox.xMax - m_currentLine->bbox.xMin); - m_textHeight += m_lineHeight; - } -} - -void CCFreeTypeFont::newLine() -{ - m_currentLine = new FTLineInfo(); - m_currentLine->width = 0; - m_currentLine->pen.x = 0; - m_currentLine->pen.y = 0; -} - - -FT_Error CCFreeTypeFont::addWord(const std::string& word) -{ - std::vector glyphs; // glyphs for the word - FT_BBox bbox; // bounding box containing all of the glyphs in the word - int maxWidth = m_inWidth ? m_inWidth : m_windowWidth; - std::string newWord; - - if(m_currentLine->width > 0) - { - newWord = ' ' + word; - } - else - { - newWord = word; - } - - FT_Error error = initWordGlyphs(glyphs, newWord, m_currentLine->pen); - if(!error) - { - compute_bbox(glyphs, &bbox); - if(m_currentLine->width == 0 || bbox.xMax <= maxWidth) - { - m_currentLine->glyphs.insert(m_currentLine->glyphs.end(),glyphs.begin(),glyphs.end()); - if(m_currentLine->width == 0) - { - m_currentLine->bbox = bbox; - } - else - { - m_currentLine->bbox.xMax = bbox.xMax; - } - m_currentLine->width = m_currentLine->bbox.xMax - m_currentLine->bbox.xMin; - } - else - { - endLine(); - newLine(); - addWord(word); - } - } - return error; -} - -FT_Error CCFreeTypeFont::initGlyphs(const char* text) -{ - FT_Error error = 0; - std::stringstream stringStream(text); - std::string line; - vector lines; - vector words; - - m_textWidth = 0; - m_textHeight = 0; - // the height of a line of text based on the max height of a glyph in the font size - m_lineHeight = ((m_face->size->metrics.ascender) >> 6) - ((m_face->size->metrics.descender) >> 6); - - m_lines.clear(); - - while(std::getline(stringStream, line) && !error) - { - newLine(); - - std::size_t prev = 0, pos; - while ((pos = line.find_first_of(" ", prev)) != std::string::npos) - { - if (pos > prev) - { - addWord(line.substr(prev, pos-prev)); - } - prev = pos + 1; - } - if (prev < line.length()) - { - addWord(line.substr(prev, std::string::npos)); - } - endLine(); - } - - return error; -} - -// if linewidth > m_inWidth -// get words for line - -void CCFreeTypeFont::initWords(const char* text) -{ - std::stringstream stringStream(text); - std::string line; - vector lines; - vector words; - - while(std::getline(stringStream, line)) - { - lines.push_back(line); - } - - for (auto& line : lines) - { - std::size_t prev = 0, pos; - while ((pos = line.find_first_of(" ';", prev)) != std::string::npos) - { - if (pos > prev) - words.push_back(line.substr(prev, pos-prev)); - prev = pos+1; - } - if (prev < line.length()) - words.push_back(line.substr(prev, std::string::npos)); - } - - for (auto& word : words) - { - std::string foo(word); - } -} - -FT_Error CCFreeTypeFont::initWordGlyphs(std::vector& glyphs, const std::string& text, FT_Vector& pen) -{ - FT_GlyphSlot slot = m_face->glyph; - FT_UInt glyph_index; - FT_UInt previous = 0; - FT_Error error = 0; - PGlyph glyph; - unsigned int numGlyphs = 0; - - int num_chars = static_cast(text.size()); - int nBufLen = num_chars + 1; - wchar_t * pwszBuffer = new wchar_t[nBufLen]; - if(!pwszBuffer) - { - return -1; - } - - memset(pwszBuffer,0,nBufLen); - num_chars = MultiByteToWideChar(CP_UTF8, 0, text.c_str(), num_chars, pwszBuffer, nBufLen); - pwszBuffer[num_chars] = '\0'; - - glyphs.clear(); - glyphs.resize(num_chars); - FT_Bool useKerning = FT_HAS_KERNING(m_face); - - for (int n = 0; n < num_chars; n++) - { - glyph = &glyphs[numGlyphs]; - - /* convert character code to glyph index */ - FT_ULong c = pwszBuffer[n]; - glyph_index = FT_Get_Char_Index(m_face, c); - - if (useKerning && previous && glyph_index) - { - FT_Vector delta; - FT_Get_Kerning(m_face, previous, glyph_index, - FT_KERNING_DEFAULT, &delta); - pen.x += delta.x >> 6; - } - - /* store current pen position */ - glyph->pos = pen; - glyph->index = glyph_index; - - /* load glyph image into the slot without rendering */ - error = FT_Load_Glyph(m_face, glyph_index, FT_LOAD_DEFAULT); - if (error) - continue; /* ignore errors, jump to next glyph */ - - /* extract glyph image and store it in our table */ - error = FT_Get_Glyph(m_face->glyph, &glyph->image); - if (error) - continue; /* ignore errors, jump to next glyph */ - - /* translate the glyph image now */ - FT_Glyph_Transform(glyph->image, 0, &glyph->pos); - - /* increment pen position */ - pen.x += slot->advance.x >> 6; - - /* record current glyph index */ - previous = glyph_index; - - numGlyphs++; - } - - CC_SAFE_DELETE_ARRAY(pwszBuffer); - - return error; -} - -void CCFreeTypeFont::compute_bbox(std::vector& glyphs, FT_BBox *abbox) -{ - FT_BBox bbox; - FT_BBox glyph_bbox; - - /* initialize string bbox to "empty" values */ - bbox.xMin = 32000; - bbox.xMax = -32000; - - // use the max and min values for the entire font face - bbox.yMin = (m_face->size->metrics.descender) >> 6; - bbox.yMax = (m_face->size->metrics.ascender) >> 6; - - /* for each glyph image, compute its bounding box, */ - /* translate it, and grow the string bbox */ - for (auto& glyph : glyphs) - { - FT_Glyph_Get_CBox(glyph.image, ft_glyph_bbox_pixels, &glyph_bbox); - - glyph_bbox.xMin += glyph.pos.x; - glyph_bbox.xMax += glyph.pos.x; - glyph_bbox.yMin += glyph.pos.y; - glyph_bbox.yMax += glyph.pos.y; - - if (glyph_bbox.xMin < bbox.xMin) - bbox.xMin = glyph_bbox.xMin; - - if (glyph_bbox.yMin < bbox.yMin) - bbox.yMin = glyph_bbox.yMin; - - if (glyph_bbox.xMax > bbox.xMax) - bbox.xMax = glyph_bbox.xMax; - - if (glyph_bbox.yMax > bbox.yMax) - bbox.yMax = glyph_bbox.yMax; - } - - /* check that we really grew the string bbox */ - if (bbox.xMin > bbox.xMax) - { - bbox.xMin = 0; - bbox.yMin = 0; - bbox.xMax = 0; - bbox.yMax = 0; - } - - /* return string bbox */ - *abbox = bbox; -} - -unsigned char* CCFreeTypeFont::loadFont(const char *pFontName, ssize_t *size) -{ - - - std::string lowerCase(pFontName); - std::string path(pFontName); - - for (unsigned int i = 0, length = lowerCase.length(); i < length; ++i) - { - lowerCase[i] = tolower(lowerCase[i]); - } - - if (lowerCase == "") - { - lowerCase = DEFAULT_FONT; - path = lowerCase; - } - - if (std::string::npos == lowerCase.find("fonts/")) - { - path = "fonts/" + lowerCase; - } - - if (std::string::npos == lowerCase.find(".ttf")) - { - path += ".ttf"; - } - - std::string fullpath = FileUtils::getInstance()->fullPathForFilename(path.c_str()); - - if (fullpath == "") - { - return nullptr; - } - - Data d; - FileUtils::getInstance()->getContents(fullpath, &d); - return d.takeBuffer(size); -} - -unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t *size) -{ - std::string aName(pFontName); - unsigned char* pBuffer = nullptr; - HRESULT hr = S_OK; - IDWriteFactory *writeFactory = nullptr; - IDWriteFontCollection *fontCollection = nullptr; - IDWriteFontFamily *fontFamily = nullptr; - IDWriteFont *matchingFont = nullptr; - IDWriteFontFace *fontFace = nullptr; - IDWriteFontFile *fontFile = nullptr; - IDWriteFontFileLoader *fontFileLoader = nullptr; - IDWriteFontFileStream *fontFileStream = nullptr; - UINT32 index; - BOOL exists; - std::wstring fontNameW; - const void *fontFileReferenceKey = nullptr; - UINT32 fontFileReferenceKeySize; - void *fragmentContext = nullptr; - - for (unsigned int i = 0, length = aName.length(); i < length; ++i) - { - aName[i] = tolower(aName[i]); - } - fontNameW.assign(aName.begin(), aName.end()); - - //create the factory - hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast(&writeFactory)); - - if(SUCCEEDED(hr)) - { - //obtain the fonts owned by the machine - hr = writeFactory->GetSystemFontCollection(&fontCollection, TRUE); - } - - //get the font - if(SUCCEEDED(hr)) - { - hr = fontCollection->FindFamilyName(fontNameW.c_str(), &index, &exists); - if(SUCCEEDED(hr) && exists) - { - hr = fontCollection->GetFontFamily(index, &fontFamily); - - if(SUCCEEDED(hr)) - { - hr = fontFamily->GetFirstMatchingFont(DWRITE_FONT_WEIGHT_REGULAR, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &matchingFont); - } - - if(SUCCEEDED(hr)) - { - hr = matchingFont->CreateFontFace(&fontFace); - } - - if(SUCCEEDED(hr)) - { - UINT32 numberOfFiles = 1; - hr = fontFace->GetFiles(&numberOfFiles, &fontFile); - } - - if(SUCCEEDED(hr)) - { - //create the font file stream - hr = fontFile->GetReferenceKey(&fontFileReferenceKey, &fontFileReferenceKeySize); - } - - if(SUCCEEDED(hr)) - { - hr = fontFile->GetLoader(&fontFileLoader); - } - - if(SUCCEEDED(hr)) - { - hr = fontFileLoader->CreateStreamFromKey(fontFileReferenceKey, fontFileReferenceKeySize, &fontFileStream); - } - - if(SUCCEEDED(hr)) - { - //finally get the font file dat - UINT64 fileSize; - const void *fragmentStart = nullptr; - hr = fontFileStream->GetFileSize(&fileSize); - - if(SUCCEEDED(hr)) - { - hr = fontFileStream->ReadFileFragment(&fragmentStart, 0, fileSize, &fragmentContext); - } - - if(SUCCEEDED(hr)) - { - pBuffer = (unsigned char*)malloc((size_t)fileSize); - memcpy(pBuffer, fragmentStart, (size_t)fileSize); - *size = (unsigned long)fileSize; - } - } - } - } - - //clean up all the DWrite stuff - if(fontFileStream) - { - fontFileStream->ReleaseFileFragment(fragmentContext); - fontFileStream->Release(); - } - if(fontFileLoader) - { - fontFileLoader->Release(); - } - if(fontFile) - { - fontFile->Release(); - } - if(fontFace) - { - fontFace->Release(); - } - if(matchingFont) - { - matchingFont->Release(); - } - if(fontFamily) - { - fontFamily->Release(); - } - if(fontCollection) - { - fontCollection->Release(); - } - if(writeFactory) - { - writeFactory->Release(); - } - - return pBuffer; -} - -NS_CC_END diff --git a/cocos/platform/winrt/CCFreeTypeFont.h b/cocos/platform/winrt/CCFreeTypeFont.h deleted file mode 100644 index 3e6ebbb6f388..000000000000 --- a/cocos/platform/winrt/CCFreeTypeFont.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __PLATFORM_WINRT_FREETYPE_H__ -#define __PLATFORM_WINRT_FREETYPE_H__ - -#include "platform/CCCommon.h" -#include "platform/CCDevice.h" -#include -#include -#include - -#define generic GenericFromFreeTypeLibrary -#define internal InternalFromFreeTypeLibrary -#include -#include -#include -#include -#include -#undef generic -#undef internal - -NS_CC_BEGIN - -typedef struct TGlyph_ -{ - FT_UInt index; // glyph index - FT_Vector pos; // glyph origin on the baseline - FT_Glyph image; // glyph image -} TGlyph, *PGlyph; - -typedef struct FontBufferInfo -{ - unsigned char* pBuffer; - unsigned long size; -} FontBufferInfo; - -typedef struct FTWordInfo -{ - std::vector glyphs; // glyphs for the word - FT_BBox bbox; // bounding box containing all of the glyphs in the word -} FTWordInfo; - - -typedef struct FTLineInfo -{ - std::vector glyphs; // glyphs for the line text - FT_BBox bbox; // bounding box containing all of the glyphs in the line - unsigned int width; // width of the line - FT_Vector pen; // current pen position -} FTLineInfo; - - -class CC_DLL CCFreeTypeFont -{ -public: - CCFreeTypeFont(); - ~CCFreeTypeFont(); - - unsigned char* initWithString(const char * text, const FontDefinition& textDefinition, Device::TextAlign align, int &width, int &height, ssize_t& dataLength); - - static const std::string DEFAULT_FONT; - -private: - - unsigned char* getBitmap(Device::TextAlign eAlignMask, int &width, int &height, ssize_t& dataLength); - - - unsigned char* loadFont(const char *pFontName, ssize_t* size); - - unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t* size); - - FT_Error CCFreeTypeFont::initGlyphs(const char* text); - FT_Error CCFreeTypeFont::initWordGlyphs(std::vector& glyphs, const std::string& text, FT_Vector& pen); - - void compute_bbox(std::vector& glyphs, FT_BBox *abbox); - - void drawText(FTLineInfo* pInfo, unsigned char* pBuffer, FT_Vector *pen); - - void draw_bitmap(unsigned char* pBuffer, FT_Bitmap* bitmap,FT_Int x,FT_Int y); - - void initWords(const char* text); - - void reset(); - - FT_Vector getPenForAlignment(FTLineInfo* pInfo, Device::TextAlign eAlignMask, int lineNumber, int totalLines); - - FT_Error addWord(const std::string& word); - void newLine(); - void endLine(); - - const std::string m_space; - - std::string m_text; - std::string m_fontName; - FT_Face m_face; - std::vector m_lines; - - int m_inWidth; // requested width of text box - int m_inHeight; // requested height of text box - int m_width; // final bitMap width - int m_height; // final bitMap height - int m_textWidth; // width of text text after word wrapping and line breaks - int m_textHeight; // height of text text after word wrapping and line breaks - int m_lineHeight; // height of a line for the font size - int m_windowWidth; // the width of the window - - FTLineInfo* m_currentLine; // the current line object to add words to. - - int m_fontFillColorR; - int m_fontFillColorG; - int m_fontFillColorB; - int m_fontFillColorA; -}; - -NS_CC_END - -#endif diff --git a/cocos/platform/winrt/CCGL.h b/cocos/platform/winrt/CCGL.h deleted file mode 100644 index becb9eb129b6..000000000000 --- a/cocos/platform/winrt/CCGL.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCGL_H__ -#define __CCGL_H__ - -#define GL_BGRA GL_BGRA_EXT -#define glClearDepth glClearDepthf -#define GL_WRITE_ONLY GL_WRITE_ONLY_OES - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "EGL/egl.h" -#include "EGL/eglext.h" -#include "EGL/eglplatform.h" -#include "GLES2/gl2.h" -#include "GLES2/gl2ext.h" -#include "GLES3/gl3.h" - -#define glClearDepth glClearDepthf -#define glDeleteVertexArrays glDeleteVertexArraysOES -#define glGenVertexArrays glGenVertexArraysOES -#define glBindVertexArray glBindVertexArrayOES -#define glMapBuffer glMapBufferOES -#define glUnmapBuffer glUnmapBufferOES - -#define GL_WRITE_ONLY GL_WRITE_ONLY_OES - -#endif - - - -#endif // __CCGL_H__ diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.cpp b/cocos/platform/winrt/CCGLViewImpl-winrt.cpp deleted file mode 100644 index 87d7e9949e78..000000000000 --- a/cocos/platform/winrt/CCGLViewImpl-winrt.cpp +++ /dev/null @@ -1,643 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/winrt/CCGLViewImpl-winrt.h" -#include "base/ccMacros.h" -#include "base/CCDirector.h" -#include "base/CCTouch.h" -#include "base/CCIMEDispatcher.h" -#include "base/CCEventListenerKeyboard.h" -#include "platform/winrt/CCApplication.h" -#include "platform/winrt/CCWinRTUtils.h" -#include "deprecated/CCNotificationCenter.h" -#include "base/CCEventDispatcher.h" -#include "base/CCEventMouse.h" - -#include - -using namespace Platform; -using namespace Concurrency; -using namespace Windows::System; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; -using namespace Windows::Graphics::Display; -using namespace Windows::UI::Input; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::System; -using namespace Windows::UI::ViewManagement; -using namespace Windows::ApplicationModel; -using namespace Windows::ApplicationModel::Core; -using namespace Windows::ApplicationModel::Activation; -using namespace Platform; -using namespace Microsoft::WRL; - - -NS_CC_BEGIN - -static GLViewImpl* s_pEglView = nullptr; - -GLViewImpl* GLViewImpl::create(const std::string& viewName) -{ - auto ret = new GLViewImpl; - if(ret && ret->initWithFullScreen(viewName)) - { - ret->autorelease(); - return ret; - } - - return nullptr; -} - -GLViewImpl::GLViewImpl() - : _frameZoomFactor(1.0f) - , _supportTouch(true) - , _isRetina(false) - , _isCursorVisible(true) - , m_lastPointValid(false) - , m_running(false) - , m_initialized(false) - , m_windowClosed(false) - , m_windowVisible(true) - , m_width(0) - , m_height(0) - , m_orientation(DisplayOrientations::Landscape) - , m_appShouldExit(false) - , _lastMouseButtonPressed(EventMouse::MouseButton::BUTTON_UNSET) -{ - s_pEglView = this; - _viewName = "cocos2dx"; - - m_keyboard = ref new KeyBoardWinRT(); - - m_backButtonListener = EventListenerKeyboard::create(); - m_backButtonListener->onKeyReleased = CC_CALLBACK_2(GLViewImpl::BackButtonListener, this); - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(m_backButtonListener, INT_MAX); -} - -GLViewImpl::~GLViewImpl() -{ - CC_ASSERT(this == s_pEglView); - s_pEglView = nullptr; - - // TODO: cleanup -} - -bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor) -{ - setViewName(viewName); - setFrameSize(rect.size.width, rect.size.height); - setFrameZoomFactor(frameZoomFactor); - return true; -} - -bool GLViewImpl::initWithFullScreen(const std::string& viewName) -{ - return initWithRect(viewName, Rect(0, 0, m_width, m_height), 1.0f); -} - -bool GLViewImpl::Create(float width, float height, float dpi, DisplayOrientations orientation) -{ - m_orientation = orientation; - m_dpi = dpi; - UpdateForWindowSizeChange(width, height); - return true; -} - -void cocos2d::GLViewImpl::setCursorVisible(bool isVisible) -{ - _isCursorVisible = isVisible; -} - -void GLViewImpl::setDispatcher(Windows::UI::Core::CoreDispatcher^ dispatcher) -{ - m_dispatcher = dispatcher; -} - -void GLViewImpl::setPanel(Windows::UI::Xaml::Controls::Panel^ panel) -{ - m_panel = panel; -} - -void GLViewImpl::setIMEKeyboardState(bool bOpen) -{ - std::string str; - setIMEKeyboardState(bOpen, str); -} - -bool GLViewImpl::ShowMessageBox(Platform::String^ title, Platform::String^ message) -{ - if (m_dispatcher.Get()) - { - m_dispatcher.Get()->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([title, message]() - { - // Show the message dialog - auto msg = ref new Windows::UI::Popups::MessageDialog(message, title); - // Set the command to be invoked when a user presses 'ESC' - msg->CancelCommandIndex = 1; - msg->ShowAsync(); - })); - - return true; - } - return false; -} - -void GLViewImpl::setIMEKeyboardState(bool bOpen, const std::string& str) -{ - if(bOpen) - { - m_keyboard->ShowKeyboard(PlatformStringFromString(str)); - } - else - { - m_keyboard->HideKeyboard(PlatformStringFromString(str)); - } -} - -void GLViewImpl::swapBuffers() -{ - -} - -bool GLViewImpl::isOpenGLReady() -{ - return true; -} - -void GLViewImpl::end() -{ - m_windowClosed = true; - m_appShouldExit = true; -} - -void GLViewImpl::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) -{ -} - -void GLViewImpl::OnResuming(Platform::Object^ sender, Platform::Object^ args) -{ -} - -// user pressed the Back Key on the phone -void GLViewImpl::OnBackKeyPress() -{ - cocos2d::EventKeyboard::KeyCode cocos2dKey = EventKeyboard::KeyCode::KEY_ESCAPE; - cocos2d::EventKeyboard event(cocos2dKey, false); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); -} - -void GLViewImpl::BackButtonListener(EventKeyboard::KeyCode keyCode, Event* event) -{ - if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE) - { - CCLOG("*********************************************************************"); - CCLOG("GLViewImpl::BackButtonListener: Exiting application!"); - CCLOG(""); - CCLOG("If you want to listen for Windows Phone back button events,"); - CCLOG("add a listener for EventKeyboard::KeyCode::KEY_ESCAPE"); - CCLOG("Make sure you call stopPropagation() on the Event if you don't"); - CCLOG("want your app to exit when the back button is pressed."); - CCLOG(""); - CCLOG("For example, add the following to your scene..."); - CCLOG("auto listener = EventListenerKeyboard::create();"); - CCLOG("listener->onKeyReleased = CC_CALLBACK_2(HelloWorld::onKeyReleased, this);"); - CCLOG("getEventDispatcher()->addEventListenerWithFixedPriority(listener, 1);"); - CCLOG(""); - CCLOG("void HelloWorld::onKeyReleased(EventKeyboard::KeyCode keyCode, Event* event)"); - CCLOG("{"); - CCLOG(" if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE)"); - CCLOG(" {"); - CCLOG(" if (myAppShouldNotQuit) // or whatever logic you want..."); - CCLOG(" {"); - CCLOG(" event->stopPropagation();"); - CCLOG(" }"); - CCLOG(" }"); - CCLOG("}"); - CCLOG(""); - CCLOG("You MUST call event->stopPropagation() if you don't want your app to quit!"); - CCLOG("*********************************************************************"); - - Director::getInstance()->end(); - } -} - -bool GLViewImpl::AppShouldExit() -{ - return m_appShouldExit; -} - -void GLViewImpl::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args) -{ - OnPointerPressed(args); -} - -void GLViewImpl::OnPointerPressed(PointerEventArgs^ args) -{ - intptr_t id = args->CurrentPoint->PointerId; - Vec2 pt = GetPoint(args); - handleTouchesBegin(1, &id, &pt.x, &pt.y); -} - -void GLViewImpl::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ args) -{ - float direction = (float)args->CurrentPoint->Properties->MouseWheelDelta; - intptr_t id = 0; - Vec2 p(0.0f,0.0f); - handleTouchesBegin(1, &id, &p.x, &p.y); - p.y += direction; - handleTouchesMove(1, &id, &p.x, &p.y); - handleTouchesEnd(1, &id, &p.x, &p.y); -} - -void GLViewImpl::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) -{ - m_windowVisible = args->Visible; -} - -void GLViewImpl::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) -{ - m_windowClosed = true; -} - -void GLViewImpl::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args) -{ - OnPointerMoved(args); -} - -void GLViewImpl::OnPointerMoved( PointerEventArgs^ args) -{ - auto currentPoint = args->CurrentPoint; - if (currentPoint->IsInContact) - { - if (m_lastPointValid) - { - intptr_t id = args->CurrentPoint->PointerId; - Vec2 p = GetPoint(args); - handleTouchesMove(1, &id, &p.x, &p.y); - } - m_lastPoint = currentPoint->Position; - m_lastPointValid = true; - } - else - { - m_lastPointValid = false; - } -} - -void GLViewImpl::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args) -{ - OnPointerReleased(args); -} - -void GLViewImpl::OnPointerReleased(PointerEventArgs^ args) -{ - intptr_t id = args->CurrentPoint->PointerId; - Vec2 pt = GetPoint(args); - handleTouchesEnd(1, &id, &pt.x, &pt.y); -} - -void cocos2d::GLViewImpl::OnMousePressed(Windows::UI::Core::PointerEventArgs^ args) -{ - Vec2 mousePosition = GetPointMouse(args); - - // Emulated touch, if left mouse button - if (args->CurrentPoint->Properties->IsLeftButtonPressed) - { - intptr_t id = 0; - Vec2 pt = GetPoint(args); - handleTouchesBegin(1, &id, &pt.x, &pt.y); - } - - if (_lastMouseButtonPressed != EventMouse::MouseButton::BUTTON_UNSET) - { - EventMouse event(EventMouse::MouseEventType::MOUSE_UP); - - event.setMouseButton(_lastMouseButtonPressed); - event.setCursorPosition(mousePosition.x, mousePosition.y); - Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - } - - EventMouse event(EventMouse::MouseEventType::MOUSE_DOWN); - // Set current button - if (args->CurrentPoint->Properties->IsLeftButtonPressed) - { - _lastMouseButtonPressed = EventMouse::MouseButton::BUTTON_LEFT; - } - else if (args->CurrentPoint->Properties->IsRightButtonPressed) - { - _lastMouseButtonPressed = EventMouse::MouseButton::BUTTON_RIGHT; - } - else if (args->CurrentPoint->Properties->IsMiddleButtonPressed) - { - _lastMouseButtonPressed = EventMouse::MouseButton::BUTTON_MIDDLE; - } - event.setMouseButton(_lastMouseButtonPressed); - event.setCursorPosition(mousePosition.x, mousePosition.y); - Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); -} - -void cocos2d::GLViewImpl::OnMouseMoved(Windows::UI::Core::PointerEventArgs^ args) -{ - Vec2 mousePosition = GetPointMouse(args); - - // Emulated touch, if left mouse button - if (args->CurrentPoint->Properties->IsLeftButtonPressed) - { - intptr_t id = 0; - Vec2 pt = GetPoint(args); - handleTouchesMove(1, &id, &pt.x, &pt.y); - } - - EventMouse event(EventMouse::MouseEventType::MOUSE_MOVE); - // Set current button - if (args->CurrentPoint->Properties->IsLeftButtonPressed) - { - event.setMouseButton(EventMouse::MouseButton::BUTTON_LEFT); - } - else if (args->CurrentPoint->Properties->IsRightButtonPressed) - { - event.setMouseButton(EventMouse::MouseButton::BUTTON_RIGHT); - } - else if (args->CurrentPoint->Properties->IsMiddleButtonPressed) - { - event.setMouseButton(EventMouse::MouseButton::BUTTON_MIDDLE); - } - event.setCursorPosition(mousePosition.x, mousePosition.y); - Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); -} - -void cocos2d::GLViewImpl::OnMouseReleased(Windows::UI::Core::PointerEventArgs^ args) -{ - Vec2 mousePosition = GetPointMouse(args); - - // Emulated touch, if left mouse button - if (_lastMouseButtonPressed == EventMouse::MouseButton::BUTTON_LEFT) - { - intptr_t id = 0; - Vec2 pt = GetPoint(args); - handleTouchesEnd(1, &id, &pt.x, &pt.y); - } - - EventMouse event(EventMouse::MouseEventType::MOUSE_UP); - - event.setMouseButton(_lastMouseButtonPressed); - event.setCursorPosition(mousePosition.x, mousePosition.y); - Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - - _lastMouseButtonPressed = EventMouse::MouseButton::BUTTON_UNSET; -} - -void cocos2d::GLViewImpl::OnMouseWheelChanged(Windows::UI::Core::PointerEventArgs^ args) -{ - Vec2 mousePosition = GetPointMouse(args); - - EventMouse event(EventMouse::MouseEventType::MOUSE_SCROLL); - - float delta = args->CurrentPoint->Properties->MouseWheelDelta; - - if (args->CurrentPoint->Properties->IsHorizontalMouseWheel) - { - event.setScrollData(delta, 0.0f); - } - else - { - event.setScrollData(0.0f, -delta); - } - - event.setCursorPosition(mousePosition.x, mousePosition.y); - Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); -} - -void GLViewImpl::resize(int width, int height) -{ - -} - -void GLViewImpl::setFrameZoomFactor(float fZoomFactor) -{ - _frameZoomFactor = fZoomFactor; - Director::getInstance()->setProjection(Director::getInstance()->getProjection()); - //resize(m_obScreenSize.width * fZoomFactor, m_obScreenSize.height * fZoomFactor); -} - -float GLViewImpl::getFrameZoomFactor() -{ - return _frameZoomFactor; -} - -void GLViewImpl::centerWindow() -{ - // not implemented in WinRT. Window is always full screen -} - -GLViewImpl* GLViewImpl::sharedOpenGLView() -{ - return s_pEglView; -} - -int GLViewImpl::Run() -{ - // XAML version does not have a run loop - m_running = true; - return 0; -}; - -void GLViewImpl::Render() -{ - OnRendering(); -} - -void GLViewImpl::OnRendering() -{ - if(m_running && m_initialized) - { - Director::getInstance()->mainLoop(); - } -} - -// called by orientation change from WP8 XAML -void GLViewImpl::UpdateOrientation(DisplayOrientations orientation) -{ - if(m_orientation != orientation) - { - m_orientation = orientation; - UpdateWindowSize(); - } -} - -// called by size change from WP8 XAML -void GLViewImpl::UpdateForWindowSizeChange(float width, float height) -{ - if (width != m_width || height != m_height) - { - m_width = width; - m_height = height; - UpdateWindowSize(); - } -} - -#if 0 -win32 version - -void GLViewEventHandler::OnGLFWWindowSizeFunCallback(GLFWwindow *windows, int width, int height) -{ - auto view = Director::getInstance()->getOpenGLView(); - if(view && view->getResolutionPolicy() != ResolutionPolicy::UNKNOWN) - { - Size resSize=view->getDesignResolutionSize(); - ResolutionPolicy resPolicy=view->getResolutionPolicy(); - view->setFrameSize(width, height); - view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy); - Director::getInstance()->setViewport(); - } -} -#endif - -void GLViewImpl::UpdateWindowSize() -{ - float width, height; - - width = m_width; - height = m_height; - - - //CCSize designSize = getDesignResolutionSize(); - if(!m_initialized) - { - m_initialized = true; - GLView::setFrameSize(width, height); - } - - auto view = Director::getInstance()->getOpenGLView(); - if(view && view->getResolutionPolicy() != ResolutionPolicy::UNKNOWN) - { - Size resSize=view->getDesignResolutionSize(); - ResolutionPolicy resPolicy=view->getResolutionPolicy(); - view->setFrameSize(width, height); - view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy); - auto director = Director::getInstance(); - director->setViewport(); - director->setProjection(director->getProjection()); - } -} - -cocos2d::Vec2 GLViewImpl::TransformToOrientation(Windows::Foundation::Point p) -{ - cocos2d::Vec2 returnValue; - - float x = p.X; - float y = p.Y; - returnValue = Vec2(x, y); - -#if 0 - switch (m_orientation) - { - case DisplayOrientations::Portrait: - default: - returnValue = Vec2(x, y); - break; - case DisplayOrientations::Landscape: - returnValue = Vec2(y, m_width - x); - break; - case DisplayOrientations::PortraitFlipped: - returnValue = Vec2(m_width - x, m_height - y); - break; - case DisplayOrientations::LandscapeFlipped: - returnValue = Vec2(m_height - y, x); - break; - } -#endif - - float zoomFactor = GLViewImpl::sharedOpenGLView()->getFrameZoomFactor(); - if(zoomFactor > 0.0f) { - returnValue.x /= zoomFactor; - returnValue.y /= zoomFactor; - } - - // CCLOG("%.2f %.2f : %.2f %.2f", p.X, p.Y,returnValue.x, returnValue.y); - - return returnValue; -} - -Vec2 GLViewImpl::GetPoint(PointerEventArgs^ args) { - - return TransformToOrientation(args->CurrentPoint->Position); -} - -Vec2 GLViewImpl::GetPointMouse(PointerEventArgs^ args) { - - Vec2 position = TransformToOrientation(args->CurrentPoint->Position); - - //Because Windows and cocos2d-x uses different Y axis, we need to convert the coordinate here - position.x = (position.x - _viewPortRect.origin.x) / _scaleX; - position.y = (_viewPortRect.origin.y + _viewPortRect.size.height - position.y) / _scaleY; - - return position; -} - - -void GLViewImpl::QueueBackKeyPress() -{ - std::shared_ptr e(new BackButtonEvent()); - mInputEvents.push(e); -} - -void GLViewImpl::QueuePointerEvent(PointerEventType type, PointerEventArgs^ args) -{ - std::shared_ptr e(new PointerEvent(type, args)); - mInputEvents.push(e); -} - -void GLViewImpl::QueueWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) -{ - std::shared_ptr e(new WinRTKeyboardEvent(type, args)); - mInputEvents.push(e); -} - -void GLViewImpl::OnWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) -{ - m_keyboard->OnWinRTKeyboardEvent(type, args); -} - -void GLViewImpl::QueueEvent(std::shared_ptr& event) -{ - mInputEvents.push(event); -} - -void GLViewImpl::ProcessEvents() -{ - std::shared_ptr e; - while (mInputEvents.try_pop(e)) - { - e->execute(); - } -} - -NS_CC_END diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.h b/cocos/platform/winrt/CCGLViewImpl-winrt.h deleted file mode 100644 index 53a5ea3bf9e0..000000000000 --- a/cocos/platform/winrt/CCGLViewImpl-winrt.h +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EGLVIEWIMPL_WINRT_H__ -#define __CC_EGLVIEWIMPL_WINRT_H__ - -#include "platform/winrt/CCStdC.h" -#include "platform/CCCommon.h" -#include "platform/winrt/Keyboard-winrt.h" -#include "platform/CCGLView.h" -#include "base/CCEventKeyboard.h" - -#include -#include -#include -#include -#include - -NS_CC_BEGIN - -class GLViewImpl; - -class CC_DLL GLViewImpl : public GLView -{ -public: - static GLViewImpl* create(const std::string& viewName); - - /* override functions */ - virtual bool isOpenGLReady(); - virtual void end(); - virtual void swapBuffers(); - - Windows::Graphics::Display::DisplayOrientations getDeviceOrientation() {return m_orientation;}; - Size getRenerTargetSize() const { return Size(m_width, m_height); } - - virtual void setIMEKeyboardState(bool bOpen) override; - virtual void setIMEKeyboardState(bool bOpen, const std::string& str); - - virtual bool Create(float width, float height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation); - - /** - * Hide or Show the mouse cursor if there is one. - * - * @param isVisible Hide or Show the mouse cursor if there is one. - */ - virtual void setCursorVisible(bool isVisible) override; - - bool isCursorVisible() { return _isCursorVisible; } - - void setDispatcher(Windows::UI::Core::CoreDispatcher^ dispatcher); - Windows::UI::Core::CoreDispatcher^ getDispatcher() {return m_dispatcher.Get();} - - void setPanel(Windows::UI::Xaml::Controls::Panel^ panel); - Windows::UI::Xaml::Controls::Panel^ getPanel() {return m_panel.Get();} - - void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::PointerEventArgs^ args); - - void OnMousePressed(Windows::UI::Core::PointerEventArgs^ args); - void OnMouseMoved(Windows::UI::Core::PointerEventArgs^ args); - void OnMouseReleased(Windows::UI::Core::PointerEventArgs^ args); - void OnMouseWheelChanged(Windows::UI::Core::PointerEventArgs^ args); - - void OnWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); - - - void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); - void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); - void OnResuming(Platform::Object^ sender, Platform::Object^ args); - void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args); - void OnBackKeyPress(); - bool AppShouldExit(); - void BackButtonListener(cocos2d::EventKeyboard::KeyCode keyCode, cocos2d::Event* event); - - void QueueBackKeyPress(); - void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); - void QueueWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); - void QueueEvent(std::shared_ptr& event); - - bool ShowMessageBox(Platform::String^ title, Platform::String^ message); - - int Run(); - void Render(); - - void resize(int width, int height); - - float getFrameZoomFactor(); - void centerWindow(); - - void UpdateOrientation(Windows::Graphics::Display::DisplayOrientations orientation); - void UpdateForWindowSizeChange(float width, float height); - - void SetDPI(float dpi) { m_dpi = dpi; } - float GetDPI() { return m_dpi; } - - // static function - /** - @brief get the shared main open gl window - */ - static GLViewImpl* sharedOpenGLView(); - - void ProcessEvents(); - -protected: - GLViewImpl(); - virtual ~GLViewImpl(); - - bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor); - bool initWithFullScreen(const std::string& viewName); - - /* - * Set zoom factor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop. - */ - void setFrameZoomFactor(float zoomFactor); - - inline bool isRetina() { return _isRetina; }; - - float _frameZoomFactor; - bool _supportTouch; - bool _isRetina; - bool _isCursorVisible; - - -private: - CC_DISALLOW_COPY_AND_ASSIGN(GLViewImpl); - - void OnRendering(); - void UpdateWindowSize(); - - cocos2d::Vec2 TransformToOrientation(Windows::Foundation::Point point); - cocos2d::Vec2 GetPoint(Windows::UI::Core::PointerEventArgs^ args); - cocos2d::Vec2 GetPointMouse(Windows::UI::Core::PointerEventArgs^ args); - - Windows::Foundation::Rect m_windowBounds; - Windows::Foundation::EventRegistrationToken m_eventToken; - Windows::Foundation::Point m_lastPoint; - - float m_width; - float m_height; - float m_dpi; - - Windows::Graphics::Display::DisplayOrientations m_orientation; - Windows::Foundation::Rect m_keyboardRect; - - bool m_lastPointValid; - bool m_windowClosed; - bool m_windowVisible; - // PointerReleased for mouse not send button id, need save in PointerPressed last button - EventMouse::MouseButton _lastMouseButtonPressed; - - bool m_running; - bool m_initialized; - bool m_appShouldExit; - - Concurrency::concurrent_queue> mInputEvents; - - Platform::Agile m_dispatcher; - Platform::Agile m_panel; - - KeyBoardWinRT^ m_keyboard; - - cocos2d::EventListenerKeyboard* m_backButtonListener; - -}; - -NS_CC_END - -#endif // end of __CC_EGLVIEWIMPL_WINRT_H__ diff --git a/cocos/platform/winrt/CCGLViewImpl.cpp b/cocos/platform/winrt/CCGLViewImpl.cpp deleted file mode 100644 index 82984e5eb6df..000000000000 --- a/cocos/platform/winrt/CCGLViewImpl.cpp +++ /dev/null @@ -1,585 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "platform/winrt/CCGLViewImpl.h" -#include "base/ccMacros.h" -#include "base/CCDirector.h" -#include "base/CCTouch.h" -#include "base/CCIMEDispatcher.h" -#include "platform/winrt/CCApplication.h" -#include "platform/winrt/CCWinRTUtils.h" - -#if (_MSC_VER >= 1800) -#include -#endif - - -using namespace Platform; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; -using namespace Windows::Graphics::Display; -using namespace Windows::UI::Input; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::System; -using namespace Windows::UI::ViewManagement; - -NS_CC_BEGIN - -static GLViewImpl* s_pEglView = nullptr; - -////////////////////////////////////////////////////////////////////////// -// implement GLView -////////////////////////////////////////////////////////////////////////// - -// Initialize the DirectX resources required to run. -void WinRTWindow::Initialize(CoreWindow^ window, SwapChainBackgroundPanel^ panel) -{ - m_window = window; - //TODO: remove esUtils - //esInitContext ( &m_esContext ); - - ANGLE_D3D_FEATURE_LEVEL featureLevel = ANGLE_D3D_FEATURE_LEVEL::ANGLE_D3D_FEATURE_LEVEL_9_1; - -#if (_MSC_VER >= 1800) - // WinRT on Windows 8.1 can compile shaders at run time so we don't care about the DirectX feature level - featureLevel = ANGLE_D3D_FEATURE_LEVEL::ANGLE_D3D_FEATURE_LEVEL_ANY; -#endif - - - HRESULT result = CreateWinrtEglWindow(WINRT_EGL_IUNKNOWN(panel), featureLevel, m_eglWindow.GetAddressOf()); - - if (!SUCCEEDED(result)) - { - CCLOG("Unable to create Angle EGL Window: %d", result); - return; - } - - m_esContext.hWnd = m_eglWindow; - // width and height are ignored and determined from the CoreWindow the SwapChainBackgroundPanel is in. - - //TODO: remove esUtils - //esCreateWindow ( &m_esContext, TEXT("Cocos2d-x"), 0, 0, ES_WINDOW_RGB | ES_WINDOW_ALPHA | ES_WINDOW_DEPTH | ES_WINDOW_STENCIL ); - - m_window->PointerPressed += - ref new TypedEventHandler(this, &WinRTWindow::OnPointerPressed); - m_window->PointerReleased += - ref new TypedEventHandler(this, &WinRTWindow::OnPointerReleased); - m_window->PointerMoved += - ref new TypedEventHandler(this, &WinRTWindow::OnPointerMoved); - m_window->PointerWheelChanged += - ref new TypedEventHandler(this, &WinRTWindow::OnPointerWheelChanged); - - m_dummy = ref new Button(); - m_dummy->Opacity = 0.0; - m_dummy->Width=1; - m_dummy->Height=1; - m_dummy->IsEnabled = true; - panel->Children->Append(m_dummy); - - m_textBox = ref new TextBox(); - m_textBox->Opacity = 0.0; - m_textBox->Width=1; - m_textBox->Height=1; - m_textBox->MaxLength = 1; - - panel->Children->Append(m_textBox); - m_textBox->AddHandler(UIElement::KeyDownEvent, ref new KeyEventHandler(this, &WinRTWindow::OnTextKeyDown), true); - m_textBox->AddHandler(UIElement::KeyUpEvent, ref new KeyEventHandler(this, &WinRTWindow::OnTextKeyUp), true); - m_textBox->IsEnabled = false; - - auto keyboard = InputPane::GetForCurrentView(); - keyboard->Showing += ref new TypedEventHandler(this, &WinRTWindow::ShowKeyboard); - keyboard->Hiding += ref new TypedEventHandler(this, &WinRTWindow::HideKeyboard); - setIMEKeyboardState(false); -} - -WinRTWindow::WinRTWindow(CoreWindow^ window) : - m_lastPointValid(false), - m_textInputEnabled(false) -{ - window->SizeChanged += - ref new TypedEventHandler(this, &WinRTWindow::OnWindowSizeChanged); - - DisplayProperties::LogicalDpiChanged += - ref new DisplayPropertiesEventHandler(this, &WinRTWindow::OnLogicalDpiChanged); - - DisplayProperties::OrientationChanged += - ref new DisplayPropertiesEventHandler(this, &WinRTWindow::OnOrientationChanged); - - DisplayProperties::DisplayContentsInvalidated += - ref new DisplayPropertiesEventHandler(this, &WinRTWindow::OnDisplayContentsInvalidated); - - m_eventToken = CompositionTarget::Rendering::add(ref new EventHandler(this, &WinRTWindow::OnRendering)); -} - - -void WinRTWindow::swapBuffers() -{ - eglSwapBuffers(m_esContext.eglDisplay, m_esContext.eglSurface); -} - - - -void WinRTWindow::OnSuspending() -{ -#if (_MSC_VER >= 1800) - Microsoft::WRL::ComPtr dxgiDevice; - Microsoft::WRL::ComPtr device = m_eglWindow->GetAngleD3DDevice(); - HRESULT result = device.As(&dxgiDevice); - if (SUCCEEDED(result)) - { - dxgiDevice->Trim(); - } -#endif -} - - -void WinRTWindow::ResizeWindow() -{ - GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange(); -} - -cocos2d::Vec2 WinRTWindow::GetCCPoint(PointerEventArgs^ args) { - auto p = args->CurrentPoint; - float x = getScaledDPIValue(p->Position.X); - float y = getScaledDPIValue(p->Position.Y); - Vec2 pt(x, y); - - float zoomFactor = GLViewImpl::sharedOpenGLView()->getFrameZoomFactor(); - - if(zoomFactor > 0.0f) { - pt.x /= zoomFactor; - pt.y /= zoomFactor; - } - return pt; -} - -void WinRTWindow::ShowKeyboard(InputPane^ inputPane, InputPaneVisibilityEventArgs^ args) -{ - GLViewImpl::sharedOpenGLView()->ShowKeyboard(args->OccludedRect); -} - -void WinRTWindow::HideKeyboard(InputPane^ inputPane, InputPaneVisibilityEventArgs^ args) -{ - GLViewImpl::sharedOpenGLView()->HideKeyboard(args->OccludedRect); -} - -void WinRTWindow::setIMEKeyboardState(bool bOpen) -{ - m_textInputEnabled = bOpen; - if(m_textInputEnabled) - { - m_textBox->IsEnabled = true; - m_textBox->Focus(FocusState::Pointer); - } - else - { - m_dummy->Focus(FocusState::Pointer); - m_textBox->IsEnabled = false; - } -} - - - -void WinRTWindow::OnTextKeyDown(Object^ sender, KeyRoutedEventArgs^ args) -{ -#if 0 - if(!m_textInputEnabled) - { - return; - } - - auto key = args->Key; - - switch(key) - { - default: - break; - } -#endif -} - -void WinRTWindow::OnTextKeyUp(Object^ sender, KeyRoutedEventArgs^ args) -{ - if(!m_textInputEnabled) - { - return; - } - - args->Handled = true; - - auto key = args->Key; - - switch(key) - { - case VirtualKey::Escape: - // TODO:: fix me - //Director::getInstance()->getKeypadDispatcher()->dispatchKeypadMSG(kTypeBackClicked); - args->Handled = true; - break; - case VirtualKey::Back: - IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); - break; - case VirtualKey::Enter: - setIMEKeyboardState(false); - IMEDispatcher::sharedDispatcher()->dispatchInsertText("\n", 1); - break; - default: - char szUtf8[8] = {0}; - int nLen = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)m_textBox->Text->Data(), 1, szUtf8, sizeof(szUtf8), NULL, NULL); - IMEDispatcher::sharedDispatcher()->dispatchInsertText(szUtf8, nLen); - break; - } - m_textBox->Text = ""; -} - - -void WinRTWindow::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ args) -{ - float direction = (float)args->CurrentPoint->Properties->MouseWheelDelta; - int id = 0; - Vec2 p(0.0f,0.0f); - GLViewImpl::sharedOpenGLView()->handleTouchesBegin(1, &id, &p.x, &p.y); - p.y += direction; - GLViewImpl::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y); - GLViewImpl::sharedOpenGLView()->handleTouchesEnd(1, &id, &p.x, &p.y); -} - -// user pressed the Back Key on the phone -void GLViewImpl::OnBackKeyPress() -{ -#if 0 - if (m_delegate) - { - m_delegate->Invoke(Cocos2dEvent::TerminateApp); - } -#endif // 0 - -} - - -void GLViewImpl::OnPointerPressed(PointerEventArgs^ args) -{ -#if 0 - int id = args->CurrentPoint->PointerId; - Vec2 pt = GetPoint(args); - handleTouchesBegin(1, &id, &pt.x, &pt.y); -#endif -} - -void GLViewImpl::OnPointerMoved(PointerEventArgs^ args) -{ -#if 0 - auto currentPoint = args->CurrentPoint; - if (currentPoint->IsInContact) - { - if (m_lastPointValid) - { - int id = args->CurrentPoint->PointerId; - Vec2 p = GetPoint(args); - handleTouchesMove(1, &id, &p.x, &p.y); - } - m_lastPoint = currentPoint->Position; - m_lastPointValid = true; - } - else - { - m_lastPointValid = false; - } -#endif -} - -void GLViewImpl::OnPointerReleased(PointerEventArgs^ args) -{ -#if 0 - int id = args->CurrentPoint->PointerId; - Vec2 pt = GetPoint(args); - handleTouchesEnd(1, &id, &pt.x, &pt.y); -#endif // 0 - -} - - - -void WinRTWindow::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args) -{ - int id = args->CurrentPoint->PointerId; - Vec2 pt = GetCCPoint(args); - GLViewImpl::sharedOpenGLView()->handleTouchesBegin(1, &id, &pt.x, &pt.y); -} - -void WinRTWindow::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args) -{ - auto currentPoint = args->CurrentPoint; - if (currentPoint->IsInContact) - { - if (m_lastPointValid) - { - int id = args->CurrentPoint->PointerId; - Vec2 p = GetCCPoint(args); - GLViewImpl::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y); - } - m_lastPoint = currentPoint->Position; - m_lastPointValid = true; - } - else - { - m_lastPointValid = false; - } -} - -void WinRTWindow::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args) -{ - int id = args->CurrentPoint->PointerId; - Vec2 pt = GetCCPoint(args); - GLViewImpl::sharedOpenGLView()->handleTouchesEnd(1, &id, &pt.x, &pt.y); -} - -void WinRTWindow::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args) -{ - ResizeWindow(); - GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange(); -} - -void WinRTWindow::OnLogicalDpiChanged(Object^ sender) -{ - GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange(); -} - -void WinRTWindow::OnOrientationChanged(Object^ sender) -{ - ResizeWindow(); - GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange(); -} - -void WinRTWindow::OnDisplayContentsInvalidated(Object^ sender) -{ - GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange(); -} - -void WinRTWindow::OnRendering(Object^ sender, Object^ args) -{ - GLViewImpl::sharedOpenGLView()->OnRendering(); -} - - -GLViewImpl::GLViewImpl() - : m_window(nullptr) - , m_fFrameZoomFactor(1.0f) - , m_bSupportTouch(false) - , m_lastPointValid(false) - , m_running(false) - , m_winRTWindow(nullptr) - , m_initialized(false) -{ - s_pEglView = this; - _viewName = "Cocos2dxWinRT"; -} - -GLViewImpl::~GLViewImpl() -{ - CC_ASSERT(this == s_pEglView); - s_pEglView = nullptr; - - // TODO: cleanup -} - -bool GLViewImpl::Create(CoreWindow^ window, SwapChainBackgroundPanel^ panel) -{ - bool bRet = false; - m_window = window; - - m_bSupportTouch = true; - m_winRTWindow = ref new WinRTWindow(window); - m_winRTWindow->Initialize(window, panel); - m_initialized = false; - UpdateForWindowSizeChange(); - return bRet; -} - -bool GLViewImpl::isOpenGLReady() -{ - // TODO: need to revisit this - return (m_window.Get() != nullptr); -} - -void GLViewImpl::end() -{ - // TODO: need to implement - -} - -void GLViewImpl::swapBuffers() -{ - m_winRTWindow->swapBuffers(); -} - - -void GLViewImpl::setIMEKeyboardState(bool bOpen) -{ - if(m_winRTWindow) - { - m_winRTWindow->setIMEKeyboardState(bOpen); - } -} - - -void GLViewImpl::resize(int width, int height) -{ - -} - -void GLViewImpl::setFrameZoomFactor(float fZoomFactor) -{ - m_fFrameZoomFactor = fZoomFactor; - resize((int) (_screenSize.width * fZoomFactor), (int) (_screenSize.height * fZoomFactor)); - centerWindow(); - Director::getInstance()->setProjection(Director::getInstance()->getProjection()); -} - - -float GLViewImpl::getFrameZoomFactor() -{ - return m_fFrameZoomFactor; -} - -void GLViewImpl::setFrameSize(float width, float height) -{ - // not implemented in WinRT. Window is always full screen - // GLViewProtocol::setFrameSize(width, height); -} - -void GLViewImpl::centerWindow() -{ - // not implemented in WinRT. Window is always full screen -} - -void GLViewImpl::OnSuspending() -{ - if (m_winRTWindow) - { - m_winRTWindow->OnSuspending(); - } -} - -GLViewImpl* GLViewImpl::sharedOpenGLView() -{ - return s_pEglView; -} - -int GLViewImpl::Run() -{ - m_running = true; - - return 0; -}; - - -void GLViewImpl::OnRendering() -{ - if(m_running && m_initialized) - { - Director::sharedDirector()->mainLoop(); - } -} - -void GLViewImpl::HideKeyboard(Windows::Foundation::Rect r) -{ - return; // not implemented -#if 0 - float height = m_keyboardRect.Height; - float factor = _scaleY / CC_CONTENT_SCALE_FACTOR(); - height = (float)height / factor; - - Rect rect_end(0, 0, 0, 0); - Rect rect_begin(0, 0, _screenSize.width / factor, height); - - IMEKeyboardNotificationInfo info; - info.begin = rect_begin; - info.end = rect_end; - info.duration = 0; - IMEDispatcher::sharedDispatcher()->dispatchKeyboardWillHide(info); - IMEDispatcher::sharedDispatcher()->dispatchKeyboardDidHide(info); -#endif -} - -void GLViewImpl::ShowKeyboard(Windows::Foundation::Rect r) -{ - return; // not implemented -#if 0 - float height = r.Height; - float factor = _scaleY / CC_CONTENT_SCALE_FACTOR(); - height = (float)height / factor; - - Rect rect_begin(0.0f, 0.0f - height, _screenSize.width / factor, height); - Rect rect_end(0.0f, 0.0f, _screenSize.width / factor, height); - - CCIMEKeyboardNotificationInfo info; - info.begin = rect_begin; - info.end = rect_end; - info.duration = 0; - CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardWillShow(info); - CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardDidShow(info); - m_keyboardRect = r; -#endif -} - - -void GLViewImpl::UpdateForWindowSizeChange() -{ - float width = ConvertDipsToPixels(m_window->Bounds.Width); - float height = ConvertDipsToPixels(m_window->Bounds.Height); - - if(!m_initialized) - { - m_initialized = true; - GLView::setFrameSize(width, height); - } - else - { - setFrameSize(width, height); - Size designSize = getDesignResolutionSize(); - GLViewImpl::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::SHOW_ALL); - Director::sharedDirector()->setProjection(Director::sharedDirector()->getProjection()); - } -} - -void GLViewImpl::QueueEvent(std::shared_ptr& event) -{ - std::lock_guard guard(mMutex); - mInputEvents.push(event); -} - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/CCGLViewImpl.h b/cocos/platform/winrt/CCGLViewImpl.h deleted file mode 100644 index 9467a401f75d..000000000000 --- a/cocos/platform/winrt/CCGLViewImpl.h +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EGLVIEWIMPL_WINRT_H__ -#define __CC_EGLVIEWIMPL_WINRT_H__ - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "platform/winrt/CCStdC.h" -#include "platform/winrt/CCGL.h" -#include "platform/CCCommon.h" -#include "platform/winrt/InputEvent.h" -#include "platform/CCGLView.h" - -#include - -#include -#include -#include -#include - -NS_CC_BEGIN - -class CCEGL; -class GLViewImpl; - -ref class WinRTWindow sealed -{ - -public: - WinRTWindow(Windows::UI::Core::CoreWindow^ window); - void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel); - void setIMEKeyboardState(bool bOpen); - void swapBuffers(); - - -private: - cocos2d::Vec2 GetCCPoint(Windows::UI::Core::PointerEventArgs^ args); - - void OnTextKeyDown(Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e); - void OnTextKeyUp(Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e); - - void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); - void OnLogicalDpiChanged(Platform::Object^ sender); - void OnOrientationChanged(Platform::Object^ sender); - void OnDisplayContentsInvalidated(Platform::Object^ sender); - void OnRendering(Platform::Object^ sender, Platform::Object^ args); - void OnSuspending(); - void ResizeWindow(); - - - void ShowKeyboard(Windows::UI::ViewManagement::InputPane^ inputPane, Windows::UI::ViewManagement::InputPaneVisibilityEventArgs^ args); - void HideKeyboard(Windows::UI::ViewManagement::InputPane^ inputPane, Windows::UI::ViewManagement::InputPaneVisibilityEventArgs^ args); - - Platform::Agile m_window; - - Windows::Foundation::Point m_lastPoint; - Windows::Foundation::EventRegistrationToken m_eventToken; - bool m_lastPointValid; - bool m_textInputEnabled; - Microsoft::WRL::ComPtr m_eglWindow; - Windows::UI::Xaml::Controls::TextBox^ m_textBox; - Windows::UI::Xaml::Controls::Button^ m_dummy; - - ESContext m_esContext; - - - friend GLViewImpl; -}; - -class CC_DLL GLViewImpl : public GLView -{ -public: - GLViewImpl(); - virtual ~GLViewImpl(); - - /* override functions */ - virtual bool isOpenGLReady(); - virtual void end(); - virtual void swapBuffers(); - virtual void setFrameSize(float width, float height); - virtual void setIMEKeyboardState(bool bOpen); - void ShowKeyboard(Windows::Foundation::Rect r); - void HideKeyboard(Windows::Foundation::Rect r); - virtual bool Create(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel); - void UpdateForWindowSizeChange(); - void OnRendering(); - void OnSuspending(); - void GLViewImpl::QueueEvent(std::shared_ptr& event); - - void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::PointerEventArgs^ args); - void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnBackKeyPress(); - - -private: - Windows::Foundation::EventRegistrationToken m_eventToken; - Windows::Foundation::Point m_lastPoint; - bool m_lastPointValid; - -public: - - // winrt platform functions - Windows::UI::Core::CoreWindow^ getWindow() { return m_window.Get(); }; - - int Run(); - - void resize(int width, int height); - /* - * Set zoom factor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop. - */ - void setFrameZoomFactor(float fZoomFactor); - float getFrameZoomFactor(); - void centerWindow(); - - - // static function - /** - @brief get the shared main open gl window - */ - static GLViewImpl* sharedOpenGLView(); - -protected: - -private: - Platform::Agile m_window; - bool m_running; - bool m_initialized; - bool m_bSupportTouch; - float m_fFrameZoomFactor; - WinRTWindow^ m_winRTWindow; - Windows::Foundation::Rect m_keyboardRect; - - std::queue> mInputEvents; - std::mutex mMutex; -}; - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#endif // end of __CC_EGLVIEWIMPL_WINRT_H__ diff --git a/cocos/platform/winrt/CCPThreadWinRT.cpp b/cocos/platform/winrt/CCPThreadWinRT.cpp deleted file mode 100644 index 0eae3a39ea09..000000000000 --- a/cocos/platform/winrt/CCPThreadWinRT.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "platform/winrt/CCPThreadWinRT.h" - -NS_CC_BEGIN - -void pthread_mutex_init(pthread_mutex_t* m, void* attributes) { - *m = CreateMutexEx(NULL,FALSE,0,NULL); -} - -int pthread_mutex_lock(pthread_mutex_t* m) { - return WaitForSingleObjectEx(*m,INFINITE,FALSE); -} - -int pthread_mutex_unlock(pthread_mutex_t* m) { - return ReleaseMutex(*m); -} - -void pthread_mutex_destroy(pthread_mutex_t* m) -{ - if(m) - { - CloseHandle(*m); - } -} - - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/CCPThreadWinRT.h b/cocos/platform/winrt/CCPThreadWinRT.h deleted file mode 100644 index 367eb5f99a9a..000000000000 --- a/cocos/platform/winrt/CCPThreadWinRT.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCPTHREADWINRT_H__ -#define __CCPTHREADWINRT_H__ - - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include -#include "platform/CCPlatformMacros.h" - - -NS_CC_BEGIN - -typedef HANDLE pthread_t; -typedef HANDLE pthread_mutex_t; -typedef int pthread_cond_t; -#define pthread_cond_wait(x, y) - -void pthread_mutex_init(pthread_mutex_t* m, void* attributes); - -int pthread_mutex_lock(pthread_mutex_t* m); - -int pthread_mutex_unlock(pthread_mutex_t* m); - -void pthread_mutex_destroy(pthread_mutex_t* m); - -#define pthread_cond_destroy(x) -#define pthread_cond_signal(x) -#define pthread_cond_init(x, y) - -NS_CC_END - - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#endif // __CCPTHREADWINRT_H__ diff --git a/cocos/platform/winrt/CCPlatformDefine-winrt.h b/cocos/platform/winrt/CCPlatformDefine-winrt.h deleted file mode 100644 index e40c5e4437c5..000000000000 --- a/cocos/platform/winrt/CCPlatformDefine-winrt.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCPLATFORMDEFINE_H__ -#define __CCPLATFORMDEFINE_H__ - -#if defined(CC_STATIC) -#define CC_DLL -#else -#if defined(_USRDLL) -#define CC_DLL __declspec(dllexport) -#else /* use a DLL library */ -#define CC_DLL __declspec(dllimport) -#endif -#endif - - - -#include - -#if CC_DISABLE_ASSERT > 0 -#define CC_ASSERT(cond) -#else -#define CC_ASSERT(cond) assert(cond) -#endif -#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam - - -#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/winrt/CCPrecompiledShaders.cpp b/cocos/platform/winrt/CCPrecompiledShaders.cpp deleted file mode 100644 index 4acb74f6f89d..000000000000 --- a/cocos/platform/winrt/CCPrecompiledShaders.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/winrt/CCPrecompiledShaders.h" -#include "platform/winrt/CCWinRTUtils.h" -#include "renderer/CCGLProgram.h" -#include "platform/winrt/sha1.h" - -using namespace Windows::Graphics::Display; -using namespace Windows::Storage; -using namespace Platform; -using namespace Windows::Storage; -using namespace Windows::Storage::Pickers; -using namespace Windows::Storage::Streams; -using namespace concurrency; - -NS_CC_BEGIN - -// singleton stuff -static CCPrecompiledShaders *s_pPrecompiledShaders = nullptr; - -#define SHADER_NAME_PREFIX "s_" - - -CCPrecompiledShaders* CCPrecompiledShaders::getInstance(void) -{ - if (!s_pPrecompiledShaders) - { - s_pPrecompiledShaders = new CCPrecompiledShaders(); - } - - return s_pPrecompiledShaders; -} - -CCPrecompiledShaders::CCPrecompiledShaders(void) - : m_isDirty(false) -{ - Init(); -} - -void CCPrecompiledShaders::Init(void) -{ - m_programs.clear(); - m_precompiledPrograms.clear(); - - // add existing precompiled programs to dictionary - loadPrecompiledPrograms(); -} - -CCPrecompiledShaders::~CCPrecompiledShaders(void) -{ -} - -static std::string computeHash(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) -{ - SHA1Context sha; - int err; - err = SHA1Reset(&sha); - std::string result = ""; - uint8_t hash[SHA1HashSize]; - char hashString[SHA1HashSize * 2 + 1]; - - if(!err) - { - err = SHA1Input(&sha,(const unsigned char *) vShaderByteArray,static_cast(strlen(vShaderByteArray))); - } - if(!err) - { - err = SHA1Input(&sha,(const unsigned char *) fShaderByteArray, static_cast(strlen(fShaderByteArray))); - } - if(!err) - { - char* shader_version = (char*) glGetString(GL_SHADING_LANGUAGE_VERSION); - err = SHA1Input(&sha,(const unsigned char *) shader_version, static_cast(strlen(shader_version))); - } - if(!err) - { - err = SHA1Result(&sha, hash); - } - if(!err) - { - SHA1ConvertMessageToString(hash, hashString); - result = hashString; - } - - return result; -} - -std::string CCPrecompiledShaders::addShaders(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) -{ - return computeHash(vShaderByteArray, fShaderByteArray); -} - - -void CCPrecompiledShaders::loadPrecompiledPrograms() -{ - m_precompiledPrograms.clear(); -#if defined(PRECOMPILED_SHADERS) - for(int i = 0; i < s_numPrograms; i++) - { - PrecompiledProgram* p = new PrecompiledProgram(); - p->key = s_programKeys[i]; - p->program = s_programs[i]; - p->length = s_programLengths[i]; - m_precompiledPrograms[s_programKeys[i]] = p; - } -#endif -} - -void CCPrecompiledShaders::addPrecompiledProgram(const char* key, const unsigned char* program, int programLength) -{ - std::string id = key; - PrecompiledProgram* p = nullptr; - auto it = m_precompiledPrograms.find(id); - if (it != m_precompiledPrograms.end()) - { - p = it->second; - } - else - { - p = new PrecompiledProgram(); - m_precompiledPrograms[id] = p; - } - p->key = key; - p->program = program; - p->length = programLength; -} - -bool CCPrecompiledShaders::loadProgram(GLuint program, const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) -{ - std::string id = computeHash(vShaderByteArray, fShaderByteArray); - - auto it = m_precompiledPrograms.find(id); - if(it == m_precompiledPrograms.end()) - return false; - - glProgramBinaryOES(program, GL_PROGRAM_BINARY_ANGLE, (const GLvoid*) it->second->program, it->second->length); - - return true; -} - -bool CCPrecompiledShaders::addProgram(GLuint program, const std::string& id) -{ - int length; - - auto it = m_programs.find(id); - if(it != m_programs.end()) - return true; - - auto it2 = m_precompiledPrograms.find(id); - if(it2 == m_precompiledPrograms.end()) - m_isDirty = true; - - CompiledProgram* p = new CompiledProgram(); - - glGetProgramiv(program, GL_PROGRAM_BINARY_LENGTH_OES, &length); - p->program.reserve(length); - p->length = length; - p->key = id; - GLenum binaryFormat; - glGetProgramBinaryOES(program, length, NULL, &binaryFormat, p->program.data()); - m_programs[id] = p; - - return true; -} - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -void CCPrecompiledShaders::savePrecompiledPrograms(Windows::Storage::StorageFolder^ folder) -{ - Platform::String ^fileName = L"precompiledshaders.h"; - - auto saveTask = create_task(folder->CreateFileAsync(fileName, CreationCollisionOption::ReplaceExisting)); - - saveTask.then([this](StorageFile^ file) - { - InMemoryRandomAccessStream^ memoryStream = ref new InMemoryRandomAccessStream(); - DataWriter^ dataWriter = ref new DataWriter(memoryStream); - - Platform::String^ programLengths = "const int s_programLengths[] = {"; - Platform::String^ programs = "const unsigned char* s_programs[] = {"; - Platform::String^ programKeys = "const char* s_programKeys[] = {"; - - int numPrograms = 0; - - dataWriter->WriteString(L"#define PRECOMPILED_SHADERS\n\n"); - - - for (auto& iter : m_programs) - { - CompiledProgram* p = (CompiledProgram*)iter.second; - Platform::String^ keyName = PlatformStringFromString(p->key); - Platform::String^ programName = SHADER_NAME_PREFIX + keyName; - - dataWriter->WriteString("const unsigned char "); - dataWriter->WriteString(programName); - dataWriter->WriteString("[] = {\n"); - - char temp[32]; - unsigned char* buffer = p->program.data(); - - for(int i = 0; i < p->length - 1; i++) - { - if(i % 8 == 0) - dataWriter->WriteString("\n"); - sprintf_s(temp, "%3i, ", buffer[i]); - dataWriter->WriteString(PlatformStringFromString(temp)); - } - if((p->length - 1) % 8 == 0) - dataWriter->WriteString("\n"); - sprintf_s(temp, "%3i, ", buffer[p->length - 1]); - dataWriter->WriteString(PlatformStringFromString(temp)); - dataWriter->WriteString("\n};\n\n"); - - if(numPrograms != 0) - { - programLengths += (","); - programs += (","); - programKeys += (","); - } - programLengths += p->length; - programs += programName; - programKeys += "\"" + keyName + "\""; - numPrograms++; - } - - programLengths += "};\n"; - programs += "};\n"; - programKeys += "};\n"; - - Platform::String^ n = ref new Platform::String(L"const int s_numPrograms = "); - n += numPrograms; - n += ";\n"; - - dataWriter->WriteString(n); - dataWriter->WriteString(programLengths); - dataWriter->WriteString(programs); - dataWriter->WriteString(programKeys); - - return FileIO::WriteBufferAsync(file, dataWriter->DetachBuffer()); - }); - -} - -void CCPrecompiledShaders::savePrecompiledShaders() -{ - if(!m_isDirty) - return; - - - FolderPicker^ folderPicker = ref new FolderPicker(); - folderPicker->SuggestedStartLocation = PickerLocationId::Desktop; - folderPicker->FileTypeFilter->Append(".h"); - - auto saveTask = create_task(folderPicker->PickSingleFolderAsync()); - saveTask.then([this](StorageFolder^ folder) - { - if(folder != nullptr) - { - savePrecompiledPrograms(folder); - m_isDirty = false; - } - }); -} -#endif - - - -NS_CC_END - - diff --git a/cocos/platform/winrt/CCPrecompiledShaders.h b/cocos/platform/winrt/CCPrecompiledShaders.h deleted file mode 100644 index 0a13957d8e38..000000000000 --- a/cocos/platform/winrt/CCPrecompiledShaders.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_PRECOMPILED_SHADERS_H__ -#define __CC_PRECOMPILED_SHADERS_H__ - -#include "platform/CCCommon.h" -#include "platform/winrt/CCGL.h" - -#include -#include -#include - -NS_CC_BEGIN - -typedef struct _PrecompiledProgram -{ - const char* key; - const unsigned char* program; - int length; -} PrecompiledProgram; - -typedef struct _CompiledProgram -{ - std::string key; - std::vector program; - int length; -} CompiledProgram; - - -class CC_DLL CCPrecompiledShaders -{ -public: - CCPrecompiledShaders(); - virtual ~CCPrecompiledShaders(); - - /** - @brief Get current precompiled shaders instance. - @return Current precompiled shaders instance pointer. - */ - static CCPrecompiledShaders* getInstance(); - - void addPrecompiledProgram(const char* key, const unsigned char* program, int programLength); - std::string addShaders(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); - bool addProgram(GLuint program, const std::string& id); - - bool loadProgram(GLuint program, const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); - - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - void savePrecompiledShaders(); -#endif - -protected: - void savePrecompiledPrograms(Windows::Storage::StorageFolder^ folder); - void loadPrecompiledPrograms(); - - void Init(); - - std::map m_programs; - std::map m_precompiledPrograms; - - bool m_isDirty; -}; - -NS_CC_END - -#endif // __CC_PRECOMPILED_SHADERS_H__ diff --git a/cocos/platform/winrt/CCStdC.cpp b/cocos/platform/winrt/CCStdC.cpp deleted file mode 100644 index ad3a2d77fc5b..000000000000 --- a/cocos/platform/winrt/CCStdC.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/CCStdC.h" - -int CC_DLL gettimeofday(struct timeval * val, struct timezone *) -{ - if (val) - { - SYSTEMTIME wtm; - GetLocalTime(&wtm); - - struct tm tTm; - tTm.tm_year = wtm.wYear - 1900; - tTm.tm_mon = wtm.wMonth - 1; - tTm.tm_mday = wtm.wDay; - tTm.tm_hour = wtm.wHour; - tTm.tm_min = wtm.wMinute; - tTm.tm_sec = wtm.wSecond; - tTm.tm_isdst = -1; - - val->tv_sec = (long)mktime(&tTm); // time_t is 64-bit on win32 - val->tv_usec = wtm.wMilliseconds * 1000; - } - return 0; -} diff --git a/cocos/platform/winrt/CCStdC.h b/cocos/platform/winrt/CCStdC.h deleted file mode 100644 index 91a5ab102a6e..000000000000 --- a/cocos/platform/winrt/CCStdC.h +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_STD_C_H__ -#define __CC_STD_C_H__ - -#include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - - -#include "platform/CCPlatformMacros.h" -#include -#include -#include - -#ifndef __SSIZE_T -#define __SSIZE_T -typedef SSIZE_T ssize_t; -#endif // __SSIZE_T - -// for math.h on win32 platform - -#if !defined(_USE_MATH_DEFINES) - #define _USE_MATH_DEFINES // make M_PI can be use -#endif - -#if _MSC_VER < 1900 -#ifndef snprintf -#define snprintf _snprintf -#endif -#endif - -#include -#include -#include -#include -#include -#include - -#ifndef M_PI - #define M_PI 3.14159265358 -#endif -#ifndef M_PI_2 - #define M_PI_2 1.57079632679 -#endif - - -// for MIN MAX and sys/time.h on win32 platform -#ifndef NOMINMAX - #define NOMINMAX -#endif - -#ifndef MIN -#define MIN(x,y) (((x) > (y)) ? (y) : (x)) -#endif // MIN - -#ifndef MAX -#define MAX(x,y) (((x) < (y)) ? (y) : (x)) -#endif // MAX - -#include - -#ifdef WINRT_NO_WINSOCK -#undef timeval -struct timeval -{ - long tv_sec; // seconds - long tv_usec; // microSeconds -}; -#else -// Structure timeval has define in winsock.h, include windows.h for it. -#define _WINSOCKAPI_ -#include -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif -#endif - -struct timezone -{ - int tz_minuteswest; - int tz_dsttime; -}; - -int CC_DLL gettimeofday(struct timeval *, struct timezone *); - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#endif // __CC_STD_C_H__ - diff --git a/cocos/platform/winrt/CCWinRTUtils.cpp b/cocos/platform/winrt/CCWinRTUtils.cpp deleted file mode 100644 index 2b5ea35ba833..000000000000 --- a/cocos/platform/winrt/CCWinRTUtils.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#include "platform/winrt/CCWinRTUtils.h" -#include -#include -#include -#include -#include -#include "base/ccMacros.h" -#include "platform/CCPlatformMacros.h" -#include "platform/CCFileUtils.h" -#include "base/CCUserDefault.h" - -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; - -NS_CC_BEGIN - -using namespace Windows::Graphics::Display; -using namespace Windows::Storage; -using namespace concurrency; -using namespace Platform; -using namespace Windows::Storage; -using namespace Windows::Storage::Pickers; -using namespace Windows::Storage::Streams; -using namespace Windows::Networking::Connectivity; - -bool isWindowsPhone() -{ -#if _MSC_VER >= 1900 - if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) - return true; - else - return false; -#elif (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - return true; -#else - return false; -#endif -} - -CC_DEPRECATED_ATTRIBUTE std::wstring CC_DLL CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len /*= -1*/) -{ - if (len == -1) - { - return StringUtf8ToWideChar(pszUtf8Str); - } - else - { - std::wstring ret; - do - { - if (!pszUtf8Str || !len) break; - - // get UTF16 string length - int wLen = MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, 0, 0); - if (0 == wLen || 0xFFFD == wLen) break; - - // convert string - wchar_t * pwszStr = new wchar_t[wLen + 1]; - if (!pwszStr) break; - pwszStr[wLen] = 0; - MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, pwszStr, wLen + 1); - ret = pwszStr; - CC_SAFE_DELETE_ARRAY(pwszStr); - } while (0); - return ret; - } -} - -CC_DEPRECATED_ATTRIBUTE std::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr) -{ - return StringWideCharToUtf8(pwszStr); -} - - -std::wstring StringUtf8ToWideChar(const std::string& strUtf8) -{ - std::wstring ret; - if (!strUtf8.empty()) - { - int nNum = MultiByteToWideChar(CP_UTF8, 0, strUtf8.c_str(), -1, nullptr, 0); - if (nNum) - { - WCHAR* wideCharString = new WCHAR[nNum + 1]; - wideCharString[0] = 0; - - nNum = MultiByteToWideChar(CP_UTF8, 0, strUtf8.c_str(), -1, wideCharString, nNum + 1); - - ret = wideCharString; - delete[] wideCharString; - } - else - { - CCLOG("Wrong convert to WideChar code:0x%x", GetLastError()); - } - } - return ret; -} - -std::string StringWideCharToUtf8(const std::wstring& strWideChar) -{ - std::string ret; - if (!strWideChar.empty()) - { - int nNum = WideCharToMultiByte(CP_UTF8, 0, strWideChar.c_str(), -1, nullptr, 0, nullptr, FALSE); - if (nNum) - { - char* utf8String = new char[nNum + 1]; - utf8String[0] = 0; - - nNum = WideCharToMultiByte(CP_UTF8, 0, strWideChar.c_str(), -1, utf8String, nNum + 1, nullptr, FALSE); - - ret = utf8String; - delete[] utf8String; - } - else - { - CCLOG("Wrong convert to Utf8 code:0x%x", GetLastError()); - } - } - - return ret; -} - -std::string PlatformStringToString(Platform::String^ s) { - return StringWideCharToUtf8(std::wstring(s->Data())); -} - -Platform::String^ PlatformStringFromString(const std::string& s) -{ - std::wstring ws = StringUtf8ToWideChar(s); - return ref new Platform::String(ws.data(), static_cast(ws.length())); -} - -#if 0 -// Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. -float ConvertDipsToPixels(float dips) -{ - static const float dipsPerInch = 96.0f; - return floor(dips * DisplayProperties::LogicalDpi / dipsPerInch + 0.5f); // Round to nearest integer. -} - -float getScaledDPIValue(float v) { - auto dipFactor = DisplayProperties::LogicalDpi / 96.0f; - return v * dipFactor; -} -#endif - -void CC_DLL CCLogIPAddresses() -{ - auto hostnames = NetworkInformation::GetHostNames(); - int length = hostnames->Size; - - for(int i = 0; i < length; i++) - { - auto hn = hostnames->GetAt(i); - if (hn->IPInformation != nullptr) - { - std::string s = PlatformStringToString(hn->DisplayName); - log("IP Address: %s:", s.c_str()); - } - } -} - -std::string CC_DLL getDeviceIPAddresses() -{ - std::stringstream result; - - auto hostnames = NetworkInformation::GetHostNames(); - int length = hostnames->Size; - - for(int i = 0; i < length; i++) - { - auto hn = hostnames->GetAt(i); - if (hn->IPInformation != nullptr) - { - result << PlatformStringToString(hn->DisplayName) << std::endl; - } - } - - return result.str(); -} - -Platform::Object^ findXamlElement(Platform::Object^ parent, Platform::String^ name) -{ - if (parent == nullptr || name == nullptr || name->Length() == 0) - { - return nullptr; - } - - FrameworkElement^ element = dynamic_cast(parent); - if (element == nullptr) - { - return nullptr; - } - - if (element->Name == name) - { - return element; - } - - Panel^ panel = dynamic_cast(element); - if (panel == nullptr) - { - return nullptr; - } - - int count = panel->Children->Size; - for (int i = 0; i < count; i++) - { - auto result = findXamlElement(panel->Children->GetAt(i), name); - if (result != nullptr) - { - return result; - } - } - - return nullptr; -} - - -bool removeXamlElement(Platform::Object^ parent, Platform::Object^ element) -{ - Panel^ panel = dynamic_cast(parent); - if (panel == nullptr) - { - return false; - } - - UIElement^ uiElement = dynamic_cast(element); - if (uiElement == nullptr) - { - return false; - } - - unsigned int index; - if (!panel->Children->IndexOf(uiElement, &index)) - { - return false; - } - - panel->Children->RemoveAt(index); - - return true; -} - -bool replaceXamlElement(Platform::Object^ parent, Platform::Object^ add, Platform::Object^ remove) -{ - Panel^ panel = dynamic_cast(parent); - if (panel == nullptr) - { - return false; - } - - UIElement^ addElement = dynamic_cast(add); - if (addElement == nullptr) - { - return false; - } - - UIElement^ removeElement = dynamic_cast(remove); - if (removeElement == nullptr) - { - return false; - } - - unsigned int index; - if (!panel->Children->IndexOf(removeElement, &index)) - { - return false; - } - - panel->Children->RemoveAt(index); - panel->Children->InsertAt(index, addElement); - - return true; -} - -// Function that reads from a binary file asynchronously. -Concurrency::task^> ReadDataAsync(Platform::String^ path) -{ - using namespace Windows::Storage; - using namespace Concurrency; - - return create_task(StorageFile::GetFileFromPathAsync(path)).then([&](StorageFile^ f) - { - return FileIO::ReadBufferAsync(f); - - }).then([] (Streams::IBuffer^ fileBuffer) -> Platform::Array^ - { - auto fileData = ref new Platform::Array(fileBuffer->Length); - Streams::DataReader::FromBuffer(fileBuffer)->ReadBytes(fileData); - return fileData; - }); -} - -std::string computeHashForFile(const std::string& filePath) -{ - std::string ret = filePath; - size_t pos = ret.find_last_of('/'); - - if (pos != std::string::npos) { - ret = ret.substr(pos); - } - - pos = ret.find_last_of('.'); - - if (pos != std::string::npos) { - ret = ret.substr(0, pos); - } - - CREATEFILE2_EXTENDED_PARAMETERS extParams = { 0 }; - extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; - extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS; - extParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; - extParams.dwSize = sizeof(extParams); - extParams.hTemplateFile = nullptr; - extParams.lpSecurityAttributes = nullptr; - - Microsoft::WRL::Wrappers::FileHandle file(CreateFile2(std::wstring(filePath.begin(), filePath.end()).c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extParams)); - - if (file.Get() != INVALID_HANDLE_VALUE) { - FILE_BASIC_INFO fInfo = { 0 }; - if (GetFileInformationByHandleEx(file.Get(), FileBasicInfo, &fInfo, sizeof(FILE_BASIC_INFO))) { - std::stringstream ss; - ss << ret << "_"; - ss << fInfo.CreationTime.QuadPart; - ss << fInfo.ChangeTime.QuadPart; - ret = ss.str(); - } - } - - return ret; -} - -bool createMappedCacheFile(const std::string& srcFilePath, std::string& cacheFilePath, const std::string& ext /* = "" */) -{ - bool ret = false; - auto folderPath = FileUtils::getInstance()->getWritablePath(); - cacheFilePath = folderPath + computeHashForFile(srcFilePath) + ext; - std::string prevFile = UserDefault::getInstance()->getStringForKey(srcFilePath.c_str()); - - if (prevFile == cacheFilePath) { - ret = FileUtils::getInstance()->isFileExist(cacheFilePath); - } - else { - FileUtils::getInstance()->removeFile(prevFile); - } - - UserDefault::getInstance()->setStringForKey(srcFilePath.c_str(), cacheFilePath); - return ret; -} - -void destroyMappedCacheFile(const std::string& key) -{ - std::string value = UserDefault::getInstance()->getStringForKey(key.c_str()); - - if (!value.empty()) { - FileUtils::getInstance()->removeFile(value); - } - - UserDefault::getInstance()->setStringForKey(key.c_str(), ""); -} - -NS_CC_END diff --git a/cocos/platform/winrt/CCWinRTUtils.h b/cocos/platform/winrt/CCWinRTUtils.h deleted file mode 100644 index d29e9f673b86..000000000000 --- a/cocos/platform/winrt/CCWinRTUtils.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCWINRT_UTILS_H__ -#define __CCWINRT_UTILS_H__ - -#include "platform/CCPlatformMacros.h" -#include - -#include - -NS_CC_BEGIN - -bool isWindowsPhone(); - -CC_DEPRECATED_ATTRIBUTE std::wstring CC_DLL CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len = -1); -CC_DEPRECATED_ATTRIBUTE std::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr); - -std::wstring CC_DLL StringUtf8ToWideChar(const std::string& strUtf8); -std::string CC_DLL StringWideCharToUtf8(const std::wstring& strWideChar); - -Platform::Object^ findXamlElement(Platform::Object^ parent, Platform::String^ name); -bool removeXamlElement(Platform::Object^ parent, Platform::Object^ element); -bool replaceXamlElement(Platform::Object^ parent, Platform::Object^ add, Platform::Object^ remove); - -std::string PlatformStringToString(Platform::String^ s); -Platform::String^ PlatformStringFromString(const std::string& s); - -Concurrency::task^> ReadDataAsync(Platform::String^ path); - -void CC_DLL CCLogIPAddresses(); - -std::string CC_DLL getDeviceIPAddresses(); - -std::string computeHashForFile(const std::string& filePath); - -// creates a cache file path corresponding to given source file. -// srcFilePath - source file. -// cacheFilePath - cache file path to be used to save cache. -// return true if file already exists -bool createMappedCacheFile(/*In*/ const std::string& srcFilePath, /*Out*/ std::string& cacheFilePath, /*Optional*/ const std::string& ext = ""); -void destroyMappedCacheFile(const std::string& key); - -NS_CC_END - -#endif // __CCWINRT_UTILS_H__ diff --git a/cocos/platform/winrt/InputEvent.cpp b/cocos/platform/winrt/InputEvent.cpp deleted file mode 100644 index 168bc89643c1..000000000000 --- a/cocos/platform/winrt/InputEvent.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/winrt/InputEvent.h" -#include "platform/winrt/CCWinRTUtils.h" -#include "platform/winrt/CCGLViewImpl-winrt.h" -#include "base/CCEventAcceleration.h" -#include "base/CCDirector.h" -#include "base/CCEventDispatcher.h" -#include "base/CCIMEDispatcher.h" - -NS_CC_BEGIN - -AccelerometerEvent::AccelerometerEvent(const Acceleration& event) - : m_event(event) -{ - -} - -void AccelerometerEvent::execute() -{ - auto dispatcher = Director::getInstance()->getEventDispatcher(); - cocos2d::EventAcceleration accEvent(m_event); - dispatcher->dispatchEvent(&accEvent); -} - - -PointerEvent::PointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args) - : m_type(type), m_args(args) -{ - -} - -void PointerEvent::execute() -{ - switch(m_type) - { - case PointerEventType::PointerPressed: - GLViewImpl::sharedOpenGLView()->OnPointerPressed(m_args.Get()); - break; - case PointerEventType::PointerMoved: - GLViewImpl::sharedOpenGLView()->OnPointerMoved(m_args.Get()); - break; - case PointerEventType::PointerReleased: - GLViewImpl::sharedOpenGLView()->OnPointerReleased(m_args.Get()); - break; - case cocos2d::MousePressed: - GLViewImpl::sharedOpenGLView()->OnMousePressed(m_args.Get()); - break; - case cocos2d::MouseMoved: - GLViewImpl::sharedOpenGLView()->OnMouseMoved(m_args.Get()); - break; - case cocos2d::MouseReleased: - GLViewImpl::sharedOpenGLView()->OnMouseReleased(m_args.Get()); - break; - case cocos2d::MouseWheelChanged: - GLViewImpl::sharedOpenGLView()->OnMouseWheelChanged(m_args.Get()); - break; - } -} - -KeyboardEvent::KeyboardEvent(Cocos2dKeyEvent type) - : m_type(type), m_text(nullptr) -{ - -} - -KeyboardEvent::KeyboardEvent(Cocos2dKeyEvent type, Platform::String^ text) - : m_type(type), m_text(text) -{ - -} - -void KeyboardEvent::execute() -{ - switch(m_type) - { - case Cocos2dKeyEvent::Text: - { - std::string utf8String = PlatformStringToString(m_text.Get()); - IMEDispatcher::sharedDispatcher()->dispatchInsertText(utf8String.c_str(), utf8String.size()); - break; - } - - default: - switch (m_type) - { - case Cocos2dKeyEvent::Escape: - //Director::getInstance()()->getKeypadDispatcher()->dispatchKeypadMSG(kTypeBackClicked); - break; - case Cocos2dKeyEvent::Back: - IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); - break; - case Cocos2dKeyEvent::Enter: - IMEDispatcher::sharedDispatcher()->dispatchInsertText("\n", 1); - break; - default: - break; - } - break; - } -} - -WinRTKeyboardEvent::WinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) - : m_type(type), m_key(args) -{ -} - -void WinRTKeyboardEvent::execute() -{ - GLViewImpl::sharedOpenGLView()->OnWinRTKeyboardEvent(m_type, m_key.Get()); -} - -BackButtonEvent::BackButtonEvent() -{ - -} - -void BackButtonEvent::execute() -{ - GLViewImpl::sharedOpenGLView()->OnBackKeyPress(); -} - -CustomInputEvent::CustomInputEvent(const std::function& fun) -: m_fun(fun) -{ -} - -void CustomInputEvent::execute() -{ - m_fun(); -} - -UIEditBoxEvent::UIEditBoxEvent(Platform::Object^ sender, Platform::String^ text, Windows::Foundation::EventHandler^ handle) - : m_sender(sender) - , m_text(text) - , m_handler(handle) -{ - -} - -void UIEditBoxEvent::execute() -{ - if (m_handler.Get()) - { - m_handler.Get()->Invoke(m_sender.Get(), m_text.Get()); - } -} - -UIEditBoxEndEvent::UIEditBoxEndEvent(Platform::Object^ sender, Platform::String^ text, int action, Windows::Foundation::EventHandler^ handle) - : m_sender(sender) - , m_text(text) - , m_action(action) - , m_handler(handle) -{ - -} - -void UIEditBoxEndEvent::execute() -{ - if (m_handler.Get()) - { - auto args = ref new EndEventArgs(m_action, m_text.Get()); - m_handler.Get()->Invoke(m_sender.Get(), args); - } -} - -NS_CC_END - - diff --git a/cocos/platform/winrt/InputEvent.h b/cocos/platform/winrt/InputEvent.h deleted file mode 100644 index fda9cb4fde33..000000000000 --- a/cocos/platform/winrt/InputEvent.h +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __WINRT_INPUT_EVENT__ -#define __WINRT_INPUT_EVENT__ - -#include "platform/CCPlatformMacros.h" -#include "platform/winrt/InputEventTypes.h" -#include "base/ccTypes.h" -#include - -NS_CC_BEGIN - - -enum PointerEventType -{ - PointerPressed, - PointerMoved, - PointerReleased, - MousePressed, - MouseMoved, - MouseReleased, - MouseWheelChanged, -}; -enum MouseButton -{ - Left = 0, - Right = 1, - Middle = 2, - None -}; - -class CC_DLL InputEvent -{ -public: - InputEvent() {}; - virtual ~InputEvent() {}; - virtual void execute() = 0; -}; - - -class CC_DLL AccelerometerEvent : public InputEvent -{ -public: - AccelerometerEvent(const cocos2d::Acceleration& event); - virtual void execute(); - -private: - cocos2d::Acceleration m_event; -}; - -class CC_DLL PointerEvent : public InputEvent -{ -public: - PointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); - virtual void execute(); - - -private: - PointerEventType m_type; - Platform::Agile m_args; -}; - -class CC_DLL KeyboardEvent : public InputEvent - -{ -public: - KeyboardEvent(Cocos2dKeyEvent type); - KeyboardEvent(Cocos2dKeyEvent type, Platform::String^ text); - virtual void execute(); - -private: - Cocos2dKeyEvent m_type; - Platform::Agile m_text; -}; - -enum WinRTKeyboardEventType -{ - KeyPressed, - KeyReleased, -}; - -class CC_DLL WinRTKeyboardEvent : public InputEvent -{ -public: - WinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); - virtual void execute(); - -private: - WinRTKeyboardEventType m_type; - Platform::Agile m_key; -}; - - -class CC_DLL BackButtonEvent : public InputEvent -{ -public: - BackButtonEvent(); - virtual void execute(); -}; - -class CC_DLL CustomInputEvent : public InputEvent -{ -public: - CustomInputEvent(const std::function&); - virtual void execute(); -private: - std::function m_fun; -}; - -class UIEditBoxEvent : public cocos2d::InputEvent -{ -public: - UIEditBoxEvent(Platform::Object^ sender, Platform::String^ text, Windows::Foundation::EventHandler^ handle); - - virtual void execute(); - -protected: - Platform::Agile m_sender; - Platform::Agile m_text; - Platform::Agile^> m_handler; -}; - -ref class EndEventArgs sealed { -public: - EndEventArgs(int action, Platform::String^ text) : m_text(text), m_action(action) {} - int GetAction() { return m_action; } - Platform::String^ GetText() { return m_text; } -private: - int m_action; - Platform::String^ m_text; -}; - -class UIEditBoxEndEvent : public cocos2d::InputEvent -{ -public: - UIEditBoxEndEvent(Platform::Object^ sender, Platform::String^ text, int action, Windows::Foundation::EventHandler^ handle); - virtual void execute(); -protected: - int m_action; - Platform::Agile m_sender; - Platform::Agile m_text; - Platform::Agile^> m_handler; -}; - -NS_CC_END - -#endif // #ifndef __WINRT_INPUT_EVENT__ - diff --git a/cocos/platform/winrt/InputEventTypes.h b/cocos/platform/winrt/InputEventTypes.h deleted file mode 100644 index d9385b1a09cd..000000000000 --- a/cocos/platform/winrt/InputEventTypes.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __INPUT_EVENT_TYPES__ -#define __INPUT_EVENT_TYPES__ - - -NS_CC_BEGIN - - -enum class Cocos2dKeyEvent : int -{ - Text, - Escape, - Back, - Enter -}; - -NS_CC_END - - -#endif // #ifndef __INPUT_EVENT_TYPES__ - diff --git a/cocos/platform/winrt/Keyboard-winrt.cpp b/cocos/platform/winrt/Keyboard-winrt.cpp deleted file mode 100644 index e2a37843e255..000000000000 --- a/cocos/platform/winrt/Keyboard-winrt.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "platform/winrt/Keyboard-winrt.h" -#include "base/CCEventKeyboard.h" -#include "platform/winrt/CCGLViewImpl-winrt.h" -#include "base/CCIMEDispatcher.h" -#include "base/CCDirector.h" -#include "base/CCEventDispatcher.h" - -using namespace cocos2d; -using namespace Platform; -using namespace Windows::System; -using namespace Windows::System::Threading; -using namespace Windows::UI::Core; -using namespace Windows::UI::Input; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Input; - -NS_CC_BEGIN - -struct keyCodeItem -{ - int key; - EventKeyboard::KeyCode keyCode; -}; - -static std::map g_keyCodeMap; - -// http://www.kbdedit.com/manual/low_level_vk_list.html -// https://msdn.microsoft.com/library/windows/apps/windows.system.virtualkey.aspx - -static keyCodeItem g_keyCodeStructArray [] = { - /* The unknown key */ - { (int) VirtualKey::None, EventKeyboard::KeyCode::KEY_NONE }, - /* Printable keys */ - { (int) VirtualKey::Space, EventKeyboard::KeyCode::KEY_SPACE }, - { (int) VK_OEM_7, EventKeyboard::KeyCode::KEY_APOSTROPHE }, - { (int) VK_OEM_COMMA, EventKeyboard::KeyCode::KEY_COMMA }, - { (int) VK_OEM_MINUS, EventKeyboard::KeyCode::KEY_MINUS }, - { (int) VK_OEM_PERIOD, EventKeyboard::KeyCode::KEY_PERIOD }, - { (int) VK_OEM_2, EventKeyboard::KeyCode::KEY_SLASH }, - { (int) VK_OEM_3, EventKeyboard::KeyCode::KEY_TILDE }, - - { (int) VirtualKey::Number0, EventKeyboard::KeyCode::KEY_0 }, - { (int) VirtualKey::Number1, EventKeyboard::KeyCode::KEY_1 }, - { (int) VirtualKey::Number2, EventKeyboard::KeyCode::KEY_2 }, - { (int) VirtualKey::Number3, EventKeyboard::KeyCode::KEY_3 }, - { (int) VirtualKey::Number4, EventKeyboard::KeyCode::KEY_4 }, - { (int) VirtualKey::Number5, EventKeyboard::KeyCode::KEY_5 }, - { (int) VirtualKey::Number6, EventKeyboard::KeyCode::KEY_6 }, - { (int) VirtualKey::Number7, EventKeyboard::KeyCode::KEY_7 }, - { (int) VirtualKey::Number8, EventKeyboard::KeyCode::KEY_8 }, - { (int) VirtualKey::Number9, EventKeyboard::KeyCode::KEY_9 }, - { (int) VK_OEM_1, EventKeyboard::KeyCode::KEY_SEMICOLON }, - { (int) VK_OEM_PLUS, EventKeyboard::KeyCode::KEY_EQUAL }, - { (int) VirtualKey::A, EventKeyboard::KeyCode::KEY_A }, - { (int) VirtualKey::B, EventKeyboard::KeyCode::KEY_B }, - { (int) VirtualKey::C, EventKeyboard::KeyCode::KEY_C }, - { (int) VirtualKey::D, EventKeyboard::KeyCode::KEY_D }, - { (int) VirtualKey::E, EventKeyboard::KeyCode::KEY_E }, - { (int) VirtualKey::F, EventKeyboard::KeyCode::KEY_F }, - { (int) VirtualKey::G, EventKeyboard::KeyCode::KEY_G }, - { (int) VirtualKey::H, EventKeyboard::KeyCode::KEY_H }, - { (int) VirtualKey::I, EventKeyboard::KeyCode::KEY_I }, - { (int) VirtualKey::J, EventKeyboard::KeyCode::KEY_J }, - { (int) VirtualKey::K, EventKeyboard::KeyCode::KEY_K }, - { (int) VirtualKey::L, EventKeyboard::KeyCode::KEY_L }, - { (int) VirtualKey::M, EventKeyboard::KeyCode::KEY_M }, - { (int) VirtualKey::N, EventKeyboard::KeyCode::KEY_N }, - { (int) VirtualKey::O, EventKeyboard::KeyCode::KEY_O }, - { (int) VirtualKey::P, EventKeyboard::KeyCode::KEY_P }, - { (int) VirtualKey::Q, EventKeyboard::KeyCode::KEY_Q }, - { (int) VirtualKey::R, EventKeyboard::KeyCode::KEY_R }, - { (int) VirtualKey::S, EventKeyboard::KeyCode::KEY_S }, - { (int) VirtualKey::T, EventKeyboard::KeyCode::KEY_T }, - { (int) VirtualKey::U, EventKeyboard::KeyCode::KEY_U }, - { (int) VirtualKey::V, EventKeyboard::KeyCode::KEY_V }, - { (int) VirtualKey::W, EventKeyboard::KeyCode::KEY_W }, - { (int) VirtualKey::X, EventKeyboard::KeyCode::KEY_X }, - { (int) VirtualKey::Y, EventKeyboard::KeyCode::KEY_Y }, - { (int) VirtualKey::Z, EventKeyboard::KeyCode::KEY_Z }, - { VK_OEM_4, EventKeyboard::KeyCode::KEY_LEFT_BRACKET }, - { VK_OEM_5, EventKeyboard::KeyCode::KEY_BACK_SLASH }, - { VK_OEM_6, EventKeyboard::KeyCode::KEY_RIGHT_BRACKET }, - // { GLFW_KEY_GRAVE_ACCENT , EventKeyboard::KeyCode::KEY_GRAVE }, - - /* Function keys */ - { (int) VirtualKey::Escape, EventKeyboard::KeyCode::KEY_ESCAPE }, - { (int) VirtualKey::Enter, EventKeyboard::KeyCode::KEY_ENTER }, - { (int) VirtualKey::Tab, EventKeyboard::KeyCode::KEY_TAB }, - { (int) VirtualKey::Back, EventKeyboard::KeyCode::KEY_BACKSPACE }, - { (int) VirtualKey::Insert, EventKeyboard::KeyCode::KEY_INSERT }, - { (int) VirtualKey::Delete, EventKeyboard::KeyCode::KEY_DELETE }, - { (int) VirtualKey::Right, EventKeyboard::KeyCode::KEY_RIGHT_ARROW }, - { (int) VirtualKey::Left, EventKeyboard::KeyCode::KEY_LEFT_ARROW }, - { (int) VirtualKey::Down, EventKeyboard::KeyCode::KEY_DOWN_ARROW }, - { (int) VirtualKey::Up, EventKeyboard::KeyCode::KEY_UP_ARROW }, - { VK_PRIOR, EventKeyboard::KeyCode::KEY_PG_UP }, - { VK_NEXT, EventKeyboard::KeyCode::KEY_PG_DOWN }, - { VK_HOME, EventKeyboard::KeyCode::KEY_HOME }, - { VK_END, EventKeyboard::KeyCode::KEY_END }, - { VK_CAPITAL, EventKeyboard::KeyCode::KEY_CAPS_LOCK }, - { VK_SCROLL, EventKeyboard::KeyCode::KEY_SCROLL_LOCK }, - { VK_NUMLOCK, EventKeyboard::KeyCode::KEY_NUM_LOCK }, - { VK_SNAPSHOT, EventKeyboard::KeyCode::KEY_PRINT }, - { VK_PAUSE, EventKeyboard::KeyCode::KEY_PAUSE }, - { (int) VirtualKey::F1, EventKeyboard::KeyCode::KEY_F1 }, - { (int) VirtualKey::F2, EventKeyboard::KeyCode::KEY_F2 }, - { (int) VirtualKey::F3, EventKeyboard::KeyCode::KEY_F3 }, - { (int) VirtualKey::F4, EventKeyboard::KeyCode::KEY_F4 }, - { (int) VirtualKey::F5, EventKeyboard::KeyCode::KEY_F5 }, - { (int) VirtualKey::F6, EventKeyboard::KeyCode::KEY_F6 }, - { (int) VirtualKey::F7, EventKeyboard::KeyCode::KEY_F7 }, - { (int) VirtualKey::F8, EventKeyboard::KeyCode::KEY_F8 }, - { (int) VirtualKey::F9, EventKeyboard::KeyCode::KEY_F9 }, - { (int) VirtualKey::F10, EventKeyboard::KeyCode::KEY_F10 }, - { (int) VirtualKey::F11, EventKeyboard::KeyCode::KEY_F11 }, - { (int) VirtualKey::F12, EventKeyboard::KeyCode::KEY_F12 }, - { (int) VirtualKey::F13, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F14, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F15, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F16, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F17, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F18, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F19, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F20, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F21, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F22, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F23, EventKeyboard::KeyCode::KEY_NONE }, - { (int) VirtualKey::F24, EventKeyboard::KeyCode::KEY_NONE }, - - { (int) VirtualKey::NumberPad0, EventKeyboard::KeyCode::KEY_0 }, - { (int) VirtualKey::NumberPad1, EventKeyboard::KeyCode::KEY_1 }, - { (int) VirtualKey::NumberPad2, EventKeyboard::KeyCode::KEY_2 }, - { (int) VirtualKey::NumberPad3, EventKeyboard::KeyCode::KEY_3 }, - { (int) VirtualKey::NumberPad4, EventKeyboard::KeyCode::KEY_4 }, - { (int) VirtualKey::NumberPad5, EventKeyboard::KeyCode::KEY_5 }, - { (int) VirtualKey::NumberPad6, EventKeyboard::KeyCode::KEY_6 }, - { (int) VirtualKey::NumberPad7, EventKeyboard::KeyCode::KEY_7 }, - { (int) VirtualKey::NumberPad8, EventKeyboard::KeyCode::KEY_8 }, - { (int) VirtualKey::NumberPad9, EventKeyboard::KeyCode::KEY_9 }, -#if 0 - { GLFW_KEY_KP_1, EventKeyboard::KeyCode::KEY_1 }, - { GLFW_KEY_KP_2, EventKeyboard::KeyCode::KEY_2 }, - { GLFW_KEY_KP_3, EventKeyboard::KeyCode::KEY_3 }, - { GLFW_KEY_KP_4, EventKeyboard::KeyCode::KEY_4 }, - { GLFW_KEY_KP_5, EventKeyboard::KeyCode::KEY_5 }, - { GLFW_KEY_KP_6, EventKeyboard::KeyCode::KEY_6 }, - { GLFW_KEY_KP_7, EventKeyboard::KeyCode::KEY_7 }, - { GLFW_KEY_KP_8, EventKeyboard::KeyCode::KEY_8 }, - { GLFW_KEY_KP_9, EventKeyboard::KeyCode::KEY_9 }, -#endif - { (int) VirtualKey::Decimal, EventKeyboard::KeyCode::KEY_PERIOD }, - { (int) VirtualKey::Divide, EventKeyboard::KeyCode::KEY_KP_DIVIDE }, - { (int) VirtualKey::Multiply, EventKeyboard::KeyCode::KEY_KP_MULTIPLY }, - { (int) VirtualKey::Subtract, EventKeyboard::KeyCode::KEY_KP_MINUS }, - { (int) VirtualKey::Add, EventKeyboard::KeyCode::KEY_KP_PLUS }, - //{ GLFW_KEY_KP_ENTER , EventKeyboard::KeyCode::KEY_KP_ENTER }, - //{ GLFW_KEY_KP_EQUAL , EventKeyboard::KeyCode::KEY_EQUAL }, - { (int) VirtualKey::Shift, EventKeyboard::KeyCode::KEY_LEFT_SHIFT }, - { (int) VirtualKey::Control, EventKeyboard::KeyCode::KEY_LEFT_CTRL }, - { VK_LMENU, EventKeyboard::KeyCode::KEY_LEFT_ALT }, - { (int) VirtualKey::LeftWindows, EventKeyboard::KeyCode::KEY_HYPER }, - { (int) VirtualKey::RightShift, EventKeyboard::KeyCode::KEY_RIGHT_SHIFT }, - { (int) VirtualKey::RightControl, EventKeyboard::KeyCode::KEY_RIGHT_CTRL }, - { VK_RMENU, EventKeyboard::KeyCode::KEY_RIGHT_ALT }, - { (int) VirtualKey::RightWindows, EventKeyboard::KeyCode::KEY_HYPER }, - { (int) VirtualKey::Menu, EventKeyboard::KeyCode::KEY_MENU }, - { (int) VirtualKey::LeftMenu, EventKeyboard::KeyCode::KEY_MENU }, - { (int) VirtualKey::RightMenu, EventKeyboard::KeyCode::KEY_MENU } -}; - -KeyBoardWinRT::KeyBoardWinRT() -{ - g_keyCodeMap.clear(); - for (auto& item : g_keyCodeStructArray) - { - g_keyCodeMap[item.key] = item.keyCode; - } -} - -KeyBoardWinRT::~KeyBoardWinRT() -{ - -} - - -void KeyBoardWinRT::ShowKeyboard(Platform::String^ text) -{ - auto panel = cocos2d::GLViewImpl::sharedOpenGLView()->getPanel(); - auto dispatcher = cocos2d::GLViewImpl::sharedOpenGLView()->getDispatcher(); - - if (dispatcher && panel) - { - // run on main UI thread - dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text, panel]() - { - if (m_textBox == nullptr) - { - m_useInputMethod = false; - m_textBox = ref new TextBox(); - m_textBox->Opacity = 0.0; - m_textBox->Width = 1; - m_textBox->Height = 1; - m_textBox->TextChanged += ref new TextChangedEventHandler(this, &KeyBoardWinRT::OnTextChanged); - m_textBox->TextCompositionStarted += ref new Windows::Foundation::TypedEventHandler(this, &KeyBoardWinRT::OnTextCompositionStarted); - - m_textBox->TextCompositionEnded += ref new Windows::Foundation::TypedEventHandler(this, &KeyBoardWinRT::OnTextCompositionEnded); -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - // Need to use InputScopeNameValue::Search to prevent auto-capitalize - m_textBox->InputScope = ref new InputScope(); - auto n = m_textBox->InputScope->Names; - n->Append(ref new InputScopeName(InputScopeNameValue::Search)); -#endif - panel->Children->Append(m_textBox); - } - m_textBox->SelectionLength = 0; - m_textBox->SelectionStart = 32768; - m_textBox->Focus(FocusState::Programmatic); - })); - } -} - -void KeyBoardWinRT::HideKeyboard(Platform::String^ text) -{ - auto panel = cocos2d::GLViewImpl::sharedOpenGLView()->getPanel(); - auto dispatcher = cocos2d::GLViewImpl::sharedOpenGLView()->getDispatcher(); - - if (dispatcher && panel) - { - // run on main UI thread - dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text, panel]() - { - if (m_textBox != nullptr) - { - unsigned int index; - if (panel->Children->IndexOf(m_textBox, &index)) - { - panel->Children->RemoveAt(index); - } - } - m_textBox = nullptr; - })); - } -} - -void KeyBoardWinRT::OnWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) -{ - bool pressed = (type == WinRTKeyboardEventType::KeyPressed); - - // Is key repeats - bool repeat = pressed && args->KeyStatus.WasKeyDown; - - int key = static_cast(args->VirtualKey); - auto it = g_keyCodeMap.find(key); - if (it != g_keyCodeMap.end()) - { - - EventKeyboard::KeyCode keyCode = it->second; - - EventKeyboard event(keyCode, pressed); - if (!repeat) - { - auto dispatcher = Director::getInstance()->getEventDispatcher(); - dispatcher->dispatchEvent(&event); - if (keyCode == EventKeyboard::KeyCode::KEY_ENTER) - { - IMEDispatcher::sharedDispatcher()->dispatchInsertText("\n", 1); - } - } - - if (pressed && !event.isStopped()) - { - switch (keyCode) - { - case EventKeyboard::KeyCode::KEY_BACKSPACE: - IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); - break; - case EventKeyboard::KeyCode::KEY_HOME: - case EventKeyboard::KeyCode::KEY_KP_HOME: - case EventKeyboard::KeyCode::KEY_DELETE: - case EventKeyboard::KeyCode::KEY_KP_DELETE: - case EventKeyboard::KeyCode::KEY_END: - case EventKeyboard::KeyCode::KEY_LEFT_ARROW: - case EventKeyboard::KeyCode::KEY_RIGHT_ARROW: - case EventKeyboard::KeyCode::KEY_ESCAPE: - IMEDispatcher::sharedDispatcher()->dispatchControlKey(keyCode); - break; - default: - break; - } - } - } - else - { - log("GLViewImpl::OnWinRTKeyboardEvent Virtual Key Code %d not supported", key); - } -} - -void KeyBoardWinRT::OnTextChanged(Platform::Object^ sender, TextChangedEventArgs^ args) -{ - if (m_useInputMethod) { - return; - } - auto text = m_textBox->Text; - if (text) - { - std::shared_ptr e(new cocos2d::KeyboardEvent(Cocos2dKeyEvent::Text, text)); - cocos2d::GLViewImpl::sharedOpenGLView()->QueueEvent(e); - m_textBox->Text = L""; - } -} - -void KeyBoardWinRT::OnTextCompositionStarted(Windows::UI::Xaml::Controls::TextBox^, Windows::UI::Xaml::Controls::TextCompositionStartedEventArgs^ args) -{ - m_useInputMethod = true; -} - -void KeyBoardWinRT::OnTextCompositionEnded(Windows::UI::Xaml::Controls::TextBox^, Windows::UI::Xaml::Controls::TextCompositionEndedEventArgs^ args) -{ - m_useInputMethod = false; - auto text = m_textBox->Text; - if (text) - { - std::shared_ptr e(new cocos2d::KeyboardEvent(Cocos2dKeyEvent::Text, text)); - cocos2d::GLViewImpl::sharedOpenGLView()->QueueEvent(e); - m_textBox->Text = L""; - } -} - -NS_CC_END - diff --git a/cocos/platform/winrt/Keyboard-winrt.h b/cocos/platform/winrt/Keyboard-winrt.h deleted file mode 100644 index d8cbf6ae775c..000000000000 --- a/cocos/platform/winrt/Keyboard-winrt.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -* Portions Copyright (c) Microsoft Open Technologies, Inc. -* All Rights Reserved -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#pragma once - -#include -#include "platform/winrt/InputEvent.h" - -NS_CC_BEGIN - -ref class KeyBoardWinRT sealed -{ -public: - KeyBoardWinRT(); - virtual ~KeyBoardWinRT(); - - void ShowKeyboard(Platform::String^ text); - void HideKeyboard(Platform::String^ text); - -internal: - void OnWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); - -private: - void OnTextChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::TextChangedEventArgs^ args); - void OnTextCompositionStarted(Windows::UI::Xaml::Controls::TextBox^, Windows::UI::Xaml::Controls::TextCompositionStartedEventArgs^ args); - void OnTextCompositionEnded(Windows::UI::Xaml::Controls::TextBox^, Windows::UI::Xaml::Controls::TextCompositionEndedEventArgs^ args); - - Windows::UI::Xaml::Controls::TextBox^ m_textBox; - - bool m_useInputMethod; -}; - -NS_CC_END diff --git a/cocos/platform/winrt/WICImageLoader-winrt.cpp b/cocos/platform/winrt/WICImageLoader-winrt.cpp deleted file mode 100644 index 7c83cfaacf0b..000000000000 --- a/cocos/platform/winrt/WICImageLoader-winrt.cpp +++ /dev/null @@ -1,407 +0,0 @@ -/**************************************************************************** -Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Based upon code from the DirectX Tool Kit by Microsoft Corporation, -obtained from https://directxtk.codeplex.com -****************************************************************************/ -#include "platform/winrt/WICImageLoader-winrt.h" -#include "platform/winrt/CCWinRTUtils.h" - -NS_CC_BEGIN - -#if CC_USE_WIC - - IWICImagingFactory* WICImageLoader::_wicFactory = NULL; - -static WICConvert g_WICConvert[] = -{ - // Note target GUID in this conversion table must be one of those directly supported by cocos2d-x - - { GUID_WICPixelFormatBlackWhite, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM - - { GUID_WICPixelFormat1bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat2bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat4bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat8bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - - { GUID_WICPixelFormat2bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM - { GUID_WICPixelFormat4bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM - - { GUID_WICPixelFormat16bppGrayFixedPoint, GUID_WICPixelFormat16bppGrayHalf }, // DXGI_FORMAT_R16_FLOAT - { GUID_WICPixelFormat32bppGrayFixedPoint, GUID_WICPixelFormat32bppGrayFloat }, // DXGI_FORMAT_R32_FLOAT - - { GUID_WICPixelFormat16bppBGR555, GUID_WICPixelFormat16bppBGRA5551 }, // DXGI_FORMAT_B5G5R5A1_UNORM - - { GUID_WICPixelFormat32bppBGR101010, GUID_WICPixelFormat32bppRGBA1010102 }, // DXGI_FORMAT_R10G10B10A2_UNORM - - { GUID_WICPixelFormat24bppBGR, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat24bppRGB, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat32bppPBGRA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - { GUID_WICPixelFormat32bppPRGBA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - - { GUID_WICPixelFormat48bppRGB, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R16G16B16A16_UNORM - { GUID_WICPixelFormat48bppBGR, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R16G16B16A16_UNORM - - { GUID_WICPixelFormat48bppRGBFixedPoint, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R16G16B16A16_FLOAT - { GUID_WICPixelFormat48bppBGRFixedPoint, GUID_WICPixelFormat24bppRGB }, // DXGI_FORMAT_R16G16B16A16_FLOAT - - //#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE) - // { GUID_WICPixelFormat32bppRGB, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM - // { GUID_WICPixelFormat64bppRGB, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM - // { GUID_WICPixelFormat64bppPRGBAHalf, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT - //#endif - - // We don't support n-channel formats -}; - -WICImageLoader::WICImageLoader() : - _width(0), - _height(0), - _dataLen(0), - _bpp(0), - _data(0) -{ - memset((void*)&_format, 0, sizeof(_format)); -} - -WICImageLoader::~WICImageLoader() -{ - if(_data != NULL && _dataLen > 0) { - delete[] _data; - _data = NULL; - } -} - -bool WICImageLoader::decodeImageData(ImageBlob blob, size_t size) -{ - bool bRet = false; - HRESULT hr = E_FAIL; - - IWICStream* pWicStream = NULL; - IWICImagingFactory* pWicFactory = getWICFactory(); - - if(NULL != pWicFactory) - { - hr = pWicFactory->CreateStream(&pWicStream); - } - - if(SUCCEEDED(hr)) - { - hr = pWicStream->InitializeFromMemory((BYTE*)blob, static_cast(size)); - } - - IWICBitmapDecoder* pDecoder = NULL; - - if(SUCCEEDED(hr)) - { - hr = pWicFactory->CreateDecoderFromStream(pWicStream, NULL, WICDecodeMetadataCacheOnLoad, &pDecoder); - } - - bRet = processImage(pDecoder); - - SafeRelease(&pWicStream); - SafeRelease(&pDecoder); - - return bRet; -} - -bool WICImageLoader::processImage(IWICBitmapDecoder* pDecoder) -{ - HRESULT hr = E_FAIL; - IWICBitmapFrameDecode* pFrame = NULL; - - if(NULL != pDecoder) - { - hr = pDecoder->GetFrame(0, &pFrame); - } - - if(SUCCEEDED(hr)) - { - hr = pFrame->GetPixelFormat(&_format); - } - - IWICFormatConverter* pConv = NULL; - - if(SUCCEEDED(hr)) - { - hr = convertFormatIfRequired(pFrame, &pConv); - } - - if(SUCCEEDED(hr)) - { - _bpp = getBitsPerPixel(_format); - - if(NULL != pConv) - { - hr = pConv->GetSize((UINT*)&_width, (UINT*)&_height); - } - else - { - hr = pFrame->GetSize((UINT*)&_width, (UINT*)&_height); - } - } - - assert(_bpp > 0); - assert(_width > 0 && _height > 0); - - if(SUCCEEDED(hr)) - { - size_t rowPitch = (_width * _bpp + 7) / 8; - _dataLen = rowPitch * _height; - _data = new (std::nothrow) BYTE[_dataLen]; - - if(NULL != pConv) - { - hr = pConv->CopyPixels(NULL, static_cast(rowPitch), static_cast(_dataLen), _data); - } - else - { - hr = pFrame->CopyPixels(NULL, static_cast(rowPitch), static_cast(_dataLen), _data); - } - } - - SafeRelease(&pFrame); - SafeRelease(&pConv); - return SUCCEEDED(hr); -} - -HRESULT WICImageLoader::convertFormatIfRequired(IWICBitmapFrameDecode* pFrame, IWICFormatConverter** ppConv) -{ - *ppConv = NULL; - - if( (memcmp(&_format, &GUID_WICPixelFormat8bppGray, sizeof(WICPixelFormatGUID)) == 0) || - (memcmp(&_format, &GUID_WICPixelFormat8bppAlpha, sizeof(WICPixelFormatGUID)) == 0) || - (memcmp(&_format, &GUID_WICPixelFormat24bppRGB, sizeof(WICPixelFormatGUID)) == 0) || - (memcmp(&_format, &GUID_WICPixelFormat32bppRGBA, sizeof(WICPixelFormatGUID)) == 0)) - { - return S_OK; - } - - HRESULT hr = E_FAIL; - IWICImagingFactory* pFactory = getWICFactory(); - IWICFormatConverter* pConv = NULL; - - if(NULL != pFactory) - { - hr = pFactory->CreateFormatConverter(&pConv); - } - - WICPixelFormatGUID destFormat = GUID_WICPixelFormat32bppRGBA; // Fallback to RGBA 32-bit format which is supported by all devices - - for( size_t i=0; i < _countof(g_WICConvert); ++i ) - { - if ( memcmp( &g_WICConvert[i].source, &_format, sizeof(WICPixelFormatGUID) ) == 0 ) - { - memcpy( &destFormat, &g_WICConvert[i].target, sizeof(WICPixelFormatGUID) ); - break; - } - } - - BOOL bCanConv = FALSE; - - if(SUCCEEDED(hr)) - { - hr = pConv->CanConvert(_format, destFormat, &bCanConv); - } - - if(SUCCEEDED(hr) && bCanConv == TRUE) - { - hr = pConv->Initialize(pFrame, destFormat, WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom); - } - - if(SUCCEEDED(hr)) - { - memcpy(&_format, &destFormat, sizeof(WICPixelFormatGUID)); - *ppConv = pConv; - } - - return SUCCEEDED(hr); -} - -size_t WICImageLoader::getBitsPerPixel(WICPixelFormatGUID format) -{ - HRESULT hr = E_FAIL; - - IWICImagingFactory* pfactory = getWICFactory(); - - IWICComponentInfo* pCInfo = NULL; - - if(pfactory != NULL) - { - hr = pfactory->CreateComponentInfo(format, &pCInfo); - } - - WICComponentType cType; - - if(SUCCEEDED(hr)) - { - hr = pCInfo->GetComponentType(&cType); - } - - IWICPixelFormatInfo* pPInfo = NULL; - - if(SUCCEEDED(hr) && cType == WICPixelFormat) - { - hr = pCInfo->QueryInterface(IID_IWICPixelFormatInfo, (void**)&pPInfo); - } - - UINT bpp = 0; - - if(SUCCEEDED(hr)) - { - hr = pPInfo->GetBitsPerPixel(&bpp); - } - - SafeRelease(&pCInfo); - SafeRelease(&pPInfo); - return bpp; -} - -int WICImageLoader::getHeight() -{ - return _height; -} - -int WICImageLoader::getWidth() -{ - return _width; -} - -size_t WICImageLoader::getImageData(ImageBlob rawData, size_t dataLen) -{ - if(dataLen < _dataLen) - return 0; - - memcpy((void*)rawData, _data, _dataLen); - - return _dataLen; -} - -size_t WICImageLoader::getImageDataSize() -{ - return _dataLen; -} - -WICPixelFormatGUID WICImageLoader::getPixelFormat() -{ - return _format; -} - -bool WICImageLoader::encodeImageData(std::string path, const unsigned char* data, size_t dataLen, WICPixelFormatGUID pixelFormat, int width, int height, GUID containerFormat) -{ - assert(data != NULL); - assert(dataLen > 0 && width > 0 && height > 0); - - IWICImagingFactory* pFact = getWICFactory(); - - HRESULT hr = E_FAIL; - IWICStream* pStream = NULL; - - if (NULL != pFact) { - hr = pFact->CreateStream(&pStream); - } - - if (SUCCEEDED(hr)) { - hr = pStream->InitializeFromFilename(StringUtf8ToWideChar(path).c_str(), GENERIC_WRITE); - } - - IWICBitmapEncoder* pEnc = NULL; - - if (SUCCEEDED(hr)) { - hr = pFact->CreateEncoder(containerFormat, NULL, &pEnc); - } - - if (SUCCEEDED(hr)) { - hr = pEnc->Initialize(pStream, WICBitmapEncoderNoCache); - } - - IWICBitmapFrameEncode* pFrame = NULL; - IPropertyBag2* pProp = NULL; - - if (SUCCEEDED(hr)) { - hr = pEnc->CreateNewFrame(&pFrame, &pProp); - } - - if (SUCCEEDED(hr)) { - hr = pFrame->Initialize(pProp); - } - - if (SUCCEEDED(hr)) { - hr = pFrame->SetSize(width, height); - } - - if (SUCCEEDED(hr)) { - WICPixelFormatGUID targetFormat = pixelFormat; - hr = pFrame->SetPixelFormat(&targetFormat); - - if (targetFormat != pixelFormat) { - hr = E_INVALIDARG; - } - } - - if (SUCCEEDED(hr)) { - size_t bpp = getBitsPerPixel(pixelFormat); - size_t stride = (width * bpp + 7) / 8; - - hr = pFrame->WritePixels(height, static_cast(stride), static_cast(dataLen), (BYTE*)data); - } - - if (SUCCEEDED(hr)) { - hr = pFrame->Commit(); - } - - if (SUCCEEDED(hr)) { - hr = pEnc->Commit(); - } - - SafeRelease(&pStream); - SafeRelease(&pEnc); - SafeRelease(&pFrame); - SafeRelease(&pProp); - return SUCCEEDED(hr); -} - -IWICImagingFactory* WICImageLoader::getWICFactory() -{ - if(NULL == _wicFactory) - { - HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - - if(SUCCEEDED(hr)) - { - hr = CoCreateInstance(CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IWICImagingFactory, (LPVOID*)&_wicFactory); - } - - if(FAILED(hr)) - { - SafeRelease(&_wicFactory); - } - } - - return _wicFactory; -} - -#endif - -NS_CC_END diff --git a/cocos/platform/winrt/WICImageLoader-winrt.h b/cocos/platform/winrt/WICImageLoader-winrt.h deleted file mode 100644 index b3c9934861ee..000000000000 --- a/cocos/platform/winrt/WICImageLoader-winrt.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Based upon code from the DirectX Tool Kit by Microsoft Corporation, -obtained from https://directxtk.codeplex.com -****************************************************************************/ - -#ifndef __WIC_IMAGE_LOADER_H__ -#define __WIC_IMAGE_LOADER_H__ - -#include "base/ccConfig.h" - - -#if CC_USE_WIC - -#include -#include -#include -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - - - typedef const unsigned char* ImageBlob; - -struct WICConvert -{ - WICPixelFormatGUID source; - WICPixelFormatGUID target; -}; - -class CC_DLL WICImageLoader -{ -public: - - WICImageLoader(); - ~WICImageLoader(); - - int getWidth(); - int getHeight(); - size_t getImageDataSize(); - WICPixelFormatGUID getPixelFormat(); - size_t getImageData(ImageBlob rawData, size_t dataLen); - bool decodeImageData(ImageBlob data, size_t dataLen); - bool encodeImageData(std::string path, const unsigned char* data, size_t dataLen, WICPixelFormatGUID pixelFormat, int width, int height, GUID containerFormat); - -protected: - bool processImage(IWICBitmapDecoder* decoder); - size_t getBitsPerPixel(WICPixelFormatGUID format); - HRESULT convertFormatIfRequired(IWICBitmapFrameDecode* pFrame, IWICFormatConverter** ppConv); - - static IWICImagingFactory* getWICFactory(); - -private: - int _height; - int _width; - size_t _dataLen; - size_t _bpp; - WICPixelFormatGUID _format; - BYTE* _data; - - - static IWICImagingFactory* _wicFactory; -}; - -template -void SafeRelease(T **ppObj) -{ - if(*ppObj != NULL) - { - (*ppObj)->Release(); - *ppObj = NULL; - } -} - - -NS_CC_END - -#endif -#endif // #ifndef __WIC_IMAGE_LOADER_H__ - diff --git a/cocos/platform/winrt/inet_ntop_winrt.cpp b/cocos/platform/winrt/inet_ntop_winrt.cpp deleted file mode 100644 index 88c5a2d0de70..000000000000 --- a/cocos/platform/winrt/inet_ntop_winrt.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (C) 1996-2001 Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* - * Original code by Paul Vixie. "curlified" by Gisle Vanem. - */ - -/* Portions Copyright (c) Microsoft Open Technologies, Inc. */ - -/*modifications by Microsoft Open Technologies, Inc. to implement missing inet_ntop() from Windows Phone 8 SDK */ - - -#include -#include - -#if defined(_DEBUG) -#define DEBUGASSERT(x) assert(x) -#else -#define DEBUGASSERT(x) -#endif - -#define ERRNO ((int)GetLastError()) -#define SET_ERRNO(x) (SetLastError((DWORD)(x))) - - -#define ENABLE_IPV6 - -#ifndef HAVE_INET_NTOP - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#if 0 -#define _MPRINTF_REPLACE /* use our functions only */ -#include -#endif // 0 - - -//#include "inet_ntop.h" - -#define IN6ADDRSZ 16 -#define INADDRSZ 4 -#define INT16SZ 2 - -/* - * Format an IPv4 address, more or less like inet_ntoa(). - * - * Returns `dst' (as a const) - * Note: - * - uses no statics - * - takes a unsigned char* not an in_addr as input - */ -static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size) -{ - char tmp[sizeof "255.255.255.255"]; - size_t len; - - DEBUGASSERT(size >= 16); - - tmp[0] = '\0'; - (void)snprintf(tmp, sizeof(tmp), "%d.%d.%d.%d", - ((int)((unsigned char)src[0])) & 0xff, - ((int)((unsigned char)src[1])) & 0xff, - ((int)((unsigned char)src[2])) & 0xff, - ((int)((unsigned char)src[3])) & 0xff); - - len = strlen(tmp); - if(len == 0 || len >= size) { - SET_ERRNO(ENOSPC); - return (NULL); - } - strcpy(dst, tmp); - return dst; -} - -#ifdef ENABLE_IPV6 -/* - * Convert IPv6 binary address into presentation (printable) format. - */ -static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) -{ - /* - * Note that int32_t and int16_t need only be "at least" large enough - * to contain a value of the specified size. On some systems, like - * Crays, there is no such thing as an integer variable with 16 bits. - * Keep this in mind if you think this function should have been coded - * to use pointer overlays. All the world's not a VAX. - */ - char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; - char *tp; - struct { - long base; - long len; - } best, cur; - unsigned long words[IN6ADDRSZ / INT16SZ]; - int i; - - /* Preprocess: - * Copy the input (bytewise) array into a wordwise array. - * Find the longest run of 0x00's in src[] for :: shorthanding. - */ - memset(words, '\0', sizeof(words)); - for(i = 0; i < IN6ADDRSZ; i++) - words[i/2] |= (src[i] << ((1 - (i % 2)) << 3)); - - best.base = -1; - cur.base = -1; - best.len = 0; - cur.len = 0; - - for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { - if(words[i] == 0) { - if(cur.base == -1) - cur.base = i, cur.len = 1; - else - cur.len++; - } - else if(cur.base != -1) { - if(best.base == -1 || cur.len > best.len) - best = cur; - cur.base = -1; - } - } - if((cur.base != -1) && (best.base == -1 || cur.len > best.len)) - best = cur; - if(best.base != -1 && best.len < 2) - best.base = -1; - /* Format the result. */ - tp = tmp; - for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { - /* Are we inside the best run of 0x00's? */ - if(best.base != -1 && i >= best.base && i < (best.base + best.len)) { - if(i == best.base) - *tp++ = ':'; - continue; - } - - /* Are we following an initial run of 0x00s or any real hex? - */ - if(i != 0) - *tp++ = ':'; - - /* Is this address an encapsulated IPv4? - */ - if(i == 6 && best.base == 0 && - (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { - if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp))) { - SET_ERRNO(ENOSPC); - return (NULL); - } - tp += strlen(tp); - break; - } - tp += snprintf(tp, 5, "%lx", words[i]); - } - - /* Was it a trailing run of 0x00's? - */ - if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ)) - *tp++ = ':'; - *tp++ = '\0'; - - /* Check for overflow, copy, and we're done. - */ - if((size_t)(tp - tmp) > size) { - SET_ERRNO(ENOSPC); - return (NULL); - } - strcpy(dst, tmp); - return dst; -} -#endif /* ENABLE_IPV6 */ - -/* - * Convert a network format address to presentation format. - * - * Returns pointer to presentation format address (`buf'). - * Returns NULL on error and errno set with the specific - * error, EAFNOSUPPORT or ENOSPC. - * - * On Windows we store the error in the thread errno, not - * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning NULL, not SOCKERRNO. - */ -char *inet_ntop(int af, const void *src, char *buf, size_t size) -{ - switch (af) { - case AF_INET: - return inet_ntop4((const unsigned char*)src, buf, size); -#ifdef ENABLE_IPV6 - case AF_INET6: - return inet_ntop6((const unsigned char*)src, buf, size); -#endif - default: - SET_ERRNO(EAFNOSUPPORT); - return NULL; - } -} -#endif /* HAVE_INET_NTOP */ diff --git a/cocos/platform/winrt/inet_ntop_winrt.h b/cocos/platform/winrt/inet_ntop_winrt.h deleted file mode 100644 index 12954aa5c0b5..000000000000 --- a/cocos/platform/winrt/inet_ntop_winrt.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef HEADER_CURL_INET_NTOP_WINRT_H -#define HEADER_CURL_INET_NTOP_WINRT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * - * Portions Copyright (c) Microsoft Open Technologies, Inc. - - - ***************************************************************************/ - -#if _MSC_VER < 1900 -char *inet_ntop(int af, const void *addr, char *buf, size_t size); -#endif - -#endif /* HEADER_CURL_INET_NTOP_H */ - diff --git a/cocos/platform/winrt/inet_pton_winrt.cpp b/cocos/platform/winrt/inet_pton_winrt.cpp deleted file mode 100644 index f9bc0d20e6f0..000000000000 --- a/cocos/platform/winrt/inet_pton_winrt.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* This is from the BIND 4.9.4 release, modified to compile by itself */ - -/* Copyright (c) 1996 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* Portions Copyright (c) Microsoft Open Technologies, Inc. */ - -/*modifications by Microsoft Open Technologies, Inc. to implement missing inet_pton() from Windows 8 SDK */ - -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - -#include -#include - -#define ERRNO ((int)GetLastError()) -#define SET_ERRNO(x) (SetLastError((DWORD)(x))) - -#include "platform/winrt/inet_pton_winrt.h" - -#define ENABLE_IPV6 - -#define IN6ADDRSZ 16 -#define INADDRSZ 4 -#define INT16SZ 2 - -/* - * WARNING: Don't even consider trying to compile this on a system where - * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. - */ - -static int inet_pton4(const char *src, unsigned char *dst); -#ifdef ENABLE_IPV6 -static int inet_pton6(const char *src, unsigned char *dst); -#endif - -/* int - * inet_pton(af, src, dst) - * convert from presentation format (which usually means ASCII printable) - * to network format (which is usually some kind of binary format). - * return: - * 1 if the address was valid for the specified address family - * 0 if the address wasn't valid (`dst' is untouched in this case) - * -1 if some other error occurred (`dst' is untouched in this case, too) - * notice: - * On Windows we store the error in the thread errno, not - * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning (-1), not SOCKERRNO. - * author: - * Paul Vixie, 1996. - */ - -int inet_pton(int af, const char *src, void *dst) -{ - switch (af) { - case AF_INET: - return (inet_pton4(src, (unsigned char *)dst)); -#ifdef ENABLE_IPV6 - case AF_INET6: - return (inet_pton6(src, (unsigned char *)dst)); -#endif - default: - SET_ERRNO(EAFNOSUPPORT); - return (-1); - } - /* NOTREACHED */ -} - -/* int - * inet_pton4(src, dst) - * like inet_aton() but without all the hexadecimal and shorthand. - * return: - * 1 if `src' is a valid dotted quad, else 0. - * notice: - * does not touch `dst' unless it's returning 1. - * author: - * Paul Vixie, 1996. - */ -static int -inet_pton4(const char *src, unsigned char *dst) -{ - static const char digits[] = "0123456789"; - int saw_digit, octets, ch; - unsigned char tmp[INADDRSZ], *tp; - - saw_digit = 0; - octets = 0; - tp = tmp; - *tp = 0; - while((ch = *src++) != '\0') { - const char *pch; - - if((pch = strchr(digits, ch)) != NULL) { - unsigned int val = *tp * 10 + (unsigned int)(pch - digits); - - if(saw_digit && *tp == 0) - return (0); - if(val > 255) - return (0); - *tp = (unsigned char)val; - if(! saw_digit) { - if(++octets > 4) - return (0); - saw_digit = 1; - } - } - else if(ch == '.' && saw_digit) { - if(octets == 4) - return (0); - *++tp = 0; - saw_digit = 0; - } - else - return (0); - } - if(octets < 4) - return (0); - memcpy(dst, tmp, INADDRSZ); - return (1); -} - -#ifdef ENABLE_IPV6 -/* int - * inet_pton6(src, dst) - * convert presentation level address to network order binary form. - * return: - * 1 if `src' is a valid [RFC1884 2.2] address, else 0. - * notice: - * (1) does not touch `dst' unless it's returning 1. - * (2) :: in a full address is silently ignored. - * credit: - * inspired by Mark Andrews. - * author: - * Paul Vixie, 1996. - */ -static int -inet_pton6(const char *src, unsigned char *dst) -{ - static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; - unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp; - const char *xdigits, *curtok; - int ch, saw_xdigit; - size_t val; - - memset((tp = tmp), 0, IN6ADDRSZ); - endp = tp + IN6ADDRSZ; - colonp = NULL; - /* Leading :: requires some special handling. */ - if(*src == ':') - if(*++src != ':') - return (0); - curtok = src; - saw_xdigit = 0; - val = 0; - while((ch = *src++) != '\0') { - const char *pch; - - if((pch = strchr((xdigits = xdigits_l), ch)) == NULL) - pch = strchr((xdigits = xdigits_u), ch); - if(pch != NULL) { - val <<= 4; - val |= (pch - xdigits); - if(++saw_xdigit > 4) - return (0); - continue; - } - if(ch == ':') { - curtok = src; - if(!saw_xdigit) { - if(colonp) - return (0); - colonp = tp; - continue; - } - if(tp + INT16SZ > endp) - return (0); - *tp++ = (unsigned char) (val >> 8) & 0xff; - *tp++ = (unsigned char) val & 0xff; - saw_xdigit = 0; - val = 0; - continue; - } - if(ch == '.' && ((tp + INADDRSZ) <= endp) && - inet_pton4(curtok, tp) > 0) { - tp += INADDRSZ; - saw_xdigit = 0; - break; /* '\0' was seen by inet_pton4(). */ - } - return (0); - } - if(saw_xdigit) { - if(tp + INT16SZ > endp) - return (0); - *tp++ = (unsigned char) (val >> 8) & 0xff; - *tp++ = (unsigned char) val & 0xff; - } - if(colonp != NULL) { - /* - * Since some memmove()'s erroneously fail to handle - * overlapping regions, we'll do the shift by hand. - */ - const ssize_t n = tp - colonp; - ssize_t i; - - if(tp == endp) - return (0); - for(i = 1; i <= n; i++) { - *(endp - i) = *(colonp + n - i); - *(colonp + n - i) = 0; - } - tp = endp; - } - if(tp != endp) - return (0); - memcpy(dst, tmp, IN6ADDRSZ); - return (1); -} -#endif /* ENABLE_IPV6 */ - -#endif /* HAVE_INET_PTON */ diff --git a/cocos/platform/winrt/inet_pton_winrt.h b/cocos/platform/winrt/inet_pton_winrt.h deleted file mode 100644 index 15a0110b99ce..000000000000 --- a/cocos/platform/winrt/inet_pton_winrt.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef HEADER_CURL_INET_PTON_WINIRT_H -#define HEADER_CURL_INET_PTON_WINIRT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * Portions Copyright (c) Microsoft Open Technologies, Inc. - * - ***************************************************************************/ - -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -int inet_pton(int af, const char *src, void *dst); -#endif - -#endif /* HEADER_CURL_INET_PTON_WINIRT_H */ - diff --git a/cocos/platform/winrt/pch.cpp b/cocos/platform/winrt/pch.cpp deleted file mode 100644 index b13a83b5cc02..000000000000 --- a/cocos/platform/winrt/pch.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "pch.h" diff --git a/cocos/platform/winrt/pch.h b/cocos/platform/winrt/pch.h deleted file mode 100644 index 5a5a0f1001c5..000000000000 --- a/cocos/platform/winrt/pch.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#pragma once - -#include "platform/winrt/targetver.h" - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -#include -#include "cocos2d.h" -#include "cocos-ext.h" \ No newline at end of file diff --git a/cocos/platform/winrt/sha1.cpp b/cocos/platform/winrt/sha1.cpp deleted file mode 100644 index 9d181fe65ec2..000000000000 --- a/cocos/platform/winrt/sha1.cpp +++ /dev/null @@ -1,422 +0,0 @@ -/* - * sha1.cpp - * - * Copyright (C) The Internet Society (2001). All Rights Reserved. - * This document and translations of it may be copied and furnished to others, - * and derivative works that comment on or otherwise explain it or assist in its - * implementation may be prepared, copied, published and distributed, in whole or in part, - * without restriction of any kind, provided that the above copyright notice and this paragraph - * are included on all such copies and derivative works. However, this document itself may not - * be modified in any way, such as by removing the copyright notice or references to the Internet Society - * or other Internet organizations, except as needed for the purpose of developing Internet standards in - * which case the procedures for copyrights defined in the Internet Standards process must be followed, - * or as required to translate it into languages other than English. - * - * The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. - * - * This document and the information contained herein is provided on an "AS IS" basis and - * THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS - * OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * Source: - * http://www.faqs.org/rfcs/rfc3174.html - * - * Description: - * This file implements the Secure Hashing Algorithm 1 as - * defined in FIPS PUB 180-1 published April 17, 1995. - * - * The SHA-1, produces a 160-bit message digest for a given - * data stream. It should take about 2**n steps to find a - * message with the same digest as a given message and - * 2**(n/2) to find any two messages with the same digest, - * when n is the digest size in bits. Therefore, this - * algorithm can serve as a means of providing a - * "fingerprint" for a message. - * - * Portability Issues: - * SHA-1 is defined in terms of 32-bit "words". This code - * uses (included via "sha1.h" to define 32 and 8 - * bit unsigned integer types. If your C compiler does not - * support 32 bit unsigned integers, this code is not - * appropriate. - * - * Caveats: - * SHA-1 is designed to work with messages less than 2^64 bits - * long. Although SHA-1 allows a message digest to be generated - * for messages of any number of bits less than 2^64, this - * implementation only works with messages with a length that is - * a multiple of the size of an 8-bit character. - * - */ - -#include "platform/winrt/sha1.h" - -/* - * Define the SHA1 circular left shift macro - */ -#define SHA1CircularShift(bits,word) \ - (((word) << (bits)) | ((word) >> (32-(bits)))) - -/* Local Function Prototyptes */ -void SHA1PadMessage(SHA1Context *); -void SHA1ProcessMessageBlock(SHA1Context *); - -/* - * SHA1Reset - * - * Description: - * This function will initialize the SHA1Context in preparation - * for computing a new SHA1 message digest. - * - * Parameters: - * context: [in/out] - * The context to reset. - * - * Returns: - * sha Error Code. - * - */ -int SHA1Reset(SHA1Context *context) -{ - if (!context) - { - return shaNull; - } - - context->Length_Low = 0; - context->Length_High = 0; - context->Message_Block_Index = 0; - - context->Intermediate_Hash[0] = 0x67452301; - context->Intermediate_Hash[1] = 0xEFCDAB89; - context->Intermediate_Hash[2] = 0x98BADCFE; - context->Intermediate_Hash[3] = 0x10325476; - context->Intermediate_Hash[4] = 0xC3D2E1F0; - - context->Computed = 0; - context->Corrupted = 0; - - return shaSuccess; -} - -/* - * SHA1Result - * - * Description: - * This function will return the 160-bit message digest into the - * Message_Digest array provided by the caller. - * NOTE: The first octet of hash is stored in the 0th element, - * the last octet of hash in the 19th element. - * - * Parameters: - * context: [in/out] - * The context to use to calculate the SHA-1 hash. - * Message_Digest: [out] - * Where the digest is returned. - * - * Returns: - * sha Error Code. - * - */ -int SHA1Result( SHA1Context *context, - uint8_t Message_Digest[SHA1HashSize]) -{ - int i; - - if (!context || !Message_Digest) - { - return shaNull; - } - - if (context->Corrupted) - { - return context->Corrupted; - } - - if (!context->Computed) - { - SHA1PadMessage(context); - for(i=0; i<64; ++i) - { - /* message may be sensitive, clear it out */ - context->Message_Block[i] = 0; - } - context->Length_Low = 0; /* and clear length */ - context->Length_High = 0; - context->Computed = 1; - - } - - for(i = 0; i < SHA1HashSize; ++i) - { - Message_Digest[i] = context->Intermediate_Hash[i>>2] - >> 8 * ( 3 - ( i & 0x03 ) ); - } - - return shaSuccess; -} - -/* - * SHA1Input - * - * Description: - * This function accepts an array of octets as the next portion - * of the message. - * - * Parameters: - * context: [in/out] - * The SHA context to update - * message_array: [in] - * An array of characters representing the next portion of - * the message. - * length: [in] - * The length of the message in message_array - * - * Returns: - * sha Error Code. - * - */ -int SHA1Input( SHA1Context *context, - const uint8_t *message_array, - unsigned length) -{ - if (!length) - { - return shaSuccess; - } - - if (!context || !message_array) - { - return shaNull; - } - - if (context->Computed) - { - context->Corrupted = shaStateError; - - return shaStateError; - } - - if (context->Corrupted) - { - return context->Corrupted; - } - while(length-- && !context->Corrupted) - { - context->Message_Block[context->Message_Block_Index++] = - (*message_array & 0xFF); - - context->Length_Low += 8; - if (context->Length_Low == 0) - { - context->Length_High++; - if (context->Length_High == 0) - { - /* Message is too long */ - context->Corrupted = 1; - } - } - - if (context->Message_Block_Index == 64) - { - SHA1ProcessMessageBlock(context); - } - - message_array++; - } - - return shaSuccess; -} - -/* - * SHA1ProcessMessageBlock - * - * Description: - * This function will process the next 512 bits of the message - * stored in the Message_Block array. - * - * Parameters: - * None. - * - * Returns: - * Nothing. - * - * Comments: - - * Many of the variable names in this code, especially the - * single character names, were used because those were the - * names used in the publication. - * - * - */ -void SHA1ProcessMessageBlock(SHA1Context *context) -{ - const uint32_t K[] = { /* Constants defined in SHA-1 */ - 0x5A827999, - 0x6ED9EBA1, - 0x8F1BBCDC, - 0xCA62C1D6 - }; - int t; /* Loop counter */ - uint32_t temp; /* Temporary word value */ - uint32_t W[80]; /* Word sequence */ - uint32_t A, B, C, D, E; /* Word buffers */ - - /* - * Initialize the first 16 words in the array W - */ - for(t = 0; t < 16; t++) - { - W[t] = context->Message_Block[t * 4] << 24; - W[t] |= context->Message_Block[t * 4 + 1] << 16; - W[t] |= context->Message_Block[t * 4 + 2] << 8; - W[t] |= context->Message_Block[t * 4 + 3]; - } - - for(t = 16; t < 80; t++) - { - W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); - } - - A = context->Intermediate_Hash[0]; - B = context->Intermediate_Hash[1]; - C = context->Intermediate_Hash[2]; - D = context->Intermediate_Hash[3]; - E = context->Intermediate_Hash[4]; - - for(t = 0; t < 20; t++) - { - temp = SHA1CircularShift(5,A) + - ((B & C) | ((~B) & D)) + E + W[t] + K[0]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - - B = A; - A = temp; - } - - for(t = 20; t < 40; t++) - { - temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - for(t = 40; t < 60; t++) - { - temp = SHA1CircularShift(5,A) + - ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - for(t = 60; t < 80; t++) - { - temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - context->Intermediate_Hash[0] += A; - context->Intermediate_Hash[1] += B; - context->Intermediate_Hash[2] += C; - context->Intermediate_Hash[3] += D; - context->Intermediate_Hash[4] += E; - - context->Message_Block_Index = 0; -} - -/* - * SHA1PadMessage - * - - * Description: - * According to the standard, the message must be padded to an even - * 512 bits. The first padding bit must be a '1'. The last 64 - * bits represent the length of the original message. All bits in - * between should be 0. This function will pad the message - * according to those rules by filling the Message_Block array - * accordingly. It will also call the ProcessMessageBlock function - * provided appropriately. When it returns, it can be assumed that - * the message digest has been computed. - * - * Parameters: - * context: [in/out] - * The context to pad - * ProcessMessageBlock: [in] - * The appropriate SHA*ProcessMessageBlock function - * Returns: - * Nothing. - * - */ - -void SHA1PadMessage(SHA1Context *context) -{ - /* - * Check to see if the current message block is too small to hold - * the initial padding bits and length. If so, we will pad the - * block, process it, and then continue padding into a second - * block. - */ - if (context->Message_Block_Index > 55) - { - context->Message_Block[context->Message_Block_Index++] = 0x80; - while(context->Message_Block_Index < 64) - { - context->Message_Block[context->Message_Block_Index++] = 0; - } - - SHA1ProcessMessageBlock(context); - - while(context->Message_Block_Index < 56) - { - context->Message_Block[context->Message_Block_Index++] = 0; - } - } - else - { - context->Message_Block[context->Message_Block_Index++] = 0x80; - while(context->Message_Block_Index < 56) - { - - context->Message_Block[context->Message_Block_Index++] = 0; - } - } - - /* - * Store the message length as the last 8 octets - */ - context->Message_Block[56] = context->Length_High >> 24; - context->Message_Block[57] = context->Length_High >> 16; - context->Message_Block[58] = context->Length_High >> 8; - context->Message_Block[59] = context->Length_High; - context->Message_Block[60] = context->Length_Low >> 24; - context->Message_Block[61] = context->Length_Low >> 16; - context->Message_Block[62] = context->Length_Low >> 8; - context->Message_Block[63] = context->Length_Low; - - SHA1ProcessMessageBlock(context); -} - -static const char alphabet[] = "0123456789ABCDEF"; - -void SHA1ConvertMessageToString(uint8_t *hash_binary, char* hash_string) -{ - for (int i = 0; i != SHA1HashSize; ++i) - { - hash_string[2*i] = alphabet[hash_binary[i] / 16]; - hash_string[2*i + 1] = alphabet[hash_binary[i] % 16]; - } - hash_string[SHA1HashSize * 2] = '\0'; -} diff --git a/cocos/platform/winrt/sha1.h b/cocos/platform/winrt/sha1.h deleted file mode 100644 index e00a028461cb..000000000000 --- a/cocos/platform/winrt/sha1.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * sha1.h - * Copyright (C) The Internet Society (2001). All Rights Reserved. - * This document and translations of it may be copied and furnished to others, - * and derivative works that comment on or otherwise explain it or assist in its - * implementation may be prepared, copied, published and distributed, in whole or in part, - * without restriction of any kind, provided that the above copyright notice and this paragraph - * are included on all such copies and derivative works. However, this document itself may not - * be modified in any way, such as by removing the copyright notice or references to the Internet Society - * or other Internet organizations, except as needed for the purpose of developing Internet standards in - * which case the procedures for copyrights defined in the Internet Standards process must be followed, - * or as required to translate it into languages other than English. - * - * The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. - * - * This document and the information contained herein is provided on an "AS IS" basis and - * THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS - * OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * - * Description: - * This is the header file for code which implements the Secure - * Hashing Algorithm 1 as defined in FIPS PUB 180-1 published - * April 17, 1995. - * - * Many of the variable names in this code, especially the - * single character names, were used because those were the names - * used in the publication. - * - * Please read the file sha1.c for more information. - * - */ - -#ifndef _SHA1_H_ -#define _SHA1_H_ - -#include -/* - * If you do not have the ISO standard stdint.h header file, then you - * must typdef the following: - * name meaning - * uint32_t unsigned 32 bit integer - * uint8_t unsigned 8 bit integer (i.e., unsigned char) - * int_least16_t integer of >= 16 bits - * - */ - -#ifndef _SHA_enum_ -#define _SHA_enum_ -enum -{ - shaSuccess = 0, - shaNull, /* Null pointer parameter */ - shaInputTooLong, /* input data too long */ - shaStateError /* called Input after Result */ -}; -#endif -#define SHA1HashSize 20 - -/* - * This structure will hold context information for the SHA-1 - * hashing operation - */ -typedef struct SHA1Context -{ - uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ - - uint32_t Length_Low; /* Message length in bits */ - uint32_t Length_High; /* Message length in bits */ - - /* Index into message block array */ - int_least16_t Message_Block_Index; - uint8_t Message_Block[64]; /* 512-bit message blocks */ - - int Computed; /* Is the digest computed? */ - int Corrupted; /* Is the message digest corrupted? */ -} SHA1Context; - -/* - * Function Prototypes - */ - -int SHA1Reset( SHA1Context *); -int SHA1Input( SHA1Context *, - const uint8_t *, - unsigned int); -int SHA1Result( SHA1Context *, - uint8_t Message_Digest[SHA1HashSize]); -void SHA1ConvertMessageToString(uint8_t *hash_binary, char* hash_string); - - -#endif diff --git a/cocos/platform/winrt/shaders/precompiledshaders.h b/cocos/platform/winrt/shaders/precompiledshaders.h deleted file mode 100644 index 6d39511d398c..000000000000 --- a/cocos/platform/winrt/shaders/precompiledshaders.h +++ /dev/null @@ -1,5456 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#define PRECOMPILED_SHADERS - -const unsigned char s_2140AC5CB6D3788EBF81062827FA30CB4E9DB1BA[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 2, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 10, 0, 0, 0, - 67, 67, 95, 80, 77, 97, 116, 114, -105, 120, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 4, 0, - 0, 0, 94, 139, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 67, 67, - 95, 84, 101, 120, 116, 117, 114, 101, - 48, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 1, 0, 0, - 0, 2, 0, 0, 0, 10, 0, 0, - 0, 67, 67, 95, 80, 77, 97, 116, -114, 105, 120, 0, 0, 0, 0, 0, - 0, 0, 0, 11, 0, 0, 0, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 0, 0, 0, 1, 0, - 0, 0, 248, 3, 0, 0, 0, 5, - 0, 0, 0, 0, 0, 0, 185, 153, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 88, - 66, 67, 11, 95, 74, 206, 145, 124, - 32, 219, 67, 19, 26, 23, 189, 75, - 35, 86, 1, 0, 0, 0, 248, 3, - 0, 0, 6, 0, 0, 0, 56, 0, - 0, 0, 228, 0, 0, 0, 244, 1, - 0, 0, 112, 2, 0, 0, 48, 3, - 0, 0, 124, 3, 0, 0, 65, 111, -110, 57, 164, 0, 0, 0, 164, 0, - 0, 0, 0, 2, 255, 255, 124, 0, - 0, 0, 40, 0, 0, 0, 0, 0, - 40, 0, 0, 0, 40, 0, 0, 0, - 40, 0, 1, 0, 36, 0, 0, 0, - 40, 0, 0, 0, 0, 0, 1, 2, -255, 255, 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 128, 1, 0, - 3, 176, 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, 66, 0, - 0, 3, 0, 0, 15, 128, 1, 0, -228, 176, 0, 8, 228, 160, 5, 0, - 0, 3, 0, 0, 15, 128, 0, 0, -228, 128, 0, 0, 228, 176, 1, 0, - 0, 2, 0, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 1, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 2, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 3, 8, - 15, 128, 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, 8, 1, - 0, 0, 64, 0, 0, 0, 66, 0, - 0, 0, 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, 98, 16, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 3, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 242, 0, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 1, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 2, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 3, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 7, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 184, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -255, 255, 0, 65, 0, 0, 134, 0, - 0, 0, 92, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 1, 0, - 0, 0, 113, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, 13, 0, - 0, 0, 115, 97, 109, 112, 108, 101, -114, 95, 95, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 116, -101, 120, 116, 117, 114, 101, 95, 95, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 77, 105, 99, 114, -111, 115, 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, 32, 83, -104, 97, 100, 101, 114, 32, 67, 111, -109, 112, 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, 73, 83, - 71, 78, 68, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 15, 0, 0, 56, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 171, -171, 171, 79, 83, 71, 78, 116, 0, - 0, 0, 4, 0, 0, 0, 8, 0, - 0, 0, 104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 3, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, 97, 114, -103, 101, 116, 0, 171, 171, 68, 88, - 66, 67, 53, 89, 218, 251, 179, 193, -226, 187, 197, 89, 218, 37, 36, 176, -206, 80, 1, 0, 0, 0, 0, 5, - 0, 0, 6, 0, 0, 0, 56, 0, - 0, 0, 92, 1, 0, 0, 224, 2, - 0, 0, 92, 3, 0, 0, 44, 4, - 0, 0, 144, 4, 0, 0, 65, 111, -110, 57, 28, 1, 0, 0, 28, 1, - 0, 0, 0, 2, 254, 255, 232, 0, - 0, 0, 52, 0, 0, 0, 1, 0, - 36, 0, 0, 0, 48, 0, 0, 0, - 48, 0, 0, 0, 36, 0, 1, 0, - 48, 0, 0, 0, 0, 0, 4, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, 81, 0, - 0, 5, 5, 0, 15, 160, 0, 0, - 0, 63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 2, 5, 0, 0, 128, 0, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 1, 128, 1, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 2, 128, 2, 0, - 15, 144, 9, 0, 0, 3, 0, 0, - 1, 128, 3, 0, 228, 160, 1, 0, -228, 144, 9, 0, 0, 3, 0, 0, - 2, 128, 4, 0, 228, 160, 1, 0, -228, 144, 2, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 85, 128, 0, 0, - 0, 128, 5, 0, 0, 3, 0, 0, - 4, 192, 0, 0, 0, 128, 5, 0, - 0, 160, 9, 0, 0, 3, 0, 0, - 1, 128, 2, 0, 228, 160, 1, 0, -228, 144, 1, 0, 0, 2, 1, 0, - 2, 128, 0, 0, 0, 129, 9, 0, - 0, 3, 1, 0, 1, 128, 1, 0, -228, 160, 1, 0, 228, 144, 4, 0, - 0, 4, 0, 0, 3, 192, 0, 0, - 85, 128, 0, 0, 228, 160, 1, 0, -228, 128, 1, 0, 0, 2, 0, 0, - 8, 192, 0, 0, 85, 128, 1, 0, - 0, 2, 0, 0, 15, 224, 0, 0, -228, 144, 1, 0, 0, 2, 1, 0, - 3, 224, 2, 0, 228, 144, 255, 255, - 0, 0, 83, 72, 68, 82, 124, 1, - 0, 0, 64, 0, 1, 0, 95, 0, - 0, 0, 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 1, 0, - 0, 0, 95, 0, 0, 3, 50, 16, - 16, 0, 2, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, 103, 0, - 0, 4, 242, 32, 16, 0, 2, 0, - 0, 0, 1, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 50, 32, - 16, 0, 1, 0, 0, 0, 70, 16, - 16, 0, 2, 0, 0, 0, 17, 0, - 0, 8, 18, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 54, 0, - 0, 6, 34, 32, 16, 0, 2, 0, - 0, 0, 10, 0, 16, 128, 65, 0, - 0, 0, 0, 0, 0, 0, 17, 0, - 0, 8, 18, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 17, 0, - 0, 8, 34, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 0, 0, - 0, 7, 18, 0, 16, 0, 0, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 130, 32, - 16, 0, 2, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 56, 0, - 0, 7, 66, 32, 16, 0, 2, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 1, 64, 0, 0, 0, 0, - 0, 63, 17, 0, 0, 8, 18, 32, - 16, 0, 2, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 11, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 200, 0, - 0, 0, 1, 0, 0, 0, 72, 0, - 0, 0, 1, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 254, 255, 0, 65, - 0, 0, 148, 0, 0, 0, 60, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 36, 71, -108, 111, 98, 97, 108, 115, 0, 171, -171, 171, 60, 0, 0, 0, 1, 0, - 0, 0, 96, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 120, 0, 0, 0, 0, 0, - 0, 0, 64, 0, 0, 0, 2, 0, - 0, 0, 132, 0, 0, 0, 0, 0, - 0, 0, 95, 67, 67, 95, 80, 77, - 97, 116, 114, 105, 120, 0, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_42003E3EDB1E484A842EB95165D48A439ED6AAE8[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 3, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 81, 139, 0, 0, 240, -141, 0, 0, 13, 0, 0, 0, 118, - 95, 101, 102, 102, 101, 99, 116, 67, -111, 108, 111, 114, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 3, 0, 0, 0, - 12, 0, 0, 0, 67, 67, 95, 77, - 86, 80, 77, 97, 116, 114, 105, 120, - 0, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 0, 0, 0, 1, 0, 0, 0, 13, - 0, 0, 0, 118, 95, 101, 102, 102, -101, 99, 116, 67, 111, 108, 111, 114, - 0, 0, 0, 0, 2, 0, 0, 0, - 44, 7, 0, 0, 4, 5, 0, 0, - 0, 0, 0, 0, 185, 153, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 88, 66, 67, -106, 137, 150, 242, 70, 59, 121, 115, - 1, 56, 143, 240, 248, 24, 67, 104, - 1, 0, 0, 0, 44, 7, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, -244, 1, 0, 0, 172, 4, 0, 0, - 40, 5, 0, 0, 100, 6, 0, 0, -176, 6, 0, 0, 65, 111, 110, 57, -180, 1, 0, 0, 180, 1, 0, 0, - 0, 2, 255, 255, 128, 1, 0, 0, - 52, 0, 0, 0, 1, 0, 40, 0, - 0, 0, 52, 0, 0, 0, 52, 0, - 1, 0, 36, 0, 0, 0, 52, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 81, 0, 0, 5, - 1, 0, 15, 160, 31, 133, 235, 190, -254, 255, 71, 65, 0, 0, 0, 192, - 0, 0, 64, 64, 81, 0, 0, 5, - 2, 0, 15, 160, 0, 0, 0, 191, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, 0, 128, - 1, 0, 3, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, 15, 160, - 66, 0, 0, 3, 0, 0, 15, 128, - 1, 0, 228, 176, 0, 8, 228, 160, - 7, 0, 0, 2, 0, 0, 1, 128, - 0, 0, 255, 128, 2, 0, 0, 3, - 0, 0, 2, 128, 0, 0, 255, 128, - 1, 0, 0, 160, 5, 0, 0, 3, - 0, 0, 18, 128, 0, 0, 85, 128, - 1, 0, 85, 160, 6, 0, 0, 2, - 0, 0, 1, 128, 0, 0, 0, 128, - 2, 0, 0, 3, 0, 0, 1, 128, - 0, 0, 0, 128, 2, 0, 0, 160, - 2, 0, 0, 3, 0, 0, 17, 128, - 0, 0, 0, 128, 0, 0, 0, 128, - 4, 0, 0, 4, 0, 0, 4, 128, - 0, 0, 0, 128, 1, 0, 170, 160, - 1, 0, 255, 160, 5, 0, 0, 3, - 0, 0, 1, 128, 0, 0, 0, 128, - 0, 0, 0, 128, 5, 0, 0, 3, - 0, 0, 1, 128, 0, 0, 0, 128, - 0, 0, 170, 128, 4, 0, 0, 4, - 0, 0, 4, 128, 0, 0, 85, 128, - 1, 0, 170, 160, 1, 0, 255, 160, - 5, 0, 0, 3, 0, 0, 2, 128, - 0, 0, 85, 128, 0, 0, 85, 128, - 5, 0, 0, 3, 0, 0, 2, 128, - 0, 0, 85, 128, 0, 0, 170, 128, - 11, 0, 0, 3, 1, 0, 8, 128, - 0, 0, 85, 128, 0, 0, 0, 128, - 18, 0, 0, 4, 1, 0, 7, 128, - 0, 0, 85, 128, 0, 0, 228, 176, - 0, 0, 228, 160, 1, 0, 0, 2, - 0, 8, 15, 128, 1, 0, 228, 128, - 1, 0, 0, 2, 1, 8, 15, 128, - 1, 0, 228, 128, 1, 0, 0, 2, - 2, 8, 15, 128, 1, 0, 228, 128, - 1, 0, 0, 2, 3, 8, 15, 128, - 1, 0, 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 176, 2, 0, 0, - 64, 0, 0, 0, 172, 0, 0, 0, - 89, 0, 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 90, 0, 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 98, 16, 0, 3, -114, 16, 16, 0, 0, 0, 0, 0, - 98, 16, 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 0, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 1, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 2, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 3, 0, 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 69, 0, 0, 9, -242, 0, 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 0, 0, 0, 0, - 75, 0, 0, 5, 18, 0, 16, 0, - 0, 0, 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 10, - 50, 0, 16, 0, 0, 0, 0, 0, -198, 0, 16, 0, 0, 0, 0, 0, - 2, 64, 0, 0, 0, 0, 0, 191, - 31, 133, 235, 190, 0, 0, 0, 0, - 0, 0, 0, 0, 56, 32, 0, 7, - 34, 0, 16, 0, 0, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 254, 255, 71, 65, - 0, 32, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 50, 0, 0, 9, - 66, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 0, 192, - 1, 64, 0, 0, 0, 0, 64, 64, - 56, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 56, 0, 0, 7, - 18, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 42, 0, 16, 0, 0, 0, 0, 0, - 50, 0, 0, 9, 66, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 0, 192, 1, 64, 0, 0, - 0, 0, 64, 64, 56, 0, 0, 7, - 34, 0, 16, 0, 0, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 130, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 42, 0, 16, 0, - 0, 0, 0, 0, 50, 0, 0, 10, - 34, 0, 16, 0, 0, 0, 0, 0, - 42, 0, 16, 128, 65, 0, 0, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 128, 63, 52, 0, 0, 7, -130, 0, 16, 0, 1, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 58, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 210, 0, 16, 0, - 0, 0, 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 6, 25, 16, 0, - 0, 0, 0, 0, 50, 0, 0, 10, -114, 0, 16, 0, 1, 0, 0, 0, - 70, 130, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 134, 3, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 1, 0, 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 2, 0, 0, 0, - 70, 14, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 3, 0, 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 20, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, - 52, 1, 0, 0, 1, 0, 0, 0, -176, 0, 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 255, 255, - 0, 65, 0, 0, 0, 1, 0, 0, -124, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0, -145, 0, 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 13, 0, 0, 0, -166, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, -115, 97, 109, 112, 108, 101, 114, 95, - 95, 67, 67, 95, 84, 101, 120, 116, -117, 114, 101, 48, 0, 116, 101, 120, -116, 117, 114, 101, 95, 95, 67, 67, - 95, 84, 101, 120, 116, 117, 114, 101, - 48, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 166, 0, 0, 0, - 1, 0, 0, 0, 200, 0, 0, 0, - 16, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 224, 0, 0, 0, - 0, 0, 0, 0, 12, 0, 0, 0, - 2, 0, 0, 0, 240, 0, 0, 0, - 0, 0, 0, 0, 95, 118, 95, 101, -102, 102, 101, 99, 116, 67, 111, 108, -111, 114, 0, 171, 1, 0, 3, 0, - 1, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, 99, 114, -111, 115, 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, 32, 83, -104, 97, 100, 101, 114, 32, 67, 111, -109, 112, 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 68, 0, 0, 0, - 2, 0, 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 7, 0, 0, - 56, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, 0, 0, - 84, 69, 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, 71, 78, -116, 0, 0, 0, 4, 0, 0, 0, - 8, 0, 0, 0, 104, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 104, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 15, 0, 0, 0, 104, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, 0, 0, - 15, 0, 0, 0, 104, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 3, 0, 0, 0, - 15, 0, 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, 171, 171, - 68, 88, 66, 67, 235, 56, 180, 223, -125, 231, 231, 218, 70, 75, 12, 63, -200, 233, 69, 121, 1, 0, 0, 0, - 4, 5, 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 92, 1, 0, 0, -224, 2, 0, 0, 92, 3, 0, 0, - 48, 4, 0, 0, 148, 4, 0, 0, - 65, 111, 110, 57, 28, 1, 0, 0, - 28, 1, 0, 0, 0, 2, 254, 255, -232, 0, 0, 0, 52, 0, 0, 0, - 1, 0, 36, 0, 0, 0, 48, 0, - 0, 0, 48, 0, 0, 0, 36, 0, - 1, 0, 48, 0, 0, 0, 0, 0, - 4, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 254, 255, - 81, 0, 0, 5, 5, 0, 15, 160, - 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 31, 0, 0, 2, 5, 0, 0, 128, - 0, 0, 15, 144, 31, 0, 0, 2, - 5, 0, 1, 128, 1, 0, 15, 144, - 31, 0, 0, 2, 5, 0, 2, 128, - 2, 0, 15, 144, 9, 0, 0, 3, - 0, 0, 1, 128, 3, 0, 228, 160, - 1, 0, 228, 144, 9, 0, 0, 3, - 0, 0, 2, 128, 4, 0, 228, 160, - 1, 0, 228, 144, 2, 0, 0, 3, - 0, 0, 1, 128, 0, 0, 85, 128, - 0, 0, 0, 128, 5, 0, 0, 3, - 0, 0, 4, 192, 0, 0, 0, 128, - 5, 0, 0, 160, 9, 0, 0, 3, - 0, 0, 1, 128, 2, 0, 228, 160, - 1, 0, 228, 144, 1, 0, 0, 2, - 1, 0, 2, 128, 0, 0, 0, 129, - 9, 0, 0, 3, 1, 0, 1, 128, - 1, 0, 228, 160, 1, 0, 228, 144, - 4, 0, 0, 4, 0, 0, 3, 192, - 0, 0, 85, 128, 0, 0, 228, 160, - 1, 0, 228, 128, 1, 0, 0, 2, - 0, 0, 8, 192, 0, 0, 85, 128, - 1, 0, 0, 2, 0, 0, 15, 224, - 0, 0, 228, 144, 1, 0, 0, 2, - 1, 0, 3, 224, 2, 0, 228, 144, -255, 255, 0, 0, 83, 72, 68, 82, -124, 1, 0, 0, 64, 0, 1, 0, - 95, 0, 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 95, 0, 0, 3, -242, 16, 16, 0, 0, 0, 0, 0, - 95, 0, 0, 3, 242, 16, 16, 0, - 1, 0, 0, 0, 95, 0, 0, 3, - 50, 16, 16, 0, 2, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 101, 0, 0, 3, - 50, 32, 16, 0, 1, 0, 0, 0, -103, 0, 0, 4, 242, 32, 16, 0, - 2, 0, 0, 0, 1, 0, 0, 0, -104, 0, 0, 2, 1, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 30, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, - 50, 32, 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 2, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 6, 34, 32, 16, 0, - 2, 0, 0, 0, 10, 0, 16, 128, - 65, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 17, 0, 0, 8, 34, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 0, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -130, 32, 16, 0, 2, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 66, 32, 16, 0, - 2, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 0, 63, 17, 0, 0, 8, - 18, 32, 16, 0, 2, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 11, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, -204, 0, 0, 0, 1, 0, 0, 0, - 72, 0, 0, 0, 1, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 254, 255, - 0, 65, 0, 0, 152, 0, 0, 0, - 60, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 36, 71, 108, 111, 98, 97, 108, 115, - 0, 171, 171, 171, 60, 0, 0, 0, - 1, 0, 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 120, 0, 0, 0, - 0, 0, 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 136, 0, 0, 0, - 0, 0, 0, 0, 95, 67, 67, 95, - 77, 86, 80, 77, 97, 116, 114, 105, -120, 0, 171, 171, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, 99, 114, -111, 115, 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, 32, 83, -104, 97, 100, 101, 114, 32, 67, 111, -109, 112, 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 92, 0, 0, 0, - 3, 0, 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 15, 0, 0, - 80, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 15, 0, 0, - 80, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 3, 3, 0, 0, - 84, 69, 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, 71, 78, -104, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 80, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 2, 0, 0, 0, - 15, 0, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, 111, 110, - 0, 171, 171, 171, -}; - -const unsigned char s_5132957B676AE174BDF34524AE4A80338F866279[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 80, 139, - 0, 0, 10, 0, 0, 0, 97, 95, -116, 101, 120, 67, 111, 111, 114, 100, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 2, 0, 0, 0, 92, 139, 0, - 0, 242, 141, 0, 0, 12, 0, 0, - 0, 67, 67, 95, 77, 86, 80, 77, - 97, 116, 114, 105, 120, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 4, 0, 0, 0, 94, 139, 0, - 0, 0, 0, 0, 0, 11, 0, 0, - 0, 67, 67, 95, 84, 101, 120, 116, -117, 114, 101, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 2, 0, 0, 0, - 12, 0, 0, 0, 67, 67, 95, 77, - 86, 80, 77, 97, 116, 114, 105, 120, - 0, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 0, 0, 0, 1, 0, 0, 0, 156, - 3, 0, 0, 144, 4, 0, 0, 0, - 0, 0, 0, 185, 153, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 68, 88, 66, 67, 203, -117, 183, 110, 154, 52, 220, 70, 125, -228, 9, 112, 112, 45, 175, 213, 1, - 0, 0, 0, 156, 3, 0, 0, 6, - 0, 0, 0, 56, 0, 0, 0, 200, - 0, 0, 0, 176, 1, 0, 0, 44, - 2, 0, 0, 236, 2, 0, 0, 32, - 3, 0, 0, 65, 111, 110, 57, 136, - 0, 0, 0, 136, 0, 0, 0, 0, - 2, 255, 255, 96, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 40, 0, 0, - 0, 40, 0, 0, 0, 40, 0, 1, - 0, 36, 0, 0, 0, 40, 0, 0, - 0, 0, 0, 1, 2, 255, 255, 31, - 0, 0, 2, 0, 0, 0, 128, 0, - 0, 3, 176, 31, 0, 0, 2, 0, - 0, 0, 144, 0, 8, 15, 160, 66, - 0, 0, 3, 0, 0, 15, 128, 0, - 0, 228, 176, 0, 8, 228, 160, 1, - 0, 0, 2, 0, 8, 15, 128, 0, - 0, 228, 128, 1, 0, 0, 2, 1, - 8, 15, 128, 0, 0, 228, 128, 1, - 0, 0, 2, 2, 8, 15, 128, 0, - 0, 228, 128, 1, 0, 0, 2, 3, - 8, 15, 128, 0, 0, 228, 128, 255, -255, 0, 0, 83, 72, 68, 82, 224, - 0, 0, 0, 64, 0, 0, 0, 56, - 0, 0, 0, 90, 0, 0, 3, 0, - 96, 16, 0, 0, 0, 0, 0, 88, - 24, 0, 4, 0, 112, 16, 0, 0, - 0, 0, 0, 85, 85, 0, 0, 98, - 16, 0, 3, 50, 16, 16, 0, 0, - 0, 0, 0, 101, 0, 0, 3, 242, - 32, 16, 0, 0, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, 3, 242, - 32, 16, 0, 2, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, 0, 3, - 0, 0, 0, 104, 0, 0, 2, 1, - 0, 0, 0, 69, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, 0, 70, -126, 16, 0, 0, 0, 0, 0, 0, - 96, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 242, 32, 16, 0, 0, - 0, 0, 0, 70, 14, 16, 0, 0, - 0, 0, 0, 54, 0, 0, 5, 242, - 32, 16, 0, 1, 0, 0, 0, 70, - 14, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 242, 32, 16, 0, 2, - 0, 0, 0, 70, 14, 16, 0, 0, - 0, 0, 0, 54, 0, 0, 5, 242, - 32, 16, 0, 3, 0, 0, 0, 70, - 14, 16, 0, 0, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, 84, 116, - 0, 0, 0, 6, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 5, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 82, - 68, 69, 70, 184, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 28, 0, 0, 0, 0, - 4, 255, 255, 0, 65, 0, 0, 134, - 0, 0, 0, 92, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 1, - 0, 0, 0, 113, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 1, 0, 0, 0, 13, - 0, 0, 0, 115, 97, 109, 112, 108, -101, 114, 95, 95, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, -116, 101, 120, 116, 117, 114, 101, 95, - 95, 67, 67, 95, 84, 101, 120, 116, -117, 114, 101, 48, 0, 77, 105, 99, -114, 111, 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, 32, 67, -111, 109, 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, 0, 73, - 83, 71, 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 3, 3, 0, 0, 84, - 69, 88, 67, 79, 79, 82, 68, 0, -171, 171, 171, 79, 83, 71, 78, 116, - 0, 0, 0, 4, 0, 0, 0, 8, - 0, 0, 0, 104, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 15, - 0, 0, 0, 104, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, 0, 15, - 0, 0, 0, 104, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 2, 0, 0, 0, 15, - 0, 0, 0, 104, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 3, 0, 0, 0, 15, - 0, 0, 0, 83, 86, 95, 84, 97, -114, 103, 101, 116, 0, 171, 171, 68, - 88, 66, 67, 110, 14, 140, 120, 239, -110, 56, 78, 103, 37, 245, 162, 140, -151, 93, 223, 1, 0, 0, 0, 144, - 4, 0, 0, 6, 0, 0, 0, 56, - 0, 0, 0, 68, 1, 0, 0, 156, - 2, 0, 0, 24, 3, 0, 0, 236, - 3, 0, 0, 56, 4, 0, 0, 65, -111, 110, 57, 4, 1, 0, 0, 4, - 1, 0, 0, 0, 2, 254, 255, 208, - 0, 0, 0, 52, 0, 0, 0, 1, - 0, 36, 0, 0, 0, 48, 0, 0, - 0, 48, 0, 0, 0, 36, 0, 1, - 0, 48, 0, 0, 0, 0, 0, 4, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, 255, 81, - 0, 0, 5, 5, 0, 15, 160, 0, - 0, 0, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 31, - 0, 0, 2, 5, 0, 0, 128, 0, - 0, 15, 144, 31, 0, 0, 2, 5, - 0, 1, 128, 1, 0, 15, 144, 9, - 0, 0, 3, 0, 0, 1, 128, 3, - 0, 228, 160, 0, 0, 228, 144, 9, - 0, 0, 3, 0, 0, 2, 128, 4, - 0, 228, 160, 0, 0, 228, 144, 2, - 0, 0, 3, 0, 0, 1, 128, 0, - 0, 85, 128, 0, 0, 0, 128, 5, - 0, 0, 3, 0, 0, 4, 192, 0, - 0, 0, 128, 5, 0, 0, 160, 9, - 0, 0, 3, 0, 0, 1, 128, 2, - 0, 228, 160, 0, 0, 228, 144, 1, - 0, 0, 2, 1, 0, 2, 128, 0, - 0, 0, 129, 9, 0, 0, 3, 1, - 0, 1, 128, 1, 0, 228, 160, 0, - 0, 228, 144, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 85, 128, 0, - 0, 228, 160, 1, 0, 228, 128, 1, - 0, 0, 2, 0, 0, 8, 192, 0, - 0, 85, 128, 1, 0, 0, 2, 0, - 0, 3, 224, 1, 0, 228, 144, 255, -255, 0, 0, 83, 72, 68, 82, 80, - 1, 0, 0, 64, 0, 1, 0, 84, - 0, 0, 0, 89, 0, 0, 4, 70, -142, 32, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 95, 0, 0, 3, 242, - 16, 16, 0, 0, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, 0, 1, - 0, 0, 0, 101, 0, 0, 3, 50, - 32, 16, 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, 0, 1, - 0, 0, 0, 1, 0, 0, 0, 104, - 0, 0, 2, 1, 0, 0, 0, 54, - 0, 0, 5, 50, 32, 16, 0, 0, - 0, 0, 0, 70, 16, 16, 0, 1, - 0, 0, 0, 17, 0, 0, 8, 18, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 54, 0, 0, 6, 34, - 32, 16, 0, 1, 0, 0, 0, 10, - 0, 16, 128, 65, 0, 0, 0, 0, - 0, 0, 0, 17, 0, 0, 8, 18, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 17, 0, 0, 8, 34, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 18, - 0, 16, 0, 0, 0, 0, 0, 26, - 0, 16, 0, 0, 0, 0, 0, 10, - 0, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 130, 32, 16, 0, 1, - 0, 0, 0, 26, 0, 16, 0, 0, - 0, 0, 0, 56, 0, 0, 7, 66, - 32, 16, 0, 1, 0, 0, 0, 10, - 0, 16, 0, 0, 0, 0, 0, 1, - 64, 0, 0, 0, 0, 0, 63, 17, - 0, 0, 8, 18, 32, 16, 0, 1, - 0, 0, 0, 70, 142, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 70, - 30, 16, 0, 0, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, 84, 116, - 0, 0, 0, 10, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 82, - 68, 69, 70, 204, 0, 0, 0, 1, - 0, 0, 0, 72, 0, 0, 0, 1, - 0, 0, 0, 28, 0, 0, 0, 0, - 4, 254, 255, 0, 65, 0, 0, 152, - 0, 0, 0, 60, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 36, 71, 108, 111, 98, - 97, 108, 115, 0, 171, 171, 171, 60, - 0, 0, 0, 1, 0, 0, 0, 96, - 0, 0, 0, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 120, - 0, 0, 0, 0, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, 0, 136, - 0, 0, 0, 0, 0, 0, 0, 95, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 171, 171, 3, - 0, 3, 0, 4, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 77, -105, 99, 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, 108, 101, -114, 32, 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, 56, 52, - 0, 171, 171, 73, 83, 71, 78, 68, - 0, 0, 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 15, - 15, 0, 0, 56, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, 0, 3, - 3, 0, 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, 171, 79, - 83, 71, 78, 80, 0, 0, 0, 2, - 0, 0, 0, 8, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 3, 12, 0, 0, 65, - 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, 0, 1, - 0, 0, 0, 15, 0, 0, 0, 84, - 69, 88, 67, 79, 79, 82, 68, 0, - 83, 86, 95, 80, 111, 115, 105, 116, -105, 111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_61ACD51E94A6AA8035DE722FB113F24350C0D113[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 3, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 6, 20, 0, 0, 240, -141, 0, 0, 14, 0, 0, 0, 67, - 67, 95, 97, 108, 112, 104, 97, 95, -118, 97, 108, 117, 101, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 1, 0, 0, 0, 3, 0, 0, - 0, 12, 0, 0, 0, 67, 67, 95, - 77, 86, 80, 77, 97, 116, 114, 105, -120, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 0, 0, 0, 67, 67, 95, - 84, 101, 120, 116, 117, 114, 101, 48, - 0, 0, 0, 0, 1, 0, 0, 0, - 14, 0, 0, 0, 67, 67, 95, 97, -108, 112, 104, 97, 95, 118, 97, 108, -117, 101, 0, 0, 0, 0, 2, 0, - 0, 0, 36, 5, 0, 0, 4, 5, - 0, 0, 0, 0, 0, 0, 185, 153, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 88, - 66, 67, 100, 113, 175, 29, 164, 71, -177, 78, 120, 99, 172, 209, 227, 249, -113, 132, 1, 0, 0, 0, 36, 5, - 0, 0, 6, 0, 0, 0, 56, 0, - 0, 0, 88, 1, 0, 0, 164, 2, - 0, 0, 32, 3, 0, 0, 92, 4, - 0, 0, 168, 4, 0, 0, 65, 111, -110, 57, 24, 1, 0, 0, 24, 1, - 0, 0, 0, 2, 255, 255, 228, 0, - 0, 0, 52, 0, 0, 0, 1, 0, - 40, 0, 0, 0, 52, 0, 0, 0, - 52, 0, 1, 0, 36, 0, 0, 0, - 52, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, 81, 0, - 0, 5, 1, 0, 15, 160, 0, 0, -128, 191, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 2, 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, 0, 0, - 0, 128, 1, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, 0, 0, - 15, 128, 1, 0, 228, 176, 0, 8, -228, 160, 2, 0, 0, 3, 1, 0, - 8, 128, 0, 0, 255, 129, 0, 0, - 0, 160, 88, 0, 0, 4, 1, 0, - 15, 128, 1, 0, 255, 128, 1, 0, - 0, 160, 1, 0, 85, 160, 65, 0, - 0, 1, 1, 0, 15, 128, 5, 0, - 0, 3, 0, 0, 15, 128, 0, 0, -228, 128, 0, 0, 228, 176, 1, 0, - 0, 2, 1, 0, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 2, 0, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 3, 0, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 0, 8, - 15, 128, 1, 0, 228, 128, 1, 0, - 0, 2, 1, 8, 15, 128, 2, 0, -228, 128, 1, 0, 0, 2, 2, 8, - 15, 128, 3, 0, 228, 128, 1, 0, - 0, 2, 3, 8, 15, 128, 0, 0, -228, 128, 255, 255, 0, 0, 83, 72, - 68, 82, 68, 1, 0, 0, 64, 0, - 0, 0, 81, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 2, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 3, 0, - 0, 0, 104, 0, 0, 2, 2, 0, - 0, 0, 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, 29, 0, - 0, 8, 18, 0, 16, 0, 1, 0, - 0, 0, 10, 128, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, 13, 0, - 4, 3, 10, 0, 16, 0, 1, 0, - 0, 0, 56, 0, 0, 7, 242, 0, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 1, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 2, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 3, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 9, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 52, 1, 0, 0, 1, 0, - 0, 0, 176, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -255, 255, 0, 65, 0, 0, 0, 1, - 0, 0, 124, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 1, 0, - 0, 0, 145, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, 13, 0, - 0, 0, 166, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 115, 97, 109, 112, 108, 101, -114, 95, 95, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 116, -101, 120, 116, 117, 114, 101, 95, 95, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 36, 71, 108, 111, - 98, 97, 108, 115, 0, 171, 166, 0, - 0, 0, 1, 0, 0, 0, 200, 0, - 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, 240, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 97, 108, 112, 104, 97, 95, -118, 97, 108, 117, 101, 0, 0, 0, - 3, 0, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 68, 0, - 0, 0, 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 56, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 116, 0, 0, 0, 4, 0, - 0, 0, 8, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 3, 0, - 0, 0, 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, 116, 0, -171, 171, 68, 88, 66, 67, 235, 56, -180, 223, 125, 231, 231, 218, 70, 75, - 12, 63, 200, 233, 69, 121, 1, 0, - 0, 0, 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 92, 1, - 0, 0, 224, 2, 0, 0, 92, 3, - 0, 0, 48, 4, 0, 0, 148, 4, - 0, 0, 65, 111, 110, 57, 28, 1, - 0, 0, 28, 1, 0, 0, 0, 2, -254, 255, 232, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 36, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 0, 0, - 36, 0, 1, 0, 48, 0, 0, 0, - 0, 0, 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, -254, 255, 81, 0, 0, 5, 5, 0, - 15, 160, 0, 0, 0, 63, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 1, 128, 1, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 2, 128, 2, 0, 15, 144, 9, 0, - 0, 3, 0, 0, 1, 128, 3, 0, -228, 160, 1, 0, 228, 144, 9, 0, - 0, 3, 0, 0, 2, 128, 4, 0, -228, 160, 1, 0, 228, 144, 2, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 85, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 4, 192, 0, 0, - 0, 128, 5, 0, 0, 160, 9, 0, - 0, 3, 0, 0, 1, 128, 2, 0, -228, 160, 1, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 2, 128, 0, 0, - 0, 129, 9, 0, 0, 3, 1, 0, - 1, 128, 1, 0, 228, 160, 1, 0, -228, 144, 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 85, 128, 0, 0, -228, 160, 1, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 8, 192, 0, 0, - 85, 128, 1, 0, 0, 2, 0, 0, - 15, 224, 0, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 3, 224, 2, 0, -228, 144, 255, 255, 0, 0, 83, 72, - 68, 82, 124, 1, 0, 0, 64, 0, - 1, 0, 95, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 1, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, 1, 0, - 0, 0, 103, 0, 0, 4, 242, 32, - 16, 0, 2, 0, 0, 0, 1, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, 2, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 54, 0, 0, 6, 34, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 128, 65, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 17, 0, 0, 8, 34, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, 2, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 66, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 0, 0, 0, 63, 17, 0, - 0, 8, 18, 32, 16, 0, 2, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 11, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 204, 0, 0, 0, 1, 0, - 0, 0, 72, 0, 0, 0, 1, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -254, 255, 0, 65, 0, 0, 152, 0, - 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 1, 0, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 0, - 0, 0, 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, 136, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 171, 171, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_6A3FEBEAD7E44B2380CD39CBDCFD1D3B046D8057[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 99, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 67, 67, 95, 77, - 86, 80, 77, 97, 116, 114, 105, 120, - 0, 0, 0, 0, 0, 0, 0, 0, - 16, 4, 0, 0, 48, 5, 0, 0, - 0, 0, 0, 0, 185, 153, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 88, 66, 67, - 79, 226, 72, 124, 94, 252, 37, 157, -186, 66, 253, 29, 176, 252, 8, 124, - 1, 0, 0, 0, 16, 4, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, - 28, 1, 0, 0, 116, 2, 0, 0, -240, 2, 0, 0, 72, 3, 0, 0, -148, 3, 0, 0, 65, 111, 110, 57, -220, 0, 0, 0, 220, 0, 0, 0, - 0, 2, 255, 255, 184, 0, 0, 0, - 36, 0, 0, 0, 0, 0, 36, 0, - 0, 0, 36, 0, 0, 0, 36, 0, - 0, 0, 36, 0, 0, 0, 36, 0, - 1, 2, 255, 255, 81, 0, 0, 5, - 0, 0, 15, 160, 0, 0, 0, 0, - 0, 0, 128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, 0, 128, - 1, 0, 3, 176, 90, 0, 0, 4, - 0, 0, 8, 128, 1, 0, 228, 176, - 1, 0, 228, 176, 0, 0, 0, 160, - 7, 0, 0, 2, 0, 0, 1, 128, - 0, 0, 255, 128, 6, 0, 0, 2, - 0, 0, 1, 128, 0, 0, 0, 128, - 2, 0, 0, 3, 0, 0, 1, 128, - 0, 0, 0, 129, 0, 0, 85, 160, - 88, 0, 0, 4, 0, 0, 15, 128, - 0, 0, 0, 128, 0, 0, 228, 176, - 0, 0, 0, 160, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 1, 8, 15, 128, - 0, 0, 228, 128, 1, 0, 0, 2, - 2, 8, 15, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 3, 8, 15, 128, - 0, 0, 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 80, 1, 0, 0, - 64, 0, 0, 0, 84, 0, 0, 0, - 98, 16, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 1, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 2, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 3, 0, 0, 0, -104, 0, 0, 2, 1, 0, 0, 0, - 15, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 75, 0, 0, 5, - 18, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 128, - 65, 0, 0, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 128, 63, - 29, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 7, - 18, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 128, 63, - 56, 0, 0, 7, 242, 0, 16, 0, - 0, 0, 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 30, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 1, 0, 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 2, 0, 0, 0, - 70, 14, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 3, 0, 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 11, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, - 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 255, 255, - 0, 65, 0, 0, 28, 0, 0, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, 71, 78, - 68, 0, 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 56, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 116, 0, 0, 0, - 4, 0, 0, 0, 8, 0, 0, 0, -104, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, 103, 101, -116, 0, 171, 171, 68, 88, 66, 67, -171, 76, 90, 152, 95, 120, 80, 155, -185, 88, 30, 71, 14, 112, 82, 161, - 1, 0, 0, 0, 48, 5, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, -108, 1, 0, 0, 12, 3, 0, 0, -136, 3, 0, 0, 92, 4, 0, 0, -192, 4, 0, 0, 65, 111, 110, 57, - 44, 1, 0, 0, 44, 1, 0, 0, - 0, 2, 254, 255, 248, 0, 0, 0, - 52, 0, 0, 0, 1, 0, 36, 0, - 0, 0, 48, 0, 0, 0, 48, 0, - 0, 0, 36, 0, 1, 0, 48, 0, - 0, 0, 0, 0, 4, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 81, 0, 0, 5, - 5, 0, 15, 160, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, 15, 144, - 31, 0, 0, 2, 5, 0, 1, 128, - 1, 0, 15, 144, 31, 0, 0, 2, - 5, 0, 2, 128, 2, 0, 15, 144, - 5, 0, 0, 3, 0, 0, 7, 224, - 0, 0, 255, 144, 0, 0, 228, 144, - 9, 0, 0, 3, 0, 0, 1, 128, - 3, 0, 228, 160, 1, 0, 228, 144, - 9, 0, 0, 3, 0, 0, 2, 128, - 4, 0, 228, 160, 1, 0, 228, 144, - 2, 0, 0, 3, 0, 0, 1, 128, - 0, 0, 85, 128, 0, 0, 0, 128, - 5, 0, 0, 3, 0, 0, 4, 192, - 0, 0, 0, 128, 5, 0, 0, 160, - 9, 0, 0, 3, 0, 0, 1, 128, - 2, 0, 228, 160, 1, 0, 228, 144, - 1, 0, 0, 2, 1, 0, 2, 128, - 0, 0, 0, 129, 9, 0, 0, 3, - 1, 0, 1, 128, 1, 0, 228, 160, - 1, 0, 228, 144, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, 85, 128, - 0, 0, 228, 160, 1, 0, 228, 128, - 1, 0, 0, 2, 0, 0, 8, 192, - 0, 0, 85, 128, 1, 0, 0, 2, - 0, 0, 8, 224, 0, 0, 255, 144, - 1, 0, 0, 2, 1, 0, 3, 224, - 2, 0, 228, 144, 255, 255, 0, 0, - 83, 72, 68, 82, 152, 1, 0, 0, - 64, 0, 1, 0, 102, 0, 0, 0, - 89, 0, 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 95, 0, 0, 3, -242, 16, 16, 0, 1, 0, 0, 0, - 95, 0, 0, 3, 50, 16, 16, 0, - 2, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 0, 0, 0, 0, -101, 0, 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 103, 0, 0, 4, -242, 32, 16, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, 0, 2, - 1, 0, 0, 0, 56, 0, 0, 7, -114, 32, 16, 0, 0, 0, 0, 0, -246, 31, 16, 0, 0, 0, 0, 0, - 70, 18, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 130, 32, 16, 0, - 0, 0, 0, 0, 58, 16, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, - 50, 32, 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 2, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 6, 34, 32, 16, 0, - 2, 0, 0, 0, 10, 0, 16, 128, - 65, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 17, 0, 0, 8, 34, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 0, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -130, 32, 16, 0, 2, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 66, 32, 16, 0, - 2, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 0, 63, 17, 0, 0, 8, - 18, 32, 16, 0, 2, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 12, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, - 8, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, -204, 0, 0, 0, 1, 0, 0, 0, - 72, 0, 0, 0, 1, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 254, 255, - 0, 65, 0, 0, 152, 0, 0, 0, - 60, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 36, 71, 108, 111, 98, 97, 108, 115, - 0, 171, 171, 171, 60, 0, 0, 0, - 1, 0, 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 120, 0, 0, 0, - 0, 0, 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 136, 0, 0, 0, - 0, 0, 0, 0, 95, 67, 67, 95, - 77, 86, 80, 77, 97, 116, 114, 105, -120, 0, 171, 171, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, 99, 114, -111, 115, 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, 32, 83, -104, 97, 100, 101, 114, 32, 67, 111, -109, 112, 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 92, 0, 0, 0, - 3, 0, 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 15, 0, 0, - 80, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 15, 0, 0, - 80, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 3, 3, 0, 0, - 84, 69, 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, 71, 78, -104, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 80, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 2, 0, 0, 0, - 15, 0, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, 111, 110, - 0, 171, 171, 171, -}; - -const unsigned char s_6C80A53170768A04FB4457D7203425EA3467E2E4[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 3, - 0, 0, 0, 92, 139, 0, 0, 242, -141, 0, 0, 12, 0, 0, 0, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 4, - 0, 0, 0, 82, 139, 0, 0, 242, -141, 0, 0, 7, 0, 0, 0, 117, - 95, 99, 111, 108, 111, 114, 0, 0, - 0, 0, 255, 255, 255, 255, 4, 0, - 0, 0, 1, 0, 0, 0, 6, 20, - 0, 0, 242, 141, 0, 0, 11, 0, - 0, 0, 117, 95, 112, 111, 105, 110, -116, 83, 105, 122, 101, 0, 0, 0, - 0, 255, 255, 255, 255, 5, 0, 0, - 0, 1, 0, 0, 0, 3, 0, 0, - 0, 12, 0, 0, 0, 67, 67, 95, - 77, 86, 80, 77, 97, 116, 114, 105, -120, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 117, 95, 99, -111, 108, 111, 114, 0, 0, 0, 0, - 1, 0, 0, 0, 11, 0, 0, 0, -117, 95, 112, 111, 105, 110, 116, 83, -105, 122, 101, 0, 0, 0, 0, 2, - 0, 0, 0, 204, 2, 0, 0, 208, - 4, 0, 0, 0, 0, 0, 0, 185, -153, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 68, - 88, 66, 67, 127, 145, 81, 72, 216, -190, 16, 61, 245, 231, 235, 249, 125, -223, 218, 82, 1, 0, 0, 0, 204, - 2, 0, 0, 6, 0, 0, 0, 56, - 0, 0, 0, 168, 0, 0, 0, 72, - 1, 0, 0, 196, 1, 0, 0, 28, - 2, 0, 0, 80, 2, 0, 0, 65, -111, 110, 57, 104, 0, 0, 0, 104, - 0, 0, 0, 0, 2, 255, 255, 68, - 0, 0, 0, 36, 0, 0, 0, 0, - 0, 36, 0, 0, 0, 36, 0, 0, - 0, 36, 0, 0, 0, 36, 0, 0, - 0, 36, 0, 1, 2, 255, 255, 31, - 0, 0, 2, 0, 0, 0, 128, 0, - 0, 15, 176, 1, 0, 0, 2, 0, - 8, 15, 128, 0, 0, 228, 176, 1, - 0, 0, 2, 1, 8, 15, 128, 0, - 0, 228, 176, 1, 0, 0, 2, 2, - 8, 15, 128, 0, 0, 228, 176, 1, - 0, 0, 2, 3, 8, 15, 128, 0, - 0, 228, 176, 255, 255, 0, 0, 83, - 72, 68, 82, 152, 0, 0, 0, 64, - 0, 0, 0, 38, 0, 0, 0, 98, - 16, 0, 3, 242, 16, 16, 0, 0, - 0, 0, 0, 101, 0, 0, 3, 242, - 32, 16, 0, 0, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, 3, 242, - 32, 16, 0, 2, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, 0, 3, - 0, 0, 0, 54, 0, 0, 5, 242, - 32, 16, 0, 0, 0, 0, 0, 70, - 30, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 242, 32, 16, 0, 1, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 54, 0, 0, 5, 242, - 32, 16, 0, 2, 0, 0, 0, 70, - 30, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 242, 32, 16, 0, 3, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, 0, 5, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 82, 68, 69, 70, 80, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 255, 255, 0, - 65, 0, 0, 28, 0, 0, 0, 77, -105, 99, 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, 108, 101, -114, 32, 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, 56, 52, - 0, 171, 171, 73, 83, 71, 78, 44, - 0, 0, 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 15, - 15, 0, 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, 171, 79, - 83, 71, 78, 116, 0, 0, 0, 4, - 0, 0, 0, 8, 0, 0, 0, 104, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, 0, 104, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 1, - 0, 0, 0, 15, 0, 0, 0, 104, - 0, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 2, - 0, 0, 0, 15, 0, 0, 0, 104, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 3, - 0, 0, 0, 15, 0, 0, 0, 83, - 86, 95, 84, 97, 114, 103, 101, 116, - 0, 171, 171, 68, 88, 66, 67, 73, -129, 132, 250, 182, 151, 72, 83, 149, - 86, 107, 61, 98, 5, 216, 237, 1, - 0, 0, 0, 208, 4, 0, 0, 6, - 0, 0, 0, 56, 0, 0, 0, 56, - 1, 0, 0, 136, 2, 0, 0, 4, - 3, 0, 0, 68, 4, 0, 0, 120, - 4, 0, 0, 65, 111, 110, 57, 248, - 0, 0, 0, 248, 0, 0, 0, 0, - 2, 254, 255, 196, 0, 0, 0, 52, - 0, 0, 0, 1, 0, 36, 0, 0, - 0, 48, 0, 0, 0, 48, 0, 0, - 0, 36, 0, 1, 0, 48, 0, 0, - 0, 0, 0, 5, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 2, 254, 255, 81, 0, 0, 5, 6, - 0, 15, 160, 0, 0, 0, 63, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, 144, 9, - 0, 0, 3, 0, 0, 1, 128, 3, - 0, 228, 160, 0, 0, 228, 144, 9, - 0, 0, 3, 0, 0, 2, 128, 4, - 0, 228, 160, 0, 0, 228, 144, 2, - 0, 0, 3, 0, 0, 1, 128, 0, - 0, 85, 128, 0, 0, 0, 128, 5, - 0, 0, 3, 0, 0, 4, 192, 0, - 0, 0, 128, 6, 0, 0, 160, 9, - 0, 0, 3, 0, 0, 1, 128, 2, - 0, 228, 160, 0, 0, 228, 144, 1, - 0, 0, 2, 1, 0, 2, 128, 0, - 0, 0, 129, 9, 0, 0, 3, 1, - 0, 1, 128, 1, 0, 228, 160, 0, - 0, 228, 144, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 85, 128, 0, - 0, 228, 160, 1, 0, 228, 128, 1, - 0, 0, 2, 0, 0, 8, 192, 0, - 0, 85, 128, 1, 0, 0, 2, 0, - 0, 15, 224, 5, 0, 228, 160, 255, -255, 0, 0, 83, 72, 68, 82, 72, - 1, 0, 0, 64, 0, 1, 0, 82, - 0, 0, 0, 89, 0, 0, 4, 70, -142, 32, 0, 0, 0, 0, 0, 5, - 0, 0, 0, 95, 0, 0, 3, 242, - 16, 16, 0, 0, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, 0, 0, - 0, 0, 0, 103, 0, 0, 4, 242, - 32, 16, 0, 1, 0, 0, 0, 1, - 0, 0, 0, 104, 0, 0, 2, 1, - 0, 0, 0, 54, 0, 0, 6, 242, - 32, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 17, 0, 0, 8, 18, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 54, 0, 0, 6, 34, - 32, 16, 0, 1, 0, 0, 0, 10, - 0, 16, 128, 65, 0, 0, 0, 0, - 0, 0, 0, 17, 0, 0, 8, 18, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 17, 0, 0, 8, 34, - 0, 16, 0, 0, 0, 0, 0, 70, -142, 32, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 70, 30, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 18, - 0, 16, 0, 0, 0, 0, 0, 26, - 0, 16, 0, 0, 0, 0, 0, 10, - 0, 16, 0, 0, 0, 0, 0, 54, - 0, 0, 5, 130, 32, 16, 0, 1, - 0, 0, 0, 26, 0, 16, 0, 0, - 0, 0, 0, 56, 0, 0, 7, 66, - 32, 16, 0, 1, 0, 0, 0, 10, - 0, 16, 0, 0, 0, 0, 0, 1, - 64, 0, 0, 0, 0, 0, 63, 17, - 0, 0, 8, 18, 32, 16, 0, 1, - 0, 0, 0, 70, 142, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 70, - 30, 16, 0, 0, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, 84, 116, - 0, 0, 0, 10, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 82, - 68, 69, 70, 56, 1, 0, 0, 1, - 0, 0, 0, 72, 0, 0, 0, 1, - 0, 0, 0, 28, 0, 0, 0, 0, - 4, 254, 255, 0, 65, 0, 0, 4, - 1, 0, 0, 60, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 36, 71, 108, 111, 98, - 97, 108, 115, 0, 171, 171, 171, 60, - 0, 0, 0, 3, 0, 0, 0, 96, - 0, 0, 0, 96, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 168, - 0, 0, 0, 0, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, 0, 184, - 0, 0, 0, 0, 0, 0, 0, 200, - 0, 0, 0, 64, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, 0, 212, - 0, 0, 0, 0, 0, 0, 0, 228, - 0, 0, 0, 80, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 244, - 0, 0, 0, 0, 0, 0, 0, 95, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 171, 171, 3, - 0, 3, 0, 4, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 95, -117, 95, 99, 111, 108, 111, 114, 0, -171, 171, 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 95, 117, 95, 112, 111, -105, 110, 116, 83, 105, 122, 101, 0, -171, 171, 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 105, 99, 114, 111, -115, 111, 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, 111, 109, -112, 105, 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 15, 0, 0, 84, - 69, 88, 67, 79, 79, 82, 68, 0, -171, 171, 171, 79, 83, 71, 78, 80, - 0, 0, 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 15, - 0, 0, 0, 65, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, 0, 15, - 0, 0, 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 83, 86, 95, 80, -111, 115, 105, 116, 105, 111, 110, 0, -171, 171, 171, -}; - -const unsigned char s_7845A827CC74A6ED188C81E590C16A4B394AF6EA[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 10, 0, 0, 0, - 67, 67, 95, 80, 77, 97, 116, 114, -105, 120, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 4, 0, - 0, 0, 1, 0, 0, 0, 10, 0, - 0, 0, 67, 67, 95, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, - 0, 0, 0, 0, 204, 2, 0, 0, -164, 4, 0, 0, 0, 0, 0, 0, -185, 153, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 68, 88, 66, 67, 127, 145, 81, 72, -216, 190, 16, 61, 245, 231, 235, 249, -125, 223, 218, 82, 1, 0, 0, 0, -204, 2, 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 168, 0, 0, 0, - 72, 1, 0, 0, 196, 1, 0, 0, - 28, 2, 0, 0, 80, 2, 0, 0, - 65, 111, 110, 57, 104, 0, 0, 0, -104, 0, 0, 0, 0, 2, 255, 255, - 68, 0, 0, 0, 36, 0, 0, 0, - 0, 0, 36, 0, 0, 0, 36, 0, - 0, 0, 36, 0, 0, 0, 36, 0, - 0, 0, 36, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, 0, 128, - 0, 0, 15, 176, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, 228, 176, - 1, 0, 0, 2, 1, 8, 15, 128, - 0, 0, 228, 176, 1, 0, 0, 2, - 2, 8, 15, 128, 0, 0, 228, 176, - 1, 0, 0, 2, 3, 8, 15, 128, - 0, 0, 228, 176, 255, 255, 0, 0, - 83, 72, 68, 82, 152, 0, 0, 0, - 64, 0, 0, 0, 38, 0, 0, 0, - 98, 16, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 0, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 1, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 2, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 3, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 0, 0, 0, 0, - 70, 30, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 1, 0, 0, 0, 70, 30, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 2, 0, 0, 0, - 70, 30, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 3, 0, 0, 0, 70, 30, 16, 0, - 0, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, - 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 255, 255, - 0, 65, 0, 0, 28, 0, 0, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 116, 0, 0, 0, - 4, 0, 0, 0, 8, 0, 0, 0, -104, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, 103, 101, -116, 0, 171, 171, 68, 88, 66, 67, - 29, 56, 85, 83, 131, 253, 216, 133, -161, 187, 70, 220, 103, 188, 220, 164, - 1, 0, 0, 0, 164, 4, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, - 68, 1, 0, 0, 156, 2, 0, 0, - 24, 3, 0, 0, 232, 3, 0, 0, - 76, 4, 0, 0, 65, 111, 110, 57, - 4, 1, 0, 0, 4, 1, 0, 0, - 0, 2, 254, 255, 208, 0, 0, 0, - 52, 0, 0, 0, 1, 0, 36, 0, - 0, 0, 48, 0, 0, 0, 48, 0, - 0, 0, 36, 0, 1, 0, 48, 0, - 0, 0, 0, 0, 4, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 81, 0, 0, 5, - 5, 0, 15, 160, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, 15, 144, - 31, 0, 0, 2, 5, 0, 1, 128, - 1, 0, 15, 144, 9, 0, 0, 3, - 0, 0, 1, 128, 3, 0, 228, 160, - 1, 0, 228, 144, 9, 0, 0, 3, - 0, 0, 2, 128, 4, 0, 228, 160, - 1, 0, 228, 144, 2, 0, 0, 3, - 0, 0, 1, 128, 0, 0, 85, 128, - 0, 0, 0, 128, 5, 0, 0, 3, - 0, 0, 4, 192, 0, 0, 0, 128, - 5, 0, 0, 160, 9, 0, 0, 3, - 0, 0, 1, 128, 2, 0, 228, 160, - 1, 0, 228, 144, 1, 0, 0, 2, - 1, 0, 2, 128, 0, 0, 0, 129, - 9, 0, 0, 3, 1, 0, 1, 128, - 1, 0, 228, 160, 1, 0, 228, 144, - 4, 0, 0, 4, 0, 0, 3, 192, - 0, 0, 85, 128, 0, 0, 228, 160, - 1, 0, 228, 128, 1, 0, 0, 2, - 0, 0, 8, 192, 0, 0, 85, 128, - 1, 0, 0, 2, 0, 0, 15, 224, - 0, 0, 228, 144, 255, 255, 0, 0, - 83, 72, 68, 82, 80, 1, 0, 0, - 64, 0, 1, 0, 84, 0, 0, 0, - 89, 0, 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 95, 0, 0, 3, -242, 16, 16, 0, 1, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 103, 0, 0, 4, -242, 32, 16, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 104, 0, 0, 2, - 1, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 0, 0, 0, 0, - 70, 30, 16, 0, 0, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 6, 34, 32, 16, 0, - 1, 0, 0, 0, 10, 0, 16, 128, - 65, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 8, 18, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 17, 0, 0, 8, 34, 0, 16, 0, - 0, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 0, 0, 0, 7, 18, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -130, 32, 16, 0, 1, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 66, 32, 16, 0, - 1, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 1, 64, 0, 0, - 0, 0, 0, 63, 17, 0, 0, 8, - 18, 32, 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, 0, 0, - 10, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, 69, 70, -200, 0, 0, 0, 1, 0, 0, 0, - 72, 0, 0, 0, 1, 0, 0, 0, - 28, 0, 0, 0, 0, 4, 254, 255, - 0, 65, 0, 0, 148, 0, 0, 0, - 60, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 36, 71, 108, 111, 98, 97, 108, 115, - 0, 171, 171, 171, 60, 0, 0, 0, - 1, 0, 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 120, 0, 0, 0, - 0, 0, 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 132, 0, 0, 0, - 0, 0, 0, 0, 95, 67, 67, 95, - 80, 77, 97, 116, 114, 105, 120, 0, - 3, 0, 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, 71, 78, - 92, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 80, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 15, 15, 0, 0, 80, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 80, 0, 0, 0, - 2, 0, 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, - 65, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, 0, 0, - 84, 69, 88, 67, 79, 79, 82, 68, - 0, 83, 86, 95, 80, 111, 115, 105, -116, 105, 111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_993D07D70C4AE9F39EAA9EBBDFD109681386920A[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 80, 139, - 0, 0, 10, 0, 0, 0, 97, 95, -116, 101, 120, 67, 111, 111, 114, 100, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 3, 0, 0, 0, 92, 139, 0, - 0, 242, 141, 0, 0, 12, 0, 0, - 0, 67, 67, 95, 77, 86, 80, 77, - 97, 116, 114, 105, 120, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 4, 0, 0, 0, 94, 139, 0, - 0, 0, 0, 0, 0, 11, 0, 0, - 0, 67, 67, 95, 84, 101, 120, 116, -117, 114, 101, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 82, 139, 0, 0, -240, 141, 0, 0, 7, 0, 0, 0, -117, 95, 99, 111, 108, 111, 114, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 1, 0, 0, 0, 3, - 0, 0, 0, 12, 0, 0, 0, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 0, 0, 0, 0, - 0, 0, 0, 11, 0, 0, 0, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 0, 0, 0, 1, 0, - 0, 0, 7, 0, 0, 0, 117, 95, - 99, 111, 108, 111, 114, 0, 0, 0, - 0, 2, 0, 0, 0, 96, 4, 0, - 0, 144, 4, 0, 0, 0, 0, 0, - 0, 185, 153, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 68, 88, 66, 67, 157, 116, 105, - 89, 118, 135, 249, 239, 42, 226, 184, - 78, 220, 105, 236, 28, 1, 0, 0, - 0, 96, 4, 0, 0, 6, 0, 0, - 0, 56, 0, 0, 0, 228, 0, 0, - 0, 252, 1, 0, 0, 120, 2, 0, - 0, 176, 3, 0, 0, 228, 3, 0, - 0, 65, 111, 110, 57, 164, 0, 0, - 0, 164, 0, 0, 0, 0, 2, 255, -255, 112, 0, 0, 0, 52, 0, 0, - 0, 1, 0, 40, 0, 0, 0, 52, - 0, 0, 0, 52, 0, 1, 0, 36, - 0, 0, 0, 52, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, 2, 255, -255, 31, 0, 0, 2, 0, 0, 0, -128, 0, 0, 3, 176, 31, 0, 0, - 2, 0, 0, 0, 144, 0, 8, 15, -160, 66, 0, 0, 3, 0, 0, 15, -128, 0, 0, 228, 176, 0, 8, 228, -160, 5, 0, 0, 3, 0, 0, 15, -128, 0, 0, 228, 128, 0, 0, 228, -160, 1, 0, 0, 2, 0, 8, 15, -128, 0, 0, 228, 128, 1, 0, 0, - 2, 1, 8, 15, 128, 0, 0, 228, -128, 1, 0, 0, 2, 2, 8, 15, -128, 0, 0, 228, 128, 1, 0, 0, - 2, 3, 8, 15, 128, 0, 0, 228, -128, 255, 255, 0, 0, 83, 72, 68, - 82, 16, 1, 0, 0, 64, 0, 0, - 0, 68, 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 90, 0, 0, - 3, 0, 96, 16, 0, 0, 0, 0, - 0, 88, 24, 0, 4, 0, 112, 16, - 0, 0, 0, 0, 0, 85, 85, 0, - 0, 98, 16, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 101, 0, 0, - 3, 242, 32, 16, 0, 0, 0, 0, - 0, 101, 0, 0, 3, 242, 32, 16, - 0, 1, 0, 0, 0, 101, 0, 0, - 3, 242, 32, 16, 0, 2, 0, 0, - 0, 101, 0, 0, 3, 242, 32, 16, - 0, 3, 0, 0, 0, 104, 0, 0, - 2, 1, 0, 0, 0, 69, 0, 0, - 9, 242, 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 0, 0, 0, - 0, 70, 126, 16, 0, 0, 0, 0, - 0, 0, 96, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, 0, 16, - 0, 0, 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 242, 32, 16, - 0, 0, 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 54, 0, 0, - 5, 242, 32, 16, 0, 1, 0, 0, - 0, 70, 14, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 242, 32, 16, - 0, 2, 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 54, 0, 0, - 5, 242, 32, 16, 0, 3, 0, 0, - 0, 70, 14, 16, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 7, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 5, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 82, 68, 69, 70, 48, 1, 0, - 0, 1, 0, 0, 0, 176, 0, 0, - 0, 3, 0, 0, 0, 28, 0, 0, - 0, 0, 4, 255, 255, 0, 65, 0, - 0, 252, 0, 0, 0, 124, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 1, 0, 0, 0, 145, 0, 0, - 0, 2, 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 1, 0, 0, - 0, 13, 0, 0, 0, 166, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 115, 97, 109, -112, 108, 101, 114, 95, 95, 67, 67, - 95, 84, 101, 120, 116, 117, 114, 101, - 48, 0, 116, 101, 120, 116, 117, 114, -101, 95, 95, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 36, - 71, 108, 111, 98, 97, 108, 115, 0, -171, 166, 0, 0, 0, 1, 0, 0, - 0, 200, 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 224, 0, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, 0, 0, - 0, 236, 0, 0, 0, 0, 0, 0, - 0, 95, 117, 95, 99, 111, 108, 111, -114, 0, 171, 171, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 77, 105, 99, -114, 111, 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, 32, 67, -111, 109, 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, 0, 171, -171, 73, 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, 0, 0, - 0, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 0, - 0, 84, 69, 88, 67, 79, 79, 82, - 68, 0, 171, 171, 171, 79, 83, 71, - 78, 116, 0, 0, 0, 4, 0, 0, - 0, 8, 0, 0, 0, 104, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 104, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, 0, 0, - 0, 15, 0, 0, 0, 104, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 2, 0, 0, - 0, 15, 0, 0, 0, 104, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 3, 0, 0, - 0, 15, 0, 0, 0, 83, 86, 95, - 84, 97, 114, 103, 101, 116, 0, 171, -171, 68, 88, 66, 67, 110, 14, 140, -120, 239, 110, 56, 78, 103, 37, 245, -162, 140, 151, 93, 223, 1, 0, 0, - 0, 144, 4, 0, 0, 6, 0, 0, - 0, 56, 0, 0, 0, 68, 1, 0, - 0, 156, 2, 0, 0, 24, 3, 0, - 0, 236, 3, 0, 0, 56, 4, 0, - 0, 65, 111, 110, 57, 4, 1, 0, - 0, 4, 1, 0, 0, 0, 2, 254, -255, 208, 0, 0, 0, 52, 0, 0, - 0, 1, 0, 36, 0, 0, 0, 48, - 0, 0, 0, 48, 0, 0, 0, 36, - 0, 1, 0, 48, 0, 0, 0, 0, - 0, 4, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 2, 254, -255, 81, 0, 0, 5, 5, 0, 15, -160, 0, 0, 0, 63, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 31, 0, 0, 2, 5, 0, 0, -128, 0, 0, 15, 144, 31, 0, 0, - 2, 5, 0, 1, 128, 1, 0, 15, -144, 9, 0, 0, 3, 0, 0, 1, -128, 3, 0, 228, 160, 0, 0, 228, -144, 9, 0, 0, 3, 0, 0, 2, -128, 4, 0, 228, 160, 0, 0, 228, -144, 2, 0, 0, 3, 0, 0, 1, -128, 0, 0, 85, 128, 0, 0, 0, -128, 5, 0, 0, 3, 0, 0, 4, -192, 0, 0, 0, 128, 5, 0, 0, -160, 9, 0, 0, 3, 0, 0, 1, -128, 2, 0, 228, 160, 0, 0, 228, -144, 1, 0, 0, 2, 1, 0, 2, -128, 0, 0, 0, 129, 9, 0, 0, - 3, 1, 0, 1, 128, 1, 0, 228, -160, 0, 0, 228, 144, 4, 0, 0, - 4, 0, 0, 3, 192, 0, 0, 85, -128, 0, 0, 228, 160, 1, 0, 228, -128, 1, 0, 0, 2, 0, 0, 8, -192, 0, 0, 85, 128, 1, 0, 0, - 2, 0, 0, 3, 224, 1, 0, 228, -144, 255, 255, 0, 0, 83, 72, 68, - 82, 80, 1, 0, 0, 64, 0, 1, - 0, 84, 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 95, 0, 0, - 3, 242, 16, 16, 0, 0, 0, 0, - 0, 95, 0, 0, 3, 50, 16, 16, - 0, 1, 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 0, 0, 0, - 0, 103, 0, 0, 4, 242, 32, 16, - 0, 1, 0, 0, 0, 1, 0, 0, - 0, 104, 0, 0, 2, 1, 0, 0, - 0, 54, 0, 0, 5, 50, 32, 16, - 0, 0, 0, 0, 0, 70, 16, 16, - 0, 1, 0, 0, 0, 17, 0, 0, - 8, 18, 0, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 70, 30, 16, - 0, 0, 0, 0, 0, 54, 0, 0, - 6, 34, 32, 16, 0, 1, 0, 0, - 0, 10, 0, 16, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 17, 0, 0, - 8, 18, 0, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 70, 30, 16, - 0, 0, 0, 0, 0, 17, 0, 0, - 8, 34, 0, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 70, 30, 16, - 0, 0, 0, 0, 0, 0, 0, 0, - 7, 18, 0, 16, 0, 0, 0, 0, - 0, 26, 0, 16, 0, 0, 0, 0, - 0, 10, 0, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 130, 32, 16, - 0, 1, 0, 0, 0, 26, 0, 16, - 0, 0, 0, 0, 0, 56, 0, 0, - 7, 66, 32, 16, 0, 1, 0, 0, - 0, 10, 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 0, 0, 0, - 63, 17, 0, 0, 8, 18, 32, 16, - 0, 1, 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 70, 30, 16, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 10, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 82, 68, 69, 70, 204, 0, 0, - 0, 1, 0, 0, 0, 72, 0, 0, - 0, 1, 0, 0, 0, 28, 0, 0, - 0, 0, 4, 254, 255, 0, 65, 0, - 0, 152, 0, 0, 0, 60, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 36, 71, 108, -111, 98, 97, 108, 115, 0, 171, 171, -171, 60, 0, 0, 0, 1, 0, 0, - 0, 96, 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 120, 0, 0, 0, 0, 0, 0, - 0, 64, 0, 0, 0, 2, 0, 0, - 0, 136, 0, 0, 0, 0, 0, 0, - 0, 95, 67, 67, 95, 77, 86, 80, - 77, 97, 116, 114, 105, 120, 0, 171, -171, 3, 0, 3, 0, 4, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 77, 105, 99, 114, 111, 115, 111, -102, 116, 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, 97, 100, -101, 114, 32, 67, 111, 109, 112, 105, -108, 101, 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, 83, 71, - 78, 68, 0, 0, 0, 2, 0, 0, - 0, 8, 0, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 15, 15, 0, 0, 56, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, 0, 0, - 0, 3, 3, 0, 0, 84, 69, 88, - 67, 79, 79, 82, 68, 0, 171, 171, -171, 79, 83, 71, 78, 80, 0, 0, - 0, 2, 0, 0, 0, 8, 0, 0, - 0, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, 12, 0, - 0, 65, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 15, 0, 0, - 0, 84, 69, 88, 67, 79, 79, 82, - 68, 0, 83, 86, 95, 80, 111, 115, -105, 116, 105, 111, 110, 0, 171, 171, -171, -}; - -const unsigned char s_BF0A97A7CDA97B6CD0F5D1455A170F32E2538AD6[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 255, 255, -255, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 92, 139, 0, 0, 242, 141, - 0, 0, 12, 0, 0, 0, 67, 67, - 95, 77, 86, 80, 77, 97, 116, 114, -105, 120, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 4, 0, - 0, 0, 1, 0, 0, 0, 12, 0, - 0, 0, 67, 67, 95, 77, 86, 80, - 77, 97, 116, 114, 105, 120, 0, 0, - 0, 0, 0, 0, 0, 0, 204, 2, - 0, 0, 144, 4, 0, 0, 0, 0, - 0, 0, 185, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 88, 66, 67, 127, 145, - 81, 72, 216, 190, 16, 61, 245, 231, -235, 249, 125, 223, 218, 82, 1, 0, - 0, 0, 204, 2, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 168, 0, - 0, 0, 72, 1, 0, 0, 196, 1, - 0, 0, 28, 2, 0, 0, 80, 2, - 0, 0, 65, 111, 110, 57, 104, 0, - 0, 0, 104, 0, 0, 0, 0, 2, -255, 255, 68, 0, 0, 0, 36, 0, - 0, 0, 0, 0, 36, 0, 0, 0, - 36, 0, 0, 0, 36, 0, 0, 0, - 36, 0, 0, 0, 36, 0, 1, 2, -255, 255, 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, 1, 0, - 0, 2, 0, 8, 15, 128, 0, 0, -228, 176, 1, 0, 0, 2, 1, 8, - 15, 128, 0, 0, 228, 176, 1, 0, - 0, 2, 2, 8, 15, 128, 0, 0, -228, 176, 1, 0, 0, 2, 3, 8, - 15, 128, 0, 0, 228, 176, 255, 255, - 0, 0, 83, 72, 68, 82, 152, 0, - 0, 0, 64, 0, 0, 0, 38, 0, - 0, 0, 98, 16, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 3, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 1, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 3, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -255, 255, 0, 65, 0, 0, 28, 0, - 0, 0, 77, 105, 99, 114, 111, 115, -111, 102, 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, 104, 97, -100, 101, 114, 32, 67, 111, 109, 112, -105, 108, 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 15, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 171, -171, 171, 79, 83, 71, 78, 116, 0, - 0, 0, 4, 0, 0, 0, 8, 0, - 0, 0, 104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 3, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, 97, 114, -103, 101, 116, 0, 171, 171, 68, 88, - 66, 67, 117, 106, 232, 95, 24, 158, -125, 44, 227, 235, 60, 21, 223, 24, -110, 211, 1, 0, 0, 0, 144, 4, - 0, 0, 6, 0, 0, 0, 56, 0, - 0, 0, 68, 1, 0, 0, 156, 2, - 0, 0, 24, 3, 0, 0, 236, 3, - 0, 0, 56, 4, 0, 0, 65, 111, -110, 57, 4, 1, 0, 0, 4, 1, - 0, 0, 0, 2, 254, 255, 208, 0, - 0, 0, 52, 0, 0, 0, 1, 0, - 36, 0, 0, 0, 48, 0, 0, 0, - 48, 0, 0, 0, 36, 0, 1, 0, - 48, 0, 0, 0, 0, 0, 4, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, 81, 0, - 0, 5, 5, 0, 15, 160, 0, 0, - 0, 63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 2, 5, 0, 0, 128, 0, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 1, 128, 1, 0, 15, 144, 9, 0, - 0, 3, 0, 0, 1, 128, 3, 0, -228, 160, 1, 0, 228, 144, 9, 0, - 0, 3, 0, 0, 2, 128, 4, 0, -228, 160, 1, 0, 228, 144, 2, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 85, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 4, 192, 0, 0, - 0, 128, 5, 0, 0, 160, 9, 0, - 0, 3, 0, 0, 1, 128, 2, 0, -228, 160, 1, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 2, 128, 0, 0, - 0, 129, 9, 0, 0, 3, 1, 0, - 1, 128, 1, 0, 228, 160, 1, 0, -228, 144, 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 85, 128, 0, 0, -228, 160, 1, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 8, 192, 0, 0, - 85, 128, 1, 0, 0, 2, 0, 0, - 15, 224, 0, 0, 228, 144, 255, 255, - 0, 0, 83, 72, 68, 82, 80, 1, - 0, 0, 64, 0, 1, 0, 84, 0, - 0, 0, 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 103, 0, - 0, 4, 242, 32, 16, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 54, 0, 0, 6, 34, 32, - 16, 0, 1, 0, 0, 0, 10, 0, - 16, 128, 65, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 17, 0, 0, 8, 34, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, 1, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 66, 32, - 16, 0, 1, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 0, 0, 0, 63, 17, 0, - 0, 8, 18, 32, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 10, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 204, 0, 0, 0, 1, 0, - 0, 0, 72, 0, 0, 0, 1, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -254, 255, 0, 65, 0, 0, 152, 0, - 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 1, 0, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 0, - 0, 0, 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, 136, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 171, 171, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 68, 0, - 0, 0, 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 56, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 80, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 65, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_CE141D74B59548C43E99D183312791C6F429C37D[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 2, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 2, 0, 0, 0, 12, - 0, 0, 0, 67, 67, 95, 77, 86, - 80, 77, 97, 116, 114, 105, 120, 0, - 0, 0, 0, 0, 0, 0, 0, 11, - 0, 0, 0, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 0, - 0, 0, 1, 0, 0, 0, 248, 3, - 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 185, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 88, 66, 67, 11, 95, - 74, 206, 145, 124, 32, 219, 67, 19, - 26, 23, 189, 75, 35, 86, 1, 0, - 0, 0, 248, 3, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 228, 0, - 0, 0, 244, 1, 0, 0, 112, 2, - 0, 0, 48, 3, 0, 0, 124, 3, - 0, 0, 65, 111, 110, 57, 164, 0, - 0, 0, 164, 0, 0, 0, 0, 2, -255, 255, 124, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 40, 0, 0, 0, - 40, 0, 0, 0, 40, 0, 1, 0, - 36, 0, 0, 0, 40, 0, 0, 0, - 0, 0, 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, 0, 0, - 0, 128, 1, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, 0, 0, - 15, 128, 1, 0, 228, 176, 0, 8, -228, 160, 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, 0, 0, -228, 176, 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 1, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 2, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 3, 8, 15, 128, 0, 0, -228, 128, 255, 255, 0, 0, 83, 72, - 68, 82, 8, 1, 0, 0, 64, 0, - 0, 0, 66, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 2, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 3, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, 56, 0, - 0, 7, 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 2, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 3, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 7, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, 0, 65, - 0, 0, 134, 0, 0, 0, 92, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 113, 0, - 0, 0, 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 13, 0, 0, 0, 115, 97, -109, 112, 108, 101, 114, 95, 95, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 116, 101, 120, 116, 117, -114, 101, 95, 95, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 73, 83, 71, 78, 68, 0, - 0, 0, 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 56, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 116, 0, 0, 0, 4, 0, - 0, 0, 8, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 3, 0, - 0, 0, 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, 116, 0, -171, 171, 68, 88, 66, 67, 235, 56, -180, 223, 125, 231, 231, 218, 70, 75, - 12, 63, 200, 233, 69, 121, 1, 0, - 0, 0, 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 92, 1, - 0, 0, 224, 2, 0, 0, 92, 3, - 0, 0, 48, 4, 0, 0, 148, 4, - 0, 0, 65, 111, 110, 57, 28, 1, - 0, 0, 28, 1, 0, 0, 0, 2, -254, 255, 232, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 36, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 0, 0, - 36, 0, 1, 0, 48, 0, 0, 0, - 0, 0, 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, -254, 255, 81, 0, 0, 5, 5, 0, - 15, 160, 0, 0, 0, 63, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 1, 128, 1, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 2, 128, 2, 0, 15, 144, 9, 0, - 0, 3, 0, 0, 1, 128, 3, 0, -228, 160, 1, 0, 228, 144, 9, 0, - 0, 3, 0, 0, 2, 128, 4, 0, -228, 160, 1, 0, 228, 144, 2, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 85, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 4, 192, 0, 0, - 0, 128, 5, 0, 0, 160, 9, 0, - 0, 3, 0, 0, 1, 128, 2, 0, -228, 160, 1, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 2, 128, 0, 0, - 0, 129, 9, 0, 0, 3, 1, 0, - 1, 128, 1, 0, 228, 160, 1, 0, -228, 144, 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 85, 128, 0, 0, -228, 160, 1, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 8, 192, 0, 0, - 85, 128, 1, 0, 0, 2, 0, 0, - 15, 224, 0, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 3, 224, 2, 0, -228, 144, 255, 255, 0, 0, 83, 72, - 68, 82, 124, 1, 0, 0, 64, 0, - 1, 0, 95, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 1, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, 1, 0, - 0, 0, 103, 0, 0, 4, 242, 32, - 16, 0, 2, 0, 0, 0, 1, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, 2, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 54, 0, 0, 6, 34, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 128, 65, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 17, 0, 0, 8, 34, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, 2, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 66, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 0, 0, 0, 63, 17, 0, - 0, 8, 18, 32, 16, 0, 2, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 11, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 204, 0, 0, 0, 1, 0, - 0, 0, 72, 0, 0, 0, 1, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -254, 255, 0, 65, 0, 0, 152, 0, - 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 1, 0, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 0, - 0, 0, 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, 136, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 171, 171, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_DB22823528A225B43DABEF012B299639D233D54C[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 3, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 10, 0, 0, 0, - 67, 67, 95, 80, 77, 97, 116, 114, -105, 120, 0, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 4, 0, - 0, 0, 94, 139, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 67, 67, - 95, 84, 101, 120, 116, 117, 114, 101, - 48, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 1, 0, 0, - 0, 6, 20, 0, 0, 240, 141, 0, - 0, 14, 0, 0, 0, 67, 67, 95, - 97, 108, 112, 104, 97, 95, 118, 97, -108, 117, 101, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 3, 0, 0, 0, 10, - 0, 0, 0, 67, 67, 95, 80, 77, - 97, 116, 114, 105, 120, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 0, - 0, 67, 67, 95, 84, 101, 120, 116, -117, 114, 101, 48, 0, 0, 0, 0, - 1, 0, 0, 0, 14, 0, 0, 0, - 67, 67, 95, 97, 108, 112, 104, 97, - 95, 118, 97, 108, 117, 101, 0, 0, - 0, 0, 2, 0, 0, 0, 36, 5, - 0, 0, 0, 5, 0, 0, 0, 0, - 0, 0, 185, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 88, 66, 67, 100, 113, -175, 29, 164, 71, 177, 78, 120, 99, -172, 209, 227, 249, 113, 132, 1, 0, - 0, 0, 36, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 88, 1, - 0, 0, 164, 2, 0, 0, 32, 3, - 0, 0, 92, 4, 0, 0, 168, 4, - 0, 0, 65, 111, 110, 57, 24, 1, - 0, 0, 24, 1, 0, 0, 0, 2, -255, 255, 228, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 40, 0, 0, 0, - 52, 0, 0, 0, 52, 0, 1, 0, - 36, 0, 0, 0, 52, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 1, 2, -255, 255, 81, 0, 0, 5, 1, 0, - 15, 160, 0, 0, 128, 191, 0, 0, - 0, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 128, 1, 0, - 3, 176, 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, 66, 0, - 0, 3, 0, 0, 15, 128, 1, 0, -228, 176, 0, 8, 228, 160, 2, 0, - 0, 3, 1, 0, 8, 128, 0, 0, -255, 129, 0, 0, 0, 160, 88, 0, - 0, 4, 1, 0, 15, 128, 1, 0, -255, 128, 1, 0, 0, 160, 1, 0, - 85, 160, 65, 0, 0, 1, 1, 0, - 15, 128, 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, 0, 0, -228, 176, 1, 0, 0, 2, 1, 0, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 2, 0, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 3, 0, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, 1, 0, -228, 128, 1, 0, 0, 2, 1, 8, - 15, 128, 2, 0, 228, 128, 1, 0, - 0, 2, 2, 8, 15, 128, 3, 0, -228, 128, 1, 0, 0, 2, 3, 8, - 15, 128, 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, 68, 1, - 0, 0, 64, 0, 0, 0, 81, 0, - 0, 0, 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, 98, 16, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 3, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, 0, 0, - 0, 0, 29, 0, 0, 8, 18, 0, - 16, 0, 1, 0, 0, 0, 10, 128, - 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 58, 0, 16, 0, 0, 0, - 0, 0, 13, 0, 4, 3, 10, 0, - 16, 0, 1, 0, 0, 0, 56, 0, - 0, 7, 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 2, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 3, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 9, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 52, 1, - 0, 0, 1, 0, 0, 0, 176, 0, - 0, 0, 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, 0, 65, - 0, 0, 0, 1, 0, 0, 124, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 145, 0, - 0, 0, 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 13, 0, 0, 0, 166, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 115, 97, -109, 112, 108, 101, 114, 95, 95, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 116, 101, 120, 116, 117, -114, 101, 95, 95, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 36, 71, 108, 111, 98, 97, 108, 115, - 0, 171, 166, 0, 0, 0, 1, 0, - 0, 0, 200, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 224, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 240, 0, 0, 0, 0, 0, - 0, 0, 95, 67, 67, 95, 97, 108, -112, 104, 97, 95, 118, 97, 108, 117, -101, 0, 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 77, 105, 99, 114, 111, 115, -111, 102, 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, 104, 97, -100, 101, 114, 32, 67, 111, 109, 112, -105, 108, 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, 73, 83, - 71, 78, 68, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 15, 0, 0, 56, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 171, -171, 171, 79, 83, 71, 78, 116, 0, - 0, 0, 4, 0, 0, 0, 8, 0, - 0, 0, 104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 15, 0, - 0, 0, 104, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 3, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, 97, 114, -103, 101, 116, 0, 171, 171, 68, 88, - 66, 67, 53, 89, 218, 251, 179, 193, -226, 187, 197, 89, 218, 37, 36, 176, -206, 80, 1, 0, 0, 0, 0, 5, - 0, 0, 6, 0, 0, 0, 56, 0, - 0, 0, 92, 1, 0, 0, 224, 2, - 0, 0, 92, 3, 0, 0, 44, 4, - 0, 0, 144, 4, 0, 0, 65, 111, -110, 57, 28, 1, 0, 0, 28, 1, - 0, 0, 0, 2, 254, 255, 232, 0, - 0, 0, 52, 0, 0, 0, 1, 0, - 36, 0, 0, 0, 48, 0, 0, 0, - 48, 0, 0, 0, 36, 0, 1, 0, - 48, 0, 0, 0, 0, 0, 4, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, 81, 0, - 0, 5, 5, 0, 15, 160, 0, 0, - 0, 63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 2, 5, 0, 0, 128, 0, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 1, 128, 1, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 2, 128, 2, 0, - 15, 144, 9, 0, 0, 3, 0, 0, - 1, 128, 3, 0, 228, 160, 1, 0, -228, 144, 9, 0, 0, 3, 0, 0, - 2, 128, 4, 0, 228, 160, 1, 0, -228, 144, 2, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 85, 128, 0, 0, - 0, 128, 5, 0, 0, 3, 0, 0, - 4, 192, 0, 0, 0, 128, 5, 0, - 0, 160, 9, 0, 0, 3, 0, 0, - 1, 128, 2, 0, 228, 160, 1, 0, -228, 144, 1, 0, 0, 2, 1, 0, - 2, 128, 0, 0, 0, 129, 9, 0, - 0, 3, 1, 0, 1, 128, 1, 0, -228, 160, 1, 0, 228, 144, 4, 0, - 0, 4, 0, 0, 3, 192, 0, 0, - 85, 128, 0, 0, 228, 160, 1, 0, -228, 128, 1, 0, 0, 2, 0, 0, - 8, 192, 0, 0, 85, 128, 1, 0, - 0, 2, 0, 0, 15, 224, 0, 0, -228, 144, 1, 0, 0, 2, 1, 0, - 3, 224, 2, 0, 228, 144, 255, 255, - 0, 0, 83, 72, 68, 82, 124, 1, - 0, 0, 64, 0, 1, 0, 95, 0, - 0, 0, 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 1, 0, - 0, 0, 95, 0, 0, 3, 50, 16, - 16, 0, 2, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, 103, 0, - 0, 4, 242, 32, 16, 0, 2, 0, - 0, 0, 1, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 50, 32, - 16, 0, 1, 0, 0, 0, 70, 16, - 16, 0, 2, 0, 0, 0, 17, 0, - 0, 8, 18, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 54, 0, - 0, 6, 34, 32, 16, 0, 2, 0, - 0, 0, 10, 0, 16, 128, 65, 0, - 0, 0, 0, 0, 0, 0, 17, 0, - 0, 8, 18, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 17, 0, - 0, 8, 34, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 0, 0, - 0, 7, 18, 0, 16, 0, 0, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 130, 32, - 16, 0, 2, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 56, 0, - 0, 7, 66, 32, 16, 0, 2, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 1, 64, 0, 0, 0, 0, - 0, 63, 17, 0, 0, 8, 18, 32, - 16, 0, 2, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 11, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 200, 0, - 0, 0, 1, 0, 0, 0, 72, 0, - 0, 0, 1, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 254, 255, 0, 65, - 0, 0, 148, 0, 0, 0, 60, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 36, 71, -108, 111, 98, 97, 108, 115, 0, 171, -171, 171, 60, 0, 0, 0, 1, 0, - 0, 0, 96, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 120, 0, 0, 0, 0, 0, - 0, 0, 64, 0, 0, 0, 2, 0, - 0, 0, 132, 0, 0, 0, 0, 0, - 0, 0, 95, 67, 67, 95, 80, 77, - 97, 116, 114, 105, 120, 0, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_E878895044FDA49FE4D8202CE20AF49CC01A8FA9[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 2, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 2, 0, 0, 0, 12, - 0, 0, 0, 67, 67, 95, 77, 86, - 80, 77, 97, 116, 114, 105, 120, 0, - 0, 0, 0, 0, 0, 0, 0, 11, - 0, 0, 0, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 0, - 0, 0, 1, 0, 0, 0, 24, 4, - 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 185, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 88, 66, 67, 200, 5, -103, 205, 248, 30, 69, 65, 32, 117, - 98, 148, 123, 240, 193, 101, 1, 0, - 0, 0, 24, 4, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 240, 0, - 0, 0, 20, 2, 0, 0, 144, 2, - 0, 0, 80, 3, 0, 0, 156, 3, - 0, 0, 65, 111, 110, 57, 176, 0, - 0, 0, 176, 0, 0, 0, 0, 2, -255, 255, 136, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 40, 0, 0, 0, - 40, 0, 0, 0, 40, 0, 1, 0, - 36, 0, 0, 0, 40, 0, 0, 0, - 0, 0, 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, 0, 0, - 0, 128, 1, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, 0, 0, - 15, 128, 1, 0, 228, 176, 0, 8, -228, 160, 5, 0, 0, 3, 0, 0, - 8, 128, 0, 0, 255, 128, 0, 0, -255, 176, 1, 0, 0, 2, 0, 0, - 7, 128, 0, 0, 228, 176, 1, 0, - 0, 2, 0, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 1, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 2, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 3, 8, - 15, 128, 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, 28, 1, - 0, 0, 64, 0, 0, 0, 71, 0, - 0, 0, 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, 98, 16, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 0, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 3, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 130, 0, - 16, 0, 0, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, 58, 16, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 114, 0, 16, 0, 0, 0, - 0, 0, 70, 18, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 2, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 3, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 8, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, 0, 65, - 0, 0, 134, 0, 0, 0, 92, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 113, 0, - 0, 0, 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 13, 0, 0, 0, 115, 97, -109, 112, 108, 101, 114, 95, 95, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 116, 101, 120, 116, 117, -114, 101, 95, 95, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 73, 83, 71, 78, 68, 0, - 0, 0, 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 56, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 116, 0, 0, 0, 4, 0, - 0, 0, 8, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 3, 0, - 0, 0, 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, 116, 0, -171, 171, 68, 88, 66, 67, 235, 56, -180, 223, 125, 231, 231, 218, 70, 75, - 12, 63, 200, 233, 69, 121, 1, 0, - 0, 0, 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 92, 1, - 0, 0, 224, 2, 0, 0, 92, 3, - 0, 0, 48, 4, 0, 0, 148, 4, - 0, 0, 65, 111, 110, 57, 28, 1, - 0, 0, 28, 1, 0, 0, 0, 2, -254, 255, 232, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 36, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 0, 0, - 36, 0, 1, 0, 48, 0, 0, 0, - 0, 0, 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, -254, 255, 81, 0, 0, 5, 5, 0, - 15, 160, 0, 0, 0, 63, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 1, 128, 1, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 2, 128, 2, 0, 15, 144, 9, 0, - 0, 3, 0, 0, 1, 128, 3, 0, -228, 160, 1, 0, 228, 144, 9, 0, - 0, 3, 0, 0, 2, 128, 4, 0, -228, 160, 1, 0, 228, 144, 2, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 85, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 4, 192, 0, 0, - 0, 128, 5, 0, 0, 160, 9, 0, - 0, 3, 0, 0, 1, 128, 2, 0, -228, 160, 1, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 2, 128, 0, 0, - 0, 129, 9, 0, 0, 3, 1, 0, - 1, 128, 1, 0, 228, 160, 1, 0, -228, 144, 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 85, 128, 0, 0, -228, 160, 1, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 8, 192, 0, 0, - 85, 128, 1, 0, 0, 2, 0, 0, - 15, 224, 0, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 3, 224, 2, 0, -228, 144, 255, 255, 0, 0, 83, 72, - 68, 82, 124, 1, 0, 0, 64, 0, - 1, 0, 95, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 1, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, 1, 0, - 0, 0, 103, 0, 0, 4, 242, 32, - 16, 0, 2, 0, 0, 0, 1, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, 2, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 54, 0, 0, 6, 34, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 128, 65, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 17, 0, 0, 8, 34, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, 2, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 66, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 0, 0, 0, 63, 17, 0, - 0, 8, 18, 32, 16, 0, 2, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 11, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 204, 0, 0, 0, 1, 0, - 0, 0, 72, 0, 0, 0, 1, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -254, 255, 0, 65, 0, 0, 152, 0, - 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 1, 0, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 0, - 0, 0, 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, 136, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 171, 171, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_EE3D1B2155C6B54D29BFC9FACB7A83A83EC3847B[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 2, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 2, 0, 0, 0, 12, - 0, 0, 0, 67, 67, 95, 77, 86, - 80, 77, 97, 116, 114, 105, 120, 0, - 0, 0, 0, 0, 0, 0, 0, 11, - 0, 0, 0, 67, 67, 95, 84, 101, -120, 116, 117, 114, 101, 48, 0, 0, - 0, 0, 1, 0, 0, 0, 24, 5, - 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 185, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 88, 66, 67, 226, 171, -253, 248, 210, 31, 210, 164, 38, 67, -101, 24, 147, 152, 164, 65, 1, 0, - 0, 0, 24, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 92, 1, - 0, 0, 20, 3, 0, 0, 144, 3, - 0, 0, 80, 4, 0, 0, 156, 4, - 0, 0, 65, 111, 110, 57, 28, 1, - 0, 0, 28, 1, 0, 0, 0, 2, -255, 255, 244, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 40, 0, 0, 0, - 40, 0, 0, 0, 40, 0, 1, 0, - 36, 0, 0, 0, 40, 0, 0, 0, - 0, 0, 1, 2, 255, 255, 81, 0, - 0, 5, 0, 0, 15, 160, 31, 133, -235, 190, 254, 255, 71, 65, 0, 0, - 0, 192, 0, 0, 64, 64, 31, 0, - 0, 2, 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, 0, 0, - 0, 128, 1, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, 0, 0, - 15, 128, 1, 0, 228, 176, 0, 8, -228, 160, 2, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 255, 128, 0, 0, - 0, 160, 5, 0, 0, 3, 0, 0, - 17, 128, 0, 0, 0, 128, 0, 0, - 85, 160, 4, 0, 0, 4, 0, 0, - 2, 128, 0, 0, 0, 128, 0, 0, -170, 160, 0, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 0, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 0, 128, 0, 0, 85, 128, 5, 0, - 0, 3, 0, 0, 8, 128, 0, 0, - 0, 128, 0, 0, 255, 176, 1, 0, - 0, 2, 0, 0, 7, 128, 0, 0, -228, 176, 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 1, 8, 15, 128, 0, 0, -228, 128, 1, 0, 0, 2, 2, 8, - 15, 128, 0, 0, 228, 128, 1, 0, - 0, 2, 3, 8, 15, 128, 0, 0, -228, 128, 255, 255, 0, 0, 83, 72, - 68, 82, 176, 1, 0, 0, 64, 0, - 0, 0, 108, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, 242, 16, - 16, 0, 0, 0, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 2, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, 3, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 18, 0, 16, 0, 0, 0, - 0, 0, 58, 0, 16, 0, 0, 0, - 0, 0, 1, 64, 0, 0, 31, 133, -235, 190, 56, 32, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 254, 255, 71, 65, 50, 0, - 0, 9, 34, 0, 16, 0, 0, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 1, 64, 0, 0, 0, 0, - 0, 192, 1, 64, 0, 0, 0, 0, - 64, 64, 56, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 56, 0, - 0, 7, 18, 0, 16, 0, 0, 0, - 0, 0, 10, 0, 16, 0, 0, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 130, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 58, 16, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 114, 0, 16, 0, 0, 0, - 0, 0, 70, 18, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 2, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 242, 32, 16, 0, 3, 0, - 0, 0, 70, 14, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, 13, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, 0, 65, - 0, 0, 134, 0, 0, 0, 92, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 113, 0, - 0, 0, 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, 255, 255, -255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 13, 0, 0, 0, 115, 97, -109, 112, 108, 101, 114, 95, 95, 67, - 67, 95, 84, 101, 120, 116, 117, 114, -101, 48, 0, 116, 101, 120, 116, 117, -114, 101, 95, 95, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 73, 83, 71, 78, 68, 0, - 0, 0, 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 56, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 116, 0, 0, 0, 4, 0, - 0, 0, 8, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 104, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 3, 0, - 0, 0, 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, 116, 0, -171, 171, 68, 88, 66, 67, 235, 56, -180, 223, 125, 231, 231, 218, 70, 75, - 12, 63, 200, 233, 69, 121, 1, 0, - 0, 0, 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, 92, 1, - 0, 0, 224, 2, 0, 0, 92, 3, - 0, 0, 48, 4, 0, 0, 148, 4, - 0, 0, 65, 111, 110, 57, 28, 1, - 0, 0, 28, 1, 0, 0, 0, 2, -254, 255, 232, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 36, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 0, 0, - 36, 0, 1, 0, 48, 0, 0, 0, - 0, 0, 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, -254, 255, 81, 0, 0, 5, 5, 0, - 15, 160, 0, 0, 0, 63, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, 31, 0, - 0, 2, 5, 0, 1, 128, 1, 0, - 15, 144, 31, 0, 0, 2, 5, 0, - 2, 128, 2, 0, 15, 144, 9, 0, - 0, 3, 0, 0, 1, 128, 3, 0, -228, 160, 1, 0, 228, 144, 9, 0, - 0, 3, 0, 0, 2, 128, 4, 0, -228, 160, 1, 0, 228, 144, 2, 0, - 0, 3, 0, 0, 1, 128, 0, 0, - 85, 128, 0, 0, 0, 128, 5, 0, - 0, 3, 0, 0, 4, 192, 0, 0, - 0, 128, 5, 0, 0, 160, 9, 0, - 0, 3, 0, 0, 1, 128, 2, 0, -228, 160, 1, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 2, 128, 0, 0, - 0, 129, 9, 0, 0, 3, 1, 0, - 1, 128, 1, 0, 228, 160, 1, 0, -228, 144, 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 85, 128, 0, 0, -228, 160, 1, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 8, 192, 0, 0, - 85, 128, 1, 0, 0, 2, 0, 0, - 15, 224, 0, 0, 228, 144, 1, 0, - 0, 2, 1, 0, 3, 224, 2, 0, -228, 144, 255, 255, 0, 0, 83, 72, - 68, 82, 124, 1, 0, 0, 64, 0, - 1, 0, 95, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 95, 0, - 0, 3, 242, 16, 16, 0, 0, 0, - 0, 0, 95, 0, 0, 3, 242, 16, - 16, 0, 1, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, 1, 0, - 0, 0, 103, 0, 0, 4, 242, 32, - 16, 0, 2, 0, 0, 0, 1, 0, - 0, 0, 104, 0, 0, 2, 1, 0, - 0, 0, 54, 0, 0, 5, 242, 32, - 16, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, 2, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 54, 0, 0, 6, 34, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 128, 65, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 8, 18, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 17, 0, 0, 8, 34, 0, - 16, 0, 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 70, 30, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 7, 18, 0, - 16, 0, 0, 0, 0, 0, 26, 0, - 16, 0, 0, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, 2, 0, - 0, 0, 26, 0, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, 66, 32, - 16, 0, 2, 0, 0, 0, 10, 0, - 16, 0, 0, 0, 0, 0, 1, 64, - 0, 0, 0, 0, 0, 63, 17, 0, - 0, 8, 18, 32, 16, 0, 2, 0, - 0, 0, 70, 142, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 30, - 16, 0, 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, 116, 0, - 0, 0, 11, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 204, 0, 0, 0, 1, 0, - 0, 0, 72, 0, 0, 0, 1, 0, - 0, 0, 28, 0, 0, 0, 0, 4, -254, 255, 0, 65, 0, 0, 152, 0, - 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 36, 71, 108, 111, 98, 97, -108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 1, 0, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 0, - 0, 0, 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, 136, 0, - 0, 0, 0, 0, 0, 0, 95, 67, - 67, 95, 77, 86, 80, 77, 97, 116, -114, 105, 120, 0, 171, 171, 3, 0, - 3, 0, 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, 52, 0, -171, 171, 73, 83, 71, 78, 92, 0, - 0, 0, 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, 15, 15, - 0, 0, 80, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, 3, 3, - 0, 0, 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, 2, 0, - 0, 0, 15, 0, 0, 0, 84, 69, - 88, 67, 79, 79, 82, 68, 0, 83, - 86, 95, 80, 111, 115, 105, 116, 105, -111, 110, 0, 171, 171, 171, -}; - -const unsigned char s_F24D6A4F46E684E38E16A586E913369B6E02E595[] = { - -166, 147, 0, 0, 142, 9, 2, 1, - 0, 128, 0, 0, 82, 139, 0, 0, - 10, 0, 0, 0, 97, 95, 112, 111, -115, 105, 116, 105, 111, 110, 1, 0, - 0, 0, 82, 139, 0, 0, 7, 0, - 0, 0, 97, 95, 99, 111, 108, 111, -114, 0, 0, 0, 0, 80, 139, 0, - 0, 10, 0, 0, 0, 97, 95, 116, -101, 120, 67, 111, 111, 114, 100, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 0, - 0, 0, 0, 0, 0, 0, 0, 255, -255, 255, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, - 3, 0, 0, 0, 92, 139, 0, 0, -242, 141, 0, 0, 12, 0, 0, 0, - 67, 67, 95, 77, 86, 80, 77, 97, -116, 114, 105, 120, 0, 0, 0, 0, -255, 255, 255, 255, 0, 0, 0, 0, - 4, 0, 0, 0, 94, 139, 0, 0, - 0, 0, 0, 0, 11, 0, 0, 0, - 67, 67, 95, 84, 101, 120, 116, 117, -114, 101, 48, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 1, - 0, 0, 0, 82, 139, 0, 0, 240, -141, 0, 0, 13, 0, 0, 0, 118, - 95, 101, 102, 102, 101, 99, 116, 67, -111, 108, 111, 114, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 3, 0, 0, 0, - 12, 0, 0, 0, 67, 67, 95, 77, - 86, 80, 77, 97, 116, 114, 105, 120, - 0, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 67, 67, 95, 84, -101, 120, 116, 117, 114, 101, 48, 0, - 0, 0, 0, 1, 0, 0, 0, 13, - 0, 0, 0, 118, 95, 101, 102, 102, -101, 99, 116, 67, 111, 108, 111, 114, - 0, 0, 0, 0, 2, 0, 0, 0, -248, 5, 0, 0, 4, 5, 0, 0, - 0, 0, 0, 0, 185, 153, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 88, 66, 67, - 96, 44, 85, 169, 144, 78, 197, 165, -246, 37, 113, 96, 91, 225, 82, 101, - 1, 0, 0, 0, 248, 5, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, -128, 1, 0, 0, 120, 3, 0, 0, -244, 3, 0, 0, 48, 5, 0, 0, -124, 5, 0, 0, 65, 111, 110, 57, - 64, 1, 0, 0, 64, 1, 0, 0, - 0, 2, 255, 255, 12, 1, 0, 0, - 52, 0, 0, 0, 1, 0, 40, 0, - 0, 0, 52, 0, 0, 0, 52, 0, - 1, 0, 36, 0, 0, 0, 52, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 81, 0, 0, 5, - 1, 0, 15, 160, 0, 0, 128, 191, - 0, 0, 0, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, 0, 128, - 1, 0, 3, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, 15, 160, - 66, 0, 0, 3, 0, 0, 15, 128, - 1, 0, 228, 176, 0, 8, 228, 160, - 88, 0, 0, 4, 1, 0, 15, 128, - 0, 0, 0, 129, 1, 0, 0, 160, - 1, 0, 85, 160, 65, 0, 0, 1, - 1, 0, 15, 128, 18, 0, 0, 4, - 1, 0, 7, 128, 0, 0, 255, 128, - 0, 0, 228, 176, 0, 0, 228, 160, - 11, 0, 0, 3, 2, 0, 8, 128, - 0, 0, 255, 128, 0, 0, 0, 128, - 5, 0, 0, 3, 1, 0, 8, 128, - 2, 0, 255, 128, 0, 0, 255, 176, - 88, 0, 0, 4, 0, 0, 15, 128, - 0, 0, 0, 129, 1, 0, 170, 160, - 1, 0, 228, 128, 1, 0, 0, 2, - 1, 0, 15, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 2, 0, 15, 128, - 0, 0, 228, 128, 1, 0, 0, 2, - 3, 0, 15, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 8, 15, 128, - 1, 0, 228, 128, 1, 0, 0, 2, - 1, 8, 15, 128, 2, 0, 228, 128, - 1, 0, 0, 2, 2, 8, 15, 128, - 3, 0, 228, 128, 1, 0, 0, 2, - 3, 8, 15, 128, 0, 0, 228, 128, -255, 255, 0, 0, 83, 72, 68, 82, -240, 1, 0, 0, 64, 0, 0, 0, -124, 0, 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 90, 0, 0, 3, - 0, 96, 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 1, 0, 0, 0, -101, 0, 0, 3, 242, 32, 16, 0, - 2, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 3, 0, 0, 0, -104, 0, 0, 2, 2, 0, 0, 0, - 69, 0, 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 49, 0, 0, 7, - 34, 0, 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 59, 0, 0, 5, 66, 0, 16, 0, - 0, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 13, 0, 4, 3, - 42, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 66, 0, 16, 0, - 0, 0, 0, 0, 58, 0, 16, 128, - 65, 0, 0, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 128, 63, - 56, 0, 0, 8, 114, 0, 16, 0, - 1, 0, 0, 0, 166, 10, 16, 0, - 0, 0, 0, 0, 70, 130, 32, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 50, 0, 0, 9, 114, 0, 16, 0, - 1, 0, 0, 0, 70, 18, 16, 0, - 0, 0, 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, 16, 0, - 1, 0, 0, 0, 52, 0, 0, 7, - 18, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 58, 0, 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 130, 0, 16, 0, - 1, 0, 0, 0, 10, 0, 16, 0, - 0, 0, 0, 0, 58, 16, 16, 0, - 0, 0, 0, 0, 1, 0, 0, 7, -242, 0, 16, 0, 0, 0, 0, 0, - 86, 5, 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 1, 0, 0, 0, - 70, 14, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 242, 32, 16, 0, - 2, 0, 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 3, 0, 0, 0, - 70, 14, 16, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, 65, 84, -116, 0, 0, 0, 15, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 52, 1, 0, 0, - 1, 0, 0, 0, 176, 0, 0, 0, - 3, 0, 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 65, 0, 0, - 0, 1, 0, 0, 124, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 145, 0, 0, 0, - 2, 0, 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, 0, 0, - 13, 0, 0, 0, 166, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 97, 109, 112, -108, 101, 114, 95, 95, 67, 67, 95, - 84, 101, 120, 116, 117, 114, 101, 48, - 0, 116, 101, 120, 116, 117, 114, 101, - 95, 95, 67, 67, 95, 84, 101, 120, -116, 117, 114, 101, 48, 0, 36, 71, -108, 111, 98, 97, 108, 115, 0, 171, -166, 0, 0, 0, 1, 0, 0, 0, -200, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -224, 0, 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, 0, 0, -240, 0, 0, 0, 0, 0, 0, 0, - 95, 118, 95, 101, 102, 102, 101, 99, -116, 67, 111, 108, 111, 114, 0, 171, - 1, 0, 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, 71, 78, - 68, 0, 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 56, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 116, 0, 0, 0, - 4, 0, 0, 0, 8, 0, 0, 0, -104, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 15, 0, 0, 0, -104, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, 103, 101, -116, 0, 171, 171, 68, 88, 66, 67, -235, 56, 180, 223, 125, 231, 231, 218, - 70, 75, 12, 63, 200, 233, 69, 121, - 1, 0, 0, 0, 4, 5, 0, 0, - 6, 0, 0, 0, 56, 0, 0, 0, - 92, 1, 0, 0, 224, 2, 0, 0, - 92, 3, 0, 0, 48, 4, 0, 0, -148, 4, 0, 0, 65, 111, 110, 57, - 28, 1, 0, 0, 28, 1, 0, 0, - 0, 2, 254, 255, 232, 0, 0, 0, - 52, 0, 0, 0, 1, 0, 36, 0, - 0, 0, 48, 0, 0, 0, 48, 0, - 0, 0, 36, 0, 1, 0, 48, 0, - 0, 0, 0, 0, 4, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 81, 0, 0, 5, - 5, 0, 15, 160, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, 15, 144, - 31, 0, 0, 2, 5, 0, 1, 128, - 1, 0, 15, 144, 31, 0, 0, 2, - 5, 0, 2, 128, 2, 0, 15, 144, - 9, 0, 0, 3, 0, 0, 1, 128, - 3, 0, 228, 160, 1, 0, 228, 144, - 9, 0, 0, 3, 0, 0, 2, 128, - 4, 0, 228, 160, 1, 0, 228, 144, - 2, 0, 0, 3, 0, 0, 1, 128, - 0, 0, 85, 128, 0, 0, 0, 128, - 5, 0, 0, 3, 0, 0, 4, 192, - 0, 0, 0, 128, 5, 0, 0, 160, - 9, 0, 0, 3, 0, 0, 1, 128, - 2, 0, 228, 160, 1, 0, 228, 144, - 1, 0, 0, 2, 1, 0, 2, 128, - 0, 0, 0, 129, 9, 0, 0, 3, - 1, 0, 1, 128, 1, 0, 228, 160, - 1, 0, 228, 144, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, 85, 128, - 0, 0, 228, 160, 1, 0, 228, 128, - 1, 0, 0, 2, 0, 0, 8, 192, - 0, 0, 85, 128, 1, 0, 0, 2, - 0, 0, 15, 224, 0, 0, 228, 144, - 1, 0, 0, 2, 1, 0, 3, 224, - 2, 0, 228, 144, 255, 255, 0, 0, - 83, 72, 68, 82, 124, 1, 0, 0, - 64, 0, 1, 0, 95, 0, 0, 0, - 89, 0, 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 242, 16, 16, 0, - 0, 0, 0, 0, 95, 0, 0, 3, -242, 16, 16, 0, 1, 0, 0, 0, - 95, 0, 0, 3, 50, 16, 16, 0, - 2, 0, 0, 0, 101, 0, 0, 3, -242, 32, 16, 0, 0, 0, 0, 0, -101, 0, 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 103, 0, 0, 4, -242, 32, 16, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, 0, 2, - 1, 0, 0, 0, 54, 0, 0, 5, -242, 32, 16, 0, 0, 0, 0, 0, - 70, 30, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 50, 32, 16, 0, - 1, 0, 0, 0, 70, 16, 16, 0, - 2, 0, 0, 0, 17, 0, 0, 8, - 18, 0, 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 54, 0, 0, 6, - 34, 32, 16, 0, 2, 0, 0, 0, - 10, 0, 16, 128, 65, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 8, - 18, 0, 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 17, 0, 0, 8, - 34, 0, 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 70, 30, 16, 0, - 1, 0, 0, 0, 0, 0, 0, 7, - 18, 0, 16, 0, 0, 0, 0, 0, - 26, 0, 16, 0, 0, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 130, 32, 16, 0, - 2, 0, 0, 0, 26, 0, 16, 0, - 0, 0, 0, 0, 56, 0, 0, 7, - 66, 32, 16, 0, 2, 0, 0, 0, - 10, 0, 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, 0, 63, - 17, 0, 0, 8, 18, 32, 16, 0, - 2, 0, 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 70, 30, 16, 0, 1, 0, 0, 0, - 62, 0, 0, 1, 83, 84, 65, 84, -116, 0, 0, 0, 11, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 204, 0, 0, 0, - 1, 0, 0, 0, 72, 0, 0, 0, - 1, 0, 0, 0, 28, 0, 0, 0, - 0, 4, 254, 255, 0, 65, 0, 0, -152, 0, 0, 0, 60, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 36, 71, 108, 111, - 98, 97, 108, 115, 0, 171, 171, 171, - 60, 0, 0, 0, 1, 0, 0, 0, - 96, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -120, 0, 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 2, 0, 0, 0, -136, 0, 0, 0, 0, 0, 0, 0, - 95, 67, 67, 95, 77, 86, 80, 77, - 97, 116, 114, 105, 120, 0, 171, 171, - 3, 0, 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 77, 105, 99, 114, 111, 115, 111, 102, -116, 32, 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, 100, 101, -114, 32, 67, 111, 109, 112, 105, 108, -101, 114, 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, 71, 78, - 92, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 80, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, - 15, 15, 0, 0, 80, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, 0, 0, - 3, 3, 0, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, - 80, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, 0, 0, - 89, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 15, 0, 0, 0, - 84, 69, 88, 67, 79, 79, 82, 68, - 0, 83, 86, 95, 80, 111, 115, 105, -116, 105, 111, 110, 0, 171, 171, 171, -}; - -const int s_numPrograms = 14; -const int s_programLengths[] = {2982,3876,2775,3358,2996,2675,2528,3025,2502,2990,3350,3022,3278,3568}; -const unsigned char* s_programs[] = {s_2140AC5CB6D3788EBF81062827FA30CB4E9DB1BA,s_42003E3EDB1E484A842EB95165D48A439ED6AAE8,s_5132957B676AE174BDF34524AE4A80338F866279,s_61ACD51E94A6AA8035DE722FB113F24350C0D113,s_6A3FEBEAD7E44B2380CD39CBDCFD1D3B046D8057,s_6C80A53170768A04FB4457D7203425EA3467E2E4,s_7845A827CC74A6ED188C81E590C16A4B394AF6EA,s_993D07D70C4AE9F39EAA9EBBDFD109681386920A,s_BF0A97A7CDA97B6CD0F5D1455A170F32E2538AD6,s_CE141D74B59548C43E99D183312791C6F429C37D,s_DB22823528A225B43DABEF012B299639D233D54C,s_E878895044FDA49FE4D8202CE20AF49CC01A8FA9,s_EE3D1B2155C6B54D29BFC9FACB7A83A83EC3847B,s_F24D6A4F46E684E38E16A586E913369B6E02E595}; -const char* s_programKeys[] = {"2140AC5CB6D3788EBF81062827FA30CB4E9DB1BA","42003E3EDB1E484A842EB95165D48A439ED6AAE8","5132957B676AE174BDF34524AE4A80338F866279","61ACD51E94A6AA8035DE722FB113F24350C0D113","6A3FEBEAD7E44B2380CD39CBDCFD1D3B046D8057","6C80A53170768A04FB4457D7203425EA3467E2E4","7845A827CC74A6ED188C81E590C16A4B394AF6EA","993D07D70C4AE9F39EAA9EBBDFD109681386920A","BF0A97A7CDA97B6CD0F5D1455A170F32E2538AD6","CE141D74B59548C43E99D183312791C6F429C37D","DB22823528A225B43DABEF012B299639D233D54C","E878895044FDA49FE4D8202CE20AF49CC01A8FA9","EE3D1B2155C6B54D29BFC9FACB7A83A83EC3847B","F24D6A4F46E684E38E16A586E913369B6E02E595"}; diff --git a/cocos/platform/winrt/targetver.h b/cocos/platform/winrt/targetver.h deleted file mode 100644 index 9b10cecdf039..000000000000 --- a/cocos/platform/winrt/targetver.h +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/cocos/renderer/CCBatchCommand.cpp b/cocos/renderer/CCBatchCommand.cpp deleted file mode 100644 index 852e626abe41..000000000000 --- a/cocos/renderer/CCBatchCommand.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#include "renderer/CCBatchCommand.h" -#include "renderer/CCTextureAtlas.h" -#include "renderer/CCTexture2D.h" -#include "renderer/CCGLProgram.h" -#include "base/ccUtils.h" - -NS_CC_BEGIN - -BatchCommand::BatchCommand() -: _textureID(0) -, _blendType(BlendFunc::DISABLE) -, _textureAtlas(nullptr) -{ - _type = RenderCommand::Type::BATCH_COMMAND; - _shader = nullptr; -} - -void BatchCommand::init(float globalOrder, GLProgram* shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4& modelViewTransform, uint32_t flags) -{ - CCASSERT(shader, "shader cannot be null"); - CCASSERT(textureAtlas, "textureAtlas cannot be null"); - - RenderCommand::init(globalOrder, modelViewTransform, flags); - _textureID = textureAtlas->getTexture()->getName(); - _blendType = blendType; - _shader = shader; - - _textureAtlas = textureAtlas; - - _mv = modelViewTransform; -} - -void BatchCommand::init(float globalOrder, GLProgram* shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4& modelViewTransform) -{ - init(globalOrder, shader, blendType, textureAtlas, modelViewTransform, 0); -} - -BatchCommand::~BatchCommand() -{ -} - -void BatchCommand::execute() -{ - // Set material - _shader->use(); - _shader->setUniformsForBuiltins(_mv); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _textureID); - utils::setBlending(_blendType.src, _blendType.dst); - - // Draw - _textureAtlas->drawQuads(); -} - -NS_CC_END diff --git a/cocos/renderer/CCBatchCommand.h b/cocos/renderer/CCBatchCommand.h deleted file mode 100644 index 92b7e7b169d7..000000000000 --- a/cocos/renderer/CCBatchCommand.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CC_BATCHCOMMAND_H_ -#define _CC_BATCHCOMMAND_H_ - -#include "renderer/CCRenderCommand.h" - -/** - * @addtogroup renderer - * @{ - */ - -NS_CC_BEGIN - -class TextureAtlas; -class GLProgram; -/** -Command used to draw batches in one TextureAtlas. -*/ -class CC_DLL BatchCommand : public RenderCommand -{ -public: - /**Constructor.*/ - BatchCommand(); - /**Destructor.*/ - ~BatchCommand(); - /**Init the batch command. - @param globalZOrder GlobalZOrder of the render command. - @param shader Shader used for draw the texture atlas. - @param blendType Blend function for texture atlas. - @param textureAtlas Texture atlas, will contain both quads and texture for rendering. - @param modelViewTransform Model view transform used for rendering. - @param flags Indicate the render command should be rendered in 3D mode or not. - */ - void init(float globalZOrder, GLProgram* shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4& modelViewTransform, uint32_t flags); - /*Deprecated function, you should call upper init function instead.*/ - CC_DEPRECATED_ATTRIBUTE void init(float depth, GLProgram* shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4& modelViewTransform); - - /**Execute the command, which will call openGL function to draw the texture atlas.*/ - void execute(); - -protected: - //TODO: This member variable is not used. It should be removed. - int32_t _materialID; - /**Texture ID used for texture atlas rendering.*/ - GLuint _textureID; - /**Shaders used for rendering.*/ - GLProgram* _shader; - /**Blend function for rendering.*/ - BlendFunc _blendType; - /**Texture atlas for rendering.*/ - TextureAtlas *_textureAtlas; - - /**ModelView transform.*/ - Mat4 _mv; -}; -NS_CC_END - -/** - end of support group - @} - */ -#endif //_CC_BATCHCOMMAND_H_ diff --git a/cocos/ui/UIDeprecated.cpp b/cocos/renderer/CCCallbackCommand.cpp similarity index 77% rename from cocos/ui/UIDeprecated.cpp rename to cocos/renderer/CCCallbackCommand.cpp index 1821e3d5ee93..e61398f34556 100644 --- a/cocos/ui/UIDeprecated.cpp +++ b/cocos/renderer/CCCallbackCommand.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + http://www.cocos2d-x.org - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,13 +21,26 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#include "ui/UIDeprecated.h" +#include "renderer/CCCallbackCommand.h" NS_CC_BEGIN -namespace ui { - -const Margin MarginZero = Margin::ZERO ; - -}} +CallbackCommand::CallbackCommand() +{ + _type = RenderCommand::Type::CALLBACK_COMMAND; +} + +void CallbackCommand::init(float globalOrder) +{ + _globalOrder = globalOrder; +} + +void CallbackCommand::execute() +{ + if(func) + { + func(); + } +} + +NS_CC_END diff --git a/tests/game-controller-test/proj.win32/main.cpp b/cocos/renderer/CCCallbackCommand.h similarity index 64% rename from tests/game-controller-test/proj.win32/main.cpp rename to cocos/renderer/CCCallbackCommand.h index 208289a61953..e8693951797c 100644 --- a/tests/game-controller-test/proj.win32/main.cpp +++ b/cocos/renderer/CCCallbackCommand.h @@ -1,18 +1,18 @@ /**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + Copyright (c) 2018-2019 Xiamen Yaji Software Co., Ltd. + http://www.cocos2d-x.org - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,21 +21,40 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#pragma once -#include "main.h" -#include "AppDelegate.h" +#include "renderer/CCRenderCommand.h" -USING_NS_CC; +/** + * @addtogroup renderer + * @{ + */ -int WINAPI _tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) +NS_CC_BEGIN + +/** +Callback command is used to invoke a callback function when this command is +executed. You can do some logic opertion in the callback, such as invoking +renderer to set depth/stencil test. Don't suggest to invoke backen API in +the callback function. +*/ +class CC_DLL CallbackCommand : public RenderCommand { - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); +public: + CallbackCommand(); + + void init(float globalZOrder); + + /** + Execute the render command and call callback functions. + */ + void execute(); + /**Callback function.*/ + std::function func; +}; - // create the application instance - AppDelegate app; - return Application::getInstance()->run(); -} +NS_CC_END +/** + end of support group + @} + */ diff --git a/cocos/renderer/CCCustomCommand.cpp b/cocos/renderer/CCCustomCommand.cpp index 331d6597de92..c0f04b334e96 100644 --- a/cocos/renderer/CCCustomCommand.cpp +++ b/cocos/renderer/CCCustomCommand.cpp @@ -22,38 +22,120 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "renderer/CCCustomCommand.h" +#include "renderer/CCTextureAtlas.h" +#include "renderer/backend/Buffer.h" +#include "renderer/backend/Device.h" +#include "base/ccUtils.h" NS_CC_BEGIN CustomCommand::CustomCommand() -: func(nullptr) { _type = RenderCommand::Type::CUSTOM_COMMAND; } -void CustomCommand::init(float depth, const cocos2d::Mat4 &modelViewTransform, uint32_t flags) +CustomCommand::~CustomCommand() +{ + CC_SAFE_RELEASE(_vertexBuffer); + CC_SAFE_RELEASE(_indexBuffer); +} + +void CustomCommand::init(float depth, const cocos2d::Mat4 &modelViewTransform, unsigned int flags) { RenderCommand::init(depth, modelViewTransform, flags); } -void CustomCommand::init(float globalOrder) +void CustomCommand::init(float globalZOrder) { - _globalOrder = globalOrder; + _globalOrder = globalZOrder; } -CustomCommand::~CustomCommand() +void CustomCommand::init(float globalZOrder, const BlendFunc& blendFunc) +{ + _globalOrder = globalZOrder; + + auto& blendDescriptor = _pipelineDescriptor.blendDescriptor; + blendDescriptor.blendEnabled = true; + blendDescriptor.sourceRGBBlendFactor = blendDescriptor.sourceAlphaBlendFactor = blendFunc.src; + blendDescriptor.destinationRGBBlendFactor = blendDescriptor.destinationAlphaBlendFactor = blendFunc.dst; +} + +void CustomCommand::createVertexBuffer(unsigned int vertexSize, unsigned int capacity, BufferUsage usage) +{ + CC_SAFE_RELEASE(_vertexBuffer); + + _vertexCapacity = capacity; + _vertexDrawCount = capacity; + + auto device = backend::Device::getInstance(); + _vertexBuffer = device->newBuffer(vertexSize * capacity, backend::BufferType::VERTEX, usage); +} + +void CustomCommand::createIndexBuffer(IndexFormat format, unsigned int capacity, BufferUsage usage) +{ + CC_SAFE_RELEASE(_indexBuffer); + + _indexFormat = format; + _indexSize = computeIndexSize(); + _indexCapacity = capacity; + _indexDrawCount = capacity; + + auto device = backend::Device::getInstance(); + _indexBuffer = device->newBuffer(_indexSize * capacity, backend::BufferType::INDEX, usage); +} + +void CustomCommand::updateVertexBuffer(void* data, unsigned int offset, unsigned int length) +{ + assert(_vertexBuffer); + _vertexBuffer->updateSubData(data, offset, length); +} + +void CustomCommand::updateIndexBuffer(void* data, unsigned int offset, unsigned int length) +{ + assert(_indexBuffer); + _indexBuffer->updateSubData(data, offset, length); +} + +void CustomCommand::setVertexBuffer(backend::Buffer *vertexBuffer) +{ + if (_vertexBuffer == vertexBuffer) + return; + + _vertexBuffer = vertexBuffer; + CC_SAFE_RETAIN(_vertexBuffer); +} + +void CustomCommand::setIndexBuffer(backend::Buffer *indexBuffer, IndexFormat format) +{ + if (_indexBuffer == indexBuffer && _indexFormat == format) + return; + + _indexBuffer = indexBuffer; + CC_SAFE_RETAIN(_indexBuffer); + + _indexFormat = format; + _indexSize = computeIndexSize(); +} + +void CustomCommand::updateVertexBuffer(void* data, unsigned int length) { + assert(_vertexBuffer); + _vertexBuffer->updateData(data, length); +} +void CustomCommand::updateIndexBuffer(void* data, unsigned int length) +{ + assert(_indexBuffer); + _indexBuffer->updateData(data, length); } -void CustomCommand::execute() +unsigned int CustomCommand::computeIndexSize() const { - if(func) - { - func(); - } +if (IndexFormat::U_SHORT == _indexFormat) + return (unsigned int)sizeof(unsigned short); +else + return (unsigned int)sizeof(unsigned int); } NS_CC_END diff --git a/cocos/renderer/CCCustomCommand.h b/cocos/renderer/CCCustomCommand.h index 659ea15cda7e..3361532522ed 100644 --- a/cocos/renderer/CCCustomCommand.h +++ b/cocos/renderer/CCCustomCommand.h @@ -22,10 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - - -#ifndef _CC_CUSTOMCOMMAND_H_ -#define _CC_CUSTOMCOMMAND_H_ +#pragma once #include "renderer/CCRenderCommand.h" @@ -35,13 +32,37 @@ */ NS_CC_BEGIN + +namespace backend +{ + class Buffer; +} + /** -Custom command is used for call custom openGL command which can not be done by other commands, -such as stencil function, depth functions etc. The render command is executed by calling a call back function. +Custom command is used to draw all things except triangle commands. You can use +this command to draw things, just provide vertex/index data and set corret flags. */ class CC_DLL CustomCommand : public RenderCommand { public: + enum class DrawType + { + ARRAY, + ELEMENT + }; + + using PrimitiveType = backend::PrimitiveType; + /** + Buffer usage of vertex/index buffer. If the contents is not updated every frame, + then use STATIC, other use DYNAMIC. + */ + using BufferUsage = backend::BufferUsage; + /** + The index format determine the size for index data. U_SHORT is enough for most + cases. + */ + using IndexFormat = backend::IndexFormat; + /**Constructor.*/ CustomCommand(); /**Destructor.*/ @@ -49,28 +70,150 @@ class CC_DLL CustomCommand : public RenderCommand public: /** + TODO: should remove it. Init function. @param globalZOrder GlobalZOrder of the render command. @param modelViewTransform When in 3D mode, depth sorting needs modelViewTransform. @param flags Use to identify that the render command is 3D mode or not. */ - void init(float globalZOrder, const Mat4& modelViewTransform, uint32_t flags); + void init(float globalZOrder, const Mat4& modelViewTransform, unsigned int flags); + /** Init function. The render command will be in 2D mode. @param globalZOrder GlobalZOrder of the render command. */ void init(float globalZOrder); + /** + Init function. The render command will be in 2D mode. + @param globalZOrder GlobalZOrder of the render command. + @param blendFunc blend function of the render command. + */ + void init(float globalZOrder, const BlendFunc& blendFunc); /** - Execute the render command and call callback functions. + Create a vertex buffer of the custom command. The buffer size is (vertexSize * capacity). + If the buffer already exists, then it will delete the old buffer and create a new one. + @param vertexSize the size of every vertex data. + @param capacity how many vertices of the buffer + @param usage the usage of the vertex buffer. Use Static of the vertex data are not updated + every frame, otherwise use DYNAMIC. + */ + void createVertexBuffer(unsigned int vertexSize, unsigned int capacity, BufferUsage usage); + /** + Create an index buffer of the custom command. The buffer size is (indexSize * capacity). + Index size is determined by format. If the buffer already exists, then it will delete the + old buffer and create a new one. + @param format index fomrat, if format is U_SHORT, then the index data type should be + unsigned short, otherwise should be unsigned int. + @param capacity how many indices of the buffer + @param usage the usage of the vertex buffer. Use Static of the index data are not updated + every frame, otherwise use DYNAMIC. + */ + void createIndexBuffer(IndexFormat format, unsigned int capacity, BufferUsage usage); + + /** + Update vertex buffer contents. + @param data Specifies a pointer to the new data that will be copied into the data store. + @param length Specifies the length in bytes of the data store region being replaced. + */ + void updateVertexBuffer(void* data, unsigned int length); + /** + Update index buffer contents. + @param data Specifies a pointer to the new data that will be copied into the data store. + @param length Specifies the size in bytes of the data store region being replaced. + */ + void updateIndexBuffer(void* data, unsigned int length); + /** + Update some or all contents of vertex buffer. + @param data Specifies a pointer to the new data that will be copied into the data store. + @param offset Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. + @param length Specifies the size in bytes of the data store region being replaced. */ - void execute(); - //TODO: This function is not used, it should be removed. - bool isTranslucent() { return true; } + void updateVertexBuffer(void* data, unsigned int offset, unsigned int length); + /** + Update some or call contents of index buffer + @param data Specifies a pointer to the new data that will be copied into the data store. + @param offset specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. + @param length Specifies the size in bytes of the data store region being replaced. + */ + void updateIndexBuffer(void* data, unsigned int offset, unsigned int length); + + /** + Get vertex buffer capacity. + */ + inline unsigned int getVertexCapacity() const { return _vertexCapacity; } + /** + Get index buffer capacity. + */ + inline unsigned int getIndexCapacity() const { return _indexCapacity; } + + inline void setDrawType(DrawType drawType) { _drawType = drawType; } + inline DrawType getDrawType() const { return _drawType; } + + inline void setPrimitiveType(PrimitiveType primitiveType) { _primitiveType = primitiveType; } + inline PrimitiveType getPrimitiveType() const { return _primitiveType; } + + /** + Set the vertex buffer. The existing vertex buffer will be replaced if exist. + */ + void setVertexBuffer(backend::Buffer* vertexBuffer); + inline backend::Buffer* getVertexBuffer() const { return _vertexBuffer; } + + /** + Set the index buffer. The existing index buffer will be replaced if exist. + */ + void setIndexBuffer(backend::Buffer* indexBuffer, IndexFormat indexFormat); + inline backend::Buffer* getIndexBuffer() const { return _indexBuffer; } + + /** + Set the drawing information if the drawing type is ARRAY. + @start specifices the starting index of vertex buffer + @count specifices the number of vertices to be rendered + */ + inline void setVertexDrawInfo(unsigned int start, unsigned int count) { _vertexDrawStart = start; _vertexDrawCount = count; } + inline unsigned int getVertexDrawStart() const { return _vertexDrawStart; } + inline unsigned int getVertexDrawCount() const { return _vertexDrawCount;} + + /** + Set the drawing information if the drawing type is ELEMENT. + @start specifices the starting index of index buffer + @count specifices the number of indices to be rendered + */ + inline void setIndexDrawInfo(unsigned int start, unsigned int count) { _indexDrawOffset = start * _indexSize; _indexDrawCount = count; } + inline unsigned int getIndexDrawOffset() const { return _indexDrawOffset; } + inline unsigned int getIndexDrawCount() const { return _indexDrawCount; } + + inline void setLineWidth(float lineWidth) { _lineWidth = lineWidth; } + inline float getLineWidth() const { return _lineWidth; } + + inline IndexFormat getIndexFormat() const { return _indexFormat; } + /**Callback function.*/ + //TODO:minggo: should remove it. std::function func; protected: + unsigned int computeIndexSize() const; + + backend::Buffer* _vertexBuffer = nullptr; + backend::Buffer* _indexBuffer = nullptr; + + unsigned int _vertexDrawStart = 0; + unsigned int _vertexDrawCount = 0; + + unsigned int _indexDrawOffset = 0; + unsigned int _indexDrawCount = 0; + + DrawType _drawType = DrawType::ELEMENT; + PrimitiveType _primitiveType = PrimitiveType::TRIANGLE; + IndexFormat _indexFormat = IndexFormat::U_SHORT; + + float _lineWidth = 0.0; + + unsigned int _indexSize = 0; + + unsigned int _vertexCapacity = 0; + unsigned int _indexCapacity = 0; }; NS_CC_END @@ -78,4 +221,3 @@ NS_CC_END end of support group @} */ -#endif //_CC_CUSTOMCOMMAND_H_ diff --git a/cocos/renderer/CCFrameBuffer.cpp b/cocos/renderer/CCFrameBuffer.cpp deleted file mode 100644 index c1bbcb44eae5..000000000000 --- a/cocos/renderer/CCFrameBuffer.cpp +++ /dev/null @@ -1,500 +0,0 @@ -/**************************************************************************** - Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "renderer/CCFrameBuffer.h" -#include "renderer/CCRenderer.h" -#include "base/CCDirector.h" -#include "base/CCEventCustom.h" -#include "base/CCEventListenerCustom.h" -#include "base/CCEventDispatcher.h" -#include "base/CCEventType.h" - -NS_CC_BEGIN -namespace experimental{ -FrameBuffer* FrameBuffer::_defaultFBO = nullptr; -std::set FrameBuffer::_frameBuffers; - -Viewport::Viewport(float left, float bottom, float width, float height) -: _left(left) -, _bottom(bottom) -, _width(width) -, _height(height) -{ -} - -Viewport::Viewport() -{ - _left = _bottom = 0.f; - _width = _height = 1.0f; -} - -RenderTargetBase::RenderTargetBase() -{ - -} - -RenderTargetBase::~RenderTargetBase() -{ - -} - -bool RenderTargetBase::init(unsigned int width, unsigned int height) -{ - _width = width; - _height = height; - return true; -} - -RenderTarget* RenderTarget::create(unsigned int width, unsigned int height, Texture2D::PixelFormat format/* = Texture2D::PixelFormat::RGBA8888*/) -{ - auto result = new (std::nothrow) RenderTarget(); - if(result && result->init(width, height,format)) - { - result->autorelease(); - return result; - } - else - { - CC_SAFE_DELETE(result); - return nullptr; - } -} - -bool RenderTarget::init(unsigned int width, unsigned int height, Texture2D::PixelFormat format) -{ - if(!RenderTargetBase::init(width, height)) - { - return false; - } - - _texture = new (std::nothrow) Texture2D(); - if(nullptr == _texture) return false; - //TODO: FIX me, get the correct bit depth for pixelformat - auto dataLen = width * height * 4; - auto data = malloc(dataLen); - if( nullptr == data) return false; - - memset(data, 0, dataLen); - if(_texture->initWithData(data, dataLen, format, width, height, Size(width, height))) - { - _texture->autorelease(); - CC_SAFE_RETAIN(_texture); - free(data); - } - else - { - CC_SAFE_DELETE(_texture); - free(data); - return false; - } -#if CC_ENABLE_CACHE_TEXTURE_DATA - _rebuildTextureListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - auto dataLen = _width * _height * 4; - auto data = malloc(dataLen); - _texture->initWithData(data, dataLen,_texture->getPixelFormat(), _width, _height, Size(_width, _height)); - free(data); - CCLOG("RenderTarget Texture recreated is %d", _texture->getName()); - }); - - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_rebuildTextureListener, -1); -#endif - return true; -} - -RenderTarget::RenderTarget() -: _texture(nullptr) -#if CC_ENABLE_CACHE_TEXTURE_DATA -, _rebuildTextureListener(nullptr) -#endif -{ - _type = Type::Texture2D; -} - -RenderTarget::~RenderTarget() -{ - CC_SAFE_RELEASE_NULL(_texture); -#if CC_ENABLE_CACHE_TEXTURE_DATA - Director::getInstance()->getEventDispatcher()->removeEventListener(_rebuildTextureListener); -#endif -} - -RenderTargetRenderBuffer::RenderTargetRenderBuffer() -: _format(GL_RGBA4) -, _colorBuffer(0) -#if CC_ENABLE_CACHE_TEXTURE_DATA -, _reBuildRenderBufferListener(nullptr) -#endif -{ - _type = Type::RenderBuffer; -} - -RenderTargetRenderBuffer::~RenderTargetRenderBuffer() -{ - if(glIsRenderbuffer(_colorBuffer)) - { - glDeleteRenderbuffers(1, &_colorBuffer); - _colorBuffer = 0; - } -#if CC_ENABLE_CACHE_TEXTURE_DATA - Director::getInstance()->getEventDispatcher()->removeEventListener(_reBuildRenderBufferListener); -#endif -} - -bool RenderTargetRenderBuffer::init(unsigned int width, unsigned int height) -{ - if(!RenderTargetBase::init(width, height)) return false; - GLint oldRenderBuffer(0); - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRenderBuffer); - - //generate depthStencil - glGenRenderbuffers(1, &_colorBuffer); - glBindRenderbuffer(GL_RENDERBUFFER, _colorBuffer); - //todo: this could have a param - glRenderbufferStorage(GL_RENDERBUFFER, _format, width, height); - glBindRenderbuffer(GL_RENDERBUFFER, oldRenderBuffer); - -#if CC_ENABLE_CACHE_TEXTURE_DATA - _reBuildRenderBufferListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - /** listen the event that renderer was recreated on Android/WP8 */ - GLint oldRenderBuffer(0); - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRenderBuffer); - - glGenRenderbuffers(1, &_colorBuffer); - //generate depthStencil - glBindRenderbuffer(GL_RENDERBUFFER, _colorBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, _format, _width, _height); - glBindRenderbuffer(GL_RENDERBUFFER, oldRenderBuffer); - CCLOG("RenderTargetRenderBuffer recreated, _colorBuffer is %d", _colorBuffer); - }); - - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_reBuildRenderBufferListener, -1); -#endif - - return true; -} - - -RenderTargetRenderBuffer* RenderTargetRenderBuffer::create(unsigned int width, unsigned int height) -{ - auto result = new (std::nothrow) RenderTargetRenderBuffer(); - - if(result && result->init(width, height)) - { - result->autorelease(); - return result; - } - else - { - CC_SAFE_DELETE(result); - return nullptr; - } -} - -RenderTargetDepthStencil::RenderTargetDepthStencil() -: _depthStencilBuffer(0) -#if CC_ENABLE_CACHE_TEXTURE_DATA -, _reBuildDepthStencilListener(nullptr) -#endif -{ - _type = Type::RenderBuffer; -} - -RenderTargetDepthStencil::~RenderTargetDepthStencil() -{ - if(glIsRenderbuffer(_depthStencilBuffer)) - { - glDeleteRenderbuffers(1, &_depthStencilBuffer); - _depthStencilBuffer = 0; - } -#if CC_ENABLE_CACHE_TEXTURE_DATA - Director::getInstance()->getEventDispatcher()->removeEventListener(_reBuildDepthStencilListener); -#endif -} - -bool RenderTargetDepthStencil::init(unsigned int width, unsigned int height) -{ - if(!RenderTargetBase::init(width, height)) return false; - GLint oldRenderBuffer(0); - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRenderBuffer); - - //generate depthStencil - glGenRenderbuffers(1, &_depthStencilBuffer); - glBindRenderbuffer(GL_RENDERBUFFER, _depthStencilBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height); - glBindRenderbuffer(GL_RENDERBUFFER, oldRenderBuffer); - -#if CC_ENABLE_CACHE_TEXTURE_DATA - _reBuildDepthStencilListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - /** listen the event that renderer was recreated on Android/WP8 */ - GLint oldRenderBuffer(0); - glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRenderBuffer); - - glGenRenderbuffers(1, &_depthStencilBuffer); - //generate depthStencil - glBindRenderbuffer(GL_RENDERBUFFER, _depthStencilBuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, _width, _height); - glBindRenderbuffer(GL_RENDERBUFFER, oldRenderBuffer); - CCLOG("RenderTargetDepthStencil recreated, _depthStencilBuffer is %d", _depthStencilBuffer); - }); - - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_reBuildDepthStencilListener, -1); -#endif - - return true; -} - - -RenderTargetDepthStencil* RenderTargetDepthStencil::create(unsigned int width, unsigned int height) -{ - auto result = new (std::nothrow) RenderTargetDepthStencil(); - - if(result && result->init(width, height)) - { - result->autorelease(); - return result; - } - else - { - CC_SAFE_DELETE(result); - return nullptr; - } -} - -bool FrameBuffer::initWithGLView(GLView* view) -{ - if(view == nullptr) - { - return false; - } - GLint fbo; - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbo); - _fbo = fbo; - return true; -} - -FrameBuffer* FrameBuffer::getOrCreateDefaultFBO(GLView* view) -{ - if(nullptr == _defaultFBO) - { - auto result = new (std::nothrow) FrameBuffer(); - - if(result && result->initWithGLView(view)) - { - result->autorelease(); - result->_isDefault = true; - } - else - { - CC_SAFE_DELETE(result); - } - - _defaultFBO = result; - } - - return _defaultFBO; -} - - -void FrameBuffer::applyDefaultFBO() -{ - if(_defaultFBO) - { - _defaultFBO->applyFBO(); - } -} - -void FrameBuffer::clearAllFBOs() -{ - for (auto fbo : _frameBuffers) - { - fbo->clearFBO(); - } -} - -FrameBuffer* FrameBuffer::create(uint8_t fid, unsigned int width, unsigned int height) -{ - auto result = new (std::nothrow) FrameBuffer(); - if(result && result->init(fid, width, height)) - { - result->autorelease(); - return result; - } - else - { - CC_SAFE_DELETE(result); - return nullptr; - } -} - -bool FrameBuffer::init(uint8_t fid, unsigned int width, unsigned int height) -{ - _fid = fid; - _width = width; - _height = height; - - GLint oldfbo; - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfbo); - - glGenFramebuffers(1, &_fbo); - glBindFramebuffer(GL_FRAMEBUFFER, _fbo); - glBindFramebuffer(GL_FRAMEBUFFER, oldfbo); - -// _rt = RenderTarget::create(width, height); -// if(nullptr == _rt) return false; - -#if CC_ENABLE_CACHE_TEXTURE_DATA - _dirtyFBOListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - if(isDefaultFBO()) return; - GLint oldfbo; - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfbo); - - glGenFramebuffers(1, &_fbo); - glBindFramebuffer(GL_FRAMEBUFFER, _fbo); - glBindFramebuffer(GL_FRAMEBUFFER, oldfbo); - CCLOG("Recreate FrameBufferObject _fbo is %d", _fbo); - _fboBindingDirty = true; - }); - - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_dirtyFBOListener, -1); -#endif - return true; -} - -FrameBuffer::FrameBuffer() -: _fbo(0) -, _previousFBO(0) -, _fboBindingDirty(true) -, _clearColor(Color4F(0, 0, 0, 1)) -, _clearDepth(1.0) -, _clearStencil(0) -, _rt(nullptr) -, _rtDepthStencil(nullptr) -, _isDefault(false) -#if CC_ENABLE_CACHE_TEXTURE_DATA -, _dirtyFBOListener(nullptr) -#endif -{ - _frameBuffers.insert(this); -} - -FrameBuffer::~FrameBuffer() -{ - { - CC_SAFE_RELEASE_NULL(_rt); - CC_SAFE_RELEASE_NULL(_rtDepthStencil); - glDeleteFramebuffers(1, &_fbo); - _fbo = 0; - _frameBuffers.erase(this); -#if CC_ENABLE_CACHE_TEXTURE_DATA - Director::getInstance()->getEventDispatcher()->removeEventListener(_dirtyFBOListener); -#endif - if (isDefaultFBO()) - _defaultFBO = nullptr; - } -} - -void FrameBuffer::clearFBO() -{ - applyFBO(); - glClearColor(_clearColor.r, _clearColor.g, _clearColor.b, _clearColor.a); - glClearDepth(_clearDepth); - glClearStencil(_clearStencil); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); - restoreFBO(); -} - -void FrameBuffer::attachRenderTarget(RenderTargetBase* rt) -{ - if(isDefaultFBO()) - { - CCLOG("Can not apply render target to default FBO"); - return; - } - CC_ASSERT(rt); - if(rt->getWidth() != _width || rt->getHeight() != _height) - { - CCLOG("Error, attach a render target with different size, Skip."); - return; - } - CC_SAFE_RETAIN(rt); - CC_SAFE_RELEASE(_rt); - _rt = rt; - _fboBindingDirty = true; -} - -void FrameBuffer::applyFBO() -{ - CHECK_GL_ERROR_DEBUG(); - glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&_previousFBO); - glBindFramebuffer(GL_FRAMEBUFFER, _fbo); -// CCASSERT(_fbo==0 || _fbo != _previousFBO, "calling applyFBO without restoring the previous one"); - CHECK_GL_ERROR_DEBUG(); - if(_fboBindingDirty && !isDefaultFBO()) - { - CHECK_GL_ERROR_DEBUG(); - if(RenderTargetBase::Type::Texture2D == _rt->getType()) - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _rt->getTexture()->getName(), 0); - else - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _rt->getBuffer()); - CHECK_GL_ERROR_DEBUG(); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, nullptr == _rtDepthStencil ? 0 : _rtDepthStencil->getBuffer()); - CHECK_GL_ERROR_DEBUG(); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, nullptr == _rtDepthStencil ? 0 : _rtDepthStencil->getBuffer()); - CHECK_GL_ERROR_DEBUG(); - CCLOG("FBO is %d _fbo %d color, %d ds", _fbo, RenderTargetBase::Type::Texture2D == _rt->getType() ? _rt->getTexture()->getName() : _rt->getBuffer(), nullptr == _rtDepthStencil ? 0 : _rtDepthStencil->getBuffer()); - _fboBindingDirty = false; - } - if(GL_FRAMEBUFFER_COMPLETE != glCheckFramebufferStatus(GL_FRAMEBUFFER)) - { - CCLOG("FrameBuffer Status Error %d", (int)glCheckFramebufferStatus(GL_FRAMEBUFFER)); - } - CHECK_GL_ERROR_DEBUG(); -} - -void FrameBuffer::restoreFBO() -{ - glBindFramebuffer(GL_FRAMEBUFFER, _previousFBO); -} - -void FrameBuffer::attachDepthStencilTarget(RenderTargetDepthStencil* rt) -{ - if(isDefaultFBO()) - { - CCLOG("Can not apply depth stencil target to default FBO"); - return; - } - - if(nullptr != rt && (rt->getWidth() != _width || rt->getHeight() != _height)) - { - CCLOG("Error, attach a render target Depth stencil with different size, Skip."); - return; - } - CC_SAFE_RETAIN(rt); - CC_SAFE_RELEASE(_rtDepthStencil); - _rtDepthStencil = rt; - _fboBindingDirty = true; -} -} //end of namespace experimental -NS_CC_END diff --git a/cocos/renderer/CCFrameBuffer.h b/cocos/renderer/CCFrameBuffer.h deleted file mode 100644 index ff360fdd8a6a..000000000000 --- a/cocos/renderer/CCFrameBuffer.h +++ /dev/null @@ -1,217 +0,0 @@ -/**************************************************************************** - Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CC_FRAME_BUFFER_H__ -#define __CC_FRAME_BUFFER_H__ - -#include "base/CCRef.h" -#include "platform/CCGL.h" -#include "renderer/CCTexture2D.h" -#include - -NS_CC_BEGIN - -class GLView; -class EventListenerCustom; - -namespace experimental { - -/** - Viewport is a normalized to FrameBufferObject - But for default FBO, the size is absolute. - */ -struct CC_DLL Viewport -{ - Viewport(float left, float bottom, float width, float height); - Viewport(); - - float _left; - float _bottom; - float _width; - float _height; -}; - -class CC_DLL RenderTargetBase : public Ref -{ -public: - enum class Type - { - RenderBuffer, - Texture2D, - }; -protected: - RenderTargetBase(); - virtual ~RenderTargetBase(); - bool init(unsigned int width, unsigned int height); - -public: - - virtual Texture2D* getTexture() const { return nullptr; } - virtual GLuint getBuffer() const { return 0; } - - unsigned int getWidth() const { return _width; } - unsigned int getHeight() const { return _height; } - Type getType() const { return _type; } -protected: - Type _type; - unsigned int _width; - unsigned int _height; - -}; - -class CC_DLL RenderTarget : public RenderTargetBase -{ -public: - - static RenderTarget* create(unsigned int width, unsigned int height, Texture2D::PixelFormat format = Texture2D::PixelFormat::RGBA8888); - - bool init(unsigned int width, unsigned int height, Texture2D::PixelFormat format); - - virtual Texture2D* getTexture() const { return _texture; } -CC_CONSTRUCTOR_ACCESS: - RenderTarget(); - virtual ~RenderTarget(); - -protected: - Texture2D* _texture; -#if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _rebuildTextureListener; -#endif -}; - -class CC_DLL RenderTargetRenderBuffer : public RenderTargetBase -{ -public: - - static RenderTargetRenderBuffer* create(unsigned int width, unsigned int height); - - bool init(unsigned int width, unsigned int height); - - virtual GLuint getBuffer() const { return _colorBuffer; } - -CC_CONSTRUCTOR_ACCESS: - RenderTargetRenderBuffer(); - virtual ~RenderTargetRenderBuffer(); - -protected: - GLenum _format; - GLuint _colorBuffer; -#if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _reBuildRenderBufferListener; -#endif -}; - -class CC_DLL RenderTargetDepthStencil : public RenderTargetBase -{ -public: - - static RenderTargetDepthStencil* create(unsigned int width, unsigned int height); - - bool init(unsigned int width, unsigned int height); - - virtual GLuint getBuffer() const { return _depthStencilBuffer; } - - CC_DEPRECATED(3.7) GLuint getDepthStencilBuffer() const { return _depthStencilBuffer; } -CC_CONSTRUCTOR_ACCESS: - RenderTargetDepthStencil(); - virtual ~RenderTargetDepthStencil(); - -protected: - - GLuint _depthStencilBuffer; -#if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _reBuildDepthStencilListener; -#endif -}; - -class CC_DLL FrameBuffer : public Ref -{ -public: - static FrameBuffer* create(uint8_t fid, unsigned int width, unsigned int height); - - bool init(uint8_t fid, unsigned int width, unsigned int height); -public: - GLuint getFBO() const { return _fbo; } - GLuint getFID() const { return _fid; } - //call glclear to clear frame buffer object - void clearFBO(); - void applyFBO(); - void restoreFBO(); - void setClearColor(const Color4F& color) { _clearColor = color;} - void setClearDepth(float depth) { _clearDepth = depth; } - void setClearStencil(int8_t stencil) { _clearStencil = stencil; } - const Color4F& getClearColor() const { return _clearColor; } - float getClearDepth() const { return _clearDepth; } - int8_t getClearStencil() const { return _clearStencil; } - - RenderTargetBase* getRenderTarget() const { return _rt; } - RenderTargetDepthStencil* getDepthStencilTarget() const { return _rtDepthStencil; } - void attachRenderTarget(RenderTargetBase* rt); - void attachDepthStencilTarget(RenderTargetDepthStencil* rt); - - bool isDefaultFBO() const { return _isDefault; } - unsigned int getWidth() const { return _width; } - unsigned int getHeight() const { return _height; } - -CC_CONSTRUCTOR_ACCESS: - FrameBuffer(); - virtual ~FrameBuffer(); - bool initWithGLView(GLView* view); -private: - //openGL content for FrameBuffer - GLuint _fbo; - GLuint _previousFBO; - //dirty flag for fbo binding - bool _fboBindingDirty; - // - uint8_t _fid; - // - Color4F _clearColor; - float _clearDepth; - int8_t _clearStencil; - int _width; - int _height; - RenderTargetBase* _rt; - RenderTargetDepthStencil* _rtDepthStencil; - bool _isDefault; -public: - static FrameBuffer* getOrCreateDefaultFBO(GLView* glView); - static void applyDefaultFBO(); - static void clearAllFBOs(); -private: - //static GLuint _defaultFBO; - static FrameBuffer* _defaultFBO; - static std::set _frameBuffers; - -private: -#if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _dirtyFBOListener; -#endif -}; -} // end of namespace experimental - -NS_CC_END - -#endif /* defined(__CC_FRAME_BUFFER_H__) */ diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index e0a27900f6d9..3e37d6360e6e 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -929,16 +929,6 @@ void GLProgram::setUniformsForBuiltins(const Mat4 &matrixMV) if (_flags.usesP) setUniformLocationWithMatrix4fv(_builtInUniforms[UNIFORM_P_MATRIX], matrixP.m, 1); - if (_flags.usesMultiViewP) - { - Mat4 mats[4]; - const auto stackSize = std::min(_director->getProjectionMatrixStackSize(), 4); - for (size_t i = 0; i < stackSize; ++i) { - mats[i] = _director->getProjectionMatrix(i); - } - setUniformLocationWithMatrix4fv(_builtInUniforms[UNIFORM_MULTIVIEW_P_MATRIX], mats[0].m, 4); - } - if (_flags.usesMV) setUniformLocationWithMatrix4fv(_builtInUniforms[UNIFORM_MV_MATRIX], matrixMV.m, 1); @@ -948,16 +938,6 @@ void GLProgram::setUniformsForBuiltins(const Mat4 &matrixMV) setUniformLocationWithMatrix4fv(_builtInUniforms[UNIFORM_MVP_MATRIX], matrixMVP.m, 1); } - if (_flags.usesMultiViewMVP) - { - Mat4 mats[4]; - const auto stackSize = std::min(_director->getProjectionMatrixStackSize(), 4); - for (size_t i = 0; i < stackSize; ++i) { - mats[i] = _director->getProjectionMatrix(i) * matrixMV; - } - setUniformLocationWithMatrix4fv(_builtInUniforms[UNIFORM_MULTIVIEW_MVP_MATRIX], mats[0].m, 4); - } - if (_flags.usesNormal) { Mat4 mvInverse = matrixMV; diff --git a/cocos/renderer/CCGLProgram.h b/cocos/renderer/CCGLProgram.h index 04aad5c5bd0d..06f1b562521c 100644 --- a/cocos/renderer/CCGLProgram.h +++ b/cocos/renderer/CCGLProgram.h @@ -538,14 +538,6 @@ class CC_DLL GLProgram : public Ref /** returns the Uniform flags */ const UniformFlags& getUniformFlags() const { return _flags; } - //DEPRECATED - CC_DEPRECATED_ATTRIBUTE bool initWithVertexShaderByteArray(const GLchar* vertexByteArray, const GLchar* fragByteArray) - { return initWithByteArrays(vertexByteArray, fragByteArray); } - CC_DEPRECATED_ATTRIBUTE bool initWithVertexShaderFilename(const std::string &vertexFilename, const std::string& fragFilename) - { return initWithFilenames(vertexFilename, fragFilename); } - CC_DEPRECATED_ATTRIBUTE void addAttribute(const std::string &attributeName, GLuint index) const { return bindAttribLocation(attributeName, index); } - - protected: /** Update the uniform data in location. diff --git a/cocos/renderer/CCGLProgramCache.cpp b/cocos/renderer/CCGLProgramCache.cpp index 928ddf5197e2..541107065723 100644 --- a/cocos/renderer/CCGLProgramCache.cpp +++ b/cocos/renderer/CCGLProgramCache.cpp @@ -98,18 +98,6 @@ void GLProgramCache::destroyInstance() CC_SAFE_RELEASE_NULL(_sharedGLProgramCache); } -// FIXME: deprecated -GLProgramCache* GLProgramCache::sharedShaderCache() -{ - return GLProgramCache::getInstance(); -} - -// FIXME: deprecated -void GLProgramCache::purgeSharedShaderCache() -{ - GLProgramCache::destroyInstance(); -} - GLProgramCache::GLProgramCache() : _programs() { diff --git a/cocos/renderer/CCGLProgramCache.h b/cocos/renderer/CCGLProgramCache.h index dc60d73fa52c..8d6d7dbf1cb1 100644 --- a/cocos/renderer/CCGLProgramCache.h +++ b/cocos/renderer/CCGLProgramCache.h @@ -68,29 +68,18 @@ class CC_DLL GLProgramCache : public Ref /** purges the cache. It releases the retained instance. */ static void destroyInstance(); - /** @deprecated Use getInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static GLProgramCache* sharedShaderCache(); - - /** @deprecated Use destroyInstance() instead */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedShaderCache(); - /** loads the default shaders */ void loadDefaultGLPrograms(); - CC_DEPRECATED_ATTRIBUTE void loadDefaultShaders() { loadDefaultGLPrograms(); } /** reload the default shaders */ void reloadDefaultGLPrograms(); - CC_DEPRECATED_ATTRIBUTE void reloadDefaultShaders() { reloadDefaultGLPrograms(); } /** returns a GL program for a given key */ GLProgram * getGLProgram(const std::string &key); - CC_DEPRECATED_ATTRIBUTE GLProgram * getProgram(const std::string &key) { return getGLProgram(key); } - CC_DEPRECATED_ATTRIBUTE GLProgram * programForKey(const std::string &key){ return getGLProgram(key); } /** adds a GLProgram to the cache for a given name */ void addGLProgram(GLProgram* program, const std::string &key); - CC_DEPRECATED_ATTRIBUTE void addProgram(GLProgram* program, const std::string &key) { addGLProgram(program, key); } /** reload default programs these are relative to light */ void reloadDefaultGLProgramsRelativeToLights(); diff --git a/cocos/renderer/CCGLProgramState.cpp b/cocos/renderer/CCGLProgramState.cpp index 0de3707608b1..b302c242c023 100644 --- a/cocos/renderer/CCGLProgramState.cpp +++ b/cocos/renderer/CCGLProgramState.cpp @@ -172,15 +172,6 @@ void UniformValue::setCallback(const std::function & _type = Type::CALLBACK_FN; } -void UniformValue::setTexture(GLuint textureId, GLuint textureUnit) -{ - //CCASSERT(_uniform->type == GL_SAMPLER_2D, "Wrong type. expecting GL_SAMPLER_2D"); - _value.tex.textureId = textureId; - _value.tex.textureUnit = textureUnit; - _value.tex.texture = nullptr; - _type = Type::VALUE; -} - void UniformValue::setTexture(Texture2D* texture, GLuint textureUnit) { CCASSERT(texture != nullptr, "texture is nullptr"); @@ -921,48 +912,6 @@ void GLProgramState::setUniformTexture(GLint uniformLocation, Texture2D *texture } } -void GLProgramState::setUniformTexture(const std::string& uniformName, GLuint textureId) -{ - auto v = getUniformValue(uniformName); - if (v) - { - if (_boundTextureUnits.find(uniformName) != _boundTextureUnits.end()) - { - v->setTexture(textureId, _boundTextureUnits[uniformName]); - } - else - { - v->setTexture(textureId, _textureUnitIndex); - _boundTextureUnits[uniformName] = _textureUnitIndex++; - } - } - else - { - CCLOG("cocos2d: warning: Uniform not found: %s", uniformName.c_str()); - } -} - -void GLProgramState::setUniformTexture(GLint uniformLocation, GLuint textureId) -{ - auto v = getUniformValue(uniformLocation); - if (v) - { - if (_boundTextureUnits.find(v->_uniform->name) != _boundTextureUnits.end()) - { - v->setTexture(textureId, _boundTextureUnits[v->_uniform->name]); - } - else - { - v->setTexture(textureId, _textureUnitIndex); - _boundTextureUnits[v->_uniform->name] = _textureUnitIndex++; - } - } - else - { - CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); - } -} - // Auto bindings void GLProgramState::setParameterAutoBinding(const std::string& uniformName, const std::string& autoBinding) { diff --git a/cocos/renderer/CCGLProgramState.h b/cocos/renderer/CCGLProgramState.h index f6a0a297e1cc..8090db45a2cc 100644 --- a/cocos/renderer/CCGLProgramState.h +++ b/cocos/renderer/CCGLProgramState.h @@ -100,14 +100,6 @@ class CC_DLL UniformValue @param callback Callback function to send data to OpenGL pipeline. */ void setCallback(const std::function &callback); - /** - Set texture to uniform value. - @param textureId The texture handle. - @param textureUnit The binding texture unit to be used in shader. - @deprecated please use setTexture(Texture2D* texture, GLuint textureUnit) instead, - Passing a `textureId` may trigger texture lost issue (https://github.com/cocos2d/cocos2d-x/issues/16871). - */ - CC_DEPRECATED_ATTRIBUTE void setTexture(GLuint textureId, GLuint textureUnit); /** Set texture to uniform value. @@ -332,12 +324,6 @@ class CC_DLL GLProgramState : public Ref void setUniformMat4(const std::string& uniformName, const Mat4& value); void setUniformCallback(const std::string& uniformName, const std::function &callback); void setUniformTexture(const std::string& uniformName, Texture2D *texture); - /** - * @deprecated, please use setUniformTexture(const std::string& uniformName, Texture2D *texture) instead, - * Passing a `textureId` may trigger texture lost issue (https://github.com/cocos2d/cocos2d-x/issues/16871). - */ - CC_DEPRECATED_ATTRIBUTE void setUniformTexture(const std::string& uniformName, GLuint textureId); - /**@}*/ /** @{ Setting user defined uniforms by uniform location in the shader. @@ -354,13 +340,7 @@ class CC_DLL GLProgramState : public Ref void setUniformMat4(GLint uniformLocation, const Mat4& value); void setUniformCallback(GLint uniformLocation, const std::function &callback); void setUniformTexture(GLint uniformLocation, Texture2D *texture); - /** - * @deprecated, please use setUniformTexture(GLint uniformLocation, Texture2D *texture) instead, - * Passing a `textureId` may trigger texture lost issue (https://github.com/cocos2d/cocos2d-x/issues/16871). - */ - CC_DEPRECATED_ATTRIBUTE void setUniformTexture(GLint uniformLocation, GLuint textureId); - /**@}*/ - + /** * Returns the Node bound to the GLProgramState */ diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index 1b761612ca42..4b1beb210637 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -40,7 +40,7 @@ #include "platform/CCFileUtils.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #define strcasecmp _stricmp #endif @@ -233,7 +233,8 @@ bool Material::parseSampler(GLProgramState* glProgramState, Properties* samplerP bool usemipmap = false; const char* mipmap = getOptionalString(samplerProperties, "mipmap", "false"); if (mipmap && strcasecmp(mipmap, "true")==0) { - texture->generateMipmap(); +// TODO coulsonwang +// texture->generateMipmap(); usemipmap = true; } @@ -283,7 +284,8 @@ bool Material::parseSampler(GLProgramState* glProgramState, Properties* samplerP else CCLOG("Invalid magFilter: %s", magFilter); - texture->setTexParameters(texParams); +// TODO coulsonwang +// texture->setSamplerDescriptor(texParams); } glProgramState->setUniformTexture(samplerProperties->getId(), texture); diff --git a/cocos/vr/CCVRDistortion.h b/cocos/renderer/CCPipelineDescriptor.h similarity index 68% rename from cocos/vr/CCVRDistortion.h rename to cocos/renderer/CCPipelineDescriptor.h index 9a02a2154505..a8a3a4b6b709 100644 --- a/cocos/vr/CCVRDistortion.h +++ b/cocos/renderer/CCPipelineDescriptor.h @@ -1,20 +1,18 @@ /**************************************************************************** - Copyright (c) 2016 Google Inc. - Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + http://www.cocos2d-x.org - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -23,32 +21,26 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef CCVRDistortion_h -#define CCVRDistortion_h +#pragma once #include "platform/CCPlatformMacros.h" +#include "renderer/backend/DepthStencilState.h" +#include "renderer/backend/BlendState.h" +#include "renderer/backend/Texture.h" +#include "renderer/backend/VertexLayout.h" +#include "renderer/backend/RenderPassDescriptor.h" +#include "renderer/backend/ProgramState.h" + +#include NS_CC_BEGIN -// Barrel Distortion -class Distortion +struct CC_DLL PipelineDescriptor final { -public: - Distortion(); - - void setCoefficients(float *coefficients); - float *coefficients(); - - float distortionFactor(float radius); - float distort(float radius); - float distortInverse(float radius); - -private: - static const int s_numberOfCoefficients = 2; - float _coefficients[s_numberOfCoefficients]; + backend::ProgramState* programState = nullptr; + backend::BlendDescriptor blendDescriptor; + backend::RenderPassDescriptor renderPassDescriptor; + backend::VertexLayout vertexLayout; }; NS_CC_END - -#endif /* CCVRDistortion_h */ diff --git a/cocos/renderer/CCPrimitive.cpp b/cocos/renderer/CCPrimitive.cpp deleted file mode 100644 index 56364ac18def..000000000000 --- a/cocos/renderer/CCPrimitive.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "renderer/CCPrimitive.h" -#include "renderer/CCVertexIndexBuffer.h" - -NS_CC_BEGIN - -Primitive* Primitive::create(VertexData* verts, IndexBuffer* indices, int type) -{ - auto result = new (std::nothrow) Primitive(); - if( result && result->init(verts, indices, type)) - { - result->autorelease(); - return result; - } - - CC_SAFE_DELETE(result); - return nullptr; -} - -const VertexData* Primitive::getVertexData() const -{ - return _verts; -} - -const IndexBuffer* Primitive::getIndexData() const -{ - return _indices; -} - -Primitive::Primitive() -: _verts(nullptr) -, _indices(nullptr) -, _start(0) -, _count(0) -, _type(GL_POINTS) -{ -} - -Primitive::~Primitive() -{ - CC_SAFE_RELEASE_NULL(_verts); - CC_SAFE_RELEASE_NULL(_indices); -} - -bool Primitive::init(VertexData* verts, IndexBuffer* indices, int type) -{ - if( nullptr == verts ) return false; - if(verts != _verts) - { - CC_SAFE_RELEASE(_verts); - CC_SAFE_RETAIN(verts); - _verts = verts; - } - - if(indices != _indices) - { - CC_SAFE_RETAIN(indices); - CC_SAFE_RELEASE(_indices); - _indices = indices; - } - - _type = type; - - return true; -} - -void Primitive::draw() -{ - if(_verts) - { - _verts->use(); - if(_indices!= nullptr) - { - GLenum type = (_indices->getType() == IndexBuffer::IndexType::INDEX_TYPE_SHORT_16) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indices->getVBO()); - size_t offset = _start * _indices->getSizePerIndex(); - glDrawElements((GLenum)_type, _count, type, (GLvoid*)offset); - } - else - { - glDrawArrays((GLenum)_type, _start, _count); - } - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); - } -} - -void Primitive::setStart(int start) -{ - _start = start; -} - -void Primitive::setCount(int count) -{ - _count = count; -} - -NS_CC_END diff --git a/cocos/renderer/CCPrimitive.h b/cocos/renderer/CCPrimitive.h deleted file mode 100644 index 663152e8b264..000000000000 --- a/cocos/renderer/CCPrimitive.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CC_PRIMITIVE_H__ -#define __CC_PRIMITIVE_H__ - -#include "renderer/CCVertexIndexData.h" - -/** - * @addtogroup renderer - * @{ - */ - -NS_CC_BEGIN - -class IndexBuffer; - -/** - Primitive can support sending points, lines and triangles to glpipeline, which is an abstraction - of primitive data. - */ -class CC_DLL Primitive : public Ref -{ -public: - /** - Create an instance of primitive. - @param verts VertexData used in the primitive. - @param indices Optional index data. - @param type The type (Points, Lines, Triangles) used. - */ - static Primitive* create(VertexData* verts, IndexBuffer* indices, int type); - /**Get the vertexData.*/ - const VertexData* getVertexData() const; - /**Get the optional index data, will return null if index data is not used.*/ - const IndexBuffer* getIndexData() const; - /**Get the primitive type.*/ - int getType() const { return _type; } - - /**called by rendering framework, will send the data to GLPipeline.*/ - void draw(); - - /**Get the start index of primitive.*/ - int getStart() const { return _start; } - /**Get the number of vertices or indices used for drawing.*/ - int getCount() const { return _count; } - /**Setter for the start index.*/ - void setStart(int start); - /**Setter for the count. */ - void setCount(int count); - -protected: - Primitive(); - virtual ~Primitive(); - - bool init(VertexData* verts, IndexBuffer* indices, int type); - -protected: - VertexData* _verts; - IndexBuffer* _indices; - int _start; - int _count; - int _type; -}; - -NS_CC_END - -/** - end of support group - @} - */ -#endif //__CC_PRIMITIVE_H__ diff --git a/cocos/renderer/CCPrimitiveCommand.cpp b/cocos/renderer/CCPrimitiveCommand.cpp deleted file mode 100644 index 7fda32a31608..000000000000 --- a/cocos/renderer/CCPrimitiveCommand.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "renderer/CCPrimitiveCommand.h" - -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/CCRenderer.h" -#include "base/ccUtils.h" - -#include "base/CCDirector.h" - -NS_CC_BEGIN - -PrimitiveCommand::PrimitiveCommand() -: _materialID(0) -, _textureID(0) -, _glProgramState(nullptr) -, _blendType(BlendFunc::DISABLE) -, _primitive(nullptr) -{ - _type = RenderCommand::Type::PRIMITIVE_COMMAND; -} - -PrimitiveCommand::~PrimitiveCommand() -{ -} - -void PrimitiveCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive, const Mat4& mv, uint32_t flags) -{ - CCASSERT(glProgramState, "Invalid GLProgramState"); - CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in PrimitiveCommand"); - CCASSERT(primitive != nullptr, "Could not render null primitive"); - - RenderCommand::init(globalOrder, mv, flags); - - _primitive = primitive; - - _mv = mv; - - if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || _glProgramState != glProgramState) { - - _textureID = textureID; - _blendType = blendType; - _glProgramState = glProgramState; - - } -} - -void PrimitiveCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive,const Mat4& mv) -{ - init(globalOrder, textureID, glProgramState, blendType, primitive, mv, 0); -} - -void PrimitiveCommand::execute() const -{ - //Set texture - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _textureID); - - //set blend mode - utils::setBlending(_blendType.src, _blendType.dst); - - _glProgramState->apply(_mv); - - _primitive->draw(); - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_primitive->getCount()); -} - -NS_CC_END diff --git a/cocos/renderer/CCPrimitiveCommand.h b/cocos/renderer/CCPrimitiveCommand.h deleted file mode 100644 index 0d02b44102a3..000000000000 --- a/cocos/renderer/CCPrimitiveCommand.h +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef _CC_PRIMITIVE_COMMAND_H__ -#define _CC_PRIMITIVE_COMMAND_H__ - -#include "renderer/CCPrimitive.h" -#include "renderer/CCRenderCommand.h" - -/** - * @addtogroup renderer - * @{ - */ - -NS_CC_BEGIN -class GLProgramState; -/** - Command used to render primitive, similar to QuadCommand. - Every QuadCommand will have generate material ID by give textureID, glProgramState, Blend function. - However, primitive command could not be batched. - */ -class CC_DLL PrimitiveCommand : public RenderCommand -{ -public: - /**@{ - Constructor and Destructor. - */ - PrimitiveCommand(); - ~PrimitiveCommand(); - - /**@}*/ - - /** Initializes the command. - @param globalOrder GlobalZOrder of the command. - @param textureID The openGL handle of the used texture. - @param glProgramState The specified glProgram and its uniform. - @param blendType Blend function for the command. - @param primitive Rendered primitive for the command. - @param mv ModelView matrix for the command. - @param flags to indicate that the command is using 3D rendering or not. - */ - void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive, const Mat4& mv, uint32_t flags); - CC_DEPRECATED_ATTRIBUTE void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive,const Mat4& mv); - - /**Get the generated material ID.*/ - uint32_t getMaterialID() const { return _materialID; } - /**Get the texture ID used for drawing.*/ - GLuint getTextureID() const { return _textureID; } - /**Get the glprogramstate used for drawing.*/ - GLProgramState* getGLProgramState() const { return _glProgramState; } - /**Get the blend function for drawing.*/ - BlendFunc getBlendType() const { return _blendType; } - /**Get the modelview matrix when draw the primitive.*/ - const Mat4& getModelView() const { return _mv; } - /**Execute and draw the command, called by renderer.*/ - void execute() const; -protected: - - uint32_t _materialID; - GLuint _textureID; - GLProgramState* _glProgramState; - BlendFunc _blendType; - Primitive* _primitive; - Mat4 _mv; -}; - -NS_CC_END - -/** - end of support group - @} - */ -#endif //_CC_PRIMITIVE_COMMAND_H__ diff --git a/cocos/renderer/CCQuadCommand.cpp b/cocos/renderer/CCQuadCommand.cpp index 21d15420a972..f1f6123c505a 100644 --- a/cocos/renderer/CCQuadCommand.cpp +++ b/cocos/renderer/CCQuadCommand.cpp @@ -32,6 +32,7 @@ #include "renderer/CCRenderer.h" #include "renderer/CCPass.h" #include "renderer/CCTexture2D.h" +#include "base/ccUtils.h" NS_CC_BEGIN @@ -55,18 +56,20 @@ QuadCommand::~QuadCommand() void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv, uint32_t flags) { - CCASSERT(glProgramState, "Invalid GLProgramState"); - CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand"); - - if (quadCount * 6 > _indexSize) - reIndex((int)quadCount*6); - - Triangles triangles; - triangles.verts = &quads->tl; - triangles.vertCount = (int)quadCount * 4; - triangles.indices = __indices; - triangles.indexCount = (int)quadCount * 6; - TrianglesCommand::init(globalOrder, textureID, glProgramState, blendType, triangles, mv, flags); + //TOOD coulsonwang + cocos2d::log("Error in %s %s %d", __FILE__, __FUNCTION__, __LINE__); +// CCASSERT(glProgramState, "Invalid GLProgramState"); +// CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand"); +// +// if (quadCount * 6 > _indexSize) +// reIndex((int)quadCount*6); +// +// Triangles triangles; +// triangles.verts = &quads->tl; +// triangles.vertCount = (int)quadCount * 4; +// triangles.indices = __indices; +// triangles.indexCount = (int)quadCount * 6; +// TrianglesCommand::init(globalOrder, textureID, glProgramState, blendType, triangles, mv, flags); } void QuadCommand::reIndex(int indicesCount) @@ -103,11 +106,6 @@ void QuadCommand::reIndex(int indicesCount) _indexSize = indicesCount; } -void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* shader, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4 &mv) -{ - init(globalOrder, textureID, shader, blendType, quads, quadCount, mv, 0); -} - void QuadCommand::init(float globalOrder, Texture2D* texture, GLProgramState* glProgramState, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv, uint32_t flags) { @@ -115,4 +113,20 @@ void QuadCommand::init(float globalOrder, Texture2D* texture, GLProgramState* gl _alphaTextureID = texture->getAlphaTextureName(); } + +void QuadCommand::init(float globalOrder, Texture2D *texture, const BlendFunc& blendType, V3F_C4B_T2F_Quad *quads, ssize_t quadCount, const Mat4 &mv, uint32_t flags) +{ + if (quadCount * 6 > _indexSize) + reIndex((int)quadCount*6); + + Triangles triangles; + triangles.verts = &quads->tl; + triangles.vertCount = (int)quadCount * 4; + triangles.indices = __indices; + triangles.indexCount = (int)quadCount * 6; + TrianglesCommand::init(globalOrder, texture, blendType, triangles, mv, flags); + + _alphaTextureID = texture->getAlphaTextureName(); +} + NS_CC_END diff --git a/cocos/renderer/CCQuadCommand.h b/cocos/renderer/CCQuadCommand.h index 5d96543fe716..181f7a566c59 100644 --- a/cocos/renderer/CCQuadCommand.h +++ b/cocos/renderer/CCQuadCommand.h @@ -50,6 +50,8 @@ class CC_DLL QuadCommand : public TrianglesCommand QuadCommand(); /**Destructor.*/ ~QuadCommand(); + + //TODO: remove textureID, program st /** Initializes the command. @param globalOrder GlobalZOrder of the command. @@ -64,13 +66,11 @@ class CC_DLL QuadCommand : public TrianglesCommand void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv, uint32_t flags); - /**Deprecated function, the params is similar as the upper init function, with flags equals 0.*/ - CC_DEPRECATED_ATTRIBUTE void init(float globalOrder, GLuint textureID, GLProgramState* shader, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, - const Mat4& mv); - void init(float globalOrder, Texture2D* textureID, GLProgramState* glProgramState, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv, uint32_t flags); + void init(float globalOrder, Texture2D* texture, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv, uint32_t flags); + protected: void reIndex(int indices); diff --git a/cocos/renderer/CCRenderCommand.cpp b/cocos/renderer/CCRenderCommand.cpp index 0f587b432977..8c76da323841 100644 --- a/cocos/renderer/CCRenderCommand.cpp +++ b/cocos/renderer/CCRenderCommand.cpp @@ -22,21 +22,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - - #include "renderer/CCRenderCommand.h" #include "2d/CCCamera.h" #include "2d/CCNode.h" + NS_CC_BEGIN RenderCommand::RenderCommand() -: _type(RenderCommand::Type::UNKNOWN_COMMAND) -, _globalOrder(0) -, _isTransparent(true) -, _skipBatching(false) -, _is3D(false) -, _depth(0) { } @@ -44,7 +37,7 @@ RenderCommand::~RenderCommand() { } -void RenderCommand::init(float globalZOrder, const cocos2d::Mat4 &transform, uint32_t flags) +void RenderCommand::init(float globalZOrder, const cocos2d::Mat4 &transform, unsigned int flags) { _globalOrder = globalZOrder; if (flags & Node::FLAGS_RENDER_AS_3D) diff --git a/cocos/renderer/CCRenderCommand.h b/cocos/renderer/CCRenderCommand.h index 9fc598b72ad7..f3f9ebd8b8ef 100644 --- a/cocos/renderer/CCRenderCommand.h +++ b/cocos/renderer/CCRenderCommand.h @@ -22,15 +22,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - - -#ifndef __CCRENDERCOMMAND_H_ -#define __CCRENDERCOMMAND_H_ - -#include +#pragma once #include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" +#include "renderer/CCPipelineDescriptor.h" /** * @addtogroup renderer @@ -53,18 +49,16 @@ class CC_DLL RenderCommand UNKNOWN_COMMAND, /** Quad command, used for draw quad.*/ QUAD_COMMAND, - /**Custom command, used for calling callback for rendering.*/ + /**Custom command, used to draw things other then TRIANGLES_COMMAND.*/ CUSTOM_COMMAND, - /**Batch command, used for draw batches in texture atlas.*/ - BATCH_COMMAND, /**Group command, which can group command in a tree hierarchy.*/ GROUP_COMMAND, /**Mesh command, used to draw 3D meshes.*/ MESH_COMMAND, - /**Primitive command, used to draw primitives such as lines, points and triangles.*/ - PRIMITIVE_COMMAND, /**Triangles command, used to draw triangles.*/ - TRIANGLES_COMMAND + TRIANGLES_COMMAND, + /**Callback command, used for calling callback for rendering.*/ + CALLBACK_COMMAND, }; /** @@ -73,7 +67,7 @@ class CC_DLL RenderCommand @param modelViewTransform Modelview matrix when submitting the render command. @param flags Flag used to indicate whether the command should be draw at 3D mode or not. */ - void init(float globalZOrder, const Mat4& modelViewTransform, uint32_t flags); + void init(float globalZOrder, const Mat4& modelViewTransform, unsigned int flags); /** Get global Z order. */ float getGlobalOrder() const { return _globalOrder; } @@ -98,6 +92,8 @@ class CC_DLL RenderCommand void set3D(bool value) { _is3D = value; } /**Get the depth by current model view matrix.*/ float getDepth() const { return _depth; } + // Can use the result to change the descriptor content. + inline PipelineDescriptor& getPipelineDescriptor() { return _pipelineDescriptor; } protected: /**Constructor.*/ @@ -108,25 +104,27 @@ class CC_DLL RenderCommand void printID(); /**Type used in order to avoid dynamic cast, faster. */ - Type _type; + Type _type = RenderCommand::Type::UNKNOWN_COMMAND; /** Commands are sort by global Z order. */ - float _globalOrder; + float _globalOrder = 0.f; /** Transparent flag. */ - bool _isTransparent; + bool _isTransparent = true; /** QuadCommand and TrianglesCommand could be auto batched if there material ID is the same, however, if a command is skip batching, it would be forced to draw in a separate function call, and break the batch. */ - bool _skipBatching; + bool _skipBatching = false; /** Is the command been rendered on 3D pass. */ - bool _is3D; + bool _is3D = false; /** Depth from the model view matrix.*/ - float _depth; + float _depth = 0.f; + + PipelineDescriptor _pipelineDescriptor; }; NS_CC_END @@ -134,4 +132,3 @@ NS_CC_END end of support group @} */ -#endif //__CCRENDERCOMMAND_H_ diff --git a/cocos/renderer/CCRenderState.cpp b/cocos/renderer/CCRenderState.cpp index e1a8b148d426..8bafa4411b94 100644 --- a/cocos/renderer/CCRenderState.cpp +++ b/cocos/renderer/CCRenderState.cpp @@ -249,7 +249,7 @@ void RenderState::StateBlock::bindNoRestore() } if ((_bits & RS_BLEND_FUNC) && (_blendSrc != _defaultState->_blendSrc || _blendDst != _defaultState->_blendDst)) { - utils::setBlending((GLenum)_blendSrc, (GLenum)_blendDst); + utils::setBlending(utils::toBackendBlendFactor(_blendSrc), utils::toBackendBlendFactor(_blendDst)); _defaultState->_blendSrc = _blendSrc; _defaultState->_blendDst = _blendDst; } @@ -344,7 +344,7 @@ void RenderState::StateBlock::restore(long stateOverrideBits) } if (!(stateOverrideBits & RS_BLEND_FUNC) && (_defaultState->_bits & RS_BLEND_FUNC)) { - utils::setBlending(GL_ONE, GL_ZERO); + utils::setBlending(backend::BlendFactor::ONE, backend::BlendFactor::ZERO); _defaultState->_bits &= ~RS_BLEND_FUNC; _defaultState->_blendSrc = RenderState::BLEND_ONE; _defaultState->_blendDst = RenderState::BLEND_ZERO; diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index f08fef3af4cf..b469d8b68a1a 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -22,22 +22,20 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - #include "renderer/CCRenderer.h" #include #include "renderer/CCTrianglesCommand.h" -#include "renderer/CCBatchCommand.h" #include "renderer/CCCustomCommand.h" +#include "renderer/CCCallbackCommand.h" #include "renderer/CCGroupCommand.h" -#include "renderer/CCPrimitiveCommand.h" #include "renderer/CCMeshCommand.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCMaterial.h" #include "renderer/CCTechnique.h" #include "renderer/CCPass.h" -#include "renderer/CCRenderState.h" +#include "renderer/CCTexture2D.h" #include "base/CCConfiguration.h" #include "base/CCDirector.h" @@ -47,6 +45,8 @@ #include "2d/CCCamera.h" #include "2d/CCScene.h" +#include "renderer/backend/Backend.h" + NS_CC_BEGIN // helper @@ -63,7 +63,6 @@ static bool compare3DCommand(RenderCommand* a, RenderCommand* b) // queue RenderQueue::RenderQueue() { - } void RenderQueue::push_back(RenderCommand* command) @@ -149,45 +148,6 @@ void RenderQueue::realloc(size_t reserveSize) } } -void RenderQueue::saveRenderState() -{ - _isDepthEnabled = glIsEnabled(GL_DEPTH_TEST) != GL_FALSE; - _isCullEnabled = glIsEnabled(GL_CULL_FACE) != GL_FALSE; - glGetBooleanv(GL_DEPTH_WRITEMASK, &_isDepthWrite); - - CHECK_GL_ERROR_DEBUG(); -} - -void RenderQueue::restoreRenderState() -{ - if (_isCullEnabled) - { - glEnable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setCullFace(true); - } - else - { - glDisable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setCullFace(false); - } - - if (_isDepthEnabled) - { - glEnable(GL_DEPTH_TEST); - RenderState::StateBlock::_defaultState->setDepthTest(true); - } - else - { - glDisable(GL_DEPTH_TEST); - RenderState::StateBlock::_defaultState->setDepthTest(false); - } - - glDepthMask(_isDepthWrite); - RenderState::StateBlock::_defaultState->setDepthWrite(_isDepthEnabled); - - CHECK_GL_ERROR_DEBUG(); -} - // // // @@ -197,17 +157,6 @@ static const int DEFAULT_RENDER_QUEUE = 0; // constructors, destructor, init // Renderer::Renderer() -:_lastBatchedMeshCommand(nullptr) -,_triBatchesToDrawCapacity(-1) -,_triBatchesToDraw(nullptr) -,_filledVertex(0) -,_filledIndex(0) -,_glViewAssigned(false) -,_isRendering(false) -,_isDepthTestFor2D(false) -#if CC_ENABLE_CACHE_TEXTURE_DATA -,_cacheTextureListener(nullptr) -#endif { _groupCommandManager = new (std::nothrow) GroupCommandManager(); @@ -217,11 +166,7 @@ Renderer::Renderer() _renderGroups.push_back(defaultRenderQueue); _queuedTriangleCommands.reserve(BATCH_TRIAGCOMMAND_RESERVED_SIZE); - // default clear color - _clearColor = Color4F::BLACK; - // for the batched TriangleCommand - _triBatchesToDrawCapacity = 500; _triBatchesToDraw = (TriBatchToDraw*) malloc(sizeof(_triBatchesToDraw[0]) * _triBatchesToDrawCapacity); } @@ -230,119 +175,24 @@ Renderer::~Renderer() _renderGroups.clear(); _groupCommandManager->release(); - glDeleteBuffers(2, _buffersVBO); - free(_triBatchesToDraw); - if (Configuration::getInstance()->supportsShareableVAO()) - { - glDeleteVertexArrays(1, &_buffersVAO); - glBindVertexArray(0); - } #if CC_ENABLE_CACHE_TEXTURE_DATA Director::getInstance()->getEventDispatcher()->removeEventListener(_cacheTextureListener); #endif -} - -void Renderer::initGLView() -{ -#if CC_ENABLE_CACHE_TEXTURE_DATA - _cacheTextureListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom* event){ - /** listen the event that renderer was recreated on Android/WP8 */ - this->setupBuffer(); - }); - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_cacheTextureListener, -1); -#endif - - setupBuffer(); - - _glViewAssigned = true; -} - -void Renderer::setupBuffer() -{ - if(Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOAndVAO(); - } - else - { - setupVBO(); - } -} - -void Renderer::setupVBOAndVAO() -{ - //generate vbo and vao for trianglesCommand - glGenVertexArrays(1, &_buffersVAO); - glBindVertexArray(_buffersVAO); - - glGenBuffers(2, &_buffersVBO[0]); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - // Issue #15652 - // Should not initialize VBO with a large size (VBO_SIZE=65536), - // it may cause low FPS on some Android devices like LG G4 & Nexus 5X. - // It's probably because some implementations of OpenGLES driver will - // copy the whole memory of VBO which initialized at the first time - // once glBufferData/glBufferSubData is invoked. - // For more discussion, please refer to https://github.com/cocos2d/cocos2d-x/issues/15652 - //glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * VBO_SIZE, _verts, GL_DYNAMIC_DRAW); - - // vertices - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, vertices)); - - // colors - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, colors)); - - // tex coords - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, texCoords)); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * INDEX_VBO_SIZE, _indices, GL_STATIC_DRAW); - - // Must unbind the VAO before changing the element buffer. - glBindVertexArray(0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); + CC_SAFE_RELEASE(_commandBuffer); } -void Renderer::setupVBO() +void Renderer::init() { - glGenBuffers(2, &_buffersVBO[0]); - // Issue #15652 - // Should not initialize VBO with a large size (VBO_SIZE=65536), - // it may cause low FPS on some Android devices like LG G4 & Nexus 5X. - // It's probably because some implementations of OpenGLES driver will - // copy the whole memory of VBO which initialized at the first time - // once glBufferData/glBufferSubData is invoked. - // For more discussion, please refer to https://github.com/cocos2d/cocos2d-x/issues/15652 -// mapBuffers(); -} + // Should invoke _triangleCommandBufferManager.init() first. + _triangleCommandBufferManager.init(); + _vertexBuffer = _triangleCommandBufferManager.getVertexBuffer(); + _indexBuffer = _triangleCommandBufferManager.getIndexBuffer(); -void Renderer::mapBuffers() -{ - // Avoid changing the element buffer for whatever VAO might be bound. - glBindVertexArray(0); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * VBO_SIZE, _verts, GL_DYNAMIC_DRAW); - - - glBindBuffer(GL_ARRAY_BUFFER, 0); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * INDEX_VBO_SIZE, _indices, GL_STATIC_DRAW); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); + auto device = backend::Device::getInstance(); + _commandBuffer = device->newCommandBuffer(); } void Renderer::addCommand(RenderCommand* command) @@ -379,264 +229,142 @@ int Renderer::createRenderQueue() return (int)_renderGroups.size() - 1; } +void Renderer::processGroupCommand(GroupCommand* command) +{ + flush(); + + int renderQueueID = ((GroupCommand*) command)->getRenderQueueID(); + visitRenderQueue(_renderGroups[renderQueueID]); +} + void Renderer::processRenderCommand(RenderCommand* command) { auto commandType = command->getType(); - if( RenderCommand::Type::TRIANGLES_COMMAND == commandType) + switch(commandType) { - // flush other queues - flush3D(); - - auto cmd = static_cast(command); - - // flush own queue when buffer is full - if(_filledVertex + cmd->getVertexCount() > VBO_SIZE || _filledIndex + cmd->getIndexCount() > INDEX_VBO_SIZE) - { - CCASSERT(cmd->getVertexCount()>= 0 && cmd->getVertexCount() < VBO_SIZE, "VBO for vertex is not big enough, please break the data down or use customized render command"); - CCASSERT(cmd->getIndexCount()>= 0 && cmd->getIndexCount() < INDEX_VBO_SIZE, "VBO for index is not big enough, please break the data down or use customized render command"); - drawBatchedTriangles(); - } - - // queue it - _queuedTriangleCommands.push_back(cmd); - _filledIndex += cmd->getIndexCount(); - _filledVertex += cmd->getVertexCount(); - } - else if (RenderCommand::Type::MESH_COMMAND == commandType) - { - flush2D(); - auto cmd = static_cast(command); - - if (cmd->isSkipBatching() || _lastBatchedMeshCommand == nullptr || _lastBatchedMeshCommand->getMaterialID() != cmd->getMaterialID()) + case RenderCommand::Type::TRIANGLES_COMMAND: { + // flush other queues flush3D(); + + auto cmd = static_cast(command); + + // flush own queue when buffer is full + if(_queuedTotalVertexCount + cmd->getVertexCount() > VBO_SIZE || _queuedTotalIndexCount + cmd->getIndexCount() > INDEX_VBO_SIZE) + { + CCASSERT(cmd->getVertexCount()>= 0 && cmd->getVertexCount() < VBO_SIZE, "VBO for vertex is not big enough, please break the data down or use customized render command"); + CCASSERT(cmd->getIndexCount()>= 0 && cmd->getIndexCount() < INDEX_VBO_SIZE, "VBO for index is not big enough, please break the data down or use customized render command"); + drawBatchedTriangles(); + + _queuedTotalIndexCount = _queuedTotalVertexCount = 0; +#ifdef CC_USE_METAL + _queuedIndexCount = _queuedVertexCount = 0; + _triangleCommandBufferManager.prepareNextBuffer(); + _vertexBuffer = _triangleCommandBufferManager.getVertexBuffer(); + _indexBuffer = _triangleCommandBufferManager.getIndexBuffer(); +#endif + } + + // queue it + _queuedTriangleCommands.push_back(cmd); +#ifdef CC_USE_METAL + _queuedIndexCount += cmd->getIndexCount(); + _queuedVertexCount += cmd->getVertexCount(); +#endif + _queuedTotalVertexCount += cmd->getVertexCount(); + _queuedTotalIndexCount += cmd->getIndexCount(); - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_MESH_COMMAND"); - - if(cmd->isSkipBatching()) + } + break; + case RenderCommand::Type::MESH_COMMAND: + { + flush2D(); + auto cmd = static_cast(command); + + if (cmd->isSkipBatching() || _lastBatchedMeshCommand == nullptr || _lastBatchedMeshCommand->getMaterialID() != cmd->getMaterialID()) { - // XXX: execute() will call bind() and unbind() - // but unbind() shouldn't be call if the next command is a MESH_COMMAND with Material. - // Once most of cocos2d-x moves to Pass/StateBlock, only bind() should be used. - cmd->execute(); + flush3D(); + + if(cmd->isSkipBatching()) + { + // XXX: execute() will call bind() and unbind() + // but unbind() shouldn't be call if the next command is a MESH_COMMAND with Material. + // Once most of cocos2d-x moves to Pass/StateBlock, only bind() should be used. + cmd->execute(); + } + else + { + cmd->preBatchDraw(); + cmd->batchDraw(); + _lastBatchedMeshCommand = cmd; + } } else { - cmd->preBatchDraw(); + // CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_MESH_COMMAND"); cmd->batchDraw(); - _lastBatchedMeshCommand = cmd; } } - else - { - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_MESH_COMMAND"); - cmd->batchDraw(); - } - } - else if(RenderCommand::Type::GROUP_COMMAND == commandType) - { - flush(); - int renderQueueID = ((GroupCommand*) command)->getRenderQueueID(); - CCGL_DEBUG_PUSH_GROUP_MARKER("RENDERER_GROUP_COMMAND"); - visitRenderQueue(_renderGroups[renderQueueID]); - CCGL_DEBUG_POP_GROUP_MARKER(); - } - else if(RenderCommand::Type::CUSTOM_COMMAND == commandType) - { - flush(); - auto cmd = static_cast(command); - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_CUSTOM_COMMAND"); - cmd->execute(); - } - else if(RenderCommand::Type::BATCH_COMMAND == commandType) - { - flush(); - auto cmd = static_cast(command); - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_BATCH_COMMAND"); - cmd->execute(); - } - else if(RenderCommand::Type::PRIMITIVE_COMMAND == commandType) - { - flush(); - auto cmd = static_cast(command); - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_PRIMITIVE_COMMAND"); - cmd->execute(); - } - else - { - CCLOGERROR("Unknown commands in renderQueue"); + break; + case RenderCommand::Type::GROUP_COMMAND: + processGroupCommand(static_cast(command)); + break; + case RenderCommand::Type::CUSTOM_COMMAND: + flush(); + drawCustomCommand(command); + break; + case RenderCommand::Type::CALLBACK_COMMAND: + flush(); + static_cast(command)->execute(); + break; + default: + assert(false); + break; } } void Renderer::visitRenderQueue(RenderQueue& queue) { - queue.saveRenderState(); - // //Process Global-Z < 0 Objects // - const auto& zNegQueue = queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_NEG); - if (zNegQueue.size() > 0) - { - if(_isDepthTestFor2D) - { - glEnable(GL_DEPTH_TEST); - glDepthMask(true); - glEnable(GL_BLEND); - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthWrite(true); - RenderState::StateBlock::_defaultState->setBlend(true); - } - else - { - glDisable(GL_DEPTH_TEST); - glDepthMask(false); - glEnable(GL_BLEND); - RenderState::StateBlock::_defaultState->setDepthTest(false); - RenderState::StateBlock::_defaultState->setDepthWrite(false); - RenderState::StateBlock::_defaultState->setBlend(true); - } - glDisable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setCullFace(false); - - for (const auto& zNegNext : zNegQueue) - { - processRenderCommand(zNegNext); - } - flush(); - } + doVisitRenderQueue(queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_NEG)); // //Process Opaque Object // - const auto& opaqueQueue = queue.getSubQueue(RenderQueue::QUEUE_GROUP::OPAQUE_3D); - if (opaqueQueue.size() > 0) - { - //Clear depth to achieve layered rendering - glEnable(GL_DEPTH_TEST); - glDepthMask(true); - glDisable(GL_BLEND); - glEnable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthWrite(true); - RenderState::StateBlock::_defaultState->setBlend(false); - RenderState::StateBlock::_defaultState->setCullFace(true); - - for (const auto& opaqueNext : opaqueQueue) - { - processRenderCommand(opaqueNext); - } - flush(); - } + doVisitRenderQueue(queue.getSubQueue(RenderQueue::QUEUE_GROUP::OPAQUE_3D)); // //Process 3D Transparent object // - const auto& transQueue = queue.getSubQueue(RenderQueue::QUEUE_GROUP::TRANSPARENT_3D); - if (transQueue.size() > 0) - { - glEnable(GL_DEPTH_TEST); - glDepthMask(false); - glEnable(GL_BLEND); - glEnable(GL_CULL_FACE); - - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthWrite(false); - RenderState::StateBlock::_defaultState->setBlend(true); - RenderState::StateBlock::_defaultState->setCullFace(true); - - - for (const auto& transNext : transQueue) - { - processRenderCommand(transNext); - } - flush(); - } + doVisitRenderQueue(queue.getSubQueue(RenderQueue::QUEUE_GROUP::TRANSPARENT_3D)); // //Process Global-Z = 0 Queue // - const auto& zZeroQueue = queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_ZERO); - if (zZeroQueue.size() > 0) - { - if(_isDepthTestFor2D) - { - glEnable(GL_DEPTH_TEST); - glDepthMask(true); - glEnable(GL_BLEND); - - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthWrite(true); - RenderState::StateBlock::_defaultState->setBlend(true); - } - else - { - glDisable(GL_DEPTH_TEST); - glDepthMask(false); - glEnable(GL_BLEND); - - RenderState::StateBlock::_defaultState->setDepthTest(false); - RenderState::StateBlock::_defaultState->setDepthWrite(false); - RenderState::StateBlock::_defaultState->setBlend(true); - } - glDisable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setCullFace(false); + doVisitRenderQueue(queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_ZERO)); - for (const auto& zZeroNext : zZeroQueue) - { - processRenderCommand(zZeroNext); - } - flush(); - } - // //Process Global-Z > 0 Queue // - const auto& zPosQueue = queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_POS); - if (zPosQueue.size() > 0) + doVisitRenderQueue(queue.getSubQueue(RenderQueue::QUEUE_GROUP::GLOBALZ_POS)); +} + +void Renderer::doVisitRenderQueue(const std::vector& renderCommands) +{ + for (const auto& command : renderCommands) { - if(_isDepthTestFor2D) - { - glEnable(GL_DEPTH_TEST); - glDepthMask(true); - glEnable(GL_BLEND); - - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthWrite(true); - RenderState::StateBlock::_defaultState->setBlend(true); - } - else - { - glDisable(GL_DEPTH_TEST); - glDepthMask(false); - glEnable(GL_BLEND); - - RenderState::StateBlock::_defaultState->setDepthTest(false); - RenderState::StateBlock::_defaultState->setDepthWrite(false); - RenderState::StateBlock::_defaultState->setBlend(true); - } - glDisable(GL_CULL_FACE); - RenderState::StateBlock::_defaultState->setCullFace(false); - - for (const auto& zPosNext : zPosQueue) - { - processRenderCommand(zPosNext); - } - flush(); + processRenderCommand(command); } - - queue.restoreRenderState(); + flush(); } void Renderer::render() { - //Uncomment this once everything is rendered by new renderer - //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - //TODO: setup camera or MVP _isRendering = true; - - if (_glViewAssigned) +// if (_glViewAssigned) { //Process render commands //1. Sort render commands based on ID @@ -650,6 +378,24 @@ void Renderer::render() _isRendering = false; } +void Renderer::beginFrame() +{ + _commandBuffer->beginFrame(); +} + +void Renderer::endFrame() +{ + _commandBuffer->endFrame(); + +#ifdef CC_USE_METAL + _triangleCommandBufferManager.putbackAllBuffers(); + _vertexBuffer = _triangleCommandBufferManager.getVertexBuffer(); + _indexBuffer = _triangleCommandBufferManager.getIndexBuffer(); +#endif + _queuedTotalIndexCount = 0; + _queuedTotalVertexCount = 0; +} + void Renderer::clean() { // Clear render group @@ -665,95 +411,184 @@ void Renderer::clean() // Clear batch commands _queuedTriangleCommands.clear(); - _filledVertex = 0; - _filledIndex = 0; _lastBatchedMeshCommand = nullptr; } -void Renderer::clear() +void Renderer::setDepthTest(bool value) { - //Enable Depth mask to make sure glClear clear the depth buffer correctly - glDepthMask(true); - glClearColor(_clearColor.r, _clearColor.g, _clearColor.b, _clearColor.a); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glDepthMask(false); + _depthStencilDescriptor.depthTestEnabled = value; + _renderPassDescriptor.needDepthAttachment = value; +} - RenderState::StateBlock::_defaultState->setDepthWrite(false); +void Renderer::setDepthWrite(bool value) +{ + _depthStencilDescriptor.depthWriteEnabled = value; + _renderPassDescriptor.needDepthAttachment = value; } -void Renderer::setDepthTest(bool enable) +void Renderer::setDepthCompareFunction(backend::CompareFunction func) { - if (enable) - { - glClearDepth(1.0f); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LEQUAL); + _depthStencilDescriptor.depthCompareFunction = func; +} - RenderState::StateBlock::_defaultState->setDepthTest(true); - RenderState::StateBlock::_defaultState->setDepthFunction(RenderState::DEPTH_LEQUAL); +backend::CompareFunction Renderer::getDepthCompareFunction() const +{ + return _depthStencilDescriptor.depthCompareFunction; +} -// glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); - } - else - { - glDisable(GL_DEPTH_TEST); +bool Renderer::Renderer::getDepthTest() const +{ + return _depthStencilDescriptor.depthTestEnabled; +} - RenderState::StateBlock::_defaultState->setDepthTest(false); - } +bool Renderer::getDepthWrite() const +{ + return _depthStencilDescriptor.depthWriteEnabled; +} + +void Renderer::setStencilTest(bool value) +{ + _depthStencilDescriptor.stencilTestEnabled = value; + _renderPassDescriptor.needStencilAttachment = value; + + _renderPassDescriptor.needStencilAttachment = value; +} + +void Renderer::setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask) +{ + _depthStencilDescriptor.frontFaceStencil.stencilCompareFunction = func; + _depthStencilDescriptor.backFaceStencil.stencilCompareFunction = func; + + _depthStencilDescriptor.frontFaceStencil.readMask = readMask; + _depthStencilDescriptor.backFaceStencil.readMask = readMask; + + _stencilRef = ref; +} + +void Renderer::setStencilOperation(backend::StencilOperation stencilFailureOp, + backend::StencilOperation depthFailureOp, + backend::StencilOperation stencilDepthPassOp) +{ + _depthStencilDescriptor.frontFaceStencil.stencilFailureOperation = stencilFailureOp; + _depthStencilDescriptor.backFaceStencil.stencilFailureOperation = stencilFailureOp; + + _depthStencilDescriptor.frontFaceStencil.depthFailureOperation = depthFailureOp; + _depthStencilDescriptor.backFaceStencil.depthFailureOperation = depthFailureOp; + + _depthStencilDescriptor.frontFaceStencil.depthStencilPassOperation = stencilDepthPassOp; + _depthStencilDescriptor.backFaceStencil.depthStencilPassOperation = stencilDepthPassOp; +} + +void Renderer::setStencilWriteMask(unsigned int mask) +{ + _depthStencilDescriptor.frontFaceStencil.writeMask = mask; + _depthStencilDescriptor.backFaceStencil.writeMask = mask; +} + +bool Renderer::getStencilTest() const +{ + return _depthStencilDescriptor.stencilTestEnabled; +} + +backend::StencilOperation Renderer::getStencilFailureOperation() const +{ + return _depthStencilDescriptor.frontFaceStencil.stencilFailureOperation; +} + +backend::StencilOperation Renderer::getStencilPassDepthFailureOperation() const +{ + return _depthStencilDescriptor.frontFaceStencil.depthFailureOperation; +} + +backend::StencilOperation Renderer::getStencilDepthPassOperation() const +{ + return _depthStencilDescriptor.frontFaceStencil.depthStencilPassOperation; +} + +backend::CompareFunction Renderer::getStencilCompareFunction() const +{ + return _depthStencilDescriptor.depthCompareFunction; +} + +unsigned int Renderer::getStencilReadMask() const +{ + return _depthStencilDescriptor.frontFaceStencil.readMask; +} - _isDepthTestFor2D = enable; - CHECK_GL_ERROR_DEBUG(); +unsigned int Renderer::getStencilWriteMask() const +{ + return _depthStencilDescriptor.frontFaceStencil.writeMask; } -void Renderer::fillVerticesAndIndices(const TrianglesCommand* cmd) +unsigned int Renderer::getStencilReferenceValue() const { - memcpy(&_verts[_filledVertex], cmd->getVertices(), sizeof(V3F_C4B_T2F) * cmd->getVertexCount()); + return _stencilRef; +} +void Renderer::setViewPort(int x, int y, unsigned int w, unsigned int h) +{ + _viewport.x = x; + _viewport.y = y; + _viewport.w = w; + _viewport.h = h; +} + +void Renderer::fillVerticesAndIndices(const TrianglesCommand* cmd, unsigned int vertexBufferOffset) +{ + size_t vertexCount = cmd->getVertexCount(); + memcpy(&_verts[_filledVertex], cmd->getVertices(), sizeof(V3F_C4B_T2F) * vertexCount); + // fill vertex, and convert them to world coordinates const Mat4& modelView = cmd->getModelView(); - for(ssize_t i=0; i < cmd->getVertexCount(); ++i) + for (size_t i=0; i < vertexCount; ++i) { modelView.transformPoint(&(_verts[i + _filledVertex].vertices)); } - + // fill index const unsigned short* indices = cmd->getIndices(); - for(ssize_t i=0; i< cmd->getIndexCount(); ++i) + size_t indexCount = cmd->getIndexCount(); + for (size_t i = 0; i < indexCount; ++i) { - _indices[_filledIndex + i] = _filledVertex + indices[i]; + _indices[_filledIndex + i] = vertexBufferOffset + _filledVertex + indices[i]; } - - _filledVertex += cmd->getVertexCount(); - _filledIndex += cmd->getIndexCount(); + + _filledVertex += vertexCount; + _filledIndex += indexCount; } void Renderer::drawBatchedTriangles() { if(_queuedTriangleCommands.empty()) return; - - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_BATCH_TRIANGLES"); - - _filledVertex = 0; - _filledIndex = 0; - + /************** 1: Setup up vertices/indices *************/ +#ifdef CC_USE_METAL + unsigned int vertexBufferFillOffset = _queuedTotalVertexCount - _queuedVertexCount; + unsigned int indexBufferFillOffset = _queuedTotalIndexCount - _queuedIndexCount; +#else + unsigned int vertexBufferFillOffset = 0; + unsigned int indexBufferFillOffset = 0; +#endif - _triBatchesToDraw[0].offset = 0; + _triBatchesToDraw[0].offset = indexBufferFillOffset; _triBatchesToDraw[0].indicesToDraw = 0; _triBatchesToDraw[0].cmd = nullptr; - + int batchesTotal = 0; int prevMaterialID = -1; bool firstCommand = true; + _filledVertex = 0; + _filledIndex = 0; + for(const auto& cmd : _queuedTriangleCommands) { auto currentMaterialID = cmd->getMaterialID(); const bool batchable = !cmd->isSkipBatching(); - - fillVerticesAndIndices(cmd); - + + fillVerticesAndIndices(cmd, vertexBufferFillOffset); + // in the same batch ? if (batchable && (prevMaterialID == currentMaterialID || firstCommand)) { @@ -764,109 +599,95 @@ void Renderer::drawBatchedTriangles() else { // is this the first one? - if (!firstCommand) { + if (!firstCommand) + { batchesTotal++; - _triBatchesToDraw[batchesTotal].offset = _triBatchesToDraw[batchesTotal-1].offset + _triBatchesToDraw[batchesTotal-1].indicesToDraw; + _triBatchesToDraw[batchesTotal].offset = + _triBatchesToDraw[batchesTotal-1].offset + _triBatchesToDraw[batchesTotal-1].indicesToDraw; } - + _triBatchesToDraw[batchesTotal].cmd = cmd; _triBatchesToDraw[batchesTotal].indicesToDraw = (int) cmd->getIndexCount(); - + // is this a single batch ? Prevent creating a batch group then if (!batchable) currentMaterialID = -1; } - + // capacity full ? - if (batchesTotal + 1 >= _triBatchesToDrawCapacity) { + if (batchesTotal + 1 >= _triBatchesToDrawCapacity) + { _triBatchesToDrawCapacity *= 1.4; _triBatchesToDraw = (TriBatchToDraw*) realloc(_triBatchesToDraw, sizeof(_triBatchesToDraw[0]) * _triBatchesToDrawCapacity); } - + prevMaterialID = currentMaterialID; firstCommand = false; } batchesTotal++; +#ifdef CC_USE_METAL + _vertexBuffer->updateSubData(_verts, vertexBufferFillOffset * sizeof(_verts[0]), _filledVertex * sizeof(_verts[0])); + _indexBuffer->updateSubData(_indices, indexBufferFillOffset * sizeof(_indices[0]), _filledIndex * sizeof(_indices[0])); +#else + _vertexBuffer->updateData(_verts, _filledVertex * sizeof(_verts[0])); + _indexBuffer->updateData(_indices, _filledIndex * sizeof(_indices[0])); +#endif - /************** 2: Copy vertices/indices to GL objects *************/ - auto conf = Configuration::getInstance(); - if (conf->supportsShareableVAO() && conf->supportsMapBuffer()) + /************** 2: Draw *************/ + for (int i = 0; i < batchesTotal; ++i) { - //Bind VAO - glBindVertexArray(_buffersVAO); - //Set VBO data - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - - // option 1: subdata -// glBufferSubData(GL_ARRAY_BUFFER, sizeof(_quads[0])*start, sizeof(_quads[0]) * n , &_quads[start] ); - - // option 2: data -// glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * _filledVertex, _verts, GL_STATIC_DRAW); - - // option 3: orphaning + glMapBuffer - // FIXME: in order to work as fast as possible, it must "and the exact same size and usage hints it had before." - // source: https://www.opengl.org/wiki/Buffer_Object_Streaming#Explicit_multiple_buffering - // so most probably we won't have any benefit of using it - glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * _filledVertex, nullptr, GL_STATIC_DRAW); - void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - memcpy(buf, _verts, sizeof(_verts[0]) * _filledVertex); - glUnmapBuffer(GL_ARRAY_BUFFER); - - glBindBuffer(GL_ARRAY_BUFFER, 0); + beginRenderPass(_triBatchesToDraw[i].cmd); + _commandBuffer->setVertexBuffer(0, _vertexBuffer); + _commandBuffer->setIndexBuffer(_indexBuffer); + auto& pipelineDescriptor = _triBatchesToDraw[i].cmd->getPipelineDescriptor(); + _commandBuffer->setProgramState(pipelineDescriptor.programState); + _commandBuffer->drawElements(backend::PrimitiveType::TRIANGLE, + backend::IndexFormat::U_SHORT, + _triBatchesToDraw[i].indicesToDraw, + _triBatchesToDraw[i].offset * sizeof(_indices[0])); + _commandBuffer->endRenderPass(); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _filledIndex, _indices, GL_STATIC_DRAW); - } - else - { - // Client Side Arrays -#define kQuadSize sizeof(_verts[0]) - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - - glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * _filledVertex , _verts, GL_DYNAMIC_DRAW); - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - - // vertices - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices)); - - // colors - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, colors)); - - // tex coords - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, texCoords)); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _filledIndex, _indices, GL_STATIC_DRAW); - } - - /************** 3: Draw *************/ - for (int i=0; iuseMaterial(); - glDrawElements(GL_TRIANGLES, (GLsizei) _triBatchesToDraw[i].indicesToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (_triBatchesToDraw[i].offset*sizeof(_indices[0])) ); _drawnBatches++; _drawnVertices += _triBatchesToDraw[i].indicesToDraw; } + + /************** 3: Cleanup *************/ + _queuedTriangleCommands.clear(); - /************** 4: Cleanup *************/ - if (conf->supportsShareableVAO() && conf->supportsMapBuffer()) +#ifdef CC_USE_METAL + _queuedIndexCount = 0; + _queuedVertexCount = 0; +#endif +} + +void Renderer::drawCustomCommand(RenderCommand *command) +{ + auto cmd = static_cast(command); + + beginRenderPass(command); + _commandBuffer->setVertexBuffer(0, cmd->getVertexBuffer()); + _commandBuffer->setProgramState(cmd->getPipelineDescriptor().programState); + + auto drawType = cmd->getDrawType(); + _commandBuffer->setLineWidth(cmd->getLineWidth()); + if (CustomCommand::DrawType::ELEMENT == drawType) { - //Unbind VAO - glBindVertexArray(0); + _commandBuffer->setIndexBuffer(cmd->getIndexBuffer()); + _commandBuffer->drawElements(cmd->getPrimitiveType(), + cmd->getIndexFormat(), + cmd->getIndexDrawCount(), + cmd->getIndexDrawOffset()); + _drawnVertices += cmd->getIndexDrawCount(); } else { - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + _commandBuffer->drawArrays(cmd->getPrimitiveType(), + cmd->getVertexDrawStart(), + cmd->getVertexDrawCount()); + _drawnVertices += cmd->getVertexDrawCount(); } - - _queuedTriangleCommands.clear(); - _filledVertex = 0; - _filledIndex = 0; + _drawnBatches++; + _commandBuffer->endRenderPass(); } void Renderer::flush() @@ -884,8 +705,6 @@ void Renderer::flush3D() { if (_lastBatchedMeshCommand) { - CCGL_DEBUG_INSERT_EVENT_MARKER("RENDERER_BATCH_MESH"); - _lastBatchedMeshCommand->postBatchDraw(); _lastBatchedMeshCommand = nullptr; } @@ -899,40 +718,335 @@ void Renderer::flushTriangles() // helpers bool Renderer::checkVisibility(const Mat4 &transform, const Size &size) { - auto director = Director::getInstance(); - auto scene = director->getRunningScene(); - - //If draw to Rendertexture, return true directly. - // only cull the default camera. The culling algorithm is valid for default camera. - if (!scene || (scene && scene->_defaultCamera != Camera::getVisitingCamera())) - return true; +// auto director = Director::getInstance(); +// auto scene = director->getRunningScene(); +// +// //If draw to Rendertexture, return true directly. +// // only cull the default camera. The culling algorithm is valid for default camera. +// if (!scene || (scene && scene->_defaultCamera != Camera::getVisitingCamera())) +// return true; +// +// Rect visibleRect(director->getVisibleOrigin(), director->getVisibleSize()); +// +// // transform center point to screen space +// float hSizeX = size.width/2; +// float hSizeY = size.height/2; +// Vec3 v3p(hSizeX, hSizeY, 0); +// transform.transformPoint(&v3p); +// Vec2 v2p = Camera::getVisitingCamera()->projectGL(v3p); +// +// // convert content size to world coordinates +// float wshw = std::max(fabsf(hSizeX * transform.m[0] + hSizeY * transform.m[4]), fabsf(hSizeX * transform.m[0] - hSizeY * transform.m[4])); +// float wshh = std::max(fabsf(hSizeX * transform.m[1] + hSizeY * transform.m[5]), fabsf(hSizeX * transform.m[1] - hSizeY * transform.m[5])); +// +// // enlarge visible rect half size in screen coord +// visibleRect.origin.x -= wshw; +// visibleRect.origin.y -= wshh; +// visibleRect.size.width += wshw * 2; +// visibleRect.size.height += wshh * 2; +// bool ret = visibleRect.containsPoint(v2p); +// return ret; + // todo: minggo + return true; +} - Rect visibleRect(director->getVisibleOrigin(), director->getVisibleSize()); +void Renderer::setRenderPipeline(const PipelineDescriptor& pipelineDescriptor, const backend::RenderPassDescriptor& renderPassDescriptor) +{ + backend::RenderPipelineDescriptor renderPipelineDescriptor; + renderPipelineDescriptor.programState = pipelineDescriptor.programState; + renderPipelineDescriptor.vertexLayouts.push_back(pipelineDescriptor.vertexLayout); + + auto device = backend::Device::getInstance(); + auto blendState = device->createBlendState(pipelineDescriptor.blendDescriptor); + renderPipelineDescriptor.blendState = blendState; - // transform center point to screen space - float hSizeX = size.width/2; - float hSizeY = size.height/2; - Vec3 v3p(hSizeX, hSizeY, 0); - transform.transformPoint(&v3p); - Vec2 v2p = Camera::getVisitingCamera()->projectGL(v3p); - - // convert content size to world coordinates - float wshw = std::max(fabsf(hSizeX * transform.m[0] + hSizeY * transform.m[4]), fabsf(hSizeX * transform.m[0] - hSizeY * transform.m[4])); - float wshh = std::max(fabsf(hSizeX * transform.m[1] + hSizeY * transform.m[5]), fabsf(hSizeX * transform.m[1] - hSizeY * transform.m[5])); + if (_depthStencilDescriptor.depthTestEnabled || + _depthStencilDescriptor.depthWriteEnabled || + _depthStencilDescriptor.stencilTestEnabled) + { + auto depthStencilState = device->createDepthStencilState(_depthStencilDescriptor); + renderPipelineDescriptor.depthStencilState = depthStencilState; + } + + if (renderPassDescriptor.needColorAttachment) + { + // FIXME: now just handle color attachment 0. + if (renderPassDescriptor.colorAttachmentsTexture[0]) + renderPipelineDescriptor.colorAttachmentsFormat[0] = renderPassDescriptor.colorAttachmentsTexture[0]->getTextureFormat(); + } - // enlarge visible rect half size in screen coord - visibleRect.origin.x -= wshw; - visibleRect.origin.y -= wshh; - visibleRect.size.width += wshw * 2; - visibleRect.size.height += wshh * 2; - bool ret = visibleRect.containsPoint(v2p); - return ret; + if (renderPassDescriptor.needDepthAttachment) + { + if (renderPassDescriptor.depthAttachmentTexture) + renderPipelineDescriptor.depthAttachmentFormat = renderPassDescriptor.depthAttachmentTexture->getTextureFormat(); + else + renderPipelineDescriptor.depthAttachmentFormat = backend::TextureFormat::D24S8; + } + if (renderPassDescriptor.needStencilAttachment) + { + if (renderPassDescriptor.stencilAttachmentTexture) + renderPipelineDescriptor.stencilAttachmentFormat = renderPassDescriptor.stencilAttachmentTexture->getTextureFormat(); + else + renderPipelineDescriptor.stencilAttachmentFormat = backend::TextureFormat::D24S8; + } + + //FIXME: optimize it, cache the result as possible. + auto renderPipeline = device->newRenderPipeline(renderPipelineDescriptor); + _commandBuffer->setRenderPipeline(renderPipeline); + renderPipeline->release(); } +void Renderer::beginRenderPass(RenderCommand* cmd) +{ + _commandBuffer->beginRenderPass(_renderPassDescriptor); + _commandBuffer->setViewport(_viewport.x, _viewport.y, _viewport.w, _viewport.h); + _commandBuffer->setScissorRect(_scissorState.isEnabled, _scissorState.rect.x, _scissorState.rect.y, _scissorState.rect.width, _scissorState.rect.height); + setRenderPipeline(cmd->getPipelineDescriptor(), _renderPassDescriptor); + + _commandBuffer->setStencilReferenceValue(_stencilRef); +} -void Renderer::setClearColor(const Color4F &clearColor) +void Renderer::setRenderTarget(RenderTargetFlag flags, Texture2D* colorAttachment, Texture2D* depthAttachment, Texture2D* stencilAttachment) { - _clearColor = clearColor; + _renderTargetFlag = flags; + if (flags & RenderTargetFlag::COLOR) + { + _renderPassDescriptor.needColorAttachment = true; + if (colorAttachment) + _renderPassDescriptor.colorAttachmentsTexture[0] = colorAttachment->getBackendTexture(); + else + _renderPassDescriptor.colorAttachmentsTexture[0] = nullptr; + + _colorAttachment = colorAttachment; + } + else + { + _colorAttachment = nullptr; + _renderPassDescriptor.needColorAttachment = false; + _renderPassDescriptor.colorAttachmentsTexture[0] = nullptr; + } + + if (flags & RenderTargetFlag::DEPTH) + { + _renderPassDescriptor.needDepthAttachment = true; + if (depthAttachment) + _renderPassDescriptor.depthAttachmentTexture = depthAttachment->getBackendTexture(); + else + _renderPassDescriptor.depthAttachmentTexture = nullptr; + + _depthAttachment = depthAttachment; + } + else + { + _renderPassDescriptor.needDepthAttachment = false; + _renderPassDescriptor.depthAttachmentTexture = nullptr; + _depthAttachment = nullptr; + } + + if (flags & RenderTargetFlag::STENCIL) + { + _stencilAttachment = stencilAttachment; + _renderPassDescriptor.needStencilAttachment = true; + if (_stencilAttachment) + _renderPassDescriptor.stencilAttachmentTexture = stencilAttachment->getBackendTexture(); + else + _renderPassDescriptor.stencilAttachmentTexture = nullptr; + } + else + { + _stencilAttachment = nullptr; + _renderPassDescriptor.needStencilAttachment = false; + _renderPassDescriptor.stencilAttachmentTexture = nullptr; + } +} + +void Renderer::clear(ClearFlag flags, const Color4F& color, float depth, unsigned int stencil) +{ + _clearFlag = flags; + + CallbackCommand* command = new CallbackCommand();; + command->func = [=]() -> void { + backend::RenderPassDescriptor descriptor; + + if (flags & ClearFlag::COLOR) + { + _clearColor = color; + descriptor.clearColorValue = {color.r, color.g, color.b, color.a}; + descriptor.needClearColor = true; + descriptor.needColorAttachment = true; + descriptor.colorAttachmentsTexture[0] = _renderPassDescriptor.colorAttachmentsTexture[0]; + } + if (flags & ClearFlag::DEPTH) + { + descriptor.clearDepthValue = depth; + descriptor.needClearDepth = true; + descriptor.needDepthAttachment = true; + descriptor.depthAttachmentTexture = _renderPassDescriptor.depthAttachmentTexture; + } + if (flags & ClearFlag::STENCIL) + { + descriptor.clearStencilValue = stencil; + descriptor.needClearStencil = true; + descriptor.needStencilAttachment = true; + descriptor.stencilAttachmentTexture = _renderPassDescriptor.stencilAttachmentTexture; + } + + _commandBuffer->beginRenderPass(descriptor); + _commandBuffer->endRenderPass(); + + delete command; + }; + addCommand(command); +} + +Texture2D* Renderer::getColorAttachment() const +{ + return _colorAttachment; +} + +Texture2D* Renderer::getDepthAttachment() const +{ + return _depthAttachment; +} + +Texture2D* Renderer::getStencilAttachment() const +{ + return _stencilAttachment; +} + +const Color4F& Renderer::getClearColor() const +{ + return _clearColor; +} + +float Renderer::getClearDepth() const +{ + return _renderPassDescriptor.clearDepthValue; +} + +unsigned int Renderer::getClearStencil() const +{ + return _renderPassDescriptor.clearStencilValue; +} + +ClearFlag Renderer::getClearFlag() const +{ + return _clearFlag; +} + +RenderTargetFlag Renderer::getRenderTargetFlag() const +{ + return _renderTargetFlag; +} + +void Renderer::setScissorTest(bool enabled) +{ + _scissorState.isEnabled = enabled; +} + +bool Renderer::getScissorTest() const +{ + return _scissorState.isEnabled; +} + +const ScissorRect& Renderer::getScissorRect() const +{ + return _scissorState.rect; +} + +void Renderer::setScissorRect(float x, float y, float width, float height) +{ + _scissorState.rect.x = x; + _scissorState.rect.y = y; + _scissorState.rect.width = width; + _scissorState.rect.height = height; +} + +// TriangleCommandBufferManager +Renderer::TriangleCommandBufferManager::~TriangleCommandBufferManager() +{ + for (auto& vertexBuffer : _vertexBufferPool) + vertexBuffer->release(); + + for (auto& indexBuffer : _indexBufferPool) + indexBuffer->release(); +} + +void Renderer::TriangleCommandBufferManager::init() +{ + createBuffer(); +} + +void Renderer::TriangleCommandBufferManager::putbackAllBuffers() +{ + _currentBufferIndex = 0; +} + +void Renderer::TriangleCommandBufferManager::prepareNextBuffer() +{ + if (_currentBufferIndex < (int)_vertexBufferPool.size() - 1) + { + ++_currentBufferIndex; + return; + } + + createBuffer(); + ++_currentBufferIndex; +} + +backend::Buffer* Renderer::TriangleCommandBufferManager::getVertexBuffer() const +{ + return _vertexBufferPool[_currentBufferIndex]; +} + +backend::Buffer* Renderer::TriangleCommandBufferManager::getIndexBuffer() const +{ + return _indexBufferPool[_currentBufferIndex]; +} + +void Renderer::TriangleCommandBufferManager::createBuffer() +{ + auto device = backend::Device::getInstance(); + +#ifdef CC_USE_METAL + // Metal doesn't need to update buffer to make sure it has the correct size. + auto vertexBuffer = device->newBuffer(Renderer::VBO_SIZE * sizeof(_verts[0]), backend::BufferType::VERTEX, backend::BufferUsage::DYNAMIC); + if (!vertexBuffer) + return; + + auto indexBuffer = device->newBuffer(Renderer::INDEX_VBO_SIZE * sizeof(_indices[0]), backend::BufferType::INDEX, backend::BufferUsage::DYNAMIC); + if (!indexBuffer) + { + vertexBuffer->release(); + return; + } +#else + auto tmpData = malloc(Renderer::VBO_SIZE * sizeof(V3F_C4B_T2F)); + if (!tmpData) + return; + + auto vertexBuffer = device->newBuffer(Renderer::VBO_SIZE * sizeof(V3F_C4B_T2F), backend::BufferType::VERTEX, backend::BufferUsage::DYNAMIC); + if (!vertexBuffer) + { + free(tmpData); + return; + } + vertexBuffer->updateData(tmpData, Renderer::VBO_SIZE * sizeof(V3F_C4B_T2F)); + + auto indexBuffer = device->newBuffer(Renderer::INDEX_VBO_SIZE * sizeof(unsigned short), backend::BufferType::INDEX, backend::BufferUsage::DYNAMIC); + if (! indexBuffer) + { + free(tmpData); + vertexBuffer->release(); + return; + } + indexBuffer->updateData(tmpData, Renderer::INDEX_VBO_SIZE * sizeof(unsigned short)); + + free(tmpData); +#endif + + _vertexBufferPool.push_back(vertexBuffer); + _indexBufferPool.push_back(indexBuffer); } NS_CC_END diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index 89c6095896d3..9c76033a416f 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -22,35 +22,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - - -#ifndef __CC_RENDERER_H_ -#define __CC_RENDERER_H_ +#pragma once #include #include +#include #include "platform/CCPlatformMacros.h" #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgram.h" -#include "platform/CCGL.h" - -#if !defined(NDEBUG) && CC_TARGET_PLATFORM == CC_PLATFORM_IOS - -/// Basic wrapper for glInsertEventMarkerEXT() depending on the current build settings and platform. -#define CCGL_DEBUG_INSERT_EVENT_MARKER(__message__) glInsertEventMarkerEXT(0, __message__) -/// Basic wrapper for glPushGroupMarkerEXT() depending on the current build settings and platform. -#define CCGL_DEBUG_PUSH_GROUP_MARKER(__message__) glPushGroupMarkerEXT(0, __message__) -/// Basic wrapper for CCGL_DEBUG_POP_GROUP_MARKER() depending on the current build settings and platform. -#define CCGL_DEBUG_POP_GROUP_MARKER() glPopGroupMarkerEXT() - -#else -#define CCGL_DEBUG_INSERT_EVENT_MARKER(__message__) -#define CCGL_DEBUG_PUSH_GROUP_MARKER(__message__) -#define CCGL_DEBUG_POP_GROUP_MARKER() - -#endif /** * @addtogroup renderer @@ -59,16 +40,29 @@ NS_CC_BEGIN +namespace backend +{ + class Buffer; + class CommandBuffer; + class RenderPipeline; + class RenderPass; +} + class EventListenerCustom; class TrianglesCommand; class MeshCommand; +class GroupCommand; +class CallbackCommand; +struct PipelineDescriptor; +class Texture2D; /** Class that knows how to sort `RenderCommand` objects. Since the commands that have `z == 0` are "pushed back" in the correct order, the only `RenderCommand` objects that need to be sorted, are the ones that have `z < 0` and `z > 0`. */ -class RenderQueue { +class RenderQueue +{ public: /** RenderCommand will be divided into Queue Groups. @@ -107,11 +101,6 @@ class RenderQueue { std::vector& getSubQueue(QUEUE_GROUP group) { return _commands[group]; } /**Get the number of render commands contained in a subqueue.*/ ssize_t getSubQueueSize(QUEUE_GROUP group) const { return _commands[group].size(); } - - /**Save the current DepthState, CullState, DepthWriteState render state.*/ - void saveRenderState(); - /**Restore the saved DepthState, CullState, DepthWriteState render state.*/ - void restoreRenderState(); protected: /**The commands in the render queue.*/ @@ -125,13 +114,6 @@ class RenderQueue { GLboolean _isDepthWrite; }; -//the struct is not used outside. -struct RenderStackElement -{ - int renderQueueID; - ssize_t currentIndex; -}; - class GroupCommandManager; /* Class responsible for the rendering in. @@ -141,6 +123,7 @@ Whenever possible prefer to use `TrianglesCommand` objects since the renderer wi class CC_DLL Renderer { public: + /**The max number of vertices in a vertex buffer object.*/ static const int VBO_SIZE = 65536; /**The max number of indices in a index buffer.*/ @@ -155,7 +138,7 @@ class CC_DLL Renderer ~Renderer(); //TODO: manage GLView inside Render itself - void initGLView(); + void init(); /** Adds a `RenderComamnd` into the renderer */ void addCommand(RenderCommand* command); @@ -178,11 +161,6 @@ class CC_DLL Renderer /** Cleans all `RenderCommand`s in the queue */ void clean(); - /** Clear GL buffer and screen */ - void clear(); - - /** set color for clear screen */ - void setClearColor(const Color4F& clearColor); /* returns the number of drawn batches in the last frame */ ssize_t getDrawnBatches() const { return _drawnBatches; } /* RenderCommands (except) TrianglesCommand should update this value */ @@ -195,26 +173,103 @@ class CC_DLL Renderer void clearDrawStats() { _drawnBatches = _drawnVertices = 0; } /** - * Enable/Disable depth test - * For 3D object depth test is enabled by default and can not be changed - * For 2D object depth test is disabled by default + Set render targets. If not set, will use default render targets. It will effect all commands. + @flags Flags to indicate which attachment to be replaced. + @colorAttachment The value to replace color attachment, only one color attachment supported now. + @depthAttachment The value to repalce depth attachment. + @stencilAttachment The value to replace stencil attachment. Depth attachment and stencil attachment + can be the same value. */ - void setDepthTest(bool enable); - - //This will not be used outside. - GroupCommandManager* getGroupCommandManager() const { return _groupCommandManager; } + void setRenderTarget(RenderTargetFlag flags, Texture2D* colorAttachment, Texture2D* depthAttachment, Texture2D* stencilAttachment); + /** + Set clear values for each attachment. + @flags Flags to indicate which attachment clear value to be modified. + @color The clear color value. + @depth The clear depth value. + @stencil The clear stencil value. + */ + void clear(ClearFlag flags, const Color4F& color, float depth, unsigned int stencil); + Texture2D* getColorAttachment() const; + Texture2D* getDepthAttachment() const; + Texture2D* getStencilAttachment() const; + const Color4F& getClearColor() const; + float getClearDepth() const; + unsigned int getClearStencil() const; + ClearFlag getClearFlag() const; + RenderTargetFlag getRenderTargetFlag() const; + + // depth/stencil state. + + /* Enable/disable depth test. */ + void setDepthTest(bool value); + /* Enable/disable to update depth buffer. */ + void setDepthWrite(bool value); + void setDepthCompareFunction(backend::CompareFunction func); + bool getDepthTest() const; + bool getDepthWrite() const; + backend::CompareFunction getDepthCompareFunction() const; + + /* Enable/disable stencil test. */ + void setStencilTest(bool value); + void setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask); + void setStencilOperation(backend::StencilOperation stencilFailureOp, + backend::StencilOperation depthFailureOp, + backend::StencilOperation stencilDepthPassOp); + void setStencilWriteMask(unsigned int mask); + bool getStencilTest() const; + backend::StencilOperation getStencilFailureOperation() const; + backend::StencilOperation getStencilPassDepthFailureOperation() const; + backend::StencilOperation getStencilDepthPassOperation() const; + backend::CompareFunction getStencilCompareFunction() const; + unsigned int getStencilReadMask() const; + unsigned int getStencilWriteMask() const; + /* Get stencil reference value set by `setStencilCompareFunction`. */ + unsigned int getStencilReferenceValue() const; + + // view port + void setViewPort(int x, int y, unsigned int w, unsigned int h); + const Viewport& getViewport() const { return _viewport; } + + // scissor test + + /* Enable/disable scissor test. */ + void setScissorTest(bool enabled); + void setScissorRect(float x, float y, float width, float height); + bool getScissorTest() const; + const ScissorRect& getScissorRect() const; /** returns whether or not a rectangle is visible or not */ bool checkVisibility(const Mat4& transform, const Size& size); protected: + friend class Director; + friend class GroupCommand; + + class TriangleCommandBufferManager + { + public: + ~TriangleCommandBufferManager(); + + void init(); + void putbackAllBuffers(); + void prepareNextBuffer(); + backend::Buffer* getVertexBuffer() const; + backend::Buffer* getIndexBuffer() const; - //Setup VBO or VAO based on OpenGL extensions - void setupBuffer(); - void setupVBOAndVAO(); - void setupVBO(); - void mapBuffers(); + private: + void createBuffer(); + + int _currentBufferIndex = 0; + std::vector _vertexBufferPool; + std::vector _indexBufferPool; + }; + + inline GroupCommandManager * getGroupCommandManager() const { return _groupCommandManager; } void drawBatchedTriangles(); + void drawCustomCommand(RenderCommand* command); + + void beginFrame(); + void endFrame(); //Draw the previews queued triangles and flush previous context void flush(); @@ -226,55 +281,83 @@ class CC_DLL Renderer void flushTriangles(); void processRenderCommand(RenderCommand* command); + void processGroupCommand(GroupCommand*); void visitRenderQueue(RenderQueue& queue); + void doVisitRenderQueue(const std::vector&); - void fillVerticesAndIndices(const TrianglesCommand* cmd); + void fillVerticesAndIndices(const TrianglesCommand* cmd, unsigned int vertexBufferOffset); + void beginRenderPass(RenderCommand*); + + void setRenderPipeline(const PipelineDescriptor&, const backend::RenderPassDescriptor&); - /* clear color set outside be used in setGLDefaultValues() */ - Color4F _clearColor; + Viewport _viewport; std::stack _commandGroupStack; std::vector _renderGroups; - MeshCommand* _lastBatchedMeshCommand; + MeshCommand* _lastBatchedMeshCommand = nullptr; std::vector _queuedTriangleCommands; //for TrianglesCommand V3F_C4B_T2F _verts[VBO_SIZE]; - GLushort _indices[INDEX_VBO_SIZE]; - GLuint _buffersVAO; - GLuint _buffersVBO[2]; //0: vertex 1: indices + unsigned short _indices[INDEX_VBO_SIZE]; + backend::Buffer* _vertexBuffer = nullptr; + backend::Buffer* _indexBuffer = nullptr; + TriangleCommandBufferManager _triangleCommandBufferManager; + + backend::CommandBuffer* _commandBuffer = nullptr; + backend::RenderPassDescriptor _renderPassDescriptor; + backend::DepthStencilDescriptor _depthStencilDescriptor; // Internal structure that has the information for the batches - struct TriBatchToDraw { - TrianglesCommand* cmd; // needed for the Material - GLsizei indicesToDraw; - GLsizei offset; + struct TriBatchToDraw + { + TrianglesCommand* cmd = nullptr; // needed for the Material + unsigned int indicesToDraw = 0; + unsigned int offset = 0; }; // capacity of the array of TriBatches - int _triBatchesToDrawCapacity; + int _triBatchesToDrawCapacity = 500; // the TriBatches - TriBatchToDraw* _triBatchesToDraw; - - int _filledVertex; - int _filledIndex; + TriBatchToDraw* _triBatchesToDraw = nullptr; - bool _glViewAssigned; + unsigned int _queuedTotalVertexCount = 0; + unsigned int _queuedTotalIndexCount = 0; + unsigned int _queuedVertexCount = 0; + unsigned int _queuedIndexCount = 0; + unsigned int _filledIndex = 0; + unsigned int _filledVertex = 0; // stats - ssize_t _drawnBatches; - ssize_t _drawnVertices; + unsigned int _drawnBatches = 0; + unsigned int _drawnVertices = 0; //the flag for checking whether renderer is rendering - bool _isRendering; - - bool _isDepthTestFor2D; - - GroupCommandManager* _groupCommandManager; + bool _isRendering = false; + bool _isDepthTestFor2D = false; + + GroupCommandManager* _groupCommandManager = nullptr; + + unsigned int _stencilRef = 0; + + // weak reference + Texture2D* _colorAttachment = nullptr; + Texture2D* _depthAttachment = nullptr; + Texture2D* _stencilAttachment = nullptr; + Color4F _clearColor = Color4F::BLACK; + ClearFlag _clearFlag; + RenderTargetFlag _renderTargetFlag = RenderTargetFlag::COLOR; + + struct ScissorState + { + ScissorRect rect; + bool isEnabled = false; + }; + ScissorState _scissorState; #if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _cacheTextureListener; + EventListenerCustom* _cacheTextureListener = nullptr; #endif }; @@ -284,4 +367,3 @@ NS_CC_END end of support group @} */ -#endif //__CC_RENDERER_H_ diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index 7934e620ebf4..45027dc3649f 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -47,6 +47,9 @@ THE SOFTWARE. #include "renderer/CCGLProgram.h" #include "renderer/CCGLProgramCache.h" #include "base/CCNinePatchImageParser.h" +#include "renderer/backend/Device.h" +#include "renderer/backend/StringUtils.h" +#include "renderer/CCTextureUtils.h" #if CC_ENABLE_CACHE_TEXTURE_DATA #include "renderer/CCTextureCache.h" @@ -69,13 +72,23 @@ namespace { PixelFormatInfoMapValue(Texture2D::PixelFormat::A8, Texture2D::PixelFormatInfo(GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, 8, false, false)), PixelFormatInfoMapValue(Texture2D::PixelFormat::I8, Texture2D::PixelFormatInfo(GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, 8, false, false)), PixelFormatInfoMapValue(Texture2D::PixelFormat::AI88, Texture2D::PixelFormatInfo(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 16, false, true)), - +#ifndef CC_USE_METAL + //OpenGL only #ifdef GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC2, Texture2D::PixelFormatInfo(GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, 0xFFFFFFFF, 0xFFFFFFFF, 2, true, false)), PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC2A, Texture2D::PixelFormatInfo(GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, 0xFFFFFFFF, 0xFFFFFFFF, 2, true, true)), PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC4, Texture2D::PixelFormatInfo(GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, 0xFFFFFFFF, 0xFFFFFFFF, 4, true, false)), PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC4A, Texture2D::PixelFormatInfo(GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 0xFFFFFFFF, 0xFFFFFFFF, 4, true, true)), #endif +#else + //Metal && iOS +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC2, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 2, true, false)), + PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC2A, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 2, true, true)), + PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC4, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 4, true, false)), + PixelFormatInfoMapValue(Texture2D::PixelFormat::PVRTC4A, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 4, true, true)), +#endif +#endif #ifdef GL_ETC1_RGB8_OES PixelFormatInfoMapValue(Texture2D::PixelFormat::ETC, Texture2D::PixelFormatInfo(GL_ETC1_RGB8_OES, 0xFFFFFFFF, 0xFFFFFFFF, 4, true, false)), @@ -106,6 +119,14 @@ namespace { #ifdef GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD PixelFormatInfoMapValue(Texture2D::PixelFormat::ATC_INTERPOLATED_ALPHA, Texture2D::PixelFormatInfo(GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD, 0xFFFFFFFF, 0xFFFFFFFF, 8, true, false)), +#endif + //metal formats +#ifdef CC_USE_METAL +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + PixelFormatInfoMapValue(Texture2D::PixelFormat::MTL_ABGR4, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 16, false, true)), + PixelFormatInfoMapValue(Texture2D::PixelFormat::MTL_B5G6R5, Texture2D::PixelFormatInfo(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 16, false, false)), + PixelFormatInfoMapValue(Texture2D::PixelFormat::MTL_BGR5A1, Texture2D::PixelFormatInfo(0xFFFFFFFF,0xFFFFFFFF, 0xFFFFFFFF, 16, false, true)), +#endif #endif }; } @@ -120,332 +141,20 @@ const Texture2D::PixelFormatInfoMap Texture2D::_pixelFormatInfoTables(TexturePix // Default is: RGBA8888 (32-bit textures) static Texture2D::PixelFormat g_defaultAlphaPixelFormat = Texture2D::PixelFormat::DEFAULT; -////////////////////////////////////////////////////////////////////////// -//convertor function - -// IIIIIIII -> RRRRRRRRGGGGGGGGGBBBBBBBB -void Texture2D::convertI8ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i=0; i < dataLen; ++i) - { - *outData++ = data[i]; //R - *outData++ = data[i]; //G - *outData++ = data[i]; //B - } -} - -// IIIIIIIIAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBB -void Texture2D::convertAI88ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *outData++ = data[i]; //R - *outData++ = data[i]; //G - *outData++ = data[i]; //B - } -} - -// IIIIIIII -> RRRRRRRRGGGGGGGGGBBBBBBBBAAAAAAAA -void Texture2D::convertI8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0; i < dataLen; ++i) - { - *outData++ = data[i]; //R - *outData++ = data[i]; //G - *outData++ = data[i]; //B - *outData++ = 0xFF; //A - } -} - -// IIIIIIIIAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -void Texture2D::convertAI88ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *outData++ = data[i]; //R - *outData++ = data[i]; //G - *outData++ = data[i]; //B - *outData++ = data[i + 1]; //A - } -} - -// IIIIIIII -> RRRRRGGGGGGBBBBB -void Texture2D::convertI8ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (int i = 0; i < dataLen; ++i) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i] & 0x00FC) << 3 //G - | (data[i] & 0x00F8) >> 3; //B - } -} - -// IIIIIIIIAAAAAAAA -> RRRRRGGGGGGBBBBB -void Texture2D::convertAI88ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i] & 0x00FC) << 3 //G - | (data[i] & 0x00F8) >> 3; //B - } -} - -// IIIIIIII -> RRRRGGGGBBBBAAAA -void Texture2D::convertI8ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0; i < dataLen; ++i) - { - *out16++ = (data[i] & 0x00F0) << 8 //R - | (data[i] & 0x00F0) << 4 //G - | (data[i] & 0x00F0) //B - | 0x000F; //A - } -} - -// IIIIIIIIAAAAAAAA -> RRRRGGGGBBBBAAAA -void Texture2D::convertAI88ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *out16++ = (data[i] & 0x00F0) << 8 //R - | (data[i] & 0x00F0) << 4 //G - | (data[i] & 0x00F0) //B - | (data[i+1] & 0x00F0) >> 4; //A - } -} - -// IIIIIIII -> RRRRRGGGGGBBBBBA -void Texture2D::convertI8ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (int i = 0; i < dataLen; ++i) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i] & 0x00F8) << 3 //G - | (data[i] & 0x00F8) >> 2 //B - | 0x0001; //A - } -} - -// IIIIIIIIAAAAAAAA -> RRRRRGGGGGBBBBBA -void Texture2D::convertAI88ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i] & 0x00F8) << 3 //G - | (data[i] & 0x00F8) >> 2 //B - | (data[i + 1] & 0x0080) >> 7; //A - } -} - -// IIIIIIII -> IIIIIIIIAAAAAAAA -void Texture2D::convertI8ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0; i < dataLen; ++i) - { - *out16++ = 0xFF00 //A - | data[i]; //I - } -} - -// IIIIIIIIAAAAAAAA -> AAAAAAAA -void Texture2D::convertAI88ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 1; i < dataLen; i += 2) - { - *outData++ = data[i]; //A - } -} - -// IIIIIIIIAAAAAAAA -> IIIIIIII -void Texture2D::convertAI88ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) - { - *outData++ = data[i]; //R - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -void Texture2D::convertRGB888ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *outData++ = data[i]; //R - *outData++ = data[i + 1]; //G - *outData++ = data[i + 2]; //B - *outData++ = 0xFF; //A - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBB -void Texture2D::convertRGBA8888ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) - { - *outData++ = data[i]; //R - *outData++ = data[i + 1]; //G - *outData++ = data[i + 2]; //B - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRGGGGGGBBBBB -void Texture2D::convertRGB888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i + 1] & 0x00FC) << 3 //G - | (data[i + 2] & 0x00F8) >> 3; //B - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRRGGGGGGBBBBB -void Texture2D::convertRGBA8888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i + 1] & 0x00FC) << 3 //G - | (data[i + 2] & 0x00F8) >> 3; //B - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> AAAAAAAA -void Texture2D::convertRGB888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //A = (R*299 + G*587 + B*114 + 500) / 1000 - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> IIIIIIII -void Texture2D::convertRGB888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> IIIIIIII -void Texture2D::convertRGBA8888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) - { - *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> AAAAAAAA -void Texture2D::convertRGBA8888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen -3; i < l; i += 4) - { - *outData++ = data[i + 3]; //A - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> IIIIIIIIAAAAAAAA -void Texture2D::convertRGB888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 - *outData++ = 0xFF; - } -} - - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> IIIIIIIIAAAAAAAA -void Texture2D::convertRGBA8888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) - { - *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 - *outData++ = data[i + 3]; - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRGGGGBBBBAAAA -void Texture2D::convertRGB888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *out16++ = ((data[i] & 0x00F0) << 8 //R - | (data[i + 1] & 0x00F0) << 4 //G - | (data[i + 2] & 0xF0) //B - | 0x0F); //A - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRGGGGBBBBAAAA -void Texture2D::convertRGBA8888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) - { - *out16++ = (data[i] & 0x00F0) << 8 //R - | (data[i + 1] & 0x00F0) << 4 //G - | (data[i + 2] & 0xF0) //B - | (data[i + 3] & 0xF0) >> 4; //A - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRGGGGGBBBBBA -void Texture2D::convertRGB888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i + 1] & 0x00F8) << 3 //G - | (data[i + 2] & 0x00F8) >> 2 //B - | 0x01; //A - } -} - -// RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRGGGGGBBBBBA -void Texture2D::convertRGBA8888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) -{ - unsigned short* out16 = (unsigned short*)outData; - for (ssize_t i = 0, l = dataLen - 2; i < l; i += 4) - { - *out16++ = (data[i] & 0x00F8) << 8 //R - | (data[i + 1] & 0x00F8) << 3 //G - | (data[i + 2] & 0x00F8) >> 2 //B - | (data[i + 3] & 0x0080) >> 7; //A - } -} -// converter function end -////////////////////////////////////////////////////////////////////////// Texture2D::Texture2D() : _pixelFormat(Texture2D::PixelFormat::DEFAULT) , _pixelsWide(0) , _pixelsHigh(0) -, _name(0) , _maxS(0.0) , _maxT(0.0) , _hasPremultipliedAlpha(false) , _hasMipmaps(false) -, _shaderProgram(nullptr) , _antialiasEnabled(true) , _ninePatchInfo(nullptr) , _valid(true) , _alphaTexture(nullptr) +, _texture(nullptr) { } @@ -457,23 +166,10 @@ Texture2D::~Texture2D() CC_SAFE_RELEASE_NULL(_alphaTexture); // ETC1 ALPHA support. CCLOGINFO("deallocing Texture2D: %p - id=%u", this, _name); - CC_SAFE_RELEASE(_shaderProgram); CC_SAFE_DELETE(_ninePatchInfo); - if(_name) - { - glDeleteTextures(1, &_name); - } -} - -void Texture2D::releaseGLTexture() -{ - if(_name) - { - glDeleteTextures(1, &_name); - } - _name = 0; + CC_SAFE_RELEASE(_texture); } @@ -494,12 +190,19 @@ int Texture2D::getPixelsHigh() const GLuint Texture2D::getName() const { - return _name; + //TODO coulsonwang + cocos2d::log("Error in %s %s %d, TODO", __FILE__, __FUNCTION__, __LINE__); + return 0; } -GLuint Texture2D::getAlphaTextureName() const +backend::Texture* Texture2D::getBackendTexture() const { - return _alphaTexture == nullptr ? 0 : _alphaTexture->getName(); + return _texture; +} + +bool Texture2D::getAlphaTextureName() const +{ + return _alphaTexture == nullptr ? 0 : _alphaTexture->getBackendTexture(); } Size Texture2D::getContentSize() const @@ -536,24 +239,12 @@ void Texture2D::setMaxT(GLfloat maxT) _maxT = maxT; } -GLProgram* Texture2D::getGLProgram() const -{ - return _shaderProgram; -} - -void Texture2D::setGLProgram(GLProgram* shaderProgram) -{ - CC_SAFE_RETAIN(shaderProgram); - CC_SAFE_RELEASE(_shaderProgram); - _shaderProgram = shaderProgram; -} - bool Texture2D::hasPremultipliedAlpha() const { return _hasPremultipliedAlpha; } -bool Texture2D::initWithData(const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const Size& /*contentSize*/) +bool Texture2D::initWithData(const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, Texture2D::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const Size& /*contentSize*/) { CCASSERT(dataLen>0 && pixelsWide>0 && pixelsHigh>0, "Invalid size"); @@ -561,144 +252,87 @@ bool Texture2D::initWithData(const void *data, ssize_t dataLen, Texture2D::Pixel MipmapInfo mipmap; mipmap.address = (unsigned char*)data; mipmap.len = static_cast(dataLen); - return initWithMipmaps(&mipmap, 1, pixelFormat, pixelsWide, pixelsHigh); + return initWithMipmaps(&mipmap, 1, pixelFormat, renderFormat, pixelsWide, pixelsHigh); } -bool Texture2D::initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, PixelFormat pixelFormat, int pixelsWide, int pixelsHigh) +bool Texture2D::initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, PixelFormat pixelFormat, PixelFormat renderFormat, int pixelsWide, int pixelsHigh) { - - //the pixelFormat must be a certain value CCASSERT(pixelFormat != PixelFormat::NONE && pixelFormat != PixelFormat::AUTO, "the \"pixelFormat\" param must be a certain value!"); - CCASSERT(pixelsWide>0 && pixelsHigh>0, "Invalid size"); + CCASSERT(pixelsWide > 0 && pixelsHigh > 0, "Invalid size"); if (mipmapsNum <= 0) { CCLOG("cocos2d: WARNING: mipmap number is less than 1"); return false; } - + auto formatItr = _pixelFormatInfoTables.find(pixelFormat); - if(formatItr == _pixelFormatInfoTables.end()) + if (formatItr == _pixelFormatInfoTables.end()) { - CCLOG("cocos2d: WARNING: unsupported pixelformat: %lx", (unsigned long)pixelFormat ); + CCLOG("cocos2d: WARNING: unsupported pixelformat: %lx", (unsigned long)pixelFormat); +#ifdef CC_USE_METAL + CCASSERT(false, "pixeformat not found in _pixelFormatInfoTables, register required!"); +#endif return false; } const PixelFormatInfo& info = formatItr->second; if (info.compressed && !Configuration::getInstance()->supportsPVRTC() - && !Configuration::getInstance()->supportsETC() - && !Configuration::getInstance()->supportsS3TC() - && !Configuration::getInstance()->supportsATITC()) + && !Configuration::getInstance()->supportsETC() + && !Configuration::getInstance()->supportsS3TC() + && !Configuration::getInstance()->supportsATITC()) { CCLOG("cocos2d: WARNING: PVRTC/ETC images are not supported"); return false; } - //Set the row align only when mipmapsNum == 1 and the data is uncompressed - if (mipmapsNum == 1 && !info.compressed) - { - unsigned int bytesPerRow = pixelsWide * info.bpp / 8; - - if(bytesPerRow % 8 == 0) - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 8); - } - else if(bytesPerRow % 4 == 0) - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - } - else if(bytesPerRow % 2 == 0) - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 2); - } - else - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - } - }else - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - } - - if(_name != 0) + auto device = backend::Device::getInstance(); + backend::TextureDescriptor textureDescriptor; + textureDescriptor.width = pixelsWide; + textureDescriptor.height = pixelsHigh; + textureDescriptor.samplerDescriptor.minFilter = (_antialiasEnabled) ? backend::SamplerFilter::LINEAR : backend::SamplerFilter::NEAREST; + textureDescriptor.samplerDescriptor.magFilter = (_antialiasEnabled) ? backend::SamplerFilter::LINEAR : backend::SamplerFilter::NEAREST; + if (mipmapsNum > 1) { - glDeleteTextures(1, &_name); - _name = 0; + textureDescriptor.samplerDescriptor.mipmapFilter = backend::SamplerFilter::NEAREST; } - glGenTextures(1, &_name); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); + unsigned char *data = mipmaps[0].address; - if (mipmapsNum == 1) - { - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _antialiasEnabled ? GL_LINEAR : GL_NEAREST); - }else - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _antialiasEnabled ? GL_LINEAR_MIPMAP_NEAREST : GL_NEAREST_MIPMAP_NEAREST); - } + ssize_t dataLen = mipmaps[0].len; + unsigned char *outData = data; + ssize_t outDataLen; - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _antialiasEnabled ? GL_LINEAR : GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - -#if CC_ENABLE_CACHE_TEXTURE_DATA - if (_antialiasEnabled) - { - TexParams texParams = {(GLuint)(_hasMipmaps?GL_LINEAR_MIPMAP_NEAREST:GL_LINEAR),GL_LINEAR,GL_NONE,GL_NONE}; - VolatileTextureMgr::setTexParameters(this, texParams); - } - else + if(renderFormat != pixelFormat) //need conversion { - TexParams texParams = {(GLuint)(_hasMipmaps?GL_NEAREST_MIPMAP_NEAREST:GL_NEAREST),GL_NEAREST,GL_NONE,GL_NONE}; - VolatileTextureMgr::setTexParameters(this, texParams); - } + auto convertedFormat = backend::PixelFormatUtils::convertDataToFormat(data, dataLen, pixelFormat, renderFormat, &outData, &outDataLen); +#ifdef CC_USE_METAL + CCASSERT(convertedFormat == renderFormat, "PixelFormat convert failed!"); #endif - - // clean possible GL error - GLenum err = glGetError(); - if (err != GL_NO_ERROR) - { - cocos2d::log("OpenGL error 0x%04X in %s %s %d\n", err, __FILE__, __FUNCTION__, __LINE__); + if(convertedFormat == renderFormat) pixelFormat = renderFormat; } + + backend::StringUtils::PixelFormat format = static_cast(pixelFormat); + CCASSERT(format != backend::StringUtils::PixelFormat::NONE, "PixelFormat should not be NONE"); - // Specify OpenGL texture image - int width = pixelsWide; - int height = pixelsHigh; + textureDescriptor.textureFormat = backend::StringUtils::PixelFormat2TextureFormat(format); + CCASSERT(textureDescriptor.textureFormat != backend::TextureFormat::NONE, "TextureFormat should not be NONE"); - for (int i = 0; i < mipmapsNum; ++i) - { - unsigned char *data = mipmaps[i].address; - GLsizei datalen = mipmaps[i].len; - - if (info.compressed) - { - glCompressedTexImage2D(GL_TEXTURE_2D, i, info.internalFormat, (GLsizei)width, (GLsizei)height, 0, datalen, data); - } - else - { - glTexImage2D(GL_TEXTURE_2D, i, info.internalFormat, (GLsizei)width, (GLsizei)height, 0, info.format, info.type, data); - } - - if (i > 0 && (width != height || ccNextPOT(width) != width )) - { - CCLOG("cocos2d: Texture2D. WARNING. Mipmap level %u is not squared. Texture won't render correctly. width=%d != height=%d", i, width, height); - } - - err = glGetError(); - if (err != GL_NO_ERROR) - { - CCLOG("cocos2d: Texture2D: Error uploading compressed texture level: %u . glError: 0x%04X", i, err); - return false; - } + textureDescriptor.compressed = info.compressed; + + _texture = device->newTexture(textureDescriptor); - width = MAX(width >> 1, 1); - height = MAX(height >> 1, 1); + _texture->updateData(outData); + if(outData && outData != data && outDataLen > 0) + { + free(outData); + outData = nullptr; + outDataLen = 0; } - + _contentSize = Size((float)pixelsWide, (float)pixelsHigh); _pixelsWide = pixelsWide; _pixelsHigh = pixelsHigh; @@ -709,30 +343,20 @@ bool Texture2D::initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, PixelFormat _hasPremultipliedAlpha = false; _hasMipmaps = mipmapsNum > 1; - // shader - setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE)); return true; } -bool Texture2D::updateWithData(const void *data,int offsetX,int offsetY,int width,int height) +bool Texture2D::updateWithData(void *data,int offsetX,int offsetY,int width,int height) { - if (_name) + if (_texture && width > 0 && height > 0) { - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - const PixelFormatInfo& info = _pixelFormatInfoTables.at(_pixelFormat); - glTexSubImage2D(GL_TEXTURE_2D,0,offsetX,offsetY,width,height,info.format, info.type,data); - + uint8_t* textureData = static_cast(data); + _texture->updateSubData(offsetX, offsetY, width, height, textureData); return true; } return false; } -std::string Texture2D::getDescription() const -{ - return StringUtils::format("", _name, (long)_pixelsWide, (long)_pixelsHigh, _maxS, _maxT); -} - // implementation Texture2D (Image) bool Texture2D::initWithImage(Image *image) { @@ -750,30 +374,73 @@ bool Texture2D::initWithImage(Image *image, PixelFormat format) int imageWidth = image->getWidth(); int imageHeight = image->getHeight(); this->_filePath = image->getFilePath(); - Configuration *conf = Configuration::getInstance(); - - int maxTextureSize = conf->getMaxTextureSize(); - if (imageWidth > maxTextureSize || imageHeight > maxTextureSize) - { - CCLOG("cocos2d: WARNING: Image (%u x %u) is bigger than the supported %u x %u", imageWidth, imageHeight, maxTextureSize, maxTextureSize); - return false; - } +// Configuration *conf = Configuration::getInstance(); +// +// int maxTextureSize = conf->getMaxTextureSize(); +// if (imageWidth > maxTextureSize || imageHeight > maxTextureSize) +// { +// CCLOG("cocos2d: WARNING: Image (%u x %u) is bigger than the supported %u x %u", imageWidth, imageHeight, maxTextureSize, maxTextureSize); +// return false; +// } unsigned char* tempData = image->getData(); Size imageSize = Size((float)imageWidth, (float)imageHeight); - PixelFormat pixelFormat = ((PixelFormat::NONE == format) || (PixelFormat::AUTO == format)) ? image->getRenderFormat() : format; - PixelFormat renderFormat = image->getRenderFormat(); + PixelFormat renderFormat = ((PixelFormat::NONE == format) || (PixelFormat::AUTO == format)) ? image->getPixelFormat() : format; + PixelFormat imagePixelFormat = image->getPixelFormat(); size_t tempDataLen = image->getDataLen(); + +#ifdef CC_USE_METAL + //compressed format does not need conversion + switch (imagePixelFormat) { + case PixelFormat::PVRTC4A: + case PixelFormat::PVRTC4: + case PixelFormat::PVRTC2A: + case PixelFormat::PVRTC2: + case PixelFormat::A8: + renderFormat = imagePixelFormat; + default: + break; + } + //override renderFormat, since some render format is not supported by metal + switch (renderFormat) + { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + //packed 16 bits pixels only available on iOS + case PixelFormat::RGB565: + renderFormat = PixelFormat::MTL_B5G6R5; + break; + case PixelFormat::RGBA4444: + renderFormat = PixelFormat::MTL_ABGR4; + break; + case PixelFormat::RGB5A1: + renderFormat = PixelFormat::MTL_BGR5A1; + break; +#else + case PixelFormat::RGB565: + case PixelFormat::RGB5A1: + case PixelFormat::RGBA4444: +#endif + case PixelFormat::I8: + case PixelFormat::AI88: + //TODO: conversion RGBA8888 -> I8(AI88) -> RGBA8888 may happends + renderFormat = PixelFormat::RGBA8888; + break; + default: + break; + } +#endif if (image->getNumberOfMipmaps() > 1) { - if (pixelFormat != image->getRenderFormat()) + if (renderFormat != image->getPixelFormat()) { CCLOG("cocos2d: WARNING: This image has more than 1 mipmaps and we will not convert the data format"); } - initWithMipmaps(image->getMipmaps(), image->getNumberOfMipmaps(), image->getRenderFormat(), imageWidth, imageHeight); + //pixel format of data is not converted, renderFormat can be different from pixelFormat + //it will be done later + initWithMipmaps(image->getMipmaps(), image->getNumberOfMipmaps(), image->getPixelFormat(), renderFormat, imageWidth, imageHeight); // set the premultiplied tag _hasPremultipliedAlpha = image->hasPremultipliedAlpha(); @@ -782,12 +449,12 @@ bool Texture2D::initWithImage(Image *image, PixelFormat format) } else if (image->isCompressed()) { - if (pixelFormat != image->getRenderFormat()) + if (renderFormat != image->getPixelFormat()) { CCLOG("cocos2d: WARNING: This image is compressed and we can't convert it for now"); } - - initWithData(tempData, tempDataLen, image->getRenderFormat(), imageWidth, imageHeight, imageSize); + + initWithData(tempData, tempDataLen, image->getPixelFormat(), imageWidth, imageHeight, imageSize); // set the premultiplied tag _hasPremultipliedAlpha = image->hasPremultipliedAlpha(); @@ -796,20 +463,9 @@ bool Texture2D::initWithImage(Image *image, PixelFormat format) } else { - unsigned char* outTempData = nullptr; - ssize_t outTempDataLen = 0; - - pixelFormat = convertDataToFormat(tempData, tempDataLen, renderFormat, pixelFormat, &outTempData, &outTempDataLen); - - initWithData(outTempData, outTempDataLen, pixelFormat, imageWidth, imageHeight, imageSize); - - - if (outTempData != nullptr && outTempData != tempData) - { - - free(outTempData); - } - + //after conversion, renderFormat == pixelFormat of data + initWithData(tempData, tempDataLen, imagePixelFormat, renderFormat, imageWidth, imageHeight, imageSize); + // set the premultiplied tag _hasPremultipliedAlpha = image->hasPremultipliedAlpha(); @@ -817,263 +473,6 @@ bool Texture2D::initWithImage(Image *image, PixelFormat format) } } -Texture2D::PixelFormat Texture2D::convertI8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) -{ - switch (format) - { - case PixelFormat::RGBA8888: - *outDataLen = dataLen*4; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToRGBA8888(data, dataLen, *outData); - break; - case PixelFormat::RGB888: - *outDataLen = dataLen*3; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToRGB888(data, dataLen, *outData); - break; - case PixelFormat::RGB565: - *outDataLen = dataLen*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToRGB565(data, dataLen, *outData); - break; - case PixelFormat::AI88: - *outDataLen = dataLen*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToAI88(data, dataLen, *outData); - break; - case PixelFormat::RGBA4444: - *outDataLen = dataLen*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToRGBA4444(data, dataLen, *outData); - break; - case PixelFormat::RGB5A1: - *outDataLen = dataLen*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertI8ToRGB5A1(data, dataLen, *outData); - break; - default: - // unsupported conversion or don't need to convert - if (format != PixelFormat::AUTO && format != PixelFormat::I8) - { - CCLOG("Can not convert image format PixelFormat::I8 to format ID:%d, we will use it's origin format PixelFormat::I8", static_cast(format)); - } - - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return PixelFormat::I8; - } - - return format; -} - -Texture2D::PixelFormat Texture2D::convertAI88ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) -{ - switch (format) - { - case PixelFormat::RGBA8888: - *outDataLen = dataLen*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToRGBA8888(data, dataLen, *outData); - break; - case PixelFormat::RGB888: - *outDataLen = dataLen/2*3; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToRGB888(data, dataLen, *outData); - break; - case PixelFormat::RGB565: - *outDataLen = dataLen; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToRGB565(data, dataLen, *outData); - break; - case PixelFormat::A8: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToA8(data, dataLen, *outData); - break; - case PixelFormat::I8: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToI8(data, dataLen, *outData); - break; - case PixelFormat::RGBA4444: - *outDataLen = dataLen; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToRGBA4444(data, dataLen, *outData); - break; - case PixelFormat::RGB5A1: - *outDataLen = dataLen; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertAI88ToRGB5A1(data, dataLen, *outData); - break; - default: - // unsupported conversion or don't need to convert - if (format != PixelFormat::AUTO && format != PixelFormat::AI88) - { - CCLOG("Can not convert image format PixelFormat::AI88 to format ID:%d, we will use it's origin format PixelFormat::AI88", static_cast(format)); - } - - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return PixelFormat::AI88; - break; - } - - return format; -} - -Texture2D::PixelFormat Texture2D::convertRGB888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) -{ - switch (format) - { - case PixelFormat::RGBA8888: - *outDataLen = dataLen/3*4; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToRGBA8888(data, dataLen, *outData); - break; - case PixelFormat::RGB565: - *outDataLen = dataLen/3*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToRGB565(data, dataLen, *outData); - break; - case PixelFormat::A8: - *outDataLen = dataLen/3; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToA8(data, dataLen, *outData); - break; - case PixelFormat::I8: - *outDataLen = dataLen/3; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToI8(data, dataLen, *outData); - break; - case PixelFormat::AI88: - *outDataLen = dataLen/3*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToAI88(data, dataLen, *outData); - break; - case PixelFormat::RGBA4444: - *outDataLen = dataLen/3*2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToRGBA4444(data, dataLen, *outData); - break; - case PixelFormat::RGB5A1: - *outDataLen = dataLen; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGB888ToRGB5A1(data, dataLen, *outData); - break; - default: - // unsupported conversion or don't need to convert - if (format != PixelFormat::AUTO && format != PixelFormat::RGB888) - { - CCLOG("Can not convert image format PixelFormat::RGB888 to format ID:%d, we will use it's origin format PixelFormat::RGB888", static_cast(format)); - } - - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return PixelFormat::RGB888; - } - return format; -} - -Texture2D::PixelFormat Texture2D::convertRGBA8888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) -{ - - switch (format) - { - case PixelFormat::RGB888: - *outDataLen = dataLen/4*3; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToRGB888(data, dataLen, *outData); - break; - case PixelFormat::RGB565: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToRGB565(data, dataLen, *outData); - break; - case PixelFormat::A8: - *outDataLen = dataLen/4; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToA8(data, dataLen, *outData); - break; - case PixelFormat::I8: - *outDataLen = dataLen/4; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToI8(data, dataLen, *outData); - break; - case PixelFormat::AI88: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToAI88(data, dataLen, *outData); - break; - case PixelFormat::RGBA4444: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToRGBA4444(data, dataLen, *outData); - break; - case PixelFormat::RGB5A1: - *outDataLen = dataLen/2; - *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); - convertRGBA8888ToRGB5A1(data, dataLen, *outData); - break; - default: - // unsupported conversion or don't need to convert - if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) - { - CCLOG("Can not convert image format PixelFormat::RGBA8888 to format ID:%d, we will use it's origin format PixelFormat::RGBA8888", static_cast(format)); - } - - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return PixelFormat::RGBA8888; - } - - return format; -} - -/* -convert map: -1.PixelFormat::RGBA8888 -2.PixelFormat::RGB888 -3.PixelFormat::RGB565 -4.PixelFormat::A8 -5.PixelFormat::I8 -6.PixelFormat::AI88 -7.PixelFormat::RGBA4444 -8.PixelFormat::RGB5A1 - -gray(5) -> 1235678 -gray alpha(6) -> 12345678 -rgb(2) -> 1235678 -rgba(1) -> 12345678 - -*/ -Texture2D::PixelFormat Texture2D::convertDataToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat originFormat, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) -{ - // don't need to convert - if (format == originFormat || format == PixelFormat::AUTO) - { - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return originFormat; - } - - switch (originFormat) - { - case PixelFormat::I8: - return convertI8ToFormat(data, dataLen, format, outData, outDataLen); - case PixelFormat::AI88: - return convertAI88ToFormat(data, dataLen, format, outData, outDataLen); - case PixelFormat::RGB888: - return convertRGB888ToFormat(data, dataLen, format, outData, outDataLen); - case PixelFormat::RGBA8888: - return convertRGBA8888ToFormat(data, dataLen, format, outData, outDataLen); - default: - CCLOG("unsupported conversion from format %d to format %d", static_cast(originFormat), static_cast(format)); - *outData = (unsigned char*)data; - *outDataLen = dataLen; - return originFormat; - } -} - // implementation Texture2D (Text) bool Texture2D::initWithString(const char *text, const std::string& fontName, float fontSize, const Size& dimensions/* = Size(0, 0)*/, TextHAlignment hAlignment/* = TextHAlignment::CENTER */, TextVAlignment vAlignment/* = TextVAlignment::TOP */, bool enableWrap /* = false */, int overflow /* = 0 */) { @@ -1157,7 +556,7 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin } Size imageSize = Size((float)imageWidth, (float)imageHeight); - pixelFormat = convertDataToFormat(outData.getBytes(), imageWidth*imageHeight*4, PixelFormat::RGBA8888, pixelFormat, &outTempData, &outTempDataLen); + pixelFormat = backend::PixelFormatUtils::convertDataToFormat(outData.getBytes(), imageWidth*imageHeight*4, PixelFormat::RGBA8888, pixelFormat, &outTempData, &outTempDataLen); ret = initWithData(outTempData, outTempDataLen, pixelFormat, imageWidth, imageHeight, imageSize); @@ -1170,176 +569,107 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin return ret; } - -// implementation Texture2D (Drawing) - -void Texture2D::drawAtPoint(const Vec2& point) -{ - GLfloat coordinates[] = { - 0.0f, _maxT, - _maxS,_maxT, - 0.0f, 0.0f, - _maxS,0.0f }; - - GLfloat width = (GLfloat)_pixelsWide * _maxS, - height = (GLfloat)_pixelsHigh * _maxT; - - GLfloat vertices[] = { - point.x, point.y, - width + point.x, point.y, - point.x, height + point.y, - width + point.x, height + point.y }; - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - _shaderProgram->use(); - _shaderProgram->setUniformsForBuiltins(); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, coordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); -} - -void Texture2D::drawInRect(const Rect& rect) -{ - GLfloat coordinates[] = { - 0.0f, _maxT, - _maxS,_maxT, - 0.0f, 0.0f, - _maxS,0.0f }; - - GLfloat vertices[] = { rect.origin.x, rect.origin.y, /*0.0f,*/ - rect.origin.x + rect.size.width, rect.origin.y, /*0.0f,*/ - rect.origin.x, rect.origin.y + rect.size.height, /*0.0f,*/ - rect.origin.x + rect.size.width, rect.origin.y + rect.size.height, /*0.0f*/ }; - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - _shaderProgram->use(); - _shaderProgram->setUniformsForBuiltins(); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, coordinates); - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); -} - -void Texture2D::PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied) +bool Texture2D::initWithBackendTexture(backend::Texture *texture) { - Image::setPVRImagesHavePremultipliedAlpha(haveAlphaPremultiplied); + CC_SAFE_RETAIN(texture); + CC_SAFE_RELEASE(_texture); + _texture = texture; + + _pixelsWide = _contentSize.width = texture->getWidth(); + _pixelsHigh = _contentSize.height = texture->getHeight(); + return true; } +//// implementation Texture2D (Drawing) // -// Use to apply MIN/MAG filter +//void Texture2D::drawAtPoint(const Vec2& point) +//{ +// GLfloat coordinates[] = { +// 0.0f, _maxT, +// _maxS,_maxT, +// 0.0f, 0.0f, +// _maxS,0.0f }; // -// implementation Texture2D (GLFilter) - -void Texture2D::generateMipmap() -{ - CCASSERT(_pixelsWide == ccNextPOT(_pixelsWide) && _pixelsHigh == ccNextPOT(_pixelsHigh), "Mipmap texture only works in POT textures"); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - glGenerateMipmap(GL_TEXTURE_2D); - _hasMipmaps = true; -#if CC_ENABLE_CACHE_TEXTURE_DATA - VolatileTextureMgr::setHasMipmaps(this, _hasMipmaps); -#endif -} +// GLfloat width = (GLfloat)_pixelsWide * _maxS, +// height = (GLfloat)_pixelsHigh * _maxT; +// +// GLfloat vertices[] = { +// point.x, point.y, +// width + point.x, point.y, +// point.x, height + point.y, +// width + point.x, height + point.y }; +// +// glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); +// glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); +// _shaderProgram->use(); +// _shaderProgram->setUniformsForBuiltins(); +// +// glActiveTexture(GL_TEXTURE0); +// glBindTexture(GL_TEXTURE_2D, _name); +// +// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); +// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, coordinates); +// +// glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); +//} +// +//void Texture2D::drawInRect(const Rect& rect) +//{ +// GLfloat coordinates[] = { +// 0.0f, _maxT, +// _maxS,_maxT, +// 0.0f, 0.0f, +// _maxS,0.0f }; +// +// GLfloat vertices[] = { rect.origin.x, rect.origin.y, /*0.0f,*/ +// rect.origin.x + rect.size.width, rect.origin.y, /*0.0f,*/ +// rect.origin.x, rect.origin.y + rect.size.height, /*0.0f,*/ +// rect.origin.x + rect.size.width, rect.origin.y + rect.size.height, /*0.0f*/ }; +// +// glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); +// glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); +// _shaderProgram->use(); +// _shaderProgram->setUniformsForBuiltins(); +// +// glActiveTexture(GL_TEXTURE0); +// glBindTexture(GL_TEXTURE_2D, _name); +// +// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); +// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, coordinates); +// glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); +//} bool Texture2D::hasMipmaps() const { return _hasMipmaps; } -void Texture2D::setTexParameters(const TexParams &texParams) -{ - CCASSERT((_pixelsWide == ccNextPOT(_pixelsWide) || texParams.wrapS == GL_CLAMP_TO_EDGE) && - (_pixelsHigh == ccNextPOT(_pixelsHigh) || texParams.wrapT == GL_CLAMP_TO_EDGE), - "GL_CLAMP_TO_EDGE should be used in NPOT dimensions"); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, texParams.minFilter ); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, texParams.magFilter ); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, texParams.wrapS ); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, texParams.wrapT ); - -#if CC_ENABLE_CACHE_TEXTURE_DATA - VolatileTextureMgr::setTexParameters(this, texParams); -#endif -} - void Texture2D::setAliasTexParameters() { - if (! _antialiasEnabled) - { - return; - } - - _antialiasEnabled = false; - if (_name == 0) - { - return; - } - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); + backend::SamplerDescriptor descriptor(false, + backend::SamplerFilter::NEAREST, + backend::SamplerFilter::NEAREST, + backend::SamplerFilter::NEAREST, + backend::SamplerAddressMode::DONT_CARE, + backend::SamplerAddressMode::DONT_CARE + ); - if( ! _hasMipmaps ) - { - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - } - else - { - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST ); - } - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); -#if CC_ENABLE_CACHE_TEXTURE_DATA - TexParams texParams = {(GLuint)(_hasMipmaps?GL_NEAREST_MIPMAP_NEAREST:GL_NEAREST),GL_NEAREST,GL_NONE,GL_NONE}; - VolatileTextureMgr::setTexParameters(this, texParams); -#endif + setSamplerDescriptor(descriptor); } void Texture2D::setAntiAliasTexParameters() { - if ( _antialiasEnabled ) - { - return; - } - - _antialiasEnabled = true; - - if (_name == 0) - { - return; - } - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _name); - - if( ! _hasMipmaps ) - { - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - } - else - { - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST ); - } - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); -#if CC_ENABLE_CACHE_TEXTURE_DATA - TexParams texParams = {(GLuint)(_hasMipmaps?GL_LINEAR_MIPMAP_NEAREST:GL_LINEAR),GL_LINEAR,GL_NONE,GL_NONE}; - VolatileTextureMgr::setTexParameters(this, texParams); -#endif + backend::SamplerDescriptor descriptor(false, + backend::SamplerFilter::LINEAR, + backend::SamplerFilter::LINEAR, + backend::SamplerFilter::LINEAR, + backend::SamplerAddressMode::DONT_CARE, + backend::SamplerAddressMode::DONT_CARE + ); + setSamplerDescriptor(descriptor); } const char* Texture2D::getStringForFormat() const @@ -1402,6 +732,15 @@ const char* Texture2D::getStringForFormat() const case Texture2D::PixelFormat::ATC_INTERPOLATED_ALPHA: return "ATC_INTERPOLATED_ALPHA"; + + case Texture2D::PixelFormat::MTL_ABGR4: + return "MTL_ABGR4"; + + case Texture2D::PixelFormat::MTL_B5G6R5: + return "MTL_RGB565"; + + case Texture2D::PixelFormat::MTL_BGR5A1: + return "MTL_BGR5A1"; default: CCASSERT(false , "unrecognized pixel format"); @@ -1517,4 +856,26 @@ Texture2D* Texture2D::getAlphaTexture() const { return _alphaTexture; } + +void Texture2D::setSamplerDescriptor(const backend::SamplerDescriptor &texParams) +{ + _texture->updateSamplerDescriptor(texParams); +} + +// TODO coulsonwang +//// implementation Texture2D (GLFilter) +void Texture2D::generateMipmap() +{ +// CCASSERT(_pixelsWide == ccNextPOT(_pixelsWide) && _pixelsHigh == ccNextPOT(_pixelsHigh), "Mipmap texture only works in POT textures"); +// glActiveTexture(GL_TEXTURE0); +// glBindTexture(GL_TEXTURE_2D, _name); +// glGenerateMipmap(GL_TEXTURE_2D); +// _hasMipmaps = true; +//#if CC_ENABLE_CACHE_TEXTURE_DATA +// VolatileTextureMgr::setHasMipmaps(this, _hasMipmaps); +//#endif +} + + + NS_CC_END diff --git a/cocos/renderer/CCTexture2D.h b/cocos/renderer/CCTexture2D.h index d237ec1b6ebc..849d6353be3d 100644 --- a/cocos/renderer/CCTexture2D.h +++ b/cocos/renderer/CCTexture2D.h @@ -48,6 +48,10 @@ namespace ui class Scale9Sprite; } +namespace backend { + class Texture; +} + /** * @addtogroup _2d * @{ @@ -55,8 +59,6 @@ namespace ui //CONSTANTS: -class GLProgram; - //CLASS INTERFACES: /** @@ -116,6 +118,12 @@ class CC_DLL Texture2D : public Ref //! ATITC-compressed texture: ATC_INTERPOLATED_ALPHA ATC_INTERPOLATED_ALPHA, //! Default texture format: AUTO + + MTL_B5G6R5, + //MTL_A1BGR5, + MTL_BGR5A1, + MTL_ABGR4, + DEFAULT = AUTO, NONE = -1 @@ -179,21 +187,6 @@ class CC_DLL Texture2D : public Ref @since v0.8 */ static Texture2D::PixelFormat getDefaultAlphaPixelFormat(); - CC_DEPRECATED_ATTRIBUTE static Texture2D::PixelFormat defaultAlphaPixelFormat() { return Texture2D::getDefaultAlphaPixelFormat(); }; - - /** Treats (or not) PVR files as if they have alpha premultiplied. - - @param haveAlphaPremultiplied - Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is - possible load them as if they have (or not) the alpha channel premultiplied. - - By default it is disabled. - - deprecated, please use Image::setPVRImagesHavePremultipliedAlpha() instead. - - @since v0.99.5 - */ - CC_DEPRECATED_ATTRIBUTE static void PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied); public: /** @@ -205,32 +198,34 @@ class CC_DLL Texture2D : public Ref * @lua NA */ virtual ~Texture2D(); - /** - Get texture name, dimensions and coordinates message by a string. - * @js NA - * @lua NA - */ - virtual std::string getDescription() const; - /** Release only the gl texture. + /** Initializes with a texture2d with data. + + @param data Specifies a pointer to the image data in memory. + @param dataLen The image data length. + @param pixelFormat The image pixelFormat. + @param pixelsWide The image width. + @param pixelsHigh The image height. + @param contentSize The image content size. * @js NA * @lua NA */ - void releaseGLTexture(); + bool initWithData(const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const Size& contentSize) { return initWithData(data, dataLen, pixelFormat, pixelFormat, pixelsWide, pixelsHigh, contentSize);} /** Initializes with a texture2d with data. @param data Specifies a pointer to the image data in memory. @param dataLen The image data length. @param pixelFormat The image pixelFormat. + @param renderFormat The format converted to. @param pixelsWide The image width. @param pixelsHigh The image height. @param contentSize The image content size. * @js NA * @lua NA */ - bool initWithData(const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const Size& contentSize); - + bool initWithData(const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, Texture2D::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const Size& contentSize); + /** Initializes with mipmaps. @param mipmaps Specifies a pointer to the image data in memory. @@ -239,8 +234,8 @@ class CC_DLL Texture2D : public Ref @param pixelsWide The image width. @param pixelsHigh The image height. */ - bool initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh); - + bool initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, Texture2D::PixelFormat pixelFormat, Texture2D::PixelFormat renderFormat, int pixelsWide, int pixelsHigh); + /** Update with texture data. @param data Specifies a pointer to the image data in memory. @@ -249,15 +244,15 @@ class CC_DLL Texture2D : public Ref @param width Specifies the width of the texture subimage. @param height Specifies the height of the texture subimage. */ - bool updateWithData(const void *data,int offsetX,int offsetY,int width,int height); + bool updateWithData(void *data,int offsetX,int offsetY,int width,int height); /** Drawing extensions to make it easy to draw basic quads using a Texture2D object. These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled. */ /** Draws a texture at a given point. */ - void drawAtPoint(const Vec2& point); +// void drawAtPoint(const Vec2& point); /** Draws a texture inside a rect.*/ - void drawInRect(const Rect& rect); +// void drawInRect(const Rect& rect); /** Extensions to make it easy to create a Texture2D object from an image file. @@ -300,35 +295,29 @@ class CC_DLL Texture2D : public Ref @param textDefinition A FontDefinition object contains font attributes. */ bool initWithString(const char *text, const FontDefinition& textDefinition); + + //TODO: minggo: is it resaonable? + bool initWithBackendTexture(backend::Texture* texture); - /** Sets the min filter, mag filter, wrap s and wrap t texture parameters. - If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}. - - @warning Calling this method could allocate additional texture memory. - - @since v0.8 - * @code - * When this function bound into js or lua,the input parameter will be changed - * In js: var setBlendFunc(var arg1, var arg2, var arg3, var arg4) - * In lua: local setBlendFunc(local arg1, local arg2, local arg3, local arg4) - * @endcode + /** Set sampler properties */ - void setTexParameters(const TexParams& texParams); - - /** - * @js NA - * @lua NA + void setSamplerDescriptor(const backend::SamplerDescriptor& texParams); + + /** Generates mipmap images for the texture. + It only works if the texture size is POT (power of 2). + @since v0.99.0 */ - CC_DEPRECATED_ATTRIBUTE void setTexParameters(const TexParams* texParams) { return setTexParameters(*texParams); }; - +// TODO coulsonwang + void generateMipmap(); + /** Sets antialias texture parameters: - - GL_TEXTURE_MIN_FILTER = GL_LINEAR - - GL_TEXTURE_MAG_FILTER = GL_LINEAR - - @warning Calling this method could allocate additional texture memory. - - @since v0.8 - */ + - GL_TEXTURE_MIN_FILTER = GL_LINEAR + - GL_TEXTURE_MAG_FILTER = GL_LINEAR + + @warning Calling this method could allocate additional texture memory. + + @since v0.8 + */ void setAntiAliasTexParameters(); /** Sets alias texture parameters: @@ -341,30 +330,20 @@ class CC_DLL Texture2D : public Ref */ void setAliasTexParameters(); - - /** Generates mipmap images for the texture. - It only works if the texture size is POT (power of 2). - @since v0.99.0 - */ - void generateMipmap(); - /** Returns the pixel format. @since v2.0 */ const char* getStringForFormat() const; - CC_DEPRECATED_ATTRIBUTE const char* stringForFormat() const { return getStringForFormat(); }; /** Returns the bits-per-pixel of the in-memory OpenGL texture @since v1.0 */ unsigned int getBitsPerPixelForFormat() const; - CC_DEPRECATED_ATTRIBUTE unsigned int bitsPerPixelForFormat() const { return getBitsPerPixelForFormat(); }; /** Helper functions that returns bits per pixels for a given format. @since v2.0 */ unsigned int getBitsPerPixelForFormat(Texture2D::PixelFormat format) const; - CC_DEPRECATED_ATTRIBUTE unsigned int bitsPerPixelForFormat(Texture2D::PixelFormat format) const { return getBitsPerPixelForFormat(format); }; /** Get content size. */ const Size& getContentSizeInPixels(); @@ -386,6 +365,7 @@ class CC_DLL Texture2D : public Ref /** Gets the texture name. */ GLuint getName() const; + backend::Texture* getBackendTexture() const; /** Gets max S. */ GLfloat getMaxS() const; @@ -399,22 +379,13 @@ class CC_DLL Texture2D : public Ref /** Get the texture content size.*/ Size getContentSize() const; - - /** Set a shader program to the texture. - - It's used by drawAtPoint and drawInRect - */ - void setGLProgram(GLProgram* program); - - /** Get a shader program from the texture.*/ - GLProgram* getGLProgram() const; std::string getPath()const { return _filePath; } void setAlphaTexture(Texture2D* alphaTexture); Texture2D* getAlphaTexture() const; - GLuint getAlphaTextureName() const; + bool getAlphaTextureName() const; public: /** Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo.*/ static const PixelFormatInfoMap& getPixelFormatInfoMap(); @@ -463,54 +434,9 @@ class CC_DLL Texture2D : public Ref */ void addSpriteFrameCapInset(SpriteFrame* spritframe, const Rect& capInsets); - /**convert functions*/ - /** - Convert the format to the format param you specified, if the format is PixelFormat::Automatic, it will detect it automatically and convert to the closest format for you. - It will return the converted format to you. if the outData != data, you must delete it manually. - */ - static PixelFormat convertDataToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat originFormat, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); - - static PixelFormat convertI8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); - static PixelFormat convertAI88ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); - static PixelFormat convertRGB888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); - static PixelFormat convertRGBA8888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); - - //I8 to XXX - static void convertI8ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertI8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertI8ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertI8ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertI8ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertI8ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - - //AI88 to XXX - static void convertAI88ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertAI88ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - - //RGB888 to XXX - static void convertRGB888ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGB888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - - //RGBA8888 to XXX - static void convertRGBA8888ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); - static void convertRGBA8888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + protected: /** pixel format of the texture */ Texture2D::PixelFormat _pixelFormat; @@ -522,7 +448,8 @@ class CC_DLL Texture2D : public Ref int _pixelsHigh; /** texture name */ - GLuint _name; + backend::Texture* _texture; + /** texture max S */ GLfloat _maxS; @@ -539,9 +466,6 @@ class CC_DLL Texture2D : public Ref /** whether or not the texture has mip maps*/ bool _hasMipmaps; - /** shader program used by drawAtPoint and drawInRect */ - GLProgram* _shaderProgram; - static const PixelFormatInfoMap _pixelFormatInfoTables; bool _antialiasEnabled; diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index 2bf88e598d68..d27e30c5c4b6 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -38,10 +38,8 @@ THE SOFTWARE. #include "base/CCEventDispatcher.h" #include "base/CCEventListenerCustom.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgram.h" #include "renderer/CCRenderer.h" #include "renderer/CCTexture2D.h" -#include "platform/CCGL.h" //According to some tests GL_TRIANGLE_STRIP is slower, MUCH slower. Probably I'm doing something very wrong @@ -50,14 +48,8 @@ THE SOFTWARE. NS_CC_BEGIN TextureAtlas::TextureAtlas() - :_indices(nullptr) - ,_dirty(false) - ,_texture(nullptr) - ,_quads(nullptr) -#if CC_ENABLE_CACHE_TEXTURE_DATA - ,_rendererRecreatedListener(nullptr) -#endif -{} +{ +} TextureAtlas::~TextureAtlas() { @@ -66,13 +58,6 @@ TextureAtlas::~TextureAtlas() CC_SAFE_FREE(_quads); CC_SAFE_FREE(_indices); - glDeleteBuffers(2, _buffersVBO); - - if (Configuration::getInstance()->supportsShareableVAO()) - { - glDeleteVertexArrays(1, &_VAOname); - glBindVertexArray(0); - } CC_SAFE_RELEASE(_texture); #if CC_ENABLE_CACHE_TEXTURE_DATA @@ -80,12 +65,12 @@ TextureAtlas::~TextureAtlas() #endif } -ssize_t TextureAtlas::getTotalQuads() const +size_t TextureAtlas::getTotalQuads() const { return _totalQuads; } -ssize_t TextureAtlas::getCapacity() const +size_t TextureAtlas::getCapacity() const { return _capacity; } @@ -189,49 +174,18 @@ bool TextureAtlas::initWithTexture(Texture2D *texture, ssize_t capacity) memset( _quads, 0, _capacity * sizeof(V3F_C4B_T2F_Quad) ); memset( _indices, 0, _capacity * 6 * sizeof(GLushort) ); -#if CC_ENABLE_CACHE_TEXTURE_DATA - /** listen the event that renderer was recreated on Android/WP8 */ - _rendererRecreatedListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, CC_CALLBACK_1(TextureAtlas::listenRendererRecreated, this)); - Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_rendererRecreatedListener, -1); -#endif - this->setupIndices(); - if (Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOandVAO(); - } - else - { - setupVBO(); - } - _dirty = true; return true; } -void TextureAtlas::listenRendererRecreated(EventCustom* /*event*/) -{ - if (Configuration::getInstance()->supportsShareableVAO()) - { - setupVBOandVAO(); - } - else - { - setupVBO(); - } - - // set _dirty to true to force it rebinding buffer - _dirty = true; -} - std::string TextureAtlas::getDescription() const { return StringUtils::format("", static_cast(_totalQuads)); } - void TextureAtlas::setupIndices() { if (_capacity == 0) @@ -250,65 +204,6 @@ void TextureAtlas::setupIndices() } } -//TextureAtlas - VAO / VBO specific - -void TextureAtlas::setupVBOandVAO() -{ - glGenVertexArrays(1, &_VAOname); - glBindVertexArray(_VAOname); - -#define kQuadSize sizeof(_quads[0].bl) - - glGenBuffers(2, &_buffersVBO[0]); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _capacity, _quads, GL_DYNAMIC_DRAW); - - // vertices - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, vertices)); - - // colors - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, colors)); - - // tex coords - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, texCoords)); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _capacity * 6, _indices, GL_STATIC_DRAW); - - // Must unbind the VAO before changing the element buffer. - glBindVertexArray(0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); -} - -void TextureAtlas::setupVBO() -{ - glGenBuffers(2, &_buffersVBO[0]); - - mapBuffers(); -} - -void TextureAtlas::mapBuffers() -{ - // Avoid changing the element buffer for whatever VAO might be bound. - glBindVertexArray(0); - - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _capacity, _quads, GL_DYNAMIC_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, 0); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _capacity * 6, _indices, GL_STATIC_DRAW); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - - CHECK_GL_ERROR_DEBUG(); -} // TextureAtlas - Update, Insert, Move & Remove @@ -523,9 +418,7 @@ bool TextureAtlas::resizeCapacity(ssize_t newCapacity) _quads = tmpQuads; _indices = tmpIndices; - setupIndices(); - mapBuffers(); _dirty = true; @@ -592,115 +485,5 @@ void TextureAtlas::fillWithEmptyQuadsFromIndex(ssize_t index, ssize_t amount) } } -// TextureAtlas - Drawing - -void TextureAtlas::drawQuads() -{ - this->drawNumberOfQuads(_totalQuads, 0); -} - -void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads) -{ - CCASSERT(numberOfQuads>=0, "numberOfQuads must be >= 0"); - this->drawNumberOfQuads(numberOfQuads, 0); -} - -void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) -{ - CCASSERT(numberOfQuads>=0 && start>=0, "numberOfQuads and start must be >= 0"); - - if(!numberOfQuads) - return; - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _texture->getName()); - - auto conf = Configuration::getInstance(); - if (conf->supportsShareableVAO() && conf->supportsMapBuffer()) - { - // - // Using VBO and VAO - // - - // FIXME:: update is done in draw... perhaps it should be done in a timer - if (_dirty) - { - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - // option 1: subdata -// glBufferSubData(GL_ARRAY_BUFFER, sizeof(_quads[0])*start, sizeof(_quads[0]) * n , &_quads[start] ); - - // option 2: data -// glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW); - - // option 3: orphaning + glMapBuffer - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _capacity, nullptr, GL_DYNAMIC_DRAW); - void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - memcpy(buf, _quads, sizeof(_quads[0])* _totalQuads); - glUnmapBuffer(GL_ARRAY_BUFFER); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - - _dirty = false; - } - - glBindVertexArray(_VAOname); - -#if CC_REBIND_INDICES_BUFFER - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); -#endif - - glDrawElements(GL_TRIANGLES, (GLsizei) numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0])) ); - - glBindVertexArray(0); - -#if CC_REBIND_INDICES_BUFFER - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); -#endif - -// glBindVertexArray(0); - } - else - { - // - // Using VBO without VAO - // - -#define kQuadSize sizeof(_quads[0].bl) - glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - - // FIXME:: update is done in draw... perhaps it should be done in a timer - if (_dirty) - { - glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(_quads[0]) * _totalQuads , &_quads[0] ); - _dirty = false; - } - - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); - glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); - - // vertices - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices)); - - // colors - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, colors)); - - // tex coords - glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, texCoords)); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); - - glDrawElements(GL_TRIANGLES, (GLsizei)numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0]))); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } - - CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,numberOfQuads*6); - - CHECK_GL_ERROR_DEBUG(); -} - - NS_CC_END diff --git a/cocos/renderer/CCTextureAtlas.h b/cocos/renderer/CCTextureAtlas.h index ab564f4e3fa4..25e7b9a51c9e 100644 --- a/cocos/renderer/CCTextureAtlas.h +++ b/cocos/renderer/CCTextureAtlas.h @@ -25,9 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CCTEXTURE_ATLAS_H__ -#define __CCTEXTURE_ATLAS_H__ +#pragma once #include @@ -190,25 +188,6 @@ class CC_DLL TextureAtlas : public Ref */ void fillWithEmptyQuadsFromIndex(ssize_t index, ssize_t amount); - /** Draws n quads. - * N can't be greater than the capacity of the Atlas. - */ - void drawNumberOfQuads(ssize_t n); - - /** Draws n quads from an index (offset). - N + start can't be greater than the capacity of the atlas. - - @since v1.0 - */ - void drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start); - - /** Draws all the Atlas's Quads. - */ - void drawQuads(); - /** Listen the event that renderer was recreated on Android. - */ - void listenRendererRecreated(EventCustom* event); - /** Whether or not the array buffer of the VBO needs to be updated.*/ bool isDirty() { return _dirty; } /** Specify if the array buffer of the VBO needs to be updated. */ @@ -221,10 +200,10 @@ class CC_DLL TextureAtlas : public Ref virtual std::string getDescription() const; /** Gets the quantity of quads that are going to be drawn. */ - ssize_t getTotalQuads() const; + size_t getTotalQuads() const; /** Gets the quantity of quads that can be stored with the current texture atlas size. */ - ssize_t getCapacity() const; + size_t getCapacity() const; /** Gets the texture of the texture atlas. */ Texture2D* getTexture() const; @@ -238,30 +217,30 @@ class CC_DLL TextureAtlas : public Ref /** Sets the quads that are going to be rendered. */ void setQuads(V3F_C4B_T2F_Quad* quads); + inline unsigned short* getIndices() { return _indices; } + private: + friend class ParticleBatchNode; + friend class AtlasNode; + void renderCommand(); void setupIndices(); - void mapBuffers(); - void setupVBOandVAO(); - void setupVBO(); protected: - GLushort* _indices; - GLuint _VAOname; - GLuint _buffersVBO[2]; //0: vertex 1: indices - bool _dirty; //indicates whether or not the array buffer of the VBO needs to be updated + unsigned short* _indices = nullptr; + bool _dirty = false; //indicates whether or not the array buffer of the VBO needs to be updated /** quantity of quads that are going to be drawn */ - ssize_t _totalQuads; + size_t _totalQuads = 0; /** quantity of quads that can be stored with the current texture atlas size */ - ssize_t _capacity; + size_t _capacity = 0; /** Texture of the texture atlas */ - Texture2D* _texture; + Texture2D* _texture = nullptr; /** Quads that are going to be rendered */ - V3F_C4B_T2F_Quad* _quads; + V3F_C4B_T2F_Quad* _quads = nullptr; #if CC_ENABLE_CACHE_TEXTURE_DATA - EventListenerCustom* _rendererRecreatedListener; + EventListenerCustom* _rendererRecreatedListener = nullptr; #endif }; @@ -269,7 +248,3 @@ class CC_DLL TextureAtlas : public Ref /// @} NS_CC_END - -#endif //__CCTEXTURE_ATLAS_H__ - - diff --git a/cocos/renderer/CCTextureCache.cpp b/cocos/renderer/CCTextureCache.cpp index 83a85560fcb2..b8efbdfbce42 100644 --- a/cocos/renderer/CCTextureCache.cpp +++ b/cocos/renderer/CCTextureCache.cpp @@ -41,7 +41,8 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "base/ccUtils.h" #include "base/CCNinePatchImageParser.h" - +#include "renderer/backend/Device.h" +//#include "renderer/backend/StringUtils.h" using namespace std; @@ -62,11 +63,6 @@ std::string TextureCache::getETC1AlphaFileSuffix() return s_etc1AlphaFileSuffix; } -TextureCache * TextureCache::getInstance() -{ - return Director::getInstance()->getTextureCache(); -} - TextureCache::TextureCache() : _loadingThread(nullptr) , _needQuit(false) @@ -84,19 +80,6 @@ TextureCache::~TextureCache() CC_SAFE_DELETE(_loadingThread); } -void TextureCache::destroyInstance() -{ -} - -TextureCache * TextureCache::sharedTextureCache() -{ - return Director::getInstance()->getTextureCache(); -} - -void TextureCache::purgeSharedTextureCache() -{ -} - std::string TextureCache::getDescription() const { return StringUtils::format("", static_cast(_textures.size())); @@ -636,14 +619,6 @@ Texture2D* TextureCache::getTextureForKey(const std::string &textureKeyName) con return nullptr; } -void TextureCache::reloadAllTextures() -{ - //will do nothing - // #if CC_ENABLE_CACHE_TEXTURE_DATA - // VolatileTextureMgr::reloadAllTextures(); - // #endif -} - std::string TextureCache::getTextureFilePath(cocos2d::Texture2D* texture) const { for (auto& item : _textures) @@ -748,10 +723,6 @@ VolatileTexture::VolatileTexture(Texture2D *t) , _hasMipmaps(false) , _text("") { - _texParams.minFilter = GL_LINEAR; - _texParams.magFilter = GL_LINEAR; - _texParams.wrapS = GL_CLAMP_TO_EDGE; - _texParams.wrapT = GL_CLAMP_TO_EDGE; } VolatileTexture::~VolatileTexture() @@ -842,18 +813,10 @@ void VolatileTextureMgr::setHasMipmaps(Texture2D *t, bool hasMipmaps) vt->_hasMipmaps = hasMipmaps; } -void VolatileTextureMgr::setTexParameters(Texture2D *t, const Texture2D::TexParams &texParams) +void VolatileTextureMgr::setSamplerDescriptor(Texture2D *t, const backend::SamplerDescriptor &desc) { VolatileTexture *vt = findVolotileTexture(t); - - if (texParams.minFilter != GL_NONE) - vt->_texParams.minFilter = texParams.minFilter; - if (texParams.magFilter != GL_NONE) - vt->_texParams.magFilter = texParams.magFilter; - if (texParams.wrapS != GL_NONE) - vt->_texParams.wrapS = texParams.wrapS; - if (texParams.wrapT != GL_NONE) - vt->_texParams.wrapT = texParams.wrapT; + vt->_samplerDescriptor = desc; } void VolatileTextureMgr::removeTexture(Texture2D *t) @@ -877,7 +840,8 @@ void VolatileTextureMgr::reloadAllTextures() // we need to release all of the glTextures to avoid collisions of texture id's when reloading the textures onto the GPU for (auto& item : _textures) { - item->_texture->releaseGLTexture(); + //TODO new-renderer: interface releaseGLTexture removal + // item->_texture->releaseGLTexture(); } CCLOG("reload all texture"); @@ -923,7 +887,7 @@ void VolatileTextureMgr::reloadAllTextures() if (vt->_hasMipmaps) { vt->_texture->generateMipmap(); } - vt->_texture->setTexParameters(vt->_texParams); + vt->_texture->setSamplerDescriptor(vt->_samplerDescriptor); } _isReloading = false; diff --git a/cocos/renderer/CCTextureCache.h b/cocos/renderer/CCTextureCache.h index d96c2a45cac7..1a38b18603b8 100644 --- a/cocos/renderer/CCTextureCache.h +++ b/cocos/renderer/CCTextureCache.h @@ -63,26 +63,6 @@ NS_CC_BEGIN class CC_DLL TextureCache : public Ref { public: - /** Returns the shared instance of the cache. */ - CC_DEPRECATED_ATTRIBUTE static TextureCache * getInstance(); - - /** @deprecated Use getInstance() instead. */ - CC_DEPRECATED_ATTRIBUTE static TextureCache * sharedTextureCache(); - - /** Purges the cache. It releases the retained instance. - @since v0.99.0 - */ - CC_DEPRECATED_ATTRIBUTE static void destroyInstance(); - - /** @deprecated Use destroyInstance() instead. */ - CC_DEPRECATED_ATTRIBUTE static void purgeSharedTextureCache(); - - /** Reload all textures. - Should not call it, called by frame work. - Now the function do nothing, use VolatileTextureMgr::reloadAllTextures. - */ - CC_DEPRECATED_ATTRIBUTE static void reloadAllTextures(); - // ETC1 ALPHA supports. static void setETC1AlphaFileSuffix(const std::string& suffix); static std::string getETC1AlphaFileSuffix(); @@ -147,14 +127,12 @@ class CC_DLL TextureCache : public Ref * If "key" is nil, then a new texture will be created each time. */ Texture2D* addImage(Image *image, const std::string &key); - CC_DEPRECATED_ATTRIBUTE Texture2D* addUIImage(Image *image, const std::string& key) { return addImage(image,key); } /** Returns an already created texture. Returns nil if the texture doesn't exist. @param key It's the related/absolute path of the file image. @since v0.99.5 */ Texture2D* getTextureForKey(const std::string& key) const; - CC_DEPRECATED_ATTRIBUTE Texture2D* textureForKey(const std::string& key) const { return getTextureForKey(key); } /** Reload texture from the image file. * If the file image hasn't loaded before, load it. @@ -284,7 +262,8 @@ class VolatileTexture std::string _fileName; bool _hasMipmaps; - Texture2D::TexParams _texParams; + //Texture2D::TexParams _texParams; + backend::SamplerDescriptor _samplerDescriptor; std::string _text; FontDefinition _fontDefinition; }; @@ -298,7 +277,7 @@ class CC_DLL VolatileTextureMgr static void addImage(Texture2D *tt, Image *image); static void setHasMipmaps(Texture2D *t, bool hasMipmaps); - static void setTexParameters(Texture2D *t, const Texture2D::TexParams &texParams); + static void setSamplerDescriptor(Texture2D *t, const backend::SamplerDescriptor &samplerDescriptor); static void removeTexture(Texture2D *t); static void reloadAllTextures(); public: diff --git a/cocos/renderer/CCTextureCube.cpp b/cocos/renderer/CCTextureCube.cpp index d4dc61131bda..158ad4e5d498 100644 --- a/cocos/renderer/CCTextureCube.cpp +++ b/cocos/renderer/CCTextureCube.cpp @@ -234,7 +234,8 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - _name = handle; +// TODO coulsonwang +// _name = handle; glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_CUBE_MAP, 0); @@ -249,18 +250,19 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ void TextureCube::setTexParameters(const TexParams& texParams) { - CCASSERT(_name != 0, __FUNCTION__); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_CUBE_MAP, _name); - - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, texParams.minFilter); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, texParams.magFilter); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, texParams.wrapS); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, texParams.wrapT); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_CUBE_MAP, 0); + //TODO coulsonwang +// CCASSERT(_name != 0, __FUNCTION__); +// +// glActiveTexture(GL_TEXTURE0); +// glBindTexture(GL_TEXTURE_CUBE_MAP, _name); +// +// glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, texParams.minFilter); +// glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, texParams.magFilter); +// glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, texParams.wrapS); +// glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, texParams.wrapT); +// +// glActiveTexture(GL_TEXTURE0); +// glBindTexture(GL_TEXTURE_CUBE_MAP, 0); } bool TextureCube::reloadTexture() diff --git a/cocos/renderer/CCTextureUtils.cpp b/cocos/renderer/CCTextureUtils.cpp new file mode 100644 index 000000000000..f8ff5d7c5e1a --- /dev/null +++ b/cocos/renderer/CCTextureUtils.cpp @@ -0,0 +1,1000 @@ +#include "CCTextureUtils.h" + + +NS_CC_BEGIN + +namespace backend { namespace PixelFormatUtils { + + ////////////////////////////////////////////////////////////////////////// + //convertor function + + // IIIIIIII -> RRRRRRRRGGGGGGGGGBBBBBBBB + void convertI8ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0; i < dataLen; ++i) + { + *outData++ = data[i]; //R + *outData++ = data[i]; //G + *outData++ = data[i]; //B + } + } + + // IIIIIIIIAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBB + void convertAI88ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *outData++ = data[i]; //R + *outData++ = data[i]; //G + *outData++ = data[i]; //B + } + } + + // IIIIIIII -> RRRRRRRRGGGGGGGGGBBBBBBBBAAAAAAAA + void convertI8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0; i < dataLen; ++i) + { + *outData++ = data[i]; //R + *outData++ = data[i]; //G + *outData++ = data[i]; //B + *outData++ = 0xFF; //A + } + } + + // IIIIIIIIAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA + void convertAI88ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *outData++ = data[i]; //R + *outData++ = data[i]; //G + *outData++ = data[i]; //B + *outData++ = data[i + 1]; //A + } + } + + // IIIIIIII -> RRRRRGGGGGGBBBBB + void convertI8ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (int i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i] & 0x00FC) << 3 //G + | (data[i] & 0x00F8) >> 3; //B + } + } + + // IIIIIIIIAAAAAAAA -> RRRRRGGGGGGBBBBB + void convertAI88ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i] & 0x00FC) << 3 //G + | (data[i] & 0x00F8) >> 3; //B + } + } + + // IIIIIIII -> RRRRGGGGBBBBAAAA + void convertI8ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0x00F0) << 8 //R + | (data[i] & 0x00F0) << 4 //G + | (data[i] & 0x00F0) //B + | 0x000F; //A + } + } + + // IIIIIIIIAAAAAAAA -> RRRRGGGGBBBBAAAA + void convertAI88ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F0) << 8 //R + | (data[i] & 0x00F0) << 4 //G + | (data[i] & 0x00F0) //B + | (data[i + 1] & 0x00F0) >> 4; //A + } + } + + // IIIIIIIIAAAAAAAA -> BBBBBGGG GGGRRRR + void convertAI88ToBGR565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t* out16 = (uint16_t*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i] & 0x00FC) << 3 //G + | (data[i] & 0x00F8) >> 3; //B + } + } + + // IIIIIIIIAAAAAAAA -> BBBBBGGG GGRRRRRA + void convertAI88ToBGR5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t* out16 = (uint16_t*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F8) << 7 //R + | (data[i] & 0x00F8) << 2 //G + | (data[i] & 0x00F8) >> 3 //B + | (data[i + 1] & 0x0080) << 8; //A + } + } + + // IIIIIIIIAAAAAAAA -> AAAABBBB GGGGRRRR + void convertAI88ToABGR4(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t* out16 = (uint16_t*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F0) << 8 //R + | (data[i] & 0x00F0) << 4 //G + | (data[i] & 0x00F0) //B + | (data[i + 1] & 0x00F0) >> 4; //A + } + } + + + // IIIIIIII -> RRRRRGGGGGBBBBBA + void convertI8ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (int i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i] & 0x00F8) << 3 //G + | (data[i] & 0x00F8) >> 2 //B + | 0x0001; //A + } + } + + /// IIIIIIII -> BBBBBGGG GGRRRRRA + void convertI8ToBGR5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *out16 = (uint16_t*)outData; + for (int i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0xF8) << 7 //R + | (data[i] & 0xF8) << 2 //G + | (data[i] & 0xF8) >> 3 //B + | 0x8000; //A + } + } + + // IIIIIIIII -> BBBBBGGG GGGRRRRR + void convertI8ToBGR565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *out16 = (uint16_t*)outData; + for (int i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0xF8) << 8 //R + | (data[i] & 0xFC) << 3 //G + | (data[i] & 0xF8) >> 3 //B + ; + } + } + + // IIIIIIIII -> AAAABBBBB GGGGRRRR + void convertI8ToABGR4(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *out16 = (uint16_t*)outData; + for (int i = 0; i < dataLen; ++i) + { + *out16++ = (data[i] & 0xF0) << 8 //R + | (data[i] & 0xF0) << 4 //G + | (data[i] & 0xF0) //B + | 0x000F; + } + } + + // IIIIIIIIAAAAAAAA -> RRRRRGGGGGBBBBBA + void convertAI88ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i] & 0x00F8) << 3 //G + | (data[i] & 0x00F8) >> 2 //B + | (data[i + 1] & 0x0080) >> 7; //A + } + } + + // IIIIIIII -> IIIIIIIIAAAAAAAA + void convertI8ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0; i < dataLen; ++i) + { + *out16++ = 0xFF00 //A + | data[i]; //I + } + } + + // IIIIIIIIAAAAAAAA -> AAAAAAAA + void convertAI88ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 1; i < dataLen; i += 2) + { + *outData++ = data[i]; //A + } + } + + // IIIIIIIIAAAAAAAA -> IIIIIIII + void convertAI88ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 1; i < l; i += 2) + { + *outData++ = data[i]; //R + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA + void convertRGB888ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *outData++ = data[i]; //R + *outData++ = data[i + 1]; //G + *outData++ = data[i + 2]; //B + *outData++ = 0xFF; //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRRRRRGGGGGGGGBBBBBBBB + void convertRGBA8888ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *outData++ = data[i]; //R + *outData++ = data[i + 1]; //G + *outData++ = data[i + 2]; //B + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRGGGGGGBBBBB + void convertRGB888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i + 1] & 0x00FC) << 3 //G + | (data[i + 2] & 0x00F8) >> 3; //B + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRRGGGGGGBBBBB + void convertRGBA8888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i + 1] & 0x00FC) << 3 //G + | (data[i + 2] & 0x00F8) >> 3; //B + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> AAAAAAAA + void convertRGB888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //A = (R*299 + G*587 + B*114 + 500) / 1000 + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> IIIIIIII + void convertRGB888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> IIIIIIII + void convertRGBA8888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> AAAAAAAA + void convertRGBA8888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *outData++ = data[i + 3]; //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> IIIIIIIIAAAAAAAA + void convertRGB888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 + *outData++ = 0xFF; + } + } + + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> IIIIIIIIAAAAAAAA + void convertRGBA8888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *outData++ = (data[i] * 299 + data[i + 1] * 587 + data[i + 2] * 114 + 500) / 1000; //I = (R*299 + G*587 + B*114 + 500) / 1000 + *outData++ = data[i + 3]; + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRGGGGBBBBAAAA + void convertRGB888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *out16++ = ((data[i] & 0x00F0) << 8 //R + | (data[i + 1] & 0x00F0) << 4 //G + | (data[i + 2] & 0xF0) //B + | 0x0F); //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRGGGGBBBBAAAA + void convertRGBA8888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 3; i < l; i += 4) + { + *out16++ = (data[i] & 0x00F0) << 8 //R + | (data[i + 1] & 0x00F0) << 4 //G + | (data[i + 2] & 0xF0) //B + | (data[i + 3] & 0xF0) >> 4; //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> RRRRRGGGGGBBBBBA + void convertRGB888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 3) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i + 1] & 0x00F8) << 3 //G + | (data[i + 2] & 0x00F8) >> 2 //B + | 0x01; //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> BBBBBGGG GGGRRRRR + void convertRGB888ToB5G6R5(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*) out; + for(int i = 0;i < dataLen ; i += 3) + { + *outData++ = ((data[i] & 0xF8) << 8)| + ((data[i + 1] &0xFC) << 3) | + ((data[i + 2] & 0xF8)>> 3); + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> BBBBBGGG GGRRRRRA + void convertRGB888ToBGR5A1(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*) out; + for(int i = 0;i < dataLen ; i += 3) + { + *outData++ = ((data[i] & 0xF8) << 7) | + ((data[i + 1] & 0xF8) << 2) | + ((data[i + 2] &0xF8) >> 3) | 0x8000; + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBB -> AAAABBBB GGGGRRRR + void convertRGB888ToABGR4(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*) out; + for(int i = 0;i < dataLen ; i += 3) + { + *outData++ = ((data[i] & 0xF0) << 8) | //r + ((data[i + 1] & 0xF0) << 4) | //g + ((data[i + 2] & 0xF0)) | //b + 0x000F; //a + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> RRRRRGGG GGBBBBBA + void convertRGBA8888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + unsigned short* out16 = (unsigned short*)outData; + for (ssize_t i = 0, l = dataLen - 2; i < l; i += 4) + { + *out16++ = (data[i] & 0x00F8) << 8 //R + | (data[i + 1] & 0x00F8) << 3 //G + | (data[i + 2] & 0x00F8) >> 2 //B + | (data[i + 3] & 0x0080) >> 7; //A + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> BBBBBGGG GGGRRRR + void convertRGBA8888ToBGR565(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*)out; + const ssize_t pixelCnt = dataLen / 4; + for(int i=0;i < pixelCnt; i++ ) + { + outData[i] = ((data[i*4 + 2] & 0xF8) >> 3) | //b + ((data[i * 4 + 1] & 0xFC ) << 3) | //g + (((data[i * 4 + 0] & 0xF8) << 8)); //r + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> AAAABBBB GGGGRRRR + void convertRGBA8888ToABGR4(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*)out; + for(int i=0;i < dataLen; i+=4 ) + { + *outData++ = ((data[i] & 0xF0) << 8) | //r + ((data[i + 1] & 0xF0) << 4) | //g + ((data[i + 2] & 0xF0)) | //b + ((data[i + 3] & 0xF0) >> 4); //a + } + } + + // RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA -> BBBBBGGG GGRRRRRA + void convertRGBA8888ToBGR5A1(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + uint16_t *outData = (uint16_t*)out; + for(int i = 0; i < dataLen; i += 4) + { + *outData++ = ((data[i + 2] & 0xF8) >> 3)| //b + ((data[i + 1] & 0xF8 ) << 2) | //g + ((data[i + 0] & 0xF8 ) << 7) | //r + ((data[i + 3] & 0x80) << 8); //a + } + } + + + void convertRGB5A1ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *inData = (uint16_t*)data; + const uint16_t pixelLen = dataLen / 2; + uint16_t pixel; + for (uint32_t i = 0; i < pixelLen; i++) + { + pixel = inData[i]; + *outData++ = (pixel & (0x001F << 11)) >> 8; + *outData++ = (pixel & (0x001F << 6)) >> 3; + *outData++ = (pixel & (0x001F << 1)) << 2; + *outData++ = (pixel & 0x0001) * 255; + } + } + + // ABBBBBGG GGGRRRRR -> BBBBBGGG GGRRRRRA + void convertRGB5A1ToBGR5A1(const unsigned char *data, ssize_t dataLen, unsigned char *out) + { + const size_t pixelLen = dataLen / 2; + const uint16_t *inData = (uint16_t*) data; + uint16_t *outData = (uint16_t*) out; + uint16_t pixel; + for (uint32_t i = 0; i < pixelLen; i++ ) + { + pixel = inData[i]; + outData[i] = (pixel >> 1) | ((pixel & 0x0001) << 15); + } + } + + + void convertRGB565ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *inData = (uint16_t*)data; + const uint16_t pixelLen = dataLen / 2; + uint16_t pixel; + for (uint32_t i = 0; i < pixelLen; i++) + { + pixel = inData[i]; + *outData++ = (pixel & (0x001F << 11)) >> 8; + *outData++ = (pixel & (0x003F << 5)) >> 3; + *outData++ = (pixel & (0x001F)) << 3; + *outData++ = 0xFF; + } + } + + // BBBBBGGG GGGRRRRR -> BBBGGG GGGRRRRR + // void convertRGB565ToB5G6R5(const unsigned char *data, ssize_t dataLen, unsigned char *out) + + + void convertRGBA4444ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + uint16_t *inData = (uint16_t*)data; + const uint16_t pixelLen = dataLen / 2; + uint16_t pixel; + for (uint32_t i = 0; i < pixelLen; i++) + { + pixel = inData[i]; + *outData++ = ((pixel & 0xF000) >> 12) * 17; + *outData++ = ((pixel & 0x0F00) >> 8) * 17; + *outData++ = ((pixel & 0x00F0) >> 4) * 17; + *outData++ = ((pixel & 0x000F) * 17); + } + + } + + // AAAABBBBGGGGRRRR -> AAAABBBB GGGGRRRR + //void convertRGBA4444ToABGR4444(const unsigned char *data, ssize_t dataLen, unsigned char *out) + + void convertA8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData) + { + for (uint32_t i = 0; i < dataLen; i++) + { + *outData++ = 0; + *outData++ = 0; + *outData++ = 0; + *outData++ = data[i]; + } + } + + + // converter function end + ////////////////////////////////////////////////////////////////////////// + + + + Texture2D::PixelFormat convertI8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen*4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::RGB888: + *outDataLen = dataLen*3; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToRGB888(data, dataLen, *outData); + break; + case PixelFormat::RGB565: + *outDataLen = dataLen*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToRGB565(data, dataLen, *outData); + break; + case PixelFormat::AI88: + *outDataLen = dataLen*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToAI88(data, dataLen, *outData); + break; + case PixelFormat::RGBA4444: + *outDataLen = dataLen*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToRGBA4444(data, dataLen, *outData); + break; + case PixelFormat::RGB5A1: + *outDataLen = dataLen*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToRGB5A1(data, dataLen, *outData); + break; + case PixelFormat::A8: + *outData = (unsigned char*)data; + *outDataLen = dataLen; + break; + case PixelFormat::MTL_BGR5A1: + *outDataLen = dataLen * 2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToBGR5A1(data, dataLen, *outData); + break; + case PixelFormat::MTL_ABGR4: + *outDataLen = dataLen * 2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToABGR4(data, dataLen, *outData); + break; + case PixelFormat::MTL_B5G6R5: + *outDataLen = dataLen * 2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertI8ToBGR565(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::I8) + { + CCLOG("Can not convert image format PixelFormat::I8 to format ID:%d, we will use it's origin format PixelFormat::I8", static_cast(format)); + } + + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::I8; + } + + return format; + } + + Texture2D::PixelFormat convertAI88ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::RGB888: + *outDataLen = dataLen/2*3; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToRGB888(data, dataLen, *outData); + break; + case PixelFormat::RGB565: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToRGB565(data, dataLen, *outData); + break; + case PixelFormat::A8: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToA8(data, dataLen, *outData); + break; + case PixelFormat::I8: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToI8(data, dataLen, *outData); + break; + case PixelFormat::RGBA4444: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToRGBA4444(data, dataLen, *outData); + break; + case PixelFormat::RGB5A1: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToRGB5A1(data, dataLen, *outData); + break; + case PixelFormat::MTL_ABGR4: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToABGR4(data, dataLen, *outData); + break; + case PixelFormat::MTL_B5G6R5: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToBGR565(data, dataLen, *outData); + break; + case PixelFormat::MTL_BGR5A1: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertAI88ToBGR5A1(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::AI88) + { + CCLOG("Can not convert image format PixelFormat::AI88 to format ID:%d, we will use it's origin format PixelFormat::AI88", static_cast(format)); + } + + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::AI88; + break; + } + + return format; + } + + Texture2D::PixelFormat convertRGB888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen/3*4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::RGB565: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToRGB565(data, dataLen, *outData); + break; + case PixelFormat::A8: + *outDataLen = dataLen/3; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToA8(data, dataLen, *outData); + break; + case PixelFormat::I8: + *outDataLen = dataLen/3; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToI8(data, dataLen, *outData); + break; + case PixelFormat::AI88: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToAI88(data, dataLen, *outData); + break; + case PixelFormat::RGBA4444: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToRGBA4444(data, dataLen, *outData); + break; + case PixelFormat::RGB5A1: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToRGB5A1(data, dataLen, *outData); + break; + case PixelFormat::MTL_B5G6R5: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToB5G6R5(data, dataLen, *outData); + break; + case PixelFormat::MTL_BGR5A1: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToBGR5A1(data, dataLen, *outData); + break; + case PixelFormat::MTL_ABGR4: + *outDataLen = dataLen/3*2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB888ToABGR4(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGB888) + { + CCLOG("Can not convert image format PixelFormat::RGB888 to format ID:%d, we will use it's origin format PixelFormat::RGB888", static_cast(format)); + } + + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGB888; + } + return format; + } + + Texture2D::PixelFormat convertRGBA8888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + + switch (format) + { + case PixelFormat::RGB888: + *outDataLen = dataLen/4*3; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToRGB888(data, dataLen, *outData); + break; + case PixelFormat::RGB565: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToRGB565(data, dataLen, *outData); + break; + case PixelFormat::A8: + *outDataLen = dataLen/4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToA8(data, dataLen, *outData); + break; + case PixelFormat::I8: + *outDataLen = dataLen/4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToI8(data, dataLen, *outData); + break; + case PixelFormat::AI88: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToAI88(data, dataLen, *outData); + break; + case PixelFormat::RGBA4444: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToRGBA4444(data, dataLen, *outData); + break; + case PixelFormat::RGB5A1: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToRGB5A1(data, dataLen, *outData); + break; + case PixelFormat::MTL_B5G6R5: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToBGR565(data, dataLen, *outData); + break; + case PixelFormat::MTL_ABGR4: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToABGR4(data, dataLen, *outData); + break; + case PixelFormat::MTL_BGR5A1: + *outDataLen = dataLen/2; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA8888ToBGR5A1(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) + { + CCLOG("Can not convert image format PixelFormat::RGBA8888 to format ID:%d, we will use it's origin format PixelFormat::RGBA8888", static_cast(format)); + } + + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGBA8888; + } + + return format; + } + + Texture2D::PixelFormat convertRGB5A1ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen/2*4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB5A1ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::MTL_BGR5A1: + *outDataLen = dataLen; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB5A1ToBGR5A1(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) + { + CCLOG("Can not convert image format PixelFormat::RGB5A1 to format ID:%d, we will use it's origin format PixelFormat::RGB51A", static_cast(format)); + } + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGBA8888; + } + + return format; + } + + Texture2D::PixelFormat convertRGB565ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen/2*4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGB565ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::MTL_B5G6R5: + *outDataLen = dataLen; + *outData = (unsigned char *)data; + // they are identical + //convertRGB565ToB5G6R5(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) + { + CCLOG("Can not convert image format PixelFormat::RGB565 to format ID:%d, we will use it's origin format PixelFormat::RGB565", static_cast(format)); + } + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGBA8888; + } + + return format; + } + + Texture2D::PixelFormat convertA8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen*4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertA8ToRGBA8888(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) + { + CCLOG("Can not convert image format PixelFormat::A8 to format ID:%d, we will use it's origin format PixelFormat::A8", static_cast(format)); + } + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGBA8888; + } + + return format; + } + + Texture2D::PixelFormat convertRGBA4444ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + switch (format) + { + case PixelFormat::RGBA8888: + *outDataLen = dataLen/ 2 * 4; + *outData = (unsigned char*)malloc(sizeof(unsigned char) * (*outDataLen)); + convertRGBA4444ToRGBA8888(data, dataLen, *outData); + break; + case PixelFormat::MTL_ABGR4: + *outDataLen = dataLen; + *outData = (unsigned char *)data; + //convertRGBA4444ToABGR4444(data, dataLen, *outData); + break; + default: + // unsupported conversion or don't need to convert + if (format != PixelFormat::AUTO && format != PixelFormat::RGBA8888) + { + CCLOG("Can not convert image format PixelFormat::RGBA444 to format ID:%d, we will use it's origin format PixelFormat::RGBA4444", static_cast(format)); + } + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return PixelFormat::RGBA8888; + } + + return format; + } + /* + convert map: + 1.PixelFormat::RGBA8888 + 2.PixelFormat::RGB888 + 3.PixelFormat::RGB565 + 4.PixelFormat::A8 + 5.PixelFormat::I8 + 6.PixelFormat::AI88 + 7.PixelFormat::RGBA4444 + 8.PixelFormat::RGB5A1 + + gray(5) -> 1235678 + gray alpha(6) -> 12345678 + rgb(2) -> 1235678 + rgba(1) -> 12345678 + + */ + Texture2D::PixelFormat convertDataToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat originFormat, PixelFormat format, unsigned char** outData, ssize_t* outDataLen) + { + // don't need to convert + if (format == originFormat || format == PixelFormat::AUTO) + { + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return originFormat; + } + + switch (originFormat) + { + case PixelFormat::I8: + return convertI8ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::AI88: + return convertAI88ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::RGB888: + return convertRGB888ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::RGBA8888: + return convertRGBA8888ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::RGB5A1: + return convertRGB5A1ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::RGB565: + return convertRGB565ToFormat(data, dataLen, format, outData, outDataLen); +#ifdef CC_USE_METAL + case PixelFormat::RGBA4444: + return convertRGBA4444ToFormat(data, dataLen, format, outData, outDataLen); + case PixelFormat::A8: + return convertA8ToFormat(data, dataLen, format, outData, outDataLen); + +#endif + default: + CCLOG("unsupported conversion from format %d to format %d", static_cast(originFormat), static_cast(format)); + *outData = (unsigned char*)data; + *outDataLen = dataLen; + return originFormat; + } + } + +} +} + +NS_CC_END diff --git a/cocos/renderer/CCTextureUtils.h b/cocos/renderer/CCTextureUtils.h new file mode 100644 index 000000000000..4f93f052d301 --- /dev/null +++ b/cocos/renderer/CCTextureUtils.h @@ -0,0 +1,71 @@ +#pragma once + +#include "CCPlatformMacros.h" +#include "renderer/CCTexture2D.h" + +NS_CC_BEGIN + +namespace backend { + namespace PixelFormatUtils { + typedef Texture2D::PixelFormat PixelFormat; + + /**convert functions*/ + + /** + Convert the format to the format param you specified, if the format is PixelFormat::Automatic, it will detect it automatically and convert to the closest format for you. + It will return the converted format to you. if the outData != data, you must delete it manually. + */ + PixelFormat convertDataToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat originFormat, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + + PixelFormat convertI8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertAI88ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertRGB888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertRGBA8888ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertRGB5A1ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertRGB565ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertA8ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + PixelFormat convertRGBA4444ToFormat(const unsigned char* data, ssize_t dataLen, PixelFormat format, unsigned char** outData, ssize_t* outDataLen); + + //I8 to XXX + void convertI8ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertI8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertI8ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertI8ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertI8ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertI8ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + + //AI88 to XXX + void convertAI88ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertAI88ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + + //RGB888 to XXX + void convertRGB888ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + + //RGBA8888 to XXX + void convertRGBA8888ToRGB888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToRGB565(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToI8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToA8(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToAI88(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToRGBA4444(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA8888ToRGB5A1(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + + + void convertRGB5A1ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGB565ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertA8ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + void convertRGBA4444ToRGBA8888(const unsigned char* data, ssize_t dataLen, unsigned char* outData); + }; +} +NS_CC_END diff --git a/cocos/renderer/CCTrianglesCommand.cpp b/cocos/renderer/CCTrianglesCommand.cpp index 8638716f37b6..ace78afcb3a7 100644 --- a/cocos/renderer/CCTrianglesCommand.cpp +++ b/cocos/renderer/CCTrianglesCommand.cpp @@ -30,104 +30,70 @@ #include "renderer/CCRenderer.h" #include "renderer/CCTexture2D.h" #include "base//ccUtils.h" +#include "renderer/backend/opengl/TextureGL.h" NS_CC_BEGIN TrianglesCommand::TrianglesCommand() -:_materialID(0) -,_textureID(0) -,_glProgramState(nullptr) -,_blendType(BlendFunc::DISABLE) -,_alphaTextureID(0) { _type = RenderCommand::Type::TRIANGLES_COMMAND; } -void TrianglesCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv, uint32_t flags) +void TrianglesCommand::init(float globalOrder, Texture2D* texture, const BlendFunc& blendType, const Triangles& triangles, const Mat4& mv, uint32_t flags) { - CCASSERT(glProgramState, "Invalid GLProgramState"); - CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand"); - RenderCommand::init(globalOrder, mv, flags); - + _triangles = triangles; if(_triangles.indexCount % 3 != 0) { - int count = _triangles.indexCount; + unsigned int count = _triangles.indexCount; _triangles.indexCount = count / 3 * 3; CCLOGERROR("Resize indexCount from %d to %d, size must be multiple times of 3", count, _triangles.indexCount); } _mv = mv; - - if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || - _glProgramState != glProgramState) + + if (_program != _pipelineDescriptor.programState->getProgram() || + _texture != texture->getBackendTexture() || + _blendType != blendType) { - _textureID = textureID; + _program = _pipelineDescriptor.programState->getProgram(); + _texture = texture->getBackendTexture(); + _blendType = blendType; - _glProgramState = glProgramState; + //TODO: minggo set it in Node? + auto& blendDescriptor = _pipelineDescriptor.blendDescriptor; + blendDescriptor.blendEnabled = true; + blendDescriptor.sourceRGBBlendFactor = blendDescriptor.sourceAlphaBlendFactor = blendType.src; + blendDescriptor.destinationRGBBlendFactor = blendDescriptor.destinationAlphaBlendFactor = blendType.dst; generateMaterialID(); } } -void TrianglesCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv) -{ - init(globalOrder, textureID, glProgramState, blendType, triangles, mv, 0); -} - -void TrianglesCommand::init(float globalOrder, Texture2D* texture, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles, const Mat4& mv, uint32_t flags) -{ - init(globalOrder, texture->getName(), glProgramState, blendType, triangles, mv, flags); - _alphaTextureID = texture->getAlphaTextureName(); -} - TrianglesCommand::~TrianglesCommand() { } void TrianglesCommand::generateMaterialID() { - // glProgramState is hashed because it contains: - // * uniforms/values - // * glProgram - // - // we safely can when the same glProgramState is being used then they share those states - // if they don't have the same glProgramState, they might still have the same - // uniforms/values and glProgram, but it would be too expensive to check the uniforms. - struct { - void* glProgramState; - GLuint textureId; - GLenum blendSrc; - GLenum blendDst; - } hashMe; + struct + { + void* texture; + void* program; + backend::BlendFactor src; + backend::BlendFactor dst; + }hashMe; // NOTE: Initialize hashMe struct to make the value of padding bytes be filled with zero. - // It's important since XXH32 below will also consider the padding bytes which probably + // It's important since XXH32 below will also consider the padding bytes which probably // are set to random values by different compilers. - memset(&hashMe, 0, sizeof(hashMe)); + memset(&hashMe, 0, sizeof(hashMe)); - hashMe.textureId = _textureID; - hashMe.blendSrc = _blendType.src; - hashMe.blendDst = _blendType.dst; - hashMe.glProgramState = _glProgramState; + hashMe.texture = _texture; + hashMe.src = _blendType.src; + hashMe.dst = _blendType.dst; + hashMe.program = _program; _materialID = XXH32((const void*)&hashMe, sizeof(hashMe), 0); } -void TrianglesCommand::useMaterial() const -{ - //Set texture - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, _textureID); - - if (_alphaTextureID > 0) - { // ANDROID ETC1 ALPHA supports. - glActiveTexture(GL_TEXTURE0 + 1); - glBindTexture(GL_TEXTURE_2D, _alphaTextureID); - } - //set blend mode - utils::setBlending(_blendType.src, _blendType.dst); - - _glProgramState->apply(_mv); -} - NS_CC_END diff --git a/cocos/renderer/CCTrianglesCommand.h b/cocos/renderer/CCTrianglesCommand.h index 75cec0dcf94f..606e6836c3c9 100644 --- a/cocos/renderer/CCTrianglesCommand.h +++ b/cocos/renderer/CCTrianglesCommand.h @@ -22,12 +22,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - -#ifndef __CC_TRIANGLES_COMMAND__ -#define __CC_TRIANGLES_COMMAND__ +#pragma once #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgramState.h" +#include "renderer/CCPipelineDescriptor.h" /** * @addtogroup renderer @@ -40,21 +39,35 @@ NS_CC_BEGIN Every TrianglesCommand will have generate material ID by give textureID, glProgramState, Blend function if the material id is the same, these TrianglesCommands could be batched to save draw call. */ +namespace backend { + class Texture; + class Program; +} class CC_DLL TrianglesCommand : public RenderCommand { public: /**The structure of Triangles. */ struct Triangles { + Triangles(V3F_C4B_T2F* _verts, unsigned short* _indices, unsigned int _vertCount, unsigned int _indexCount) + : verts(_verts) + , indices(_indices) + , vertCount(_vertCount) + , indexCount(_indexCount) + {} + + Triangles() {} + /**Vertex data pointer.*/ - V3F_C4B_T2F* verts; + V3F_C4B_T2F* verts = nullptr; /**Index data pointer.*/ - unsigned short* indices; + unsigned short* indices = nullptr; /**The number of vertices.*/ - int vertCount; + unsigned int vertCount = 0; /**The number of indices.*/ - int indexCount; + unsigned int indexCount = 0; }; + /**Constructor.*/ TrianglesCommand(); /**Destructor.*/ @@ -62,58 +75,46 @@ class CC_DLL TrianglesCommand : public RenderCommand /** Initializes the command. @param globalOrder GlobalZOrder of the command. - @param textureID The openGL handle of the used texture. - @param glProgramState The specified glProgram and its uniform. + @param texture The texture used in renderring. @param blendType Blend function for the command. @param triangles Rendered triangles for the command. @param mv ModelView matrix for the command. @param flags to indicate that the command is using 3D rendering or not. */ - void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv, uint32_t flags); - /**Deprecated function, the params is similar as the upper init function, with flags equals 0.*/ - CC_DEPRECATED_ATTRIBUTE void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv); - void init(float globalOrder, Texture2D* textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles, const Mat4& mv, uint32_t flags); - /**Apply the texture, shaders, programs, blend functions to GPU pipeline.*/ - void useMaterial() const; + void init(float globalOrder, Texture2D* texture, const BlendFunc& blendType, const Triangles& triangles, const Mat4& mv, uint32_t flags); /**Get the material id of command.*/ uint32_t getMaterialID() const { return _materialID; } - /**Get the openGL texture handle.*/ - GLuint getTextureID() const { return _textureID; } /**Get a const reference of triangles.*/ const Triangles& getTriangles() const { return _triangles; } /**Get the vertex count in the triangles.*/ - ssize_t getVertexCount() const { return _triangles.vertCount; } + size_t getVertexCount() const { return _triangles.vertCount; } /**Get the index count of the triangles.*/ - ssize_t getIndexCount() const { return _triangles.indexCount; } + size_t getIndexCount() const { return _triangles.indexCount; } /**Get the vertex data pointer.*/ const V3F_C4B_T2F* getVertices() const { return _triangles.verts; } /**Get the index data pointer.*/ const unsigned short* getIndices() const { return _triangles.indices; } - /**Get the glprogramstate.*/ - GLProgramState* getGLProgramState() const { return _glProgramState; } - /**Get the blend function.*/ - BlendFunc getBlendType() const { return _blendType; } /**Get the model view matrix.*/ const Mat4& getModelView() const { return _mv; } - + protected: /**Generate the material ID by textureID, glProgramState, and blend function.*/ void generateMaterialID(); /**Generated material id.*/ - uint32_t _materialID; - /**OpenGL handle for texture.*/ - GLuint _textureID; - /**GLprogramstate for the command. encapsulate shaders and uniforms.*/ - GLProgramState* _glProgramState; - /**Blend function when rendering the triangles.*/ - BlendFunc _blendType; + uint32_t _materialID = 0; + /**Rendered triangles.*/ Triangles _triangles; /**Model view matrix when rendering the triangles.*/ Mat4 _mv; - GLuint _alphaTextureID; // ANDROID ETC1 ALPHA supports. + uint8_t _alphaTextureID = 0; // ANDROID ETC1 ALPHA supports. + + // Cached value to determine to generate material id or not. + BlendFunc _blendType = BlendFunc::DISABLE; + backend::Program* _program = nullptr; + backend::Texture* _texture = nullptr; }; NS_CC_END @@ -121,4 +122,3 @@ NS_CC_END end of support group @} */ -#endif // defined(__CC_TRIANGLES_COMMAND__) diff --git a/cocos/renderer/CCVertexIndexBuffer.cpp b/cocos/renderer/CCVertexIndexBuffer.cpp index 37342e219591..1f8823b5c76b 100644 --- a/cocos/renderer/CCVertexIndexBuffer.cpp +++ b/cocos/renderer/CCVertexIndexBuffer.cpp @@ -31,13 +31,13 @@ NS_CC_BEGIN -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) bool VertexBuffer::_enableShadowCopy = true; #else bool VertexBuffer::_enableShadowCopy = false; #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) bool IndexBuffer::_enableShadowCopy = true; #else bool IndexBuffer::_enableShadowCopy = false; diff --git a/cocos/renderer/CMakeLists.txt b/cocos/renderer/CMakeLists.txt index 269ae867dc98..927624ee76cd 100644 --- a/cocos/renderer/CMakeLists.txt +++ b/cocos/renderer/CMakeLists.txt @@ -1,36 +1,55 @@ set(COCOS_RENDERER_HEADER - renderer/CCTextureCache.h - renderer/CCRenderer.h + renderer/CCCallbackCommand.h + renderer/CCCustomCommand.h + renderer/CCGLProgram.h + renderer/CCGLProgramCache.h + renderer/CCGLProgramState.h + renderer/CCGLProgramStateCache.h + renderer/CCGroupCommand.h renderer/CCMaterial.h - renderer/CCRenderCommandPool.h - renderer/ccShaders.h renderer/CCMeshCommand.h - renderer/CCGLProgramStateCache.h + renderer/CCPass.h + renderer/CCPipelineDescriptor.h + renderer/CCQuadCommand.h renderer/CCRenderCommand.h - renderer/CCTextureCube.h - renderer/CCGLProgram.h - renderer/CCGLProgramCache.h + renderer/CCRenderCommandPool.h + renderer/CCRenderState.h + renderer/CCRenderer.h + renderer/CCTechnique.h + renderer/CCTexture2D.h renderer/CCTextureAtlas.h - renderer/CCGroupCommand.h + renderer/CCTextureCache.h + renderer/CCTextureCube.h + renderer/CCTextureUtils.h + renderer/CCTrianglesCommand.h renderer/CCVertexAttribBinding.h renderer/CCVertexIndexBuffer.h renderer/CCVertexIndexData.h - renderer/CCPrimitive.h - renderer/CCTexture2D.h - renderer/CCCustomCommand.h - renderer/CCFrameBuffer.h - renderer/CCQuadCommand.h - renderer/CCTechnique.h - renderer/CCPrimitiveCommand.h - renderer/CCGLProgramState.h - renderer/CCTrianglesCommand.h - renderer/CCBatchCommand.h - renderer/CCPass.h - renderer/CCRenderState.h + renderer/ccShaders.h + + renderer/backend/Backend.h + renderer/backend/BlendState.h + renderer/backend/Buffer.h + renderer/backend/CommandBuffer.h + renderer/backend/DepthStencilState.h + renderer/backend/Device.h + renderer/backend/Program.h + renderer/backend/ProgramCache.h + renderer/backend/Macros.h + renderer/backend/RenderPassDescriptor.h + renderer/backend/RenderPipeline.h + renderer/backend/RenderPipelineDescriptor.h + renderer/backend/ShaderModule.h + renderer/backend/StringUtils.h + renderer/backend/Texture.h + renderer/backend/Types.h + renderer/backend/VertexLayout.h + renderer/backend/ProgramState.h + renderer/backend/ShaderCache.h ) set(COCOS_RENDERER_SRC - renderer/CCBatchCommand.cpp + renderer/CCCallbackCommand.cpp renderer/CCCustomCommand.cpp renderer/CCGLProgram.cpp renderer/CCGLProgramCache.cpp @@ -40,8 +59,6 @@ set(COCOS_RENDERER_SRC renderer/CCMaterial.cpp renderer/CCMeshCommand.cpp renderer/CCPass.cpp - renderer/CCPrimitive.cpp - renderer/CCPrimitiveCommand.cpp renderer/CCQuadCommand.cpp renderer/CCRenderCommand.cpp renderer/CCRenderState.cpp @@ -51,10 +68,80 @@ set(COCOS_RENDERER_SRC renderer/CCTextureAtlas.cpp renderer/CCTextureCache.cpp renderer/CCTextureCube.cpp + renderer/CCTextureUtils.cpp renderer/CCTrianglesCommand.cpp renderer/CCVertexAttribBinding.cpp renderer/CCVertexIndexBuffer.cpp renderer/CCVertexIndexData.cpp renderer/ccShaders.cpp - renderer/CCFrameBuffer.cpp + + renderer/backend/BlendState.cpp + renderer/backend/CommandBuffer.cpp + renderer/backend/DepthStencilState.cpp + renderer/backend/Device.cpp + renderer/backend/ShaderModule.cpp + renderer/backend/StringUtils.cpp + renderer/backend/Texture.cpp + renderer/backend/VertexLayout.cpp + renderer/backend/ProgramCache.cpp + renderer/backend/Program.cpp + renderer/backend/ProgramState.cpp + renderer/backend/ShaderCache.cpp ) + +if(ANDROID OR WINDOWS OR LINUX) + +list(APPEND COCOS_RENDERER_HEADER + renderer/backend/opengl/BufferGL.h + renderer/backend/opengl/CommandBufferGL.h + renderer/backend/opengl/DepthStencilStateGL.h + renderer/backend/opengl/DeviceGL.h + renderer/backend/opengl/ProgramGL.h + renderer/backend/opengl/RenderPipelineGL.h + renderer/backend/opengl/ShaderModuleGL.h + renderer/backend/opengl/TextureGL.h +) + +list(APPEND COCOS_RENDERER_SRC + renderer/backend/opengl/BlendStateGL.cpp + renderer/backend/opengl/BufferGL.cpp + renderer/backend/opengl/CommandBufferGL.cpp + renderer/backend/opengl/DepthStencilStateGL.cpp + renderer/backend/opengl/DeviceGL.cpp + renderer/backend/opengl/ProgramGL.cpp + renderer/backend/opengl/RenderPipelineGL.cpp + renderer/backend/opengl/ShaderModuleGL.cpp + renderer/backend/opengl/TextureGL.cpp +) + +else() + +list(APPEND COCOS_RENDERER_HEADER + renderer/backend/metal/BlendStateMTL.h + renderer/backend/metal/BufferMTL.h + renderer/backend/metal/BufferManager.h + renderer/backend/metal/CommandBufferMTL.h + renderer/backend/metal/DepthStencilStateMTL.h + renderer/backend/metal/DeviceMTL.h + renderer/backend/metal/RenderPipelineMTL.h + renderer/backend/metal/ShaderModuleMTL.h + renderer/backend/metal/TextureMTL.h + renderer/backend/metal/Utils.h + renderer/backend/metal/ProgramMTL.h +) + +list(APPEND COCOS_RENDERER_SRC + renderer/backend/metal/BlendStateMTL.mm + renderer/backend/metal/BufferMTL.mm + renderer/backend/metal/BufferManager.mm + renderer/backend/metal/CommandBufferMTL.mm + renderer/backend/metal/DepthStencilStateMTL.mm + renderer/backend/metal/DeviceMTL.mm + renderer/backend/metal/RenderPipelineMTL.mm + renderer/backend/metal/ShaderModuleMTL.mm + renderer/backend/metal/TextureMTL.mm + renderer/backend/metal/Utils.mm + renderer/backend/metal/ProgramMTL.mm +) + +endif() \ No newline at end of file diff --git a/cocos/renderer/backend/Backend.h b/cocos/renderer/backend/Backend.h new file mode 100644 index 000000000000..80f7ddc68de4 --- /dev/null +++ b/cocos/renderer/backend/Backend.h @@ -0,0 +1,13 @@ +#pragma once + +#include "renderer/backend/RenderPassDescriptor.h" +#include "renderer/backend/RenderPipeline.h" +#include "renderer/backend/RenderPipelineDescriptor.h" +#include "renderer/backend/Device.h" +#include "renderer/backend/Types.h" +#include "renderer/backend/CommandBuffer.h" +#include "renderer/backend/Buffer.h" +#include "renderer/backend/VertexLayout.h" +#include "renderer/backend/Texture.h" +#include "renderer/backend/DepthStencilState.h" +#include "renderer/backend/BlendState.h" diff --git a/cocos/renderer/backend/BlendState.cpp b/cocos/renderer/backend/BlendState.cpp new file mode 100644 index 000000000000..f4be052c13e0 --- /dev/null +++ b/cocos/renderer/backend/BlendState.cpp @@ -0,0 +1,5 @@ +#include "BlendState.h" + +CC_BACKEND_BEGIN + +CC_BACKEND_END diff --git a/cocos/renderer/backend/BlendState.h b/cocos/renderer/backend/BlendState.h new file mode 100644 index 000000000000..420e5988788f --- /dev/null +++ b/cocos/renderer/backend/BlendState.h @@ -0,0 +1,30 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "base/CCRef.h" + +CC_BACKEND_BEGIN + +struct BlendDescriptor +{ + ColorWriteMask writeMask = ColorWriteMask::ALL; + + bool blendEnabled = false; + + BlendOperation rgbBlendOperation = BlendOperation::ADD; + BlendOperation alphaBlendOperation = BlendOperation::ADD; + + BlendFactor sourceRGBBlendFactor = BlendFactor::ONE; + BlendFactor destinationRGBBlendFactor = BlendFactor::ZERO; + BlendFactor sourceAlphaBlendFactor = BlendFactor::ONE; + BlendFactor destinationAlphaBlendFactor = BlendFactor::ZERO; +}; + +class BlendState : public cocos2d::Ref +{ +protected: + virtual ~BlendState() = default; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Buffer.h b/cocos/renderer/backend/Buffer.h new file mode 100644 index 000000000000..34b6624bba1b --- /dev/null +++ b/cocos/renderer/backend/Buffer.h @@ -0,0 +1,29 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "base/CCRef.h" + +CC_BACKEND_BEGIN + +class Buffer : public cocos2d::Ref +{ +public: + virtual void updateData(void* data, unsigned int size) = 0; + virtual void updateSubData(void* data, unsigned int offset, unsigned int size) = 0; + +protected: + Buffer(unsigned int size, BufferType type, BufferUsage usage) + : _size(size) + , _type(type) + , _usage(usage) + {} + + virtual ~Buffer() = default; + + BufferUsage _usage = BufferUsage::DYNAMIC; + BufferType _type = BufferType::VERTEX; + unsigned int _size = 0; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/CommandBuffer.cpp b/cocos/renderer/backend/CommandBuffer.cpp new file mode 100644 index 000000000000..d51b57d7bdb7 --- /dev/null +++ b/cocos/renderer/backend/CommandBuffer.cpp @@ -0,0 +1,16 @@ +#include "CommandBuffer.h" + +CC_BACKEND_BEGIN + +void CommandBuffer::setStencilReferenceValue(uint32_t value) +{ + _stencilReferenceValueBack = _stencilReferenceValueFront = value; +} + +void CommandBuffer::setStencilReferenceValue(unsigned int frontRef, unsigned int backRef) +{ + _stencilReferenceValueFront = frontRef; + _stencilReferenceValueBack = backRef; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/CommandBuffer.h b/cocos/renderer/backend/CommandBuffer.h new file mode 100644 index 000000000000..2a991ce9b0ae --- /dev/null +++ b/cocos/renderer/backend/CommandBuffer.h @@ -0,0 +1,49 @@ +#pragma once + +#include + +#include "base/CCRef.h" + +#include "Macros.h" +#include "Types.h" +#include "RenderPassDescriptor.h" +#include "CCStdC.h" +#include "ProgramState.h" + +CC_BACKEND_BEGIN + +class RenderPass; +class RenderPipeline; +class Buffer; + +class CommandBuffer : public cocos2d::Ref +{ +public: + virtual void beginFrame() = 0; + virtual void beginRenderPass(const RenderPassDescriptor& descriptor) = 0; + virtual void setRenderPipeline(RenderPipeline* renderPipeline) = 0; + virtual void setViewport(int x, int y, unsigned int w, unsigned int h) = 0; + virtual void setCullMode(CullMode mode) = 0; + virtual void setVertexBuffer(unsigned int index, Buffer* buffer) = 0; + virtual void setProgramState(ProgramState* programState) = 0; + virtual void setIndexBuffer(Buffer* buffer) = 0; + virtual void drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count) = 0; + virtual void drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset) = 0; + virtual void endRenderPass() = 0; + virtual void endFrame() = 0; + + virtual void setLineWidth(float lineWidth) = 0; + + void setStencilReferenceValue(unsigned int value); + void setStencilReferenceValue(unsigned int frontRef, unsigned int backRef); + + virtual void setScissorRect(bool isEnabled, float x, float y, float width, float height) = 0; + +protected: + virtual ~CommandBuffer() = default; + + unsigned int _stencilReferenceValueFront = 0; + unsigned int _stencilReferenceValueBack = 0; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/DepthStencilState.cpp b/cocos/renderer/backend/DepthStencilState.cpp new file mode 100644 index 000000000000..369f115f9755 --- /dev/null +++ b/cocos/renderer/backend/DepthStencilState.cpp @@ -0,0 +1,25 @@ +#include "DepthStencilState.h" + +CC_BACKEND_BEGIN + +bool StencilDescriptor::operator==(const StencilDescriptor &rhs) const +{ + return (stencilFailureOperation == rhs.stencilFailureOperation && + depthFailureOperation == rhs.depthFailureOperation && + depthStencilPassOperation == rhs.depthStencilPassOperation && + stencilCompareFunction == rhs.stencilCompareFunction && + readMask == rhs.readMask && + writeMask == rhs.writeMask); + +} + +DepthStencilState::DepthStencilState(const DepthStencilDescriptor& descriptor) +: _depthStencilInfo(descriptor) +{ + _isBackFrontStencilEqual = descriptor.backFaceStencil == descriptor.frontFaceStencil; +} + +DepthStencilState::~DepthStencilState() +{} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/DepthStencilState.h b/cocos/renderer/backend/DepthStencilState.h new file mode 100644 index 000000000000..b30b56b8ff4b --- /dev/null +++ b/cocos/renderer/backend/DepthStencilState.h @@ -0,0 +1,43 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" + +#include "base/CCRef.h" + +CC_BACKEND_BEGIN + +struct StencilDescriptor +{ + bool operator ==(const StencilDescriptor& rhs) const; + + StencilOperation stencilFailureOperation = StencilOperation::KEEP; + StencilOperation depthFailureOperation = StencilOperation::KEEP; + StencilOperation depthStencilPassOperation = StencilOperation::KEEP; + CompareFunction stencilCompareFunction = CompareFunction::ALWAYS; + unsigned int readMask = 0; + unsigned int writeMask = 0; +}; + +struct DepthStencilDescriptor +{ + CompareFunction depthCompareFunction = CompareFunction::LESS; + bool depthWriteEnabled = false; + bool depthTestEnabled = false; + + bool stencilTestEnabled = false; + StencilDescriptor backFaceStencil; + StencilDescriptor frontFaceStencil; +}; + +class DepthStencilState : public cocos2d::Ref +{ +protected: + DepthStencilState(const DepthStencilDescriptor& descriptor); + virtual ~DepthStencilState(); + + DepthStencilDescriptor _depthStencilInfo; + bool _isBackFrontStencilEqual = false; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Device.cpp b/cocos/renderer/backend/Device.cpp new file mode 100644 index 000000000000..f2f1bb692d44 --- /dev/null +++ b/cocos/renderer/backend/Device.cpp @@ -0,0 +1,7 @@ +#include "Device.h" + +CC_BACKEND_BEGIN + +Device* Device::_instance = nullptr; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Device.h b/cocos/renderer/backend/Device.h new file mode 100644 index 000000000000..712c654aed55 --- /dev/null +++ b/cocos/renderer/backend/Device.h @@ -0,0 +1,58 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "RenderPipelineDescriptor.h" +#include "RenderPassDescriptor.h" +#include "Texture.h" +#include "DepthStencilState.h" +#include "BlendState.h" +#include "ProgramCache.h" +#include "ShaderCache.h" + +#include "base/CCRef.h" + +#include + +CC_BACKEND_BEGIN + +class CommandBuffer; +class Buffer; +class ShaderModule; +class RenderPipeline; +class RenderPass; + +class Device : public cocos2d::Ref +{ +public: + friend class ProgramCache; + friend class ShaderCache; + + static Device* getInstance(); + + virtual ~Device() = default; + + // Create a command buffer, not auto released. + virtual CommandBuffer* newCommandBuffer() = 0; + // Create a buffer, not auto released. + virtual Buffer* newBuffer(uint32_t size, BufferType type, BufferUsage usage) = 0; + // Create a texture, not auto released. + virtual Texture* newTexture(const TextureDescriptor& descriptor) = 0; + // Create a auto released depth stencil state. + virtual DepthStencilState* createDepthStencilState(const DepthStencilDescriptor& descriptor) = 0; + // Create a auto released blend state. + virtual BlendState* createBlendState(const BlendDescriptor& descriptor) = 0; + // Create a render pipeline, not auto released. + virtual RenderPipeline* newRenderPipeline(const RenderPipelineDescriptor& descriptor) = 0; + +protected: + // Create a auto released shader module. + virtual ShaderModule* newShaderModule(ShaderStage stage, const std::string& source) = 0; + // Create a auto released program. + virtual Program* newProgram(const std::string& vertexShader, const std::string& fragmentShader) = 0; + +private: + static Device* _instance; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Macros.h b/cocos/renderer/backend/Macros.h new file mode 100644 index 000000000000..404d4babbc68 --- /dev/null +++ b/cocos/renderer/backend/Macros.h @@ -0,0 +1,8 @@ +#pragma once + +#define CC_BACKEND_BEGIN namespace cocos2d{ namespace backend{ +#define CC_BACKEND_END }} + +#define MAX_COLOR_ATTCHMENT 1 + +#define MAX_INFLIGHT_BUFFER 3 diff --git a/cocos/renderer/backend/Program.cpp b/cocos/renderer/backend/Program.cpp new file mode 100644 index 000000000000..fe64db2d573e --- /dev/null +++ b/cocos/renderer/backend/Program.cpp @@ -0,0 +1,11 @@ +#include "Program.h" + +CC_BACKEND_BEGIN + +Program::Program(const std::string& vs, const std::string& fs) +: _vertexShader(vs) +, _fragmentShader(fs) +{ +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Program.h b/cocos/renderer/backend/Program.h new file mode 100644 index 000000000000..78787cf5bcc1 --- /dev/null +++ b/cocos/renderer/backend/Program.h @@ -0,0 +1,37 @@ +#pragma once + +#include "Macros.h" +#include "base/CCRef.h" +#include "platform/CCPlatformMacros.h" +#include "Types.h" +#include "ShaderCache.h" + +#include +#include + +CC_BACKEND_BEGIN + +class ShaderModule; + +class Program : public Ref +{ +public: + virtual const std::unordered_map& getVertexUniformInfos() const = 0; + virtual const std::unordered_map& getFragmentUniformInfos() const = 0; + + virtual UniformLocation getUniformLocation(const std::string& uniform) const = 0; + + virtual int getMaxVertexLocation() const = 0; + virtual int getMaxFragmentLocation() const = 0; + + const std::string& getVertexShader() const { return _vertexShader; } + const std::string& getFragmentShader() const { return _fragmentShader; } + +protected: + Program(const std::string& vs, const std::string& fs); + + std::string _vertexShader; + std::string _fragmentShader; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ProgramCache.cpp b/cocos/renderer/backend/ProgramCache.cpp new file mode 100644 index 000000000000..fded99511fa9 --- /dev/null +++ b/cocos/renderer/backend/ProgramCache.cpp @@ -0,0 +1,129 @@ +#include "ProgramCache.h" +#include "Device.h" +#include "ShaderModule.h" +#include "renderer/ccShaders.h" + +CC_BACKEND_BEGIN + +std::unordered_map ProgramCache::_cachedPrograms; +ProgramCache* ProgramCache::_sharedProgramCache = nullptr; + +ProgramCache* ProgramCache::getInstance() +{ + if(!_sharedProgramCache) + { + _sharedProgramCache = new (std::nothrow) ProgramCache(); + if(!_sharedProgramCache->init()) + { + CC_SAFE_RELEASE(_sharedProgramCache); + } + } + return _sharedProgramCache; +} + +void ProgramCache::destroyInstance() +{ + CC_SAFE_RELEASE_NULL(_sharedProgramCache); +} + +ProgramCache::~ProgramCache() +{ + for(auto& program : _cachedPrograms) + { + CC_SAFE_RELEASE(program.second); + } + CCLOGINFO("deallocing ProgramCache: %p", this); + ShaderCache::destroyInstance(); +} + +bool ProgramCache::init() +{ + addProgram(positionTextureColor_vert, positionTextureColor_frag); + addProgram(positionTextureColor_vert, etc1_frag); + addProgram(positionTextureColor_vert, label_distanceNormal_frag); + addProgram(positionTextureColor_vert, label_normal_frag); + addProgram(positionTextureColor_vert, labelOutline_frag); + addProgram(positionTextureColor_vert, labelDistanceFieldGlow_frag); + addProgram(positionTextureColor_vert, labelDistanceFieldGlow_frag); + addProgram(positionColorLengthTexture_vert, positionColorLengthTexture_frag); + addProgram(positionColorTextureAsPointsize_vert, positionColor_frag); + addProgram(positionColor_vert, positionColor_frag); + addProgram(position_vert, layer_radialGradient_frag); + addProgram(positionTexture_vert, positionTexture_frag); + addProgram(positionTextureColor_vert, positionTextureColorAlphaTest_frag); + addProgram(positionUColor_vert, positionUColor_frag); + return true; +} + +void ProgramCache::addProgram(const std::string& vertexShader, const std::string& fragmentShader) +{ + std::string shaderSource = vertexShader + fragmentShader; + auto key = std::hash{}(shaderSource); + auto program = backend::Device::getInstance()->newProgram(vertexShader, fragmentShader); + ProgramCache::_cachedPrograms.emplace(key, program); +} + +backend::Program* ProgramCache::newProgram(const std::string& vertexShader, const std::string& fragmentShader) +{ + std::string shaderSource = vertexShader + fragmentShader; + auto key = std::hash{}(shaderSource); + const auto& iter = ProgramCache::_cachedPrograms.find(key); + if (ProgramCache::_cachedPrograms.end() != iter) + { + CC_SAFE_RETAIN(iter->second); + return iter->second; + } + + auto program = backend::Device::getInstance()->newProgram(vertexShader, fragmentShader); + ProgramCache::_cachedPrograms.emplace(key, program); + + return program; +} + +void ProgramCache::removeProgram(backend::Program* program) +{ + if (!program) + { + return; + } + + for (auto it = _cachedPrograms.cbegin(); it != _cachedPrograms.cend();) + { + if (it->second == program) + { + it->second->release(); + it = _cachedPrograms.erase(it); + break; + } + else + ++it; + } +} + +void ProgramCache::removeUnusedProgram() +{ + for (auto iter = _cachedPrograms.cbegin(); iter != _cachedPrograms.cend();) + { + auto program = iter->second; + if (program->getReferenceCount() == 1) + { +// CCLOG("cocos2d: TextureCache: removing unused program"); + program->release(); + iter = _cachedPrograms.erase(iter); + } + else + { + ++iter; + } + } +} + +void ProgramCache::removeAllProgram() +{ + for (auto& program : _cachedPrograms) { + program.second->release(); + } + _cachedPrograms.clear(); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ProgramCache.h b/cocos/renderer/backend/ProgramCache.h new file mode 100644 index 000000000000..a95150fbec6a --- /dev/null +++ b/cocos/renderer/backend/ProgramCache.h @@ -0,0 +1,38 @@ +#pragma once + +#include "Macros.h" +#include "base/CCRef.h" +#include "platform/CCPlatformMacros.h" +#include "Program.h" + +#include +#include + +CC_BACKEND_BEGIN + +class ProgramCache : public Ref +{ +public: + /** returns the shared instance */ + static ProgramCache* getInstance(); + + /** purges the cache. It releases the retained instance. */ + static void destroyInstance(); + + backend::Program* newProgram(const std::string& vertexShader, const std::string& fragmentShader); + void removeProgram(backend::Program* program); + void removeUnusedProgram(); + void removeAllProgram(); + +protected: + ProgramCache() = default; + virtual ~ProgramCache(); + + bool init(); + void addProgram(const std::string& vertexShader, const std::string& fragmentShader); + + static std::unordered_map _cachedPrograms; + static ProgramCache *_sharedProgramCache; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ProgramState.cpp b/cocos/renderer/backend/ProgramState.cpp new file mode 100644 index 000000000000..cc9e508b7458 --- /dev/null +++ b/cocos/renderer/backend/ProgramState.cpp @@ -0,0 +1,236 @@ +#include "renderer/backend/ProgramState.h" +#include "renderer/backend/ProgramCache.h" +#include "renderer/backend/Program.h" +#include "renderer/backend/Texture.h" + +CC_BACKEND_BEGIN + +UniformBuffer::UniformBuffer(backend::UniformInfo _uniformInfo) +: uniformInfo(_uniformInfo) +, dirty(false) +{ + if(uniformInfo.bufferSize) + { + data = malloc(uniformInfo.bufferSize); + if (data) + memset(data, 0, uniformInfo.bufferSize); + } +} + +UniformBuffer::~UniformBuffer() +{ + if (data) + free(data); +} + +UniformBuffer& UniformBuffer::operator=(UniformBuffer&& rhs) +{ + if (this != &rhs) + { + uniformInfo = rhs.uniformInfo; + data = rhs.data; + rhs.data = nullptr; + } + + return *this; +} + +TextureInfo::TextureInfo(const std::vector& _slots, const std::vector _textures) +: slot(_slots) +, textures(_textures) +{ + retainTextures(); +} + +TextureInfo::~TextureInfo() +{ + releaseTextures(); +} + +void TextureInfo::retainTextures() +{ + for (auto& texture : textures) + CC_SAFE_RETAIN(texture); +} + +void TextureInfo::releaseTextures() +{ + for (auto& texture : textures) + CC_SAFE_RELEASE(texture); +} + +TextureInfo& TextureInfo::operator=(TextureInfo&& rhs) +{ + if (this != &rhs) + { + slot = rhs.slot; + + rhs.retainTextures(); + releaseTextures(); + textures = rhs.textures; + + //release the textures before cleaning the vertor + rhs.releaseTextures(); + rhs.textures.clear(); + } + return *this; +} + +ProgramState::ProgramState(const std::string& vertexShader, const std::string& fragmentShader) +{ + _program = backend::ProgramCache::getInstance()->newProgram(vertexShader, fragmentShader); + CC_SAFE_RETAIN(_program); + + auto maxVertexLocaiton = _program->getMaxVertexLocation(); + auto maxFragmentLocaiton = _program->getMaxFragmentLocation(); + + if(maxVertexLocaiton > 0) + { + assert(maxVertexLocaiton); + _vertexUniformInfos.resize(maxVertexLocaiton); + createVertexUniformBuffer(); + } + + if(maxFragmentLocaiton > 0) + { + _fragmentUniformInfos.resize(maxFragmentLocaiton); + createFragmentUniformBuffer(); + } +} + +ProgramState::~ProgramState() +{ + CC_SAFE_RELEASE(_program); + + _vertexUniformInfos.clear(); + _fragmentUniformInfos.clear(); + _vertexTextureInfos.clear(); + _fragmentTextureInfos.clear(); +} + +void ProgramState::createVertexUniformBuffer() +{ + const auto& vertexUniformInfos = _program->getVertexUniformInfos(); + for(const auto& uniformInfo : vertexUniformInfos) + { + if(uniformInfo.second.bufferSize) + _vertexUniformInfos[uniformInfo.second.location] = uniformInfo.second; + } +} + +void ProgramState::createFragmentUniformBuffer() +{ + const auto& fragmentUniformInfos = _program->getFragmentUniformInfos(); + for(const auto& uniformInfo : fragmentUniformInfos) + { + if(uniformInfo.second.bufferSize) + _fragmentUniformInfos[uniformInfo.second.location] = uniformInfo.second; + } +} + +backend::UniformLocation ProgramState::getUniformLocation(const std::string& uniform) const +{ + return _program->getUniformLocation(uniform); +} + +void ProgramState::setUniform(const backend::UniformLocation& uniformLocation, const void* data, uint32_t size) +{ + switch (uniformLocation.shaderStage) + { + case backend::ShaderStage::VERTEX: + setVertexUniform(uniformLocation.location, data, size); + break; + case backend::ShaderStage::FRAGMENT: + setFragmentUniform(uniformLocation.location, data, size); + break; + case backend::ShaderStage::VERTEX_AND_FRAGMENT: + setVertexUniform(uniformLocation.location, data, size); + setFragmentUniform(uniformLocation.location, data, size); + break; + default: + break; + } +} + +void ProgramState::setVertexUniform(int location, const void* data, uint32_t size) +{ + if(location < 0) + return; + + assert(size <= _vertexUniformInfos[location].uniformInfo.bufferSize); + memcpy(_vertexUniformInfos[location].data, data, size); + _vertexUniformInfos[location].dirty = true; +} + +void ProgramState::setFragmentUniform(int location, const void* data, uint32_t size) +{ + if(location < 0) + return; + + assert(size <= _fragmentUniformInfos[location].uniformInfo.bufferSize); + memcpy(_fragmentUniformInfos[location].data, data, size); + _fragmentUniformInfos[location].dirty = true; +} + +void ProgramState::setTexture(const backend::UniformLocation& uniformLocation, uint32_t slot, backend::Texture* texture) +{ + switch (uniformLocation.shaderStage) + { + case backend::ShaderStage::VERTEX: + setTexture(uniformLocation.location, slot, texture, _vertexTextureInfos); + break; + case backend::ShaderStage::FRAGMENT: + setTexture(uniformLocation.location, slot, texture, _fragmentTextureInfos); + break; + case backend::ShaderStage::VERTEX_AND_FRAGMENT: + setTexture(uniformLocation.location, slot, texture, _vertexTextureInfos); + setTexture(uniformLocation.location, slot, texture, _fragmentTextureInfos); + break; + default: + break; + } +} + +void ProgramState::setTextureArray(const backend::UniformLocation& uniformLocation, const std::vector& slots, const std::vector textures) +{ + switch (uniformLocation.shaderStage) + { + case backend::ShaderStage::VERTEX: + setTextureArray(uniformLocation.location, slots, textures, _vertexTextureInfos); + break; + case backend::ShaderStage::FRAGMENT: + setTextureArray(uniformLocation.location, slots, textures, _fragmentTextureInfos); + break; + case backend::ShaderStage::VERTEX_AND_FRAGMENT: + setTextureArray(uniformLocation.location, slots, textures, _vertexTextureInfos); + setTextureArray(uniformLocation.location, slots, textures, _fragmentTextureInfos); + break; + default: + break; + } +} + +void ProgramState::setTexture(int location, uint32_t slot, backend::Texture* texture, std::unordered_map& textureInfo) +{ + if(location < 0) + return; + + TextureInfo info; + info.slot = {slot}; + info.textures = {texture}; + info.retainTextures(); + textureInfo[location] = std::move(info); +} + +void ProgramState::setTextureArray(int location, const std::vector& slots, const std::vector textures, std::unordered_map& textureInfo) +{ + assert(slots.size() == textures.size()); + TextureInfo info; + info.slot = slots; + info.textures = textures; + info.retainTextures(); + textureInfo[location] = std::move(info); +} + +CC_BACKEND_END + diff --git a/cocos/renderer/backend/ProgramState.h b/cocos/renderer/backend/ProgramState.h new file mode 100644 index 000000000000..744d9dccb1be --- /dev/null +++ b/cocos/renderer/backend/ProgramState.h @@ -0,0 +1,82 @@ +#pragma once + +#include +#include +#include + +#include "platform/CCPlatformMacros.h" +#include "base/CCRef.h" +#include "renderer/backend/Types.h" + +CC_BACKEND_BEGIN + +class Program; +class Texture; + +struct UniformBuffer +{ + UniformBuffer(backend::UniformInfo _uniformInfo); + UniformBuffer() = default; + UniformBuffer(const UniformBuffer& _uniformBuffer) = default; + ~UniformBuffer(); + UniformBuffer& operator =(UniformBuffer&& rhs); + + backend::UniformInfo uniformInfo; + bool dirty = false; + void* data = nullptr; +}; + +struct TextureInfo +{ + TextureInfo(const std::vector& _slots, const std::vector _textures); + TextureInfo() = default; + ~TextureInfo(); + TextureInfo& operator=(TextureInfo&& rhs); + + void retainTextures(); + void releaseTextures(); + + std::vector slot; + std::vector textures; +}; + +class ProgramState : public Ref +{ +public: + ProgramState(const std::string& vertexShader, const std::string& fragmentShader); + virtual ~ProgramState(); + + //get program + backend::Program* getProgram() const { return _program; } + + //get or set uniforms + void setUniform(const backend::UniformLocation& uniformLocation, const void* data, uint32_t size); + backend::UniformLocation getUniformLocation(const std::string& uniform) const; + inline const std::vector& getVertexUniformInfos() const { return _vertexUniformInfos; } + inline const std::vector& getFragmentUniformInfos() const { return _fragmentUniformInfos; } + + //set textures + void setTexture(const backend::UniformLocation& uniformLocation, uint32_t slot, backend::Texture* texture); + void setTextureArray(const backend::UniformLocation& uniformLocation, const std::vector& slots, const std::vector textures); + + inline const std::unordered_map& getVertexTextureInfos() const { return _vertexTextureInfos; } + inline const std::unordered_map& getFragmentTextureInfos() const { return _fragmentTextureInfos; } + +protected: + void setVertexUniform(int location, const void* data, uint32_t size); + void setFragmentUniform(int location, const void* data, uint32_t size); + void createVertexUniformBuffer(); + void createFragmentUniformBuffer(); + void setTexture(int location, uint32_t slot, backend::Texture* texture, std::unordered_map& textureInfo); + void setTextureArray(int location, const std::vector& slots, const std::vector textures, std::unordered_map& textureInfo); + + backend::Program* _program = nullptr; + std::vector _vertexUniformInfos; + std::vector _fragmentUniformInfos; + + std::unordered_map _vertexTextureInfos; + std::unordered_map _fragmentTextureInfos; + +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/RenderPassDescriptor.h b/cocos/renderer/backend/RenderPassDescriptor.h new file mode 100644 index 000000000000..a2250d0fe700 --- /dev/null +++ b/cocos/renderer/backend/RenderPassDescriptor.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include + +#include "Macros.h" +#include "Types.h" + +CC_BACKEND_BEGIN + +class Texture; + +struct RenderPassDescriptor +{ + float clearDepthValue = 0.f; + float clearStencilValue = 0.f; + std::array clearColorValue {{0.f, 0.f, 0.f, 0.f}}; // double-braces required in C++11 + bool needColorAttachment = true; + bool needDepthAttachment = false; + bool needStencilAttachment = false; + bool needClearColor = false; + bool needClearDepth = false; + bool needClearStencil = false; + Texture* depthAttachmentTexture = nullptr; + Texture* stencilAttachmentTexture = nullptr; + Texture* colorAttachmentsTexture[MAX_COLOR_ATTCHMENT] = { nullptr }; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/RenderPipeline.h b/cocos/renderer/backend/RenderPipeline.h new file mode 100644 index 000000000000..436e3f9b8f98 --- /dev/null +++ b/cocos/renderer/backend/RenderPipeline.h @@ -0,0 +1,16 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" + +#include "base/CCRef.h" + +CC_BACKEND_BEGIN + +class RenderPipeline : public cocos2d::Ref +{ +protected: + virtual ~RenderPipeline() = default; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/RenderPipelineDescriptor.h b/cocos/renderer/backend/RenderPipelineDescriptor.h new file mode 100644 index 000000000000..537f522a8236 --- /dev/null +++ b/cocos/renderer/backend/RenderPipelineDescriptor.h @@ -0,0 +1,26 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "VertexLayout.h" +#include "renderer/backend/ProgramState.h" + +#include + +CC_BACKEND_BEGIN + +class DepthStencilState; +class BlendState; + +struct RenderPipelineDescriptor +{ + ProgramState* programState = nullptr; + DepthStencilState* depthStencilState = nullptr; + BlendState* blendState = nullptr; + std::vector vertexLayouts; + TextureFormat colorAttachmentsFormat[MAX_COLOR_ATTCHMENT] = { TextureFormat::SYSTEM_DEFAULT }; + TextureFormat depthAttachmentFormat = TextureFormat::NONE; + TextureFormat stencilAttachmentFormat = TextureFormat::NONE; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ShaderCache.cpp b/cocos/renderer/backend/ShaderCache.cpp new file mode 100644 index 000000000000..f0586e18366a --- /dev/null +++ b/cocos/renderer/backend/ShaderCache.cpp @@ -0,0 +1,108 @@ +/**************************************************************************** + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "ShaderCache.h" +#include "renderer/backend/Device.h" + +CC_BACKEND_BEGIN + +std::unordered_map ShaderCache::_cachedShaders; +ShaderCache* ShaderCache::_sharedShaderCache = nullptr; + +ShaderCache* ShaderCache::getInstance() +{ + if(!_sharedShaderCache) + { + _sharedShaderCache = new (std::nothrow) ShaderCache(); + if(!_sharedShaderCache->init()) + { + CC_SAFE_RELEASE(_sharedShaderCache); + } + } + return _sharedShaderCache; +} + +void ShaderCache::destroyInstance() +{ + CC_SAFE_RELEASE_NULL(_sharedShaderCache); +} + +ShaderCache::~ShaderCache() +{ + for(auto& shaderModule : _cachedShaders) + { + CC_SAFE_RELEASE(shaderModule.second); + } + CCLOGINFO("deallocing ProgramCache: %p", this); +} + +bool ShaderCache::init() +{ + return true; +} + +backend::ShaderModule* ShaderCache::newVertexShaderModule(const std::string& shaderSource) +{ + auto vertexShaderModule = newShaderModule(backend::ShaderStage::VERTEX, shaderSource); + return vertexShaderModule; +} + +backend::ShaderModule* ShaderCache::newFragmentShaderModule(const std::string& shaderSource) +{ + auto fragmenShaderModule = newShaderModule(backend::ShaderStage::FRAGMENT, shaderSource); + return fragmenShaderModule; +} + +backend::ShaderModule* ShaderCache::newShaderModule(backend::ShaderStage stage, const std::string& shaderSource) +{ + std::size_t key = std::hash{}(shaderSource); + auto iter = _cachedShaders.find(key); + if (_cachedShaders.end() != iter) + return iter->second; + + auto shader = backend::Device::getInstance()->newShaderModule(stage, shaderSource); + _cachedShaders.emplace(key, shader); + + return shader; +} + +void ShaderCache::removeUnusedShader() +{ + for (auto iter = _cachedShaders.cbegin(); iter != _cachedShaders.cend();) + { + auto shaderModule = iter->second; + if (shaderModule->getReferenceCount() == 1) + { + // CCLOG("cocos2d: TextureCache: removing unused program"); + shaderModule->release(); + iter = _cachedShaders.erase(iter); + } + else + { + ++iter; + } + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ShaderCache.h b/cocos/renderer/backend/ShaderCache.h new file mode 100644 index 000000000000..fc9807edf19a --- /dev/null +++ b/cocos/renderer/backend/ShaderCache.h @@ -0,0 +1,69 @@ +/**************************************************************************** + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#pragma once + +#include "Macros.h" +#include "base/CCRef.h" +#include "platform/CCPlatformMacros.h" +#include "renderer/backend/ShaderModule.h" + +#include +#include + +CC_BACKEND_BEGIN + +class ShaderCache : public Ref +{ +public: + /** returns the shared instance */ + static ShaderCache* getInstance(); + + /** purges the cache. It releases the retained instance. */ + static void destroyInstance(); + + /** Create a vertex shader module. + @param key A key to identify a shader module. If it is created before, then just return the cached shader module. + @param shaderSource The source code of the shader. + */ + static backend::ShaderModule* newVertexShaderModule(const std::string& shaderSource); + + /** Create a fragment shader module. + @param key A key to identify a shader module. If it is created before, then just return the cached shader module. + @param shaderSource The source code of the shader. + */ + static backend::ShaderModule* newFragmentShaderModule(const std::string& shaderSource); + + void removeUnusedShader(); + +protected: + virtual ~ShaderCache(); + + bool init(); + static backend::ShaderModule* newShaderModule(backend::ShaderStage stage, const std::string& shaderSource); + + static std::unordered_map _cachedShaders; + static ShaderCache* _sharedShaderCache; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ShaderModule.cpp b/cocos/renderer/backend/ShaderModule.cpp new file mode 100644 index 000000000000..d4dafd83bf1f --- /dev/null +++ b/cocos/renderer/backend/ShaderModule.cpp @@ -0,0 +1,18 @@ +#include "ShaderModule.h" + +CC_BACKEND_BEGIN + +ShaderStage ShaderModule::getShaderStage() const +{ + return _stage; +} + +ShaderModule::ShaderModule(ShaderStage stage): +_stage(stage) +{ +} + +ShaderModule::~ShaderModule() +{} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/ShaderModule.h b/cocos/renderer/backend/ShaderModule.h new file mode 100644 index 000000000000..498cd76492fd --- /dev/null +++ b/cocos/renderer/backend/ShaderModule.h @@ -0,0 +1,23 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "base/CCRef.h" + +#include + +CC_BACKEND_BEGIN + +class ShaderModule : public cocos2d::Ref +{ +public: + ShaderStage getShaderStage() const; + +protected: + ShaderModule(ShaderStage stage); + virtual ~ShaderModule(); + + ShaderStage _stage = ShaderStage::VERTEX; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/StringUtils.cpp b/cocos/renderer/backend/StringUtils.cpp new file mode 100644 index 000000000000..29d2c967ac82 --- /dev/null +++ b/cocos/renderer/backend/StringUtils.cpp @@ -0,0 +1,253 @@ +// +// StringUtils.cpp +// Test +// +// Created by Cocos on 2018/11/2. +// Copyright © 2018 cocos. All rights reserved. +// + +#include "StringUtils.h" + +CC_BACKEND_BEGIN + +std::string StringUtils::TextureFormat2String(const TextureFormat& textureFormat) +{ + switch (textureFormat) { + case TextureFormat::R8G8B8A8: + return "R8G8B8A8"; + case TextureFormat::R8G8B8: + return "R8G8B8"; + case TextureFormat::A8: + return "A8"; + default: + return ""; + } +} + +std::string StringUtils::TextureType2String(const TextureType& textureType) +{ + switch (textureType) { + case TextureType::TEXTURE_2D: + return "TEXTURE_2D"; + case TextureType::TEXTURE_CUBE: + return "TEXTURE_CUBE"; + default: + return ""; + } +} + +std::string StringUtils::TextureUsage2String(const TextureUsage& textureUsage) +{ + switch (textureUsage) { + case TextureUsage::READ: + return "READ"; + case TextureUsage::WRITE: + return "WRITE"; + case TextureUsage::RENDER_TARGET: + return "RENDER_TARGET"; + default: + return ""; + } +} + +std::string StringUtils::SamplerFilterType2String(const SamplerFilter& filterType) +{ + switch (filterType) { + case SamplerFilter::LINEAR: + return "LINEAR"; + case SamplerFilter::NEAREST: + return "NEAREST"; + default: + return ""; + } +} + +std::string StringUtils::SamplerAddressMode2String(const SamplerAddressMode& addressMode) +{ + switch (addressMode) { + case SamplerAddressMode::REPEAT: + return "REPEAT"; + case SamplerAddressMode::MIRROR_REPEAT: + return "MIRROR_REPEAT"; + case SamplerAddressMode::CLAMP_TO_EDGE: + return "CLAMP_TO_EDGE"; + default: + return ""; + } +} + +std::string StringUtils::SamplerDescriptor2String(const SamplerDescriptor& descriptor) +{ + std::string samplerInfo = descriptor.mipmapEnabled ? "mipmapEnable":"mipmapDisable"; + samplerInfo += SamplerFilterType2String(descriptor.magFilter); + samplerInfo += SamplerFilterType2String(descriptor.minFilter); + samplerInfo += SamplerFilterType2String(descriptor.mipmapFilter); + samplerInfo += SamplerAddressMode2String(descriptor.sAddressMode); + samplerInfo += SamplerAddressMode2String(descriptor.tAddressMode); + return samplerInfo; +} + +std::string StringUtils::StencilOperation2String(const StencilOperation& operation) +{ + switch (operation) { + case StencilOperation::KEEP: + return "KEEP"; + case StencilOperation::ZERO: + return "ZERO"; + case StencilOperation::REPLACE: + return "REPLACE"; + case StencilOperation::INVERT: + return "INVERT"; + case StencilOperation::INCREMENT_WRAP: + return "INCREMENT_WRAP"; + case StencilOperation::DECREMENT_WRAP: + return "DECREMENT_WRAP"; + default: + return ""; + } +} + +std::string StringUtils::CompareFunction2String(const CompareFunction& compareFunction) +{ + switch (compareFunction) { + case CompareFunction::NEVER: + return "NEVER"; + case CompareFunction::LESS: + return "LESS"; + case CompareFunction::LESS_EQUAL: + return "LESS_EQUAL"; + case CompareFunction::GREATER: + return "GREATER"; + case CompareFunction::GREATER_EQUAL: + return "GREATER_EQUAL"; + case CompareFunction::EQUAL: + return "EQUAL"; + case CompareFunction::NOT_EQUAL: + return "NOT_EQUAL"; + case CompareFunction::ALWAYS: + return "ALWAYS"; + default: + return ""; + } +} + +std::string StringUtils::ColorWriteMask2String(const ColorWriteMask& colorWriteMask) +{ + switch (colorWriteMask) { + case ColorWriteMask::NONE: + return "NONE"; + case ColorWriteMask::RED: + return "RED"; + case ColorWriteMask::GREEN: + return "GREEN"; + case ColorWriteMask::BLUE: + return "BLUE"; + case ColorWriteMask::ALPHA: + return "ALPHA"; + case ColorWriteMask::ALL: + return "ALL"; + default: + return ""; + } +} + +std::string StringUtils::BlendOperation2String(const BlendOperation& blendOperation) +{ + switch (blendOperation) { + case BlendOperation::ADD: + return "ADD"; + case BlendOperation::SUBTRACT: + return "SUBTRACT"; + case BlendOperation::RESERVE_SUBTRACT: + return "RESERVE_SUBTRACT"; + default: + return ""; + } +} + +std::string StringUtils::BlendFactor2String(const BlendFactor& blendFactor) +{ + switch (blendFactor) { + case BlendFactor::ZERO: + return "ZERO"; + case BlendFactor::ONE: + return "ONE"; + case BlendFactor::SRC_COLOR: + return "SRC_COLOR"; + case BlendFactor::ONE_MINUS_SRC_COLOR: + return "ONE_MINUS_SRC_COLOR"; + case BlendFactor::SRC_ALPHA: + return "SRC_ALPHA"; + case BlendFactor::ONE_MINUS_SRC_ALPHA: + return "ONE_MINUS_SRC_ALPHA"; + case BlendFactor::DST_COLOR: + return "DST_COLOR"; + case BlendFactor::ONE_MINUS_DST_COLOR: + return "ONE_MINUS_DST_COLOR"; + case BlendFactor::DST_ALPHA: + return "DST_ALPHA"; + case BlendFactor::ONE_MINUS_DST_ALPHA: + return "ONE_MINUS_DST_ALPHA"; + case BlendFactor::SRC_ALPHA_SATURATE: + return "SRC_ALPHA_SATURATE"; + case BlendFactor::BLEND_CLOLOR: + return "BLEND_CLOLOR"; + default: + return ""; + } +} + +TextureFormat StringUtils::PixelFormat2TextureFormat(const PixelFormat& pixleFormat) +{ + switch (pixleFormat) { + case PixelFormat::RGBA8888: + return TextureFormat::R8G8B8A8; + case PixelFormat::RGB888: + return TextureFormat::R8G8B8; + case PixelFormat::A8: + return TextureFormat::A8; + case PixelFormat::RGBA4444: + return TextureFormat::RGBA4444; + case PixelFormat::I8: + return TextureFormat::I8; + case PixelFormat::AI88: + return TextureFormat::AI88; + case PixelFormat::RGB565: + return TextureFormat::RGB565; + case PixelFormat::RGB5A1: + return TextureFormat::RGB5A1; + case PixelFormat::ETC: + return TextureFormat::ETC1; + case PixelFormat::ATC_RGB: + return TextureFormat::ATC_RGB; + case PixelFormat::ATC_EXPLICIT_ALPHA: + return TextureFormat::ATC_EXPLICIT_ALPHA; + case PixelFormat::ATC_INTERPOLATED_ALPHA: + return TextureFormat::ATC_INTERPOLATED_ALPHA; + case PixelFormat::PVRTC2: + return TextureFormat::PVRTC2; + case PixelFormat::PVRTC2A: + return TextureFormat::PVRTC2A; + case PixelFormat::PVRTC4: + return TextureFormat::PVRTC4; + case PixelFormat::PVRTC4A: + return TextureFormat::PVRTC4A; + case PixelFormat::S3TC_DXT1: + return TextureFormat::S3TC_DXT1; + case PixelFormat::S3TC_DXT3: + return TextureFormat::S3TC_DXT3; + case PixelFormat::S3TC_DXT5: + return TextureFormat::S3TC_DXT5; + case PixelFormat::MTL_ABGR4: + return TextureFormat::MTL_ABGR4; + case PixelFormat::MTL_BGR5A1: + return TextureFormat::MTL_BGR5A1; + case PixelFormat::MTL_B5G6R5: + return TextureFormat::MTL_B5G6R5; + default: + return TextureFormat::NONE; + break; + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/StringUtils.h b/cocos/renderer/backend/StringUtils.h new file mode 100644 index 000000000000..ed08955c6d8d --- /dev/null +++ b/cocos/renderer/backend/StringUtils.h @@ -0,0 +1,91 @@ +// +// StringUtils.hpp +// Test +// +// Created by Cocos on 2018/11/2. +// Copyright © 2018 cocos. All rights reserved. +// + +#ifndef StringUtils_hpp +#define StringUtils_hpp + +#include +#include "Types.h" +CC_BACKEND_BEGIN + +class StringUtils +{ +public: + enum class PixelFormat + { + //! auto detect the type + AUTO, + //! 32-bit texture: BGRA8888 + BGRA8888, + //! 32-bit texture: RGBA8888 + RGBA8888, + //! 24-bit texture: RGBA888 + RGB888, + //! 16-bit texture without Alpha channel + RGB565, + //! 8-bit textures used as masks + A8, + //! 8-bit intensity texture + I8, + //! 16-bit textures used as masks + AI88, + //! 16-bit textures: RGBA4444 + RGBA4444, + //! 16-bit textures: RGB5A1 + RGB5A1, + //! 4-bit PVRTC-compressed texture: PVRTC4 + PVRTC4, + //! 4-bit PVRTC-compressed texture: PVRTC4 (has alpha channel) + PVRTC4A, + //! 2-bit PVRTC-compressed texture: PVRTC2 + PVRTC2, + //! 2-bit PVRTC-compressed texture: PVRTC2 (has alpha channel) + PVRTC2A, + //! ETC-compressed texture: ETC + ETC, + //! S3TC-compressed texture: S3TC_Dxt1 + S3TC_DXT1, + //! S3TC-compressed texture: S3TC_Dxt3 + S3TC_DXT3, + //! S3TC-compressed texture: S3TC_Dxt5 + S3TC_DXT5, + //! ATITC-compressed texture: ATC_RGB + ATC_RGB, + //! ATITC-compressed texture: ATC_EXPLICIT_ALPHA + ATC_EXPLICIT_ALPHA, + //! ATITC-compressed texture: ATC_INTERPOLATED_ALPHA + ATC_INTERPOLATED_ALPHA, + //! Default texture format: AUTO + + //metal 16-bits packed pixel formats + MTL_B5G6R5, + //MTL_A1BGR5, + MTL_BGR5A1, + MTL_ABGR4, + + DEFAULT = AUTO, + + NONE = -1 + }; + + static std::string TextureFormat2String(const TextureFormat& textureFormat); + static std::string TextureType2String(const TextureType& textureType); + static std::string TextureUsage2String(const TextureUsage& textureUsage); + static std::string SamplerFilterType2String(const SamplerFilter& filterType); + static std::string SamplerAddressMode2String(const SamplerAddressMode& addressMode); + static std::string SamplerDescriptor2String(const SamplerDescriptor& descriptor); + static std::string StencilOperation2String(const StencilOperation& operation); + static std::string CompareFunction2String(const CompareFunction& compareFunction); + static std::string ColorWriteMask2String(const ColorWriteMask& colorWriteMask); + static std::string BlendOperation2String(const BlendOperation& blendOperation); + static std::string BlendFactor2String(const BlendFactor& blendFactor); + static TextureFormat PixelFormat2TextureFormat(const PixelFormat& pixleFormat); +}; + +CC_BACKEND_END +#endif /* StringUtils_hpp */ diff --git a/cocos/renderer/backend/Texture.cpp b/cocos/renderer/backend/Texture.cpp new file mode 100644 index 000000000000..79b7d6ad1e1e --- /dev/null +++ b/cocos/renderer/backend/Texture.cpp @@ -0,0 +1,80 @@ +#include "Texture.h" +#include +CC_BACKEND_BEGIN + +#define byte(n) ((n) * 8) +#define bit(n) (n) +namespace +{ + uint8_t computeBitsPerElement(TextureFormat textureFormat) + { + switch (textureFormat) + { + case TextureFormat::R8G8B8A8: + return byte(4); + case TextureFormat::R8G8B8: + return byte(3); + case TextureFormat::RGBA4444: + return byte(2); + case TextureFormat::A8: + return byte(1); + case TextureFormat::I8: + return byte(1); + case TextureFormat::RGB565: + return byte(2); + case TextureFormat::RGB5A1: + return byte(2); + case TextureFormat::AI88: + return byte(2); + case TextureFormat::ETC1: + return bit(4); + case TextureFormat::ATC_RGB: + return bit(4); + case TextureFormat::ATC_EXPLICIT_ALPHA: + return byte(1); + case TextureFormat::ATC_INTERPOLATED_ALPHA: + return byte(1); + case TextureFormat::PVRTC2: + return bit(2); + case TextureFormat::PVRTC2A: + return bit(2); + case TextureFormat::PVRTC4: + return bit(4); + case TextureFormat::PVRTC4A: + return bit(4); + case TextureFormat::S3TC_DXT1: + return bit(4); + case TextureFormat::S3TC_DXT3: + return byte(1); + case TextureFormat::S3TC_DXT5: + return byte(1); + case TextureFormat::MTL_BGR5A1: + return byte(2); + case TextureFormat::MTL_B5G6R5: + return byte(2); + case TextureFormat::MTL_ABGR4: + return byte(2); + default: + assert(false); //"textureFormat pixel size in bytes not defined!"; + break; + } + return 0; + } +} + +Texture::Texture(const TextureDescriptor& descriptor) +: _width(descriptor.width) +, _height(descriptor.height) +, _textureType(descriptor.textureType) +, _textureFormat(descriptor.textureFormat) +, _bitsPerElement(computeBitsPerElement(descriptor.textureFormat)) +, _isMipmapEnabled(descriptor.samplerDescriptor.mipmapEnabled) +, _textureUsage(descriptor.textureUsage) +, _isCompressed(descriptor.compressed) +{ +} + +Texture::~Texture() +{} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Texture.h b/cocos/renderer/backend/Texture.h new file mode 100644 index 000000000000..46cf90601cb3 --- /dev/null +++ b/cocos/renderer/backend/Texture.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Types.h" +#include "base/CCRef.h" +#include + +CC_BACKEND_BEGIN + +struct TextureDescriptor +{ + TextureType textureType = TextureType::TEXTURE_2D; + TextureFormat textureFormat = TextureFormat::R8G8B8A8; + TextureUsage textureUsage = TextureUsage::READ; + uint32_t width = 0; + uint32_t height = 0; + uint32_t depth = 0; + bool compressed = false; + + SamplerDescriptor samplerDescriptor; +}; + +class Texture : public cocos2d::Ref +{ +public: + virtual void updateData(uint8_t* data) = 0; + virtual void updateSubData(uint32_t xoffset, uint32_t yoffset, uint32_t width, uint32_t height, uint8_t* data) = 0; + + virtual void updateSamplerDescriptor(const SamplerDescriptor &sampler) = 0; + + inline TextureFormat getTextureFormat() const { return _textureFormat; } + inline TextureUsage getTextureUsage() const { return _textureUsage; } + inline uint32_t getWidth() const { return _width; } + inline uint32_t getHeight() const { return _height; } +protected: + Texture(const TextureDescriptor& descriptor); + virtual ~Texture(); + + uint32_t _width = 0; + uint32_t _height = 0; + // The bytes of all components. + uint8_t _bitsPerElement = 0; + TextureType _textureType = TextureType::TEXTURE_2D; + TextureFormat _textureFormat = TextureFormat::R8G8B8; + TextureUsage _textureUsage = TextureUsage::READ; + bool _isMipmapEnabled = false; + bool _isCompressed = false; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/Types.h b/cocos/renderer/backend/Types.h new file mode 100644 index 000000000000..5b3a81e1b89a --- /dev/null +++ b/cocos/renderer/backend/Types.h @@ -0,0 +1,229 @@ +#pragma once + +#include "Macros.h" + +#include + +CC_BACKEND_BEGIN + +enum class BufferUsage : uint32_t +{ + STATIC, + DYNAMIC +}; + +enum class BufferType : uint32_t +{ + VERTEX, + INDEX +}; + +enum class ShaderStage : uint32_t +{ + VERTEX, + FRAGMENT, + VERTEX_AND_FRAGMENT +}; + +//TODO: simplify name +enum class VertexFormat : uint32_t +{ + FLOAT_R32G32B32A32, + FLOAT_R32G32B32, + FLOAT_R32G32, + FLOAT_R32, + INT_R32G32B32A32, + INT_R32G32B32, + INT_R32G32, + INT_R32, + USHORT_R16G16B16A16, + USHORT_R16G16, + UBYTE_R8G8B8A8, + UNORM_R8G8B8A8, + UNORM_R8G8 +}; + +enum class TextureFormat : uint32_t +{ + NONE, + // Four 8-bit normalized unsigned integer components in RGBA order. + R8G8B8A8, + // Three 8-bit normalized unsigned integer components in RGB order. + R8G8B8, + // One 8-bit normalized unsigned integer component. + A8, + // A packed 32-bit combined depth and stencil pixel format with two nomorlized unsigned integer + // components: 24 bits, typically used for a depth render target, and 8 bits, typically used for + // a stencil render target. + D24S8, + I8, + AI88, + RGBA4444, + RGB565, + RGB5A1, + //metal 16 bits pixel formats + MTL_B5G6R5, + //MTL_A1BGR5, + MTL_BGR5A1, + MTL_ABGR4, + // compressed format + ETC1, + ATC_RGB, + ATC_EXPLICIT_ALPHA, + ATC_INTERPOLATED_ALPHA, + PVRTC2, + PVRTC2A, + PVRTC4, + PVRTC4A, + S3TC_DXT1, + S3TC_DXT3, + S3TC_DXT5, + SYSTEM_DEFAULT +}; + +enum class TextureUsage : uint32_t +{ + READ, + WRITE, + RENDER_TARGET +}; + +enum class IndexFormat : uint32_t +{ + U_SHORT, + U_INT +}; + +enum class VertexStepMode : uint32_t +{ + VERTEX, + INSTANCE +}; + +enum class PrimitiveType : uint32_t +{ + POINT, + LINE, + LINE_STRIP, + TRIANGLE, + TRIANGLE_STRIP +}; + +enum class TextureType: uint32_t +{ + TEXTURE_2D, + TEXTURE_CUBE +}; + +enum class SamplerAddressMode: uint32_t +{ + REPEAT, + MIRROR_REPEAT, + CLAMP_TO_EDGE, + DONT_CARE, +}; + +enum class SamplerFilter: uint32_t +{ + NEAREST, + LINEAR, + DONT_CARE, +}; + +enum class StencilOperation: uint32_t +{ + KEEP, + ZERO, + REPLACE, + INVERT, + INCREMENT_WRAP, + DECREMENT_WRAP +}; + +enum class CompareFunction: uint32_t +{ + NEVER, + LESS, + LESS_EQUAL, + GREATER, + GREATER_EQUAL, + EQUAL, + NOT_EQUAL, + ALWAYS +}; + +enum class BlendOperation: uint32_t +{ + ADD, + SUBTRACT, + RESERVE_SUBTRACT +}; + +enum class BlendFactor : uint32_t +{ + ZERO, + ONE, + SRC_COLOR, + ONE_MINUS_SRC_COLOR, + SRC_ALPHA, + ONE_MINUS_SRC_ALPHA, + DST_COLOR, + ONE_MINUS_DST_COLOR, + DST_ALPHA, + ONE_MINUS_DST_ALPHA, + SRC_ALPHA_SATURATE, + BLEND_CLOLOR +}; + +enum class ColorWriteMask: uint32_t +{ + NONE = 0x00000000, + RED = 0x00000001, + GREEN = 0x00000002, + BLUE = 0x00000004, + ALPHA = 0x00000008, + ALL = 0x0000000F +}; + +struct SamplerDescriptor +{ + bool mipmapEnabled = false; + SamplerFilter magFilter = SamplerFilter::LINEAR; + SamplerFilter minFilter = SamplerFilter::LINEAR; + SamplerFilter mipmapFilter = SamplerFilter::LINEAR; + SamplerAddressMode sAddressMode = SamplerAddressMode::CLAMP_TO_EDGE; + SamplerAddressMode tAddressMode = SamplerAddressMode::CLAMP_TO_EDGE; + + SamplerDescriptor(bool _mipmapEnabled = false, + SamplerFilter _magFilter = SamplerFilter::LINEAR, + SamplerFilter _minFilter = SamplerFilter::LINEAR, + SamplerFilter _mipmapFilter = SamplerFilter::LINEAR, + SamplerAddressMode _sAddressMode = SamplerAddressMode::CLAMP_TO_EDGE, + SamplerAddressMode _tAddressMode = SamplerAddressMode::CLAMP_TO_EDGE + ):mipmapEnabled(_mipmapEnabled), magFilter(_magFilter), minFilter(_minFilter), + mipmapFilter(_mipmapFilter), sAddressMode(_sAddressMode), tAddressMode(_tAddressMode) {} +}; + +enum class CullMode: uint32_t +{ + NONE = 0x00000000, + BACK = 0x00000001, + FRONT = 0x00000002 +}; + +struct UniformInfo +{ + int count = 0; + int location = 0; + unsigned int type = 0; + bool isArray = false; + unsigned int bufferSize = 0; +}; + +struct UniformLocation +{ + int location = -1; + ShaderStage shaderStage = ShaderStage::VERTEX; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/VertexLayout.cpp b/cocos/renderer/backend/VertexLayout.cpp new file mode 100644 index 000000000000..ce5785695b44 --- /dev/null +++ b/cocos/renderer/backend/VertexLayout.cpp @@ -0,0 +1,16 @@ +#include "VertexLayout.h" + +CC_BACKEND_BEGIN + +void VertexLayout::setAtrribute(const std::string &name, unsigned int index, VertexFormat format, unsigned int offset, bool needToBeNormallized) +{ + _attributes.push_back({name, index, format, offset, needToBeNormallized}); +} + +void VertexLayout::setLayout(unsigned int stride, VertexStepMode stepMode) +{ + _stride = stride; + _stepMode = stepMode; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/VertexLayout.h b/cocos/renderer/backend/VertexLayout.h new file mode 100644 index 000000000000..c6c72486d52d --- /dev/null +++ b/cocos/renderer/backend/VertexLayout.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Macros.h" +#include "Types.h" +#include "base/CCRef.h" + +#include +#include +#include + +CC_BACKEND_BEGIN + +class VertexLayout +{ +public: + struct Attribute + { + Attribute(const std::string& _name, unsigned int _index, VertexFormat _format, unsigned int _offset, bool needToBeNormallized) + : name(_name) + , format(_format) + , offset(_offset) + , index(_index) + , needToBeNormallized(needToBeNormallized) + {} + + // name is used in opengl + std::string name; + VertexFormat format = VertexFormat::INT_R32G32B32; + unsigned int offset = 0; + // index is used in metal + unsigned int index = 0; + bool needToBeNormallized = false; + }; + + void setAtrribute(const std::string& name, unsigned int index, VertexFormat format, unsigned int offset, bool needToBeNormallized); + //FIXME: remove stepMode? + void setLayout(unsigned int stride, VertexStepMode stepMode); + + inline unsigned int getStride() const { return _stride; } + inline VertexStepMode getVertexStepMode() const { return _stepMode; } + inline const std::vector& getAttributes() const { return _attributes; } + inline bool isValid() const { return _stride != 0; } + +private: + std::vector _attributes; + unsigned int _stride = 0; + VertexStepMode _stepMode = VertexStepMode::VERTEX; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BlendStateMTL.h b/cocos/renderer/backend/metal/BlendStateMTL.h new file mode 100644 index 000000000000..43b95dc6cef6 --- /dev/null +++ b/cocos/renderer/backend/metal/BlendStateMTL.h @@ -0,0 +1,34 @@ +#pragma once + +#include "../BlendState.h" +#import + +CC_BACKEND_BEGIN + +struct BlendDescriptorMTL +{ + MTLColorWriteMask writeMask = MTLColorWriteMaskAll; + + bool blendEnabled = false; + + MTLBlendOperation rgbBlendOperation = MTLBlendOperationAdd; + MTLBlendOperation alphaBlendOperation = MTLBlendOperationAdd; + + MTLBlendFactor sourceRGBBlendFactor = MTLBlendFactorOne; + MTLBlendFactor destinationRGBBlendFactor = MTLBlendFactorZero; + MTLBlendFactor sourceAlphaBlendFactor = MTLBlendFactorOne; + MTLBlendFactor destinationAlphaBlendFactor = MTLBlendFactorZero; +}; + +class BlendStateMTL : public BlendState +{ +public: + BlendStateMTL(const BlendDescriptor& descriptor); + + inline const BlendDescriptorMTL& getBlendDescriptorMTL() const { return _blendDescriptorMTL; } + +private: + BlendDescriptorMTL _blendDescriptorMTL; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BlendStateMTL.mm b/cocos/renderer/backend/metal/BlendStateMTL.mm new file mode 100644 index 000000000000..fa8b6a644129 --- /dev/null +++ b/cocos/renderer/backend/metal/BlendStateMTL.mm @@ -0,0 +1,83 @@ +#include "BlendStateMTL.h" + +CC_BACKEND_BEGIN + + +namespace +{ + MTLColorWriteMask toMTLColorWriteMask(ColorWriteMask mask) + { + switch (mask) { + case ColorWriteMask::NONE: + return MTLColorWriteMaskNone; + case ColorWriteMask::RED: + return MTLColorWriteMaskRed; + case ColorWriteMask::GREEN: + return MTLColorWriteMaskGreen; + case ColorWriteMask::BLUE: + return MTLColorWriteMaskBlue; + case ColorWriteMask::ALPHA: + return MTLColorWriteMaskAlpha; + case ColorWriteMask::ALL: + return MTLColorWriteMaskAll; + } + } + + MTLBlendFactor toMTLBlendFactor(BlendFactor factor) + { + switch (factor) { + case BlendFactor::ZERO: + return MTLBlendFactorZero; + case BlendFactor::ONE: + return MTLBlendFactorOne; + case BlendFactor::SRC_COLOR: + return MTLBlendFactorSourceColor; + case BlendFactor::ONE_MINUS_SRC_COLOR: + return MTLBlendFactorOneMinusSourceColor; + case BlendFactor::SRC_ALPHA: + return MTLBlendFactorSourceAlpha; + case BlendFactor::ONE_MINUS_SRC_ALPHA: + return MTLBlendFactorOneMinusSourceAlpha; + case BlendFactor::DST_COLOR: + return MTLBlendFactorDestinationColor; + case BlendFactor::ONE_MINUS_DST_COLOR: + return MTLBlendFactorOneMinusDestinationColor; + case BlendFactor::DST_ALPHA: + return MTLBlendFactorDestinationAlpha; + case BlendFactor::ONE_MINUS_DST_ALPHA: + return MTLBlendFactorOneMinusDestinationAlpha; + case BlendFactor::SRC_ALPHA_SATURATE: + return MTLBlendFactorSourceAlphaSaturated; + case BlendFactor::BLEND_CLOLOR: + return MTLBlendFactorBlendColor; + } + } + + MTLBlendOperation toMTLBlendOperation(BlendOperation operation) + { + switch (operation) { + case BlendOperation::ADD: + return MTLBlendOperationAdd; + case BlendOperation::SUBTRACT: + return MTLBlendOperationSubtract; + case BlendOperation::RESERVE_SUBTRACT: + return MTLBlendOperationReverseSubtract; + } + } +} + +BlendStateMTL::BlendStateMTL(const BlendDescriptor& descriptor) +{ + _blendDescriptorMTL.writeMask = toMTLColorWriteMask(descriptor.writeMask); + _blendDescriptorMTL.blendEnabled = descriptor.blendEnabled; + + _blendDescriptorMTL.rgbBlendOperation = toMTLBlendOperation(descriptor.rgbBlendOperation); + _blendDescriptorMTL.alphaBlendOperation = toMTLBlendOperation(descriptor.alphaBlendOperation); + + _blendDescriptorMTL.sourceRGBBlendFactor = toMTLBlendFactor(descriptor.sourceRGBBlendFactor); + _blendDescriptorMTL.destinationRGBBlendFactor = toMTLBlendFactor(descriptor.destinationRGBBlendFactor); + _blendDescriptorMTL.sourceAlphaBlendFactor = toMTLBlendFactor(descriptor.sourceAlphaBlendFactor); + _blendDescriptorMTL.destinationAlphaBlendFactor = toMTLBlendFactor(descriptor.destinationAlphaBlendFactor); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BufferMTL.h b/cocos/renderer/backend/metal/BufferMTL.h new file mode 100644 index 000000000000..0d57b5d84857 --- /dev/null +++ b/cocos/renderer/backend/metal/BufferMTL.h @@ -0,0 +1,26 @@ +#pragma once + +#include "../Buffer.h" +#import + +CC_BACKEND_BEGIN + +class BufferMTL : public Buffer +{ +public: + BufferMTL(id mtlDevice, unsigned int size, BufferType type, BufferUsage usage); + ~BufferMTL(); + + virtual void updateData(void* data, unsigned int size) override; + virtual void updateSubData(void* data, unsigned int offset, unsigned int size) override; + + id getMTLBuffer() const; + void updateIndex(); + +private: + id _mtlBuffer = nil; + NSMutableArray* _dynamicDataBuffers = nil; + int _currentFrameIndex = -1; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BufferMTL.mm b/cocos/renderer/backend/metal/BufferMTL.mm new file mode 100644 index 000000000000..a9cbc7a05138 --- /dev/null +++ b/cocos/renderer/backend/metal/BufferMTL.mm @@ -0,0 +1,70 @@ +#include "BufferMTL.h" +#include "../Macros.h" +#include "BufferManager.h" + +CC_BACKEND_BEGIN + +BufferMTL::BufferMTL(id mtlDevice, unsigned int size, BufferType type, BufferUsage usage) +: Buffer(size, type, usage) +{ + if (BufferUsage::DYNAMIC == usage) + { + NSMutableArray *mutableDynamicDataBuffers = [NSMutableArray arrayWithCapacity:MAX_INFLIGHT_BUFFER]; + for (int i = 0; i < MAX_INFLIGHT_BUFFER; ++i) + { + // Create a new buffer with enough capacity to store one instance of the dynamic buffer data + id dynamicDataBuffer = [mtlDevice newBufferWithLength:size options:MTLResourceStorageModeShared]; + [mutableDynamicDataBuffers addObject:dynamicDataBuffer]; + } + _dynamicDataBuffers = [mutableDynamicDataBuffers copy]; + + _mtlBuffer = _dynamicDataBuffers[0]; + BufferManager::addBuffer(this); + } + else + { + _mtlBuffer = [mtlDevice newBufferWithLength:size options:MTLResourceStorageModeShared]; + } +} + +BufferMTL::~BufferMTL() +{ + if (BufferUsage::DYNAMIC == _usage) + { + for (id buffer in _dynamicDataBuffers) + [buffer release]; + + BufferManager::removeBuffer(this); + } + else + { + [_mtlBuffer release]; + } +} + +void BufferMTL::updateData(void* data, unsigned int size) +{ + assert(size <= _size); + memcpy((uint8_t*)_mtlBuffer.contents, data, size); +} + +void BufferMTL::updateSubData(void* data, unsigned int offset, unsigned int size) +{ + assert(offset + size <= _size); + memcpy((uint8_t*)_mtlBuffer.contents + offset, data, size); +} + +id BufferMTL::getMTLBuffer() const +{ + return _mtlBuffer; +} + +void BufferMTL::updateIndex() +{ + assert(BufferUsage::DYNAMIC == _usage); + + _currentFrameIndex = (_currentFrameIndex + 1) % MAX_INFLIGHT_BUFFER; + _mtlBuffer = _dynamicDataBuffers[_currentFrameIndex]; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BufferManager.h b/cocos/renderer/backend/metal/BufferManager.h new file mode 100644 index 000000000000..5b3a5be33e75 --- /dev/null +++ b/cocos/renderer/backend/metal/BufferManager.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include "../Macros.h" + +CC_BACKEND_BEGIN + +class BufferMTL; + +class BufferManager +{ +public: + static void addBuffer(BufferMTL* buffer); + static void removeBuffer(BufferMTL* buffer); + static void beginFrame(); + +private: + static std::vector _buffers; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/BufferManager.mm b/cocos/renderer/backend/metal/BufferManager.mm new file mode 100644 index 000000000000..fefbad80a06d --- /dev/null +++ b/cocos/renderer/backend/metal/BufferManager.mm @@ -0,0 +1,26 @@ +#include "BufferManager.h" +#include "BufferMTL.h" + +CC_BACKEND_BEGIN + +std::vector BufferManager::_buffers; + +void BufferManager::addBuffer(BufferMTL* buffer) +{ + _buffers.push_back(buffer); +} + +void BufferManager::removeBuffer(BufferMTL* buffer) +{ + auto iter = std::find(_buffers.begin(), _buffers.end(), buffer); + if (_buffers.end() != iter) + _buffers.erase(iter); +} + +void BufferManager::beginFrame() +{ + for (auto& buffer : _buffers) + buffer->updateIndex(); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/CommandBufferMTL.h b/cocos/renderer/backend/metal/CommandBufferMTL.h new file mode 100644 index 000000000000..17a713a4386a --- /dev/null +++ b/cocos/renderer/backend/metal/CommandBufferMTL.h @@ -0,0 +1,56 @@ +#pragma once + +#include "../CommandBuffer.h" +#include "DeviceMTL.h" + +#include + +CC_BACKEND_BEGIN + +class RenderPipelineMTL; + +class CommandBufferMTL : public CommandBuffer +{ +public: + CommandBufferMTL(DeviceMTL* deviceMTL); + ~CommandBufferMTL(); + + virtual void beginFrame() override; + virtual void beginRenderPass(const RenderPassDescriptor& descriptor) override; + virtual void setRenderPipeline(RenderPipeline* renderPipeline) override; + virtual void setViewport(int x, int y, unsigned int w, unsigned int h) override; + virtual void setCullMode(CullMode mode) override; + virtual void setVertexBuffer(unsigned int index, Buffer* buffer) override; + virtual void setProgramState(ProgramState* programState) override; + virtual void setIndexBuffer(Buffer* buffer) override; + virtual void drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count) override; + virtual void drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset) override; + virtual void endRenderPass() override; + virtual void endFrame() override; + + virtual void setLineWidth(float lineWidth) override; + + virtual void setScissorRect(bool isEnabled, float x, float y, float width, float height) override; + +private: + void prepareDrawing() const; + void setTextures() const; + void doSetTextures(bool isVertex) const; + void setUniformBuffer() const; + unsigned int fillUniformBuffer(uint8_t* buffer, const std::vector& unifornInfo) const; + void afterDraw(); + + id _mtlCommandBuffer = nil; + id _mtlCommandQueue = nil; + id _mtlRenderEncoder = nil; + id _mtlIndexBuffer = nil; + + DeviceMTL* _deviceMTL = nullptr; + RenderPipelineMTL* _renderPipelineMTL = nullptr; + ProgramState* _programState = nullptr; + unsigned int _renderTargetHeight = 0; + + dispatch_semaphore_t _frameBoundarySemaphore; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/CommandBufferMTL.mm b/cocos/renderer/backend/metal/CommandBufferMTL.mm new file mode 100644 index 000000000000..f6af92b2cb85 --- /dev/null +++ b/cocos/renderer/backend/metal/CommandBufferMTL.mm @@ -0,0 +1,391 @@ +#include "CommandBufferMTL.h" +#include "BufferMTL.h" +#include "DeviceMTL.h" +#include "RenderPipelineMTL.h" +#include "TextureMTL.h" +#include "Utils.h" +#include "../Macros.h" +#include "BufferManager.h" + +CC_BACKEND_BEGIN + +namespace +{ + MTLPrimitiveType toMTLPrimitive(PrimitiveType primitiveType) + { + MTLPrimitiveType ret = MTLPrimitiveTypeTriangle; + switch (primitiveType) + { + case PrimitiveType::POINT: + ret = MTLPrimitiveTypePoint; + break; + case PrimitiveType::LINE: + ret = MTLPrimitiveTypeLine; + break; + case PrimitiveType::LINE_STRIP: + ret = MTLPrimitiveTypeLineStrip; + break; + case PrimitiveType::TRIANGLE: + ret = MTLPrimitiveTypeTriangle; + break; + case PrimitiveType::TRIANGLE_STRIP: + ret = MTLPrimitiveTypeTriangleStrip; + break; + default: + break; + } + return ret; + } + + MTLIndexType toMTLIndexType(IndexFormat indexFormat) + { + if (IndexFormat::U_SHORT == indexFormat) + return MTLIndexTypeUInt16; + else + return MTLIndexTypeUInt32; + } + + MTLCullMode toMTLCullMode(CullMode mode) + { + switch (mode) { + case CullMode::NONE: + return MTLCullModeNone; + case CullMode::FRONT: + return MTLCullModeFront; + case CullMode::BACK: + return MTLCullModeBack; + } + } + + MTLRenderPassDescriptor* toMTLRenderPassDescriptor(const RenderPassDescriptor& descriptor) + { + MTLRenderPassDescriptor* mtlDescritpor = [MTLRenderPassDescriptor renderPassDescriptor]; + + // Set color attachments. + if (descriptor.needColorAttachment) + { + bool hasCustomColorAttachment = false; + for (int i = 0; i < MAX_COLOR_ATTCHMENT; ++i) + { + if (! descriptor.colorAttachmentsTexture[i]) + continue; + + mtlDescritpor.colorAttachments[i].texture = static_cast(descriptor.colorAttachmentsTexture[i])->getMTLTexture(); + if (descriptor.needClearColor) + { + mtlDescritpor.colorAttachments[i].loadAction = MTLLoadActionClear; + mtlDescritpor.colorAttachments[i].clearColor = MTLClearColorMake(descriptor.clearColorValue[0], + descriptor.clearColorValue[1], + descriptor.clearColorValue[2], + descriptor.clearColorValue[3]); + } + else + mtlDescritpor.colorAttachments[i].loadAction = MTLLoadActionLoad; + + hasCustomColorAttachment = true; + } + + if (!hasCustomColorAttachment) + { + mtlDescritpor.colorAttachments[0].texture = DeviceMTL::getCurrentDrawable().texture; + if (descriptor.needClearColor) + { + mtlDescritpor.colorAttachments[0].loadAction = MTLLoadActionClear; + mtlDescritpor.colorAttachments[0].clearColor = MTLClearColorMake(descriptor.clearColorValue[0], + descriptor.clearColorValue[1], + descriptor.clearColorValue[2], + descriptor.clearColorValue[3]); + } + else + mtlDescritpor.colorAttachments[0].loadAction = MTLLoadActionLoad; + } + + mtlDescritpor.colorAttachments[0].storeAction = MTLStoreActionStore; + } + + // Set depth/stencil attachment + if (descriptor.needDepthAttachment) + { + if (descriptor.depthAttachmentTexture) + mtlDescritpor.depthAttachment.texture = static_cast(descriptor.depthAttachmentTexture)->getMTLTexture(); + else + mtlDescritpor.depthAttachment.texture = Utils::getDefaultDepthStencilTexture(); + + if (descriptor.needClearDepth) + { + mtlDescritpor.depthAttachment.loadAction = MTLLoadActionClear; + mtlDescritpor.depthAttachment.clearDepth = descriptor.clearDepthValue; + } + else + mtlDescritpor.depthAttachment.loadAction = MTLLoadActionLoad; + + mtlDescritpor.depthAttachment.storeAction = MTLStoreActionStore; + } + if (descriptor.needStencilAttachment) + { + if (descriptor.stencilAttachmentTexture) + mtlDescritpor.stencilAttachment.texture = static_cast(descriptor.stencilAttachmentTexture)->getMTLTexture(); + else + mtlDescritpor.stencilAttachment.texture = Utils::getDefaultDepthStencilTexture(); + + if (descriptor.needClearStencil) + { + mtlDescritpor.stencilAttachment.loadAction = MTLLoadActionClear; + mtlDescritpor.stencilAttachment.clearStencil = descriptor.clearStencilValue; + } + else + mtlDescritpor.stencilAttachment.loadAction = MTLLoadActionLoad; + + mtlDescritpor.stencilAttachment.storeAction = MTLStoreActionStore; + } + + return mtlDescritpor; + } +} + +CommandBufferMTL::CommandBufferMTL(DeviceMTL* deviceMTL) +: _deviceMTL(deviceMTL) +, _mtlCommandQueue(deviceMTL->getMTLCommandQueue()) +, _frameBoundarySemaphore(dispatch_semaphore_create(MAX_INFLIGHT_BUFFER)) +{ +} + +CommandBufferMTL::~CommandBufferMTL() +{ + dispatch_semaphore_signal(_frameBoundarySemaphore); +} + +void CommandBufferMTL::beginFrame() +{ + dispatch_semaphore_wait(_frameBoundarySemaphore, DISPATCH_TIME_FOREVER); + + _mtlCommandBuffer = [_mtlCommandQueue commandBuffer]; + [_mtlCommandBuffer retain]; + + BufferManager::beginFrame(); +} + +void CommandBufferMTL::beginRenderPass(const RenderPassDescriptor& descriptor) +{ + auto mtlDescriptor = toMTLRenderPassDescriptor(descriptor); + _renderTargetHeight = (unsigned int)mtlDescriptor.colorAttachments[0].texture.height; + _mtlRenderEncoder = [_mtlCommandBuffer renderCommandEncoderWithDescriptor:mtlDescriptor]; + + [_mtlRenderEncoder retain]; +// [_mtlRenderEncoder setFrontFacingWinding:MTLWindingCounterClockwise]; +} + +void CommandBufferMTL::setRenderPipeline(RenderPipeline* renderPipeline) +{ + CC_SAFE_RETAIN(renderPipeline); + CC_SAFE_RELEASE(_renderPipelineMTL); + _renderPipelineMTL = static_cast(renderPipeline); + [_mtlRenderEncoder setRenderPipelineState:_renderPipelineMTL->getMTLRenderPipelineState()]; +} + +void CommandBufferMTL::setViewport(int x, int y, unsigned int w, unsigned int h) +{ + MTLViewport viewport; + viewport.originX = x; + viewport.originY = (int)(_renderTargetHeight - y - h); + viewport.width = w; + viewport.height = h; + viewport.znear = -1; + viewport.zfar = 1; + [_mtlRenderEncoder setViewport:viewport]; +} + +void CommandBufferMTL::setCullMode(CullMode mode) +{ + [_mtlRenderEncoder setCullMode:toMTLCullMode(mode)]; +} + +void CommandBufferMTL::setVertexBuffer(unsigned int index, Buffer* buffer) +{ + // Vertex buffer is bound in index 0. + [_mtlRenderEncoder setVertexBuffer:static_cast(buffer)->getMTLBuffer() + offset:0 + atIndex:0]; +} + +void CommandBufferMTL::setProgramState(ProgramState* programState) +{ + CC_SAFE_RETAIN(programState); + CC_SAFE_RELEASE(_programState); + _programState = programState; +} + +void CommandBufferMTL::setIndexBuffer(Buffer* buffer) +{ + assert(buffer != nullptr); + if (!buffer) + return; + + _mtlIndexBuffer = static_cast(buffer)->getMTLBuffer(); + [_mtlIndexBuffer retain]; +} + +void CommandBufferMTL::drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count) +{ + prepareDrawing(); + [_mtlRenderEncoder drawPrimitives:toMTLPrimitive(primitiveType) + vertexStart:start + vertexCount:count]; +} + +void CommandBufferMTL::drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset) +{ + prepareDrawing(); + [_mtlRenderEncoder drawIndexedPrimitives:toMTLPrimitive(primitiveType) + indexCount:count + indexType:toMTLIndexType(indexType) + indexBuffer:_mtlIndexBuffer + indexBufferOffset:offset]; + +} + +void CommandBufferMTL::endRenderPass() +{ + afterDraw(); + [_mtlRenderEncoder endEncoding]; + [_mtlRenderEncoder release]; +} + +void CommandBufferMTL::endFrame() +{ + [_mtlCommandBuffer presentDrawable:DeviceMTL::getCurrentDrawable()]; + + [_mtlCommandBuffer addCompletedHandler:^(id commandBuffer) { + // GPU work is complete + // Signal the semaphore to start the CPU work + dispatch_semaphore_signal(_frameBoundarySemaphore); + }]; + + [_mtlCommandBuffer commit]; + [_mtlCommandBuffer release]; + DeviceMTL::resetCurrentDrawable(); +} + +void CommandBufferMTL::afterDraw() +{ + if (_mtlIndexBuffer) + { + [_mtlIndexBuffer release]; + _mtlIndexBuffer = nullptr; + } + + CC_SAFE_RELEASE_NULL(_programState); +} + +void CommandBufferMTL::prepareDrawing() const +{ + setUniformBuffer(); + setTextures(); + + auto mtlDepthStencilState = _renderPipelineMTL->getMTLDepthStencilState(); + if (mtlDepthStencilState) + { + [_mtlRenderEncoder setDepthStencilState:mtlDepthStencilState]; + [_mtlRenderEncoder setStencilFrontReferenceValue:_stencilReferenceValueFront + backReferenceValue:_stencilReferenceValueBack]; + } +} + +void CommandBufferMTL::setTextures() const +{ + if (_programState) + { + doSetTextures(true); + doSetTextures(false); + } +} + +void CommandBufferMTL::doSetTextures(bool isVertex) const +{ + const auto& bindTextureInfos = (isVertex) ? _programState->getVertexTextureInfos() : _programState->getFragmentTextureInfos(); + + for(const auto& iter : bindTextureInfos) + { + //FIXME: should support texture array. + int i = 0; + auto location = iter.first; + const auto& textures = iter.second.textures; + const auto& mtlTexture = static_cast(textures[i]); + + if (isVertex) + { + [_mtlRenderEncoder setVertexTexture:mtlTexture->getMTLTexture() + atIndex:location]; + [_mtlRenderEncoder setVertexSamplerState:mtlTexture->getMTLSamplerState() + atIndex:location]; + } + else + { + [_mtlRenderEncoder setFragmentTexture:mtlTexture->getMTLTexture() + atIndex:location]; + [_mtlRenderEncoder setFragmentSamplerState:mtlTexture->getMTLSamplerState() + atIndex:location]; + } + + ++i; + } +} + +void CommandBufferMTL::setUniformBuffer() const +{ + if (_programState) + { + // Uniform buffer is bound to index 1. + const auto& vertexUniformBuffer = _renderPipelineMTL->getVertexUniformBuffer(); + const auto& vertexUniformInfo = _programState->getVertexUniformInfos(); + if (vertexUniformBuffer) + { + uint32_t size = fillUniformBuffer(vertexUniformBuffer.get(), vertexUniformInfo); + [_mtlRenderEncoder setVertexBytes:vertexUniformBuffer.get() + length:size atIndex:1]; + } + + const auto& fragUniformBuffer = _renderPipelineMTL->getFragmentUniformBuffer(); + const auto& fragUniformInfo = _programState->getFragmentUniformInfos(); + if (fragUniformBuffer) + { + uint32_t size = fillUniformBuffer(fragUniformBuffer.get(), fragUniformInfo); + [_mtlRenderEncoder setFragmentBytes:fragUniformBuffer.get() + length:size + atIndex:1]; + } + } +} + +unsigned int CommandBufferMTL::fillUniformBuffer(uint8_t* buffer, const std::vector& unifornInfo) const +{ + uint32_t offset = 0; + for(const auto& iter : unifornInfo) + { + const auto& bindUniformInfo = iter.uniformInfo; + memcpy(buffer + bindUniformInfo.location, iter.data, bindUniformInfo.bufferSize); + offset += bindUniformInfo.bufferSize; + } + return offset; +} + +void CommandBufferMTL::setLineWidth(float lineWidth) +{ +} + +void CommandBufferMTL::setScissorRect(bool isEnabled, float x, float y, float width, float height) +{ + if(!isEnabled) + return; + + MTLScissorRect scissorRect; + scissorRect.x = x; + scissorRect.y = _renderTargetHeight - height - y; + scissorRect.width = width; + scissorRect.height = height; + + [_mtlRenderEncoder setScissorRect:scissorRect]; +} + + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/DepthStencilStateMTL.h b/cocos/renderer/backend/metal/DepthStencilStateMTL.h new file mode 100644 index 000000000000..0ad8b094d267 --- /dev/null +++ b/cocos/renderer/backend/metal/DepthStencilStateMTL.h @@ -0,0 +1,20 @@ +#pragma once + +#include "../DepthStencilState.h" +#import + +CC_BACKEND_BEGIN + +class DepthStencilStateMTL : public DepthStencilState +{ +public: + DepthStencilStateMTL(id mtlDevice, const DepthStencilDescriptor& descriptor); + ~DepthStencilStateMTL(); + + inline id getMTLDepthStencilState() const { return _mtlDepthStencilState; } + +private: + id _mtlDepthStencilState = nil; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/DepthStencilStateMTL.mm b/cocos/renderer/backend/metal/DepthStencilStateMTL.mm new file mode 100644 index 000000000000..1bdebe8d040b --- /dev/null +++ b/cocos/renderer/backend/metal/DepthStencilStateMTL.mm @@ -0,0 +1,113 @@ +#include "DepthStencilStateMTL.h" + +CC_BACKEND_BEGIN + +namespace +{ + MTLCompareFunction toMTLCompareFunction(CompareFunction compareFunction) + { + MTLCompareFunction ret = MTLCompareFunctionNever; + switch (compareFunction) { + case CompareFunction::NEVER: + ret = MTLCompareFunctionNever; + break; + case CompareFunction::LESS: + ret = MTLCompareFunctionLess; + break; + case CompareFunction::LESS_EQUAL: + ret = MTLCompareFunctionLessEqual; + break; + case CompareFunction::GREATER: + ret = MTLCompareFunctionGreater; + break; + case CompareFunction::GREATER_EQUAL: + ret = MTLCompareFunctionGreaterEqual; + break; + case CompareFunction::EQUAL: + ret = MTLCompareFunctionEqual; + break; + case CompareFunction::NOT_EQUAL: + ret = MTLCompareFunctionNotEqual; + break; + case CompareFunction::ALWAYS: + ret = MTLCompareFunctionAlways; + break; + default: + assert(false); + break; + } + return ret; + } + + MTLStencilOperation toMTLStencilOperation(StencilOperation operation) + { + MTLStencilOperation ret = MTLStencilOperationKeep; + switch (operation) { + case StencilOperation::KEEP: + ret = MTLStencilOperationKeep; + break; + case StencilOperation::ZERO: + ret = MTLStencilOperationZero; + break; + case StencilOperation::REPLACE: + ret = MTLStencilOperationReplace; + break; + case StencilOperation::INVERT: + ret = MTLStencilOperationInvert; + break; + case StencilOperation::INCREMENT_WRAP: + ret = MTLStencilOperationIncrementWrap; + break; + case StencilOperation::DECREMENT_WRAP: + ret = MTLStencilOperationDecrementWrap; + break; + default: + assert(false); + break; + } + return ret; + } + + MTLStencilDescriptor* toMTLStencilDescriptor(const StencilDescriptor& descriptor) + { + MTLStencilDescriptor* mtlDescriptor = [[MTLStencilDescriptor alloc] init]; + mtlDescriptor.stencilFailureOperation = toMTLStencilOperation(descriptor.stencilFailureOperation); + mtlDescriptor.depthFailureOperation = toMTLStencilOperation(descriptor.depthFailureOperation); + mtlDescriptor.depthStencilPassOperation = toMTLStencilOperation(descriptor.depthStencilPassOperation); + mtlDescriptor.stencilCompareFunction = toMTLCompareFunction(descriptor.stencilCompareFunction); + mtlDescriptor.readMask = descriptor.readMask; + mtlDescriptor.writeMask = descriptor.writeMask; + return mtlDescriptor; + } +} + +DepthStencilStateMTL::DepthStencilStateMTL(id mtlDevice, const DepthStencilDescriptor& descriptor) +: DepthStencilState(descriptor) +{ + if (!descriptor.depthTestEnabled && !descriptor.stencilTestEnabled && !descriptor.depthWriteEnabled) + return; + + MTLDepthStencilDescriptor* mtlDescriptor = [[MTLDepthStencilDescriptor alloc] init]; + + if (descriptor.depthTestEnabled || descriptor.depthWriteEnabled) + { + mtlDescriptor.depthWriteEnabled = descriptor.depthWriteEnabled; + mtlDescriptor.depthCompareFunction = toMTLCompareFunction(descriptor.depthCompareFunction); + } + + if (descriptor.stencilTestEnabled) + { + mtlDescriptor.frontFaceStencil = toMTLStencilDescriptor(descriptor.frontFaceStencil); + mtlDescriptor.backFaceStencil = toMTLStencilDescriptor(descriptor.backFaceStencil); + } + + _mtlDepthStencilState = [mtlDevice newDepthStencilStateWithDescriptor:mtlDescriptor]; + [mtlDescriptor release]; +} + +DepthStencilStateMTL::~DepthStencilStateMTL() +{ + [_mtlDepthStencilState release]; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/DeviceMTL.h b/cocos/renderer/backend/metal/DeviceMTL.h new file mode 100644 index 000000000000..7494ccca3935 --- /dev/null +++ b/cocos/renderer/backend/metal/DeviceMTL.h @@ -0,0 +1,45 @@ +#pragma once + +#include "../Device.h" +#import +#import + +CC_BACKEND_BEGIN + +class DeviceMTL : public Device +{ +public: + // TODO: temple solution to get default renderpass descriptor. + static void setCAMetalLayer(CAMetalLayer* metalLayer); + // Invoke by engine internally at the beginning of rendering a new frame. + static void updateDrawable(); + static CAMetalLayer* getCAMetalLayer() { return DeviceMTL::_metalLayer; } + static id getCurrentDrawable(); + static void resetCurrentDrawable(); + + DeviceMTL(); + ~DeviceMTL(); + + virtual CommandBuffer* newCommandBuffer() override; + virtual Buffer* newBuffer(unsigned int size, BufferType type, BufferUsage usage) override; + virtual Texture* newTexture(const TextureDescriptor& descriptor) override; + virtual DepthStencilState* createDepthStencilState(const DepthStencilDescriptor& descriptor) override; + virtual BlendState* createBlendState(const BlendDescriptor& descriptor) override; + virtual RenderPipeline* newRenderPipeline(const RenderPipelineDescriptor& descriptor) override; + + inline id getMTLDevice() const { return _mtlDevice; } + inline id getMTLCommandQueue() const { return _mtlCommandQueue; } + +protected: + virtual ShaderModule* newShaderModule(ShaderStage stage, const std::string& source) override; + virtual Program* newProgram(const std::string& vertexShader, const std::string& fragmentShader) override; + +private: + static CAMetalLayer* _metalLayer; + static id _currentDrawable; + + id _mtlDevice = nil; + id _mtlCommandQueue = nil; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/DeviceMTL.mm b/cocos/renderer/backend/metal/DeviceMTL.mm new file mode 100644 index 000000000000..edf7b1c86d9e --- /dev/null +++ b/cocos/renderer/backend/metal/DeviceMTL.mm @@ -0,0 +1,104 @@ +#include "DeviceMTL.h" +#include "CommandBufferMTL.h" +#include "BufferMTL.h" +#include "RenderPipelineMTL.h" +#include "ShaderModuleMTL.h" +#include "DepthStencilStateMTL.h" +#include "TextureMTL.h" +#include "BlendStateMTL.h" +#include "Utils.h" +#include "ProgramMTL.h" + + +CC_BACKEND_BEGIN + +CAMetalLayer* DeviceMTL::_metalLayer = nil; +id DeviceMTL::_currentDrawable = nil; + +Device* Device::getInstance() +{ + if (!_instance) + _instance = new (std::nothrow) DeviceMTL(); + + return _instance; +} + +void DeviceMTL::setCAMetalLayer(CAMetalLayer* metalLayer) +{ + DeviceMTL::_metalLayer = metalLayer; +} + +id DeviceMTL::getCurrentDrawable() +{ + if (! DeviceMTL::_currentDrawable) + DeviceMTL::_currentDrawable = [DeviceMTL::_metalLayer nextDrawable]; + + return DeviceMTL::_currentDrawable; +} + +void DeviceMTL::resetCurrentDrawable() +{ + DeviceMTL::_currentDrawable = nil; +} + +DeviceMTL::DeviceMTL() +{ + _mtlDevice = DeviceMTL::_metalLayer.device; + _mtlCommandQueue = [_mtlDevice newCommandQueue]; + ProgramCache::getInstance(); +} + +DeviceMTL::~DeviceMTL() +{ + ProgramCache::destroyInstance(); +} + +CommandBuffer* DeviceMTL::newCommandBuffer() +{ + return new (std::nothrow) CommandBufferMTL(this); +} + +Buffer* DeviceMTL::newBuffer(unsigned int size, BufferType type, BufferUsage usage) +{ + return new (std::nothrow) BufferMTL(_mtlDevice, size, type, usage); +} + +Texture* DeviceMTL::newTexture(const TextureDescriptor& descriptor) +{ + return new (std::nothrow) TextureMTL(_mtlDevice, descriptor); +} + +ShaderModule* DeviceMTL::newShaderModule(ShaderStage stage, const std::string& source) +{ + return new (std::nothrow) ShaderModuleMTL(_mtlDevice, stage, source);; +} + +DepthStencilState* DeviceMTL::createDepthStencilState(const DepthStencilDescriptor& descriptor) +{ + auto ret = new (std::nothrow) DepthStencilStateMTL(_mtlDevice, descriptor); + if (ret) + ret->autorelease(); + + return ret; +} + +BlendState* DeviceMTL::createBlendState(const BlendDescriptor& descriptor) +{ + auto ret = new (std::nothrow) BlendStateMTL(descriptor); + if (ret) + ret->autorelease(); + + return ret; +} + +RenderPipeline* DeviceMTL::newRenderPipeline(const RenderPipelineDescriptor& descriptor) +{ + return new (std::nothrow) RenderPipelineMTL(_mtlDevice, descriptor); +} + +Program* DeviceMTL::newProgram(const std::string& vertexShader, const std::string& fragmentShader) +{ + return new (std::nothrow) ProgramMTL(_mtlDevice, vertexShader, fragmentShader); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/ProgramMTL.h b/cocos/renderer/backend/metal/ProgramMTL.h new file mode 100644 index 000000000000..d7825fb67eb5 --- /dev/null +++ b/cocos/renderer/backend/metal/ProgramMTL.h @@ -0,0 +1,32 @@ +#pragma once + +#include "../Program.h" +#import + +CC_BACKEND_BEGIN + +class ShaderModuleMTL; + +class ProgramMTL : public Program +{ +public: + ProgramMTL(id mtlDevice, const std::string& vertexShader, const std::string& fragmentShader); + virtual ~ProgramMTL(); + + virtual const std::unordered_map& getVertexUniformInfos() const override; + virtual const std::unordered_map& getFragmentUniformInfos() const override; + + virtual UniformLocation getUniformLocation(const std::string& uniform) const override; + + virtual ShaderModuleMTL* getVertexShader() const { return _vertexShader; } + virtual ShaderModuleMTL* getFragmentShader() const { return _fragmentShader; } + + virtual int getMaxVertexLocation() const override; + virtual int getMaxFragmentLocation() const override; + +private: + ShaderModuleMTL* _vertexShader = nullptr; + ShaderModuleMTL* _fragmentShader = nullptr; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/ProgramMTL.mm b/cocos/renderer/backend/metal/ProgramMTL.mm new file mode 100644 index 000000000000..ac6bbc7b269e --- /dev/null +++ b/cocos/renderer/backend/metal/ProgramMTL.mm @@ -0,0 +1,66 @@ +#include "ProgramMTL.h" +#include "ShaderModuleMTL.h" + +CC_BACKEND_BEGIN + +ProgramMTL::ProgramMTL(id mtlDevice, const std::string& vertexShader, const std::string& fragmentShader) +: Program(vertexShader, fragmentShader) +{ + _vertexShader = static_cast(ShaderCache::newVertexShaderModule(vertexShader)); + _fragmentShader = static_cast(ShaderCache::newFragmentShaderModule(fragmentShader)); + + CC_SAFE_RETAIN(_vertexShader); + CC_SAFE_RETAIN(_fragmentShader); +} + +ProgramMTL::~ProgramMTL() +{ + CC_SAFE_RELEASE(_vertexShader); + CC_SAFE_RELEASE(_fragmentShader); +} + +UniformLocation ProgramMTL::getUniformLocation(const std::string& uniform) const +{ + UniformLocation uniformLocation; + const auto& vsUniforms = _vertexShader->getUniforms(); + const auto& vsIter = vsUniforms.find(uniform); + bool definedInVertex = false; + if(vsIter != vsUniforms.end()) + { + definedInVertex = true; + uniformLocation.shaderStage = ShaderStage::VERTEX; + uniformLocation.location = vsIter->second.location; + } + + const auto& fsUniforms = _fragmentShader->getUniforms(); + const auto& fsIter = fsUniforms.find(uniform); + if(fsIter != fsUniforms.end()) + { + uniformLocation.shaderStage = (definedInVertex) ? ShaderStage::VERTEX_AND_FRAGMENT : ShaderStage::FRAGMENT; + uniformLocation.location = fsIter->second.location; + } + + return uniformLocation; +} + +const std::unordered_map& ProgramMTL::getVertexUniformInfos() const +{ + return _vertexShader->getUniforms(); +} + +const std::unordered_map& ProgramMTL::getFragmentUniformInfos() const +{ + return _fragmentShader->getUniforms(); +} + +int ProgramMTL::getMaxVertexLocation() const +{ + return _vertexShader->getMaxLocation(); +} + +int ProgramMTL::getMaxFragmentLocation() const +{ + return _fragmentShader->getMaxLocation(); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/RenderPipelineMTL.h b/cocos/renderer/backend/metal/RenderPipelineMTL.h new file mode 100644 index 000000000000..284e3ce4d7ae --- /dev/null +++ b/cocos/renderer/backend/metal/RenderPipelineMTL.h @@ -0,0 +1,42 @@ +#pragma once + +#include "../RenderPipeline.h" +#include "../RenderPipelineDescriptor.h" +#include "BlendStateMTL.h" +#include +#include +#include +#import + +CC_BACKEND_BEGIN + +class RenderPipelineMTL : public RenderPipeline +{ +public: + RenderPipelineMTL(id mtlDevice, const RenderPipelineDescriptor& descriptor); + ~RenderPipelineMTL(); + + inline id getMTLRenderPipelineState() const { return _mtlRenderPipelineState; } + inline id getMTLDepthStencilState() const { return _mtlDepthStencilState; } + + inline const std::shared_ptr& getVertexUniformBuffer() const { return _vertexUniformBuffer; } + inline const std::shared_ptr& getFragmentUniformBuffer() const { return _fragementUniformBuffer; } + +private: + void setVertexLayout(MTLRenderPipelineDescriptor*, const RenderPipelineDescriptor&); + void setBlendState(MTLRenderPipelineColorAttachmentDescriptor*); + void setShaderModules(const RenderPipelineDescriptor&); + void setBlendStateAndFormat(const RenderPipelineDescriptor&); + + id _mtlRenderPipelineState = nil; + id _mtlDepthStencilState = nil; + id _mtlDevice = nil; + + std::shared_ptr _vertexUniformBuffer = nullptr; + std::shared_ptr _fragementUniformBuffer = nullptr; + + MTLRenderPipelineDescriptor* _mtlRenderPipelineDescriptor = nil; + BlendDescriptorMTL _blendDescriptorMTL; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/RenderPipelineMTL.mm b/cocos/renderer/backend/metal/RenderPipelineMTL.mm new file mode 100644 index 000000000000..cc4438e8f2d0 --- /dev/null +++ b/cocos/renderer/backend/metal/RenderPipelineMTL.mm @@ -0,0 +1,171 @@ +#include "RenderPipelineMTL.h" +#include "DeviceMTL.h" +#include "ShaderModuleMTL.h" +#include "DepthStencilStateMTL.h" +#include "Utils.h" +#include "ProgramMTL.h" + +CC_BACKEND_BEGIN + +namespace +{ + MTLVertexStepFunction toMTLVertexStepFunction(VertexStepMode vertexStepMode) + { + if (VertexStepMode::VERTEX == vertexStepMode) + return MTLVertexStepFunctionPerVertex; + else + return MTLVertexStepFunctionPerInstance; + } + + MTLVertexFormat toMTLVertexFormat(VertexFormat vertexFormat, bool needNormalize) + { + MTLVertexFormat ret = MTLVertexFormatFloat4; + switch (vertexFormat) + { + case VertexFormat::FLOAT_R32G32B32A32: + ret = MTLVertexFormatFloat4; + break; + case VertexFormat::FLOAT_R32G32B32: + ret = MTLVertexFormatFloat3; + break; + case VertexFormat::FLOAT_R32G32: + ret = MTLVertexFormatFloat2; + break; + case VertexFormat::FLOAT_R32: + ret = MTLVertexFormatFloat; + break; + case VertexFormat::INT_R32G32B32A32: + ret = MTLVertexFormatInt4; + break; + case VertexFormat::INT_R32G32B32: + ret = MTLVertexFormatInt3; + break; + case VertexFormat::INT_R32G32: + ret = MTLVertexFormatInt2; + break; + case VertexFormat::INT_R32: + ret = MTLVertexFormatInt; + break; + case VertexFormat::USHORT_R16G16B16A16: + ret = MTLVertexFormatUShort4; + break; + case VertexFormat::USHORT_R16G16: + ret = MTLVertexFormatUShort2; + break; + case VertexFormat::UNORM_R8G8B8A8: + ret = MTLVertexFormatUChar4; + break; + case VertexFormat::UNORM_R8G8: + ret = MTLVertexFormatUChar2; + break; + case VertexFormat::UBYTE_R8G8B8A8: + if (needNormalize) + ret = MTLVertexFormatUChar4Normalized; + else + ret = MTLVertexFormatUChar4; + break; + default: + assert(false); + break; + } + return ret; + } +} + +RenderPipelineMTL::RenderPipelineMTL(id mtlDevice, const RenderPipelineDescriptor& descriptor) +: _mtlDevice(mtlDevice) +{ + _mtlRenderPipelineDescriptor = [[MTLRenderPipelineDescriptor alloc] init]; + + setShaderModules(descriptor); + setVertexLayout(_mtlRenderPipelineDescriptor, descriptor); + + // Depth stencil state. + auto depthStencilState = descriptor.depthStencilState; + if (depthStencilState) + _mtlDepthStencilState = static_cast(depthStencilState)->getMTLDepthStencilState(); + + auto blendState = static_cast(descriptor.blendState); + if (blendState) + _blendDescriptorMTL = blendState->getBlendDescriptorMTL(); + + setBlendStateAndFormat(descriptor); + + NSError *error = nil; + _mtlRenderPipelineState = [_mtlDevice newRenderPipelineStateWithDescriptor:_mtlRenderPipelineDescriptor error:&error]; + if (error) + NSLog(@"Can not create renderpipeline state: %@", error); + + [_mtlRenderPipelineDescriptor release]; +} + +RenderPipelineMTL::~RenderPipelineMTL() +{ + [_mtlRenderPipelineState release]; +} + +void RenderPipelineMTL::setVertexLayout(MTLRenderPipelineDescriptor* mtlDescriptor, const RenderPipelineDescriptor& descriptor) +{ + const auto& vertexLayouts = descriptor.vertexLayouts; + int vertexIndex = 0; + for (const auto& vertexLayout : vertexLayouts) + { + if (!vertexLayout.isValid()) + continue; + + mtlDescriptor.vertexDescriptor.layouts[vertexIndex].stride = vertexLayout.getStride(); + mtlDescriptor.vertexDescriptor.layouts[vertexIndex].stepFunction = toMTLVertexStepFunction(vertexLayout.getVertexStepMode()); + + const auto& attributes = vertexLayout.getAttributes(); + for (const auto& attribute : attributes) + { + mtlDescriptor.vertexDescriptor.attributes[attribute.index].format = toMTLVertexFormat(attribute.format, attribute.needToBeNormallized); + mtlDescriptor.vertexDescriptor.attributes[attribute.index].offset = attribute.offset; + // Buffer index will always be 0; + mtlDescriptor.vertexDescriptor.attributes[attribute.index].bufferIndex = 0; + } + + ++vertexIndex; + } +} + +void RenderPipelineMTL::setBlendState(MTLRenderPipelineColorAttachmentDescriptor* colorAttachmentDescriptor) +{ + colorAttachmentDescriptor.blendingEnabled = _blendDescriptorMTL.blendEnabled; + colorAttachmentDescriptor.writeMask = _blendDescriptorMTL.writeMask; + + colorAttachmentDescriptor.rgbBlendOperation = _blendDescriptorMTL.rgbBlendOperation; + colorAttachmentDescriptor.alphaBlendOperation = _blendDescriptorMTL.alphaBlendOperation; + + colorAttachmentDescriptor.sourceRGBBlendFactor = _blendDescriptorMTL.sourceRGBBlendFactor; + colorAttachmentDescriptor.destinationRGBBlendFactor = _blendDescriptorMTL.destinationRGBBlendFactor; + colorAttachmentDescriptor.sourceAlphaBlendFactor = _blendDescriptorMTL.sourceAlphaBlendFactor; + colorAttachmentDescriptor.destinationAlphaBlendFactor = _blendDescriptorMTL.destinationAlphaBlendFactor; +} + +void RenderPipelineMTL::setShaderModules(const RenderPipelineDescriptor& descriptor) +{ + auto vertexShaderModule = static_cast(descriptor.programState->getProgram())->getVertexShader(); + _mtlRenderPipelineDescriptor.vertexFunction = vertexShaderModule->getMTLFunction(); + _vertexUniformBuffer = vertexShaderModule->getUniformBuffer(); + + auto fragShaderModule = static_cast(descriptor.programState->getProgram())->getFragmentShader(); + _mtlRenderPipelineDescriptor.fragmentFunction = fragShaderModule->getMTLFunction(); + _fragementUniformBuffer = fragShaderModule->getUniformBuffer(); +} + +void RenderPipelineMTL::setBlendStateAndFormat(const RenderPipelineDescriptor& descriptor) +{ + for (int i = 0; i < MAX_COLOR_ATTCHMENT; ++i) + { + if (TextureFormat::NONE == descriptor.colorAttachmentsFormat[i]) + continue; + + _mtlRenderPipelineDescriptor.colorAttachments[i].pixelFormat = Utils::toMTLPixelFormat(descriptor.colorAttachmentsFormat[i]); + setBlendState(_mtlRenderPipelineDescriptor.colorAttachments[i]); + } + _mtlRenderPipelineDescriptor.depthAttachmentPixelFormat = Utils::toMTLPixelFormat(descriptor.depthAttachmentFormat); + _mtlRenderPipelineDescriptor.stencilAttachmentPixelFormat = Utils::toMTLPixelFormat(descriptor.stencilAttachmentFormat); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/ShaderModuleMTL.h b/cocos/renderer/backend/metal/ShaderModuleMTL.h new file mode 100644 index 000000000000..6039c1767ef2 --- /dev/null +++ b/cocos/renderer/backend/metal/ShaderModuleMTL.h @@ -0,0 +1,39 @@ +#pragma once + +#include "../ShaderModule.h" +#include "../Types.h" + +#include +#include +#include +#include +#import + +struct glslopt_shader; + +CC_BACKEND_BEGIN + +class ShaderModuleMTL : public ShaderModule +{ +public: + ShaderModuleMTL(id mtlDevice, ShaderStage stage, const std::string& source); + ~ShaderModuleMTL(); + + inline id getMTLFunction() const { return _mtlFunction; } + inline const std::shared_ptr& getUniformBuffer() const { return _uniformBuffer; } + inline const std::unordered_map& getUniforms() const { return _uniformInfos; } + inline const int getMaxLocation() const { return _maxLocation; } + +private: + void parseUniform(id mtlDevice, glslopt_shader* shader); + void parseTexture(id mtlDevice, glslopt_shader* shader); + + id _mtlFunction = nil; + + std::shared_ptr _uniformBuffer = nullptr; + std::unordered_map _uniformInfos; + + int _maxLocation = -1; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/ShaderModuleMTL.mm b/cocos/renderer/backend/metal/ShaderModuleMTL.mm new file mode 100644 index 000000000000..811a85a116f2 --- /dev/null +++ b/cocos/renderer/backend/metal/ShaderModuleMTL.mm @@ -0,0 +1,142 @@ +#include "ShaderModuleMTL.h" +#include "DeviceMTL.h" + +#include "glsl_optimizer.h" + +CC_BACKEND_BEGIN + +namespace +{ + uint32_t getTypeSize(glslopt_basic_type type) + { + uint32_t ret = 0; + switch (type) + { + case kGlslTypeFloat: + case kGlslTypeInt: + ret = 4; + break; + case kGlslTypeBool: + ret = 1; + break; + default: + break; + } + return ret; + } +} + +ShaderModuleMTL::ShaderModuleMTL(id mtlDevice, ShaderStage stage, const std::string& source) +: ShaderModule(stage) +{ + // Convert GLSL shader to metal shader + //TODO: don't crreate/destroy ctx every time. + glslopt_ctx* ctx = glslopt_initialize(kGlslTargetMetal); + glslopt_shader_type shaderType = stage == ShaderStage::VERTEX ? kGlslOptShaderVertex : kGlslOptShaderFragment; + glslopt_shader* glslShader = glslopt_optimize(ctx, shaderType, source.c_str(), 0); + if (!glslShader) + { + NSLog(@"Can not translate GLSL shader to metal shader:"); + NSLog(@"%s", source.c_str()); + return; + } + + const char* metalShader = glslopt_get_raw_output(glslShader); + if (!metalShader) + { + NSLog(@"Can not get metal shader:"); + NSLog(@"%s", source.c_str()); + glslopt_cleanup(ctx); + return; + } + +// NSLog(@"%s", metalShader); + + parseUniform(mtlDevice, glslShader); + parseTexture(mtlDevice, glslShader); + + NSString* shader = [NSString stringWithUTF8String:metalShader]; + NSError* error; + id library = [mtlDevice newLibraryWithSource:shader + options:nil + error:&error]; + if (!library) + { + NSLog(@"Can not compile metal shader: %@", error); + NSLog(@"%s", metalShader); + glslopt_shader_delete(glslShader); + glslopt_cleanup(ctx); + return; + } + + if (ShaderStage::VERTEX == stage) + _mtlFunction = [library newFunctionWithName:@"xlatMtlMain1"]; + else + _mtlFunction = [library newFunctionWithName:@"xlatMtlMain2"]; + if (!_mtlFunction) + { + NSLog(@"metal shader is ---------------"); + NSLog(@"%s", metalShader); + assert(false); + } + + glslopt_shader_delete(glslShader); + glslopt_cleanup(ctx); +} + +ShaderModuleMTL::~ShaderModuleMTL() +{ + [_mtlFunction release]; +} + +void ShaderModuleMTL::parseUniform(id mtlDevice, glslopt_shader* shader) +{ + const int uniformCount = glslopt_shader_get_uniform_count(shader); + const int uniformSize = glslopt_shader_get_uniform_total_size(shader); + if (uniformSize > 0) + { + std::shared_ptr sp(new uint8_t[uniformSize], [](uint8_t *p) { delete[] p; }); + _uniformBuffer = sp; + } + for (int i = 0; i < uniformCount; ++i) + { + const char* parName; + glslopt_basic_type parType; + glslopt_precision parPrec; + int parVecSize, parMatSize, parArrSize, location; + glslopt_shader_get_uniform_desc(shader, i, &parName, &parType, &parPrec, &parVecSize, &parMatSize, &parArrSize, &location); + + parArrSize = (parArrSize > 0) ? parArrSize : 1; + UniformInfo uniform; + uniform.count = parArrSize; + uniform.location = location; + uniform.isArray = parArrSize; + uniform.bufferSize = getTypeSize(parType) * parVecSize * parMatSize * parArrSize; + //TODO coulsonwang + uniform.bufferSize = uniform.bufferSize < 16 ? 16 : uniform.bufferSize; + _uniformInfos[parName] = uniform; + + _maxLocation = _maxLocation < location ? (location + 1) : _maxLocation; + } +} + +void ShaderModuleMTL::parseTexture(id mtlDevice, glslopt_shader* shader) +{ + const int textureCount = glslopt_shader_get_texture_count(shader); + for (int i = 0; i < textureCount; ++i) + { + const char* parName; + glslopt_basic_type parType; + glslopt_precision parPrec; + int parVecSize, parMatSize, parArrSize, location; + glslopt_shader_get_texture_desc(shader, i, &parName, &parType, &parPrec, &parVecSize, &parMatSize, &parArrSize, &location); + + UniformInfo uniform; + uniform.count = parArrSize; + uniform.location = location; + uniform.isArray = parArrSize > 0; + _uniformInfos[parName] = uniform; + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/TextureMTL.h b/cocos/renderer/backend/metal/TextureMTL.h new file mode 100644 index 000000000000..17aa89065979 --- /dev/null +++ b/cocos/renderer/backend/metal/TextureMTL.h @@ -0,0 +1,39 @@ +#pragma once + +#include "../Texture.h" +#include "DeviceMTL.h" +#import + +CC_BACKEND_BEGIN + +class TextureMTL : public Texture +{ +public: + TextureMTL(id mtlDevice, const TextureDescriptor& descriptor); + ~TextureMTL(); + + virtual void updateData(uint8_t* data) override; + virtual void updateSubData(unsigned int xoffset, unsigned int yoffset, unsigned int width, unsigned int height, uint8_t* data) override; + + virtual void updateSamplerDescriptor(const SamplerDescriptor &sampler) override; + + inline id getMTLTexture() const { return _mtlTexture; } + inline id getMTLSamplerState() const { return _mtlSamplerState; } + +private: + void createTexture(id mtlDevice, const TextureDescriptor& descriptor); + void createSampler(id mtlDevice, const SamplerDescriptor& descriptor); + + MTLSamplerAddressMode _sAddressMode; + MTLSamplerAddressMode _tAddressMode; + MTLSamplerMinMagFilter _minFilter; + MTLSamplerMinMagFilter _magFilter; + MTLSamplerMipFilter _mipFilter; + + id _mtlDevice = nil; + id _mtlTexture = nil; + id _mtlSamplerState = nil; + unsigned int _bytesPerRow = 0; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/TextureMTL.mm b/cocos/renderer/backend/metal/TextureMTL.mm new file mode 100644 index 000000000000..b8690d026167 --- /dev/null +++ b/cocos/renderer/backend/metal/TextureMTL.mm @@ -0,0 +1,185 @@ +#include "TextureMTL.h" +#include "Utils.h" + +CC_BACKEND_BEGIN + +namespace +{ + MTLSamplerAddressMode toMTLSamplerAddressMode(SamplerAddressMode mode) + { + MTLSamplerAddressMode ret = MTLSamplerAddressModeRepeat; + switch (mode) { + case SamplerAddressMode::REPEAT: + ret = MTLSamplerAddressModeRepeat; + break; + case SamplerAddressMode::MIRROR_REPEAT: + ret = MTLSamplerAddressModeMirrorRepeat; + break; + case SamplerAddressMode::CLAMP_TO_EDGE: + ret = MTLSamplerAddressModeClampToEdge; + break; + default: + assert(false); + break; + } + return ret; + } + + MTLSamplerMinMagFilter toMTLSamplerMinMagFilter(SamplerFilter mode) + { + switch (mode) { + case SamplerFilter::NEAREST: + return MTLSamplerMinMagFilterNearest; + case SamplerFilter::LINEAR: + return MTLSamplerMinMagFilterLinear; + case SamplerFilter::DONT_CARE: + return MTLSamplerMinMagFilterNearest; + } + } + + MTLSamplerMipFilter toMTLSamplerMipFilter(SamplerFilter mode) { + switch (mode) { + case SamplerFilter::NEAREST: + return MTLSamplerMipFilterNearest; + case SamplerFilter::LINEAR: + return MTLSamplerMipFilterLinear; + case SamplerFilter::DONT_CARE: + return MTLSamplerMipFilterNearest; + } + } + + void convertRGB2RGBA(uint8_t* src, uint8_t* dst, uint32_t length) + { + for (uint32_t i = 0; i < length; ++i) + { + *dst++ = *src++; + *dst++ = *src++; + *dst++ = *src++; + *dst++ = 255; + } + } + + + bool convertData(uint8_t* src, unsigned int length, TextureFormat format, uint8_t** out) + { + *out = src; + bool converted = false; + switch (format) + { + case TextureFormat::R8G8B8: + { + *out = (uint8_t*)malloc(length * 4); + convertRGB2RGBA(src, *out, length); + converted = true; + } + break; + default: + break; + } + return converted; + } +} + +TextureMTL::TextureMTL(id mtlDevice, const TextureDescriptor& descriptor) +: Texture(descriptor) +{ + _mtlDevice = mtlDevice; + createTexture(mtlDevice, descriptor); + createSampler(mtlDevice, descriptor.samplerDescriptor); + + // Metal doesn't support RGB888/RGBA4444, so should convert to RGBA888; + if (TextureFormat::R8G8B8 == _textureFormat) + { + _bitsPerElement = 4 * 8; + } + + _bytesPerRow = descriptor.width * _bitsPerElement / 8 ; +} + +TextureMTL::~TextureMTL() +{ + [_mtlTexture release]; + [_mtlSamplerState release]; +} + +void TextureMTL::updateSamplerDescriptor(const SamplerDescriptor &sampler) +{ + createSampler(_mtlDevice, sampler); +} + + +void TextureMTL::updateData(uint8_t* data) +{ + updateSubData(0, 0, (unsigned int)_mtlTexture.width, (unsigned int)_mtlTexture.height, data); +} + +void TextureMTL::updateSubData(unsigned int xoffset, unsigned int yoffset, unsigned int width, unsigned int height, uint8_t* data) +{ + MTLRegion region = + { + {xoffset, yoffset, 0}, // MTLOrigin + {width, height, 1} // MTLSize + }; + + uint8_t* convertedData = nullptr; + bool converted = convertData(data, + (uint32_t)(width * height), + _textureFormat, &convertedData); + + //when pixel format is a compressed one, bytePerRow should be set to ZERO + int bytesPerRow = _isCompressed ? 0 : _bytesPerRow; + + [_mtlTexture replaceRegion:region + mipmapLevel:0 + withBytes:convertedData + bytesPerRow:bytesPerRow]; + + if (converted) + free(convertedData); + + // metal doesn't generate mipmaps automatically, so should generate it manually. + if (_isMipmapEnabled) + Utils::generateMipmaps(_mtlTexture); +} + +void TextureMTL::createTexture(id mtlDevice, const TextureDescriptor& descriptor) +{ + MTLTextureDescriptor* textureDescriptor = + [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:Utils::toMTLPixelFormat(descriptor.textureFormat) + width:descriptor.width + height:descriptor.height + mipmapped:TRUE]; + if (TextureUsage::RENDER_TARGET == descriptor.textureUsage) + { + textureDescriptor.resourceOptions = MTLResourceStorageModePrivate; + textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead; + } + _mtlTexture = [mtlDevice newTextureWithDescriptor:textureDescriptor]; +} + +void TextureMTL::createSampler(id mtlDevice, const SamplerDescriptor &descriptor) +{ + MTLSamplerDescriptor *mtlDescriptor = [MTLSamplerDescriptor new]; + mtlDescriptor.sAddressMode = descriptor.sAddressMode == SamplerAddressMode::DONT_CARE ? _sAddressMode : toMTLSamplerAddressMode(descriptor.sAddressMode); + mtlDescriptor.tAddressMode = descriptor.tAddressMode == SamplerAddressMode::DONT_CARE ? _tAddressMode : toMTLSamplerAddressMode(descriptor.tAddressMode); + + mtlDescriptor.minFilter = descriptor.minFilter == SamplerFilter::DONT_CARE ? _minFilter : toMTLSamplerMinMagFilter(descriptor.minFilter); + mtlDescriptor.magFilter = descriptor.magFilter == SamplerFilter::DONT_CARE ? _magFilter : toMTLSamplerMinMagFilter(descriptor.magFilter); + if (_isMipmapEnabled) + mtlDescriptor.mipFilter = descriptor.mipmapFilter == SamplerFilter::DONT_CARE ? _mipFilter : toMTLSamplerMipFilter(descriptor.mipmapFilter); + + if(_mtlSamplerState) + [_mtlSamplerState release]; + + _sAddressMode = mtlDescriptor.sAddressMode; + _tAddressMode = mtlDescriptor.tAddressMode; + _minFilter = mtlDescriptor.minFilter; + _magFilter = mtlDescriptor.magFilter; + _mipFilter = mtlDescriptor.mipFilter; + + _mtlSamplerState = [mtlDevice newSamplerStateWithDescriptor:mtlDescriptor]; + + [mtlDescriptor release]; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/Utils.h b/cocos/renderer/backend/metal/Utils.h new file mode 100644 index 000000000000..12dd2392b679 --- /dev/null +++ b/cocos/renderer/backend/metal/Utils.h @@ -0,0 +1,29 @@ +#pragma once + +#include "../Macros.h" +#include "../Types.h" +#import + +CC_BACKEND_BEGIN + +class Utils +{ +public: + static void updateDefaultColorAttachmentTexture(id texture); + static MTLPixelFormat getDefaultDepthStencilAttachmentPixelFormat(); + static MTLPixelFormat getDefaultColorAttachmentPixelFormat(); + static id getDefaultDepthStencilTexture(); + + + static MTLPixelFormat toMTLPixelFormat(TextureFormat textureFormat); + static void generateMipmaps(id texture); + +private: + static id createDepthStencilAttachmentTexture(); + + + static id _defaultColorAttachmentTexture; + static id _defaultDepthStencilAttachmentTexture; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/metal/Utils.mm b/cocos/renderer/backend/metal/Utils.mm new file mode 100644 index 000000000000..eae1b493b4c4 --- /dev/null +++ b/cocos/renderer/backend/metal/Utils.mm @@ -0,0 +1,98 @@ +#include "Utils.h" +#include "DeviceMTL.h" + +#define COLOR_ATTAHCMENT_PIXEL_FORMAT MTLPixelFormatBGRA8Unorm +#define DEPTH_STENCIL_ATTACHMENT_PIXEL_FORMAT MTLPixelFormatDepth32Float_Stencil8 + +CC_BACKEND_BEGIN + +id Utils::_defaultColorAttachmentTexture = nil; +id Utils::_defaultDepthStencilAttachmentTexture = nil; + +MTLPixelFormat Utils::getDefaultDepthStencilAttachmentPixelFormat() +{ + return DEPTH_STENCIL_ATTACHMENT_PIXEL_FORMAT; +} + +MTLPixelFormat Utils::getDefaultColorAttachmentPixelFormat() +{ + return COLOR_ATTAHCMENT_PIXEL_FORMAT; +} + +id Utils::getDefaultDepthStencilTexture() +{ + if (! _defaultDepthStencilAttachmentTexture) + _defaultDepthStencilAttachmentTexture = Utils::createDepthStencilAttachmentTexture(); + + return _defaultDepthStencilAttachmentTexture; +} + +void Utils::updateDefaultColorAttachmentTexture(id texture) +{ + Utils::_defaultColorAttachmentTexture = texture; +} + +MTLPixelFormat Utils::toMTLPixelFormat(TextureFormat textureFormat) +{ + switch (textureFormat) + { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + case TextureFormat::MTL_ABGR4: + return MTLPixelFormatABGR4Unorm; + case TextureFormat::MTL_BGR5A1: + return MTLPixelFormatBGR5A1Unorm; + case TextureFormat::MTL_B5G6R5: + return MTLPixelFormatB5G6R5Unorm; + case TextureFormat::PVRTC4A: + return MTLPixelFormatPVRTC_RGBA_4BPP; + case TextureFormat::PVRTC4: + return MTLPixelFormatPVRTC_RGB_4BPP; + case TextureFormat::PVRTC2A: + return MTLPixelFormatPVRTC_RGBA_2BPP; + case TextureFormat::PVRTC2: + return MTLPixelFormatPVRTC_RGB_2BPP; +#endif + case TextureFormat::R8G8B8A8: + return MTLPixelFormatRGBA8Unorm; + // Should transfer the data to match pixel format when updating data. + case TextureFormat::R8G8B8: + return MTLPixelFormatRGBA8Unorm; + case TextureFormat::A8: + return MTLPixelFormatA8Unorm; + // Not all devices supports MTLPixelFormatDepth24Unorm_Stencil8, so change to MTLPixelFormatDepth32Float_Stencil8. + case TextureFormat::D24S8: + return MTLPixelFormatDepth32Float_Stencil8; + case TextureFormat::SYSTEM_DEFAULT: + return COLOR_ATTAHCMENT_PIXEL_FORMAT; + case TextureFormat::NONE: + default: + return MTLPixelFormatInvalid; + } +} + +id Utils::createDepthStencilAttachmentTexture() +{ + auto CAMetalLayer = DeviceMTL::getCAMetalLayer(); + MTLTextureDescriptor* textureDescriptor = [[MTLTextureDescriptor alloc] init]; + textureDescriptor.width = CAMetalLayer.drawableSize.width; + textureDescriptor.height = CAMetalLayer.drawableSize.height; + textureDescriptor.pixelFormat = DEPTH_STENCIL_ATTACHMENT_PIXEL_FORMAT; + textureDescriptor.resourceOptions = MTLResourceStorageModePrivate; + textureDescriptor.usage = MTLTextureUsageRenderTarget; + auto ret = [CAMetalLayer.device newTextureWithDescriptor:textureDescriptor]; + [textureDescriptor release]; + + return ret; +} + +void Utils::generateMipmaps(id texture) +{ + auto commandQueue = static_cast(DeviceMTL::getInstance())->getMTLCommandQueue(); + auto commandBuffer = [commandQueue commandBuffer]; + id commandEncoder = [commandBuffer blitCommandEncoder]; + [commandEncoder generateMipmapsForTexture:texture]; + [commandEncoder endEncoding]; + [commandBuffer commit]; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/BlendStateGL.cpp b/cocos/renderer/backend/opengl/BlendStateGL.cpp new file mode 100644 index 000000000000..0673e88bda94 --- /dev/null +++ b/cocos/renderer/backend/opengl/BlendStateGL.cpp @@ -0,0 +1,113 @@ +#include "BlendStateGL.h" + +CC_BACKEND_BEGIN + +namespace +{ + GLenum toGLBlendOperation(BlendOperation blendOperation) + { + GLenum ret = GL_FUNC_ADD; + switch (blendOperation) + { + case BlendOperation::ADD: + ret = GL_FUNC_ADD; + break; + case BlendOperation::SUBTRACT: + ret = GL_FUNC_SUBTRACT; + break; + case BlendOperation::RESERVE_SUBTRACT: + ret = GL_FUNC_REVERSE_SUBTRACT; + break; + default: + break; + } + return ret; + } + + GLenum toGLBlendFactor(BlendFactor blendFactor) + { + GLenum ret = GL_ONE; + switch (blendFactor) + { + case BlendFactor::ZERO: + ret = GL_ZERO; + break; + case BlendFactor::ONE: + ret = GL_ONE; + break; + case BlendFactor::SRC_COLOR: + ret = GL_SRC_COLOR; + break; + case BlendFactor::ONE_MINUS_SRC_COLOR: + ret = GL_ONE_MINUS_SRC_COLOR; + break; + case BlendFactor::SRC_ALPHA: + ret = GL_SRC_ALPHA; + break; + case BlendFactor::ONE_MINUS_SRC_ALPHA: + ret = GL_ONE_MINUS_SRC_ALPHA; + break; + case BlendFactor::DST_COLOR: + ret = GL_DST_COLOR; + break; + case BlendFactor::ONE_MINUS_DST_COLOR: + ret = GL_ONE_MINUS_DST_COLOR; + break; + case BlendFactor::DST_ALPHA: + ret = GL_DST_ALPHA; + break; + case BlendFactor::ONE_MINUS_DST_ALPHA: + ret = GL_ONE_MINUS_DST_ALPHA; + break; + case BlendFactor::SRC_ALPHA_SATURATE: + ret = GL_SRC_ALPHA_SATURATE; + break; + case BlendFactor::BLEND_CLOLOR: + ret = GL_BLEND_COLOR; + break; + default: + break; + } + return ret; + } +} + +void BlendStateGL::reset() +{ + glDisable(GL_BLEND); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); +} + +BlendStateGL::BlendStateGL(const BlendDescriptor& descriptor) +: _blendEnabled(descriptor.blendEnabled) +, _rgbBlendOperation(toGLBlendOperation(descriptor.rgbBlendOperation)) +, _alphaBlendOperation(toGLBlendOperation(descriptor.alphaBlendOperation)) +, _sourceRGBBlendFactor(toGLBlendFactor(descriptor.sourceRGBBlendFactor)) +, _destinationRGBBlendFactor(toGLBlendFactor(descriptor.destinationRGBBlendFactor)) +, _sourceAlphaBlendFactor(toGLBlendFactor(descriptor.sourceAlphaBlendFactor)) +, _destinationAlphaBlendFactor(toGLBlendFactor(descriptor.destinationAlphaBlendFactor)) +, _writeMaskRed((uint32_t)descriptor.writeMask & (uint32_t)ColorWriteMask::RED) +, _writeMaskGreen((uint32_t)descriptor.writeMask & (uint32_t)ColorWriteMask::GREEN) +, _writeMaskBlue((uint32_t)descriptor.writeMask & (uint32_t)ColorWriteMask::BLUE) +, _writeMaskAlpha((uint32_t)descriptor.writeMask & (uint32_t)ColorWriteMask::ALPHA) +{ +} + +void BlendStateGL::apply() const +{ + if (_blendEnabled) + { + glEnable(GL_BLEND); + glBlendEquationSeparate(_rgbBlendOperation, _alphaBlendOperation); + glBlendFuncSeparate(_sourceRGBBlendFactor, + _destinationRGBBlendFactor, + _sourceAlphaBlendFactor, + _destinationAlphaBlendFactor); + } + else + glDisable(GL_BLEND); + + glColorMask(_writeMaskRed, _writeMaskGreen, _writeMaskBlue, _writeMaskAlpha); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/BlendStateGL.h b/cocos/renderer/backend/opengl/BlendStateGL.h new file mode 100644 index 000000000000..7d2b71589ca5 --- /dev/null +++ b/cocos/renderer/backend/opengl/BlendStateGL.h @@ -0,0 +1,35 @@ +#pragma once + +#include "../BlendState.h" +#include "platform/CCGL.h" + +CC_BACKEND_BEGIN + +class BlendStateGL : public BlendState +{ +public: + // Reset to default state. + static void reset(); + + BlendStateGL(const BlendDescriptor& descriptor); + + void apply() const; + +private: + GLboolean _writeMaskRed = GL_TRUE; + GLboolean _writeMaskGreen = GL_TRUE; + GLboolean _writeMaskBlue = GL_TRUE; + GLboolean _writeMaskAlpha = GL_TRUE; + + bool _blendEnabled = false; + + GLenum _rgbBlendOperation = GL_FUNC_ADD; + GLenum _alphaBlendOperation = GL_FUNC_ADD; + + GLenum _sourceRGBBlendFactor = GL_ONE; + GLenum _destinationRGBBlendFactor = GL_ZERO; + GLenum _sourceAlphaBlendFactor = GL_ONE; + GLenum _destinationAlphaBlendFactor = GL_ZERO; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/BufferGL.cpp b/cocos/renderer/backend/opengl/BufferGL.cpp new file mode 100644 index 000000000000..c7fddb38924a --- /dev/null +++ b/cocos/renderer/backend/opengl/BufferGL.cpp @@ -0,0 +1,57 @@ +#include "BufferGL.h" +#include + +CC_BACKEND_BEGIN + +BufferGL::BufferGL(unsigned int size, BufferType type, BufferUsage usage) +: Buffer(size, type, usage) +{ + glGenBuffers(1, &_buffer); +} + +BufferGL::~BufferGL() +{ + if (_buffer) + glDeleteBuffers(1, &_buffer); +} + +void BufferGL::updateData(void* data, unsigned int size) +{ + assert(size); + + if (_buffer) + { + if (BufferType::VERTEX == _type) + { + glBindBuffer(GL_ARRAY_BUFFER, _buffer); + glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW); + } + else + { + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffer); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, data, GL_STATIC_DRAW); + + } + } +} + +void BufferGL::updateSubData(void* data, unsigned int offset, unsigned int size) +{ + assert(offset + size <= _size); + + if (_buffer) + { + if (BufferType::VERTEX == _type) + { + glBindBuffer(GL_ARRAY_BUFFER, _buffer); + glBufferSubData(GL_ARRAY_BUFFER, offset, size, data); + } + else + { + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffer); + glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, size, data); + } + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/BufferGL.h b/cocos/renderer/backend/opengl/BufferGL.h new file mode 100644 index 000000000000..3f435c62c9db --- /dev/null +++ b/cocos/renderer/backend/opengl/BufferGL.h @@ -0,0 +1,24 @@ +#pragma once + +#include "../Buffer.h" + +#include "platform/CCGL.h" + +CC_BACKEND_BEGIN + +class BufferGL : public Buffer +{ +public: + BufferGL(unsigned int size, BufferType type, BufferUsage usage); + ~BufferGL(); + + virtual void updateData(void* data, unsigned int size) override; + virtual void updateSubData(void* data, unsigned int offset, unsigned int size) override; + + inline GLuint getHandler() const { return _buffer; } + +private: + GLuint _buffer = 0; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/CommandBufferGL.cpp b/cocos/renderer/backend/opengl/CommandBufferGL.cpp new file mode 100644 index 000000000000..06cc4b41298c --- /dev/null +++ b/cocos/renderer/backend/opengl/CommandBufferGL.cpp @@ -0,0 +1,515 @@ +#include "CommandBufferGL.h" +#include "BufferGL.h" +#include "RenderPipelineGL.h" +#include "TextureGL.h" +#include "DepthStencilStateGL.h" +#include "ProgramGL.h" +#include "BlendStateGL.h" +#include "base/ccMacros.h" + +CC_BACKEND_BEGIN + +namespace +{ + GLenum toGLPrimitiveType(PrimitiveType primitiveType) + { + GLenum ret = GL_TRIANGLES; + switch (primitiveType) + { + case PrimitiveType::POINT: + ret = GL_POINTS; + break; + case PrimitiveType::LINE: + ret = GL_LINES; + break; + case PrimitiveType::LINE_STRIP: + ret = GL_LINE_STRIP; + break; + case PrimitiveType::TRIANGLE: + ret = GL_TRIANGLES; + break; + case PrimitiveType::TRIANGLE_STRIP: + ret = GL_TRIANGLE_STRIP; + break; + default: + break; + } + return ret; + } + + GLenum toGLIndexType(IndexFormat indexType) + { + GLenum ret = GL_BYTE; + switch (indexType) + { + case IndexFormat::U_INT: + ret = GL_UNSIGNED_INT; + break; + case IndexFormat::U_SHORT: + ret = GL_UNSIGNED_SHORT; + break; + default: + break; + } + return ret; + } + + GLenum toGLCullMode(CullMode mode) + { + if (CullMode::BACK == mode) + return GL_BACK; + else + return GL_FRONT; + } +} + +CommandBufferGL::CommandBufferGL() +{ + glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO); +} + +CommandBufferGL::~CommandBufferGL() +{ + cleanResources(); +} + +void CommandBufferGL::beginFrame() +{ +} + +void CommandBufferGL::beginRenderPass(const RenderPassDescriptor& descirptor) +{ + applyRenderPassDescriptor(descirptor); +} + +void CommandBufferGL::applyRenderPassDescriptor(const RenderPassDescriptor& descirptor) +{ + bool useColorAttachmentExternal = descirptor.needColorAttachment && descirptor.colorAttachmentsTexture[0]; + bool useDepthAttachmentExternal = descirptor.needDepthAttachment && descirptor.depthAttachmentTexture; + bool useStencilAttachmentExternal = descirptor.needStencilAttachment && descirptor.stencilAttachmentTexture; + if (useColorAttachmentExternal || useDepthAttachmentExternal || useStencilAttachmentExternal) + { + glGenFramebuffers(1, &_currentFBO); + } + else + { + _currentFBO = _defaultFBO; + } + glBindFramebuffer(GL_FRAMEBUFFER, _currentFBO); + + if (useDepthAttachmentExternal) + { + auto depthTexture = static_cast(descirptor.depthAttachmentTexture); + glFramebufferTexture2D(GL_FRAMEBUFFER, + GL_DEPTH_ATTACHMENT, + GL_TEXTURE_2D, + depthTexture->getHandler(), + 0); + CHECK_GL_ERROR_DEBUG(); + } + + if (useStencilAttachmentExternal) + { + auto stencilTexture = static_cast(descirptor.depthAttachmentTexture); + glFramebufferTexture2D(GL_FRAMEBUFFER, + GL_STENCIL_ATTACHMENT, + GL_TEXTURE_2D, + stencilTexture->getHandler(), + 0); + CHECK_GL_ERROR_DEBUG(); + } + + if (descirptor.needColorAttachment) + { + int i = 0; + for (const auto& texture : descirptor.colorAttachmentsTexture) + { + if (texture) + { + // TODO: support texture cube + auto textureGL = static_cast(texture); + glFramebufferTexture2D(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0 + i, + GL_TEXTURE_2D, + textureGL->getHandler(), + 0); + } + CHECK_GL_ERROR_DEBUG(); + ++i; + } + } + else + { + // If not draw buffer is needed, should invoke this line explicitly, or it will cause + // GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER and GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER error. + // https://stackoverflow.com/questions/28313782/porting-opengl-es-framebuffer-to-opengl +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + glDrawBuffer(GL_NONE); + glReadBuffer(GL_NONE); +#endif + } + CHECK_GL_ERROR_DEBUG(); + + // set clear color, depth and stencil + GLbitfield mask = 0; + if (descirptor.needClearColor) + { + mask |= GL_COLOR_BUFFER_BIT; + const auto& clearColor = descirptor.clearColorValue; + glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); + } + + CHECK_GL_ERROR_DEBUG(); + + GLboolean oldDepthWrite = GL_FALSE; + GLboolean oldDepthTest = GL_FALSE; + GLfloat oldDepthClearValue = 0.f; + GLint oldDepthFunc = GL_LESS; + if (descirptor.needClearDepth) + { + glGetBooleanv(GL_DEPTH_WRITEMASK, &oldDepthWrite); + glGetBooleanv(GL_DEPTH_TEST, &oldDepthTest); + glGetFloatv(GL_DEPTH_CLEAR_VALUE, &oldDepthClearValue); + glGetIntegerv(GL_DEPTH_FUNC, &oldDepthFunc); + + mask |= GL_DEPTH_BUFFER_BIT; + glClearDepth(descirptor.clearDepthValue); + glEnable(GL_DEPTH_TEST); + glDepthMask(GL_TRUE); + glDepthFunc(GL_ALWAYS); + } + + CHECK_GL_ERROR_DEBUG(); + + if (descirptor.needClearStencil) + { + mask |= GL_STENCIL_BUFFER_BIT; + glClearStencil(descirptor.clearStencilValue); + } + glClear(mask); + + CHECK_GL_ERROR_DEBUG(); + + // restore depth test + if (descirptor.needClearDepth) + { + if (!oldDepthTest) + glDisable(GL_DEPTH_TEST); + + glDepthMask(oldDepthWrite); + glDepthFunc(oldDepthFunc); + glClearDepth(oldDepthClearValue); + } + + CHECK_GL_ERROR_DEBUG(); +} + +void CommandBufferGL::setRenderPipeline(RenderPipeline* renderPipeline) +{ + assert(renderPipeline != nullptr); + if (renderPipeline == nullptr) + return; + + RenderPipelineGL* rp = static_cast(renderPipeline); + rp->retain(); + CC_SAFE_RELEASE(_renderPipeline); + _renderPipeline = rp; +} + +void CommandBufferGL::setViewport(int x, int y, unsigned int w, unsigned int h) +{ + _viewport.x = x; + _viewport.y = y; + _viewport.w = w; + _viewport.h = h; +} + +void CommandBufferGL::setCullMode(CullMode mode) +{ + _cullMode = mode; +} + +void CommandBufferGL::setIndexBuffer(Buffer* buffer) +{ + assert(buffer != nullptr); + if (buffer == nullptr) + return; + + buffer->retain(); + CC_SAFE_RELEASE(_indexBuffer); + _indexBuffer = static_cast(buffer); +} + +void CommandBufferGL::setVertexBuffer(unsigned int index, Buffer* buffer) +{ + assert(buffer != nullptr); + if (buffer == nullptr) + return; + + buffer->retain(); + + if (index >= _vertexBuffers.size()) + _vertexBuffers.resize(index + 1); + + CC_SAFE_RELEASE(_vertexBuffers[index]); + _vertexBuffers[index] = static_cast(buffer); +} + +void CommandBufferGL::setProgramState(ProgramState* programState) +{ + CC_SAFE_RETAIN(programState); + CC_SAFE_RELEASE(_programState); + _programState = programState; +} + +void CommandBufferGL::drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count) +{ + prepareDrawing(); + glDrawArrays(toGLPrimitiveType(primitiveType), start, count); + + cleanResources(); +} + +void CommandBufferGL::drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset) +{ + prepareDrawing(); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer->getHandler()); + glDrawElements(toGLPrimitiveType(primitiveType), count, toGLIndexType(indexType), (GLvoid*)offset); + + cleanResources(); +} + +void CommandBufferGL::endRenderPass() +{ +} + +void CommandBufferGL::endFrame() +{ +} + +void CommandBufferGL::prepareDrawing() const +{ + glViewport(_viewport.x, _viewport.y, _viewport.w, _viewport.h); + + const auto& program = _renderPipeline->getProgram(); + glUseProgram(program->getHandler()); + + bindVertexBuffer(program); + setUniforms(program); + + // Set depth/stencil state. + if (_renderPipeline->getDepthStencilState()) + _renderPipeline->getDepthStencilState()->apply(_stencilReferenceValueFront, + _stencilReferenceValueBack); + else + DepthStencilStateGL::reset(); + + // Set blend state. + if (_renderPipeline->getBlendState()) + _renderPipeline->getBlendState()->apply(); + else + BlendStateGL::reset(); + + // Set cull mode. + if (CullMode::NONE == _cullMode) + { + glDisable(GL_CULL_FACE); + } + else + { + glEnable(GL_CULL_FACE); + glCullFace(toGLCullMode(_cullMode)); + } +} + +void CommandBufferGL::bindVertexBuffer(ProgramGL *program) const +{ + // Bind vertex buffers and set the attributes. + int i = 0; + const auto& attributeInfos = program->getAttributeInfos(); + for (const auto& vertexBuffer : _vertexBuffers) + { + if (! vertexBuffer) + continue; + + glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer->getHandler()); + + const auto& attributeInfo = attributeInfos[i]; + for (const auto& attribute : attributeInfo) + { + glEnableVertexAttribArray(attribute.location); + glVertexAttribPointer(attribute.location, + attribute.size, + attribute.type, + attribute.needToBeNormallized, + attribute.stride, + (GLvoid*)attribute.offset); + } + + ++i; + } +} + +void CommandBufferGL::setUniforms(ProgramGL* program) const +{ + if (_programState) + { + const auto& uniformInfos = _programState->getVertexUniformInfos(); + for(const auto& iter : uniformInfos) + { + const auto& uniformInfo = iter.uniformInfo; + if(!iter.dirty) + continue; + setUniform(uniformInfo.isArray, + uniformInfo.location, + uniformInfo.count, + uniformInfo.type, + iter.data); + } + + const auto& textureInfo = _programState->getVertexTextureInfos(); + for(const auto& iter : textureInfo) + { + const auto& textures = iter.second.textures; + const auto& slot = iter.second.slot; + + int i = 0; + for (const auto& texture: textures) + { + static_cast(texture)->apply(slot[i]); + ++i; + } + + auto arrayCount = slot.size(); + if (arrayCount > 1) + glUniform1iv(iter.first, (uint32_t)arrayCount, (GLint*)slot.data()); + else + glUniform1i(iter.first, slot[0]); + } + } +} + +#define DEF_TO_INT(pointer, index) (*((GLint*)(pointer) + index)) +#define DEF_TO_FLOAT(pointer, index) (*((GLfloat*)(pointer) + index)) +void CommandBufferGL::setUniform(bool isArray, GLuint location, unsigned int size, GLenum uniformType, void* data) const +{ + GLsizei count = size; + switch (uniformType) + { + case GL_INT: + case GL_BOOL: + case GL_SAMPLER_2D: + case GL_SAMPLER_CUBE: + if (isArray) + glUniform1iv(location, count, (GLint*)data); + else + glUniform1i(location, DEF_TO_INT(data, 0)); + break; + case GL_INT_VEC2: + case GL_BOOL_VEC2: + if (isArray) + glUniform2iv(location, count, (GLint*)data); + else + glUniform2i(location, DEF_TO_INT(data, 0), DEF_TO_INT(data, 1)); + break; + case GL_INT_VEC3: + case GL_BOOL_VEC3: + if (isArray) + glUniform3iv(location, count, (GLint*)data); + else + glUniform3i(location, + DEF_TO_INT(data, 0), + DEF_TO_INT(data, 1), + DEF_TO_INT(data, 2)); + break; + case GL_INT_VEC4: + case GL_BOOL_VEC4: + if (isArray) + glUniform4iv(location, count, (GLint*)data); + else + glUniform4i(location, + DEF_TO_INT(data, 0), + DEF_TO_INT(data, 1), + DEF_TO_INT(data, 2), + DEF_TO_INT(data, 4)); + break; + case GL_FLOAT: + if (isArray) + glUniform1fv(location, count, (GLfloat*)data); + else + glUniform1f(location, DEF_TO_FLOAT(data, 0)); + break; + case GL_FLOAT_VEC2: + if (isArray) + glUniform2fv(location, count, (GLfloat*)data); + else + glUniform2f(location, DEF_TO_FLOAT(data, 0), DEF_TO_FLOAT(data, 1)); + break; + case GL_FLOAT_VEC3: + if (isArray) + glUniform3fv(location, count, (GLfloat*)data); + else + glUniform3f(location, + DEF_TO_FLOAT(data, 0), + DEF_TO_FLOAT(data, 1), + DEF_TO_FLOAT(data, 2)); + break; + case GL_FLOAT_VEC4: + if (isArray) + glUniform4fv(location, count, (GLfloat*)data); + else + glUniform4f(location, + DEF_TO_FLOAT(data, 0), + DEF_TO_FLOAT(data, 1), + DEF_TO_FLOAT(data, 2), + DEF_TO_FLOAT(data, 3)); + break; + case GL_FLOAT_MAT2: + glUniformMatrix2fv(location, count, GL_FALSE, (GLfloat*)data); + break; + case GL_FLOAT_MAT3: + glUniformMatrix3fv(location, count, GL_FALSE, (GLfloat*)data); + break; + case GL_FLOAT_MAT4: + glUniformMatrix4fv(location, count, GL_FALSE, (GLfloat*)data); + break; + break; + + default: + break; + } +} + +void CommandBufferGL::cleanResources() +{ + CC_SAFE_RELEASE_NULL(_indexBuffer); + CC_SAFE_RELEASE_NULL(_renderPipeline); + CC_SAFE_RELEASE_NULL(_programState); + + for (const auto& vertexBuffer : _vertexBuffers) + CC_SAFE_RELEASE(vertexBuffer); + + _vertexBuffers.clear(); +} + +void CommandBufferGL::setLineWidth(float lineWidth) +{ + if(lineWidth > 0.0f) + glLineWidth(lineWidth); +} + + +void CommandBufferGL::setScissorRect(bool isEnabled, float x, float y, float width, float height) +{ + if(isEnabled) + { + glEnable(GL_SCISSOR_TEST); + glScissor(x, y, width, height); + } + else + { + glDisable(GL_SCISSOR_TEST); + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/CommandBufferGL.h b/cocos/renderer/backend/opengl/CommandBufferGL.h new file mode 100644 index 000000000000..007b2bf0a2a5 --- /dev/null +++ b/cocos/renderer/backend/opengl/CommandBufferGL.h @@ -0,0 +1,67 @@ +#pragma once + +#include "../Macros.h" +#include "../CommandBuffer.h" + +#include "platform/CCGL.h" + +#include "CCStdC.h" + +#include + +CC_BACKEND_BEGIN + +class BufferGL; +class RenderPipelineGL; +class ProgramGL; + +class CommandBufferGL : public CommandBuffer +{ +public: + CommandBufferGL(); + ~CommandBufferGL(); + + virtual void beginFrame() override; + virtual void beginRenderPass(const RenderPassDescriptor& descriptor) override; + virtual void setRenderPipeline(RenderPipeline* renderPipeline) override; + virtual void setViewport(int x, int y, unsigned int w, unsigned int h) override; + virtual void setCullMode(CullMode mode) override; + virtual void setVertexBuffer(unsigned int index, Buffer* buffer) override; + virtual void setProgramState(ProgramState* programState) override; + virtual void setIndexBuffer(Buffer* buffer) override; + virtual void drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count) override; + virtual void drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset) override; + virtual void endRenderPass() override; + virtual void endFrame() override; + + virtual void setLineWidth(float lineWidth) override; + + virtual void setScissorRect(bool isEnabled, float x, float y, float width, float height) override; + +private: + struct Viewport + { + int x = 0; + int y = 0; + unsigned int w = 0; + unsigned int h = 0; + }; + + void prepareDrawing() const; + void bindVertexBuffer(ProgramGL* program) const; + void setUniforms(ProgramGL* program) const; + void setUniform(bool isArray, GLuint location, unsigned int size, GLenum uniformType, void* data) const; + void cleanResources(); + void applyRenderPassDescriptor(const RenderPassDescriptor& descirptor); + + struct Viewport _viewport; + GLint _defaultFBO = 0; + GLuint _currentFBO = 0; + std::vector _vertexBuffers; + ProgramState* _programState = nullptr; + BufferGL* _indexBuffer = nullptr; + RenderPipelineGL* _renderPipeline = nullptr; + CullMode _cullMode = CullMode::NONE; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/DepthStencilStateGL.cpp b/cocos/renderer/backend/opengl/DepthStencilStateGL.cpp new file mode 100644 index 000000000000..0e1f0a8cafc2 --- /dev/null +++ b/cocos/renderer/backend/opengl/DepthStencilStateGL.cpp @@ -0,0 +1,150 @@ +#include "DepthStencilStateGL.h" +#include "platform/CCGL.h" + +#include "base/ccMacros.h" + +CC_BACKEND_BEGIN + +namespace +{ + GLenum toGLComareFunction(CompareFunction compareFunction) + { + GLenum ret = GL_ALWAYS; + switch (compareFunction) + { + case CompareFunction::NEVER: + ret = GL_NEVER; + break; + case CompareFunction::LESS: + ret = GL_LESS; + break; + case CompareFunction::LESS_EQUAL: + ret = GL_LEQUAL; + break; + case CompareFunction::GREATER: + ret = GL_GREATER; + break; + case CompareFunction::GREATER_EQUAL: + ret = GL_GEQUAL; + break; + case CompareFunction::NOT_EQUAL: + ret = GL_NOTEQUAL; + break; + case CompareFunction::EQUAL: + ret = GL_EQUAL; + break; + case CompareFunction::ALWAYS: + ret = GL_ALWAYS; + break; + default: + break; + } + return ret; + } + + GLenum toGLStencilOperation(StencilOperation stencilOperation) + { + GLenum ret = GL_KEEP; + switch (stencilOperation) + { + case StencilOperation::KEEP: + ret = GL_KEEP; + break; + case StencilOperation::ZERO: + ret = GL_ZERO; + break; + case StencilOperation::REPLACE: + ret = GL_REPLACE; + break; + case StencilOperation::INVERT: + ret = GL_INVERT; + break; + case StencilOperation::INCREMENT_WRAP: + ret = GL_INCR_WRAP; + break; + case StencilOperation::DECREMENT_WRAP: + ret = GL_DECR_WRAP; + break; + default: + break; + } + return ret; + } +} + +void DepthStencilStateGL::reset() +{ + glDisable(GL_DEPTH_TEST); + glDisable(GL_STENCIL_TEST); +} + +DepthStencilStateGL::DepthStencilStateGL(const DepthStencilDescriptor& descriptor) +: DepthStencilState(descriptor) +{} + +void DepthStencilStateGL::apply(unsigned int stencilReferenceValueFront, unsigned int stencilReferenceValueBack) const +{ + // depth test + + if (_depthStencilInfo.depthCompareFunction == CompareFunction::ALWAYS && + !_depthStencilInfo.depthWriteEnabled) + { + glDisable(GL_DEPTH_TEST); + } + else + glEnable(GL_DEPTH_TEST); + + if (_depthStencilInfo.depthWriteEnabled) + glDepthMask(GL_TRUE); + else + glDepthMask(GL_FALSE); + + glDepthFunc(toGLComareFunction(_depthStencilInfo.depthCompareFunction)); + + if (_depthStencilInfo.depthTestEnabled) + glEnable(GL_STENCIL_TEST); + else + glDisable(GL_STENCIL_TEST); + + // stencil test + if (_depthStencilInfo.stencilTestEnabled) + { + if (_isBackFrontStencilEqual) + { + glStencilFunc(toGLComareFunction(_depthStencilInfo.frontFaceStencil.stencilCompareFunction), + stencilReferenceValueFront, + _depthStencilInfo.frontFaceStencil.readMask); + glStencilOp(toGLStencilOperation(_depthStencilInfo.frontFaceStencil.stencilFailureOperation), + toGLStencilOperation(_depthStencilInfo.frontFaceStencil.depthFailureOperation), + toGLStencilOperation(_depthStencilInfo.frontFaceStencil.depthStencilPassOperation)); + glStencilMask(_depthStencilInfo.frontFaceStencil.writeMask); + } + else + { + glStencilFuncSeparate(GL_BACK, + toGLComareFunction(_depthStencilInfo.backFaceStencil.stencilCompareFunction), + stencilReferenceValueBack, + _depthStencilInfo.backFaceStencil.readMask); + glStencilFuncSeparate(GL_FRONT, + toGLComareFunction(_depthStencilInfo.frontFaceStencil.stencilCompareFunction), + stencilReferenceValueFront, + _depthStencilInfo.frontFaceStencil.readMask); + + glStencilOpSeparate(GL_BACK, + toGLStencilOperation(_depthStencilInfo.backFaceStencil.stencilFailureOperation), + toGLStencilOperation(_depthStencilInfo.backFaceStencil.depthFailureOperation), + toGLStencilOperation(_depthStencilInfo.backFaceStencil.depthStencilPassOperation)); + glStencilOpSeparate(GL_FRONT, + toGLStencilOperation(_depthStencilInfo.frontFaceStencil.stencilFailureOperation), + toGLStencilOperation(_depthStencilInfo.frontFaceStencil.depthFailureOperation), + toGLStencilOperation(_depthStencilInfo.frontFaceStencil.depthStencilPassOperation)); + + glStencilMaskSeparate(GL_BACK, _depthStencilInfo.backFaceStencil.writeMask); + glStencilMaskSeparate(GL_FRONT, _depthStencilInfo.frontFaceStencil.writeMask); + } + } + + CHECK_GL_ERROR_DEBUG(); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/DepthStencilStateGL.h b/cocos/renderer/backend/opengl/DepthStencilStateGL.h new file mode 100644 index 000000000000..44fed7c7448f --- /dev/null +++ b/cocos/renderer/backend/opengl/DepthStencilStateGL.h @@ -0,0 +1,17 @@ +#pragma once + +#include "../DepthStencilState.h" + +CC_BACKEND_BEGIN + +class DepthStencilStateGL : public DepthStencilState +{ +public: + // Reset to default state. + static void reset(); + + DepthStencilStateGL(const DepthStencilDescriptor& descriptor); + void apply(unsigned int stencilReferenceValueFront, unsigned int stencilReferenceValueBack) const; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/DeviceGL.cpp b/cocos/renderer/backend/opengl/DeviceGL.cpp new file mode 100644 index 000000000000..4899138360b5 --- /dev/null +++ b/cocos/renderer/backend/opengl/DeviceGL.cpp @@ -0,0 +1,79 @@ +#include "DeviceGL.h" +#include "RenderPipelineGL.h" +#include "BufferGL.h" +#include "ShaderModuleGL.h" +#include "CommandBufferGL.h" +#include "TextureGL.h" +#include "DepthStencilStateGL.h" +#include "BlendStateGL.h" +#include "ProgramGL.h" + +CC_BACKEND_BEGIN + +Device* Device::getInstance() +{ + if (!_instance) + _instance = new (std::nothrow) DeviceGL(); + + return _instance; +} + +DeviceGL::DeviceGL() +{ + ProgramCache::getInstance(); +} + +DeviceGL::~DeviceGL() +{ + ProgramCache::destroyInstance(); +} + +CommandBuffer* DeviceGL::newCommandBuffer() +{ + return new (std::nothrow) CommandBufferGL(); +} + +Buffer* DeviceGL::newBuffer(unsigned int size, BufferType type, BufferUsage usage) +{ + return new (std::nothrow) BufferGL(size, type, usage); +} + +Texture* DeviceGL::newTexture(const TextureDescriptor& descriptor) +{ + return new (std::nothrow) TextureGL(descriptor); +} + +ShaderModule* DeviceGL::newShaderModule(ShaderStage stage, const std::string& source) +{ + return new (std::nothrow) ShaderModuleGL(stage, source); +} + +DepthStencilState* DeviceGL::createDepthStencilState(const DepthStencilDescriptor& descriptor) +{ + auto ret = new (std::nothrow) DepthStencilStateGL(descriptor); + if (ret) + ret->autorelease(); + + return ret; +} + +BlendState* DeviceGL::createBlendState(const BlendDescriptor& descriptor) +{ + auto ret = new (std::nothrow) BlendStateGL(descriptor); + if (ret) + ret->autorelease(); + + return ret; +} + +RenderPipeline* DeviceGL::newRenderPipeline(const RenderPipelineDescriptor& descriptor) +{ + return new (std::nothrow) RenderPipelineGL(descriptor); +} + +Program* DeviceGL::newProgram(const std::string& vertexShader, const std::string& fragmentShader) +{ + return new (std::nothrow) ProgramGL(vertexShader, fragmentShader); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/DeviceGL.h b/cocos/renderer/backend/opengl/DeviceGL.h new file mode 100644 index 000000000000..3b4623a16c7e --- /dev/null +++ b/cocos/renderer/backend/opengl/DeviceGL.h @@ -0,0 +1,24 @@ +#include "../Device.h" + +CC_BACKEND_BEGIN + +class DeviceGL : public Device +{ +public: + DeviceGL(); + ~DeviceGL(); + + virtual CommandBuffer* newCommandBuffer() override; + virtual Buffer* newBuffer(unsigned int size, BufferType type, BufferUsage usage) override; + virtual Texture* newTexture(const TextureDescriptor& descriptor) override; + virtual DepthStencilState* createDepthStencilState(const DepthStencilDescriptor& descriptor) override; + virtual BlendState* createBlendState(const BlendDescriptor& descriptor) override; + virtual RenderPipeline* newRenderPipeline(const RenderPipelineDescriptor& descriptor) override; + +protected: + virtual ShaderModule* newShaderModule(ShaderStage stage, const std::string& source) override; + virtual Program* newProgram(const std::string& vertexShader, const std::string& fragmentShader) override; + +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/ProgramGL.cpp b/cocos/renderer/backend/opengl/ProgramGL.cpp new file mode 100644 index 000000000000..c81b6539f4b3 --- /dev/null +++ b/cocos/renderer/backend/opengl/ProgramGL.cpp @@ -0,0 +1,269 @@ +#include "ProgramGL.h" +#include "ShaderModuleGL.h" + +CC_BACKEND_BEGIN + +namespace +{ + GLenum toGLAttributeType(VertexFormat vertexFormat) + { + GLenum ret = GL_INT; + switch (vertexFormat) + { + case VertexFormat::FLOAT_R32G32B32A32: + case VertexFormat::FLOAT_R32G32B32: + case VertexFormat::FLOAT_R32G32: + case VertexFormat::FLOAT_R32: + ret = GL_FLOAT; + break; + case VertexFormat::INT_R32G32B32A32: + case VertexFormat::INT_R32G32B32: + case VertexFormat::INT_R32G32: + case VertexFormat::INT_R32: + ret = GL_INT; + break; + case VertexFormat::UBYTE_R8G8B8A8: + ret = GL_UNSIGNED_BYTE; + break; + default: + break; + } + return ret; + } + + GLsizei getGLAttributeSize(VertexFormat vertexFormat) + { + GLsizei ret = 0; + switch (vertexFormat) + { + case VertexFormat::FLOAT_R32G32B32A32: + case VertexFormat::INT_R32G32B32A32: + case VertexFormat::UBYTE_R8G8B8A8: + ret = 4; + break; + case VertexFormat::FLOAT_R32G32B32: + case VertexFormat::INT_R32G32B32: + ret = 3; + break; + case VertexFormat::FLOAT_R32G32: + case VertexFormat::INT_R32G32: + ret = 2; + break; + case VertexFormat::FLOAT_R32: + case VertexFormat::INT_R32: + ret = 1; + break; + default: + break; + } + return ret; + } + + GLsizei getUniformSize(GLenum size) + { + GLsizei ret = 0; + switch (size) + { + case GL_BOOL: + case GL_BYTE: + case GL_UNSIGNED_BYTE: + ret = sizeof(GLbyte); + break; + case GL_BOOL_VEC2: + case GL_SHORT: + case GL_UNSIGNED_SHORT: + ret = sizeof(GLshort); + break; + case GL_BOOL_VEC3: + ret = sizeof(GLboolean); + break; + case GL_BOOL_VEC4: + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + ret = sizeof(GLfloat) * 4; + break; + case GL_FLOAT_VEC2: + case GL_INT_VEC2: + ret = sizeof(GLfloat) * 2; + break; + case GL_FLOAT_VEC3: + case GL_INT_VEC3: + ret = sizeof(GLfloat) * 3; + break; + case GL_FLOAT_MAT2: + case GL_FLOAT_VEC4: + case GL_INT_VEC4: + ret = sizeof(GLfloat) * 4; + break; + case GL_FLOAT_MAT3: + ret = sizeof(GLfloat) * 9; + break; + case GL_FLOAT_MAT4: + ret = sizeof(GLfloat) * 16; + break; + default: + break; + } + return ret; + } +} + +ProgramGL::ProgramGL(const std::string& vertexShader, const std::string& fragmentShader) +: Program(vertexShader, fragmentShader) +{ + _vertexShaderModule = static_cast(ShaderCache::newVertexShaderModule(vertexShader)); + _fragmentShaderModule = static_cast(ShaderCache::newFragmentShaderModule(fragmentShader)); + + CC_SAFE_RETAIN(_vertexShaderModule); + CC_SAFE_RETAIN(_fragmentShaderModule); + compileProgram(); + computeUniformInfos(); +} + +ProgramGL::~ProgramGL() +{ + CC_SAFE_RELEASE(_vertexShaderModule); + CC_SAFE_RELEASE(_fragmentShaderModule); + if (_program) + glDeleteProgram(_program); +} + +void ProgramGL::compileProgram() +{ + if (_vertexShaderModule == nullptr || _fragmentShaderModule == nullptr) + return; + + auto vertShader = _vertexShaderModule->getShader(); + auto fragShader = _fragmentShaderModule->getShader(); + + assert (vertShader != 0 && fragShader != 0); + if (vertShader == 0 || fragShader == 0) + return; + + _program = glCreateProgram(); + if (!_program) + return; + + glAttachShader(_program, vertShader); + glAttachShader(_program, fragShader); + glLinkProgram(_program); + + GLint status = 0; + glGetProgramiv(_program, GL_LINK_STATUS, &status); + if (GL_FALSE == status) + { + printf("cocos2d: ERROR: %s: failed to link program ", __FUNCTION__); + glDeleteProgram(_program); + _program = 0; + } +} + +void ProgramGL::computeAttributeInfos(const RenderPipelineDescriptor& descriptor) +{ + const auto& vertexLayouts = descriptor.vertexLayouts; + for (const auto& vertexLayout : vertexLayouts) + { + if (! vertexLayout.isValid()) + continue; + + VertexAttributeArray vertexAttributeArray; + + const auto& attributes = vertexLayout.getAttributes(); + for (const auto& attribute : attributes) + { + AttributeInfo attributeInfo; + + if (!getAttributeLocation(attribute.name, attributeInfo.location)) + continue; + + attributeInfo.stride = vertexLayout.getStride(); + attributeInfo.offset = attribute.offset; + attributeInfo.type = toGLAttributeType(attribute.format); + attributeInfo.size = getGLAttributeSize(attribute.format); + attributeInfo.needToBeNormallized = attribute.needToBeNormallized; + + vertexAttributeArray.push_back(attributeInfo); + } + + _attributeInfos.push_back(std::move(vertexAttributeArray)); + } +} + +bool ProgramGL::getAttributeLocation(const std::string& attributeName, unsigned int& location) const +{ + GLint loc = glGetAttribLocation(_program, attributeName.c_str()); + if (-1 == loc) + { + printf("Cocos2d: %s: can not find vertex attribute of %s", __FUNCTION__, attributeName.c_str()); + return false; + } + + location = GLuint(loc); + return true; +} + +void ProgramGL::computeUniformInfos() +{ + if (!_program) + return; + + GLint numOfUniforms = 0; + glGetProgramiv(_program, GL_ACTIVE_UNIFORMS, &numOfUniforms); + if (!numOfUniforms) + return; + +#define MAX_UNIFORM_NAME_LENGTH 256 + UniformInfo uniform; + GLint length = 0; + GLchar* uniformName = (GLchar*)malloc(MAX_UNIFORM_NAME_LENGTH + 1); + for (int i = 0; i < numOfUniforms; ++i) + { + glGetActiveUniform(_program, i, MAX_UNIFORM_NAME_LENGTH, &length, &uniform.count, &uniform.type, uniformName); + uniformName[length] = '\0'; + + if (length > 3) + { + char* c = strrchr(uniformName, '['); + if (c) + { + *c = '\0'; + uniform.isArray = true; + } + } + uniform.location = glGetUniformLocation(_program, uniformName); + uniform.bufferSize = getUniformSize(uniform.type); + _uniformInfos[uniformName] = uniform; + + _maxLocation = _maxLocation <= uniform.location ? (uniform.location + 1) : _maxLocation; + } + free(uniformName); +} + +UniformLocation ProgramGL::getUniformLocation(const std::string& uniform) const +{ + UniformLocation uniformLocation; + uniformLocation.location = glGetUniformLocation(_program, uniform.c_str()); + return uniformLocation; +} + +const std::unordered_map& ProgramGL::getVertexUniformInfos() const +{ + return _uniformInfos; +} + +const std::unordered_map& ProgramGL::getFragmentUniformInfos() const +{ + return _uniformInfos; +} + +int ProgramGL::getMaxVertexLocation() const +{ + return _maxLocation; +} +int ProgramGL::getMaxFragmentLocation() const +{ + return _maxLocation; +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/ProgramGL.h b/cocos/renderer/backend/opengl/ProgramGL.h new file mode 100644 index 000000000000..7a733b43a64e --- /dev/null +++ b/cocos/renderer/backend/opengl/ProgramGL.h @@ -0,0 +1,62 @@ +#pragma once + +#include "../Macros.h" +#include "../Types.h" +#include "../RenderPipelineDescriptor.h" +#include "base/CCRef.h" +#include "platform/CCGL.h" +#include "../Program.h" + +#include +#include + +CC_BACKEND_BEGIN + +class ShaderModuleGL; + +struct AttributeInfo +{ + unsigned int location = 0; + unsigned int size = 0; + GLenum type = GL_BYTE; + GLsizei stride = 0; + unsigned int offset = 0; + GLboolean needToBeNormallized = GL_FALSE; +}; + +class ProgramGL : public Program +{ +public: + typedef std::vector VertexAttributeArray; + + ProgramGL(const std::string& vertexShader, const std::string& fragmentShader); + ~ProgramGL(); + + inline const std::vector& getAttributeInfos() const { return _attributeInfos; } + inline GLuint getHandler() const { return _program; } + void computeAttributeInfos(const RenderPipelineDescriptor& descriptor); + + virtual const std::unordered_map& getVertexUniformInfos() const override; + virtual const std::unordered_map& getFragmentUniformInfos() const override; + + virtual UniformLocation getUniformLocation(const std::string& uniform) const override; + + virtual int getMaxVertexLocation() const override; + virtual int getMaxFragmentLocation() const override; + +private: + void compileProgram(); + bool getAttributeLocation(const std::string& attributeName, unsigned int& location) const; + void computeUniformInfos(); + + GLuint _program = 0; + ShaderModuleGL* _vertexShaderModule = nullptr; + ShaderModuleGL* _fragmentShaderModule = nullptr; + + std::vector _attributeInfos; + std::unordered_map _uniformInfos; + + int _maxLocation = -1; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/RenderPipelineGL.cpp b/cocos/renderer/backend/opengl/RenderPipelineGL.cpp new file mode 100644 index 000000000000..0c28e31ee702 --- /dev/null +++ b/cocos/renderer/backend/opengl/RenderPipelineGL.cpp @@ -0,0 +1,33 @@ +#include "RenderPipelineGL.h" +#include "ShaderModuleGL.h" +#include "DepthStencilStateGL.h" +#include "ProgramGL.h" +#include "BlendStateGL.h" + +#include + +CC_BACKEND_BEGIN + +RenderPipelineGL::RenderPipelineGL(const RenderPipelineDescriptor& descriptor) +{ + _programGL = static_cast(descriptor.programState->getProgram()); + _programGL->computeAttributeInfos(descriptor); + CC_SAFE_RETAIN(_programGL); + + const auto& depthStencilState = descriptor.depthStencilState; + CC_SAFE_RETAIN(depthStencilState); + _depthStencilState = static_cast(depthStencilState); + + const auto& blendState = descriptor.blendState; + CC_SAFE_RETAIN(blendState); + _blendState = static_cast(blendState); +} + +RenderPipelineGL::~RenderPipelineGL() +{ + CC_SAFE_RELEASE(_programGL); + CC_SAFE_RELEASE(_depthStencilState); + CC_SAFE_RELEASE(_blendState); +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/RenderPipelineGL.h b/cocos/renderer/backend/opengl/RenderPipelineGL.h new file mode 100644 index 000000000000..eff77e82f926 --- /dev/null +++ b/cocos/renderer/backend/opengl/RenderPipelineGL.h @@ -0,0 +1,32 @@ +#pragma once + +#include "../RenderPipeline.h" +#include "../RenderPipelineDescriptor.h" + +#include "platform/CCGL.h" + +#include + +CC_BACKEND_BEGIN + +class DepthStencilStateGL; +class ProgramGL; +class BlendStateGL; + +class RenderPipelineGL : public RenderPipeline +{ +public: + RenderPipelineGL(const RenderPipelineDescriptor& descriptor); + ~RenderPipelineGL(); + + inline ProgramGL* getProgram() const { return _programGL; } + inline DepthStencilStateGL* getDepthStencilState() const { return _depthStencilState; } + inline BlendStateGL* getBlendState() const { return _blendState; } + +private: + ProgramGL* _programGL = nullptr; + DepthStencilStateGL* _depthStencilState = nullptr; + BlendStateGL* _blendState = nullptr; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/ShaderModuleGL.cpp b/cocos/renderer/backend/opengl/ShaderModuleGL.cpp new file mode 100644 index 000000000000..0a6ab34180f5 --- /dev/null +++ b/cocos/renderer/backend/opengl/ShaderModuleGL.cpp @@ -0,0 +1,57 @@ +#include "ShaderModuleGL.h" + +#include "platform/CCPlatformMacros.h" + +CC_BACKEND_BEGIN + +ShaderModuleGL::ShaderModuleGL(ShaderStage stage, const std::string& source) +: ShaderModule(stage) +{ + compileShader(stage, source); +} + +ShaderModuleGL::~ShaderModuleGL() +{ + deleteShader(); +} + +void ShaderModuleGL::compileShader(ShaderStage stage, const std::string &source) +{ + GLenum shaderType = stage == ShaderStage::VERTEX ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER; + const GLchar* sourcePtr = reinterpret_cast(source.c_str()); + _shader = glCreateShader(shaderType); + if (!_shader) + return; + + glShaderSource(_shader, 1, &sourcePtr, nullptr); + glCompileShader(_shader); + + GLint status = 0; + glGetShaderiv(_shader, GL_COMPILE_STATUS, &status); + if (! status) + { + printf("cocos2d: ERROR: Failed to compile shader:\n%s", source.c_str()); + printf("cocos2d: %s", getErrorLog(_shader)); + deleteShader(); + } +} + +char* ShaderModuleGL::getErrorLog(GLuint shader) const +{ + GLint logLength = 0; + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength); + char* log = (char*)malloc(sizeof(char) * logLength); + glGetShaderInfoLog(shader, logLength, nullptr, log); + return log; +} + +void ShaderModuleGL::deleteShader() +{ + if (_shader) + { + glDeleteShader(_shader); + _shader = 0; + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/ShaderModuleGL.h b/cocos/renderer/backend/opengl/ShaderModuleGL.h new file mode 100644 index 000000000000..123a19311323 --- /dev/null +++ b/cocos/renderer/backend/opengl/ShaderModuleGL.h @@ -0,0 +1,25 @@ +#pragma once + +#include "../ShaderModule.h" + +#include "platform/CCGL.h" + +CC_BACKEND_BEGIN + +class ShaderModuleGL : public ShaderModule +{ +public: + ShaderModuleGL(ShaderStage stage, const std::string& source); + ~ShaderModuleGL(); + + inline GLuint getShader() const { return _shader; } + +private: + void compileShader(ShaderStage stage, const std::string& source); + char* getErrorLog(GLuint shader) const; + void deleteShader(); + + GLuint _shader = 0; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/TextureGL.cpp b/cocos/renderer/backend/opengl/TextureGL.cpp new file mode 100644 index 000000000000..4f6c019bb875 --- /dev/null +++ b/cocos/renderer/backend/opengl/TextureGL.cpp @@ -0,0 +1,403 @@ +#include "TextureGL.h" +#include "base/ccMacros.h" +#include "platform/CCPlatformConfig.h" + +CC_BACKEND_BEGIN + +namespace +{ +#define ISPOW2(n) (((n) & (n-1)) == 0) + + GLint toGLMagFilter(SamplerFilter magFilter) + { + GLint ret = GL_LINEAR; + switch (magFilter) + { + case SamplerFilter::LINEAR: + ret = GL_LINEAR; + break; + case SamplerFilter::NEAREST: + ret = GL_NEAREST; + break; + default: + break; + } + return ret; + } + + GLint toGLMinFilter(SamplerFilter minFilter, SamplerFilter mipmapFilter, bool mipmapEnabled, bool isPow2) + { + if (mipmapEnabled) + { + if(!isPow2) + { + cocos2d::log("Change minification filter to either NEAREST or LINEAR since non-power-of-two texture occur in %s %s %d", __FILE__, __FUNCTION__, __LINE__); + if (SamplerFilter::LINEAR == minFilter) + return GL_LINEAR; + else + return GL_NEAREST; + } + + switch (minFilter) + { + case SamplerFilter::LINEAR: + switch (mipmapFilter) + { + case SamplerFilter::LINEAR: + return GL_LINEAR_MIPMAP_LINEAR; + case SamplerFilter::NEAREST: + return GL_LINEAR_MIPMAP_NEAREST; + } + case SamplerFilter::NEAREST: + switch (mipmapFilter) + { + case SamplerFilter::LINEAR: + return GL_NEAREST_MIPMAP_LINEAR; + case SamplerFilter::NEAREST: + return GL_NEAREST_MIPMAP_NEAREST; + } + } + } + else + { + if (SamplerFilter::LINEAR == minFilter) + return GL_LINEAR; + else + return GL_NEAREST; + } + } + + GLint toGLAddressMode(SamplerAddressMode addressMode, bool isPow2) + { + GLint ret = GL_REPEAT; + if(!isPow2 && (addressMode != SamplerAddressMode::CLAMP_TO_EDGE)) + { + cocos2d::log("Change texture wrap mode to CLAMP_TO_EDGE since non-power-of-two texture occur in %s %s %d", __FILE__, __FUNCTION__, __LINE__); + return GL_CLAMP_TO_EDGE; + } + + switch (addressMode) + { + case SamplerAddressMode::REPEAT: + ret = GL_REPEAT; + break; + case SamplerAddressMode::MIRROR_REPEAT: + ret = GL_MIRRORED_REPEAT; + break; + case SamplerAddressMode::CLAMP_TO_EDGE: + ret = GL_CLAMP_TO_EDGE; + break; + default: + break; + } + return ret; + } +} + +TextureGL::TextureGL(const TextureDescriptor& descriptor) : Texture(descriptor) +{ + glGenTextures(1, &_texture); + toGLTypes(); + bool isPow2 = ISPOW2(_width) && ISPOW2(_height); + _magFilterGL = toGLMagFilter(descriptor.samplerDescriptor.magFilter); + _minFilterGL = toGLMinFilter(descriptor.samplerDescriptor.minFilter, + descriptor.samplerDescriptor.mipmapFilter, _isMipmapEnabled, isPow2); + + _sAddressModeGL = toGLAddressMode(descriptor.samplerDescriptor.sAddressMode, isPow2); + _tAddressModeGL = toGLAddressMode(descriptor.samplerDescriptor.tAddressMode, isPow2); + + // Update data here because `updateData()` may not be invoked later. + // For example, a texture used as depth buffer will not invoke updateData(). + uint8_t* data = (uint8_t*)malloc(_width * _height * _bitsPerElement / 8); + updateData(data); + free(data); +} + +TextureGL::~TextureGL() +{ + if (_texture) + glDeleteTextures(1, &_texture); +} + +void TextureGL::updateSamplerDescriptor(const SamplerDescriptor &sampler) { + bool isPow2 = ISPOW2(_width) && ISPOW2(_height); + bool needGenerateMipmap = !_isMipmapEnabled && sampler.mipmapEnabled; + _isMipmapEnabled = sampler.mipmapEnabled; + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, _texture); + + if (sampler.magFilter != SamplerFilter::DONT_CARE) + { + _magFilterGL = toGLMagFilter(sampler.magFilter); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _magFilterGL); + } + + if (sampler.minFilter != SamplerFilter::DONT_CARE) + { + _minFilterGL = toGLMinFilter(sampler.minFilter, sampler.mipmapFilter, _isMipmapEnabled, isPow2); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _minFilterGL); + } + + if (sampler.sAddressMode != SamplerAddressMode::DONT_CARE) + { + _sAddressModeGL = toGLAddressMode(sampler.sAddressMode, isPow2); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _sAddressModeGL); + } + + if (sampler.tAddressMode != SamplerAddressMode::DONT_CARE) + { + _tAddressModeGL = toGLAddressMode(sampler.tAddressMode, isPow2); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _tAddressModeGL); + } + + if (needGenerateMipmap) generateMipmpas(); +} + +void TextureGL::updateData(uint8_t* data) +{ + // TODO: support texture cube, and compressed data. + + //Set the row align only when mipmapsNum == 1 and the data is uncompressed + if(!_isMipmapEnabled && !_isCompressed) + { + unsigned int bytesPerRow = _width * _bitsPerElement / 8; + + if(bytesPerRow % 8 == 0) + { + glPixelStorei(GL_UNPACK_ALIGNMENT, 8); + } + else if(bytesPerRow % 4 == 0) + { + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + } + else if(bytesPerRow % 2 == 0) + { + glPixelStorei(GL_UNPACK_ALIGNMENT, 2); + } + else + { + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + } + } + else + { + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + } + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, _texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _magFilterGL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _minFilterGL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _sAddressModeGL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _tAddressModeGL); + + + if(_isCompressed) + { + auto datalen = _width * _height * _bitsPerElement / 8; + glCompressedTexImage2D(GL_TEXTURE_2D, 0, _internalFormat, (GLsizei)_width, (GLsizei)_height, 0, datalen, data); + } + else + { + glTexImage2D(GL_TEXTURE_2D, + 0, + _internalFormat, + _width, + _height, + 0, + _format, + _type, + data); + } + CHECK_GL_ERROR_DEBUG(); + + generateMipmpas(); + CHECK_GL_ERROR_DEBUG(); +} + +void TextureGL::updateSubData(unsigned int xoffset, unsigned int yoffset, unsigned int width, unsigned int height, uint8_t* data) +{ + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, _texture); + glTexSubImage2D(GL_TEXTURE_2D, + 0, + xoffset, + yoffset, + width, + height, + _format, + _type, + data); + CHECK_GL_ERROR_DEBUG(); + + generateMipmpas(); + CHECK_GL_ERROR_DEBUG(); +} + +void TextureGL::apply(int index) const +{ + glActiveTexture(GL_TEXTURE0 + index); + glBindTexture(GL_TEXTURE_2D, _texture); +} + +void TextureGL::generateMipmpas() const +{ + if (_isMipmapEnabled && + TextureUsage::RENDER_TARGET != _textureUsage) + glGenerateMipmap(GL_TEXTURE_2D); +} + +void TextureGL::toGLTypes() +{ + switch (_textureFormat) + { + case TextureFormat::R8G8B8A8: + _internalFormat = GL_RGBA; + _format = GL_RGBA; + _type = GL_UNSIGNED_BYTE; + break; + case TextureFormat::R8G8B8: + _internalFormat = GL_RGB; + _format = GL_RGB; + _type = GL_UNSIGNED_BYTE; + break; + case TextureFormat::RGBA4444: + _internalFormat = GL_RGBA; + _format = GL_RGBA; + _type = GL_UNSIGNED_SHORT_4_4_4_4; + break; + case TextureFormat::A8: + _internalFormat = GL_ALPHA; + _format = GL_ALPHA; + _type = GL_UNSIGNED_BYTE; + break; + case TextureFormat::I8: + _internalFormat = GL_LUMINANCE; + _format = GL_LUMINANCE; + _type = GL_UNSIGNED_BYTE; + break; + case TextureFormat::AI88: + _internalFormat = GL_LUMINANCE_ALPHA; + _format = GL_LUMINANCE_ALPHA; + _type = GL_UNSIGNED_BYTE; + break; + case TextureFormat::RGB565: + _internalFormat = GL_RGB; + _format = GL_RGB; + _type = GL_UNSIGNED_SHORT_5_6_5; + break; + case TextureFormat::RGB5A1: + _internalFormat = GL_RGBA; + _format = GL_RGBA; + _type = GL_UNSIGNED_SHORT_5_5_5_1; + break; +#ifdef GL_ETC1_RGB8_OES + case TextureFormat::ETC1: + _internalFormat = GL_ETC1_RGB8_OES; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif // GL_ETC1_RGB8_OES +#ifdef GL_ATC_RGB_AMD + case TextureFormat ::ATC_RGB: + _internalFormat = GL_ATC_RGB_AMD; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif // GL_ATC_RGB_AMD +#ifdef GL_ATC_RGBA_EXPLICIT_ALPHA_AMD + case TextureFormat::ATC_EXPLICIT_ALPHA: + _internalFormat = GL_ATC_RGBA_EXPLICIT_ALPHA_AMD; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; +#endif // GL_ATC_RGBA_EXPLICIT_ALPHA_AMD +#ifdef GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD + case TextureFormat::ATC_INTERPOLATED_ALPHA: + _internalFormat = GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif // GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD + +#ifdef GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG + case TextureFormat::PVRTC2: + _internalFormat = GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG + case TextureFormat::PVRTC2A: + _internalFormat = GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG + case TextureFormat::PVRTC4: + _internalFormat = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG + case TextureFormat::PVRTC4A: + _internalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGBA_S3TC_DXT1_EXT + case TextureFormat::S3TC_DXT1: + _internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGBA_S3TC_DXT3_EXT + case TextureFormat::S3TC_DXT3: + _internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +#ifdef GL_COMPRESSED_RGBA_S3TC_DXT5_EXT + case TextureFormat::S3TC_DXT5: + _internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; + _format = 0xFFFFFFFF; + _type = 0xFFFFFFFF; + _isCompressed = true; + break; +#endif +// case TextureFormat::D16: +// _format = GL_DEPTH_COMPONENT; +// _internalFormat = GL_DEPTH_COMPONENT; +// _type = GL_UNSIGNED_INT; + case TextureFormat::D24S8: +#ifdef CC_USE_GLES + _format = GL_DEPTH_STENCIL_OES; + _internalFormat = GL_DEPTH_STENCIL_OES; + _type = GL_UNSIGNED_INT_24_8_OES; +#else + _format = GL_DEPTH_STENCIL; + _internalFormat = GL_DEPTH32F_STENCIL8; + _type = GL_FLOAT_32_UNSIGNED_INT_24_8_REV; +#endif + break; + default: + break; + } +} + +CC_BACKEND_END diff --git a/cocos/renderer/backend/opengl/TextureGL.h b/cocos/renderer/backend/opengl/TextureGL.h new file mode 100644 index 000000000000..be4e7916f6a5 --- /dev/null +++ b/cocos/renderer/backend/opengl/TextureGL.h @@ -0,0 +1,42 @@ +#pragma once + +#include "../Texture.h" +#include "platform/CCGL.h" + +CC_BACKEND_BEGIN + +class TextureGL : public Texture +{ +public: + TextureGL(const TextureDescriptor& descriptor); + ~TextureGL(); + + virtual void updateData(uint8_t* data) override; + virtual void updateSubData(unsigned int xoffset, unsigned int yoffset, unsigned int width, unsigned int height, uint8_t* data) override; + + virtual void updateSamplerDescriptor(const SamplerDescriptor &sampler) override; + + void apply(int index) const; + inline GLuint getHandler() const { return _texture; } + +private: + void toGLTypes(); + void generateMipmpas() const; + + GLuint _texture = 0; + SamplerDescriptor _samplerDescriptor; + + GLint _magFilterGL = GL_LINEAR; + GLint _minFilterGL = GL_LINEAR; + GLint _sAddressModeGL = GL_REPEAT; + GLint _tAddressModeGL = GL_REPEAT; + + // Used in glTexImage2D(). + GLint _internalFormat = GL_RGBA; + GLenum _format = GL_RGBA; + GLenum _type = GL_UNSIGNED_BYTE; + + bool _isCompressed = false; +}; + +CC_BACKEND_END diff --git a/cocos/renderer/ccShader_Position.vert b/cocos/renderer/ccShader_Position.vert index 393d7507a28f..087d047e2b19 100644 --- a/cocos/renderer/ccShader_Position.vert +++ b/cocos/renderer/ccShader_Position.vert @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -const char* ccPosition_vert = R"( +const char* position_vert = R"( attribute vec4 a_position; @@ -32,9 +32,11 @@ varying lowp vec4 v_position; varying vec4 v_position; #endif +uniform mat4 u_MVPMatrix; + void main() { - gl_Position = CC_MVPMatrix * a_position; + gl_Position = u_MVPMatrix * a_position; v_position = a_position; } )"; diff --git a/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag b/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag index 462e551b9b9f..d134b9382109 100644 --- a/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag +++ b/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag @@ -30,16 +30,16 @@ precision lowp float; varying vec4 v_fragmentColor; varying vec2 v_texCoord; -uniform float CC_alpha_value; +uniform float u_alpha_value; void main() { vec4 texColor = texture2D(CC_Texture0, v_texCoord); // mimic: glAlphaFunc(GL_GREATER) -// pass if ( incoming_pixel >= CC_alpha_value ) => fail if incoming_pixel < CC_alpha_value +// pass if ( incoming_pixel >= u_alpha_value ) => fail if incoming_pixel < u_alpha_value - if ( texColor.a <= CC_alpha_value ) + if ( texColor.a <= u_alpha_value ) discard; gl_FragColor = texColor * v_fragmentColor; diff --git a/cocos/renderer/ccShaders.cpp b/cocos/renderer/ccShaders.cpp index fb50c248d87a..2c84509c680d 100644 --- a/cocos/renderer/ccShaders.cpp +++ b/cocos/renderer/ccShaders.cpp @@ -100,4 +100,29 @@ NS_CC_BEGIN #include "renderer/ccShader_Position.vert" #include "renderer/ccShader_LayerRadialGradient.frag" +//backend shader file +#include "renderer/shaders/positionColor.vert" +#include "renderer/shaders/positionColor.frag" +#include "renderer/shaders/positionTexture.vert" +#include "renderer/shaders/positionTexture.frag" +#include "renderer/shaders/positionTextureColor.vert" +#include "renderer/shaders/positionTextureColor.frag" +#include "renderer/shaders/positionTextureColorAlphaTest.frag" +#include "renderer/shaders/label_normal.frag" +#include "renderer/shaders/label_distanceNormal.frag" +#include "renderer/shaders/label_outline.frag" +#include "renderer/shaders/label_distanceFieldGlow.frag" +#include "renderer/shaders/positionColorLengthTexture.vert" +#include "renderer/shaders/positionColorLengthTexture.frag" +#include "renderer/shaders/positionColorTextureAsPointsize.vert" +#include "renderer/shaders/position.vert" +#include "renderer/shaders/layer_radialGradient.frag" +#include "renderer/shaders/ui_Gray.frag" +#include "renderer/shaders/positionTextureUColor.vert" +#include "renderer/shaders/positionTextureUColor.frag" +#include "renderer/shaders/positionUColor.vert" +#include "renderer/shaders/positionUColor.frag" +#include "renderer/shaders/etc1.frag" +#include "renderer/shaders/etc1_Gray.frag" + NS_CC_END diff --git a/cocos/renderer/ccShaders.h b/cocos/renderer/ccShaders.h index a77e6d51a0ba..26cd66c24e93 100644 --- a/cocos/renderer/ccShaders.h +++ b/cocos/renderer/ccShaders.h @@ -24,9 +24,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#pragma once -#ifndef __CCSHADER_H__ -#define __CCSHADER_H__ /// @cond DO_NOT_SHOW #include "platform/CCGL.h" @@ -100,10 +99,33 @@ extern CC_DLL const GLchar* ccETC1ASPositionTextureGray_frag; extern CC_DLL const GLchar* ccPosition_vert; extern CC_DLL const GLchar* ccShader_LayerRadialGradient_frag; +//backend shader file +extern CC_DLL const char * positionColor_vert; +extern CC_DLL const char * positionColor_frag; +extern CC_DLL const char * positionTexture_vert; +extern CC_DLL const char * positionTexture_frag; +extern CC_DLL const char * positionTextureColor_vert; +extern CC_DLL const char * positionTextureColor_frag; +extern CC_DLL const char * positionTextureColorAlphaTest_frag; +extern CC_DLL const char * label_normal_frag; +extern CC_DLL const char * label_distanceNormal_frag; +extern CC_DLL const char * labelOutline_frag; +extern CC_DLL const char * labelDistanceFieldGlow_frag; +extern CC_DLL const char * positionColorLengthTexture_vert; +extern CC_DLL const char * positionColorLengthTexture_frag; +extern CC_DLL const char * positionColorTextureAsPointsize_vert; +extern CC_DLL const char * position_vert; +extern CC_DLL const char * layer_radialGradient_frag; +extern CC_DLL const char * grayScale_frag; +extern CC_DLL const char * positionTextureUColor_vert; +extern CC_DLL const char * positionTextureUColor_frag; +extern CC_DLL const char * positionUColor_vert; +extern CC_DLL const char * positionUColor_frag; +extern CC_DLL const char * etc1_frag; +extern CC_DLL const char * etc1Gray_frag; NS_CC_END /** end of support group @} */ /// @endcond -#endif /* __CCSHADER_H__ */ diff --git a/cocos/renderer/shaders/etc1.frag b/cocos/renderer/shaders/etc1.frag new file mode 100644 index 000000000000..7ab1dab7a6bb --- /dev/null +++ b/cocos/renderer/shaders/etc1.frag @@ -0,0 +1,44 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* etc1_frag = R"( +#ifdef GL_ES + precision mediump float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform sampler2D u_texture; +uniform sampler2D u_texture1; + +void main() { + vec4 texColor = vec4(texture2D(u_texture, v_texCoord).rgb, texture2D(u_texture1, v_texCoord).r); + + texColor.rgb *= texColor.a; // Premultiply with Alpha channel + + gl_FragColor = v_fragmentColor * texColor; +} +)"; diff --git a/cocos/renderer/shaders/etc1_Gray.frag b/cocos/renderer/shaders/etc1_Gray.frag new file mode 100644 index 000000000000..1667d9ea8cf8 --- /dev/null +++ b/cocos/renderer/shaders/etc1_Gray.frag @@ -0,0 +1,48 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* etc1Gray_frag = R"( +#ifdef GL_ES + precision mediump float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform sampler2D u_texture; +uniform sampler2D u_texture1; + +void main() +{ + vec4 texColor = texture2D(u_texture, v_texCoord); + texColor.a = texture2D(u_texture1, v_texCoord).r; + texColor.rgb *= texColor.a; // premultiply alpha channel + + texColor = v_fragmentColor * texColor; + + gl_FragColor.rgb = vec3(0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b); + gl_FragColor.a = texColor.a; +} +)"; diff --git a/cocos/renderer/shaders/label_distanceFieldGlow.frag b/cocos/renderer/shaders/label_distanceFieldGlow.frag new file mode 100644 index 000000000000..73144cd94306 --- /dev/null +++ b/cocos/renderer/shaders/label_distanceFieldGlow.frag @@ -0,0 +1,27 @@ +const char* labelDistanceFieldGlow_frag = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform vec4 u_effectColor; +uniform vec4 u_textColor; +uniform sampler2D u_texture; + +void main() +{ + float dist = texture2D(u_texture, v_texCoord).a; + //TODO: Implementation 'fwidth' for glsl 1.0 + //float width = fwidth(dist); + //assign width for constant will lead to a little bit fuzzy,it's temporary measure. + float width = 0.04; + float alpha = smoothstep(0.5-width, 0.5+width, dist); + //glow + float mu = smoothstep(0.5, 1.0, sqrt(dist)); + vec4 color = u_effectColor*(1.0-alpha) + u_textColor*alpha; + gl_FragColor = v_fragmentColor * vec4(color.rgb, max(alpha,mu)*color.a); +} +)"; diff --git a/cocos/renderer/shaders/label_distanceNormal.frag b/cocos/renderer/shaders/label_distanceNormal.frag new file mode 100644 index 000000000000..08f843aa5987 --- /dev/null +++ b/cocos/renderer/shaders/label_distanceNormal.frag @@ -0,0 +1,27 @@ +const char* label_distanceNormal_frag = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform vec4 u_textColor; +uniform sampler2D u_texture; + +void main() +{ + vec4 color = texture2D(u_texture, v_texCoord); + //the texture use dual channel 16-bit output for distance_map + //float dist = color.b+color.g/256.0; + // the texture use single channel 8-bit output for distance_map + float dist = color.a; + //TODO: Implementation 'fwidth' for glsl 1.0 + //float width = fwidth(dist); + //assign width for constant will lead to a little bit fuzzy,it's temporary measure. + float width = 0.04; + float alpha = smoothstep(0.5-width, 0.5+width, dist) * u_textColor.a; + gl_FragColor = v_fragmentColor * vec4(u_textColor.rgb,alpha); +} +)"; diff --git a/cocos/renderer/shaders/label_normal.frag b/cocos/renderer/shaders/label_normal.frag new file mode 100644 index 000000000000..bfbe286e759f --- /dev/null +++ b/cocos/renderer/shaders/label_normal.frag @@ -0,0 +1,43 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* label_normal_frag = R"( +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform vec4 u_textColor; +uniform sampler2D u_texture; + +void main() +{ + gl_FragColor = v_fragmentColor * vec4(u_textColor.rgb,// RGB from uniform + u_textColor.a * texture2D(u_texture, v_texCoord).a// A from texture & uniform + ); +} +)"; diff --git a/cocos/renderer/shaders/label_outline.frag b/cocos/renderer/shaders/label_outline.frag new file mode 100644 index 000000000000..39852238ef54 --- /dev/null +++ b/cocos/renderer/shaders/label_outline.frag @@ -0,0 +1,49 @@ +/* + * LICENSE ??? + */ +const char* labelOutline_frag = R"( +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform vec4 u_effectColor; +uniform vec4 u_textColor; +uniform sampler2D u_texture; + +#ifdef GL_ES +uniform lowp int u_effectType; // 0: None (Draw text), 1: Outline, 2: Shadow +#else +uniform int u_effectType; +#endif + +void main() +{ + vec4 sample = texture2D(u_texture, v_texCoord); + // fontAlpha == 1 means the area of solid text (without edge) + // fontAlpha == 0 means the area outside text, including outline area + // fontAlpha == (0, 1) means the edge of text + float fontAlpha = sample.a; + + // outlineAlpha == 1 means the area of 'solid text' and 'solid outline' + // outlineAlpha == 0 means the transparent area outside text and outline + // outlineAlpha == (0, 1) means the edge of outline + float outlineAlpha = sample.r; + + if (u_effectType == 0) // draw text + { + gl_FragColor = v_fragmentColor * vec4(u_textColor.rgb, u_textColor.a * fontAlpha); + } + else if (u_effectType == 1) // draw outline + { + // multipy (1.0 - fontAlpha) to make the inner edge of outline smoother and make the text itself transparent. + gl_FragColor = v_fragmentColor * vec4(u_effectColor.rgb, u_effectColor.a * outlineAlpha * (1.0 - fontAlpha)); + } + else // draw shadow + { + gl_FragColor = v_fragmentColor * vec4(u_effectColor.rgb, u_effectColor.a * outlineAlpha); + } +} +)"; diff --git a/cocos/vr/CCVRGenericHeadTracker.h b/cocos/renderer/shaders/layer_radialGradient.frag similarity index 65% rename from cocos/vr/CCVRGenericHeadTracker.h rename to cocos/renderer/shaders/layer_radialGradient.frag index cf0587200957..10a1a886f229 100644 --- a/cocos/vr/CCVRGenericHeadTracker.h +++ b/cocos/renderer/shaders/layer_radialGradient.frag @@ -1,7 +1,5 @@ /**************************************************************************** - Copyright (c) 2016 Google Inc. Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -24,36 +22,41 @@ THE SOFTWARE. ****************************************************************************/ -#ifndef CCVRGenericHeadTracker_hpp -#define CCVRGenericHeadTracker_hpp +const char* layer_radialGradient_frag = R"( -#include "vr/CCVRProtocol.h" -#include "math/Vec3.h" -#include "math/Mat4.h" +#ifdef GL_ES +precision highp float; +#endif -NS_CC_BEGIN +uniform vec4 u_startColor; +uniform vec4 u_endColor; +uniform vec2 u_center; +uniform float u_radius; +uniform float u_expand; -class CC_DLL VRGenericHeadTracker : public VRIHeadTracker -{ -public: - VRGenericHeadTracker(); - virtual ~VRGenericHeadTracker(); - - virtual Vec3 getLocalPosition(); - virtual Mat4 getLocalRotation(); - -protected: - void startTracking(); - void stopTracking(); - - Vec3 _localPosition; +#ifdef GL_ES +varying lowp vec4 v_position; +#else +varying vec4 v_position; +#endif - Mat4 _deviceToDisplay; - Mat4 _worldToInertialReferenceFrame; - - void* _motionMgr; -}; - -NS_CC_END - -#endif /* CCVRGenericHeadTracker_hpp */ +void main() +{ + float d = distance(v_position.xy, u_center) / u_radius; + if (d <= 1.0) + { + if (d <= u_expand) + { + gl_FragColor = u_startColor; + } + else + { + gl_FragColor = mix(u_startColor, u_endColor, (d - u_expand) / (1.0 - u_expand)); + } + } + else + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } +} +)"; diff --git a/tests/game-controller-test/proj.mac/main.cpp b/cocos/renderer/shaders/position.vert similarity index 81% rename from tests/game-controller-test/proj.mac/main.cpp rename to cocos/renderer/shaders/position.vert index 32debbd1c94f..393d7507a28f 100644 --- a/tests/game-controller-test/proj.mac/main.cpp +++ b/cocos/renderer/shaders/position.vert @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + Copyright (c) 2016 Chukong Technologies Inc. + http://www.cocos2d-x.org - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -23,12 +22,19 @@ THE SOFTWARE. ****************************************************************************/ -#include "AppDelegate.h" +const char* ccPosition_vert = R"( + +attribute vec4 a_position; -USING_NS_CC; +#ifdef GL_ES +varying lowp vec4 v_position; +#else +varying vec4 v_position; +#endif -int main(int argc, char *argv[]) +void main() { - AppDelegate app; - return Application::getInstance()->run(); + gl_Position = CC_MVPMatrix * a_position; + v_position = a_position; } +)"; diff --git a/cocos/renderer/shaders/positionColor.frag b/cocos/renderer/shaders/positionColor.frag new file mode 100644 index 000000000000..b3e7a7310e04 --- /dev/null +++ b/cocos/renderer/shaders/positionColor.frag @@ -0,0 +1,37 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionColor_frag = R"( +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; + +void main() +{ + gl_FragColor = v_fragmentColor; +} +)"; diff --git a/cocos/renderer/shaders/positionColor.vert b/cocos/renderer/shaders/positionColor.vert new file mode 100644 index 000000000000..4ec46a02468c --- /dev/null +++ b/cocos/renderer/shaders/positionColor.vert @@ -0,0 +1,44 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionColor_vert = R"( +attribute vec4 a_position; +attribute vec4 a_color; + +uniform mat4 u_MVPMatrix; + +#ifdef GL_ES +varying lowp vec4 v_fragmentColor; +#else +varying vec4 v_fragmentColor; +#endif + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + v_fragmentColor = a_color; +} +)"; + diff --git a/cocos/renderer/shaders/positionColorLengthTexture.frag b/cocos/renderer/shaders/positionColorLengthTexture.frag new file mode 100644 index 000000000000..b91f2e818671 --- /dev/null +++ b/cocos/renderer/shaders/positionColorLengthTexture.frag @@ -0,0 +1,42 @@ +/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +const char* positionColorLengthTexture_frag = R"( + +#ifdef GL_ES +// #extension GL_OES_standard_derivatives : enable + +varying mediump vec4 v_color; +varying mediump vec2 v_texcoord; +#else +varying vec4 v_color; +varying vec2 v_texcoord; +#endif + +void main() +{ +// #if defined GL_OES_standard_derivatives +// gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); +// #else + gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord)); +// #endif +} +)"; diff --git a/cocos/renderer/shaders/positionColorLengthTexture.vert b/cocos/renderer/shaders/positionColorLengthTexture.vert new file mode 100644 index 000000000000..07c9241c4112 --- /dev/null +++ b/cocos/renderer/shaders/positionColorLengthTexture.vert @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +const char* positionColorLengthTexture_vert = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +#ifdef GL_ES +attribute mediump vec4 a_position; +attribute mediump vec2 a_texCoord; +attribute mediump vec4 a_color; + +varying mediump vec4 v_color; +varying mediump vec2 v_texcoord; + +#else + +attribute vec4 a_position; +attribute vec2 a_texCoord; +attribute vec4 a_color; + +varying vec4 v_color; +varying vec2 v_texcoord; + +#endif + +uniform float u_alpha; +uniform mat4 u_MVPMatrix; + +void main() +{ + v_color = vec4(a_color.rgb * a_color.a * u_alpha, a_color.a * u_alpha); + v_texcoord = a_texCoord; + + gl_Position = u_MVPMatrix * a_position; +} +)"; diff --git a/cocos/renderer/shaders/positionColorTextureAsPointsize.vert b/cocos/renderer/shaders/positionColorTextureAsPointsize.vert new file mode 100644 index 000000000000..73b319ffe8d5 --- /dev/null +++ b/cocos/renderer/shaders/positionColorTextureAsPointsize.vert @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2013-2017 Chukong Technologies Inc. + * + * http://www.cocos2d-x.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionColorTextureAsPointsize_vert = R"( + +attribute vec4 a_position; +attribute vec4 a_color; + +attribute vec2 a_texCoord; + +#ifdef GL_ES +varying lowp vec4 v_fragmentColor; +#else +varying vec4 v_fragmentColor; +#endif +uniform float u_alpha; +uniform mat4 u_MVPMatrix; + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + gl_PointSize = a_texCoord.x; + v_fragmentColor = vec4(a_color.rgb * a_color.a * u_alpha, a_color.a * u_alpha); +} +)"; diff --git a/cocos/scripting/js-bindings/script/jsb_audioengine.js b/cocos/renderer/shaders/positionTexture.frag similarity index 75% rename from cocos/scripting/js-bindings/script/jsb_audioengine.js rename to cocos/renderer/shaders/positionTexture.frag index 24363caa5096..f745a2aca3ab 100644 --- a/cocos/scripting/js-bindings/script/jsb_audioengine.js +++ b/cocos/renderer/shaders/positionTexture.frag @@ -1,6 +1,8 @@ /* - * Copyright (c) 2015-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -21,18 +23,18 @@ * THE SOFTWARE. */ -(function (jsb) { +const char* positionTexture_frag = R"( -if (!jsb || !jsb.AudioEngine) return; +#ifdef GL_ES +precision lowp float; +#endif -jsb.AudioEngine.AudioState = { - ERROR: -1, - INITIALIZING: 0, - PLAYING: 1, - PAUSED: 2 -}; +varying vec2 v_texCoord; -jsb.AudioEngine.INVALID_AUDIO_ID = -1; -jsb.AudioEngine.TIME_UNKNOWN = -1; +uniform sampler2D u_texture; -})(jsb); \ No newline at end of file +void main() +{ + gl_FragColor = texture2D(u_texture, v_texCoord); +} +)"; diff --git a/cocos/renderer/shaders/positionTexture.vert b/cocos/renderer/shaders/positionTexture.vert new file mode 100644 index 000000000000..8f461efd25b6 --- /dev/null +++ b/cocos/renderer/shaders/positionTexture.vert @@ -0,0 +1,44 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTexture_vert = R"( + +attribute vec4 a_position; +attribute vec2 a_texCoord; + +#ifdef GL_ES +varying mediump vec2 v_texCoord; +#else +varying vec2 v_texCoord; +#endif + +uniform mat4 u_MVPMatrix; + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + v_texCoord = a_texCoord; +} +)"; \ No newline at end of file diff --git a/cocos/renderer/shaders/positionTextureColor.frag b/cocos/renderer/shaders/positionTextureColor.frag new file mode 100644 index 000000000000..4cf0c5227f41 --- /dev/null +++ b/cocos/renderer/shaders/positionTextureColor.frag @@ -0,0 +1,40 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTextureColor_frag = R"( +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform sampler2D u_texture; + +void main() +{ + gl_FragColor = v_fragmentColor * texture2D(u_texture, v_texCoord); +} +)"; diff --git a/cocos/renderer/shaders/positionTextureColor.vert b/cocos/renderer/shaders/positionTextureColor.vert new file mode 100644 index 000000000000..bc6be8da8fca --- /dev/null +++ b/cocos/renderer/shaders/positionTextureColor.vert @@ -0,0 +1,48 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTextureColor_vert = R"( +attribute vec4 a_position; +attribute vec2 a_texCoord; +attribute vec4 a_color; + +uniform mat4 u_MVPMatrix; + +#ifdef GL_ES +varying lowp vec4 v_fragmentColor; +varying mediump vec2 v_texCoord; +#else +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; +#endif + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + v_fragmentColor = a_color; + v_texCoord = a_texCoord; +} +)"; + diff --git a/cocos/renderer/shaders/positionTextureColorAlphaTest.frag b/cocos/renderer/shaders/positionTextureColorAlphaTest.frag new file mode 100644 index 000000000000..edfbf38bd0db --- /dev/null +++ b/cocos/renderer/shaders/positionTextureColorAlphaTest.frag @@ -0,0 +1,49 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Brian Chapados + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTextureColorAlphaTest_frag = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform float u_alpha_value; +uniform sampler2D u_texture; + +void main() +{ + vec4 texColor = texture2D(u_texture, v_texCoord); + +// mimic: glAlphaFunc(GL_GREATER) +// pass if ( incoming_pixel >= u_alpha_value ) => fail if incoming_pixel < u_alpha_value + + if ( texColor.a <= u_alpha_value ) + discard; + + gl_FragColor = texColor * v_fragmentColor; +} +)"; diff --git a/cocos/renderer/shaders/positionTextureUColor.frag b/cocos/renderer/shaders/positionTextureUColor.frag new file mode 100644 index 000000000000..83ad898a4528 --- /dev/null +++ b/cocos/renderer/shaders/positionTextureUColor.frag @@ -0,0 +1,41 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTextureUColor_frag = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +uniform vec4 u_color; +uinform sampler2D u_texture; + +varying vec2 v_texCoord; + +void main() +{ + gl_FragColor = texture2D(u_texture, v_texCoord) * u_color; +} +)"; diff --git a/cocos/renderer/shaders/positionTextureUColor.vert b/cocos/renderer/shaders/positionTextureUColor.vert new file mode 100644 index 000000000000..60f3228f6eb7 --- /dev/null +++ b/cocos/renderer/shaders/positionTextureUColor.vert @@ -0,0 +1,44 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionTextureUColor_vert = R"( + +attribute vec4 a_position; +attribute vec2 a_texCoord; + +uniform mat4 u_MVPMatrix; + +#ifdef GL_ES +varying mediump vec2 v_texCoord; +#else +varying vec2 v_texCoord; +#endif + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + v_texCoord = a_texCoord; +} +)"; diff --git a/cocos/renderer/shaders/positionUColor.frag b/cocos/renderer/shaders/positionUColor.frag new file mode 100644 index 000000000000..78fc4709fa63 --- /dev/null +++ b/cocos/renderer/shaders/positionUColor.frag @@ -0,0 +1,38 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionUColor_frag = R"( + +#ifdef GL_ES +precision lowp float; +#endif + +varying vec4 v_fragmentColor; + +void main() +{ + gl_FragColor = v_fragmentColor; +} +)"; diff --git a/cocos/renderer/shaders/positionUColor.vert b/cocos/renderer/shaders/positionUColor.vert new file mode 100644 index 000000000000..df634fab5ddc --- /dev/null +++ b/cocos/renderer/shaders/positionUColor.vert @@ -0,0 +1,43 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + * Copyright (c) 2011 Ricardo Quesada + * Copyright (c) 2012 Zynga Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +const char* positionUColor_vert = R"( + +attribute vec4 a_position; +uniform vec4 u_color; +uniform mat4 u_MVPMatrix; + +#ifdef GL_ES +varying lowp vec4 v_fragmentColor; +#else +varying vec4 v_fragmentColor; +#endif + +void main() +{ + gl_Position = u_MVPMatrix * a_position; + v_fragmentColor = u_color; +} +)"; diff --git a/cocos/renderer/shaders/ui_Gray.frag b/cocos/renderer/shaders/ui_Gray.frag new file mode 100644 index 000000000000..a5bad3267bb6 --- /dev/null +++ b/cocos/renderer/shaders/ui_Gray.frag @@ -0,0 +1,19 @@ +const char* grayScale_frag = R"( + +#ifdef GL_ES +precision mediump float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform sampler2D u_texture; + +void main(void) +{ + vec4 c = texture2D(u_texture, v_texCoord); + c = v_fragmentColor * c; + gl_FragColor.xyz = vec3(0.2126*c.r + 0.7152*c.g + 0.0722*c.b); + gl_FragColor.w = c.w; +}Ø +)"; diff --git a/cocos/scripting/js-bindings/CMakeLists.txt b/cocos/scripting/js-bindings/CMakeLists.txt index 0345172f539f..204e59a3b8fa 100644 --- a/cocos/scripting/js-bindings/CMakeLists.txt +++ b/cocos/scripting/js-bindings/CMakeLists.txt @@ -165,14 +165,8 @@ target_include_directories(jscocos2d INTERFACE ${cocos_root}/cocos/scripting/js-bindings/manual ) -# ignore part warnings on binding codes. tocheck: not take effect? - if(WINDOWS) target_compile_definitions(jscocos2d PRIVATE _USRJSSTATIC) -else() - target_compile_options(jscocos2d PRIVATE - -Wno-deprecated - ) endif() set_target_properties(jscocos2d @@ -184,4 +178,11 @@ set_target_properties(jscocos2d if(XCODE OR VS) cocos_mark_code_files("jscocos2d") -endif() \ No newline at end of file +endif() + +if(WIN32) + # precompiled header + target_sources(jscocos2d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp") + set_target_properties(jscocos2d PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h") + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h") +endif() diff --git a/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp b/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp index 5631dd662af5..c67e7c6f3f1a 100644 --- a/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp +++ b/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp @@ -416,7 +416,7 @@ void register_all_cocos2dx_3d_manual(JSContext *cx, JS::HandleObject global) JS_DefineFunction(cx, tmpObj, "getMeshVertexAttribute", js_cocos2dx_Mesh_getMeshVertexAttribute, 1, JSPROP_READONLY | JSPROP_PERMANENT); tmpObj.set(jsb_cocos2d_TextureCube_prototype); - JS_DefineFunction(cx, tmpObj, "setTexParameters", js_cocos2dx_CCTextureCube_setTexParameters, 4, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "setSamplerDescriptor", js_cocos2dx_CCTextureCube_setTexParameters, 4, JSPROP_READONLY | JSPROP_PERMANENT); tmpObj.set(jsb_cocos2d_Terrain_prototype); JS_DefineFunction(cx, tmpObj, "getHeightData", js_cocos2dx_Terrain_getHeightData, 0, JSPROP_READONLY | JSPROP_PERMANENT); diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp index f3fbd9a82fc6..e45b54b8aa67 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp @@ -38,7 +38,7 @@ #include "cocos2d.h" // we used cocos2dVersion() ... // for debug socket -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include #include #else @@ -110,7 +110,7 @@ static std::unordered_map ports_sockets; static void cc_closesocket(int fd) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) closesocket(fd); #else close(fd); @@ -345,19 +345,10 @@ bool JSBCore_os(JSContext *cx, uint32_t argc, jsval *vp) os = JS_InternString(cx, "Android"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) os = JS_InternString(cx, "Windows"); -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - os = JS_InternString(cx, "Marmalade"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) os = JS_InternString(cx, "Linux"); -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) - os = JS_InternString(cx, "Bada"); -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) - os = JS_InternString(cx, "Blackberry"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) os = JS_InternString(cx, "OS X"); -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - os = JS_InternString(cx, "WINRT"); -#else os = JS_InternString(cx, "Unknown"); #endif @@ -396,17 +387,7 @@ bool JSB_core_restartVM(JSContext *cx, uint32_t argc, jsval *vp) bool JSB_closeWindow(JSContext *cx, uint32_t argc, jsval *vp) { - EventListenerCustom* _event = Director::getInstance()->getEventDispatcher()->addCustomEventListener(Director::EVENT_AFTER_DRAW, [&](EventCustom *event) { - Director::getInstance()->getEventDispatcher()->removeEventListener(_event); - CC_SAFE_RELEASE(_event); - - ScriptingCore::getInstance()->cleanup(); - }); - _event->retain(); Director::getInstance()->end(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - exit(0); -#endif return true; }; @@ -1970,7 +1951,7 @@ static void serverEntryPoint(unsigned int port) int err = 0; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) WSADATA wsaData; err = WSAStartup(MAKEWORD(2, 2),&wsaData); #endif diff --git a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp index 451d3dd8eda4..7c53d7864b0c 100644 --- a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp +++ b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp @@ -6126,7 +6126,7 @@ void register_cocos2dx_js_core(JSContext* cx, JS::HandleObject global) tmpObj.set(jsb_cocos2d_Texture2D_prototype); JS_DefineFunction(cx, tmpObj, "retain", js_cocos2dx_retain, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); JS_DefineFunction(cx, tmpObj, "release", js_cocos2dx_release, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, tmpObj, "setTexParameters", js_cocos2dx_CCTexture2D_setTexParameters, 4, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "setSamplerDescriptor", js_cocos2dx_CCTexture2D_setTexParameters, 4, JSPROP_ENUMERATE | JSPROP_PERMANENT); tmpObj.set(jsb_cocos2d_Menu_prototype); JS_DefineFunction(cx, tmpObj, "alignItemsInRows", js_cocos2dx_CCMenu_alignItemsInRows, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); diff --git a/cocos/scripting/js-bindings/manual/js-BindingsExport.h b/cocos/scripting/js-bindings/manual/js-BindingsExport.h index 655b8f012578..7ceda1c497d7 100644 --- a/cocos/scripting/js-bindings/manual/js-BindingsExport.h +++ b/cocos/scripting/js-bindings/manual/js-BindingsExport.h @@ -24,7 +24,7 @@ #pragma once -#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8) +#if (defined(WIN32) && defined(_WINDOWS)) #ifdef __MINGW32__ #include #endif diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp index 7e32b83745b6..b03c19862388 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp @@ -550,7 +550,7 @@ bool jsval_to_long_long(JSContext *cx, JS::HandleValue vp, long long* r) JSB_PRECONDITION2(str, cx, false, "Error encoding string"); char *endptr; -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) __int64 ret = _strtoi64(str, &endptr, 10); #else long long ret = strtoll(str, &endptr, 10); diff --git a/cocos/scripting/js-bindings/manual/js_module_register.cpp b/cocos/scripting/js-bindings/manual/js_module_register.cpp index 4c73e2e6a604..8d03ae93324c 100644 --- a/cocos/scripting/js-bindings/manual/js_module_register.cpp +++ b/cocos/scripting/js-bindings/manual/js_module_register.cpp @@ -57,7 +57,7 @@ #include "scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.h" #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp" #endif @@ -134,7 +134,7 @@ int js_module_register() sc->addRegisterCallback(register_all_cocos2dx_experimental_webView_manual); #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) sc->addRegisterCallback(register_all_cocos2dx_audioengine); #endif diff --git a/cocos/scripting/js-bindings/proj.android/CMakeLists.txt b/cocos/scripting/js-bindings/proj.android/CMakeLists.txt index 29bbcb8357fe..60f2a9b82b85 100644 --- a/cocos/scripting/js-bindings/proj.android/CMakeLists.txt +++ b/cocos/scripting/js-bindings/proj.android/CMakeLists.txt @@ -13,6 +13,9 @@ add_library(${target_name} STATIC ${${target_name}_src} ) +# WARN, CCJavascriptJavaBridge.h:51 char TypeInvalid = -1 [-Wc++11-narrowing] +target_compile_options(${target_name} PUBLIC -Wno-c++11-narrowing) + get_target_property(spiderm_header ext_spidermonkey INTERFACE_INCLUDE_DIRECTORIES) target_include_directories(${target_name} PRIVATE ../../.. diff --git a/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/xcshareddata/xcschemes/libjscocos2d Mac.xcscheme b/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/xcshareddata/xcschemes/libjscocos2d Mac.xcscheme index 5e0ac453b1c8..7fe6a1e03aed 100644 --- a/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/xcshareddata/xcschemes/libjscocos2d Mac.xcscheme +++ b/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/xcshareddata/xcschemes/libjscocos2d Mac.xcscheme @@ -1,6 +1,6 @@ - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - precheader.h - Create - precheader.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - - - - {39379840-825A-45A0-B363-C09FFEF864BD} - Win32Proj - libjscocos2d - - - - StaticLibrary - true - Unicode - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - - - StaticLibrary - false - Unicode - v120 - v120_xp - v140 - v140_xp - v141 - v141_xp - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration).win32\ - - - $(Configuration).win32\$(ProjectName)\ - - - $(SolutionDir)$(Configuration).win32\ - - - $(Configuration).win32\$(ProjectName)\ - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_LIB;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_USRJSSTATIC;%(PreprocessorDefinitions) - $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\navmesh;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\bullet\include;$(EngineRoot)external\bullet\include\bullet;%(AdditionalIncludeDirectories) - 4068;4101;4800;4251;4244;4099;4083;4700;%(DisableSpecificWarnings) - true - false - ProgramDatabase - precheader.h - precheader.h - - - Windows - true - - - if not exist "$(OutDir)" mkdir "$(OutDir)" - -xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" - - - - - - Level3 - Use - MinSpace - true - true - WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_USRJSSTATIC;%(PreprocessorDefinitions) - $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\navmesh;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include;$(EngineRoot)external\bullet\include;$(EngineRoot)external\bullet\include\bullet;%(AdditionalIncludeDirectories) - 4068;4101;4800;4251;4244;4099;4083;4700;%(DisableSpecificWarnings) - true - None - precheader.h - precheader.h - - - Windows - true - true - true - - - if not exist "$(OutDir)" mkdir "$(OutDir)" - -xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" - - - - - - - \ No newline at end of file diff --git a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters deleted file mode 100644 index a1dcc11afbf5..000000000000 --- a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters +++ /dev/null @@ -1,337 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {05fe556b-0330-48c1-bfe1-0e7119db20a1} - - - {1a494d10-c2d0-498c-8b80-2f45fee36640} - - - {af265b68-4f27-4561-b7ab-299f21212e08} - - - {f4329991-ce95-4f10-9442-92d63bd6aea1} - - - {3248ad6e-d03d-4cce-8846-81aa376fc480} - - - {7b278f66-4153-44d8-ba60-d7b7feed8a17} - - - {59756149-2598-457f-ae42-ad675d5f3783} - - - {db4d6533-8c6a-4a18-bdd6-c9b98b897458} - - - {3d1a97d2-47a9-4fc2-8458-a58c4f1fc111} - - - {9f37ec66-1e00-4015-baa6-dabdf755f0ff} - - - {3aaaf02d-80d8-4339-b4cd-89d89ade5293} - - - {8c9f2cd3-9065-4bf5-a073-7697217022e2} - - - - - auto - - - auto - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - manual\chipmunk - - - manual\chipmunk - - - auto - - - manual\network - - - manual\cocosbuilder - - - manual\cocostudio - - - manual\extension - - - manual\localstorage - - - manual\localstorage - - - manual\network - - - manual\network - - - manual\network - - - manual\spine - - - manual\ui - - - manual\cocostudio - - - auto - - - auto - - - manual\3d - - - auto - - - manual\physics3d - - - auto - - - manual\navmesh - - - manual\navmesh - - - manual - - - manual - - - - - - auto - - - auto - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - manual - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - auto - - - manual\chipmunk - - - manual\chipmunk - - - auto - - - manual\network - - - manual\cocosbuilder - - - manual\cocosbuilder - - - manual\cocostudio - - - manual\extension - - - manual\localstorage - - - manual\localstorage - - - manual\localstorage - - - manual\network - - - manual\network - - - manual\network - - - manual\spine - - - manual\ui - - - manual\cocostudio - - - auto - - - auto - - - manual\3d - - - auto - - - manual\physics3d - - - auto - - - manual\navmesh - - - manual\navmesh - - - auto - - - manual - - - manual - - - - \ No newline at end of file diff --git a/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d.js b/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d.js deleted file mode 100644 index 815b46f5b5b0..000000000000 --- a/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d.js +++ /dev/null @@ -1,635 +0,0 @@ -/**************************************************************************** - Copyright (c) 2008-2010 Ricardo Quesada - Copyright (c) 2011-2012 cocos2d-x.org - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -cc.CameraFlag = { - DEFAULT : 1, - USER1 : 1 << 1, - USER2 : 1 << 2, - USER3 : 1 << 3, - USER4 : 1 << 4, - USER5 : 1 << 5, - USER6 : 1 << 6, - USER7 : 1 << 7, - USER8 : 1 << 8 -}; -cc.Camera.Mode = { - DEFAULT : 0, - PERSPECTIVE : 1, - ORTHOGRAPHIC : 2 -}; -cc.CameraBackgroundBrush.BrushType = { - NONE : 0, - DEPTH : 1, - COLOR : 2, - SKYBOX : 3 -}; - -cc.LightType = { - DIRECTIONAL : 0, - POINT : 1, - SPOT : 2, - AMBIENT : 3, -}; - -cc.LightFlag = { - LIGHT0 : 1, - LIGHT1 : 1 << 1, - LIGHT2 : 1 << 2, - LIGHT3 : 1 << 3, - LIGHT4 : 1 << 4, - LIGHT5 : 1 << 5, - LIGHT6 : 1 << 6, - LIGHT7 : 1 << 7, - LIGHT8 : 1 << 8, - LIGHT9 : 1 << 9, - LIGHT10 : 1 << 10, - LIGHT11 : 1 << 11, - LIGHT12 : 1 << 12, - LIGHT13 : 1 << 13, - LIGHT14 : 1 << 14, - LIGHT15 : 1 << 15, -}; - -cc.AsyncTaskPool.TaskType = { - TASK_IO : 0, - TASK_NETWORK : 1, - TASK_OTHER : 2, - TASK_MAX_TYPE : 3 -}; - -jsb.BillBoard.Mode = { - VIEW_POINT_ORIENTED : 0, // orient to the camera - VIEW_PLANE_ORIENTED : 1 // orient to the XOY plane of camera -}; - -jsb.Terrain.CrackFixedType = { - SKIRT : 0, - INCREASE_LOWER : 1 -}; - -jsb.Physics3DShape.ShapeType = -{ - UNKNOWN : 0, - BOX : 1, - SPHERE : 2, - CYLINDER : 3, - CAPSULE : 4, - CONVEX : 5, - MESH : 6, - HEIGHT_FIELD : 7, - COMPOUND : 8, -}; - -jsb.Terrain.DetailMap = function(file, size = 35){ - this.file = file; - this.size = size; -}; -jsb.Terrain.detailMap = function(file, size){ - return new jsb.Terrain.DetailMap(file, size); -}; - -jsb.Terrain.TerrainData = function(heightMap, alphaMap, detailMap, chunkSize = cc.size(32, 32), mapHeight = 2, mapScale = 0.1){ - this.heightMap = heightMap; - this.alphaMap = alphaMap; - this.detailMap = detailMap; - this.chunkSize = chunkSize; - this.mapHeight = mapHeight; - this.mapScale = mapScale; -}; -jsb.Terrain.terrainData = function(heightMap, alphaMap, detailMap, chunkSize, mapHeight, mapScale){ - return new jsb.Terrain.TerrainData(heightMap, alphaMap, detailMap, chunkSize, mapHeight, mapScale); -}; - -cc.attributeNames = [cc.ATTRIBUTE_NAME_POSITION, - cc.ATTRIBUTE_NAME_COLOR, - cc.ATTRIBUTE_NAME_TEX_COORD, - cc.ATTRIBUTE_NAME_TEX_COORD1, - cc.ATTRIBUTE_NAME_TEX_COORD2, - cc.ATTRIBUTE_NAME_TEX_COORD3, - cc.ATTRIBUTE_NAME_NORMAL, - cc.ATTRIBUTE_NAME_BLEND_WEIGHT, - cc.ATTRIBUTE_NAME_BLEND_INDEX]; - -cc.math = cc.math || {}; - -cc.math.Vec3 = function(x=0, y=0, z=0){ - this.x = x; - this.y = y; - this.z = z; -}; - -cc.math.Vec3.prototype.normalize = function(){ - var n = this.x * this.x + this.y * this.y + this.z * this.z; - n = 1 / Math.sqrt(n); - this.x *= n; - this.y *= n; - this.z *= n; -}; - -cc.math.vec3 = function(x, y, z){ - return new cc.math.Vec3(x, y, z); -}; - -cc.math.vec3Cross = function(v1, v2){ - return new cc.math.Vec3(v1.y * v2.z - v1.z * v2.y, - v1.z * v2.x - v1.x * v2.z, - v1.x * v2.y - v1.y * v2.x); -}; - -cc.math.vec3Dot = function(v1, v2){ - return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; -}; - -cc.math.vec3Length = function(v){ - return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z); -}; - -cc.math.vec3Normalize = function(v){ - var n = v.x * v.x + v.y * v.y + v.z * v.z; - n = 1 / Math.sqrt(n); - return cc.math.vec3(v.x * n, v.y * n, v.z * n); -}; - -cc.math.vec3Add = function(v1, v2){ - return new cc.math.Vec3(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z); -}; - -cc.math.vec3Sub = function(v1, v2){ - return new cc.math.Vec3(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z); -}; - -cc.math.Quaternion = function(x=0, y=0, z=0, w=0){ - this.x = x; - this.y = y; - this.z = z; - this.w = w; -}; - -cc.math.quaternion = function(xOrAxis, yOrAngle, z, w){ - if(w !== undefined){ - return new cc.math.Quaternion(xOrAxis, yOrAngle, z, w); - } - else if(yOrAngle !== undefined){ - var sinHalfAngle = Math.sin(yOrAngle / 2); - var normal = cc.math.vec3(xOrAxis.x, xOrAxis.y, xOrAxis.z); - normal.normalize(); - return cc.math.quaternion(normal.x * sinHalfAngle, normal.y * sinHalfAngle, normal.z * sinHalfAngle, Math.cos(yOrAngle / 2)); - } -}; - -cc.math.AABB = function(min=cc.math.vec3(99999, 99999, 99999), max=cc.math.vec3(-99999, -99999, -99999)){ - this.min = min; - this.max = max; -}; - -cc.math.aabb = function(min, max){ - return new cc.math.AABB(min, max); -}; - -cc.math.aabbGetCorners = function(aabb){ - var corners = new Array(8); - corners[0] = cc.math.vec3(aabb.min.x, aabb.max.y, aabb.max.z); - corners[1] = cc.math.vec3(aabb.min.x, aabb.min.y, aabb.max.z); - corners[2] = cc.math.vec3(aabb.max.x, aabb.min.y, aabb.max.z); - corners[3] = cc.math.vec3(aabb.max.x, aabb.max.y, aabb.max.z); - - corners[4] = cc.math.vec3(aabb.max.x, aabb.max.y, aabb.min.z); - corners[5] = cc.math.vec3(aabb.max.x, aabb.min.y, aabb.min.z); - corners[6] = cc.math.vec3(aabb.min.x, aabb.min.y, aabb.min.z); - corners[7] = cc.math.vec3(aabb.min.x, aabb.max.y, aabb.min.z); - return corners; -}; - -cc.math.OBB = function(aabb){ - this.center = cc.math.vec3((aabb.min.x + aabb.max.x)/2, (aabb.min.y + aabb.max.y)/2, (aabb.min.z + aabb.max.z)/2); // obb center - this.xAxis = cc.math.vec3(1, 0, 0); // x axis of obb, unit vector - this.yAxis = cc.math.vec3(0, 1, 0); // y axis of obb, unit vecotr - this.zAxis = cc.math.vec3(0, 0, 1); // z axis of obb, unit vector - this.extents = cc.math.vec3((aabb.max.x - aabb.min.x)/2, (aabb.max.y - aabb.min.y)/2, (aabb.max.z - aabb.min.z)/2); // obb length along each axis - this.extentX = cc.math.vec3((aabb.max.x - aabb.min.x)/2, 0, 0); // _xAxis * _extents.x - this.extentY = cc.math.vec3(0, (aabb.max.y - aabb.min.y)/2, 0); // _yAxis * _extents.y - this.extentZ = cc.math.vec3(0, 0, (aabb.max.z - aabb.min.z)/2); // _zAxis * _extents.z -}; - -cc.math.obb = function(aabb){ - return new cc.math.OBB(aabb); -}; - -cc.math.Ray = function(origin = cc.math.vec3(0, 0, 0), direction = cc.math.vec3(0, 0, 1)){ - this.origin = origin; - this.direction = direction; -}; - -cc.math.ray = function(origin, direction){ - return new cc.math.Ray(origin, direction); -}; - -cc.math.Vec4 = cc.math.Quaternion; - -cc.math.vec4 = function(x, y, z, w){ - return new cc.math.Vec4(x, y, z, w); -}; - -jsb.sprite3DCache = jsb.Sprite3DCache.getInstance(); - -jsb.Sprite3D.extend = cc.Class.extend; - -jsb.Sprite3D.prototype._setBlendFunc = jsb.Sprite3D.prototype.setBlendFunc; -jsb.Sprite3D.prototype.setBlendFunc = templateSetBlendFunc; - -jsb.Mesh.prototype._setBlendFunc = jsb.Mesh.prototype.setBlendFunc; -jsb.Mesh.prototype.setBlendFunc = templateSetBlendFunc; - -jsb.Sprite3D.prototype._ctor = function(modelPath, texturePath){ - if(modelPath === undefined){ - this.init(); - }else{ - if(modelPath.length < 4){ - cc.log("invalid filename for Sprite3D"); - return; - } - this.initWithFile(modelPath); - var bb = this.getBoundingBox(); - this.setContentSize(cc.size(bb.width, bb.height)); - - if(texturePath !== undefined) - this.setTexture(texturePath); - } -}; - -jsb.BillBoard.prototype._ctor = function(filename, rect, mode = jsb.BillBoard.Mode.VIEW_POINT_ORIENTED){ - if(filename !== undefined && filename instanceof cc.Texture2D){ - rect = rect || jsb.BillBoard.Mode.VIEW_POINT_ORIENTED; - this.initWithTexture(filename); - this.setMode(rect); - }else if(filename !== undefined && typeof filename === "string"){ - if(rect !== undefined){ - if(typeof rect === "object"){ - this.initWithFile(filename, rect); - this.setMode(mode); - }else{ - this.initWithFile(filename); - this.setMode(rect); - } - }else{ - this.initWithFile(filename); - this.setMode(jsb.BillBoard.Mode.VIEW_POINT_ORIENTED); - } - }else{ - filename = filename || jsb.BillBoard.Mode.VIEW_POINT_ORIENTED; - this.init(); - this.setMode(filename); - } -} - -jsb._Animation3D = jsb.Animation3D; - -jsb.Animation3D = function(fileName, animationName = ""){ - if (!(this instanceof jsb.Animation3D)){ - cc.error("Animation3D Constructor can not called as a function, Please use new"); - return; - } - - return jsb._Animation3D.create(fileName, animationName); -} - -jsb.Animation3D.create = function(fileName, animationName = ""){ - return jsb._Animation3D.create(fileName, animationName); -} - -/* static Animate3D* create(Animation3D* animation); - static Animate3D* create(Animation3D* animation, float fromTime, float duration); - static Animate3D* createWithFrames(Animation3D* animation, int startFrame, int endFrame, float frameRate = 30.f); - */ -jsb.Animate3D.prototype._ctor = function(first, second, third, fourth){ - if (arguments.length === 1) { - this.init(first); - } - else if (arguments.length === 3){ - this.init(first, second, third); - } - else if (arguments.length === 4) { - this.init(first, second, third, fourth); - } - else { - cc.error("jsb.Animate3D constructor: arguments error"); - } -} - -jsb.Skybox.prototype._ctor = function(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z){ - if (arguments.length === 0 ) { - this.init(); - } - else if (arguments.length === 6 ) { - this.init(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z); - } - else { - cc.error("jsb.Skybox constructor: arguments error"); - } -} - -jsb.DirectionLight.prototype._ctor = function(direction, color){ - if (arguments.length === 2 ) { - this.setDirection(direction); - this.setColor(color); - } - else { - cc.error("jsb.DirectionLight constructor: arguments error"); - } - -} - -jsb.AmbientLight.prototype._ctor = function(color){ - if (arguments.length === 1 ) { - this.setColor(color); - } - else { - cc.error("jsb.AmbientLight constructor: arguments error"); - } - -} - -jsb.Physics3DComponent.prototype._ctor = function(physicsObj, translateInPhysics = cc.math.vec3(), rotInPhsyics = new cc.math.Quaternion()){ - if (arguments.length > 3 || arguments.length < 1) { - cc.error("jsb.Physics3DComponent constructor: arguments error"); - } - else { - this.init(); - this.setPhysics3DObject(physicsObj); - this.setTransformInPhysics(translateInPhysics, rotInPhsyics); - } - -} -/* - static Physics3DPointToPointConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotPointInA); - static Physics3DPointToPointConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotPointInA, const cocos2d::Vec3& pivotPointInB); - */ -jsb.Physics3DPointToPointConstraint.prototype._ctor = function(first, second, third, fourth){ - if (arguments.length === 2 ) { - this.init(first, second); - } - else if (arguments.length === 4 ) { - this.init(first, second, third, fourth); - } - else { - cc.error("jsb.Physics3DPointToPointConstraint constructor: arguments error"); - } -} - -jsb.Physics3DRigidBody.prototype._ctor = function(rigidBodyInfo){ - if (arguments.length === 1 ) { - this.init(rigidBodyInfo); - } - else { - cc.error("jsb.Physics3DRigidBody constructor: arguments error"); - } -} - -jsb.Physics3DWorld.prototype._ctor = function(worldDesInfo){ - if (arguments.length === 1 ) { - this.init(worldDesInfo); - } - else { - cc.error("jsb.Physics3DWorld constructor: arguments error"); - } -} - -jsb.PointLight.prototype._ctor = function(position, color, range){ - if (arguments.length === 3 ) { - this.setPosition3D(position); - this.setColor(color); - this.setRange(range); - } - else { - cc.error("jsb.PointLight constructor: arguments error"); - } -} - -jsb.SpotLight.prototype._ctor = function(direction, position, color, innerAngle, outerAngle, range){ - if (arguments.length === 6 ) { - this.setDirection(direction); - this.setPosition3D(position); - this.setColor(color); - this.setInnerAngle(innerAngle); - this.setOuterAngle(outerAngle); - this.setRange(range); - } - else { - cc.error("jsb.SpotLight constructor: arguments error"); - } -} - -jsb.Terrain.prototype._ctor = function(parameter, fixedType = jsb.Terrain.INCREASE_LOWER){ - if (arguments.length === 2 || arguments.length === 1) { - this.initWithTerrainData(parameter, fixedType); - } - else { - cc.error("jsb.Terrain constructor: arguments error"); - } -} - -/** - * Camera* Camera::create() - * Camera* Camera::createPerspective(float fieldOfView, float aspectRatio, float nearPlane, float farPlane) - * Camera* Camera::createOrthographic(float zoomX, float zoomY, float nearPlane, float farPlane) - */ -cc.Camera.prototype._ctor = function(cameraMode, first, second, third, fourth){ - if (arguments.length === 1 && cameraMode == cc.Camera.Mode.DEFAULT) { - this.initDefault(); - this.setDepth(0); - } - else if (arguments.length === 5 && cameraMode == cc.Camera.Mode.PERSPECTIVE) { - this.initPerspective(first, second, third, fourth); - } - else if (arguments.length === 5 && cameraMode == cc.Camera.Mode.ORTHOGRAPHIC) { - this.initOrthographic(first, second, third, fourth); - } - else { - cc.error("jsb.Camera constructor: arguments error"); - } -} - -cc.CameraBackgroundBrush.prototype._ctor = function () { - this.init(); -} -cc.CameraBackgroundDepthBrush.prototype._ctor = function (depth) { - if (depth !== undefined) - this.setDepth(depth); - this.init(); -} -cc.CameraBackgroundColorBrush.prototype._ctor = function (color, depth) { - this.init(); - if (depth !== undefined) { - this.setColor(color); - this.setDepth(depth); - } -} -cc.CameraBackgroundSkyBoxBrush.prototype._ctor = function (positive_x, negative_x, positive_y, negative_y, positive_z, negative_z) -{ - if (negative_z !== undefined) { - var texture = jsb.TextureCube.create(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z); - if (texture) { - texture.setTexParameters(gl.LINEAR, gl.LINEAR, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE); - this.setTexture(texture); - } - } - this.init(); -} - -/** - * static Physics3DShape* createBox(const cocos2d::Vec3& extent); - * static Physics3DShape* createSphere(float radius); - * static Physics3DShape* createCylinder(float radius, float height); - * static Physics3DShape* createCapsule(float radius, float height); - * static Physics3DShape* createConvexHull(const cocos2d::Vec3 *points, int numPoints); - * static Physics3DShape* createMesh(const cocos2d::Vec3 *triangles, int numTriangles); - * static Physics3DShape* createHeightfield(int heightStickWidth,int heightStickLength - * , const void* heightfieldData, float heightScale - * , float minHeight, float maxHeight - * , bool useFloatDatam, bool flipQuadEdges, bool useDiamondSubdivision = false); - * static Physics3DShape* createCompoundShape(const std::vector> &shapes); - */ - -jsb.Physics3DShape.prototype._ctor = function(shapeType/*......*/){ - // the create function param numbers - // type:argumentsLength - var argumentsArr = {}; - argumentsArr[jsb.Physics3DShape.ShapeType.BOX] = [1]; - argumentsArr[jsb.Physics3DShape.ShapeType.SPHERE] = [1]; - argumentsArr[jsb.Physics3DShape.ShapeType.CYLINDER] = [2]; - argumentsArr[jsb.Physics3DShape.ShapeType.CAPSULE] = [2]; - argumentsArr[jsb.Physics3DShape.ShapeType.CONVEX] = [2]; - argumentsArr[jsb.Physics3DShape.ShapeType.MESH] = [2]; - argumentsArr[jsb.Physics3DShape.ShapeType.HEIGHT_FIELD] = [8, 9]; - argumentsArr[jsb.Physics3DShape.ShapeType.COMPOUND] = [1]; - - if (!argumentsArr[""+shapeType] || argumentsArr[""+shapeType].indexOf(arguments.length - 1) < 0) - { - cc.error("jsb.Physics3DShape constructor: arguments error"); - return; - } - - var initFunction = {}; - - initFunction[jsb.Physics3DShape.ShapeType.BOX] = "initBox"; - initFunction[jsb.Physics3DShape.ShapeType.SPHERE] = "initSphere"; - initFunction[jsb.Physics3DShape.ShapeType.CYLINDER] = "initCylinder"; - initFunction[jsb.Physics3DShape.ShapeType.CAPSULE] = "initCapsule"; - initFunction[jsb.Physics3DShape.ShapeType.CONVEX] = "initConvexHull"; - initFunction[jsb.Physics3DShape.ShapeType.MESH] = "initMesh"; - initFunction[jsb.Physics3DShape.ShapeType.HEIGHT_FIELD] = "initHeightfield"; - initFunction[jsb.Physics3DShape.ShapeType.COMPOUND] = "initCompoundShape"; - - this[initFunction[""+shapeType]].apply(this, Array.prototype.slice.call(arguments, 1)); -} - -/** - * static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Mat4& rbAFrame, bool useReferenceFrameA = false); - * static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotInA, const cocos2d::Vec3& axisInA, bool useReferenceFrameA = false); - * static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotInA,const cocos2d::Vec3& pivotInB, cocos2d::Vec3& axisInA, cocos2d::Vec3& axisInB, bool useReferenceFrameA = false); - * static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& rbAFrame, const cocos2d::Mat4& rbBFrame, bool useReferenceFrameA = false); - * - */ -jsb._Physics3DHingeConstraint = jsb.Physics3DHingeConstraint; - -jsb.Physics3DHingeConstraint = function(/*arguments*/){ - if (!(this instanceof jsb.Physics3DHingeConstraint)){ - cc.error("Physics3DHingeConstraint Constructor can not called as a function, Please use new"); - return; - } - - return jsb._Physics3DHingeConstraint.create.apply(this, arguments); -} - -jsb.Physics3DHingeConstraint.create = function(/*arguments*/){ - return jsb._Physics3DHingeConstraint.create.apply(this, arguments); -} - - -jsb._Physics3DSliderConstraint = jsb.Physics3DSliderConstraint; - -jsb.Physics3DSliderConstraint = function(/*arguments*/){ - if (!(this instanceof jsb.Physics3DSliderConstraint)){ - cc.error("Physics3DSliderConstraint Constructor can not called as a function, Please use new"); - return; - } - - return jsb._Physics3DSliderConstraint.create.apply(this, arguments); -} - -jsb.Physics3DSliderConstraint.create = function(/*arguments*/){ - return jsb._Physics3DSliderConstraint.create.apply(this, arguments); -} - -jsb._Physics3DConeTwistConstraint = jsb.Physics3DConeTwistConstraint; - -jsb.Physics3DConeTwistConstraint = function(/*arguments*/){ - if (!(this instanceof jsb.Physics3DConeTwistConstraint)){ - cc.error("Physics3DConeTwistConstraint Constructor can not called as a function, Please use new"); - return; - } - - return jsb._Physics3DConeTwistConstraint.create.apply(this, arguments); -} - -jsb.Physics3DConeTwistConstraint.create = function(/*arguments*/){ - return jsb._Physics3DConeTwistConstraint.create.apply(this, arguments); -} - -jsb._Physics3D6DofConstraint = jsb.Physics3D6DofConstraint; - -jsb.Physics3D6DofConstraint = function(/*arguments*/){ - if (!(this instanceof jsb.Physics3D6DofConstraint)){ - cc.error("Physics3D6DofConstraint Constructor can not called as a function, Please use new"); - return; - } - - return jsb._Physics3D6DofConstraint.create.apply(this, arguments); -} - -jsb.Physics3D6DofConstraint.create = function(/*arguments*/){ - return jsb._Physics3D6DofConstraint.create.apply(this, arguments); -} - -jsb._PhysicsSprite3D = jsb.PhysicsSprite3D; - -jsb.PhysicsSprite3D = function(/*arguments*/){ - if (!(this instanceof jsb.PhysicsSprite3D)){ - cc.error("PhysicsSprite3D Constructor can not called as a function, Please use new"); - return; - } - - return jsb._PhysicsSprite3D.create.apply(this, arguments); -} - -jsb.PhysicsSprite3D.create = function(/*arguments*/){ - return jsb._PhysicsSprite3D.create.apply(this, arguments); -} - -jsb.PhysicsSprite3D.createWithCollider = function(/*arguments*/){ - return jsb._PhysicsSprite3D.createWithCollider.apply(this, arguments); -} - diff --git a/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d_ext.js b/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d_ext.js deleted file mode 100644 index 3732fcbd6b8a..000000000000 --- a/cocos/scripting/js-bindings/script/3d/jsb_cocos2d_3d_ext.js +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - Copyright (c) 2008-2010 Ricardo Quesada - Copyright (c) 2011-2012 cocos2d-x.org - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -jsb.ParticleSystem3D.prototype._setBlendFunc = jsb.ParticleSystem3D.prototype.setBlendFunc; -jsb.ParticleSystem3D.prototype.setBlendFunc = templateSetBlendFunc; \ No newline at end of file diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js deleted file mode 100644 index 60aac0a34074..000000000000 --- a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2014-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -ccui.Widget.prototype.init = ccui.Widget.prototype._init; -ccui.RichText.prototype.init = function(){ - ccui.Widget.prototype.init.call(this); -}; -ccui.Slider.prototype.init = function(){ - ccui.Widget.prototype.init.call(this); - this.setTouchEnabled(true); -}; - -ccui.Widget.prototype._ctor - = ccui.RichText.prototype._ctor - = ccui.Slider.prototype._ctor - = ccui.Layout.prototype._ctor - = ccui.ListView.prototype._ctor - = ccui.PageView.prototype._ctor - = ccui.ScrollView.prototype._ctor - = function(){ - this.init(); - }; - -ccui.Button.prototype._ctor = function (normalImage, selectedImage, disableImage, texType) { - if(texType !== undefined) - ccui.Button.prototype.init.call(this, normalImage, selectedImage, disableImage, texType); - else if(disableImage !== undefined) - ccui.Button.prototype.init.call(this, normalImage, selectedImage, disableImage); - else if(selectedImage !== undefined) - ccui.Button.prototype.init.call(this, normalImage, selectedImage); - else if(normalImage !== undefined) - ccui.Button.prototype.init.call(this, normalImage); - else - ccui.Widget.prototype.init.call(this); - - this.setTouchEnabled(true); -}; - -ccui.CheckBox.prototype._ctor = function (backGround, backGroundSelected, cross, backGroundDisabled, frontCrossDisabled, texType) { - if (frontCrossDisabled !== undefined) { - texType = texType || ccui.Widget.LOCAL_TEXTURE; - ccui.CheckBox.prototype.init.call(this, backGround, backGroundSelected, cross, backGroundDisabled, frontCrossDisabled, texType); - }else if(backGroundSelected !== undefined){ - texType = ccui.Widget.LOCAL_TEXTURE; - cross = backGroundSelected; - backGroundSelected = backGroundDisabled = frontCrossDisabled = backGround; - ccui.CheckBox.prototype.init.call(this, backGround, backGroundSelected, cross, backGroundDisabled, frontCrossDisabled, texType); - } - else { - ccui.Widget.prototype.init.call(this); - } - - this.setSelected(false); - this.setTouchEnabled(true); -}; - -ccui.ImageView.prototype._ctor = function(imageFileName, texType){ - if(imageFileName !== undefined){ - texType = texType || ccui.Widget.LOCAL_TEXTURE; - ccui.ImageView.prototype._init.call(this, imageFileName, texType); - } - else - ccui.Widget.prototype.init.call(this); -}; - -ccui.LoadingBar.prototype._ctor = function(textureName, percentage){ - ccui.Widget.prototype.init.call(this); - - if(textureName !== undefined) - this.loadTexture(textureName); - if(percentage !== undefined) - this.setPercent(percentage); -}; - -ccui.TextAtlas.prototype._ctor = function(stringValue, charMapFile, itemWidth, itemHeight, startCharMap){ - ccui.Widget.prototype.init.call(this); - startCharMap !== undefined && this.setProperty(stringValue, charMapFile, itemWidth, itemHeight, startCharMap); -}; - -ccui.Text.prototype._ctor = function(textContent, fontName, fontSize){ - if(fontSize !== undefined) - ccui.Text.prototype.init.call(this, textContent, fontName, fontSize); - else - ccui.Widget.prototype.init.call(this); -}; - -ccui.TextBMFont.prototype._ctor = function(text, filename){ - ccui.Widget.prototype.init.call(this); - - if(filename !== undefined){ - this.setFntFile(filename); - this.setString(text); - } -}; - -ccui.TextField.prototype._ctor = function(placeholder, fontName, fontSize){ - ccui.Widget.prototype.init.call(this); - this.setTouchEnabled(true); - - if (placeholder !== undefined) - this.setPlaceHolder(placeholder); - if (fontName !== undefined) - this.setFontName(fontName); - if (fontSize !== undefined) - this.setFontSize(fontSize); -}; - -ccui.RichElementText.prototype._ctor = function(tag, color, opacity, text, fontName, fontSize){ - fontSize !== undefined && this.init(tag, color, opacity, text, fontName, fontSize, 0, ""); -}; - -ccui.RichElementImage.prototype._ctor = function(tag, color, opacity, filePath){ - filePath !== undefined && this.init(tag, color, opacity, filePath); -}; - -ccui.RichElementCustomNode.prototype._ctor = function(tag, color, opacity, customNode){ - customNode !== undefined && this.init(tag, color, opacity, customNode); -}; - -if (ccui.WebView) -{ - ccui.WebView.prototype._ctor = function(url){ - this.init(); - url !== undefined && this.loadURL(url); - }; -} - -if (ccui.VideoPlayer) -{ - ccui.VideoPlayer.prototype._ctor = function(url){ - this.init(); - url !== undefined && this.setURL(url); - }; -} - - -cc.Scale9Sprite.prototype._ctor = function(file, rect, capInsets){ - rect = rect || cc.rect(0, 0, 0, 0); - capInsets = capInsets || cc.rect(0, 0, 0, 0); - if(file != undefined){ - if(file instanceof cc.SpriteFrame) - this.initWithSpriteFrame(file, rect); - else{ - var frame = cc.spriteFrameCache.getSpriteFrame(file); - if(frame != null) - this.initWithSpriteFrame(frame, rect); - else - this.initWithFile(file, rect, capInsets); - } - }else{ - cc.Node.prototype.init.call(this); - } -}; - -cc.EditBox.prototype._ctor = function(size, normal9SpriteBg, press9SpriteBg, disabled9SpriteBg){ - normal9SpriteBg && this.initWithSizeAndBackgroundSprite(size, normal9SpriteBg); -}; diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_deprecated.js b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_deprecated.js deleted file mode 100644 index 9665f9b4ccd2..000000000000 --- a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_deprecated.js +++ /dev/null @@ -1,96 +0,0 @@ -/*global ccui */ - -/* - * Copyright (c) 2013-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -// Deprecated functions - -var cc = cc || {}; - -(function() { - var logW = function(oldName, newName) { - cc.log("\n********** \n"+oldName +" was deprecated, please use "+ newName +" instead.\n**********"); - }; - - ccui.Text.prototype.setText = function(text) { - logW("ccui.Text.setText", "ccui.Text.setString"); - this.setString(text); - }; - - ccui.Text.prototype.getStringValue = function() { - logW("ccui.Text.getStringValue", "ccui.Text.getString"); - return this.getString(); - }; - - ccui.PageView.prototype.getCurPageIndex = function() { - logW("ccui.PageView.getCurPageIndex", "ccui.PageView.getCurrentPageIndex"); - return this.getCurrentPageIndex(); - }; - - ccui.PageView.prototype.addWidgetToPage = function(widget, pageIndx) { - logW("ccui.PageView.addWidgetToPage", "ccui.PageView.insertPage"); - return this.insertPage(widget, pageIndx); - }; - - ccui.PageView.prototype.setCurPageIndex = function(index) { - logW("ccui.PageView.setCurPageIndex", "ccui.PageView.setCurrentPageIndex"); - return this.setCurrentPageIndex(index); - }; - - ccui.PageView.prototype.getPages = function() { - logW("ccui.PageView.getPages", "ccui.PageView.getItems"); - return this.getItems(); - }; - - ccui.PageView.prototype.getPage = function(index) { - logW("ccui.PageView.getPage", "ccui.PageView.getItem"); - return this.getItem(index); - }; - - ccui.PageView.prototype.setCustomScrollThreshold = function() { - cc.log("Since v3.9, this method has no effect."); - }; - - ccui.PageView.prototype.getCustomScrollThreshold = function() { - cc.log("Since v3.9, this method has no effect."); - }; - - ccui.PageView.prototype.setUsingCustomScrollThreshold = function() { - cc.log("Since v3.9, this method has no effect."); - }; - - ccui.PageView.prototype.isUsingCustomScrollThreshold = function() { - cc.log("Since v3.9, this method has no effect."); - }; - - ccui.ListView.prototype.requestRefreshView = function() { - logW("ccui.ListView.requestRefreshView", "ccui.ListView.forceDoLayout"); - this.forceDoLayout(); - }; - - ccui.ListView.prototype.refreshView = function() { - logW("ccui.ListView.refreshView", "ccui.ListView.forceDoLayout"); - this.forceDoLayout(); - }; - -})(); diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_apis.js b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_apis.js deleted file mode 100644 index 3dec4319abac..000000000000 --- a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_apis.js +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2014-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -var _proto = ccui.Widget.prototype; -cc.defineGetterSetter(_proto, "xPercent", _proto._getXPercent, _proto._setXPercent); -cc.defineGetterSetter(_proto, "yPercent", _proto._getYPercent, _proto._setYPercent); -cc.defineGetterSetter(_proto, "widthPercent", _proto._getWidthPercent, _proto._setWidthPercent); -cc.defineGetterSetter(_proto, "heightPercent", _proto._getHeightPercent, _proto._setHeightPercent); -cc.defineGetterSetter(_proto, "widgetParent", _proto.getWidgetParent); -cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled); -cc.defineGetterSetter(_proto, "focused", _proto.isFocused, _proto.setFocused); -cc.defineGetterSetter(_proto, "sizeType", _proto.getSizeType, _proto.setSizeType); -cc.defineGetterSetter(_proto, "widgetType", _proto.getWidgetType); -cc.defineGetterSetter(_proto, "touchEnabled", _proto.isTouchEnabled, _proto.setTouchEnabled); -cc.defineGetterSetter(_proto, "updateEnabled", _proto.isUpdateEnabled, _proto.setUpdateEnabled); -cc.defineGetterSetter(_proto, "bright", _proto.isBright, _proto.setBright); -cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName); -cc.defineGetterSetter(_proto, "actionTag", _proto.getActionTag, _proto.setActionTag); -cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX); -cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX); -cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY); -cc.defineGetterSetter(_proto, "children", _proto.getChildren); -cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount); - -_proto = ccui.Layout.prototype; -cc.defineGetterSetter(_proto, "clippingEnabled", _proto.isClippingEnabled, _proto.setClippingEnabled); -cc.defineGetterSetter(_proto, "clippingType", _proto.setClippingType); -cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType); - -_proto = ccui.Button.prototype; -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "titleText", _proto.getTitleText, _proto.setTitleText); -cc.defineGetterSetter(_proto, "titleFont", _proto._getTitleFont, _proto._setTitleFont); -cc.defineGetterSetter(_proto, "titleFontSize", _proto.getTitleFontSize, _proto.setTitleFontSize); -cc.defineGetterSetter(_proto, "titleFontName", _proto.getTitleFontName, _proto.setTitleFontName); -cc.defineGetterSetter(_proto, "titleFontColor", _proto.getTitleFontColor, _proto.setTitleFontColor); -cc.defineGetterSetter(_proto, "pressedActionEnabled", _proto.getPressedActionEnabled, _proto.setPressedActionEnabled); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); -cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX); -cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY); -cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor); - -_proto = ccui.CheckBox.prototype; -cc.defineGetterSetter(_proto, "selected", _proto.getSelected, _proto.setSelected); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); -cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX); -cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); - -_proto = ccui.Text.prototype; -cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth); -cc.defineGetterSetter(_proto, "boundingHeight", _proto._getBoundingHeight, _proto._setBoundingHeight); -cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString); -cc.defineGetterSetter(_proto, "stringLength", _proto.getStringLength); -cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont); -cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName); -cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize); -cc.defineGetterSetter(_proto, "textAlign", _proto.getHorizontalAlignment, _proto.setTextHorizontalAlignment); -cc.defineGetterSetter(_proto, "verticalAlign", _proto.getVerticalAlignment, _proto.setTextVerticalAlignment); -cc.defineGetterSetter(_proto, "touchScaleEnabled", _proto.getTouchScaleEnabled, _proto.setTouchScaleEnabled); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); -cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX); -cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY); -cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX); -cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY); - -_proto = ccui.TextAtlas.prototype; -cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); - -_proto = ccui.TextBMFont.prototype; -cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); - -_proto = ccui.LoadingBar.prototype; -cc.defineGetterSetter(_proto, "direction", _proto.getDirection, _proto.setDirection); -cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); - -_proto = ccui.Slider.prototype; -cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); - -_proto = ccui.TextField.prototype; -cc.defineGetterSetter(_proto, "maxLengthEnabled", _proto.isMaxLengthEnabled, _proto.setMaxLengthEnabled); -cc.defineGetterSetter(_proto, "maxLength", _proto.getMaxLength, _proto.setMaxLength); -cc.defineGetterSetter(_proto, "passwordEnabled", _proto.isPasswordEnabled, _proto.setPasswordEnabled); -cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString); -cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont); -cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize); -cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); -cc.defineGetterSetter(_proto, 'placeHolder', _proto.getPlaceHolder, _proto.setPlaceHolder); - -_proto = ccui.ScrollView.prototype; -cc.defineGetterSetter(_proto, "innerWidth", _proto._getInnerWidth, _proto._setInnerWidth); -cc.defineGetterSetter(_proto, "innerHeight", _proto._getInnerHeight, _proto._setInnerHeight); -cc.defineGetterSetter(_proto, "bounceEnabled", _proto.getBounceEnabled, _proto.setBounceEnabled); -cc.defineGetterSetter(_proto, "inertiaScrollEnabled", _proto.getInertiaScrollEnabled, _proto.setInertiaScrollEnabled); -cc.defineGetterSetter(_proto, "children", _proto.getChildren); -cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount); -cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType); - -_proto = cc.Scale9Sprite.prototype; -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); -cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor); -cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity); -cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB); -cc.defineGetterSetter(_proto, "preferredSize", _proto.getPreferredSize, _proto.setPreferredSize); -cc.defineGetterSetter(_proto, "capInsets", _proto.getCapInsets, _proto.setCapInsets); -cc.defineGetterSetter(_proto, "insetLeft", _proto.getInsetLeft, _proto.setInsetLeft); -cc.defineGetterSetter(_proto, "insetTop", _proto.getInsetTop, _proto.setInsetTop); -cc.defineGetterSetter(_proto, "insetRight", _proto.getInsetRight, _proto.setInsetRight); -cc.defineGetterSetter(_proto, "insetBottom", _proto.getInsetBottom, _proto.setInsetBottom); - -_proto = cc.EditBox.prototype; -cc.defineGetterSetter(_proto, 'font', null, _p.setFont); -cc.defineGetterSetter(_proto, 'fontName', null, _p.setFontName); -cc.defineGetterSetter(_proto, 'fontSize', null, _p.setFontSize); -cc.defineGetterSetter(_proto, 'fontColor', null, _p.setFontColor); -cc.defineGetterSetter(_proto, 'string', _p.getString, _p.setString); -cc.defineGetterSetter(_proto, 'maxLength', _p.getMaxLength, _p.setMaxLength); -cc.defineGetterSetter(_proto, 'placeholder', _p.getPlaceHolder, _p.setPlaceHolder); -cc.defineGetterSetter(_proto, 'placeholderFont', null, _p.setPlaceholderFont); -cc.defineGetterSetter(_proto, 'placeholderFontName', null, _p.setPlaceholderFontName); -cc.defineGetterSetter(_proto, 'placeholderFontSize', null, _p.setPlaceholderFontSize); -cc.defineGetterSetter(_proto, 'placeholderFontColor', null, _p.setPlaceholderFontColor); -cc.defineGetterSetter(_proto, 'inputFlag', null, _p.setInputFlag); -cc.defineGetterSetter(_proto, 'delegate', null, _p.setDelegate); -cc.defineGetterSetter(_proto, 'inputMode', null, _p.setInputMode); -cc.defineGetterSetter(_proto, 'returnType', null, _p.setReturnType); - -_proto = ccui.ImageView.prototype; -cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX); -cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY); -cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX); -cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY); -cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth); -cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight); diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_impls.js b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_impls.js deleted file mode 100644 index 12561806fb8d..000000000000 --- a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_property_impls.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2014-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -// Override width and height getter setter -_forceExtend(ccui.Widget.prototype, { - _getXPercent: function() { - return this.getPositionPercent().x; - }, - _getYPercent: function() { - return this.getPositionPercent().y; - }, - - _setXPercent: function(x) { - var p = cc.p(x, this.getPositionPercent().y); - this.setPositionPercent(p); - }, - _setYPercent: function(y) { - var p = cc.p(this.getPositionPercent().x, y); - this.setPositionPercent(p); - }, - - _getWidth: function() { - return this.getContentSize().width; - }, - _getHeight: function() { - return this.getContentSize().height; - }, - _getWidthPercent: function() { - return this.getSizePercent().width; - }, - _getHeightPercent: function() { - return this.getSizePercent().height; - }, - - _setWidth: function(w) { - var size = cc.size(w, this.getContentSize().height); - this.setContentSize(size); - }, - _setHeight: function(h) { - var size = cc.size(this.getContentSize().width, h); - this.setContentSize(size); - }, - _setWidthPercent: function(w) { - var size = cc.size(w, this.getSizePercent().height); - this.setSizePercent(size); - }, - _setHeightPercent: function(h) { - var size = cc.size(this.getSizePercent().width, h); - this.setSizePercent(size); - } -}); - -_safeExtend(ccui.Button.prototype, { - _fontStyleRE: /^(\d+)px\s+['"]?([\w\s\d]+)['"]?$/, - - _getTitleFont: function() { - var size = this.getTitleFontSize(); - var name = this.getTitleFontName(); - return size + "px '" + name + "'"; - }, - - _setTitleFont: function(fontStyle) { - var res = this._fontStyleRE.exec(fontStyle); - if(res) { - this.setTitleFontSize(parseInt(res[1])); - this.setTitleFontName(res[2]); - } - } -}); - -_safeExtend(ccui.Text.prototype, { - _getBoundingWidth: function() { - return this.getTextAreaSize().width; - }, - _getBoundingHeight: function() { - return this.getTextAreaSize().height; - }, - - _setBoundingWidth: function(w) { - var size = cc.size(w, this.getTextAreaSize().height); - this.setTextAreaSize(size); - }, - _setBoundingHeight: function(h) { - var size = cc.size(this.getTextAreaSize().width, h); - this.setTextAreaSize(size); - } -}); - -_safeExtend(ccui.TextField.prototype, { - _fontStyleRE: /^(\d+)px\s+['"]?([\w\s\d]+)['"]?$/, - - _getFont: function() { - var size = this.getFontSize(); - var name = this.getFontName(); - return size + "px '" + name + "'"; - }, - - _setFont: function(fontStyle) { - var res = this._fontStyleRE.exec(fontStyle); - if(res) { - this.setFontSize(parseInt(res[1])); - this.setFontName(res[2]); - } - } -}); - -_safeExtend(ccui.ScrollView.prototype, { - _getInnerWidth: function() { - return this.getInnerContainerSize().width; - }, - _getInnerHeight: function() { - return this.getInnerContainerSize().height; - }, - - _setInnerWidth: function(w) { - var size = cc.size(w, this.getInnerContainerSize().height); - this.setInnerContainerSize(size); - }, - _setInnerHeight: function(h) { - var size = cc.size(this.getInnerContainerSize().width, h); - this.setInnerContainerSize(size); - } -}); - -// _safeExtend(ccui.EditBox.prototype, { -// _setFont: function(fontStyle) { -// var res = cc.LabelTTF.prototype._fontStyleRE.exec(fontStyle); -// if(res) { -// this.setFontSize(parseInt(res[1])); -// this.setFontName(res[2]); -// } -// } -// }); \ No newline at end of file diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js b/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js deleted file mode 100644 index 29c3717ca474..000000000000 --- a/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Copyright (c) 2013-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -// -// cocos2d ui constants -// -// This helper file should be required after jsb_cocos2d.js -// - -var ccui = ccui || {}; - - -cc.EditBox = ccui.EditBox; -delete ccui.EditBox; - -/** - * @constant - * @type Number - */ -cc.KEYBOARD_RETURNTYPE_DEFAULT = 0; - -/** - * @constant - * @type Number - */ -cc.KEYBOARD_RETURNTYPE_DONE = 1; - -/** - * @constant - * @type Number - */ -cc.KEYBOARD_RETURNTYPE_SEND = 2; - -/** - * @constant - * @type Number - */ -cc.KEYBOARD_RETURNTYPE_SEARCH = 3; - -/** - * @constant - * @type Number - */ -cc.KEYBOARD_RETURNTYPE_GO = 4; - -/** - * The EditBox::InputMode defines the type of text that the user is allowed * to enter. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_ANY = 0; - -/** - * The user is allowed to enter an e-mail address. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_EMAILADDR = 1; - -/** - * The user is allowed to enter an integer value. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_NUMERIC = 2; - -/** - * The user is allowed to enter a phone number. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_PHONENUMBER = 3; - -/** - * The user is allowed to enter a URL. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_URL = 4; - -/** - * The user is allowed to enter a real number value. - * This extends kEditBoxInputModeNumeric by allowing a decimal point. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_DECIMAL = 5; - -/** - * The user is allowed to enter any text, except for line breaks. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_MODE_SINGLELINE = 6; - -/** - * Indicates that the text entered is confidential data that should be - * obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_FLAG_PASSWORD = 0; - -/** - * Indicates that the text entered is sensitive data that the - * implementation must never store into a dictionary or table for use - * in predictive, auto-completing, or other accelerated input schemes. - * A credit card number is an example of sensitive data. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_FLAG_SENSITIVE = 1; - -/** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each word should be capitalized. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_WORD = 2; - -/** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each sentence should be capitalized. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_SENTENCE = 3; - -/** - * Capitalize all characters automatically. - * @constant - * @type Number - */ -cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_ALL_CHARACTERS = 4; - -var _p = cc.EditBox.prototype; - -_p._setMaxLength = _p.setMaxLength; -_p.setMaxLength = function(maxLength) { - if (maxLength < 0) { - maxLength = 65535; - } - this._setMaxLength(maxLength); -}; -_p.setLineHeight = function () {}; -_p.setTabIndex = function () {}; -_p.getTabIndex = function () { return -1; }; -_p.setFocus = function () {}; -_p.isFocused = function () { return false; }; -_p.stayOnTop = function () {}; - - -cc.Scale9Sprite = ccui.Scale9Sprite; - -// GUI -/** - * @type {Object} - * UI Helper - */ -ccui.helper = ccui.Helper; - -// =====================Constants===================== - -/* - * UILayout - */ -//layoutBackGround color type -ccui.Layout.BG_COLOR_NONE = 0; -ccui.Layout.BG_COLOR_SOLID = 1; -ccui.Layout.BG_COLOR_GRADIENT = 2; - -//Layout type -ccui.Layout.ABSOLUTE = 0; -ccui.Layout.LINEAR_VERTICAL = 1; -ccui.Layout.LINEAR_HORIZONTAL = 2; -ccui.Layout.RELATIVE = 3; - -//Layout clipping type -ccui.Layout.CLIPPING_STENCIL = 0; -ccui.Layout.CLIPPING_SCISSOR = 1; - -ccui.Layout.BACKGROUND_IMAGE_ZORDER = -1; -ccui.Layout.BACKGROUND_RENDERER_ZORDER = -2; - -/* - * UILayoutDefine - */ -//LinearGravity -//old -ccui.LINEAR_GRAVITY_NONE = 0; -ccui.LINEAR_GRAVITY_LEFT = 1; -ccui.LINEAR_GRAVITY_TOP = 2; -ccui.LINEAR_GRAVITY_RIGHT = 3; -ccui.LINEAR_GRAVITY_BOTTOM = 4; -ccui.LINEAR_GRAVITY_CENTER_VERTICAL = 5; -ccui.LINEAR_GRAVITY_CENTER_HORIZONTAL = 6; -//new -ccui.LinearLayoutParameter.NONE = 0; -ccui.LinearLayoutParameter.LEFT = 1; -ccui.LinearLayoutParameter.TOP = 2; -ccui.LinearLayoutParameter.RIGHT = 3; -ccui.LinearLayoutParameter.BOTTOM = 4; -ccui.LinearLayoutParameter.CENTER_VERTICAL = 5; -ccui.LinearLayoutParameter.CENTER_HORIZONTAL = 6; - -//RelativeAlign -//old -ccui.RELATIVE_ALIGN_NONE = 0; -ccui.RELATIVE_ALIGN_PARENT_TOP_LEFT = 1; -ccui.RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL = 2; -ccui.RELATIVE_ALIGN_PARENT_TOP_RIGHT = 3; -ccui.RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL = 4; -ccui.RELATIVE_ALIGN_PARENT_CENTER = 5; -ccui.RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL = 6; -ccui.RELATIVE_ALIGN_PARENT_LEFT_BOTTOM = 7; -ccui.RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL = 8; -ccui.RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM = 9; - -ccui.RELATIVE_ALIGN_LOCATION_ABOVE_LEFT = 10; -ccui.RELATIVE_ALIGN_LOCATION_ABOVE_CENTER = 11; -ccui.RELATIVE_ALIGN_LOCATION_ABOVE_RIGHT = 12; - -ccui.RELATIVE_ALIGN_LOCATION_LEFT_TOP = 13; -ccui.RELATIVE_ALIGN_LOCATION_LEFT_CENTER = 14; -ccui.RELATIVE_ALIGN_LOCATION_LEFT_BOTTOM = 15; - -ccui.RELATIVE_ALIGN_LOCATION_RIGHT_TOP = 16; -ccui.RELATIVE_ALIGN_LOCATION_RIGHT_CENTER = 17; -ccui.RELATIVE_ALIGN_LOCATION_RIGHT_BOTTOM = 18; - -ccui.RELATIVE_ALIGN_LOCATION_BELOW_TOP = 19; -ccui.RELATIVE_ALIGN_LOCATION_BELOW_CENTER = 20; -ccui.RELATIVE_ALIGN_LOCATION_BELOW_BOTTOM = 21; - -//new -ccui.RelativeLayoutParameter.NONE = 0; -ccui.RelativeLayoutParameter.PARENT_TOP_LEFT = 1; -ccui.RelativeLayoutParameter.PARENT_TOP_CENTER_HORIZONTAL = 2; -ccui.RelativeLayoutParameter.PARENT_TOP_RIGHT = 3; -ccui.RelativeLayoutParameter.PARENT_LEFT_CENTER_VERTICAL = 4; - -ccui.RelativeLayoutParameter.CENTER_IN_PARENT = 5; - -ccui.RelativeLayoutParameter.PARENT_RIGHT_CENTER_VERTICAL = 6; -ccui.RelativeLayoutParameter.PARENT_LEFT_BOTTOM = 7; -ccui.RelativeLayoutParameter.PARENT_BOTTOM_CENTER_HORIZONTAL = 8; -ccui.RelativeLayoutParameter.PARENT_RIGHT_BOTTOM = 9; - -ccui.RelativeLayoutParameter.LOCATION_ABOVE_LEFTALIGN = 10; -ccui.RelativeLayoutParameter.LOCATION_ABOVE_CENTER = 11; -ccui.RelativeLayoutParameter.LOCATION_ABOVE_RIGHTALIGN = 12; -ccui.RelativeLayoutParameter.LOCATION_LEFT_OF_TOPALIGN = 13; -ccui.RelativeLayoutParameter.LOCATION_LEFT_OF_CENTER = 14; -ccui.RelativeLayoutParameter.LOCATION_LEFT_OF_BOTTOMALIGN = 15; -ccui.RelativeLayoutParameter.LOCATION_RIGHT_OF_TOPALIGN = 16; -ccui.RelativeLayoutParameter.LOCATION_RIGHT_OF_CENTER = 17; -ccui.RelativeLayoutParameter.LOCATION_RIGHT_OF_BOTTOMALIGN = 18; -ccui.RelativeLayoutParameter.LOCATION_BELOW_LEFTALIGN = 19; -ccui.RelativeLayoutParameter.LOCATION_BELOW_CENTER = 20; -ccui.RelativeLayoutParameter.LOCATION_BELOW_RIGHTALIGN = 21; - -/* - * LayoutParameter - */ -//layout parameter type -ccui.LayoutParameter.NONE = 0; -ccui.LayoutParameter.LINEAR = 1; -ccui.LayoutParameter.RELATIVE = 2; - -//LayoutComponent -ccui.LayoutComponent.horizontalEdge = {}; -ccui.LayoutComponent.horizontalEdge.NONE = 0; -ccui.LayoutComponent.horizontalEdge.LEFT = 1; -ccui.LayoutComponent.horizontalEdge.RIGHT = 2; -ccui.LayoutComponent.horizontalEdge.CENTER = 3; - -ccui.LayoutComponent.verticalEdge = {}; -ccui.LayoutComponent.verticalEdge.NONE = 0; -ccui.LayoutComponent.verticalEdge.BOTTOM = 1; -ccui.LayoutComponent.verticalEdge.TOP = 2; -ccui.LayoutComponent.verticalEdge.CENTER = 3; -/* - * UIWidget - */ -//bright style -ccui.Widget.BRIGHT_STYLE_NONE = -1; -ccui.Widget.BRIGHT_STYLE_NORMAL = 0; -ccui.Widget.BRIGHT_STYLE_HIGH_LIGHT = 1; - -//widget type -ccui.Widget.TYPE_WIDGET = 0; -ccui.Widget.TYPE_CONTAINER = 1; - -//texture resource type -ccui.Widget.LOCAL_TEXTURE = 0; -ccui.Widget.PLIST_TEXTURE = 1; - -//touch event type -ccui.Widget.TOUCH_BEGAN = 0; -ccui.Widget.TOUCH_MOVED = 1; -ccui.Widget.TOUCH_ENDED = 2; -ccui.Widget.TOUCH_CANCELED = 3; - -//size type -ccui.Widget.SIZE_ABSOLUTE = 0; -ccui.Widget.SIZE_PERCENT = 1; - -//position type -ccui.Widget.POSITION_ABSOLUTE = 0; -ccui.Widget.POSITION_PERCENT = 1; - -//focus direction -ccui.Widget.LEFT = 0; -ccui.Widget.RIGHT = 1; -ccui.Widget.UP = 2; -ccui.Widget.DOWN = 3; - -/* - * UIListView - */ -//listView event type -ccui.ListView.EVENT_SELECTED_ITEM = 0; -ccui.ListView.ON_SELECTED_ITEM_START = 0; -ccui.ListView.ON_SELECTED_ITEM_END = 1; - -//listView gravity -ccui.ListView.GRAVITY_LEFT = 0; -ccui.ListView.GRAVITY_RIGHT = 1; -ccui.ListView.GRAVITY_CENTER_HORIZONTAL = 2; -ccui.ListView.GRAVITY_TOP = 3; -ccui.ListView.GRAVITY_BOTTOM = 4; -ccui.ListView.GRAVITY_CENTER_VERTICAL = 5; - -//list view magnetic type -ccui.ListView.MAGNETIC_NONE = 0; -ccui.ListView.MAGNETIC_CENTER = 1; -ccui.ListView.MAGNETIC_BOTH_END = 2; -ccui.ListView.MAGNETIC_LEFT = 3; -ccui.ListView.MAGNETIC_RIGHT = 4; -ccui.ListView.MAGNETIC_TOP = 5; -ccui.ListView.MAGNETIC_BOTTOM = 6; - -/* - * UIScrollView - */ -//ScrollView direction -ccui.ScrollView.DIR_NONE = 0; -ccui.ScrollView.DIR_VERTICAL = 1; -ccui.ScrollView.DIR_HORIZONTAL = 2; -ccui.ScrollView.DIR_BOTH = 3; - -//ScrollView event -ccui.ScrollView.EVENT_SCROLL_TO_TOP = 0; -ccui.ScrollView.EVENT_SCROLL_TO_BOTTOM = 1; -ccui.ScrollView.EVENT_SCROLL_TO_LEFT = 2; -ccui.ScrollView.EVENT_SCROLL_TO_RIGHT = 3; -ccui.ScrollView.EVENT_SCROLLING = 4; -ccui.ScrollView.EVENT_BOUNCE_TOP = 5; -ccui.ScrollView.EVENT_BOUNCE_BOTTOM = 6; -ccui.ScrollView.EVENT_BOUNCE_LEFT = 7; -ccui.ScrollView.EVENT_BOUNCE_RIGHT = 8; -ccui.ScrollView.EVENT_CONTAINER_MOVED = 9; -ccui.ScrollView.EVENT_AUTOSCROLL_ENDED = 10; - -ccui.ScrollView.MOVEDIR_TOP = 0; -ccui.ScrollView.MOVEDIR_BOTTOM = 1; -ccui.ScrollView.MOVEDIR_LEFT = 2; -ccui.ScrollView.MOVEDIR_RIGHT = 3; - -/* - * UIPageView - */ -//PageView event -ccui.PageView.EVENT_TURNING = 0; - -//PageView touch direction -ccui.PageView.TOUCH_DIR_LEFT = 0; -ccui.PageView.TOUCH_DIR_RIGHT = 1; -ccui.PageView.TOUCH_DIR_UP = 2; -ccui.PageView.TOUCH_DIR_DOWN = 3; - -//PageView direction -ccui.PageView.DIRECTION_LEFT = 0; -ccui.PageView.DIRECTION_RIGHT = 1; - -/* - * UIButton - */ -ccui.NORMAL_RENDERER_ZORDER = -2; -ccui.PRESSED_RENDERER_ZORDER = -2; -ccui.DISABLED_RENDERER_ZORDER = -2; -ccui.TITLE_RENDERER_ZORDER = -1; - -ccui.Scale9Sprite.POSITIONS_CENTRE = 0; //CCScale9Sprite.js -ccui.Scale9Sprite.POSITIONS_TOP = 1; -ccui.Scale9Sprite.POSITIONS_LEFT = 2; -ccui.Scale9Sprite.POSITIONS_RIGHT = 3; -ccui.Scale9Sprite.POSITIONS_BOTTOM = 4; -ccui.Scale9Sprite.POSITIONS_TOPRIGHT = 5; -ccui.Scale9Sprite.POSITIONS_TOPLEFT = 6; -ccui.Scale9Sprite.POSITIONS_BOTTOMRIGHT = 7; -ccui.Scale9Sprite.POSITIONS_BOTTOMLEFT = 8; - -/* - * UICheckBox - */ -//CheckBoxEvent type -ccui.CheckBox.EVENT_SELECTED = 0; -ccui.CheckBox.EVENT_UNSELECTED = 1; - -//Render zorder -ccui.CheckBox.BOX_RENDERER_ZORDER = -1; -ccui.CheckBox.BOX_SELECTED_RENDERER_ZORDER = -1; -ccui.CheckBox.BOX_DISABLED_RENDERER_ZORDER = -1; -ccui.CheckBox.FRONT_CROSS_RENDERER_ZORDER = -1; -ccui.CheckBox.FRONT_CROSS_DISABLED_RENDERER_ZORDER = -1; - -/* - * UIImageView - */ -ccui.ImageView.RENDERER_ZORDER = -1; - -/* - * UILoadingBar - */ -//loadingBar Type -ccui.LoadingBar.TYPE_LEFT = 0; -ccui.LoadingBar.TYPE_RIGHT = 1; - -ccui.LoadingBar.RENDERER_ZORDER = -1; - -/* - * UIRichElement - */ -//Rich element type -//ccui.RichElement.TYPE_TEXT = 0; -//ccui.RichElement.TYPE_IMAGE = 1; -//ccui.RichElement.TYPE_CUSTOM = 2; - -/* - * UISlider - */ -//Slider event type -ccui.Slider.EVENT_PERCENT_CHANGED = 0; -ccui.Slider.EVENT_SLIDEBALL_DOWN = 1; -ccui.Slider.EVENT_SLIDEBALL_UP = 2; -ccui.Slider.EVENT_SLIDEBALL_CANCEL = 3; - -//Render zorder -ccui.Slider.BASEBAR_RENDERER_ZORDER = -3; -ccui.Slider.PROGRESSBAR_RENDERER_ZORDER = -2; -ccui.Slider.BALL_RENDERER_ZORDER = -1; - -/* - * UIText - */ -ccui.Text.RENDERER_ZORDER = -1; - -/* - * UITextAtlas - */ -ccui.TextAtlas.RENDERER_ZORDER = -1; - -/* - * UITextBMFont - */ -ccui.TextBMFont.RENDERER_ZORDER = -1; - -/* - * UITextField - */ -//TextField event -ccui.TextField.EVENT_ATTACH_WITH_IME = 0; -ccui.TextField.EVENT_DETACH_WITH_IME = 1; -ccui.TextField.EVENT_INSERT_TEXT = 2; -ccui.TextField.EVENT_DELETE_BACKWARD = 3; - -ccui.TextField.RENDERER_ZORDER = -1; - -/* - * UIRadioButton - */ -ccui.RadioButton.EVENT_SELECTED = 0; -ccui.RadioButton.EVENT_UNSELECTED = 1; -ccui.RadioButtonGroup.EVENT_SELECT_CHANGED = 0; - -/* - * UIMargin - */ -ccui.Margin = cc.Class.extend({ - left: 0, - top: 0, - right: 0, - bottom: 0, - ctor: function () { - if (arguments.length == 1) { - var uiMargin = arguments[0]; - this.left = uiMargin.left; - this.top = uiMargin.top; - this.right = uiMargin.right; - this.bottom = uiMargin.bottom; - } - if (arguments.length == 4) { - this.left = arguments[0]; - this.top = arguments[1]; - this.right = arguments[2]; - this.bottom = arguments[3]; - } - }, - setMargin: function (l, t, r, b) { - this.left = l; - this.top = t; - this.right = r; - this.bottom = b; - }, - equals: function (target) { - return (this.left == target.left && this.top == target.top && this.right == target.right && this.bottom == target.bottom); - } -}); - -ccui.MarginZero = function(){ - return new ccui.Margin(0,0,0,0); -}; - -// updateWithBatchNode deprecated in JSB -ccui.Scale9Sprite.prototype.updateWithBatchNode = function (batchNode, originalRect, rotated, capInsets) { - var sprite = new cc.Sprite(batchNode.getTexture()); - this.updateWithSprite(sprite, originalRect, rotated, cc.p(0, 0), cc.size(originalRect.width, originalRect.height), capInsets); -}; - - -if (ccui.WebView) -{ - /** - * The WebView support list of events - * @type {{LOADING: string, LOADED: string, ERROR: string}} - */ - ccui.WebView.EventType = { - LOADING: "loading", - LOADED: "load", - ERROR: "error", - JS_EVALUATED: "js" - }; - - ccui.WebView.prototype._loadURL = ccui.WebView.prototype.loadURL; - ccui.WebView.prototype.loadURL = function (url) { - if (url.indexOf("http://") >= 0 || url.indexOf("https://") >= 0) - { - this._loadURL(url); - } - else - { - this.loadFile(url); - } - }; - - ccui.WebView.prototype.setEventListener = function(event, callback){ - switch(event) - { - case ccui.WebView.EventType.LOADING: - this.setOnShouldStartLoading(callback); - break; - case ccui.WebView.EventType.LOADED: - this.setOnDidFinishLoading(callback); - break; - case ccui.WebView.EventType.ERROR: - this.setOnDidFailLoading(callback); - break; - case ccui.WebView.EventType.JS_EVALUATED: - //this.setOnJSCallback(callback); - cc.log("unsupport web event:" + event); - break; - default: - cc.log("unsupport web event:" + event); - break; - } - }; -} -if (ccui.VideoPlayer) -{ - /** - * The VideoPlayer support list of events - * @type {{PLAYING: string, PAUSED: string, STOPPED: string, COMPLETED: string}} - */ - ccui.VideoPlayer.EventType = { - PLAYING: "play", - PAUSED: "pause", - STOPPED: "stop", - COMPLETED: "complete" - }; - - ccui.VideoPlayer.prototype._setURL = ccui.VideoPlayer.prototype.setURL; - ccui.VideoPlayer.prototype.setURL = function (url) { - if (url.indexOf("http://") >= 0) - { - this._setURL(url); - } - else - { - this.setFileName(url); - } - }; - - ccui.VideoPlayer.prototype.setEventListener = function(event, callback){ - if (!this.videoPlayerCallback) - { - this.videoPlayerCallback = function(sender, eventType){ - cc.log("videoEventCallback eventType:" + eventType); - switch (eventType) { - case 0: - this["VideoPlayer_"+ccui.VideoPlayer.EventType.PLAYING] && this["VideoPlayer_"+ccui.VideoPlayer.EventType.PLAYING](sender); - break; - case 1: - this["VideoPlayer_"+ccui.VideoPlayer.EventType.PAUSED] && this["VideoPlayer_"+ccui.VideoPlayer.EventType.PAUSED](sender); - break; - case 2: - this["VideoPlayer_"+ccui.VideoPlayer.EventType.STOPPED] && this["VideoPlayer_"+ccui.VideoPlayer.EventType.STOPPED](sender); - break; - case 3: - this["VideoPlayer_"+ccui.VideoPlayer.EventType.COMPLETED] && this["VideoPlayer_"+ccui.VideoPlayer.EventType.COMPLETED](sender); - break; - default: - break; - } - }; - this.addEventListener(this.videoPlayerCallback); - } - this["VideoPlayer_"+event] = callback; - }; -} -/* - * UIWidget temporary solution to addChild - * addNode and addChild function should be merged in ccui.Widget - */ -ccui.Widget.prototype.addNode = ccui.Widget.prototype.addChild; -ccui.Widget.prototype.getSize = ccui.Widget.prototype.getContentSize; -ccui.Widget.prototype.setSize = ccui.Widget.prototype.setContentSize; - -/* - * UIWidget's event listeners wrapper - */ -ccui.Widget.prototype._addTouchEventListener = ccui.Widget.prototype.addTouchEventListener; -ccui.Widget.prototype.addTouchEventListener = function (selector, target) { - if (target === undefined) - this._addTouchEventListener(selector); - else - this._addTouchEventListener(selector.bind(target)); -}; - -function _ui_addEventListener(selector, target) { - if (target === undefined) - this._addEventListener(selector); - else - this._addEventListener(selector.bind(target)); -} -function _ui_applyEventListener(ctor) { - var proto = ctor.prototype; - proto._addEventListener = proto.addEventListener; - proto.addEventListener = _ui_addEventListener; -} - -_ui_applyEventListener(ccui.CheckBox); -_ui_applyEventListener(ccui.Slider); -_ui_applyEventListener(ccui.TextField); -_ui_applyEventListener(ccui.PageView); -_ui_applyEventListener(ccui.ScrollView); -_ui_applyEventListener(ccui.ListView); diff --git a/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk.js b/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk.js deleted file mode 100644 index 472eb284d2e5..000000000000 --- a/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk.js +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 2013-2016 Chukong Technologies Inc. - * Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -// -// Chipmunk defines -// - -var cp = cp || {}; - -cp.Vect = function(x, y){ - this.x = x; - this.y = y; -} -cp.Vect.prototype.add = function(v){ - this.x += v.x; - this.y += v.y; - return this; -} -cp.Vect.prototype.sub = function(v){ - this.x -= v.x; - this.y -= v.y; - return this; -} -cp.Vect.prototype.neg = function(){ - this.x = -this.x; - this.y = -this.y; - return this; -} -cp.Vect.prototype.mult = function(s){ - this.x *= s; - this.y *= s; - return this; -} -cp.Vect.prototype.rotate = function(v){ - this.x = this.x * v.x - this.y * v.y; - this.y = this.x * v.y + this.y * v.x; - return this; -} -cp.Vect.prototype.project = function(v){ - this.mult(cp.vdot(this, v) / cp.vlengthsq(v)); - return this; -} - -cp.v = function(x, y){ - return new cp.Vect(x, y); -} -cp.vzero = cp.v(0,0); - -// Vector: Compatibility with Chipmunk-JS -cp.v.add = cp.vadd; -cp.v.clamp = cp.vclamp; -cp.v.cross = cp.vcross; -cp.v.dist = cp.vdist; -cp.v.distsq = cp.vdistsq; -cp.v.dot = cp.vdot; -cp.v.eql = cp.veql; -cp.v.forangle = cp.vforangle; -cp.v.len = cp.vlength; -cp.v.lengthsq = cp.vlengthsq; -cp.v.lerp = cp.vlerp; -cp.v.lerpconst = cp.vlerpconst; -cp.v.mult = cp.vmult; -cp.v.near = cp.vnear; -cp.v.neg = cp.vneg; -cp.v.normalize = cp.vnormalize; -cp.v.normalize_safe = cp.vnormalize_safe; -cp.v.perp = cp.vperp; -cp.v.project = cp.vproject; -cp.v.rotate = cp.vrotate; -cp.v.pvrperp = cp.vrperp; -cp.v.slerp = cp.vslerp; -cp.v.slerpconst = cp.vslerpconst; -cp.v.sub = cp.vsub; -cp.v.toangle = cp.vtoangle; -cp.v.unrotate = cp.vunrotate; -cp.v.str = function(v){ - return "(" + v.x.toFixed(3) + ", " + v.y.toFixed(3) + ")"; -} - -// XXX: renaming functions should be supported in JSB -cp.clamp01 = cp.fclamp01; - - -/// Initialize an offset box shaped polygon shape. -cp.BoxShape2 = function(body, box) -{ - var verts = [ - box.l, box.b, - box.l, box.t, - box.r, box.t, - box.r, box.b - ]; - - return new cp.PolyShape(body, verts, cp.vzero); -}; - -/// Initialize a box shaped polygon shape. -cp.BoxShape = function(body, width, height) -{ - var hw = width/2; - var hh = height/2; - - return cp.BoxShape2(body, new cp.BB(-hw, -hh, hw, hh)); -}; - - -/// Initialize an static body -cp.StaticBody = function() -{ - return new cp.Body(Infinity, Infinity); -}; - - -// "Bounding Box" compatibility with Chipmunk-JS -cp.BB = function(l, b, r, t) -{ - this.l = l; - this.b = b; - this.r = r; - this.t = t; -}; - -// helper function to create a BB -cp.bb = function(l, b, r, t) { - return new cp.BB(l, b, r, t); -}; - -// -// BEGIN OF CHIPMUNK V6.2 COMPATIBILIY -// Define them before the properties -// - -// Body -cp.Body.prototype.getVelAtWorldPoint = function(point) { - return this.getVelocityAtWorldPoint(point); -} -cp.Body.prototype.getVelAtLocalPoint = function(point) { - return this.getVelocityAtLocalPoint(point); -} -cp.Body.prototype.getVel = function() { - return this.getVelocity(); -} -cp.Body.prototype.setVel = function(velocity) { - this.setVelocity(velocity); -} -cp.Body.prototype.getPos = function() { - return this.getPosition(); -} -cp.Body.prototype.setPos = function(pos) { - this.setPosition(pos); -} -cp.Body.prototype.getRot = function() { - return this.getRotation(); -} -cp.Body.prototype.getAngVel = function() { - return this.getAngularVelocity(); -} -cp.Body.prototype.setAngVel = function(angularVelocity) { - this.setAngularVelocity(angularVelocity); -} -cp.Body.prototype.local2World = function(point) { - return this.localToWorld(point); -} -cp.Body.prototype.world2Local = function(point) { - return this.worldToLocal(point); -} -cp.Body.prototype.applyImpulse = function(j,r) { - this.applyImpulseAtWorldPoint(j,r); -} -cp.Body.prototype.applyForce = function(force, point) { - this.applyForceAtWorldPoint(force, point); -} - - -// Shapes -cp.Shape.prototype.setLayers = function(layer) { - var filter = this.getFilter(); - filter.mask = layer; - this.setFilter(filter); -} -cp.Shape.prototype.getLayers = function() { - var filter = this.getFilter(); - return filter.mask; -} -cp.Shape.prototype.setGroup = function(group) { - var filter = this.getFilter(); - filter.group = group; - this.setFilter(filter); -} - -cp.Shape.prototype.getGroup = function() { - var filter = this.getFilter(); - return filter.group; -} - -cp.Shape.prototype.nearestPointQuery = function(p) { - return this.pointQuery(p); -} -cp.PolyShape.prototype.getNumVerts = function() { - return this.getCount(); -} - -// Space -cp.Space.prototype.addStaticShape = function(shape) { - this.addShape(shape); -} - -// Joints -cp.PinJoint.prototype.getAnchr1 = function() { - return this.getAnchorA(); -}; - -cp.PinJoint.prototype.getAnchr2 = function() { - return this.getAnchorB(); -}; - -cp.SlideJoint.prototype.getAnchr1 = function() { - return this.getAnchorA(); -}; - -cp.SlideJoint.prototype.getAnchr2 = function() { - return this.getAnchorB(); -}; - -cp.PivotJoint.prototype.getAnchr1 = function() { - return this.getAnchorA(); -}; - -cp.PivotJoint.prototype.getAnchr2 = function() { - return this.getAnchorB(); -}; - -cp.GrooveJoint.prototype.getAnchr2 = function() { - return this.getAnchorB(); -}; - -cp.DampedSpring.prototype.getAnchr1 = function() { - return this.getAnchorA(); -}; - -cp.DampedSpring.prototype.getAnchr2 = function() { - return this.getAnchorB(); -}; - -cp.Space.prototype.addStaticShape = function(shape) { - this.addShape(shape); -}; - - -// END OF CHIPMUNK V6.2 COMPATIBILIY - - -// Chipmunk v7.0 constants -cp.SHAPE_FILTER_ALL = { - group:cp.NO_GROUP, - categories:cp.ALL_CATEGORIES, - mask:cp.ALL_CATEGORIES -}; - -cp.privateAPI = function() { - cc.log("Private API not exposed in Chipmunk v7.0"); -} - -// helpers for the properties. see below, in the properties section -cp.Arbiter.prototype.getBodyA = function() { - return this.getBodies()[0]; -} -cp.Arbiter.prototype.getBodyB = function() { - return this.getBodies()[1]; -} -cp.Body.prototype.getVelocityX = function() { - return this.getVelocity().x; -} -cp.Body.prototype.getVelocityY = function() { - return this.getVelocity().y; -} -cp.Shape.prototype.getBBL = function() { - return this.getBB().l; -} -cp.Shape.prototype.getBBB = function() { - return this.getBB().b; -} -cp.Shape.prototype.getBBR = function() { - return this.getBB().r; -} -cp.Shape.prototype.getBBT = function() { - return this.getBB().t; -} - - -// -// Some properties -// -var _proto = cp.Base.prototype; -// "handle" needed in some cases -cc.defineGetterSetter(_proto, "handle", _proto.getHandle); - -// Properties, for Chipmunk-JS compatibility -// Space properties -Object.defineProperties(cp.Space.prototype, - { - "gravity" : { - get : function(){ - return this.getGravity(); - }, - set : function(newValue){ - this.setGravity(newValue); - }, - enumerable : true, - configurable : true - }, - "iterations" : { - get : function(){ - return this.getIterations(); - }, - set : function(newValue){ - this.setIterations(newValue); - }, - enumerable : true, - configurable : true - }, - "damping" : { - get : function(){ - return this.getDamping(); - }, - set : function(newValue){ - this.setDamping(newValue); - }, - enumerable : true, - configurable : true - }, - "staticBody" : { - get : function(){ - return this.getStaticBody(); - }, - enumerable : true, - configurable : true - }, - "idleSpeedThreshold" : { - get : function(){ - return this.getIdleSpeedThreshold(); - }, - set : function(newValue){ - this.setIdleSpeedThreshold(newValue); - }, - enumerable : true, - configurable : true - }, - "sleepTimeThreshold": { - get : function(){ - return this.getSleepTimeThreshold(); - }, - set : function(newValue){ - this.setSleepTimeThreshold(newValue); - }, - enumerable : true, - configurable : true - }, - "collisionSlop": { - get : function(){ - return this.getCollisionSlop(); - }, - set : function(newValue){ - this.setCollisionSlop(newValue); - }, - enumerable : true, - configurable : true - }, - "collisionBias": { - get : function(){ - return this.getCollisionBias(); - }, - set : function(newValue){ - this.setCollisionBias(newValue); - }, - enumerable : true, - configurable : true - }, - "collisionPersistence": { - get : function(){ - return this.getCollisionPersistence(); - }, - set : function(newValue){ - this.setCollisionPersistence(newValue); - }, - enumerable : true, - configurable : true - }, - "enableContactGraph": { - get : function(){ - return this.getEnableContactGraph(); - }, - set : function(newValue){ - this.setEnableContactGraph(newValue); - }, - enumerable : true, - configurable : true - } - }); - -// Body properties -_proto = cp.Body.prototype; -cc.defineGetterSetter(_proto, "a", _proto.getAngle, _proto.setAngle); -cc.defineGetterSetter(_proto, "w", _proto.getAngVel, _proto.setAngVel); -cc.defineGetterSetter(_proto, "p", _proto.getPos, _proto.setPos); -cc.defineGetterSetter(_proto, "v", _proto.getVel, _proto.setVel); -cc.defineGetterSetter(_proto, "f", _proto.getForce, _proto.setForce); -cc.defineGetterSetter(_proto, "t", _proto.getTorque, _proto.setTorque); -cc.defineGetterSetter(_proto, "v_limit", _proto.getVelLimit, _proto.setVelLimit); -cc.defineGetterSetter(_proto, "w_limit", _proto.getAngVelLimit, _proto.setAngVelLimit); -cc.defineGetterSetter(_proto, "space", _proto.getSpace); -cc.defineGetterSetter(_proto, "rot", _proto.getRot); -cc.defineGetterSetter(_proto, "m", _proto.getMass, _proto.setMass); -cc.defineGetterSetter(_proto, "i", _proto.getMoment, _proto.setMoment); -cc.defineGetterSetter(_proto, "vx", _proto.getVelocityX); -cc.defineGetterSetter(_proto, "vy", _proto.getVelocityY); -cc.defineGetterSetter(_proto, "m_inv", cp.privateAPI); -cc.defineGetterSetter(_proto, "i_inv", cp.privateAPI); - - -// Shape properties -_proto = cp.Shape.prototype; -cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody); -cc.defineGetterSetter(_proto, "group", _proto.getGroup, _proto.setGroup); -cc.defineGetterSetter(_proto, "collision_type", _proto.getCollisionType, _proto.setCollisionType); -cc.defineGetterSetter(_proto, "layers", _proto.getLayers, _proto.setLayers); -cc.defineGetterSetter(_proto, "sensor", _proto.getSensor, _proto.setSensor); -cc.defineGetterSetter(_proto, "space", _proto.getSpace); -cc.defineGetterSetter(_proto, "surface_v", _proto.getSurfaceVelocity, _proto.setSurfaceVelocity); -cc.defineGetterSetter(_proto, "e", _proto.getElasticity, _proto.setElasticity); -cc.defineGetterSetter(_proto, "u", _proto.getFriction, _proto.setFriction); -cc.defineGetterSetter(_proto, "bb_l", _proto.getBBL, cp.privateAPI); -cc.defineGetterSetter(_proto, "bb_b", _proto.getBBB, cp.privateAPI); -cc.defineGetterSetter(_proto, "bb_r", _proto.getBBR, cp.privateAPI); -cc.defineGetterSetter(_proto, "bb_t", _proto.getBBT, cp.privateAPI); - -_proto.cacheData = _proto.update; - -//CircleShape properties -_proto = cp.CircleShape.prototype; -_proto.type = "circle"; -cc.defineGetterSetter(_proto, "r", _proto.getRadius); -cc.defineGetterSetter(_proto, "c", _proto.getOffset); - -//SegmentShape properties -_proto = cp.SegmentShape.prototype; -_proto.type = "segment"; -cc.defineGetterSetter(_proto, "a", _proto.getA); -cc.defineGetterSetter(_proto, "b", _proto.getB); -cc.defineGetterSetter(_proto, "n", _proto.getNormal); -cc.defineGetterSetter(_proto, "r", _proto.getRadius); -cc.defineGetterSetter(_proto, "a_tangent", cp.privateAPI); -cc.defineGetterSetter(_proto, "b_tangent", cp.privateAPI); - -//PolyShape properties -_proto = cp.PolyShape.prototype; -_proto.type = "poly"; -cc.defineGetterSetter(_proto, "verts", _proto.getVerts); - -// Constraint properties -_proto = cp.Constraint.prototype; -cc.defineGetterSetter(_proto, "a", _proto.getA); -cc.defineGetterSetter(_proto, "b", _proto.getB); -cc.defineGetterSetter(_proto, "space", _proto.getSpace); -cc.defineGetterSetter(_proto, "maxForce", _proto.getMaxForce, _proto.setMaxForce); -cc.defineGetterSetter(_proto, "errorBias", _proto.getErrorBias, _proto.setErrorBias); -cc.defineGetterSetter(_proto, "maxBias", _proto.getMaxBias, _proto.setMaxBias); - -// PinJoint properties -_proto = cp.PinJoint.prototype; -cc.defineGetterSetter(_proto, "anchr1", _proto.getAnchr1, _proto.setAnchr1); -cc.defineGetterSetter(_proto, "anchr2", _proto.getAnchr2, _proto.setAnchr2); -cc.defineGetterSetter(_proto, "dist", _proto.getDist, _proto.setDist); - -//SlideJoint properties -_proto = cp.SlideJoint.prototype; -cc.defineGetterSetter(_proto, "anchr1", _proto.getAnchr1, _proto.setAnchr1); -cc.defineGetterSetter(_proto, "anchr2", _proto.getAnchr2, _proto.setAnchr2); -cc.defineGetterSetter(_proto, "min", _proto.getMin, _proto.setMin); -cc.defineGetterSetter(_proto, "max", _proto.getMax, _proto.setMax); - -//PivotJoint properties -_proto = cp.PivotJoint.prototype; -cc.defineGetterSetter(_proto, "anchr1", _proto.getAnchr1, _proto.setAnchr1); -cc.defineGetterSetter(_proto, "anchr2", _proto.getAnchr2, _proto.setAnchr2); - -//GrooveJoint properties -_proto = cp.GrooveJoint.prototype; -cc.defineGetterSetter(_proto, "anchr2", _proto.getAnchr2, _proto.setAnchr2); -cc.defineGetterSetter(_proto, "grv_a", _proto.getGrooveA, _proto.setGrooveA); -cc.defineGetterSetter(_proto, "grv_b", _proto.getGrooveB, _proto.setGrooveB); - -//DampedSpring properties -_proto = cp.DampedSpring.prototype; -cc.defineGetterSetter(_proto, "anchr1", _proto.getAnchr1, _proto.setAnchr1); -cc.defineGetterSetter(_proto, "anchr2", _proto.getAnchr2, _proto.setAnchr2); -cc.defineGetterSetter(_proto, "damping", _proto.getDamping, _proto.setDamping); -cc.defineGetterSetter(_proto, "restLength", _proto.getRestLength, _proto.setRestLength); -cc.defineGetterSetter(_proto, "stiffness", _proto.getStiffness, _proto.setStiffness); - -//DampedRotarySpring properties -_proto = cp.DampedRotarySpring.prototype; -cc.defineGetterSetter(_proto, "restAngle", _proto.getRestAngle, _proto.setRestAngle); -cc.defineGetterSetter(_proto, "stiffness", _proto.getStiffness, _proto.setStiffness); -cc.defineGetterSetter(_proto, "damping", _proto.getDamping, _proto.setDamping); - -//RotaryLimitJoint properties -_proto = cp.RotaryLimitJoint.prototype; -cc.defineGetterSetter(_proto, "min", _proto.getMin, _proto.setMin); -cc.defineGetterSetter(_proto, "max", _proto.getMax, _proto.setMax); - -//RatchetJoint properties -_proto = cp.RatchetJoint.prototype; -cc.defineGetterSetter(_proto, "angle", _proto.getAngle, _proto.setAngle); -cc.defineGetterSetter(_proto, "phase", _proto.getPhase, _proto.setPhase); -cc.defineGetterSetter(_proto, "ratchet", _proto.getRatchet, _proto.setRatchet); - -//GearJoint properties -_proto = cp.GearJoint.prototype; -cc.defineGetterSetter(_proto, "phase", _proto.getPhase, _proto.setPhase); -cc.defineGetterSetter(_proto, "ratio", _proto.getRatio, _proto.setRatio); - -//SimpleMotor properties -_proto = cp.SimpleMotor.prototype; -cc.defineGetterSetter(_proto, "rate", _proto.getRate, _proto.setRate); - -//Arbiter properties -_proto = cp.Arbiter.prototype; -cc.defineGetterSetter(_proto, "e", _proto.getElasticity, _proto.setElasticity); -cc.defineGetterSetter(_proto, "u", _proto.getFriction, _proto.setFriction); -cc.defineGetterSetter(_proto, "surface_vr", _proto.getSurfaceVelocity, _proto.setSurfaceVelocity); -// not auto-generated -cc.defineGetterSetter(_proto, "a", _proto.getPointA); -cc.defineGetterSetter(_proto, "b", _proto.getPointA); -cc.defineGetterSetter(_proto, "body_a", _proto.getBodyA); -cc.defineGetterSetter(_proto, "body_b", _proto.getBodyB); - -_proto = null; - diff --git a/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk_constants.js b/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk_constants.js deleted file mode 100644 index bf39043ef340..000000000000 --- a/cocos/scripting/js-bindings/script/chipmunk/jsb_chipmunk_constants.js +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* -* AUTOGENERATED FILE. DO NOT EDIT IT -* Generated by "generate_jsb.py -c chipmunk_jsb.ini" on 2016-02-19 -* Script version: v0.10 -*/ - -var cp = cp || {}; -cp.ALLOW_PRIVATE_ACCESS = 0x1; -cp.ALL_CATEGORIES = 0xffffffff; -cp.ARBITER_STATE_CACHED = 0x3; -cp.ARBITER_STATE_FIRST_COLLISION = 0x0; -cp.ARBITER_STATE_IGNORE = 0x2; -cp.ARBITER_STATE_INVALIDATED = 0x4; -cp.ARBITER_STATE_NORMAL = 0x1; -cp.BODY_TYPE_DYNAMIC = 0x0; -cp.BODY_TYPE_KINEMATIC = 0x1; -cp.BODY_TYPE_STATIC = 0x2; -cp.BUFFER_BYTES = 0x8000; -cp.CIRCLE_SHAPE = 0x0; -cp.HASH_COEF = 0xc75f71e1; -cp.MAX_CONTACTS_PER_ARBITER = 0x2; -cp.NO_GROUP = 0x0; -cp.NUM_SHAPES = 0x3; -cp.POLY_SHAPE = 0x2; -cp.POLY_SHAPE_INLINE_ALLOC = 0x6; -cp.SEGMENT_SHAPE = 0x1; -cp.SPACE_DEBUG_DRAW_COLLISION_POINTS = 0x4; -cp.SPACE_DEBUG_DRAW_CONSTRAINTS = 0x2; -cp.SPACE_DEBUG_DRAW_SHAPES = 0x1; -cp.USE_DOUBLES = 0x0; -cp.VERSION_MAJOR = 0x7; -cp.VERSION_MINOR = 0x0; -cp.VERSION_RELEASE = 0x1; -cp.WILDCARD_COLLISION_TYPE = 0xffffffff; diff --git a/cocos/scripting/js-bindings/script/debugger/DevToolsUtils.js b/cocos/scripting/js-bindings/script/debugger/DevToolsUtils.js deleted file mode 100644 index a2b86fd01013..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/DevToolsUtils.js +++ /dev/null @@ -1,833 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -/* General utilities used throughout devtools. */ - -// var { Ci, Cu, Cc, components } = require("chrome"); -// var Services = require("Services"); -// var promise = require("promise"); - -// loader.lazyRequireGetter(this, "FileUtils", -// "resource://gre/modules/FileUtils.jsm", true); - -function DevToolsUtils() { - -} - -DevToolsUtils.utf16to8 = function utf16to8(str) { - var out, i, len, c; - - out = ""; - len = str.length; - for(i = 0; i < len; i++) - { - c = str.charCodeAt(i); - if ((c >= 0x0001) && (c <= 0x007F)) - { - out += str.charAt(i); - } - else if (c > 0x07FF) - { - out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F)); - out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F)); - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); - } - else - { - out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F)); - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); - } - } - return out; -} - -DevToolsUtils.utf8to16 = function utf8to16(str) { - var out, i, len, c; - var char2, char3; - - out = ""; - len = str.length; - i = 0; - while(i < len) { c = str.charCodeAt(i++); switch(c >> 4) - { - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: - // 0xxxxxxx - out += str.charAt(i-1); - break; - case 12: case 13: - // 110x xxxx 10xx xxxx - char2 = str.charCodeAt(i++); - out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); - break; - case 14: - // 1110 xxxx 10xx xxxx 10xx xxxx - char2 = str.charCodeAt(i++); - char3 = str.charCodeAt(i++); - out += String.fromCharCode(((c & 0x0F) << 12) | - ((char2 & 0x3F) << 6) | - ((char3 & 0x3F) << 0)); - break; - } - } - - return out; - } - -/** - * Turn the error |aError| into a string, without fail. - */ -DevToolsUtils.safeErrorString = function safeErrorString(aError) { - try { - let errorString = aError.toString(); - if (typeof errorString == "string") { - // Attempt to attach a stack to |errorString|. If it throws an error, or - // isn't a string, don't use it. - try { - if (aError.stack) { - let stack = aError.stack.toString(); - if (typeof stack == "string") { - errorString += "\nStack: " + stack; - } - } - } catch (ee) { } - - // Append additional line and column number information to the output, - // since it might not be part of the stringified error. - if (typeof aError.lineNumber == "number" && typeof aError.columnNumber == "number") { - errorString += "Line: " + aError.lineNumber + ", column: " + aError.columnNumber; - } - - return errorString; - } - } catch (ee) { } - - // We failed to find a good error description, so do the next best thing. - return Object.prototype.toString.call(aError); -} - -/** - * Report that |aWho| threw an exception, |aException|. - */ -DevToolsUtils.reportException = function reportException(aWho, aException) { - let msg = aWho + " threw an exception: " + DevToolsUtils.safeErrorString(aException); - - log(msg + "\n"); - - // if (Cu && Cu.reportError) { - - // * Note that the xpcshell test harness registers an observer for - // * console messages, so when we're running tests, this will cause - // * the test to quit. - - // Cu.reportError(msg); - // } -} - -/** - * Given a handler function that may throw, return an infallible handler - * function that calls the fallible handler, and logs any exceptions it - * throws. - * - * @param aHandler function - * A handler function, which may throw. - * @param aName string - * A name for aHandler, for use in error messages. If omitted, we use - * aHandler.name. - * - * (SpiderMonkey does generate good names for anonymous functions, but we - * don't have a way to get at them from JavaScript at the moment.) - */ -DevToolsUtils.makeInfallible = function makeInfallible(aHandler, aName) { - if (!aName) - aName = aHandler.name; - - return function (/* arguments */) { - try { - return aHandler.apply(this, arguments); - } catch (ex) { - let who = "Handler function"; - if (aName) { - who += " " + aName; - } - return DevToolsUtils.reportException(who, ex); - } - } -} -/** - * Interleaves two arrays element by element, returning the combined array, like - * a zip. In the case of arrays with different sizes, undefined values will be - * interleaved at the end along with the extra values of the larger array. - * - * @param Array a - * @param Array b - * @returns Array - * The combined array, in the form [a1, b1, a2, b2, ...] - */ -DevToolsUtils.zip = function zip(a, b) { - if (!b) { - return a; - } - if (!a) { - return b; - } - const pairs = []; - for (let i = 0, aLength = a.length, bLength = b.length; - i < aLength || i < bLength; - i++) { - pairs.push([a[i], b[i]]); - } - return pairs; -}; - - -/** - * Converts an object into an array with 2-element arrays as key/value - * pairs of the object. `{ foo: 1, bar: 2}` would become - * `[[foo, 1], [bar 2]]` (order not guaranteed); - * - * @param object obj - * @returns array - */ -DevToolsUtils.entries = function entries(obj) { - return Object.keys(obj).map(k => [k, obj[k]]); -} - -/** - * Composes the given functions into a single function, which will - * apply the results of each function right-to-left, starting with - * applying the given arguments to the right-most function. - * `compose(foo, bar, baz)` === `args => foo(bar(baz(args)` - * - * @param ...function funcs - * @returns function - */ -DevToolsUtils.compose = function compose(...funcs) { - return (...args) => { - const initialValue = funcs[funcs.length - 1].apply(null, args); - const leftFuncs = funcs.slice(0, -1); - return leftFuncs.reduceRight((composed, f) => f(composed), - initialValue); - }; -} - - -/** - * Waits for the next tick in the event loop to execute a callback. - */ -DevToolsUtils.executeSoon = function executeSoon(aFn) { - if (isWorker) { - setImmediate(aFn); - } else { - Services.tm.mainThread.dispatch({ - run: DevToolsUtils.makeInfallible(aFn) - }, Ci.nsIThread.DISPATCH_NORMAL); - } -}; - -/** - * Waits for the next tick in the event loop. - * - * @return Promise - * A promise that is resolved after the next tick in the event loop. - */ -DevToolsUtils.waitForTick = function waitForTick() { - let deferred = promise.defer(); - DevToolsUtils.executeSoon(deferred.resolve); - return deferred.promise; -}; - -/** - * Waits for the specified amount of time to pass. - * - * @param number aDelay - * The amount of time to wait, in milliseconds. - * @return Promise - * A promise that is resolved after the specified amount of time passes. - */ -DevToolsUtils.waitForTime = function waitForTime(aDelay) { - let deferred = promise.defer(); - require("Timer").setTimeout(deferred.resolve, aDelay); - return deferred.promise; -}; - -/** - * Like Array.prototype.forEach, but doesn't cause jankiness when iterating over - * very large arrays by yielding to the browser and continuing execution on the - * next tick. - * - * @param Array aArray - * The array being iterated over. - * @param Function aFn - * The function called on each item in the array. If a promise is - * returned by this function, iterating over the array will be paused - * until the respective promise is resolved. - * @returns Promise - * A promise that is resolved once the whole array has been iterated - * over, and all promises returned by the aFn callback are resolved. - */ -DevToolsUtils.yieldingEach = function yieldingEach(aArray, aFn) { - const deferred = promise.defer(); - - let i = 0; - let len = aArray.length; - let outstanding = [deferred.promise]; - - (function loop() { - const start = Date.now(); - - while (i < len) { - // Don't block the main thread for longer than 16 ms at a time. To - // maintain 60fps, you have to render every frame in at least 16ms; we - // aren't including time spent in non-JS here, but this is Good - // Enough(tm). - if (Date.now() - start > 16) { - DevToolsUtils.executeSoon(loop); - return; - } - - try { - outstanding.push(aFn(aArray[i], i++)); - } catch (e) { - deferred.reject(e); - return; - } - } - - deferred.resolve(); - }()); - - return promise.all(outstanding); -} - -/** - * Like XPCOMUtils.defineLazyGetter, but with a |this| sensitive getter that - * allows the lazy getter to be defined on a prototype and work correctly with - * instances. - * - * @param Object aObject - * The prototype object to define the lazy getter on. - * @param String aKey - * The key to define the lazy getter on. - * @param Function aCallback - * The callback that will be called to determine the value. Will be - * called with the |this| value of the current instance. - */ -DevToolsUtils.defineLazyPrototypeGetter = -function defineLazyPrototypeGetter(aObject, aKey, aCallback) { - Object.defineProperty(aObject, aKey, { - configurable: true, - get: function() { - const value = aCallback.call(this); - - Object.defineProperty(this, aKey, { - configurable: true, - writable: true, - value: value - }); - - return value; - } - }); -} - -/** - * Safely get the property value from a Debugger.Object for a given key. Walks - * the prototype chain until the property is found. - * - * @param Debugger.Object aObject - * The Debugger.Object to get the value from. - * @param String aKey - * The key to look for. - * @return Any - */ -DevToolsUtils.getProperty = function getProperty(aObj, aKey) { - let root = aObj; - try { - do { - const desc = aObj.getOwnPropertyDescriptor(aKey); - if (desc) { - if ("value" in desc) { - return desc.value; - } - // Call the getter if it's safe. - return DevToolsUtils.hasSafeGetter(desc) ? desc.get.call(root).return : undefined; - } - aObj = aObj.proto; - } while (aObj); - } catch (e) { - // If anything goes wrong report the error and return undefined. - DevToolsUtils.reportException("getProperty", e); - } - return undefined; -}; - -/** - * Determines if a descriptor has a getter which doesn't call into JavaScript. - * - * @param Object aDesc - * The descriptor to check for a safe getter. - * @return Boolean - * Whether a safe getter was found. - */ -DevToolsUtils.hasSafeGetter = function hasSafeGetter(aDesc) { - // Scripted functions that are CCWs will not appear scripted until after - // unwrapping. - // let fn = aDesc.get.unwrap(); - let fn = aDesc.get; - return fn && fn.callable && fn.class == "Function" && fn.script === undefined; -}; - -/** - * Check if it is safe to read properties and execute methods from the given JS - * object. Safety is defined as being protected from unintended code execution - * from content scripts (or cross-compartment code). - * - * See bugs 945920 and 946752 for discussion. - * - * @type Object aObj - * The object to check. - * @return Boolean - * True if it is safe to read properties from aObj, or false otherwise. - */ -DevToolsUtils.isSafeJSObject = function isSafeJSObject(aObj) { - return true; - // If we are running on a worker thread, Cu is not available. In this case, - // we always return false, just to be on the safe side. - // if (isWorker) { - // return false; - // } - - // if (Cu.getGlobalForObject(aObj) == - // Cu.getGlobalForObject(DevToolsUtils.isSafeJSObject)) { - // return true; // aObj is not a cross-compartment wrapper. - // } - - // let principal = Cu.getObjectPrincipal(aObj); - // if (Services.scriptSecurityManager.isSystemPrincipal(principal)) { - // return true; // allow chrome objects - // } - - // return Cu.isXrayWrapper(aObj); -}; - -DevToolsUtils.dumpn = function dumpn(str) { - if (DevToolsUtils.dumpn.wantLogging) { - dump("DBG-SERVER: " + str + "\n"); - } -} - -// We want wantLogging to be writable. The DevToolsUtils object is frozen by the -// loader, so define it on dumpn instead. -DevToolsUtils.dumpn.wantLogging = false; - -/** - * A verbose logger for low-level tracing. - */ -DevToolsUtils.dumpv = function(msg) { - if (DevToolsUtils.dumpv.wantVerbose) { - DevToolsUtils.dumpn(msg); - } -}; - -// We want wantLogging to be writable. The DevToolsUtils object is frozen by the -// loader, so define it on dumpn instead. -DevToolsUtils.dumpv.wantVerbose = false; - -DevToolsUtils.dbg_assert = function dbg_assert(cond, e) { - if (!cond) { - return e; - } -}; - - -/** - * Utility function for updating an object with the properties of - * other objects. - * - * @param aTarget Object - * The object being updated. - * @param aNewAttrs Object - * The rest params are objects to update aTarget with. You - * can pass as many as you like. - */ -DevToolsUtils.update = function update(aTarget, ...aArgs) { - for (let attrs of aArgs) { - for (let key in attrs) { - let desc = Object.getOwnPropertyDescriptor(attrs, key); - - if (desc) { - Object.defineProperty(aTarget, key, desc); - } - } - } - - return aTarget; -} - -/** - * Utility function for getting the values from an object as an array - * - * @param aObject Object - * The object to iterate over - */ -DevToolsUtils.values = function values(aObject) { - return Object.keys(aObject).map(k => aObject[k]); -} - -/** - * Defines a getter on a specified object that will be created upon first use. - * - * @param aObject - * The object to define the lazy getter on. - * @param aName - * The name of the getter to define on aObject. - * @param aLambda - * A function that returns what the getter should return. This will - * only ever be called once. - */ -DevToolsUtils.defineLazyGetter = function defineLazyGetter(aObject, aName, aLambda) { - Object.defineProperty(aObject, aName, { - get: function () { - delete aObject[aName]; - return aObject[aName] = aLambda.apply(aObject); - }, - configurable: true, - enumerable: true - }); -}; - -/** - * Defines a getter on a specified object for a module. The module will not - * be imported until first use. - * - * @param aObject - * The object to define the lazy getter on. - * @param aName - * The name of the getter to define on aObject for the module. - * @param aResource - * The URL used to obtain the module. - * @param aSymbol - * The name of the symbol exported by the module. - * This parameter is optional and defaults to aName. - */ -DevToolsUtils.defineLazyModuleGetter = function defineLazyModuleGetter(aObject, aName, - aResource, - aSymbol) -{ - this.defineLazyGetter(aObject, aName, function XPCU_moduleLambda() { - var temp = {}; - Cu.import(aResource, temp); - return temp[aSymbol || aName]; - }); -}; - -DevToolsUtils.defineLazyGetter(this, "NetUtil", () => { - return Cu.import("resource://gre/modules/NetUtil.jsm", {}).NetUtil; -}); - -DevToolsUtils.defineLazyGetter(this, "OS", () => { - return Cu.import("resource://gre/modules/osfile.jsm", {}).OS; -}); - -DevToolsUtils.defineLazyGetter(this, "TextDecoder", () => { - return Cu.import("resource://gre/modules/osfile.jsm", {}).TextDecoder; -}); - -DevToolsUtils.defineLazyGetter(this, "NetworkHelper", () => { - return require("devtools/toolkit/webconsole/network-helper"); -}); - -/** - * Performs a request to load the desired URL and returns a promise. - * - * @param aURL String - * The URL we will request. - * @param aOptions Object - * An object with the following optional properties: - * - loadFromCache: if false, will bypass the cache and - * always load fresh from the network (default: true) - * - policy: the nsIContentPolicy type to apply when fetching the URL - * - window: the window to get the loadGroup from - * - charset: the charset to use if the channel doesn't provide one - * @returns Promise that resolves with an object with the following members on - * success: - * - content: the document at that URL, as a string, - * - contentType: the content type of the document - * - * If an error occurs, the promise is rejected with that error. - * - * XXX: It may be better to use nsITraceableChannel to get to the sources - * without relying on caching when we can (not for eval, etc.): - * http://www.softwareishard.com/blog/firebug/nsitraceablechannel-intercept-http-traffic/ - */ -function mainThreadFetch(aURL, aOptions={ loadFromCache: true, - policy: Ci.nsIContentPolicy.TYPE_OTHER, - window: null, - charset: null }) { - // Create a channel. - let url = aURL.split(" -> ").pop(); - let channel; - try { - channel = newChannelForURL(url, aOptions); - } catch (ex) { - return promise.reject(ex); - } - - // Set the channel options. - channel.loadFlags = aOptions.loadFromCache - ? channel.LOAD_FROM_CACHE - : channel.LOAD_BYPASS_CACHE; - - if (aOptions.window) { - // Respect private browsing. - channel.loadGroup = aOptions.window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocumentLoader) - .loadGroup; - } - - let deferred = promise.defer(); - let onResponse = (stream, status, request) => { - if (!components.isSuccessCode(status)) { - deferred.reject(new Error('Failed to fetch ${url}. Code ${status}.')); - return; - } - - try { - // We cannot use NetUtil to do the charset conversion as if charset - // information is not available and our default guess is wrong the method - // might fail and we lose the stream data. This means we can't fall back - // to using the locale default encoding (bug 1181345). - - // Read and decode the data according to the locale default encoding. - let available = stream.available(); - let source = NetUtil.readInputStreamToString(stream, available); - stream.close(); - - // If the channel or the caller has correct charset information, the - // content will be decoded correctly. If we have to fall back to UTF-8 and - // the guess is wrong, the conversion fails and convertToUnicode returns - // the input unmodified. Essentially we try to decode the data as UTF-8 - // and if that fails, we use the locale specific default encoding. This is - // the best we can do if the source does not provide charset info. - let charset = channel.contentCharset || aOptions.charset || "UTF-8"; - let unicodeSource = NetworkHelper.convertToUnicode(source, charset); - - deferred.resolve({ - content: unicodeSource, - contentType: request.contentType - }); - } catch (ex) { - let uri = request.originalURI; - if (ex.name === "NS_BASE_STREAM_CLOSED" && uri instanceof Ci.nsIFileURL) { - // Empty files cause NS_BASE_STREAM_CLOSED exception. Use OS.File to - // differentiate between empty files and other errors (bug 1170864). - // This can be removed when bug 982654 is fixed. - - uri.QueryInterface(Ci.nsIFileURL); - let result = OS.File.read(uri.file.path).then(bytes => { - // Convert the bytearray to a String. - let decoder = new TextDecoder(); - let content = decoder.decode(bytes); - - // We can't detect the contentType without opening a channel - // and that failed already. This is the best we can do here. - return { - content, - contentType: "text/plain" - }; - }); - - deferred.resolve(result); - } else { - deferred.reject(ex); - } - } - }; - - // Open the channel - try { - NetUtil.asyncFetch(channel, onResponse); - } catch (ex) { - return promise.reject(ex); - } - - return deferred.promise; -} - -/** - * Opens a channel for given URL. Tries a bit harder than NetUtil.newChannel. - * - * @param {String} url - The URL to open a channel for. - * @param {Object} options - The options object passed to @method fetch. - * @return {nsIChannel} - The newly created channel. Throws on failure. - */ -function newChannelForURL(url, { policy }) { - let channelOptions = { - contentPolicyType: policy, - loadUsingSystemPrincipal: true, - uri: url - }; - - try { - return NetUtil.newChannel(channelOptions); - } catch (e) { - // In the xpcshell tests, the script url is the absolute path of the test - // file, which will make a malformed URI error be thrown. Add the file - // scheme to see if it helps. - channelOptions.uri = "file://" + url; - - return NetUtil.newChannel(channelOptions); - } -} - -// Fetch is defined differently depending on whether we are on the main thread -// or a worker thread. -if (!this.isWorker) { - DevToolsUtils.fetch = mainThreadFetch; -} else { - // Services is not available in worker threads, nor is there any other way - // to fetch a URL. We need to enlist the help from the main thread here, by - // issuing an rpc request, to fetch the URL on our behalf. - DevToolsUtils.fetch = function (url, options) { - return rpc("fetch", url, options); - } -} - -/** - * Returns a promise that is resolved or rejected when all promises have settled - * (resolved or rejected). - * - * This differs from Promise.all, which will reject immediately after the first - * rejection, instead of waiting for the remaining promises to settle. - * - * @param values - * Iterable of promises that may be pending, resolved, or rejected. When - * when all promises have settled (resolved or rejected), the returned - * promise will be resolved or rejected as well. - * - * @return A new promise that is fulfilled when all values have settled - * (resolved or rejected). Its resolution value will be an array of all - * resolved values in the given order, or undefined if values is an - * empty array. The reject reason will be forwarded from the first - * promise in the list of given promises to be rejected. - */ -DevToolsUtils.settleAll = values => { - if (values === null || typeof(values[Symbol.iterator]) != "function") { - throw new Error("settleAll() expects an iterable."); - } - - let deferred = promise.defer(); - - values = Array.isArray(values) ? values : [...values]; - let countdown = values.length; - let resolutionValues = new Array(countdown); - let rejectionValue; - let rejectionOccurred = false; - - if (!countdown) { - deferred.resolve(resolutionValues); - return deferred.promise; - } - - function checkForCompletion() { - if (--countdown > 0) { - return; - } - if (!rejectionOccurred) { - deferred.resolve(resolutionValues); - } else { - deferred.reject(rejectionValue); - } - } - - for (let i = 0; i < values.length; i++) { - let index = i; - let value = values[i]; - let resolver = result => { - resolutionValues[index] = result; - checkForCompletion(); - }; - let rejecter = error => { - if (!rejectionOccurred) { - rejectionValue = error; - rejectionOccurred = true; - } - checkForCompletion(); - }; - - if (value && typeof(value.then) == "function") { - value.then(resolver, rejecter); - } else { - // Given value is not a promise, forward it as a resolution value. - resolver(value); - } - } - - return deferred.promise; -}; - -/** - * When the testing flag is set, various behaviors may be altered from - * production mode, typically to enable easier testing or enhanced debugging. - */ -var testing = false; -Object.defineProperty(DevToolsUtils, "testing", { - get: function() { - return testing; - }, - set: function(state) { - testing = state; - } -}); - -/** - * Open the file at the given path for reading. - * - * @param {String} filePath - * - * @returns Promise - */ -DevToolsUtils.openFileStream = function (filePath) { - return new Promise((resolve, reject) => { - const uri = NetUtil.newURI(new FileUtils.File(filePath)); - NetUtil.asyncFetch( - { uri, loadUsingSystemPrincipal: true }, - (stream, result) => { - if (!components.isSuccessCode(result)) { - reject(new Error('Could not open "${filePath}": result = ${result}')); - return; - } - - resolve(stream); - } - ); - }); -} diff --git a/cocos/scripting/js-bindings/script/debugger/README.md b/cocos/scripting/js-bindings/script/debugger/README.md deleted file mode 100644 index 9e1d7bebd03c..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/README.md +++ /dev/null @@ -1,54 +0,0 @@ -Remote Debugging By Using FireFox -================================= - -Requirement ------------ - -* Firefox: From v24 - -How To Use ----------- - -### Prepare ### - -Please refer to https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging . - -### Enable Debugger Support For Your JSB Project ### - -``` -bool AppDelegate::applicationDidFinishLaunching() -{ - ... - - ScriptingCore* sc = ScriptingCore::getInstance(); - sc->addRegisterCallback(register_all_cocos2dx); - sc->addRegisterCallback(register_all_cocos2dx_extension); - sc->addRegisterCallback(register_cocos2dx_js_extensions); - sc->addRegisterCallback(jsb_register_chipmunk); - sc->addRegisterCallback(register_all_cocos2dx_extension_manual); - sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(jsb_register_system); - sc->addRegisterCallback(JSB_register_opengl); - - sc->start(); - -#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0) - sc->enableDebugger(); // Enable debugger here -#endif - - ... -} -``` - -Run your game. - -### Open Firefox And Follow The Step As Follows ### - - -![pic 1](https://lh5.googleusercontent.com/-HoxLGBdV2J0/UlZ7ZoFUjyI/AAAAAAAAADM/68GDaCQ1vP0/s0-I/Firefox-Remote-Debug01.jpg) -![pic 2](https://lh6.googleusercontent.com/-7FDIHAYsKAY/UlZ7Yf8W-pI/AAAAAAAAAFQ/joG0AymnuBk/s0-I/Firefox-Remote-Debug02.jpg) -![pic 3](https://lh4.googleusercontent.com/-idvnMRGcGy8/UlZ7Wj6DDuI/AAAAAAAAAC0/L9IVyHLNqeQ/s0-I/Firefox-Remote-Debug04.jpg) -![pic 4](https://lh6.googleusercontent.com/-YuZj7JGAtFE/UlZ9DDGDczI/AAAAAAAAAEQ/D2qIedjP5FU/s0-I/Firefox-Remote-Debug04.png.png) -![pic 5](https://lh3.googleusercontent.com/-cdIcNa3jT5c/UlZ9uapf3OI/AAAAAAAAAEg/MGq3vLHsauw/s0-I/Firefox-Remote-Debug05.png) -![pic 6](https://lh5.googleusercontent.com/-T79-o5ylJKI/UlZ_JJQe3MI/AAAAAAAAAE8/F63fSVxlJKs/s0-I/Firefox-Remote-Debug06.png) - diff --git a/cocos/scripting/js-bindings/script/debugger/actors/common.js b/cocos/scripting/js-bindings/script/debugger/actors/common.js deleted file mode 100644 index a376d62d2e92..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/common.js +++ /dev/null @@ -1,301 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/** - * An OriginalLocation represents a location in an original source. - * - * @param SourceActor actor - * A SourceActor representing an original source. - * @param Number line - * A line within the given source. - * @param Number column - * A column within the given line. - * @param String name - * The name of the symbol corresponding to this OriginalLocation. - */ - -function OriginalLocation(actor, line, column, name) { - this._connection = actor ? actor.conn : null; - this._actorID = actor ? actor.actorID : undefined; - this._line = line; - this._column = column; - this._name = name; -} - -OriginalLocation.fromGeneratedLocation = function (generatedLocation) { - return new OriginalLocation( - generatedLocation.generatedSourceActor, - generatedLocation.generatedLine, - generatedLocation.generatedColumn - ); -}; - -OriginalLocation.prototype = { - get originalSourceActor() { - return this._connection ? this._connection.getActor(this._actorID) : null; - }, - - get originalUrl() { - let actor = this.originalSourceActor; - let source = actor.source; - return source ? source.url : actor._originalUrl; - }, - - get originalLine() { - return this._line; - }, - - get originalColumn() { - return this._column; - }, - - get originalName() { - return this._name; - }, - - get generatedSourceActor() { - throw new Error("Shouldn't access generatedSourceActor from an OriginalLocation"); - }, - - get generatedLine() { - throw new Error("Shouldn't access generatedLine from an OriginalLocation"); - }, - - get generatedColumn() { - throw new Error("Shouldn't access generatedColumn from an Originallocation"); - }, - - equals: function (other) { - return this.originalSourceActor.url == other.originalSourceActor.url && - this.originalLine === other.originalLine && - (this.originalColumn === undefined || - other.originalColumn === undefined || - this.originalColumn === other.originalColumn); - }, - - toJSON: function () { - return { - source: this.originalSourceActor.form(), - line: this.originalLine, - column: this.originalColumn - }; - } -}; - -/** - * A GeneratedLocation represents a location in a generated source. - * - * @param SourceActor actor - * A SourceActor representing a generated source. - * @param Number line - * A line within the given source. - * @param Number column - * A column within the given line. - */ -function GeneratedLocation(actor, line, column, lastColumn) { - this._connection = actor ? actor.conn : null; - this._actorID = actor ? actor.actorID : undefined; - this._line = line; - this._column = column; - this._lastColumn = (lastColumn !== undefined) ? lastColumn : column + 1; -} - -GeneratedLocation.fromOriginalLocation = function (originalLocation) { - return new GeneratedLocation( - originalLocation.originalSourceActor, - originalLocation.originalLine, - originalLocation.originalColumn - ); -}; - -GeneratedLocation.prototype = { - get originalSourceActor() { - throw new Error(); - }, - - get originalUrl() { - throw new Error("Shouldn't access originalUrl from a GeneratedLocation"); - }, - - get originalLine() { - throw new Error("Shouldn't access originalLine from a GeneratedLocation"); - }, - - get originalColumn() { - throw new Error("Shouldn't access originalColumn from a GeneratedLocation"); - }, - - get originalName() { - throw new Error("Shouldn't access originalName from a GeneratedLocation"); - }, - - get generatedSourceActor() { - return this._connection ? this._connection.getActor(this._actorID) : null; - }, - - get generatedLine() { - return this._line; - }, - - get generatedColumn() { - return this._column; - }, - - get generatedLastColumn() { - return this._lastColumn; - }, - - equals: function (other) { - return this.generatedSourceActor.url == other.generatedSourceActor.url && - this.generatedLine === other.generatedLine && - (this.generatedColumn === undefined || - other.generatedColumn === undefined || - this.generatedColumn === other.generatedColumn); - }, - - toJSON: function () { - return { - source: this.generatedSourceActor.form(), - line: this.generatedLine, - column: this.generatedColumn, - lastColumn: this.generatedLastColumn - }; - } -}; - -getOffsetColumn = function getOffsetColumn(aOffset, aScript) { - let bestOffsetMapping = null; - for (let offsetMapping of aScript.getAllColumnOffsets()) { - if (!bestOffsetMapping || - (offsetMapping.offset <= aOffset && - offsetMapping.offset > bestOffsetMapping.offset)) { - bestOffsetMapping = offsetMapping; - } - } - - if (!bestOffsetMapping) { - // XXX: Try not to completely break the experience of using the debugger for - // the user by assuming column 0. Simultaneously, report the error so that - // there is a paper trail if the assumption is bad and the debugging - // experience becomes wonky. - reportError(new Error("Could not find a column for offset " + aOffset - + " in the script " + aScript)); - return 0; - } - - return bestOffsetMapping.columnNumber; -} - -/** - * Construct an ActorPool. - * - * ActorPools are actorID -> actor mapping and storage. These are - * used to accumulate and quickly dispose of groups of actors that - * share a lifetime. - */ -function ActorPool(aConnection) -{ - this.conn = aConnection; - this._cleanups = {}; - this._actors = {}; -} - -ActorPool.prototype = { - /** - * Add an actor to the actor pool. If the actor doesn't have an ID, - * allocate one from the connection. - * - * @param aActor object - * The actor implementation. If the object has a - * 'disconnect' property, it will be called when the actor - * pool is cleaned up. - */ - addActor: function AP_addActor(aActor) { - aActor.conn = this.conn; - if (!aActor.actorID) { - let prefix = aActor.actorPrefix; - if (!prefix && typeof aActor == "function") { - // typeName is a convention used with protocol.js-based actors - prefix = aActor.prototype.actorPrefix || aActor.prototype.typeName; - } - aActor.actorID = this.conn.allocID(prefix || undefined); - } - - if (aActor.registeredPool) { - aActor.registeredPool.removeActor(aActor); - } - aActor.registeredPool = this; - - this._actors[aActor.actorID] = aActor; - if (aActor.disconnect) { - this._cleanups[aActor.actorID] = aActor; - } - }, - - get: function AP_get(aActorID) { - return this._actors[aActorID] || undefined; - }, - - has: function AP_has(aActorID) { - return aActorID in this._actors; - }, - - /** - * Returns true if the pool is empty. - */ - isEmpty: function AP_isEmpty() { - return Object.keys(this._actors).length == 0; - }, - - /** - * Remove an actor from the actor pool. - */ - removeActor: function AP_remove(aActor) { - delete this._actors[aActor.actorID]; - delete this._cleanups[aActor.actorID]; - }, - - /** - * Match the api expected by the protocol library. - */ - unmanage: function(aActor) { - return this.removeActor(aActor); - }, - - /** - * Run all actor cleanups. - */ - cleanup: function AP_cleanup() { - for (let id in this._cleanups) { - this._cleanups[id].disconnect(); - } - this._cleanups = {}; - }, - - forEach: function(callback) { - for (let name in this._actors) { - callback(this._actors[name]); - } - }, -} \ No newline at end of file diff --git a/cocos/scripting/js-bindings/script/debugger/actors/object.js b/cocos/scripting/js-bindings/script/debugger/actors/object.js deleted file mode 100644 index 94b4a98aebf4..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/object.js +++ /dev/null @@ -1,2018 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -// const { Cu, Ci } = require("chrome"); -// const { GeneratedLocation } = require("devtools/server/actors/common"); -// const { DebuggerServer } = require("devtools/server/main") -// const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); -// const { dbg_assert, dumpn } = DevToolsUtils; -// const PromiseDebugging = require("PromiseDebugging"); - -const TYPED_ARRAY_CLASSES = ["Uint8Array", "Uint8ClampedArray", "Uint16Array", - "Uint32Array", "Int8Array", "Int16Array", "Int32Array", "Float32Array", - "Float64Array"]; - -// Number of items to preview in objects, arrays, maps, sets, lists, -// collections, etc. -const OBJECT_PREVIEW_MAX_ITEMS = 10; - -/** - * Creates an actor for the specified object. - * - * @param obj Debugger.Object - * The debuggee object. - * @param hooks Object - * A collection of abstract methods that are implemented by the caller. - * ObjectActor requires the following functions to be implemented by - * the caller: - * - createValueGrip - * Creates a value grip for the given object - * - sources - * TabSources getter that manages the sources of a thread - * - createEnvironmentActor - * Creates and return an environment actor - * - getGripDepth - * An actor's grip depth getter - * - incrementGripDepth - * Increment the actor's grip depth - * - decrementGripDepth - * Decrement the actor's grip depth - * - globalDebugObject - * The Debuggee Global Object as given by the ThreadActor - */ -function ObjectActor(obj, { - createValueGrip, - sources, - createEnvironmentActor, - getGripDepth, - incrementGripDepth, - decrementGripDepth, - getGlobalDebugObject -}) { - dbg_assert(!obj.optimizedOut, - "Should not create object actors for optimized out values!"); - this.obj = obj; - this.hooks = { - createValueGrip, - sources, - createEnvironmentActor, - getGripDepth, - incrementGripDepth, - decrementGripDepth, - getGlobalDebugObject - }; - this.iterators = new Set(); -} - -ObjectActor.prototype = { - actorPrefix: "obj", - - /** - * Returns a grip for this actor for returning in a protocol message. - */ - grip: function() { - this.hooks.incrementGripDepth(); - - let g = { - "type": "object", - "class": this.obj.class, - "actor": this.actorID, - "extensible": this.obj.isExtensible(), - "frozen": this.obj.isFrozen(), - "sealed": this.obj.isSealed() - }; - - if (this.obj.class != "DeadObject") { - if (this.obj.class == "Promise") { - g.promiseState = this._createPromiseState(); - } - - // FF40+: Allow to know how many properties an object has - // to lazily display them when there is a bunch. - // Throws on some MouseEvent object in tests. - try { - // Bug 1163520: Assert on internal functions - if (this.obj.class != "Function") { - g.ownPropertyLength = this.obj.getOwnPropertyNames().length; - } - } catch(e) {} - - let raw = this.obj.unsafeDereference(); - - // If Cu is not defined, we are running on a worker thread, where xrays - // don't exist. - // if (Cu) { - // raw = Cu.unwaiveXrays(raw); - // } - - if (!DevToolsUtils.isSafeJSObject(raw)) { - raw = null; - } - - // let previewers = DebuggerServer.ObjectActorPreviewers[this.obj.class] || - // DebuggerServer.ObjectActorPreviewers.Object; - // for (let fn of previewers) { - // try { - // if (fn(this, g, raw)) { - // break; - // } - // } catch (e) { - // let msg = "ObjectActor.prototype.grip previewer function"; - // DevToolsUtils.reportException(msg, e); - // } - // } - } - - this.hooks.decrementGripDepth(); - return g; - }, - - /** - * Returns an object exposing the internal Promise state. - */ - _createPromiseState: function() { - const { state, value, reason } = getPromiseState(this.obj); - let promiseState = { state }; - let rawPromise = this.obj.unsafeDereference(); - - if (state == "fulfilled") { - promiseState.value = this.hooks.createValueGrip(value); - } else if (state == "rejected") { - promiseState.reason = this.hooks.createValueGrip(reason); - } - - promiseState.creationTimestamp = Date.now() - - PromiseDebugging.getPromiseLifetime(rawPromise); - - // If the promise is not settled, avoid adding the timeToSettle property - // and catch the error thrown by PromiseDebugging.getTimeToSettle. - try { - promiseState.timeToSettle = PromiseDebugging.getTimeToSettle(rawPromise); - } catch(e) {} - - return promiseState; - }, - - /** - * Releases this actor from the pool. - */ - release: function() { - if (this.registeredPool.objectActors) { - this.registeredPool.objectActors.delete(this.obj); - } - this.iterators.forEach(actor => this.registeredPool.removeActor(actor)); - this.iterators.clear(); - this.registeredPool.removeActor(this); - }, - - /** - * Handle a protocol request to provide the definition site of this function - * object. - */ - onDefinitionSite: function() { - if (this.obj.class != "Function") { - return { - from: this.actorID, - error: "objectNotFunction", - message: this.actorID + " is not a function." - }; - } - - if (!this.obj.script) { - return { - from: this.actorID, - error: "noScript", - message: this.actorID + " has no Debugger.Script" - }; - } - - return this.hooks.sources().getOriginalLocation(new GeneratedLocation( - this.hooks.sources().createNonSourceMappedActor(this.obj.script.source), - this.obj.script.startLine, - 0 // TODO bug 901138: use Debugger.Script.prototype.startColumn - )).then((originalLocation) => { - return { - source: originalLocation.originalSourceActor.form(), - line: originalLocation.originalLine, - column: originalLocation.originalColumn - }; - }); - }, - - /** - * Handle a protocol request to provide the names of the properties defined on - * the object and not its prototype. - */ - onOwnPropertyNames: function() { - return { from: this.actorID, - ownPropertyNames: this.obj.getOwnPropertyNames() }; - }, - - /** - * Creates an actor to iterate over an object property names and values. - * See PropertyIteratorActor constructor for more info about options param. - * - * @param request object - * The protocol request object. - */ - onEnumProperties: function(request) { - let actor = new PropertyIteratorActor(this, request.options); - this.registeredPool.addActor(actor); - this.iterators.add(actor); - return { iterator: actor.grip() }; - }, - - /** - * Handle a protocol request to provide the prototype and own properties of - * the object. - */ - onPrototypeAndProperties: function() { - let ownProperties = Object.create(null); - let names; - try { - names = this.obj.getOwnPropertyNames(); - } catch (ex) { - log('exception: ' + ex); - log(ex.stack); - // The above can throw if this.obj points to a dead object. - // TODO: we should use Cu.isDeadWrapper() - see bug 885800. - return { from: this.actorID, - prototype: this.hooks.createValueGrip(null), - ownProperties: ownProperties, - safeGetterValues: Object.create(null) }; - } - try { - for (let name of names) { - ownProperties[name] = this._propertyDescriptor(name); - } - return { from: this.actorID, - prototype: this.hooks.createValueGrip(this.obj.proto), - ownProperties: ownProperties, - safeGetterValues: this._findSafeGetterValues(names) }; - } catch(ex) { - log('exception: ' + ex); - log(ex.stack); - } - }, - - /** - * Find the safe getter values for the current Debugger.Object, |this.obj|. - * - * @private - * @param array ownProperties - * The array that holds the list of known ownProperties names for - * |this.obj|. - * @param number [limit=0] - * Optional limit of getter values to find. - * @return object - * An object that maps property names to safe getter descriptors as - * defined by the remote debugging protocol. - */ - _findSafeGetterValues: function(ownProperties, limit = 0) { - let safeGetterValues = Object.create(null); - let obj = this.obj; - let level = 0, i = 0; - - while (obj) { - let getters = this._findSafeGetters(obj); - for (let name of getters) { - // Avoid overwriting properties from prototypes closer to this.obj. Also - // avoid providing safeGetterValues from prototypes if property |name| - // is already defined as an own property. - if (name in safeGetterValues || - (obj != this.obj && ownProperties.indexOf(name) !== -1)) { - continue; - } - - // Ignore __proto__ on Object.prototye. - if (!obj.proto && name == "__proto__") { - continue; - } - - let desc = null, getter = null; - try { - desc = obj.getOwnPropertyDescriptor(name); - getter = desc.get; - } catch (ex) { - // The above can throw if the cache becomes stale. - } - if (!getter) { - obj._safeGetters = null; - continue; - } - - let result = getter.call(this.obj); - if (result && !("throw" in result)) { - let getterValue = undefined; - if ("return" in result) { - getterValue = result.return; - } else if ("yield" in result) { - getterValue = result.yield; - } - // WebIDL attributes specified with the LenientThis extended attribute - // return undefined and should be ignored. - if (getterValue !== undefined) { - safeGetterValues[name] = { - getterValue: this.hooks.createValueGrip(getterValue), - getterPrototypeLevel: level, - enumerable: desc.enumerable, - writable: level == 0 ? desc.writable : true, - }; - if (limit && ++i == limit) { - break; - } - } - } - } - if (limit && i == limit) { - break; - } - - obj = obj.proto; - level++; - } - - return safeGetterValues; - }, - - /** - * Find the safe getters for a given Debugger.Object. Safe getters are native - * getters which are safe to execute. - * - * @private - * @param Debugger.Object object - * The Debugger.Object where you want to find safe getters. - * @return Set - * A Set of names of safe getters. This result is cached for each - * Debugger.Object. - */ - _findSafeGetters: function(object) { - if (object._safeGetters) { - return object._safeGetters; - } - - let getters = new Set(); - let names = []; - try { - names = object.getOwnPropertyNames() - } catch (ex) { - // Calling getOwnPropertyNames() on some wrapped native prototypes is not - // allowed: "cannot modify properties of a WrappedNative". See bug 952093. - } - - for (let name of names) { - let desc = null; - try { - desc = object.getOwnPropertyDescriptor(name); - } catch (e) { - // Calling getOwnPropertyDescriptor on wrapped native prototypes is not - // allowed (bug 560072). - } - if (!desc || desc.value !== undefined || !("get" in desc)) { - continue; - } - - if (DevToolsUtils.hasSafeGetter(desc)) { - getters.add(name); - } - } - - object._safeGetters = getters; - return getters; - }, - - /** - * Handle a protocol request to provide the prototype of the object. - */ - onPrototype: function() { - return { from: this.actorID, - prototype: this.hooks.createValueGrip(this.obj.proto) }; - }, - - /** - * Handle a protocol request to provide the property descriptor of the - * object's specified property. - * - * @param request object - * The protocol request object. - */ - onProperty: function(request) { - if (!request.name) { - return { error: "missingParameter", - message: "no property name was specified" }; - } - - return { from: this.actorID, - descriptor: this._propertyDescriptor(request.name) }; - }, - - /** - * Handle a protocol request to provide the display string for the object. - */ - onDisplayString: function() { - const string = stringify(this.obj); - return { from: this.actorID, - displayString: this.hooks.createValueGrip(string) }; - }, - - /** - * A helper method that creates a property descriptor for the provided object, - * properly formatted for sending in a protocol response. - * - * @private - * @param string name - * The property that the descriptor is generated for. - * @param boolean [onlyEnumerable] - * Optional: true if you want a descriptor only for an enumerable - * property, false otherwise. - * @return object|undefined - * The property descriptor, or undefined if this is not an enumerable - * property and onlyEnumerable=true. - */ - _propertyDescriptor: function(name, onlyEnumerable) { - let desc; - try { - desc = this.obj.getOwnPropertyDescriptor(name); - } catch (e) { - // Calling getOwnPropertyDescriptor on wrapped native prototypes is not - // allowed (bug 560072). Inform the user with a bogus, but hopefully - // explanatory, descriptor. - return { - configurable: false, - writable: false, - enumerable: false, - value: e.name - }; - } - - if (!desc || onlyEnumerable && !desc.enumerable) { - return undefined; - } - - let retval = { - configurable: desc.configurable, - enumerable: desc.enumerable - }; - - if ("value" in desc) { - retval.writable = desc.writable; - retval.value = this.hooks.createValueGrip(desc.value); - } else { - if ("get" in desc) { - retval.get = this.hooks.createValueGrip(desc.get); - } - if ("set" in desc) { - retval.set = this.hooks.createValueGrip(desc.set); - } - } - return retval; - }, - - /** - * Handle a protocol request to provide the source code of a function. - * - * @param request object - * The protocol request object. - */ - onDecompile: function(request) { - if (this.obj.class !== "Function") { - return { error: "objectNotFunction", - message: "decompile request is only valid for object grips " + - "with a 'Function' class." }; - } - - return { from: this.actorID, - decompiledCode: this.obj.decompile(!!request.pretty) }; - }, - - /** - * Handle a protocol request to provide the parameters of a function. - */ - onParameterNames: function() { - if (this.obj.class !== "Function") { - return { error: "objectNotFunction", - message: "'parameterNames' request is only valid for object " + - "grips with a 'Function' class." }; - } - - return { parameterNames: this.obj.parameterNames }; - }, - - /** - * Handle a protocol request to release a thread-lifetime grip. - */ - onRelease: function() { - this.release(); - return {}; - }, - - /** - * Handle a protocol request to provide the lexical scope of a function. - */ - onScope: function() { - if (this.obj.class !== "Function") { - return { error: "objectNotFunction", - message: "scope request is only valid for object grips with a" + - " 'Function' class." }; - } - - let envActor = this.hooks.createEnvironmentActor(this.obj.environment, - this.registeredPool); - if (!envActor) { - return { error: "notDebuggee", - message: "cannot access the environment of this function." }; - } - - return { from: this.actorID, scope: envActor.form() }; - }, - - /** - * Handle a protocol request to get the list of dependent promises of a - * promise. - * - * @return object - * Returns an object containing an array of object grips of the - * dependent promises - */ - onDependentPromises: function() { - if (this.obj.class != "Promise") { - return { error: "objectNotPromise", - message: "'dependentPromises' request is only valid for " + - "object grips with a 'Promise' class." }; - } - - let rawPromise = this.obj.unsafeDereference(); - let promises = PromiseDebugging.getDependentPromises(rawPromise).map(p => - this.hooks.createValueGrip(this.obj.makeDebuggeeValue(p))); - - return { promises }; - }, - - /** - * Handle a protocol request to get the allocation stack of a promise. - */ - onAllocationStack: function() { - if (this.obj.class != "Promise") { - return { error: "objectNotPromise", - message: "'allocationStack' request is only valid for " + - "object grips with a 'Promise' class." }; - } - - let rawPromise = this.obj.unsafeDereference(); - let stack = PromiseDebugging.getAllocationStack(rawPromise); - let allocationStacks = []; - - while (stack) { - if (stack.source) { - let source = this._getSourceOriginalLocation(stack); - - if (source) { - allocationStacks.push(source); - } - } - stack = stack.parent; - } - - return Promise.all(allocationStacks).then(stacks => { - return { allocationStack: stacks }; - }); - }, - - /** - * Handle a protocol request to get the fulfillment stack of a promise. - */ - onFulfillmentStack: function() { - if (this.obj.class != "Promise") { - return { error: "objectNotPromise", - message: "'fulfillmentStack' request is only valid for " + - "object grips with a 'Promise' class." }; - } - - let rawPromise = this.obj.unsafeDereference(); - let stack = PromiseDebugging.getFullfillmentStack(rawPromise); - let fulfillmentStacks = []; - - while (stack) { - if (stack.source) { - let source = this._getSourceOriginalLocation(stack); - - if (source) { - fulfillmentStacks.push(source); - } - } - stack = stack.parent; - } - - return Promise.all(fulfillmentStacks).then(stacks => { - return { fulfillmentStack: stacks }; - }); - }, - - /** - * Handle a protocol request to get the rejection stack of a promise. - */ - onRejectionStack: function() { - if (this.obj.class != "Promise") { - return { error: "objectNotPromise", - message: "'rejectionStack' request is only valid for " + - "object grips with a 'Promise' class." }; - } - - let rawPromise = this.obj.unsafeDereference(); - let stack = PromiseDebugging.getRejectionStack(rawPromise); - let rejectionStacks = []; - - while (stack) { - if (stack.source) { - let source = this._getSourceOriginalLocation(stack); - - if (source) { - rejectionStacks.push(source); - } - } - stack = stack.parent; - } - - return Promise.all(rejectionStacks).then(stacks => { - return { rejectionStack: stacks }; - }); - }, - - /** - * Helper function for fetching the source location of a SavedFrame stack. - * - * @param SavedFrame stack - * The promise allocation stack frame - * @return object - * Returns an object containing the source location of the SavedFrame - * stack. - */ - _getSourceOriginalLocation: function(stack) { - let source; - - // Catch any errors if the source actor cannot be found - try { - source = this.hooks.sources().getSourceActorByURL(stack.source); - } catch(e) {} - - if (!source) { - return null; - } - - return this.hooks.sources().getOriginalLocation(new GeneratedLocation( - source, - stack.line, - stack.column - )).then((originalLocation) => { - return { - source: originalLocation.originalSourceActor.form(), - line: originalLocation.originalLine, - column: originalLocation.originalColumn, - functionDisplayName: stack.functionDisplayName - }; - }); - }, - - /** - * Added by minggo - * To get the name of this object. It is used to get function name, - * which is needed by dispalying function name in stack strace. - */ - onName: function() { - return { from: this.actorID, name: this.obj.name }; - } -}; - -ObjectActor.prototype.requestTypes = { - "definitionSite": ObjectActor.prototype.onDefinitionSite, - "parameterNames": ObjectActor.prototype.onParameterNames, - "prototypeAndProperties": ObjectActor.prototype.onPrototypeAndProperties, - "enumProperties": ObjectActor.prototype.onEnumProperties, - "prototype": ObjectActor.prototype.onPrototype, - "property": ObjectActor.prototype.onProperty, - "displayString": ObjectActor.prototype.onDisplayString, - "ownPropertyNames": ObjectActor.prototype.onOwnPropertyNames, - "decompile": ObjectActor.prototype.onDecompile, - "release": ObjectActor.prototype.onRelease, - "scope": ObjectActor.prototype.onScope, - "dependentPromises": ObjectActor.prototype.onDependentPromises, - "allocationStack": ObjectActor.prototype.onAllocationStack, - "fulfillmentStack": ObjectActor.prototype.onFulfillmentStack, - "rejectionStack": ObjectActor.prototype.onRejectionStack, - "name": ObjectActor.prototype.onName, // added by minggo -}; - -/** - * Creates an actor to iterate over an object's property names and values. - * - * @param objectActor ObjectActor - * The object actor. - * @param options Object - * A dictionary object with various boolean attributes: - * - ignoreSafeGetters Boolean - * If true, do not iterate over safe getters. - * - ignoreIndexedProperties Boolean - * If true, filters out Array items. - * e.g. properties names between `0` and `object.length`. - * - ignoreNonIndexedProperties Boolean - * If true, filters out items that aren't array items - * e.g. properties names that are not a number between `0` - * and `object.length`. - * - sort Boolean - * If true, the iterator will sort the properties by name - * before dispatching them. - * - query String - * If non-empty, will filter the properties by names and values - * containing this query string. The match is not case-sensitive. - * Regarding value filtering it just compare to the stringification - * of the property value. - */ -function PropertyIteratorActor(objectActor, options){ - this.objectActor = objectActor; - - let ownProperties = Object.create(null); - let names = []; - try { - names = this.objectActor.obj.getOwnPropertyNames(); - } catch (ex) {} - - let safeGetterValues = {}; - let safeGetterNames = []; - if (!options.ignoreSafeGetters) { - // Merge the safe getter values into the existing properties list. - safeGetterValues = this.objectActor._findSafeGetterValues(names); - safeGetterNames = Object.keys(safeGetterValues); - for (let name of safeGetterNames) { - if (names.indexOf(name) === -1) { - names.push(name); - } - } - } - - if (options.ignoreIndexedProperties || options.ignoreNonIndexedProperties) { - let length = DevToolsUtils.getProperty(this.objectActor.obj, "length"); - if (typeof(length) !== "number") { - // Pseudo arrays are flagged as ArrayLike if they have - // subsequent indexed properties without having any length attribute. - length = 0; - for (let key of names) { - if (isNaN(key) || key != length++) { - break; - } - } - } - - if (options.ignoreIndexedProperties) { - names = names.filter(i => { - // Use parseFloat in order to reject floats... - // (parseInt converts floats to integer) - // (Number(str) converts spaces to 0) - i = parseFloat(i); - return !Number.isInteger(i) || i < 0 || i >= length; - }); - } - - if (options.ignoreNonIndexedProperties) { - names = names.filter(i => { - i = parseFloat(i); - return Number.isInteger(i) && i >= 0 && i < length; - }); - } - } - - if (options.query) { - let { query } = options; - query = query.toLowerCase(); - names = names.filter(name => { - // Filter on attribute names - if (name.toLowerCase().includes(query)) { - return true; - } - // and then on attribute values - let desc; - try { - desc = this.obj.getOwnPropertyDescriptor(name); - } catch(e) {} - if (desc && desc.value && - String(desc.value).includes(query)) { - return true; - } - return false; - }); - } - - if (options.sort) { - names.sort(); - } - - // Now build the descriptor list - for (let name of names) { - let desc = this.objectActor._propertyDescriptor(name); - if (!desc) { - desc = safeGetterValues[name]; - } - else if (name in safeGetterValues) { - // Merge the safe getter values into the existing properties list. - let { getterValue, getterPrototypeLevel } = safeGetterValues[name]; - desc.getterValue = getterValue; - desc.getterPrototypeLevel = getterPrototypeLevel; - } - ownProperties[name] = desc; - } - - this.names = names; - this.ownProperties = ownProperties; -} - -PropertyIteratorActor.prototype = { - actorPrefix: "propertyIterator", - - grip: function() { - return { - type: "propertyIterator", - actor: this.actorID, - count: this.names.length - }; - }, - - names: function({ indexes }) { - let list = []; - for (let idx of indexes) { - list.push(this.names[idx]); - } - return { - names: list - }; - }, - - slice: function({ start, count }) { - let names = this.names.slice(start, start + count); - let props = Object.create(null); - for (let name of names) { - props[name] = this.ownProperties[name]; - } - return { - ownProperties: props - }; - }, - - all: function() { - return { - ownProperties: this.ownProperties - }; - } -}; - -PropertyIteratorActor.prototype.requestTypes = { - "names": PropertyIteratorActor.prototype.names, - "slice": PropertyIteratorActor.prototype.slice, - "all": PropertyIteratorActor.prototype.all, -}; - -/** - * Functions for adding information to ObjectActor grips for the purpose of - * having customized output. This object holds arrays mapped by - * Debugger.Object.prototype.class. - * - * In each array you can add functions that take two - * arguments: - * - the ObjectActor instance and its hooks to make a preview for, - * - the grip object being prepared for the client, - * - the raw JS object after calling Debugger.Object.unsafeDereference(). This - * argument is only provided if the object is safe for reading properties and - * executing methods. See DevToolsUtils.isSafeJSObject(). - * - * Functions must return false if they cannot provide preview - * information for the debugger object, or true otherwise. - */ -DebuggerServer.ObjectActorPreviewers = { - String: [function({obj, hooks}, grip) { - let result = genericObjectPreviewer("String", String, obj, hooks); - let length = DevToolsUtils.getProperty(obj, "length"); - - if (!result || typeof length != "number") { - return false; - } - - grip.preview = { - kind: "ArrayLike", - length: length - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let items = grip.preview.items = []; - - const max = Math.min(result.value.length, OBJECT_PREVIEW_MAX_ITEMS); - for (let i = 0; i < max; i++) { - let value = hooks.createValueGrip(result.value[i]); - items.push(value); - } - - return true; - }], - - Boolean: [function({obj, hooks}, grip) { - let result = genericObjectPreviewer("Boolean", Boolean, obj, hooks); - if (result) { - grip.preview = result; - return true; - } - - return false; - }], - - Number: [function({obj, hooks}, grip) { - let result = genericObjectPreviewer("Number", Number, obj, hooks); - if (result) { - grip.preview = result; - return true; - } - - return false; - }], - - Function: [function({obj, hooks}, grip) { - if (obj.name) { - grip.name = obj.name; - } - - if (obj.displayName) { - grip.displayName = obj.displayName.substr(0, 500); - } - - if (obj.parameterNames) { - grip.parameterNames = obj.parameterNames; - } - - // Check if the developer has added a de-facto standard displayName - // property for us to use. - let userDisplayName; - try { - userDisplayName = obj.getOwnPropertyDescriptor("displayName"); - } catch (e) { - // Calling getOwnPropertyDescriptor with displayName might throw - // with "permission denied" errors for some functions. - dumpn(e); - } - - if (userDisplayName && typeof userDisplayName.value == "string" && - userDisplayName.value) { - grip.userDisplayName = hooks.createValueGrip(userDisplayName.value); - } - - let dbgGlobal = hooks.getGlobalDebugObject(); - if (dbgGlobal) { - let script = dbgGlobal.makeDebuggeeValue(obj.unsafeDereference()).script; - if (script) { - grip.location = { - url: script.url, - line: script.startLine - }; - } - } - - return true; - }], - - RegExp: [function({obj, hooks}, grip) { - // Avoid having any special preview for the RegExp.prototype itself. - if (!obj.proto || obj.proto.class != "RegExp") { - return false; - } - - let str = RegExp.prototype.toString.call(obj.unsafeDereference()); - grip.displayString = hooks.createValueGrip(str); - return true; - }], - - Date: [function({obj, hooks}, grip) { - let time = Date.prototype.getTime.call(obj.unsafeDereference()); - - grip.preview = { - timestamp: hooks.createValueGrip(time), - }; - return true; - }], - - Array: [function({obj, hooks}, grip) { - let length = DevToolsUtils.getProperty(obj, "length"); - if (typeof length != "number") { - return false; - } - - grip.preview = { - kind: "ArrayLike", - length: length, - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let raw = obj.unsafeDereference(); - let items = grip.preview.items = []; - - for (let i = 0; i < length; ++i) { - // Array Xrays filter out various possibly-unsafe properties (like - // functions, and claim that the value is undefined instead. This - // is generally the right thing for privileged code accessing untrusted - // objects, but quite confusing for Object previews. So we manually - // override this protection by waiving Xrays on the array, and re-applying - // Xrays on any indexed value props that we pull off of it. - let desc = Object.getOwnPropertyDescriptor(Cu.waiveXrays(raw), i); - if (desc && !desc.get && !desc.set) { - let value = Cu.unwaiveXrays(desc.value); - value = makeDebuggeeValueIfNeeded(obj, value); - items.push(hooks.createValueGrip(value)); - } else { - items.push(null); - } - - if (items.length == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - - return true; - }], - - Set: [function({obj, hooks}, grip) { - let size = DevToolsUtils.getProperty(obj, "size"); - if (typeof size != "number") { - return false; - } - - grip.preview = { - kind: "ArrayLike", - length: size, - }; - - // Avoid recursive object grips. - if (hooks.getGripDepth() > 1) { - return true; - } - - let raw = obj.unsafeDereference(); - let items = grip.preview.items = []; - // We currently lack XrayWrappers for Set, so when we iterate over - // the values, the temporary iterator objects get created in the target - // compartment. However, we _do_ have Xrays to Object now, so we end up - // Xraying those temporary objects, and filtering access to |it.value| - // based on whether or not it's Xrayable and/or callable, which breaks - // the for/of iteration. - // - // This code is designed to handle untrusted objects, so we can safely - // waive Xrays on the iterable, and relying on the Debugger machinery to - // make sure we handle the resulting objects carefully. - for (let item of Cu.waiveXrays(Set.prototype.values.call(raw))) { - item = Cu.unwaiveXrays(item); - item = makeDebuggeeValueIfNeeded(obj, item); - items.push(hooks.createValueGrip(item)); - if (items.length == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - - return true; - }], - - Map: [function({obj, hooks}, grip) { - let size = DevToolsUtils.getProperty(obj, "size"); - if (typeof size != "number") { - return false; - } - - grip.preview = { - kind: "MapLike", - size: size, - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let raw = obj.unsafeDereference(); - let entries = grip.preview.entries = []; - // Iterating over a Map via .entries goes through various intermediate - // objects - an Iterator object, then a 2-element Array object, then the - // actual values we care about. We don't have Xrays to Iterator objects, - // so we get Opaque wrappers for them. And even though we have Xrays to - // Arrays, the semantics often deny access to the entires based on the - // nature of the values. So we need waive Xrays for the iterator object - // and the tupes, and then re-apply them on the underlying values until - // we fix bug 1023984. - // - // Even then though, we might want to continue waiving Xrays here for the - // same reason we do so for Arrays above - this filtering behavior is likely - // to be more confusing than beneficial in the case of Object previews. - for (let keyValuePair of Cu.waiveXrays(Map.prototype.entries.call(raw))) { - let key = Cu.unwaiveXrays(keyValuePair[0]); - let value = Cu.unwaiveXrays(keyValuePair[1]); - key = makeDebuggeeValueIfNeeded(obj, key); - value = makeDebuggeeValueIfNeeded(obj, value); - entries.push([hooks.createValueGrip(key), - hooks.createValueGrip(value)]); - if (entries.length == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - - return true; - }], - - DOMStringMap: [function({obj, hooks}, grip, rawObj) { - if (!rawObj) { - return false; - } - - let keys = obj.getOwnPropertyNames(); - grip.preview = { - kind: "MapLike", - size: keys.length, - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let entries = grip.preview.entries = []; - for (let key of keys) { - let value = makeDebuggeeValueIfNeeded(obj, rawObj[key]); - entries.push([key, hooks.createValueGrip(value)]); - if (entries.length == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - - return true; - }], -}; - -/** - * Generic previewer for "simple" classes like String, Number and Boolean. - * - * @param string className - * Class name to expect. - * @param object classObj - * The class to expect, eg. String. The valueOf() method of the class is - * invoked on the given object. - * @param Debugger.Object obj - * The debugger object we need to preview. - * @param object hooks - * The thread actor to use to create a value grip. - * @return object|null - * An object with one property, "value", which holds the value grip that - * represents the given object. Null is returned if we can't preview the - * object. - */ -function genericObjectPreviewer(className, classObj, obj, hooks) { - if (!obj.proto || obj.proto.class != className) { - return null; - } - - let raw = obj.unsafeDereference(); - let v = null; - try { - v = classObj.prototype.valueOf.call(raw); - } catch (ex) { - // valueOf() can throw if the raw JS object is "misbehaved". - return null; - } - - if (v !== null) { - v = hooks.createValueGrip(makeDebuggeeValueIfNeeded(obj, v)); - return { value: v }; - } - - return null; -} - -// Preview functions that do not rely on the object class. -DebuggerServer.ObjectActorPreviewers.Object = [ - function TypedArray({obj, hooks}, grip) { - if (TYPED_ARRAY_CLASSES.indexOf(obj.class) == -1) { - return false; - } - - let length = DevToolsUtils.getProperty(obj, "length"); - if (typeof length != "number") { - return false; - } - - grip.preview = { - kind: "ArrayLike", - length: length, - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let raw = obj.unsafeDereference(); - let global = Cu.getGlobalForObject(DebuggerServer); - let classProto = global[obj.class].prototype; - // The Xray machinery for TypedArrays denies indexed access on the grounds - // that it's slow, and advises callers to do a structured clone instead. - let safeView = Cu.cloneInto(classProto.subarray.call(raw, 0, - OBJECT_PREVIEW_MAX_ITEMS), global); - let items = grip.preview.items = []; - for (let i = 0; i < safeView.length; i++) { - items.push(safeView[i]); - } - - return true; - }, - - function Error({obj, hooks}, grip) { - switch (obj.class) { - case "Error": - case "EvalError": - case "RangeError": - case "ReferenceError": - case "SyntaxError": - case "TypeError": - case "URIError": - let name = DevToolsUtils.getProperty(obj, "name"); - let msg = DevToolsUtils.getProperty(obj, "message"); - let stack = DevToolsUtils.getProperty(obj, "stack"); - let fileName = DevToolsUtils.getProperty(obj, "fileName"); - let lineNumber = DevToolsUtils.getProperty(obj, "lineNumber"); - let columnNumber = DevToolsUtils.getProperty(obj, "columnNumber"); - grip.preview = { - kind: "Error", - name: hooks.createValueGrip(name), - message: hooks.createValueGrip(msg), - stack: hooks.createValueGrip(stack), - fileName: hooks.createValueGrip(fileName), - lineNumber: hooks.createValueGrip(lineNumber), - columnNumber: hooks.createValueGrip(columnNumber), - }; - return true; - default: - return false; - } - }, - - function CSSMediaRule({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMCSSMediaRule)) { - return false; - } - grip.preview = { - kind: "ObjectWithText", - text: hooks.createValueGrip(rawObj.conditionText), - }; - return true; - }, - - function CSSStyleRule({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMCSSStyleRule)) { - return false; - } - grip.preview = { - kind: "ObjectWithText", - text: hooks.createValueGrip(rawObj.selectorText), - }; - return true; - }, - - function ObjectWithURL({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMCSSImportRule || - rawObj instanceof Ci.nsIDOMCSSStyleSheet || - rawObj instanceof Ci.nsIDOMLocation || - rawObj instanceof Ci.nsIDOMWindow)) { - return false; - } - - let url; - if (rawObj instanceof Ci.nsIDOMWindow && rawObj.location) { - url = rawObj.location.href; - } else if (rawObj.href) { - url = rawObj.href; - } else { - return false; - } - - grip.preview = { - kind: "ObjectWithURL", - url: hooks.createValueGrip(url), - }; - - return true; - }, - - function ArrayLike({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || - obj.class != "DOMStringList" && - obj.class != "DOMTokenList" && - !(rawObj instanceof Ci.nsIDOMMozNamedAttrMap || - rawObj instanceof Ci.nsIDOMCSSRuleList || - rawObj instanceof Ci.nsIDOMCSSValueList || - rawObj instanceof Ci.nsIDOMFileList || - rawObj instanceof Ci.nsIDOMFontFaceList || - rawObj instanceof Ci.nsIDOMMediaList || - rawObj instanceof Ci.nsIDOMNodeList || - rawObj instanceof Ci.nsIDOMStyleSheetList)) { - return false; - } - - if (typeof rawObj.length != "number") { - return false; - } - - grip.preview = { - kind: "ArrayLike", - length: rawObj.length, - }; - - if (hooks.getGripDepth() > 1) { - return true; - } - - let items = grip.preview.items = []; - - for (let i = 0; i < rawObj.length && - items.length < OBJECT_PREVIEW_MAX_ITEMS; i++) { - let value = makeDebuggeeValueIfNeeded(obj, rawObj[i]); - items.push(hooks.createValueGrip(value)); - } - - return true; - }, - - function CSSStyleDeclaration({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || - !(rawObj instanceof Ci.nsIDOMCSSStyleDeclaration)) { - return false; - } - - grip.preview = { - kind: "MapLike", - size: rawObj.length, - }; - - let entries = grip.preview.entries = []; - - for (let i = 0; i < OBJECT_PREVIEW_MAX_ITEMS && - i < rawObj.length; i++) { - let prop = rawObj[i]; - let value = rawObj.getPropertyValue(prop); - entries.push([prop, hooks.createValueGrip(value)]); - } - - return true; - }, - - function DOMNode({obj, hooks}, grip, rawObj) { - if (isWorker || obj.class == "Object" || !rawObj || - !(rawObj instanceof Ci.nsIDOMNode)) { - return false; - } - - let preview = grip.preview = { - kind: "DOMNode", - nodeType: rawObj.nodeType, - nodeName: rawObj.nodeName, - }; - - if (rawObj instanceof Ci.nsIDOMDocument && rawObj.location) { - preview.location = hooks.createValueGrip(rawObj.location.href); - } else if (rawObj instanceof Ci.nsIDOMDocumentFragment) { - preview.childNodesLength = rawObj.childNodes.length; - - if (hooks.getGripDepth() < 2) { - preview.childNodes = []; - for (let node of rawObj.childNodes) { - let actor = hooks.createValueGrip(obj.makeDebuggeeValue(node)); - preview.childNodes.push(actor); - if (preview.childNodes.length == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - } - } else if (rawObj instanceof Ci.nsIDOMElement) { - // Add preview for DOM element attributes. - if (rawObj instanceof Ci.nsIDOMHTMLElement) { - preview.nodeName = preview.nodeName.toLowerCase(); - } - - let i = 0; - preview.attributes = {}; - preview.attributesLength = rawObj.attributes.length; - for (let attr of rawObj.attributes) { - preview.attributes[attr.nodeName] = hooks.createValueGrip(attr.value); - if (++i == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - } else if (rawObj instanceof Ci.nsIDOMAttr) { - preview.value = hooks.createValueGrip(rawObj.value); - } else if (rawObj instanceof Ci.nsIDOMText || - rawObj instanceof Ci.nsIDOMComment) { - preview.textContent = hooks.createValueGrip(rawObj.textContent); - } - - return true; - }, - - function DOMEvent({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMEvent)) { - return false; - } - - let preview = grip.preview = { - kind: "DOMEvent", - type: rawObj.type, - properties: Object.create(null), - }; - - if (hooks.getGripDepth() < 2) { - let target = obj.makeDebuggeeValue(rawObj.target); - preview.target = hooks.createValueGrip(target); - } - - let props = []; - if (rawObj instanceof Ci.nsIDOMMouseEvent) { - props.push("buttons", "clientX", "clientY", "layerX", "layerY"); - } else if (rawObj instanceof Ci.nsIDOMKeyEvent) { - let modifiers = []; - if (rawObj.altKey) { - modifiers.push("Alt"); - } - if (rawObj.ctrlKey) { - modifiers.push("Control"); - } - if (rawObj.metaKey) { - modifiers.push("Meta"); - } - if (rawObj.shiftKey) { - modifiers.push("Shift"); - } - preview.eventKind = "key"; - preview.modifiers = modifiers; - - props.push("key", "charCode", "keyCode"); - } else if (rawObj instanceof Ci.nsIDOMTransitionEvent) { - props.push("propertyName", "pseudoElement"); - } else if (rawObj instanceof Ci.nsIDOMAnimationEvent) { - props.push("animationName", "pseudoElement"); - } else if (rawObj instanceof Ci.nsIDOMClipboardEvent) { - props.push("clipboardData"); - } - - // Add event-specific properties. - for (let prop of props) { - let value = rawObj[prop]; - if (value && (typeof value == "object" || typeof value == "function")) { - // Skip properties pointing to objects. - if (hooks.getGripDepth() > 1) { - continue; - } - value = obj.makeDebuggeeValue(value); - } - preview.properties[prop] = hooks.createValueGrip(value); - } - - // Add any properties we find on the event object. - if (!props.length) { - let i = 0; - for (let prop in rawObj) { - let value = rawObj[prop]; - if (prop == "target" || prop == "type" || value === null || - typeof value == "function") { - continue; - } - if (value && typeof value == "object") { - if (hooks.getGripDepth() > 1) { - continue; - } - value = obj.makeDebuggeeValue(value); - } - preview.properties[prop] = hooks.createValueGrip(value); - if (++i == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - } - - return true; - }, - - function DOMException({obj, hooks}, grip, rawObj) { - if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMDOMException)) { - return false; - } - - grip.preview = { - kind: "DOMException", - name: hooks.createValueGrip(rawObj.name), - message: hooks.createValueGrip(rawObj.message), - code: hooks.createValueGrip(rawObj.code), - result: hooks.createValueGrip(rawObj.result), - filename: hooks.createValueGrip(rawObj.filename), - lineNumber: hooks.createValueGrip(rawObj.lineNumber), - columnNumber: hooks.createValueGrip(rawObj.columnNumber), - }; - - return true; - }, - - function PseudoArray({obj, hooks}, grip, rawObj) { - let length = 0; - - // Making sure all keys are numbers from 0 to length-1 - let keys = obj.getOwnPropertyNames(); - if (keys.length == 0) { - return false; - } - for (let key of keys) { - if (isNaN(key) || key != length++) { - return false; - } - } - - grip.preview = { - kind: "ArrayLike", - length: length, - }; - - // Avoid recursive object grips. - if (hooks.getGripDepth() > 1) { - return true; - } - - let items = grip.preview.items = []; - - let i = 0; - for (let key of keys) { - if (rawObj.hasOwnProperty(key) && i++ < OBJECT_PREVIEW_MAX_ITEMS) { - let value = makeDebuggeeValueIfNeeded(obj, rawObj[key]); - items.push(hooks.createValueGrip(value)); - } - } - - return true; - }, - - function GenericObject(objectActor, grip) { - let {obj, hooks} = objectActor; - if (grip.preview || grip.displayString || hooks.getGripDepth() > 1) { - return false; - } - - let i = 0, names = []; - let preview = grip.preview = { - kind: "Object", - ownProperties: Object.create(null), - }; - - try { - names = obj.getOwnPropertyNames(); - } catch (ex) { - // Calling getOwnPropertyNames() on some wrapped native prototypes is not - // allowed: "cannot modify properties of a WrappedNative". See bug 952093. - } - - preview.ownPropertiesLength = names.length; - - for (let name of names) { - let desc = objectActor._propertyDescriptor(name, true); - if (!desc) { - continue; - } - - preview.ownProperties[name] = desc; - if (++i == OBJECT_PREVIEW_MAX_ITEMS) { - break; - } - } - - if (i < OBJECT_PREVIEW_MAX_ITEMS) { - preview.safeGetterValues = objectActor._findSafeGetterValues( - Object.keys(preview.ownProperties), - OBJECT_PREVIEW_MAX_ITEMS - i); - } - - return true; - }, -]; - -/** - * Call PromiseDebugging.getState on this Debugger.Object's referent and wrap - * the resulting `value` or `reason` properties in a Debugger.Object instance. - * - * See dom/webidl/PromiseDebugging.webidl - * - * @returns Object - * An object of one of the following forms: - * - { state: "pending" } - * - { state: "fulfilled", value } - * - { state: "rejected", reason } - */ -function getPromiseState(obj) { - if (obj.class != "Promise") { - throw new Error( - "Can't call `getPromiseState` on `Debugger.Object`s that don't " + - "refer to Promise objects."); - } - - const state = PromiseDebugging.getState(obj.unsafeDereference()); - return { - state: state.state, - value: obj.makeDebuggeeValue(state.value), - reason: obj.makeDebuggeeValue(state.reason) - }; -}; - -/** - * Determine if a given value is non-primitive. - * - * @param Any value - * The value to test. - * @return Boolean - * Whether the value is non-primitive. - */ -function isObject(value) { - const type = typeof value; - return type == "object" ? value !== null : type == "function"; -} - -/** - * Create a function that can safely stringify Debugger.Objects of a given - * builtin type. - * - * @param Function ctor - * The builtin class constructor. - * @return Function - * The stringifier for the class. - */ -function createBuiltinStringifier(ctor) { - return obj => ctor.prototype.toString.call(obj.unsafeDereference()); -} - -/** - * Stringify a Debugger.Object-wrapped Error instance. - * - * @param Debugger.Object obj - * The object to stringify. - * @return String - * The stringification of the object. - */ -function errorStringify(obj) { - let name = DevToolsUtils.getProperty(obj, "name"); - if (name === "" || name === undefined) { - name = obj.class; - } else if (isObject(name)) { - name = stringify(name); - } - - let message = DevToolsUtils.getProperty(obj, "message"); - if (isObject(message)) { - message = stringify(message); - } - - if (message === "" || message === undefined) { - return name; - } - return name + ": " + message; -} - -/** - * Stringify a Debugger.Object based on its class. - * - * @param Debugger.Object obj - * The object to stringify. - * @return String - * The stringification for the object. - */ -function stringify(obj) { - if (obj.class == "DeadObject") { - const error = new Error("Dead object encountered."); - DevToolsUtils.reportException("stringify", error); - return ""; - } - - const stringifier = stringifiers[obj.class] || stringifiers.Object; - - try { - return stringifier(obj); - } catch (e) { - DevToolsUtils.reportException("stringify", e); - return ""; - } -} - -// Used to prevent infinite recursion when an array is found inside itself. -var seen = null; - -var stringifiers = { - Error: errorStringify, - EvalError: errorStringify, - RangeError: errorStringify, - ReferenceError: errorStringify, - SyntaxError: errorStringify, - TypeError: errorStringify, - URIError: errorStringify, - Boolean: createBuiltinStringifier(Boolean), - Function: createBuiltinStringifier(Function), - Number: createBuiltinStringifier(Number), - RegExp: createBuiltinStringifier(RegExp), - String: createBuiltinStringifier(String), - Object: obj => "[object " + obj.class + "]", - Array: obj => { - // If we're at the top level then we need to create the Set for tracking - // previously stringified arrays. - const topLevel = !seen; - if (topLevel) { - seen = new Set(); - } else if (seen.has(obj)) { - return ""; - } - - seen.add(obj); - - const len = DevToolsUtils.getProperty(obj, "length"); - let string = ""; - - // The following check is only required because the debuggee could possibly - // be a Proxy and return any value. For normal objects, array.length is - // always a non-negative integer. - if (typeof len == "number" && len > 0) { - for (let i = 0; i < len; i++) { - const desc = obj.getOwnPropertyDescriptor(i); - if (desc) { - const { value } = desc; - if (value != null) { - string += isObject(value) ? stringify(value) : value; - } - } - - if (i < len - 1) { - string += ","; - } - } - } - - if (topLevel) { - seen = null; - } - - return string; - }, - DOMException: obj => { - const message = DevToolsUtils.getProperty(obj, "message") || ""; - const result = (+DevToolsUtils.getProperty(obj, "result")).toString(16); - const code = DevToolsUtils.getProperty(obj, "code"); - const name = DevToolsUtils.getProperty(obj, "name") || ""; - - return '[Exception... "' + message + '" ' + - 'code: "' + code +'" ' + - 'nsresult: "0x' + result + ' (' + name + ')"]'; - }, - Promise: obj => { - const { state, value, reason } = getPromiseState(obj); - let statePreview = state; - if (state != "pending") { - const settledValue = state === "fulfilled" ? value : reason; - statePreview += ": " + (typeof settledValue === "object" && settledValue !== null - ? stringify(settledValue) - : settledValue); - } - return "Promise (" + statePreview + ")"; - }, -}; - -/** - * Make a debuggee value for the given object, if needed. Primitive values - * are left the same. - * - * Use case: you have a raw JS object (after unsafe dereference) and you want to - * send it to the client. In that case you need to use an ObjectActor which - * requires a debuggee value. The Debugger.Object.prototype.makeDebuggeeValue() - * method works only for JS objects and functions. - * - * @param Debugger.Object obj - * @param any value - * @return object - */ -function makeDebuggeeValueIfNeeded(obj, value) { - if (value && (typeof value == "object" || typeof value == "function")) { - return obj.makeDebuggeeValue(value); - } - return value; -} - -/** - * Creates an actor for the specied "very long" string. "Very long" is specified - * at the server's discretion. - * - * @param string String - * The string. - */ -function LongStringActor(string) { - this.string = string; - this.stringLength = string.length; -} - -LongStringActor.prototype = { - actorPrefix: "longString", - - disconnect: function() { - // Because longStringActors is not a weak map, we won't automatically leave - // it so we need to manually leave on disconnect so that we don't leak - // memory. - this._releaseActor(); - }, - - /** - * Returns a grip for this actor for returning in a protocol message. - */ - grip: function() { - return { - "type": "longString", - "initial": this.string.substring( - 0, DebuggerServer.LONG_STRING_INITIAL_LENGTH), - "length": this.stringLength, - "actor": this.actorID - }; - }, - - /** - * Handle a request to extract part of this actor's string. - * - * @param request object - * The protocol request object. - */ - onSubstring: function(request) { - return { - "from": this.actorID, - "substring": this.string.substring(request.start, request.end) - }; - }, - - /** - * Handle a request to release this LongStringActor instance. - */ - onRelease: function () { - // TODO: also check if registeredPool === threadActor.threadLifetimePool - // when the web console moves aray from manually releasing pause-scoped - // actors. - this._releaseActor(); - this.registeredPool.removeActor(this); - return {}; - }, - - _releaseActor: function() { - if (this.registeredPool && this.registeredPool.longStringActors) { - delete this.registeredPool.longStringActors[this.string]; - } - } -}; - -LongStringActor.prototype.requestTypes = { - "substring": LongStringActor.prototype.onSubstring, - "release": LongStringActor.prototype.onRelease -}; - -/** - * Create a grip for the given debuggee value. If the value is an - * object, will create an actor with the given lifetime. - */ -function createValueGrip(value, pool, makeObjectGrip) { - switch (typeof value) { - case "boolean": - return value; - - case "string": - if (stringIsLong(value)) { - return longStringGrip(value, pool); - } - return value; - - case "number": - if (value === Infinity) { - return { type: "Infinity" }; - } else if (value === -Infinity) { - return { type: "-Infinity" }; - } else if (Number.isNaN(value)) { - return { type: "NaN" }; - } else if (!value && 1 / value === -Infinity) { - return { type: "-0" }; - } - return value; - - case "undefined": - return { type: "undefined" }; - - case "object": - if (value === null) { - return { type: "null" }; - } - else if (value.optimizedOut || - value.uninitialized || - value.missingArguments) { - // The slot is optimized out, an uninitialized binding, or - // arguments on a dead scope - return { - type: "null", - optimizedOut: value.optimizedOut, - uninitialized: value.uninitialized, - missingArguments: value.missingArguments - }; - } - return makeObjectGrip(value, pool); - - case "symbol": - let form = { - type: "symbol" - }; - let name = getSymbolName(value); - if (name !== undefined) { - form.name = createValueGrip(name, pool, makeObjectGrip); - } - return form; - - default: - dbg_assert(false, "Failed to provide a grip for: " + value); - return null; - } -} - -// const symbolProtoToString = Symbol.prototype.toString; - -// function getSymbolName(symbol) { -// const name = symbolProtoToString.call(symbol).slice("Symbol(".length, -1); -// return name || undefined; -// } - -/** - * Returns true if the string is long enough to use a LongStringActor instead - * of passing the value directly over the protocol. - * - * @param str String - * The string we are checking the length of. - */ -function stringIsLong(str) { - return str.length >= DebuggerServer.LONG_STRING_LENGTH; -} - -/** - * Create a grip for the given string. - * - * @param str String - * The string we are creating a grip for. - * @param pool ActorPool - * The actor pool where the new actor will be added. - */ -function longStringGrip(str, pool) { - if (!pool.longStringActors) { - pool.longStringActors = {}; - } - - if (pool.longStringActors.hasOwnProperty(str)) { - return pool.longStringActors[str].grip(); - } - - let actor = new LongStringActor(str); - pool.addActor(actor); - pool.longStringActors[str] = actor; - return actor.grip(); -} - -// exports.ObjectActor = ObjectActor; -// exports.PropertyIteratorActor = PropertyIteratorActor; -// exports.LongStringActor = LongStringActor; -// exports.createValueGrip = createValueGrip; -// exports.stringIsLong = stringIsLong; -// exports.longStringGrip = longStringGrip; diff --git a/cocos/scripting/js-bindings/script/debugger/actors/root.js b/cocos/scripting/js-bindings/script/debugger/actors/root.js deleted file mode 100644 index 4ac278f9d0f8..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/root.js +++ /dev/null @@ -1,468 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -// const { Cc, Ci, Cu } = require("chrome"); -// const Services = require("Services"); -// const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common"); -// const { DebuggerServer } = require("devtools/server/main"); - -// loader.lazyGetter(this, "ppmm", () => { -// return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(Ci.nsIMessageBroadcaster); -// }); - -/* Root actor for the remote debugging protocol. */ - -/** - * Create a remote debugging protocol root actor. - * - * @param aConnection - * The DebuggerServerConnection whose root actor we are constructing. - * - * @param aParameters - * The properties of |aParameters| provide backing objects for the root - * actor's requests; if a given property is omitted from |aParameters|, the - * root actor won't implement the corresponding requests or notifications. - * Supported properties: - * - * - tabList: a live list (see below) of tab actors. If present, the - * new root actor supports the 'listTabs' request, providing the live - * list's elements as its tab actors, and sending 'tabListChanged' - * notifications when the live list's contents change. One actor in - * this list must have a true '.selected' property. - * - * - addonList: a live list (see below) of addon actors. If present, the - * new root actor supports the 'listAddons' request, providing the live - * list's elements as its addon actors, and sending 'addonListchanged' - * notifications when the live list's contents change. - * - * - globalActorFactories: an object |A| describing further actors to - * attach to the 'listTabs' reply. This is the type accumulated by - * DebuggerServer.addGlobalActor. For each own property |P| of |A|, - * the root actor adds a property named |P| to the 'listTabs' - * reply whose value is the name of an actor constructed by - * |A[P]|. - * - * - onShutdown: a function to call when the root actor is disconnected. - * - * Instance properties: - * - * - applicationType: the string the root actor will include as the - * "applicationType" property in the greeting packet. By default, this - * is "browser". - * - * Live lists: - * - * A "live list", as used for the |tabList|, is an object that presents a - * list of actors, and also notifies its clients of changes to the list. A - * live list's interface is two properties: - * - * - getList: a method that returns a promise to the contents of the list. - * - * - onListChanged: a handler called, with no arguments, when the set of - * values the iterator would produce has changed since the last - * time 'iterator' was called. This may only be set to null or a - * callable value (one for which the typeof operator returns - * 'function'). (Note that the live list will not call the - * onListChanged handler until the list has been iterated over - * once; if nobody's seen the list in the first place, nobody - * should care if its contents have changed!) - * - * When the list changes, the list implementation should ensure that any - * actors yielded in previous iterations whose referents (tabs) still exist - * get yielded again in subsequent iterations. If the underlying referent - * is the same, the same actor should be presented for it. - * - * The root actor registers an 'onListChanged' handler on the appropriate - * list when it may need to send the client 'tabListChanged' notifications, - * and is careful to remove the handler whenever it does not need to send - * such notifications (including when it is disconnected). This means that - * live list implementations can use the state of the handler property (set - * or null) to install and remove observers and event listeners. - * - * Note that, as the only way for the root actor to see the members of the - * live list is to begin an iteration over the list, the live list need not - * actually produce any actors until they are reached in the course of - * iteration: alliterative lazy live lists. - */ - -function RootActor(aConnection, aParameters) { - this.conn = aConnection; - this._parameters = aParameters; - this._onTabListChanged = this.onTabListChanged.bind(this); - this._onAddonListChanged = this.onAddonListChanged.bind(this); - this._extraActors = {}; - - this._globalActorPool = new ActorPool(this.conn); - this.conn.addActorPool(this._globalActorPool); - - this._chromeActor = null; -} - -RootActor.prototype = { - constructor: RootActor, - applicationType: "browser", - - traits: { - sources: true, - // Whether the inspector actor allows modifying outer HTML. - editOuterHTML: true, - // Whether the inspector actor allows modifying innerHTML and inserting - // adjacent HTML. - pasteHTML: true, - // Whether the server-side highlighter actor exists and can be used to - // remotely highlight nodes (see server/actors/highlighters.js) - highlightable: true, - // Which custom highlighter does the server-side highlighter actor supports? - // (see server/actors/highlighters.js) - customHighlighters: true, - // Whether the inspector actor implements the getImageDataFromURL - // method that returns data-uris for image URLs. This is used for image - // tooltips for instance - urlToImageDataResolver: true, - networkMonitor: true, - // Whether the storage inspector actor to inspect cookies, etc. - storageInspector: true, - // Whether storage inspector is read only - storageInspectorReadOnly: true, - // Whether conditional breakpoints are supported - conditionalBreakpoints: true, - // Whether the server supports full source actors (breakpoints on - // eval scripts, etc) - debuggerSourceActors: true, - bulk: true, - // Whether the style rule actor implements the modifySelector method - // that modifies the rule's selector - selectorEditable: true, - // Whether the page style actor implements the addNewRule method that - // adds new rules to the page - addNewRule: true, - // Whether the dom node actor implements the getUniqueSelector method - getUniqueSelector: true, - // Whether the director scripts are supported - directorScripts: true, - // Whether the debugger server supports - // blackboxing/pretty-printing (not supported in Fever Dream yet) - noBlackBoxing: false, - noPrettyPrinting: false, - // Whether the page style actor implements the getUsedFontFaces method - // that returns the font faces used on a node - getUsedFontFaces: true, - // Trait added in Gecko 38, indicating that all features necessary for - // grabbing allocations from the MemoryActor are available for the performance tool - memoryActorAllocations: true, - // Added in Gecko 40, indicating that the backend isn't stupid about - // sending resumption packets on tab navigation. - noNeedToFakeResumptionOnNavigation: true, - // Added in Firefox 40. Indicates that the backend supports registering custom - // commands through the WebConsoleCommands API. - webConsoleCommands: true, - // Whether root actor exposes tab actors - // if allowChromeProcess is true, you can fetch a ChromeActor instance - // to debug chrome and any non-content ressource via getProcess request - // if allocChromeProcess is defined, but not true, it means that root actor - // no longer expose tab actors, but also that getProcess forbids - // exposing actors for security reasons - get allowChromeProcess() { - return DebuggerServer.allowChromeProcess; - }, - // Whether or not `getProfile()` supports specifying a `startTime` - // and `endTime` to filter out samples. Fx40+ - profilerDataFilterable: true, - }, - - /** - * Return a 'hello' packet as specified by the Remote Debugging Protocol. - */ - sayHello: function() { - return { - from: this.actorID, - applicationType: this.applicationType, - /* This is not in the spec, but it's used by tests. */ - testConnectionPrefix: this.conn.prefix, - traits: this.traits - }; - }, - - /** - * Disconnects the actor from the browser window. - */ - disconnect: function() { - /* Tell the live lists we aren't watching any more. */ - if (this._parameters.tabList) { - this._parameters.tabList.onListChanged = null; - } - if (this._parameters.addonList) { - this._parameters.addonList.onListChanged = null; - } - if (typeof this._parameters.onShutdown === 'function') { - this._parameters.onShutdown(); - } - this._extraActors = null; - this.conn = null; - this._tabActorPool = null; - this._globalActorPool = null; - this._parameters = null; - this._chromeActor = null; - }, - - /* The 'listTabs' request and the 'tabListChanged' notification. */ - - /** - * Handles the listTabs request. The actors will survive until at least - * the next listTabs request. - */ - onListTabs: function() { - let tabList = this._parameters.tabList; - if (!tabList) { - return { from: this.actorID, error: "noTabs", - message: "This root actor has no browser tabs." }; - } - - /* - * Walk the tab list, accumulating the array of tab actors for the - * reply, and moving all the actors to a new ActorPool. We'll - * replace the old tab actor pool with the one we build here, thus - * retiring any actors that didn't get listed again, and preparing any - * new actors to receive packets. - */ - let newActorPool = new ActorPool(this.conn); - let tabActorList = []; - let selected; - return tabList.getList().then((tabActors) => { - for (let tabActor of tabActors) { - if (tabActor.selected) { - selected = tabActorList.length; - } - tabActor.parentID = this.actorID; - newActorPool.addActor(tabActor); - tabActorList.push(tabActor); - } - /* DebuggerServer.addGlobalActor support: create actors. */ - if (!this._globalActorPool) { - this._globalActorPool = new ActorPool(this.conn); - this.conn.addActorPool(this._globalActorPool); - } - // this._createExtraActors(this._parameters.globalActorFactories, this._globalActorPool); - /* - * Drop the old actorID -> actor map. Actors that still mattered were - * added to the new map; others will go away. - */ - if (this._tabActorPool) { - this.conn.removeActorPool(this._tabActorPool); - } - this._tabActorPool = newActorPool; - this.conn.addActorPool(this._tabActorPool); - - let reply = { - "from": this.actorID, - "selected": selected || 0, - "tabs": tabActorList.map(actor => actor.form()) - }; - - /* If a root window is accessible, include its URL. */ - if (this.url) { - reply.url = this.url; - } - - /* DebuggerServer.addGlobalActor support: name actors in 'listTabs' reply. */ - // this._appendExtraActors(reply); - - /* - * Now that we're actually going to report the contents of tabList to - * the client, we're responsible for letting the client know if it - * changes. - */ - tabList.onListChanged = this._onTabListChanged; - - return reply; - }); - }, - - onGetTab: function (options) { - let tabList = this._parameters.tabList; - if (!tabList) { - return { error: "noTabs", - message: "This root actor has no browser tabs." }; - } - if (!this._tabActorPool) { - this._tabActorPool = new ActorPool(this.conn); - this.conn.addActorPool(this._tabActorPool); - } - return tabList.getTab(options) - .then(tabActor => { - tabActor.parentID = this.actorID; - this._tabActorPool.addActor(tabActor); - - return { tab: tabActor.form() }; - }, error => { - if (error.error) { - // Pipe expected errors as-is to the client - return error; - } else { - return { error: "noTab", - message: "Unexpected error while calling getTab(): " + error }; - } - }); - }, - - onTabListChanged: function () { - this.conn.send({ from: this.actorID, type:"tabListChanged" }); - /* It's a one-shot notification; no need to watch any more. */ - this._parameters.tabList.onListChanged = null; - }, - - onListAddons: function () { - let addonList = this._parameters.addonList; - if (!addonList) { - return { from: this.actorID, error: "noAddons", - message: "This root actor has no browser addons." }; - } - - return addonList.getList().then((addonActors) => { - let addonActorPool = new ActorPool(this.conn); - for (let addonActor of addonActors) { - addonActorPool.addActor(addonActor); - } - - if (this._addonActorPool) { - this.conn.removeActorPool(this._addonActorPool); - } - this._addonActorPool = addonActorPool; - this.conn.addActorPool(this._addonActorPool); - - addonList.onListChanged = this._onAddonListChanged; - - return { - "from": this.actorID, - "addons": addonActors.map(addonActor => addonActor.form()) - }; - }); - }, - - onAddonListChanged: function () { - this.conn.send({ from: this.actorID, type: "addonListChanged" }); - this._parameters.addonList.onListChanged = null; - }, - - onListProcesses: function () { - let processes = []; - for (let i = 0; i < ppmm.childCount; i++) { - processes.push({ - id: i, // XXX: may not be a perfect id, but process message manager doesn't expose anything... - parent: i == 0, // XXX Weak, but appear to be stable - tabCount: undefined, // TODO: exposes process message manager on frameloaders in order to compute this - }); - } - return { processes: processes }; - }, - - onGetProcess: function (aRequest) { - if (!DebuggerServer.allowChromeProcess) { - return { error: "forbidden", - message: "You are not allowed to debug chrome." }; - } - if (("id" in aRequest) && typeof(aRequest.id) != "number") { - return { error: "wrongParameter", - message: "getProcess requires a valid `id` attribute." }; - } - // If the request doesn't contains id parameter or id is 0 - // (id == 0, based on onListProcesses implementation) - if ((!("id" in aRequest)) || aRequest.id === 0) { - if (!this._chromeActor) { - // Create a ChromeActor for the parent process - let { ChromeActor } = require("devtools/server/actors/chrome"); - this._chromeActor = new ChromeActor(this.conn); - this._globalActorPool.addActor(this._chromeActor); - } - - return { form: this._chromeActor.form() }; - } else { - let mm = ppmm.getChildAt(aRequest.id); - if (!mm) { - return { error: "noProcess", - message: "There is no process with id '" + aRequest.id + "'." }; - } - return DebuggerServer.connectToContent(this.conn, mm) - .then(form => ({ form })); - } - }, - - /* This is not in the spec, but it's used by tests. */ - onEcho: function (aRequest) { - /* - * Request packets are frozen. Copy aRequest, so that - * DebuggerServerConnection.onPacket can attach a 'from' property. - */ - return Cu.cloneInto(aRequest, {}); - }, - - onProtocolDescription: function () { - return require("devtools/server/protocol").dumpProtocolSpec(); - }, - - /* Support for DebuggerServer.addGlobalActor. */ - // _createExtraActors: createExtraActors, - // _appendExtraActors: appendExtraActors, - - /** - * Remove the extra actor (added by DebuggerServer.addGlobalActor or - * DebuggerServer.addTabActor) name |aName|. - */ - removeActorByName: function(aName) { - if (aName in this._extraActors) { - const actor = this._extraActors[aName]; - if (this._globalActorPool.has(actor)) { - this._globalActorPool.removeActor(actor); - } - if (this._tabActorPool) { - // Iterate over TabActor instances to also remove tab actors - // created during listTabs for each document. - this._tabActorPool.forEach(tab => { - tab.removeActorByName(aName); - }); - } - delete this._extraActors[aName]; - } - } -}; - -RootActor.prototype.requestTypes = { - "listTabs": RootActor.prototype.onListTabs, - "getTab": RootActor.prototype.onGetTab, - "listAddons": RootActor.prototype.onListAddons, - "listProcesses": RootActor.prototype.onListProcesses, - "getProcess": RootActor.prototype.onGetProcess, - "echo": RootActor.prototype.onEcho, - "protocolDescription": RootActor.prototype.onProtocolDescription -}; - -// exports.RootActor = RootActor; diff --git a/cocos/scripting/js-bindings/script/debugger/actors/script.js b/cocos/scripting/js-bindings/script/debugger/actors/script.js deleted file mode 100644 index dd5a769c04c0..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/script.js +++ /dev/null @@ -1,3945 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -// const Services = require("Services"); -// const { Cc, Ci, Cu, components, ChromeWorker } = require("chrome"); -// const { ActorPool, OriginalLocation, GeneratedLocation } = require("devtools/server/actors/common"); -// const { ObjectActor, createValueGrip, longStringGrip } = require("devtools/server/actors/object"); -// const { DebuggerServer } = require("devtools/server/main"); -// const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); -const { dbg_assert, dumpn, update } = DevToolsUtils; -// const { dirname, joinURI } = require("devtools/toolkit/path"); -// const promise = require("promise"); -// const PromiseDebugging = require("PromiseDebugging"); -// const xpcInspector = require("xpcInspector"); -// const ScriptStore = require("./utils/ScriptStore"); -// const { DevToolsWorker } = require("devtools/toolkit/shared/worker.js"); - -// const { defer, resolve, reject, all } = promise; - -// loader.lazyGetter(this, "Debugger", () => { -// let Debugger = require("Debugger"); -// hackDebugger(Debugger); -// return Debugger; -// }); -// loader.lazyRequireGetter(this, "SourceMapConsumer", "source-map", true); -// loader.lazyRequireGetter(this, "SourceMapGenerator", "source-map", true); -// loader.lazyRequireGetter(this, "CssLogic", "devtools/styleinspector/css-logic", true); -// loader.lazyRequireGetter(this, "events", "sdk/event/core"); -// loader.lazyRequireGetter(this, "mapURIToAddonID", "devtools/server/actors/utils/map-uri-to-addon-id"); -// loader.lazyRequireGetter(this, "setTimeout", "sdk/timers", true); - -var fetch = function(aURL, aOptions={ loadFromCache: true }) { - let deferred = defer(); - let scheme; - let url = aURL.split(" -> ").pop(); - let charset; - let filePath = url; - let contentType; - - // try { - // scheme = Services.io.extractScheme(url); - // } catch (e) { - // In the xpcshell tests, the script url is the absolute path of the test - // file, which will make a malformed URI error be thrown. Add the file - // scheme prefix ourselves. - url = "file://" + url; - // scheme = Services.io.extractScheme(url); - // } - - try { - let jsb = globalDebuggee.jsb; - let fileUtils = jsb.fileUtils; - let source = fileUtils.getStringFromFile(filePath);//NetUtil.readInputStreamToString(aStream, aStream.available()); - if (!source) - { - deferred.reject("Request failed: " + url); - } - else - { - deferred.resolve(source); - } - } catch (ex) { - deferred.reject(ex); - } - - return deferred.promise.then(source => { - return { - // content: convertToUnicode(source, charset), - content: DevToolsUtils.utf8to16(source), - contentType: contentType - }; - }); -} - -/** - * A BreakpointActorMap is a map from locations to instances of BreakpointActor. - */ -function BreakpointActorMap() { - this._size = 0; - this._actors = {}; -} - -BreakpointActorMap.prototype = { - /** - * Return the number of BreakpointActors in this BreakpointActorMap. - * - * @returns Number - * The number of BreakpointActor in this BreakpointActorMap. - */ - get size() { - return this._size; - }, - - /** - * Generate all BreakpointActors that match the given location in - * this BreakpointActorMap. - * - * @param OriginalLocation location - * The location for which matching BreakpointActors should be generated. - */ - findActors: function* (location = new OriginalLocation()) { - // Fast shortcut for when we know we won't find any actors. Surprisingly - // enough, this speeds up refreshing when there are no breakpoints set by - // about 2x! - if (this.size === 0) { - return; - } - - function* findKeys(object, key) { - if (key !== undefined) { - if (key in object) { - yield key; - } - } - else { - for (let key of Object.keys(object)) { - yield key; - } - } - } - - let query = { - sourceActorID: location.originalSourceActor ? location.originalSourceActor.actorID : undefined, - line: location.originalLine, - }; - - // If location contains a line, assume we are searching for a whole line - // breakpoint, and set begin/endColumn accordingly. Otherwise, we are - // searching for all breakpoints, so begin/endColumn should be left unset. - if (location.originalLine) { - query.beginColumn = location.originalColumn ? location.originalColumn : 0; - query.endColumn = location.originalColumn ? location.originalColumn + 1 : Infinity; - } else { - query.beginColumn = location.originalColumn ? query.originalColumn : undefined; - query.endColumn = location.originalColumn ? query.originalColumn + 1 : undefined; - } - - for (let sourceActorID of findKeys(this._actors, query.sourceActorID)) - for (let line of findKeys(this._actors[sourceActorID], query.line)) - for (let beginColumn of findKeys(this._actors[sourceActorID][line], query.beginColumn)) - for (let endColumn of findKeys(this._actors[sourceActorID][line][beginColumn], query.endColumn)) { - yield this._actors[sourceActorID][line][beginColumn][endColumn]; - } - }, - - /** - * Return the BreakpointActor at the given location in this - * BreakpointActorMap. - * - * @param OriginalLocation location - * The location for which the BreakpointActor should be returned. - * - * @returns BreakpointActor actor - * The BreakpointActor at the given location. - */ - getActor: function (originalLocation) { - for (let actor of this.findActors(originalLocation)) { - return actor; - } - - return null; - }, - - /** - * Set the given BreakpointActor to the given location in this - * BreakpointActorMap. - * - * @param OriginalLocation location - * The location to which the given BreakpointActor should be set. - * - * @param BreakpointActor actor - * The BreakpointActor to be set to the given location. - */ - setActor: function (location, actor) { - let { originalSourceActor, originalLine, originalColumn } = location; - - let sourceActorID = originalSourceActor.actorID; - let line = originalLine; - let beginColumn = originalColumn ? originalColumn : 0; - let endColumn = originalColumn ? originalColumn + 1 : Infinity; - - if (!this._actors[sourceActorID]) { - this._actors[sourceActorID] = []; - } - if (!this._actors[sourceActorID][line]) { - this._actors[sourceActorID][line] = []; - } - if (!this._actors[sourceActorID][line][beginColumn]) { - this._actors[sourceActorID][line][beginColumn] = []; - } - if (!this._actors[sourceActorID][line][beginColumn][endColumn]) { - ++this._size; - } - this._actors[sourceActorID][line][beginColumn][endColumn] = actor; - }, - - /** - * Delete the BreakpointActor from the given location in this - * BreakpointActorMap. - * - * @param OriginalLocation location - * The location from which the BreakpointActor should be deleted. - */ - deleteActor: function (location) { - let { originalSourceActor, originalLine, originalColumn } = location; - - let sourceActorID = originalSourceActor.actorID; - let line = originalLine; - let beginColumn = originalColumn ? originalColumn : 0; - let endColumn = originalColumn ? originalColumn + 1 : Infinity; - - if (this._actors[sourceActorID]) { - if (this._actors[sourceActorID][line]) { - if (this._actors[sourceActorID][line][beginColumn]) { - if (this._actors[sourceActorID][line][beginColumn][endColumn]) { - --this._size; - } - delete this._actors[sourceActorID][line][beginColumn][endColumn]; - if (Object.keys(this._actors[sourceActorID][line][beginColumn]).length === 0) { - delete this._actors[sourceActorID][line][beginColumn]; - } - } - if (Object.keys(this._actors[sourceActorID][line]).length === 0) { - delete this._actors[sourceActorID][line]; - } - } - } - } -}; - -exports.BreakpointActorMap = BreakpointActorMap; - -/** - * Keeps track of persistent sources across reloads and ties different - * source instances to the same actor id so that things like - * breakpoints survive reloads. ThreadSources uses this to force the - * same actorID on a SourceActor. - */ -function SourceActorStore() { - // source identifier --> actor id - this._sourceActorIds = Object.create(null); -} - -SourceActorStore.prototype = { - /** - * Lookup an existing actor id that represents this source, if available. - */ - getReusableActorId: function(aSource, aOriginalUrl) { - let url = this.getUniqueKey(aSource, aOriginalUrl); - if (url && url in this._sourceActorIds) { - return this._sourceActorIds[url]; - } - return null; - }, - - /** - * Update a source with an actorID. - */ - setReusableActorId: function(aSource, aOriginalUrl, actorID) { - let url = this.getUniqueKey(aSource, aOriginalUrl); - if (url) { - this._sourceActorIds[url] = actorID; - } - }, - - /** - * Make a unique URL from a source that identifies it across reloads. - */ - getUniqueKey: function(aSource, aOriginalUrl) { - if (aOriginalUrl) { - // Original source from a sourcemap. - return aOriginalUrl; - } - else { - return getSourceURL(aSource); - } - } -}; - -exports.SourceActorStore = SourceActorStore; - -/** - * Manages pushing event loops and automatically pops and exits them in the - * correct order as they are resolved. - * - * @param ThreadActor thread - * The thread actor instance that owns this EventLoopStack. - * @param DebuggerServerConnection connection - * The remote protocol connection associated with this event loop stack. - * @param Object hooks - * An object with the following properties: - * - url: The URL string of the debuggee we are spinning an event loop - * for. - * - preNest: function called before entering a nested event loop - * - postNest: function called after exiting a nested event loop - */ -function EventLoopStack({ thread, connection, hooks }) { - this._hooks = hooks; - this._thread = thread; - this._connection = connection; -} - -EventLoopStack.prototype = { - /** - * The number of nested event loops on the stack. - */ - get size() { - // return xpcInspector.eventLoopNestLevel; - return _getEventLoopNestLevel(); - }, - - /** - * The URL of the debuggee who pushed the event loop on top of the stack. - */ - get lastPausedUrl() { - let url = null; - if (this.size > 0) { - try { - url = xpcInspector.lastNestRequestor.url - } catch (e) { - // The tab's URL getter may throw if the tab is destroyed by the time - // this code runs, but we don't really care at this point. - dumpn(e); - } - } - return url; - }, - - /** - * The DebuggerServerConnection of the debugger who pushed the event loop on - * top of the stack - */ - get lastConnection() { - return xpcInspector.lastNestRequestor._connection; - }, - - /** - * Push a new nested event loop onto the stack. - * - * @returns EventLoop - */ - push: function () { - return new EventLoop({ - thread: this._thread, - connection: this._connection, - hooks: this._hooks - }); - } -}; - -/** - * An object that represents a nested event loop. It is used as the nest - * requestor with nsIJSInspector instances. - * - * @param ThreadActor thread - * The thread actor that is creating this nested event loop. - * @param DebuggerServerConnection connection - * The remote protocol connection associated with this event loop. - * @param Object hooks - * The same hooks object passed into EventLoopStack during its - * initialization. - */ -function EventLoop({ thread, connection, hooks }) { - this._thread = thread; - this._hooks = hooks; - this._connection = connection; - - this.enter = this.enter.bind(this); - this.resolve = this.resolve.bind(this); -} - -EventLoop.prototype = { - entered: false, - resolved: false, - get url() { return this._hooks.url; }, - - /** - * Enter this nested event loop. - */ - enter: function () { - let nestData = this._hooks.preNest - ? this._hooks.preNest() - : null; - - this.entered = true; - // xpcInspector.enterNestedEventLoop(this); - _enterNestedEventLoop(); - - // Keep exiting nested event loops while the last requestor is resolved. - // if (xpcInspector.eventLoopNestLevel > 0) { - // const { resolved } = xpcInspector.lastNestRequestor; - // if (resolved) { - // xpcInspector.exitNestedEventLoop(); - // } - // } - - dbg_assert(this._thread.state === "running", - "Should be in the running state"); - - if (this._hooks.postNest) { - this._hooks.postNest(nestData); - } - }, - - /** - * Resolve this nested event loop. - * - * @returns boolean - * True if we exited this nested event loop because it was on top of - * the stack, false if there is another nested event loop above this - * one that hasn't resolved yet. - */ - resolve: function () { - if (!this.entered) { - throw new Error("Can't resolve an event loop before it has been entered!"); - } - if (this.resolved) { - throw new Error("Already resolved this nested event loop!"); - } - this.resolved = true; - // if (this === xpcInspector.lastNestRequestor) - { - // xpcInspector.exitNestedEventLoop(); - _exitNestedEventLoop(); - return true; - } - return false; - }, -}; - -/** - * JSD2 actors. - */ - -/** - * Creates a ThreadActor. - * - * ThreadActors manage a JSInspector object and manage execution/inspection - * of debuggees. - * - * @param aParent object - * This |ThreadActor|'s parent actor. It must implement the following - * properties: - * - url: The URL string of the debuggee. - * - window: The global window object. - * - preNest: Function called before entering a nested event loop. - * - postNest: Function called after exiting a nested event loop. - * - makeDebugger: A function that takes no arguments and instantiates - * a Debugger that manages its globals on its own. - * @param aGlobal object [optional] - * An optional (for content debugging only) reference to the content - * window. - */ -function ThreadActor(aParent, aGlobal) -{ - this._state = "detached"; - this._frameActors = []; - this._parent = aParent; - this._dbg = null; - this._gripDepth = 0; - this._threadLifetimePool = null; - this._tabClosed = false; - this._scripts = null; - this._pauseOnDOMEvents = null; - - this._options = { - useSourceMaps: false, - autoBlackBox: false - }; - - this.breakpointActorMap = new BreakpointActorMap(); - this.sourceActorStore = new SourceActorStore(); - - this._debuggerSourcesSeen = null; - - // A map of actorID -> actor for breakpoints created and managed by the - // server. - this._hiddenBreakpoints = new Map(); - - this.global = aGlobal; - - this._allEventsListener = this._allEventsListener.bind(this); - this.onNewGlobal = this.onNewGlobal.bind(this); - this.onNewSource = this.onNewSource.bind(this); - this.uncaughtExceptionHook = this.uncaughtExceptionHook.bind(this); - this.onDebuggerStatement = this.onDebuggerStatement.bind(this); - this.onNewScript = this.onNewScript.bind(this); - this.objectGrip = this.objectGrip.bind(this); - this.pauseObjectGrip = this.pauseObjectGrip.bind(this); - this._onWindowReady = this._onWindowReady.bind(this); - // events.on(this._parent, "window-ready", this._onWindowReady); - // Set a wrappedJSObject property so |this| can be sent via the observer svc - // for the xpcshell harness. - this.wrappedJSObject = this; -} - -ThreadActor.prototype = { - // Used by the ObjectActor to keep track of the depth of grip() calls. - _gripDepth: null, - - actorPrefix: "context", - - get dbg() { - if (!this._dbg) { - this._dbg = this._parent.makeDebugger(); - this._dbg.uncaughtExceptionHook = this.uncaughtExceptionHook; - this._dbg.onDebuggerStatement = this.onDebuggerStatement; - this._dbg.onNewScript = this.onNewScript; - // this._dbg.on("newGlobal", this.onNewGlobal); - // Keep the debugger disabled until a client attaches. - this._dbg.enabled = this._state != "detached"; - } - return this._dbg; - }, - - get globalDebugObject() { - if (!this._parent.window) { - return null; - } - return this.dbg.makeGlobalObjectReference(this._parent.window); - }, - - get state() { - return this._state; - }, - - get attached() { - return this.state == "attached" || - this.state == "running" || - this.state == "paused"; - }, - - get threadLifetimePool() { - if (!this._threadLifetimePool) { - this._threadLifetimePool = new ActorPool(this.conn); - this.conn.addActorPool(this._threadLifetimePool); - this._threadLifetimePool.objectActors = new WeakMap(); - } - return this._threadLifetimePool; - }, - - get scripts() { - if (!this._scripts) { - this._scripts = new ScriptStore(); - this._scripts.addScripts(this.dbg.findScripts()); - } - return this._scripts; - }, - - get sources() { - return this._parent.sources; - }, - - get youngestFrame() { - if (this.state != "paused") { - return null; - } - return this.dbg.getNewestFrame(); - }, - - _prettyPrintWorker: null, - get prettyPrintWorker() { - if (!this._prettyPrintWorker) { - this._prettyPrintWorker = new DevToolsWorker( - "resource://gre/modules/devtools/server/actors/pretty-print-worker.js", - { name: "pretty-print", - verbose: dumpn.wantLogging } - ); - } - return this._prettyPrintWorker; - }, - - /** - * Keep track of all of the nested event loops we use to pause the debuggee - * when we hit a breakpoint/debugger statement/etc in one place so we can - * resolve them when we get resume packets. We have more than one (and keep - * them in a stack) because we can pause within client evals. - */ - _threadPauseEventLoops: null, - _pushThreadPause: function () { - if (!this._threadPauseEventLoops) { - this._threadPauseEventLoops = []; - } - const eventLoop = this._nestedEventLoops.push(); - this._threadPauseEventLoops.push(eventLoop); - eventLoop.enter(); - }, - _popThreadPause: function () { - const eventLoop = this._threadPauseEventLoops.pop(); - dbg_assert(eventLoop, "Should have an event loop."); - eventLoop.resolve(); - }, - - /** - * Remove all debuggees and clear out the thread's sources. - */ - clearDebuggees: function () { - if (this._dbg) { - this.dbg.removeAllDebuggees(); - } - this._sources = null; - this._scripts = null; - }, - - /** - * Listener for our |Debugger|'s "newGlobal" event. - */ - onNewGlobal: function (aGlobal) { - // Notify the client. - this.conn.send({ - from: this.actorID, - type: "newGlobal", - // TODO: after bug 801084 lands see if we need to JSONify this. - hostAnnotations: aGlobal.hostAnnotations - }); - }, - - disconnect: function () { - dumpn("in ThreadActor.prototype.disconnect"); - if (this._state == "paused") { - this.onResume(); - } - - // Blow away our source actor ID store because those IDs are only - // valid for this connection. This is ok because we never keep - // things like breakpoints across connections. - this._sourceActorStore = null; - - // events.off(this._parent, "window-ready", this._onWindowReady); - this.clearDebuggees(); - this.conn.removeActorPool(this._threadLifetimePool); - this._threadLifetimePool = null; - - if (this._prettyPrintWorker) { - this._prettyPrintWorker.destroy(); - this._prettyPrintWorker = null; - } - - if (!this._dbg) { - return; - } - this._dbg.enabled = false; - this._dbg = null; - }, - - /** - * Disconnect the debugger and put the actor in the exited state. - */ - exit: function () { - this.disconnect(); - this._state = "exited"; - }, - - // Request handlers - onAttach: function (aRequest) { - if (this.state === "exited") { - return { type: "exited" }; - } - - if (this.state !== "detached") { - return { error: "wrongState", - message: "Current state is " + this.state }; - } - - this._state = "attached"; - this._debuggerSourcesSeen = new Set(); - - update(this._options, aRequest.options || {}); - this.sources.reconfigure(this._options); - this.sources.on('newSource', (name, source) => { - this.onNewSource(source); - }); - - // Initialize an event loop stack. This can't be done in the constructor, - // because this.conn is not yet initialized by the actor pool at that time. - this._nestedEventLoops = new EventLoopStack({ - hooks: this._parent, - connection: this.conn, - thread: this - }); - - // this.dbg.addDebuggees(); - this.dbg.enabled = true; - try { - // Put ourselves in the paused state. - let packet = this._paused(); - if (!packet) { - return { error: "notAttached" }; - } - packet.why = { type: "attached" }; - - this._restoreBreakpoints(); - - // Send the response to the attach request now (rather than - // returning it), because we're going to start a nested event loop - // here. - this.conn.send(packet); - - // Start a nested event loop. - this._pushThreadPause(); - - // We already sent a response to this request, don't send one - // now. - return null; - } catch (e) { - reportError(e); - return { error: "notAttached", message: e.toString() }; - } - }, - - onDetach: function (aRequest) { - this.disconnect(); - this._state = "detached"; - this._debuggerSourcesSeen = null; - - DevToolsUtils.dumpn("ThreadActor.prototype.onDetach: returning 'detached' packet"); - return { - type: "detached" - }; - }, - - onReconfigure: function (aRequest) { - if (this.state == "exited") { - return { error: "wrongState" }; - } - - update(this._options, aRequest.options || {}); - // Update the global source store - this.sources.reconfigure(this._options); - - return {}; - }, - - /** - * Pause the debuggee, by entering a nested event loop, and return a 'paused' - * packet to the client. - * - * @param Debugger.Frame aFrame - * The newest debuggee frame in the stack. - * @param object aReason - * An object with a 'type' property containing the reason for the pause. - * @param function onPacket - * Hook to modify the packet before it is sent. Feel free to return a - * promise. - */ - _pauseAndRespond: function (aFrame, aReason, onPacket=function (k) { return k; }) { - try { - let packet = this._paused(aFrame); - if (!packet) { - return undefined; - } - packet.why = aReason; - - let generatedLocation = this.sources.getFrameLocation(aFrame); - this.sources.getOriginalLocation(generatedLocation) - .then((originalLocation) => { - if (!originalLocation.originalSourceActor) { - // The only time the source actor will be null is if there - // was a sourcemap and it tried to look up the original - // location but there was no original URL. This is a strange - // scenario so we simply don't pause. - DevToolsUtils.reportException( - 'ThreadActor', - new Error('Attempted to pause in a script with a sourcemap but ' + - 'could not find original location.') - ); - - return undefined; - } - - packet.frame.where = { - source: originalLocation.originalSourceActor.form(), - line: originalLocation.originalLine, - column: originalLocation.originalColumn - }; - resolve(onPacket(packet)) - .then(null, error => { - reportError(error); - return { - error: "unknownError", - message: error.message + "\n" + error.stack - }; - }) - .then(packet => { - this.conn.send(packet); - }); - }); - - this._pushThreadPause(); - } catch(e) { - reportError(e, "Got an exception during TA__pauseAndRespond: "); - } - - // If the browser tab has been closed, terminate the debuggee script - // instead of continuing. Executing JS after the content window is gone is - // a bad idea. - return this._tabClosed ? null : undefined; - }, - - /** - * Handle resume requests that include a forceCompletion request. - * - * @param Object aRequest - * The request packet received over the RDP. - * @returns A response packet. - */ - _forceCompletion: function (aRequest) { - // TODO: remove this when Debugger.Frame.prototype.pop is implemented in - // bug 736733. - return { - error: "notImplemented", - message: "forced completion is not yet implemented." - }; - }, - - _makeOnEnterFrame: function ({ pauseAndRespond }) { - return aFrame => { - const generatedLocation = this.sources.getFrameLocation(aFrame); - let { originalSourceActor } = this.unsafeSynchronize(this.sources.getOriginalLocation( - generatedLocation)); - let url = originalSourceActor.url; - - return this.sources.isBlackBoxed(url) - ? undefined - : pauseAndRespond(aFrame); - }; - }, - - _makeOnPop: function ({ thread, pauseAndRespond, createValueGrip }) { - return function (aCompletion) { - // onPop is called with 'this' set to the current frame. - - const generatedLocation = thread.sources.getFrameLocation(this); - const { originalSourceActor } = thread.unsafeSynchronize(thread.sources.getOriginalLocation( - generatedLocation)); - const url = originalSourceActor.url; - - if (thread.sources.isBlackBoxed(url)) { - return undefined; - } - - // Note that we're popping this frame; we need to watch for - // subsequent step events on its caller. - this.reportedPop = true; - - return pauseAndRespond(this, aPacket => { - aPacket.why.frameFinished = {}; - if (!aCompletion) { - aPacket.why.frameFinished.terminated = true; - } else if (aCompletion.hasOwnProperty("return")) { - aPacket.why.frameFinished.return = createValueGrip(aCompletion.return); - } else if (aCompletion.hasOwnProperty("yield")) { - aPacket.why.frameFinished.return = createValueGrip(aCompletion.yield); - } else { - aPacket.why.frameFinished.throw = createValueGrip(aCompletion.throw); - } - return aPacket; - }); - }; - }, - - _makeOnStep: function ({ thread, pauseAndRespond, startFrame, - startLocation, steppingType }) { - // Breaking in place: we should always pause. - if (steppingType === "break") { - return function () { - return pauseAndRespond(this); - }; - } - - // Otherwise take what a "step" means into consideration. - return function () { - // onStep is called with 'this' set to the current frame. - - const generatedLocation = thread.sources.getFrameLocation(this); - const newLocation = thread.unsafeSynchronize(thread.sources.getOriginalLocation( - generatedLocation)); - - // Cases when we should pause because we have executed enough to consider - // a "step" to have occurred: - // - // 1.1. We change frames. - // 1.2. We change URLs (can happen without changing frames thanks to - // source mapping). - // 1.3. We change lines. - // - // Cases when we should always continue execution, even if one of the - // above cases is true: - // - // 2.1. We are in a source mapped region, but inside a null mapping - // (doesn't correlate to any region of original source) - // 2.2. The source we are in is black boxed. - - // Cases 2.1 and 2.2 - if (newLocation.originalUrl == null - || thread.sources.isBlackBoxed(newLocation.originalUrl)) { - return undefined; - } - - // Cases 1.1, 1.2 and 1.3 - if (this !== startFrame - || startLocation.originalUrl !== newLocation.originalUrl - || startLocation.originalLine !== newLocation.originalLine) { - return pauseAndRespond(this); - } - - // Otherwise, let execution continue (we haven't executed enough code to - // consider this a "step" yet). - return undefined; - }; - }, - - /** - * Define the JS hook functions for stepping. - */ - _makeSteppingHooks: function (aStartLocation, steppingType) { - // Bind these methods and state because some of the hooks are called - // with 'this' set to the current frame. Rather than repeating the - // binding in each _makeOnX method, just do it once here and pass it - // in to each function. - const steppingHookState = { - pauseAndRespond: (aFrame, onPacket=k=>k) => { - return this._pauseAndRespond(aFrame, { type: "resumeLimit" }, onPacket); - }, - createValueGrip: v => createValueGrip(v, this._pausePool, - this.objectGrip), - thread: this, - startFrame: this.youngestFrame, - startLocation: aStartLocation, - steppingType: steppingType - }; - - return { - onEnterFrame: this._makeOnEnterFrame(steppingHookState), - onPop: this._makeOnPop(steppingHookState), - onStep: this._makeOnStep(steppingHookState) - }; - }, - - /** - * Handle attaching the various stepping hooks we need to attach when we - * receive a resume request with a resumeLimit property. - * - * @param Object aRequest - * The request packet received over the RDP. - * @returns A promise that resolves to true once the hooks are attached, or is - * rejected with an error packet. - */ - _handleResumeLimit: function (aRequest) { - let steppingType = aRequest.resumeLimit.type; - if (["break", "step", "next", "finish"].indexOf(steppingType) == -1) { - return reject({ error: "badParameterType", - message: "Unknown resumeLimit type" }); - } - - const generatedLocation = this.sources.getFrameLocation(this.youngestFrame); - return this.sources.getOriginalLocation(generatedLocation) - .then(originalLocation => { - const { onEnterFrame, onPop, onStep } = this._makeSteppingHooks(originalLocation, - steppingType); - - // Make sure there is still a frame on the stack if we are to continue - // stepping. - let stepFrame = this._getNextStepFrame(this.youngestFrame); - if (stepFrame) { - switch (steppingType) { - case "step": - this.dbg.onEnterFrame = onEnterFrame; - // Fall through. - case "break": - case "next": - if (stepFrame.script) { - stepFrame.onStep = onStep; - } - stepFrame.onPop = onPop; - break; - case "finish": - stepFrame.onPop = onPop; - } - } - - return true; - }); - }, - - /** - * Clear the onStep and onPop hooks from the given frame and all of the frames - * below it. - * - * @param Debugger.Frame aFrame - * The frame we want to clear the stepping hooks from. - */ - _clearSteppingHooks: function (aFrame) { - if (aFrame && aFrame.live) { - while (aFrame) { - aFrame.onStep = undefined; - aFrame.onPop = undefined; - aFrame = aFrame.older; - } - } - }, - - /** - * Listen to the debuggee's DOM events if we received a request to do so. - * - * @param Object aRequest - * The resume request packet received over the RDP. - */ - _maybeListenToEvents: function (aRequest) { - // Break-on-DOMEvents is only supported in content debugging. - let events = aRequest.pauseOnDOMEvents; - if (this.global && events && - (events == "*" || - (Array.isArray(events) && events.length))) { - this._pauseOnDOMEvents = events; - let els = Cc["@mozilla.org/eventlistenerservice;1"] - .getService(Ci.nsIEventListenerService); - els.addListenerForAllEvents(this.global, this._allEventsListener, true); - } - }, - - /** - * If we are tasked with breaking on the load event, we have to add the - * listener early enough. - */ - _onWindowReady: function () { - this._maybeListenToEvents({ - pauseOnDOMEvents: this._pauseOnDOMEvents - }); - }, - - /** - * Handle a protocol request to resume execution of the debuggee. - */ - onResume: function (aRequest) { - if (this._state !== "paused") { - return { - error: "wrongState", - message: "Can't resume when debuggee isn't paused. Current state is '" - + this._state + "'" - }; - } - - // In case of multiple nested event loops (due to multiple debuggers open in - // different tabs or multiple debugger clients connected to the same tab) - // only allow resumption in a LIFO order. - if (this._nestedEventLoops.size && this._nestedEventLoops.lastPausedUrl - && (this._nestedEventLoops.lastPausedUrl !== this._parent.url - || this._nestedEventLoops.lastConnection !== this.conn)) { - return { - error: "wrongOrder", - message: "trying to resume in the wrong order.", - lastPausedUrl: this._nestedEventLoops.lastPausedUrl - }; - } - - if (aRequest && aRequest.forceCompletion) { - return this._forceCompletion(aRequest); - } - - let resumeLimitHandled; - if (aRequest && aRequest.resumeLimit) { - resumeLimitHandled = this._handleResumeLimit(aRequest) - } else { - this._clearSteppingHooks(this.youngestFrame); - resumeLimitHandled = resolve(true); - } - - return resumeLimitHandled.then(() => { - if (aRequest) { - this._options.pauseOnExceptions = aRequest.pauseOnExceptions; - this._options.ignoreCaughtExceptions = aRequest.ignoreCaughtExceptions; - this.maybePauseOnExceptions(); - this._maybeListenToEvents(aRequest); - } - - let packet = this._resumed(); - this._popThreadPause(); - // Tell anyone who cares of the resume (as of now, that's the xpcshell - // harness) - // if (Services.obs) { - // Services.obs.notifyObservers(this, "devtools-thread-resumed", null); - // } - return packet; - }, error => { - return error instanceof Error - ? { error: "unknownError", - message: DevToolsUtils.safeErrorString(error) } - // It is a known error, and the promise was rejected with an error - // packet. - : error; - }); - }, - - /** - * Spin up a nested event loop so we can synchronously resolve a promise. - * - * DON'T USE THIS UNLESS YOU ABSOLUTELY MUST! Nested event loops suck: the - * world's state can change out from underneath your feet because JS is no - * longer run-to-completion. - * - * @param aPromise - * The promise we want to resolve. - * @returns The promise's resolution. - */ - unsafeSynchronize: function(aPromise) { - let needNest = true; - let eventLoop; - let returnVal; - - aPromise - .then((aResolvedVal) => { - needNest = false; - returnVal = aResolvedVal; - }) - .then(null, (aError) => { - reportError(aError, "Error inside unsafeSynchronize:"); - }) - .then(() => { - if (eventLoop) { - eventLoop.resolve(); - } - }); - - if (needNest) { - eventLoop = this._nestedEventLoops.push(); - eventLoop.enter(); - } - - return returnVal; - }, - - /** - * Set the debugging hook to pause on exceptions if configured to do so. - */ - maybePauseOnExceptions: function() { - if (this._options.pauseOnExceptions) { - this.dbg.onExceptionUnwind = this.onExceptionUnwind.bind(this); - } - }, - - /** - * A listener that gets called for every event fired on the page, when a list - * of interesting events was provided with the pauseOnDOMEvents property. It - * is used to set server-managed breakpoints on any existing event listeners - * for those events. - * - * @param Event event - * The event that was fired. - */ - _allEventsListener: function(event) { - if (this._pauseOnDOMEvents == "*" || - this._pauseOnDOMEvents.indexOf(event.type) != -1) { - for (let listener of this._getAllEventListeners(event.target)) { - if (event.type == listener.type || this._pauseOnDOMEvents == "*") { - this._breakOnEnter(listener.script); - } - } - } - }, - - /** - * Return an array containing all the event listeners attached to the - * specified event target and its ancestors in the event target chain. - * - * @param EventTarget eventTarget - * The target the event was dispatched on. - * @returns Array - */ - _getAllEventListeners: function(eventTarget) { - let els = Cc["@mozilla.org/eventlistenerservice;1"] - .getService(Ci.nsIEventListenerService); - - let targets = els.getEventTargetChainFor(eventTarget); - let listeners = []; - - for (let target of targets) { - let handlers = els.getListenerInfoFor(target); - for (let handler of handlers) { - // Null is returned for all-events handlers, and native event listeners - // don't provide any listenerObject, which makes them not that useful to - // a JS debugger. - if (!handler || !handler.listenerObject || !handler.type) - continue; - // Create a listener-like object suitable for our purposes. - let l = Object.create(null); - l.type = handler.type; - let listener = handler.listenerObject; - let listenerDO = this.globalDebugObject.makeDebuggeeValue(listener); - // If the listener is an object with a 'handleEvent' method, use that. - if (listenerDO.class == "Object" || listenerDO.class == "XULElement") { - // For some events we don't have permission to access the - // 'handleEvent' property when running in content scope. - if (!listenerDO.unwrap()) { - continue; - } - let heDesc; - while (!heDesc && listenerDO) { - heDesc = listenerDO.getOwnPropertyDescriptor("handleEvent"); - listenerDO = listenerDO.proto; - } - if (heDesc && heDesc.value) { - listenerDO = heDesc.value; - } - } - // When the listener is a bound function, we are actually interested in - // the target function. - while (listenerDO.isBoundFunction) { - listenerDO = listenerDO.boundTargetFunction; - } - l.script = listenerDO.script; - // Chrome listeners won't be converted to debuggee values, since their - // compartment is not added as a debuggee. - if (!l.script) - continue; - listeners.push(l); - } - } - return listeners; - }, - - /** - * Set a breakpoint on the first line of the given script that has an entry - * point. - */ - _breakOnEnter: function(script) { - let offsets = script.getAllOffsets(); - for (let line = 0, n = offsets.length; line < n; line++) { - if (offsets[line]) { - // N.B. Hidden breakpoints do not have an original location, and are not - // stored in the breakpoint actor map. - let actor = new BreakpointActor(this); - this.threadLifetimePool.addActor(actor); - let scripts = this.scripts.getScriptsBySourceAndLine(script.source, line); - let entryPoints = findEntryPointsForLine(scripts, line); - setBreakpointAtEntryPoints(actor, entryPoints); - this._hiddenBreakpoints.set(actor.actorID, actor); - break; - } - } - }, - - /** - * Helper method that returns the next frame when stepping. - */ - _getNextStepFrame: function (aFrame) { - let stepFrame = aFrame.reportedPop ? aFrame.older : aFrame; - if (!stepFrame || !stepFrame.script) { - stepFrame = null; - } - return stepFrame; - }, - - onClientEvaluate: function (aRequest) { - if (this.state !== "paused") { - return { error: "wrongState", - message: "Debuggee must be paused to evaluate code." }; - } - - let frame = this._requestFrame(aRequest.frame); - if (!frame) { - return { error: "unknownFrame", - message: "Evaluation frame not found" }; - } - - if (!frame.environment) { - return { error: "notDebuggee", - message: "cannot access the environment of this frame." }; - } - - let youngest = this.youngestFrame; - - // Put ourselves back in the running state and inform the client. - let resumedPacket = this._resumed(); - this.conn.send(resumedPacket); - - // Run the expression. - // XXX: test syntax errors - let completion = frame.eval(aRequest.expression); - - // Put ourselves back in the pause state. - let packet = this._paused(youngest); - packet.why = { type: "clientEvaluated", - frameFinished: this.createProtocolCompletionValue(completion) }; - - // Return back to our previous pause's event loop. - return packet; - }, - - onFrames: function (aRequest) { - if (this.state !== "paused") { - return { error: "wrongState", - message: "Stack frames are only available while the debuggee is paused."}; - } - - let start = aRequest.start ? aRequest.start : 0; - let count = aRequest.count; - - // Find the starting frame... - let frame = this.youngestFrame; - let i = 0; - while (frame && (i < start)) { - frame = frame.older; - i++; - } - - // Return request.count frames, or all remaining - // frames if count is not defined. - let frames = []; - let promises = []; - for (; frame && (!count || i < (start + count)); i++, frame=frame.older) { - let form = this._createFrameActor(frame).form(); - form.depth = i; - frames.push(form); - - let promise = this.sources.getOriginalLocation(new GeneratedLocation( - this.sources.createNonSourceMappedActor(frame.script.source), - form.where.line, - form.where.column - )).then((originalLocation) => { - let sourceForm = originalLocation.originalSourceActor.form(); - form.where = { - source: sourceForm, - line: originalLocation.originalLine, - column: originalLocation.originalColumn - }; - form.source = sourceForm; - }); - promises.push(promise); - } - - return all(promises).then(function () { - return { frames: frames }; - }); - }, - - onReleaseMany: function (aRequest) { - if (!aRequest.actors) { - return { error: "missingParameter", - message: "no actors were specified" }; - } - - let res; - for (let actorID of aRequest.actors) { - let actor = this.threadLifetimePool.get(actorID); - if (!actor) { - if (!res) { - res = { error: "notReleasable", - message: "Only thread-lifetime actors can be released." }; - } - continue; - } - actor.onRelease(); - } - return res ? res : {}; - }, - - /** - * Get the script and source lists from the debugger. - */ - _discoverSources: function () { - // Only get one script per Debugger.Source. - const sourcesToScripts = new Map(); - const scripts = this.scripts.getAllScripts(); - for (let i = 0, len = scripts.length; i < len; i++) { - let s = scripts[i]; - if (s.source && s.source.url) { - sourcesToScripts.set(s.source, s); - } - } - - // let arr = []; - // for (let [key, script] of sourcesToScripts) { - // arr.push(this.sources.createSourceActors(script.source)); - // } - // return all(arr); - return all([...sourcesToScripts.values()].map(script => { - return this.sources.createSourceActors(script.source); - })); - }, - - onSources: function (aRequest) { - // let promise = this._discoverSources(); - return this._discoverSources().then(() => { - // No need to flush the new source packets here, as we are sending the - // list of sources out immediately and we don't need to invoke the - // overhead of an RDP packet for every source right now. Let the default - // timeout flush the buffered packets. - - return { - sources: this.sources.iter().map(s => s.form()) - }; - }); - // return this._discoverSources().then(() => { - // // No need to flush the new source packets here, as we are sending the - // // list of sources out immediately and we don't need to invoke the - // // overhead of an RDP packet for every source right now. Let the default - // // timeout flush the buffered packets. - - // return { - // sources: this.sources.iter().map(s => s.form()) - // }; - // }); - }, - - /** - * Disassociate all breakpoint actors from their scripts and clear the - * breakpoint handlers. This method can be used when the thread actor intends - * to keep the breakpoint store, but needs to clear any actual breakpoints, - * e.g. due to a page navigation. This way the breakpoint actors' script - * caches won't hold on to the Debugger.Script objects leaking memory. - */ - disableAllBreakpoints: function () { - for (let bpActor of this.breakpointActorMap.findActors()) { - bpActor.removeScripts(); - } - }, - - - /** - * Handle a protocol request to pause the debuggee. - */ - onInterrupt: function (aRequest) { - if (this.state == "exited") { - return { type: "exited" }; - } else if (this.state == "paused") { - // TODO: return the actual reason for the existing pause. - return { type: "paused", why: { type: "alreadyPaused" } }; - } else if (this.state != "running") { - return { error: "wrongState", - message: "Received interrupt request in " + this.state + - " state." }; - } - - try { - // If execution should pause just before the next JavaScript bytecode is - // executed, just set an onEnterFrame handler. - if (aRequest.when == "onNext") { - let onEnterFrame = (aFrame) => { - return this._pauseAndRespond(aFrame, { type: "interrupted", onNext: true }); - }; - this.dbg.onEnterFrame = onEnterFrame; - - return { type: "willInterrupt" }; - } - - // If execution should pause immediately, just put ourselves in the paused - // state. - let packet = this._paused(); - if (!packet) { - return { error: "notInterrupted" }; - } - packet.why = { type: "interrupted" }; - - // Send the response to the interrupt request now (rather than - // returning it), because we're going to start a nested event loop - // here. - this.conn.send(packet); - - // Start a nested event loop. - this._pushThreadPause(); - - // We already sent a response to this request, don't send one - // now. - return null; - } catch (e) { - reportError(e); - return { error: "notInterrupted", message: e.toString() }; - } - }, - - /** - * Handle a protocol request to retrieve all the event listeners on the page. - */ - onEventListeners: function (aRequest) { - // This request is only supported in content debugging. - if (!this.global) { - return { - error: "notImplemented", - message: "eventListeners request is only supported in content debugging" - }; - } - - let els = Cc["@mozilla.org/eventlistenerservice;1"] - .getService(Ci.nsIEventListenerService); - - let nodes = this.global.document.getElementsByTagName("*"); - nodes = [this.global].concat([].slice.call(nodes)); - let listeners = []; - - for (let node of nodes) { - let handlers = els.getListenerInfoFor(node); - - for (let handler of handlers) { - // Create a form object for serializing the listener via the protocol. - let listenerForm = Object.create(null); - let listener = handler.listenerObject; - // Native event listeners don't provide any listenerObject or type and - // are not that useful to a JS debugger. - if (!listener || !handler.type) { - continue; - } - - // There will be no tagName if the event listener is set on the window. - let selector = node.tagName ? CssLogic.findCssSelector(node) : "window"; - let nodeDO = this.globalDebugObject.makeDebuggeeValue(node); - listenerForm.node = { - selector: selector, - object: createValueGrip(nodeDO, this._pausePool, this.objectGrip) - }; - listenerForm.type = handler.type; - listenerForm.capturing = handler.capturing; - listenerForm.allowsUntrusted = handler.allowsUntrusted; - listenerForm.inSystemEventGroup = handler.inSystemEventGroup; - let handlerName = "on" + listenerForm.type; - listenerForm.isEventHandler = false; - if (typeof node.hasAttribute !== "undefined") { - listenerForm.isEventHandler = !!node.hasAttribute(handlerName); - } - if (!!node[handlerName]) { - listenerForm.isEventHandler = !!node[handlerName]; - } - // Get the Debugger.Object for the listener object. - let listenerDO = this.globalDebugObject.makeDebuggeeValue(listener); - // If the listener is an object with a 'handleEvent' method, use that. - if (listenerDO.class == "Object" || listenerDO.class == "XULElement") { - // For some events we don't have permission to access the - // 'handleEvent' property when running in content scope. - if (!listenerDO.unwrap()) { - continue; - } - let heDesc; - while (!heDesc && listenerDO) { - heDesc = listenerDO.getOwnPropertyDescriptor("handleEvent"); - listenerDO = listenerDO.proto; - } - if (heDesc && heDesc.value) { - listenerDO = heDesc.value; - } - } - // When the listener is a bound function, we are actually interested in - // the target function. - while (listenerDO.isBoundFunction) { - listenerDO = listenerDO.boundTargetFunction; - } - listenerForm.function = createValueGrip(listenerDO, this._pausePool, - this.objectGrip); - listeners.push(listenerForm); - } - } - return { listeners: listeners }; - }, - - /** - * Return the Debug.Frame for a frame mentioned by the protocol. - */ - _requestFrame: function (aFrameID) { - if (!aFrameID) { - return this.youngestFrame; - } - - if (this._framePool.has(aFrameID)) { - return this._framePool.get(aFrameID).frame; - } - - return undefined; - }, - - _paused: function (aFrame) { - // We don't handle nested pauses correctly. Don't try - if we're - // paused, just continue running whatever code triggered the pause. - // We don't want to actually have nested pauses (although we - // have nested event loops). If code runs in the debuggee during - // a pause, it should cause the actor to resume (dropping - // pause-lifetime actors etc) and then repause when complete. - - if (this.state === "paused") { - return undefined; - } - - // Clear stepping hooks. - this.dbg.onEnterFrame = undefined; - this.dbg.onExceptionUnwind = undefined; - if (aFrame) { - aFrame.onStep = undefined; - aFrame.onPop = undefined; - } - - // Clear DOM event breakpoints. - // XPCShell tests don't use actual DOM windows for globals and cause - // removeListenerForAllEvents to throw. - // if (!isWorker && this.global && !this.global.toString().includes("Sandbox")) { - // let els = Cc["@mozilla.org/eventlistenerservice;1"] - // .getService(Ci.nsIEventListenerService); - // els.removeListenerForAllEvents(this.global, this._allEventsListener, true); - // for (let [,bp] of this._hiddenBreakpoints) { - // bp.onDelete(); - // } - // this._hiddenBreakpoints.clear(); - // } - - this._state = "paused"; - - // Create the actor pool that will hold the pause actor and its - // children. - dbg_assert(!this._pausePool, "No pause pool should exist yet"); - this._pausePool = new ActorPool(this.conn); - this.conn.addActorPool(this._pausePool); - - // Give children of the pause pool a quick link back to the - // thread... - this._pausePool.threadActor = this; - - // Create the pause actor itself... - dbg_assert(!this._pauseActor, "No pause actor should exist yet"); - this._pauseActor = new PauseActor(this._pausePool); - this._pausePool.addActor(this._pauseActor); - - // Update the list of frames. - let poppedFrames = this._updateFrames(); - - // Send off the paused packet and spin an event loop. - let packet = { from: this.actorID, - type: "paused", - actor: this._pauseActor.actorID }; - if (aFrame) { - packet.frame = this._createFrameActor(aFrame).form(); - } - - if (poppedFrames) { - packet.poppedFrames = poppedFrames; - } - - return packet; - }, - - _resumed: function () { - this._state = "running"; - - // Drop the actors in the pause actor pool. - this.conn.removeActorPool(this._pausePool); - - this._pausePool = null; - this._pauseActor = null; - - return { from: this.actorID, type: "resumed" }; - }, - - /** - * Expire frame actors for frames that have been popped. - * - * @returns A list of actor IDs whose frames have been popped. - */ - _updateFrames: function () { - let popped = []; - - // Create the actor pool that will hold the still-living frames. - let framePool = new ActorPool(this.conn); - let frameList = []; - - for (let frameActor of this._frameActors) { - if (frameActor.frame.live) { - framePool.addActor(frameActor); - frameList.push(frameActor); - } else { - popped.push(frameActor.actorID); - } - } - - // Remove the old frame actor pool, this will expire - // any actors that weren't added to the new pool. - if (this._framePool) { - this.conn.removeActorPool(this._framePool); - } - - this._frameActors = frameList; - this._framePool = framePool; - this.conn.addActorPool(framePool); - - return popped; - }, - - _createFrameActor: function (aFrame) { - if (aFrame.actor) { - return aFrame.actor; - } - - let actor = new FrameActor(aFrame, this); - this._frameActors.push(actor); - this._framePool.addActor(actor); - aFrame.actor = actor; - - return actor; - }, - - /** - * Create and return an environment actor that corresponds to the provided - * Debugger.Environment. - * @param Debugger.Environment aEnvironment - * The lexical environment we want to extract. - * @param object aPool - * The pool where the newly-created actor will be placed. - * @return The EnvironmentActor for aEnvironment or undefined for host - * functions or functions scoped to a non-debuggee global. - */ - createEnvironmentActor: function (aEnvironment, aPool) { - if (!aEnvironment) { - return undefined; - } - - if (aEnvironment.actor) { - return aEnvironment.actor; - } - - let actor = new EnvironmentActor(aEnvironment, this); - aPool.addActor(actor); - aEnvironment.actor = actor; - - return actor; - }, - - /** - * Return a protocol completion value representing the given - * Debugger-provided completion value. - */ - createProtocolCompletionValue: function (aCompletion) { - let protoValue = {}; - if (aCompletion == null) { - protoValue.terminated = true; - } else if ("return" in aCompletion) { - protoValue.return = createValueGrip(aCompletion.return, - this._pausePool, this.objectGrip); - } else if ("throw" in aCompletion) { - protoValue.throw = createValueGrip(aCompletion.throw, - this._pausePool, this.objectGrip); - } else { - protoValue.return = createValueGrip(aCompletion.yield, - this._pausePool, this.objectGrip); - } - return protoValue; - }, - - /** - * Create a grip for the given debuggee object. - * - * @param aValue Debugger.Object - * The debuggee object value. - * @param aPool ActorPool - * The actor pool where the new object actor will be added. - */ - objectGrip: function (aValue, aPool) { - if (!aPool.objectActors) { - aPool.objectActors = new WeakMap(); - } - - if (aPool.objectActors.has(aValue)) { - return aPool.objectActors.get(aValue).grip(); - } else if (this.threadLifetimePool.objectActors.has(aValue)) { - return this.threadLifetimePool.objectActors.get(aValue).grip(); - } - - let actor = new PauseScopedObjectActor(aValue, { - getGripDepth: () => this._gripDepth, - incrementGripDepth: () => this._gripDepth++, - decrementGripDepth: () => this._gripDepth--, - createValueGrip: v => createValueGrip(v, this._pausePool, - this.pauseObjectGrip), - sources: () => this.sources, - createEnvironmentActor: (env, pool) => - this.createEnvironmentActor(env, pool), - promote: () => this.threadObjectGrip(actor), - isThreadLifetimePool: () => - actor.registeredPool !== this.threadLifetimePool, - getGlobalDebugObject: () => this.globalDebugObject - }); - aPool.addActor(actor); - aPool.objectActors.set(aValue, actor); - return actor.grip(); - }, - - /** - * Create a grip for the given debuggee object with a pause lifetime. - * - * @param aValue Debugger.Object - * The debuggee object value. - */ - pauseObjectGrip: function (aValue) { - if (!this._pausePool) { - throw "Object grip requested while not paused."; - } - - return this.objectGrip(aValue, this._pausePool); - }, - - /** - * Extend the lifetime of the provided object actor to thread lifetime. - * - * @param aActor object - * The object actor. - */ - threadObjectGrip: function (aActor) { - // We want to reuse the existing actor ID, so we just remove it from the - // current pool's weak map and then let pool.addActor do the rest. - aActor.registeredPool.objectActors.delete(aActor.obj); - this.threadLifetimePool.addActor(aActor); - this.threadLifetimePool.objectActors.set(aActor.obj, aActor); - }, - - /** - * Handle a protocol request to promote multiple pause-lifetime grips to - * thread-lifetime grips. - * - * @param aRequest object - * The protocol request object. - */ - onThreadGrips: function (aRequest) { - if (this.state != "paused") { - return { error: "wrongState" }; - } - - if (!aRequest.actors) { - return { error: "missingParameter", - message: "no actors were specified" }; - } - - for (let actorID of aRequest.actors) { - let actor = this._pausePool.get(actorID); - if (actor) { - this.threadObjectGrip(actor); - } - } - return {}; - }, - - /** - * Create a long string grip that is scoped to a pause. - * - * @param aString String - * The string we are creating a grip for. - */ - pauseLongStringGrip: function (aString) { - return longStringGrip(aString, this._pausePool); - }, - - /** - * Create a long string grip that is scoped to a thread. - * - * @param aString String - * The string we are creating a grip for. - */ - threadLongStringGrip: function (aString) { - return longStringGrip(aString, this._threadLifetimePool); - }, - - // JS Debugger API hooks. - - /** - * A function that the engine calls when a call to a debug event hook, - * breakpoint handler, watchpoint handler, or similar function throws some - * exception. - * - * @param aException exception - * The exception that was thrown in the debugger code. - */ - uncaughtExceptionHook: function (aException) { - DevToolsUtils.dumpn("Got an exception: " + aException.message + "\n" + aException.stack); - }, - - /** - * A function that the engine calls when a debugger statement has been - * executed in the specified frame. - * - * @param aFrame Debugger.Frame - * The stack frame that contained the debugger statement. - */ - onDebuggerStatement: function (aFrame) { - // Don't pause if we are currently stepping (in or over) or the frame is - // black-boxed. - const generatedLocation = this.sources.getFrameLocation(aFrame); - const { originalSourceActor } = this.unsafeSynchronize(this.sources.getOriginalLocation( - generatedLocation)); - const url = originalSourceActor ? originalSourceActor.url : null; - - return this.sources.isBlackBoxed(url) || aFrame.onStep - ? undefined - : this._pauseAndRespond(aFrame, { type: "debuggerStatement" }); - }, - - /** - * A function that the engine calls when an exception has been thrown and has - * propagated to the specified frame. - * - * @param aFrame Debugger.Frame - * The youngest remaining stack frame. - * @param aValue object - * The exception that was thrown. - */ - onExceptionUnwind: function (aFrame, aValue) { - let willBeCaught = false; - for (let frame = aFrame; frame != null; frame = frame.older) { - if (frame.script.isInCatchScope(frame.offset)) { - willBeCaught = true; - break; - } - } - - if (willBeCaught && this._options.ignoreCaughtExceptions) { - return undefined; - } - - const generatedLocation = this.sources.getFrameLocation(aFrame); - const { sourceActor } = this.unsafeSynchronize(this.sources.getOriginalLocation( - generatedLocation)); - const url = sourceActor ? sourceActor.url : null; - - if (this.sources.isBlackBoxed(url)) { - return undefined; - } - - try { - let packet = this._paused(aFrame); - if (!packet) { - return undefined; - } - - packet.why = { type: "exception", - exception: createValueGrip(aValue, this._pausePool, - this.objectGrip) - }; - this.conn.send(packet); - - this._pushThreadPause(); - } catch(e) { - reportError(e, "Got an exception during TA_onExceptionUnwind: "); - } - - return undefined; - }, - - /** - * A function that the engine calls when a new script has been loaded into the - * scope of the specified debuggee global. - * - * @param aScript Debugger.Script - * The source script that has been loaded into a debuggee compartment. - * @param aGlobal Debugger.Object - * A Debugger.Object instance whose referent is the global object. - */ - onNewScript: function (aScript, aGlobal) { - this._addSource(aScript.source); - }, - - onNewSource: function (aSource) { - this.conn.send({ - from: this.actorID, - type: "newSource", - source: aSource.form() - }); - }, - - /** - * Restore any pre-existing breakpoints to the sources that we have access to. - */ - _restoreBreakpoints: function () { - if (this.breakpointActorMap.size === 0) { - return; - } - - for (let s of this.scripts.getSources()) { - this._addSource(s); - } - }, - - /** - * Add the provided source to the server cache. - * - * @param aSource Debugger.Source - * The source that will be stored. - * @returns true, if the source was added; false otherwise. - */ - _addSource: function (aSource) { - if (!this.sources.allowSource(aSource) || this._debuggerSourcesSeen.has(aSource)) { - return false; - } - - // The scripts must be added to the ScriptStore before restoring - // breakpoints. If we try to add them to the ScriptStore any later, we can - // accidentally set a breakpoint in a top level script as a "closest match" - // because we wouldn't have added the child scripts to the ScriptStore yet. - this.scripts.addScripts(this.dbg.findScripts({ source: aSource })); - - let sourceActor = this.sources.createNonSourceMappedActor(aSource); - - // Go ahead and establish the source actors for this script, which - // fetches sourcemaps if available and sends onNewSource - // notifications. - // - // We need to use unsafeSynchronize here because if the page is being reloaded, - // this call will replace the previous set of source actors for this source - // with a new one. If the source actors have not been replaced by the time - // we try to reset the breakpoints below, their location objects will still - // point to the old set of source actors, which point to different scripts. - this.unsafeSynchronize(this.sources.createSourceActors(aSource)); - - // Set any stored breakpoints. - let promises = []; - - for (let _actor of this.breakpointActorMap.findActors()) { - // XXX bug 1142115: We do async work in here, so we need to create a fresh - // binding because for/of does not yet do that in SpiderMonkey. - let actor = _actor; - - if (actor.isPending) { - promises.push(actor.originalLocation.originalSourceActor._setBreakpoint(actor)); - } else { - promises.push(this.sources.getAllGeneratedLocations(actor.originalLocation) - .then((generatedLocations) => { - if (generatedLocations.length > 0 && - generatedLocations[0].generatedSourceActor.actorID === sourceActor.actorID) { - sourceActor._setBreakpointAtAllGeneratedLocations( - actor, - generatedLocations - ); - } - })); - } - } - - if (promises.length > 0) { - this.unsafeSynchronize(promise.all(promises)); - } - - this._debuggerSourcesSeen.add(aSource); - return true; - }, - - - /** - * Get prototypes and properties of multiple objects. - */ - onPrototypesAndProperties: function (aRequest) { - let result = {}; - for (let actorID of aRequest.actors) { - // This code assumes that there are no lazily loaded actors returned - // by this call. - let actor = this.conn.getActor(actorID); - if (!actor) { - return { from: this.actorID, - error: "noSuchActor" }; - } - let handler = actor.onPrototypeAndProperties; - if (!handler) { - return { from: this.actorID, - error: "unrecognizedPacketType", - message: ('Actor "' + actorID + - '" does not recognize the packet type ' + - '"prototypeAndProperties"') }; - } - result[actorID] = handler.call(actor, {}); - } - return { from: this.actorID, - actors: result }; - } -}; - -ThreadActor.prototype.requestTypes = { - "attach": ThreadActor.prototype.onAttach, - "detach": ThreadActor.prototype.onDetach, - "reconfigure": ThreadActor.prototype.onReconfigure, - "resume": ThreadActor.prototype.onResume, - "clientEvaluate": ThreadActor.prototype.onClientEvaluate, - "frames": ThreadActor.prototype.onFrames, - "interrupt": ThreadActor.prototype.onInterrupt, - "eventListeners": ThreadActor.prototype.onEventListeners, - "releaseMany": ThreadActor.prototype.onReleaseMany, - "sources": ThreadActor.prototype.onSources, - "threadGrips": ThreadActor.prototype.onThreadGrips, - "prototypesAndProperties": ThreadActor.prototype.onPrototypesAndProperties -}; - -exports.ThreadActor = ThreadActor; - -/** - * Creates a PauseActor. - * - * PauseActors exist for the lifetime of a given debuggee pause. Used to - * scope pause-lifetime grips. - * - * @param ActorPool aPool - * The actor pool created for this pause. - */ -function PauseActor(aPool) -{ - this.pool = aPool; -} - -PauseActor.prototype = { - actorPrefix: "pause" -}; - - -/** - * A base actor for any actors that should only respond receive messages in the - * paused state. Subclasses may expose a `threadActor` which is used to help - * determine when we are in a paused state. Subclasses should set their own - * "constructor" property if they want better error messages. You should never - * instantiate a PauseScopedActor directly, only through subclasses. - */ -function PauseScopedActor() -{ -} - -/** - * A function decorator for creating methods to handle protocol messages that - * should only be received while in the paused state. - * - * @param aMethod Function - * The function we are decorating. - */ -PauseScopedActor.withPaused = function (aMethod) { - return function () { - if (this.isPaused()) { - return aMethod.apply(this, arguments); - } else { - return this._wrongState(); - } - }; -}; - -PauseScopedActor.prototype = { - - /** - * Returns true if we are in the paused state. - */ - isPaused: function () { - // When there is not a ThreadActor available (like in the webconsole) we - // have to be optimistic and assume that we are paused so that we can - // respond to requests. - return this.threadActor ? this.threadActor.state === "paused" : true; - }, - - /** - * Returns the wrongState response packet for this actor. - */ - _wrongState: function () { - return { - error: "wrongState", - message: this.constructor.name + - " actors can only be accessed while the thread is paused." - }; - } -}; - -/** - * Resolve a URI back to physical file. - * - * Of course, this works only for URIs pointing to local resources. - * - * @param aURI - * URI to resolve - * @return - * resolved nsIURI - */ -function resolveURIToLocalPath(aURI) { - let resolved; - switch (aURI.scheme) { - case "jar": - case "file": - return aURI; - - case "chrome": - resolved = Cc["@mozilla.org/chrome/chrome-registry;1"]. - getService(Ci.nsIChromeRegistry).convertChromeURL(aURI); - return resolveURIToLocalPath(resolved); - - case "resource": - resolved = Cc["@mozilla.org/network/protocol;1?name=resource"]. - getService(Ci.nsIResProtocolHandler).resolveURI(aURI); - aURI = Services.io.newURI(resolved, null, null); - return resolveURIToLocalPath(aURI); - - default: - return null; - } -} - -/** - * A SourceActor provides information about the source of a script. There - * are two kinds of source actors: ones that represent real source objects, - * and ones that represent non-existant "original" sources when the real - * sources are sourcemapped. When a source is sourcemapped, actors are - * created for both the "generated" and "original" sources, and the client will - * only see the original sources. We separate these because there isn't - * a 1:1 mapping of generated to original sources; one generated source - * may represent N original sources, so we need to create N + 1 separate - * actors. - * - * There are 4 different scenarios for sources that you should - * understand: - * - * - A single non-sourcemapped source that is not inlined in HTML - * (separate JS file, eval'ed code, etc) - * - A single sourcemapped source which creates N original sources - * - An HTML page with multiple inline scripts, which are distinct - * sources, but should be represented as a single source - * - A pretty-printed source (which may or may not be an original - * sourcemapped source), which generates a sourcemap for itself - * - * The complexity of `SourceActor` and `ThreadSources` are to handle - * all of thise cases and hopefully internalize the complexities. - * - * @param Debugger.Source source - * The source object we are representing. - * @param ThreadActor thread - * The current thread actor. - * @param String originalUrl - * Optional. For sourcemapped urls, the original url this is representing. - * @param Debugger.Source generatedSource - * Optional, passed in when aSourceMap is also passed in. The generated - * source object that introduced this source. - * @param String contentType - * Optional. The content type of this source, if immediately available. - */ -function SourceActor({ source, thread, originalUrl, generatedSource, - isInlineSource, contentType }) { - this._threadActor = thread; - this._originalUrl = originalUrl; - this._source = source; - this._generatedSource = generatedSource; - this._contentType = contentType; - this._isInlineSource = isInlineSource; - - this.onSource = this.onSource.bind(this); - this._invertSourceMap = this._invertSourceMap.bind(this); - this._encodeAndSetSourceMapURL = this._encodeAndSetSourceMapURL.bind(this); - this._getSourceText = this._getSourceText.bind(this); - - this._mapSourceToAddon(); - - if (this.threadActor.sources.isPrettyPrinted(this.url)) { - this._init = this.onPrettyPrint({ - indent: this.threadActor.sources.prettyPrintIndent(this.url) - }).then(null, error => { - DevToolsUtils.reportException("SourceActor", error); - }); - } else { - this._init = null; - } -} - -SourceActor.prototype = { - constructor: SourceActor, - actorPrefix: "source", - - _oldSourceMap: null, - _init: null, - _addonID: null, - _addonPath: null, - - get isSourceMapped() { - return !this.isInlineSource && ( - this._originalURL || this._generatedSource || - this.threadActor.sources.isPrettyPrinted(this.url) - ); - }, - - get isInlineSource() { - return this._isInlineSource; - }, - - get threadActor() { return this._threadActor; }, - get sources() { return this._threadActor.sources; }, - get dbg() { return this.threadActor.dbg; }, - get scripts() { return this.threadActor.scripts; }, - get source() { return this._source; }, - get generatedSource() { return this._generatedSource; }, - get breakpointActorMap() { return this.threadActor.breakpointActorMap; }, - get url() { - if (this.source) { - return getSourceURL(this.source, this.threadActor._parent.window); - } - return this._originalUrl; - }, - get addonID() { return this._addonID; }, - get addonPath() { return this._addonPath; }, - - get prettyPrintWorker() { - return this.threadActor.prettyPrintWorker; - }, - - form: function () { - let source = this.source || this.generatedSource; - // This might not have a source or a generatedSource because we - // treat HTML pages with inline scripts as a special SourceActor - // that doesn't have either - let introductionUrl = null; - if (source && source.introductionScript) { - introductionUrl = source.introductionScript.source.url; - } - - return { - actor: this.actorID, - url: this.url ? this.url.split(" -> ").pop() : null, - addonID: this._addonID, - addonPath: this._addonPath, - isBlackBoxed: this.threadActor.sources.isBlackBoxed(this.url), - isPrettyPrinted: this.threadActor.sources.isPrettyPrinted(this.url), - introductionUrl: introductionUrl ? introductionUrl.split(" -> ").pop() : null, - introductionType: source ? source.introductionType : null - }; - }, - - disconnect: function () { - if (this.registeredPool && this.registeredPool.sourceActors) { - delete this.registeredPool.sourceActors[this.actorID]; - } - }, - - _mapSourceToAddon: function() { - try { - var nsuri = Services.io.newURI(this.url.split(" -> ").pop(), null, null); - } - catch (e) { - // We can't do anything with an invalid URI - return; - } - - let localURI = resolveURIToLocalPath(nsuri); - - let id = {}; - if (localURI && mapURIToAddonID(localURI, id)) { - this._addonID = id.value; - - if (localURI instanceof Ci.nsIJARURI) { - // The path in the add-on is easy for jar: uris - this._addonPath = localURI.JAREntry; - } - else if (localURI instanceof Ci.nsIFileURL) { - // For file: uris walk up to find the last directory that is part of the - // add-on - let target = localURI.file; - let path = target.leafName; - - // We can assume that the directory containing the source file is part - // of the add-on - let root = target.parent; - let file = root.parent; - while (file && mapURIToAddonID(Services.io.newFileURI(file), {})) { - path = root.leafName + "/" + path; - root = file; - file = file.parent; - } - - if (!file) { - const error = new Error("Could not find the root of the add-on for " + this.url); - DevToolsUtils.reportException("SourceActor.prototype._mapSourceToAddon", error) - return; - } - - this._addonPath = path; - } - } - }, - - _reportLoadSourceError: function (error, map=null) { - try { - DevToolsUtils.reportException("SourceActor", error); - - JSON.stringify(this.form(), null, 4).split(/\n/g) - .forEach(line => console.error("\t", line)); - - if (!map) { - return; - } - - console.error("\t", "source map's sourceRoot =", map.sourceRoot); - - console.error("\t", "source map's sources ="); - map.sources.forEach(s => { - let hasSourceContent = map.sourceContentFor(s, true); - console.error("\t\t", s, "\t", - hasSourceContent ? "has source content" : "no source content"); - }); - - console.error("\t", "source map's sourcesContent ="); - map.sourcesContent.forEach(c => { - if (c.length > 80) { - c = c.slice(0, 77) + "..."; - } - c = c.replace(/\n/g, "\\n"); - console.error("\t\t", c); - }); - } catch (e) { } - }, - - _getSourceText: function () { - let toResolvedContent = t => ({ - content: t, - contentType: this._contentType - }); - - let genSource = this.generatedSource || this.source; - return this.threadActor.sources.fetchSourceMap(genSource).then(map => { - if (map) { - try { - let sourceContent = map.sourceContentFor(this.url); - if (sourceContent) { - return toResolvedContent(sourceContent); - } - } catch (error) { - this._reportLoadSourceError(error, map); - throw error; - } - } - - // Use `source.text` if it exists, is not the "no source" - // string, and the content type of the source is JavaScript. It - // will be "no source" if the Debugger API wasn't able to load - // the source because sources were discarded - // (javascript.options.discardSystemSource == true). Re-fetch - // non-JS sources to get the contentType from the headers. - if (this.source && - this.source.text !== "[no source]" && - this._contentType && - this._contentType.indexOf('javascript') !== -1) { - return toResolvedContent(this.source.text); - } - else { - // Only load the HTML page source from cache (which exists when - // there are inline sources). Otherwise, we can't trust the - // cache because we are most likely here because we are - // fetching the original text for sourcemapped code, and the - // page hasn't requested it before (if it has, it was a - // previous debugging session). - let sourceFetched = fetch(this.url, { loadFromCache: this.isInlineSource }); - - // Record the contentType we just learned during fetching - return sourceFetched - .then(result => { - this._contentType = result.contentType; - return result; - }, error => { - this._reportLoadSourceError(error, map); - throw error; - }); - } - }); - }, - - /** - * Get all executable lines from the current source - * @return Array - Executable lines of the current script - **/ - getExecutableLines: function () { - // Check if the original source is source mapped - let packet = { - from: this.actorID - }; - - function sortLines(lines) { - // Converting the Set into an array - lines = [...lines]; - lines.sort((a, b) => { - return a - b; - }); - return lines; - } - - if (this.generatedSource) { - return this.threadActor.sources.getSourceMap(this.generatedSource).then(sm => { - let lines = new Set(); - - // Position of executable lines in the generated source - let offsets = this.getExecutableOffsets(this.generatedSource, false); - for (let offset of offsets) { - let {line, source: sourceUrl} = sm.originalPositionFor({ - line: offset.lineNumber, - column: offset.columnNumber - }); - - if (sourceUrl === this.url) { - lines.add(line); - } - } - - packet.lines = sortLines(lines); - return packet; - }); - } - - let lines = this.getExecutableOffsets(this.source, true); - packet.lines = sortLines(lines); - return packet; - }, - - /** - * Extract all executable offsets from the given script - * @param String url - extract offsets of the script with this url - * @param Boolean onlyLine - will return only the line number - * @return Set - Executable offsets/lines of the script - **/ - getExecutableOffsets: function (source, onlyLine) { - let offsets = new Set(); - for (let s of this.threadActor.scripts.getScriptsBySource(source)) { - for (let offset of s.getAllColumnOffsets()) { - offsets.add(onlyLine ? offset.lineNumber : offset); - } - } - - return offsets; - }, - - /** - * Handler for the "source" packet. - */ - onSource: function () { - return resolve(this._init) - .then(this._getSourceText) - .then(({ content, contentType }) => { - return { - from: this.actorID, - // source: createValueGrip(content, this.threadActor.threadLifetimePool, - // this.threadActor.objectGrip), - source: content, - contentType: contentType - }; - }) - .then(null, aError => { - reportError(aError, "Got an exception during SA_onSource: "); - return { - "from": this.actorID, - "error": this.url, - "message": "Could not load the source for " + this.url + ".\n" - + DevToolsUtils.safeErrorString(aError) - }; - }); - }, - - /** - * Handler for the "prettyPrint" packet. - */ - onPrettyPrint: function ({ indent }) { - this.threadActor.sources.prettyPrint(this.url, indent); - return this._getSourceText() - .then(this._sendToPrettyPrintWorker(indent)) - .then(this._invertSourceMap) - .then(this._encodeAndSetSourceMapURL) - .then(() => { - // We need to reset `_init` now because we have already done the work of - // pretty printing, and don't want onSource to wait forever for - // initialization to complete. - this._init = null; - }) - .then(this.onSource) - .then(null, error => { - this.onDisablePrettyPrint(); - return { - from: this.actorID, - error: "prettyPrintError", - message: DevToolsUtils.safeErrorString(error) - }; - }); - }, - - /** - * Return a function that sends a request to the pretty print worker, waits on - * the worker's response, and then returns the pretty printed code. - * - * @param Number aIndent - * The number of spaces to indent by the code by, when we send the - * request to the pretty print worker. - * @returns Function - * Returns a function which takes an AST, and returns a promise that - * is resolved with `{ code, mappings }` where `code` is the pretty - * printed code, and `mappings` is an array of source mappings. - */ - _sendToPrettyPrintWorker: function (aIndent) { - return ({ content }) => { - return this.prettyPrintWorker.performTask("pretty-print", { - url: this.url, - indent: aIndent, - source: content - }) - }; - }, - - /** - * Invert a source map. So if a source map maps from a to b, return a new - * source map from b to a. We need to do this because the source map we get - * from _generatePrettyCodeAndMap goes the opposite way we want it to for - * debugging. - * - * Note that the source map is modified in place. - */ - _invertSourceMap: function ({ code, mappings }) { - const generator = new SourceMapGenerator({ file: this.url }); - return DevToolsUtils.yieldingEach(mappings._array, m => { - let mapping = { - generated: { - line: m.originalLine, - column: m.originalColumn - } - }; - if (m.source) { - mapping.source = m.source; - mapping.original = { - line: m.generatedLine, - column: m.generatedColumn - }; - mapping.name = m.name; - } - generator.addMapping(mapping); - }).then(() => { - generator.setSourceContent(this.url, code); - let consumer = SourceMapConsumer.fromSourceMap(generator); - - return { - code: code, - map: consumer - }; - }); - }, - - /** - * Save the source map back to our thread's ThreadSources object so that - * stepping, breakpoints, debugger statements, etc can use it. If we are - * pretty printing a source mapped source, we need to compose the existing - * source map with our new one. - */ - _encodeAndSetSourceMapURL: function ({ map: sm }) { - let source = this.generatedSource || this.source; - let sources = this.threadActor.sources; - - return sources.getSourceMap(source).then(prevMap => { - if (prevMap) { - // Compose the source maps - this._oldSourceMapping = { - url: source.sourceMapURL, - map: prevMap - }; - - prevMap = SourceMapGenerator.fromSourceMap(prevMap); - prevMap.applySourceMap(sm, this.url); - sm = SourceMapConsumer.fromSourceMap(prevMap); - } - - let sources = this.threadActor.sources; - sources.clearSourceMapCache(source.sourceMapURL); - sources.setSourceMapHard(source, null, sm); - }); - }, - - /** - * Handler for the "disablePrettyPrint" packet. - */ - onDisablePrettyPrint: function () { - let source = this.generatedSource || this.source; - let sources = this.threadActor.sources; - let sm = sources.getSourceMap(source); - - sources.clearSourceMapCache(source.sourceMapURL, { hard: true }); - - if (this._oldSourceMapping) { - sources.setSourceMapHard(source, - this._oldSourceMapping.url, - this._oldSourceMapping.map); - this._oldSourceMapping = null; - } - - this.threadActor.sources.disablePrettyPrint(this.url); - return this.onSource(); - }, - - /** - * Handler for the "blackbox" packet. - */ - onBlackBox: function (aRequest) { - this.threadActor.sources.blackBox(this.url); - let packet = { - from: this.actorID - }; - if (this.threadActor.state == "paused" - && this.threadActor.youngestFrame - && this.threadActor.youngestFrame.script.url == this.url) { - packet.pausedInSource = true; - } - return packet; - }, - - /** - * Handler for the "unblackbox" packet. - */ - onUnblackBox: function (aRequest) { - this.threadActor.sources.unblackBox(this.url); - return { - from: this.actorID - }; - }, - - /** - * Handle a request to set a breakpoint. - * - * @param JSON request - * A JSON object representing the request. - * - * @returns Promise - * A promise that resolves to a JSON object representing the - * response. - */ - onSetBreakpoint: function (request) { - if (this.threadActor.state !== "paused") { - return { - error: "wrongState", - message: "Cannot set breakpoint while debuggee is running." - }; - } - - let { location: { line, column }, condition } = request; - let location = new OriginalLocation(this, line, column); - return this._getOrCreateBreakpointActor( - location, - condition - ).then((actor) => { - let response = { - actor: actor.actorID, - isPending: actor.isPending - }; - - let actualLocation = actor.originalLocation; - if (!actualLocation.equals(location)) { - response.actualLocation = actualLocation.toJSON(); - } - - return response; - }); - }, - - /** - * Get or create a BreakpointActor for the given location in the original - * source, and ensure it is set as a breakpoint handler on all scripts that - * match the given location. - * - * @param OriginalLocation originalLocation - * An OriginalLocation representing the location of the breakpoint in - * the original source. - * @param String condition - * A string that is evaluated whenever the breakpoint is hit. If the - * string evaluates to false, the breakpoint is ignored. - * - * @returns BreakpointActor - * A BreakpointActor representing the breakpoint. - */ - _getOrCreateBreakpointActor: function (originalLocation, condition) { - let actor = this.breakpointActorMap.getActor(originalLocation); - if (!actor) { - actor = new BreakpointActor(this.threadActor, originalLocation); - this.threadActor.threadLifetimePool.addActor(actor); - this.breakpointActorMap.setActor(originalLocation, actor); - } - - actor.condition = condition; - - return this._setBreakpoint(actor); - }, - - /* - * Ensure the given BreakpointActor is set as a breakpoint handler on all - * scripts that match its location in the original source. - * - * If there are no scripts that match the location of the BreakpointActor, - * we slide its location to the next closest line (for line breakpoints) or - * column (for column breakpoint) that does. - * - * If breakpoint sliding fails, then either there are no scripts that contain - * any code for the given location, or they were all garbage collected before - * the debugger started running. We cannot distinguish between these two - * cases, so we insert the BreakpointActor in the BreakpointActorMap as - * a pending breakpoint. Whenever a new script is introduced, this method is - * called again for each pending breakpoint. - * - * @param BreakpointActor actor - * The BreakpointActor to be set as a breakpoint handler. - * - * @returns A Promise that resolves to the given BreakpointActor. - */ - _setBreakpoint: function (actor) { - let { originalLocation } = actor; - let { originalSourceActor, originalLine, originalColumn } = originalLocation; - - return this._setBreakpointAtOriginalLocation(actor, originalLocation) - .then((actualLocation) => { - if (actualLocation) { - return actualLocation; - } - - // There were no scripts that matched the given location, so we need to - // perform breakpoint sliding. We try to slide the breakpoint by column - // first, and if that fails, by line instead. - if (!this.isSourceMapped) { - if (originalColumn !== undefined) { - // To perform breakpoint sliding for column breakpoints, we need to - // build a map from column numbers to a list of entry points for each - // column, implemented as a sparse array. An entry point is a (script, - // offsets) pair, and represents all offsets in that script that are - // entry points for the corresponding column. - let columnToEntryPointsMap = []; - - // Iterate over all scripts that correspond to this source actor and - // line number. - let scripts = this.scripts.getScriptsBySourceActor(this, originalLine); - for (let script of scripts) { - let columnToOffsetMap = script.getAllColumnOffsets() - .filter(({ lineNumber }) => { - return lineNumber === originalLine; - }) - - // Iterate over each column, and add their list of offsets to the - // map from column numbers to entry points by forming a (script, - // offsets) pair, where script is the current script, and offsets is - // the list of offsets for the current column. - for (let { columnNumber: column, offset } of columnToOffsetMap) { - let entryPoints = columnToEntryPointsMap[column]; - if (!entryPoints) { - // We dont have a list of entry points for the current column - // number yet, so create it and add it to the map. - entryPoints = []; - columnToEntryPointsMap[column] = entryPoints; - } - entryPoints.push({ script, offsets: [offset] }); - } - } - - // Now that we have a map from column numbers to a list of entry points - // for each column, we can use it to perform breakpoint sliding. Start - // at the original column of the breakpoint actor, and keep - // incrementing it by one, until either we find a line that has at - // least one entry point, or we go past the last column in the map. - // - // Note that by computing the entire map up front, and implementing it - // as a sparse array, we can easily tell when we went past the last - // column in the map. - let actualColumn = originalColumn + 1; - while (actualColumn < columnToEntryPointsMap.length) { - let entryPoints = columnToEntryPointsMap[actualColumn]; - if (entryPoints) { - setBreakpointAtEntryPoints(actor, entryPoints); - return new OriginalLocation( - originalSourceActor, - originalLine, - actualColumn - ); - } - ++actualColumn; - } - - return originalLocation; - } else { - // To perform breakpoint sliding for line breakpoints, we need to - // build a map from line numbers to a list of entry points for each - // line, implemented as a sparse array. An entry point is a (script, - // offsets) pair, and represents all offsets in that script that are - // entry points for the corresponding line. - let lineToEntryPointsMap = []; - - // Iterate over all scripts that correspond to this source actor. - let scripts = this.scripts.getScriptsBySourceActor(this); - for (let script of scripts) { - // Get all offsets for each line in the current script. This returns - // a map from line numbers fo a list of offsets for each line, - // implemented as a sparse array. - let lineToOffsetsMap = script.getAllOffsets(); - - // Iterate over each line, and add their list of offsets to the map - // from line numbers to entry points by forming a (script, offsets) - // pair, where script is the current script, and offsets is the list - // of offsets for the current line. - for (let line = 0; line < lineToOffsetsMap.length; ++line) { - let offsets = lineToOffsetsMap[line]; - if (offsets) { - let entryPoints = lineToEntryPointsMap[line]; - if (!entryPoints) { - // We dont have a list of entry points for the current line - // number yet, so create it and add it to the map. - entryPoints = []; - lineToEntryPointsMap[line] = entryPoints; - } - entryPoints.push({ script, offsets }); - } - } - } - - // Now that we have a map from line numbers to a list of entry points - // for each line, we can use it to perform breakpoint sliding. Start - // at the original line of the breakpoint actor, and keep incrementing - // it by one, until either we find a line that has at least one entry - // point, or we go past the last line in the map. - // - // Note that by computing the entire map up front, and implementing it - // as a sparse array, we can easily tell when we went past the last - // line in the map. - let actualLine = originalLine + 1; - while (actualLine < lineToEntryPointsMap.length) { - let entryPoints = lineToEntryPointsMap[actualLine]; - if (entryPoints) { - setBreakpointAtEntryPoints(actor, entryPoints); - break; - } - ++actualLine; - } - if (actualLine >= lineToEntryPointsMap.length) { - // We went past the last line in the map, so breakpoint sliding - // failed. Keep the BreakpointActor in the BreakpointActorMap as a - // pending breakpoint, so we can try again whenever a new script is - // introduced. - return originalLocation; - } - - return new OriginalLocation( - originalSourceActor, - actualLine - ); - } - } else { - let slideByColumn = (actualColumn) => { - return this.sources.getAllGeneratedLocations(new OriginalLocation( - this, - originalLine, - actualColumn - )).then((generatedLocations) => { - // Because getAllGeneratedLocations will always return the list of - // generated locations for the closest column that is greater than - // the one we are searching for if no exact match can be found, if - // the list of generated locations is empty, we've reached the end - // of the original line, and sliding continues by line. - if (generatedLocations.length === 0) { - return slideByLine(originalLine + 1); - } - - // If at least one script has an offset that matches one of the - // generated locations in the list, then breakpoint sliding - // succeeded. - if (this._setBreakpointAtAllGeneratedLocations(actor, generatedLocations)) { - return this.threadActor.sources.getOriginalLocation(generatedLocations[0]); - } - - // Try the next column in the original source. - return slideByColumn(actualColumn + 1); - }); - }; - - let slideByLine = (actualLine) => { - return this.sources.getAllGeneratedLocations(new OriginalLocation( - this, - actualLine - )).then((generatedLocations) => { - // Because getAllGeneratedLocations will always return the list of - // generated locations for the closest line that is greater than - // the one we are searching for if no exact match can be found, if - // the list of generated locations is empty, we've reached the end - // of the original source, and breakpoint sliding failed. - if (generatedLocations.length === 0) { - return originalLocation; - } - - // If at least one script has an offset that matches one of the - // generated locations in the list, then breakpoint sliding - // succeeded. - if (this._setBreakpointAtAllGeneratedLocations(actor, generatedLocations)) { - return this.threadActor.sources.getOriginalLocation(generatedLocations[0]); - } - - // Try the next line in the original source. - return slideByLine(actualLine + 1); - }); - }; - - if (originalColumn !== undefined) { - return slideByColumn(originalColumn + 1); - } else { - return slideByLine(originalLine + 1); - } - } - }).then((actualLocation) => { - // If the actual location on which the BreakpointActor ended up being - // set differs from the original line that was requested, both the - // BreakpointActor and the BreakpointActorMap need to be updated - // accordingly. - if (!actualLocation.equals(originalLocation)) { - let existingActor = this.breakpointActorMap.getActor(actualLocation); - if (existingActor) { - actor.onDelete(); - this.breakpointActorMap.deleteActor(originalLocation); - actor = existingActor; - } else { - this.breakpointActorMap.deleteActor(originalLocation); - actor.originalLocation = actualLocation; - this.breakpointActorMap.setActor(actualLocation, actor); - } - } - - return actor; - }); - }, - - _setBreakpointAtOriginalLocation: function (actor, originalLocation) { - if (!this.isSourceMapped) { - if (!this._setBreakpointAtGeneratedLocation( - actor, - GeneratedLocation.fromOriginalLocation(originalLocation) - )) { - // return promise.resolve(null); - return resolve(null); - } - - // return promise.resolve(originalLocation); - return resolve(originalLocation); - } else { - return this.sources.getAllGeneratedLocations(originalLocation) - .then((generatedLocations) => { - if (!this._setBreakpointAtAllGeneratedLocations( - actor, - generatedLocations - )) { - return null; - } - - return this.threadActor.sources.getOriginalLocation(generatedLocations[0]); - }); - } - }, - - _setBreakpointAtAllGeneratedLocations: function (actor, generatedLocations) { - let success = false; - for (let generatedLocation of generatedLocations) { - if (this._setBreakpointAtGeneratedLocation( - actor, - generatedLocation - )) { - success = true; - } - } - return success; - }, - - /* - * Ensure the given BreakpointActor is set as breakpoint handler on all - * scripts that match the given location in the generated source. - * - * @param BreakpointActor actor - * The BreakpointActor to be set as a breakpoint handler. - * @param GeneratedLocation generatedLocation - * A GeneratedLocation representing the location in the generated - * source for which the given BreakpointActor is to be set as a - * breakpoint handler. - * - * @returns A Boolean that is true if the BreakpointActor was set as a - * breakpoint handler on at least one script, and false otherwise. - */ - _setBreakpointAtGeneratedLocation: function (actor, generatedLocation) { - let { - generatedSourceActor, - generatedLine, - generatedColumn, - generatedLastColumn - } = generatedLocation; - - // Find all scripts that match the given source actor and line number. - let scripts = this.scripts.getScriptsBySourceActorAndLine( - generatedSourceActor, - generatedLine - ); - - scripts = scripts.filter((script) => !actor.hasScript(script)); - - // Find all entry points that correspond to the given location. - let entryPoints = []; - if (generatedColumn === undefined) { - // This is a line breakpoint, so we are interested in all offsets - // that correspond to the given line number. - for (let script of scripts) { - let offsets = script.getLineOffsets(generatedLine); - if (offsets.length > 0) { - entryPoints.push({ script, offsets }); - } - } - } else { - // This is a column breakpoint, so we are interested in all column - // offsets that correspond to the given line *and* column number. - for (let script of scripts) { - let columnToOffsetMap = script.getAllColumnOffsets() - .filter(({ lineNumber }) => { - return lineNumber === generatedLine; - }); - for (let { columnNumber: column, offset } of columnToOffsetMap) { - if (column >= generatedColumn && column <= generatedLastColumn) { - entryPoints.push({ script, offsets: [offset] }); - } - } - } - } - - if (entryPoints.length === 0) { - return false; - } - setBreakpointAtEntryPoints(actor, entryPoints); - return true; - } -}; - -SourceActor.prototype.requestTypes = { - "source": SourceActor.prototype.onSource, - "blackbox": SourceActor.prototype.onBlackBox, - "unblackbox": SourceActor.prototype.onUnblackBox, - "prettyPrint": SourceActor.prototype.onPrettyPrint, - "disablePrettyPrint": SourceActor.prototype.onDisablePrettyPrint, - "getExecutableLines": SourceActor.prototype.getExecutableLines, - "setBreakpoint": SourceActor.prototype.onSetBreakpoint -}; - -exports.SourceActor = SourceActor; - -/** - * Creates a pause-scoped actor for the specified object. - * @see ObjectActor - */ -function PauseScopedObjectActor(obj, hooks) { - ObjectActor.call(this, obj, hooks); - this.hooks.promote = hooks.promote; - this.hooks.isThreadLifetimePool = hooks.isThreadLifetimePool; -} - -PauseScopedObjectActor.prototype = Object.create(PauseScopedActor.prototype); - -update(PauseScopedObjectActor.prototype, ObjectActor.prototype); - -update(PauseScopedObjectActor.prototype, { - constructor: PauseScopedObjectActor, - actorPrefix: "pausedobj", - - onOwnPropertyNames: - PauseScopedActor.withPaused(ObjectActor.prototype.onOwnPropertyNames), - - onPrototypeAndProperties: - PauseScopedActor.withPaused(ObjectActor.prototype.onPrototypeAndProperties), - - onPrototype: PauseScopedActor.withPaused(ObjectActor.prototype.onPrototype), - onProperty: PauseScopedActor.withPaused(ObjectActor.prototype.onProperty), - onDecompile: PauseScopedActor.withPaused(ObjectActor.prototype.onDecompile), - - onDisplayString: - PauseScopedActor.withPaused(ObjectActor.prototype.onDisplayString), - - onParameterNames: - PauseScopedActor.withPaused(ObjectActor.prototype.onParameterNames), - - /** - * Handle a protocol request to promote a pause-lifetime grip to a - * thread-lifetime grip. - * - * @param aRequest object - * The protocol request object. - */ - onThreadGrip: PauseScopedActor.withPaused(function (aRequest) { - this.hooks.promote(); - return {}; - }), - - /** - * Handle a protocol request to release a thread-lifetime grip. - * - * @param aRequest object - * The protocol request object. - */ - onRelease: PauseScopedActor.withPaused(function (aRequest) { - if (this.hooks.isThreadLifetimePool()) { - return { error: "notReleasable", - message: "Only thread-lifetime actors can be released." }; - } - - this.release(); - return {}; - }), -}); - -update(PauseScopedObjectActor.prototype.requestTypes, { - "threadGrip": PauseScopedObjectActor.prototype.onThreadGrip, -}); - -/** - * Creates an actor for the specified stack frame. - * - * @param aFrame Debugger.Frame - * The debuggee frame. - * @param aThreadActor ThreadActor - * The parent thread actor for this frame. - */ -function FrameActor(aFrame, aThreadActor) -{ - this.frame = aFrame; - this.threadActor = aThreadActor; -} - -FrameActor.prototype = { - actorPrefix: "frame", - - /** - * A pool that contains frame-lifetime objects, like the environment. - */ - _frameLifetimePool: null, - get frameLifetimePool() { - if (!this._frameLifetimePool) { - this._frameLifetimePool = new ActorPool(this.conn); - this.conn.addActorPool(this._frameLifetimePool); - } - return this._frameLifetimePool; - }, - - /** - * Finalization handler that is called when the actor is being evicted from - * the pool. - */ - disconnect: function () { - this.conn.removeActorPool(this._frameLifetimePool); - this._frameLifetimePool = null; - }, - - /** - * Returns a frame form for use in a protocol message. - */ - form: function () { - let threadActor = this.threadActor; - let form = { actor: this.actorID, - type: this.frame.type }; - if (this.frame.type === "call") { - form.callee = createValueGrip(this.frame.callee, threadActor._pausePool, - threadActor.objectGrip); - } - - if (this.frame.environment) { - let envActor = threadActor.createEnvironmentActor( - this.frame.environment, - this.frameLifetimePool - ); - form.environment = envActor.form(); - } - form.this = createValueGrip(this.frame.this, threadActor._pausePool, - threadActor.objectGrip); - form.arguments = this._args(); - if (this.frame.script) { - var generatedLocation = this.threadActor.sources.getFrameLocation(this.frame); - form.where = { - source: generatedLocation.generatedSourceActor.form(), - line: generatedLocation.generatedLine, - column: generatedLocation.generatedColumn - }; - } - - if (!this.frame.older) { - form.oldest = true; - } - - return form; - }, - - _args: function () { - if (!this.frame.arguments) { - return []; - } - - return this.frame.arguments.map(arg => createValueGrip(arg, - this.threadActor._pausePool, this.threadActor.objectGrip)); - }, - - /** - * Handle a protocol request to pop this frame from the stack. - * - * @param aRequest object - * The protocol request object. - */ - onPop: function (aRequest) { - // TODO: remove this when Debugger.Frame.prototype.pop is implemented - if (typeof this.frame.pop != "function") { - return { error: "notImplemented", - message: "Popping frames is not yet implemented." }; - } - - while (this.frame != this.threadActor.dbg.getNewestFrame()) { - this.threadActor.dbg.getNewestFrame().pop(); - } - this.frame.pop(aRequest.completionValue); - - // TODO: return the watches property when frame pop watch actors are - // implemented. - return { from: this.actorID }; - } -}; - -FrameActor.prototype.requestTypes = { - "pop": FrameActor.prototype.onPop, -}; - - -/** - * Creates a BreakpointActor. BreakpointActors exist for the lifetime of their - * containing thread and are responsible for deleting breakpoints, handling - * breakpoint hits and associating breakpoints with scripts. - * - * @param ThreadActor aThreadActor - * The parent thread actor that contains this breakpoint. - * @param OriginalLocation aOriginalLocation - * The original location of the breakpoint. - */ -function BreakpointActor(aThreadActor, aOriginalLocation) -{ - // The set of Debugger.Script instances that this breakpoint has been set - // upon. - this.scripts = new Set(); - - this.threadActor = aThreadActor; - this.originalLocation = aOriginalLocation; - this.condition = null; - this.isPending = true; -} - -BreakpointActor.prototype = { - actorPrefix: "breakpoint", - condition: null, - - disconnect: function () { - this.removeScripts(); - }, - - hasScript: function (aScript) { - return this.scripts.has(aScript); - }, - - /** - * Called when this same breakpoint is added to another Debugger.Script - * instance. - * - * @param aScript Debugger.Script - * The new source script on which the breakpoint has been set. - * @param ThreadActor aThreadActor - * The parent thread actor that contains this breakpoint. - */ - addScript: function (aScript) { - this.scripts.add(aScript); - this.isPending = false; - }, - - /** - * Remove the breakpoints from associated scripts and clear the script cache. - */ - removeScripts: function () { - for (let script of this.scripts) { - script.clearBreakpoint(this); - } - this.scripts.clear(); - }, - - /** - * Check if this breakpoint has a condition that doesn't error and - * evaluates to true in aFrame. - * - * @param aFrame Debugger.Frame - * The frame to evaluate the condition in - * @returns Object - * - result: boolean|undefined - * True when the conditional breakpoint should trigger a pause, false otherwise. - * If the condition evaluation failed/killed, `result` will be `undefined`. - * - message: string - * The thrown message converted to a string, when the condition throws. - */ - checkCondition: function(aFrame) { - let completion = aFrame.eval(this.condition); - if (completion) { - if (completion.throw) { - // The evaluation failed and threw - let message = "Unknown exception"; - try { - if (completion.throw.getOwnPropertyDescriptor) { - message = completion.throw.getOwnPropertyDescriptor("message").value; - } else if (completion.toString) { - message = completion.toString(); - } - } catch (ex) {} - return { - result: true, - message: message - }; - } else if (completion.yield) { - dbg_assert(false, - "Shouldn't ever get yield completions from an eval"); - } else { - return { result: completion.return ? true : false }; - } - } else { - // The evaluation was killed (possibly by the slow script dialog) - return { result: undefined }; - } - }, - - /** - * A function that the engine calls when a breakpoint has been hit. - * - * @param aFrame Debugger.Frame - * The stack frame that contained the breakpoint. - */ - hit: function (aFrame) { - // Don't pause if we are currently stepping (in or over) or the frame is - // black-boxed. - let generatedLocation = this.threadActor.sources.getFrameLocation(aFrame); - let { originalSourceActor } = this.threadActor.unsafeSynchronize( - this.threadActor.sources.getOriginalLocation(generatedLocation)); - let url = originalSourceActor.url; - - if (this.threadActor.sources.isBlackBoxed(url) - || aFrame.onStep) { - return undefined; - } - - let reason = {}; - - if (this.threadActor._hiddenBreakpoints.has(this.actorID)) { - reason.type = "pauseOnDOMEvents"; - } else if (!this.condition) { - reason.type = "breakpoint"; - // TODO: add the rest of the breakpoints on that line (bug 676602). - reason.actors = [ this.actorID ]; - } else { - let { result, message } = this.checkCondition(aFrame) - - if (result) { - if (!message) { - reason.type = "breakpoint"; - } else { - reason.type = "breakpointConditionThrown"; - reason.message = message; - } - reason.actors = [ this.actorID ]; - } else { - return undefined; - } - } - - return this.threadActor._pauseAndRespond(aFrame, reason); - }, - - /** - * Handle a protocol request to remove this breakpoint. - * - * @param aRequest object - * The protocol request object. - */ - onDelete: function (aRequest) { - // Remove from the breakpoint store. - if (this.originalLocation) { - this.threadActor.breakpointActorMap.deleteActor(this.originalLocation); - } - this.threadActor.threadLifetimePool.removeActor(this); - // Remove the actual breakpoint from the associated scripts. - this.removeScripts(); - return { from: this.actorID }; - } -}; - -BreakpointActor.prototype.requestTypes = { - "delete": BreakpointActor.prototype.onDelete -}; - -/** - * Creates an EnvironmentActor. EnvironmentActors are responsible for listing - * the bindings introduced by a lexical environment and assigning new values to - * those identifier bindings. - * - * @param Debugger.Environment aEnvironment - * The lexical environment that will be used to create the actor. - * @param ThreadActor aThreadActor - * The parent thread actor that contains this environment. - */ -function EnvironmentActor(aEnvironment, aThreadActor) -{ - this.obj = aEnvironment; - this.threadActor = aThreadActor; -} - -EnvironmentActor.prototype = { - actorPrefix: "environment", - - /** - * Return an environment form for use in a protocol message. - */ - form: function () { - let form = { actor: this.actorID }; - - // What is this environment's type? - if (this.obj.type == "declarative") { - form.type = this.obj.callee ? "function" : "block"; - } else { - form.type = this.obj.type; - } - - // Does this environment have a parent? - if (this.obj.parent) { - form.parent = (this.threadActor - .createEnvironmentActor(this.obj.parent, - this.registeredPool) - .form()); - } - - // Does this environment reflect the properties of an object as variables? - if (this.obj.type == "object" || this.obj.type == "with") { - form.object = createValueGrip(this.obj.object, - this.registeredPool, this.threadActor.objectGrip); - } - - // Is this the environment created for a function call? - if (this.obj.callee) { - form.function = createValueGrip(this.obj.callee, - this.registeredPool, this.threadActor.objectGrip); - } - - // Shall we list this environment's bindings? - if (this.obj.type == "declarative") { - form.bindings = this._bindings(); - } - - return form; - }, - - /** - * Return the identifier bindings object as required by the remote protocol - * specification. - */ - _bindings: function () { - let bindings = { arguments: [], variables: {} }; - - // TODO: this part should be removed in favor of the commented-out part - // below when getVariableDescriptor lands (bug 725815). - if (typeof this.obj.getVariable != "function") { - //if (typeof this.obj.getVariableDescriptor != "function") { - return bindings; - } - - let parameterNames; - if (this.obj.callee) { - parameterNames = this.obj.callee.parameterNames; - } else { - parameterNames = []; - } - for (let name of parameterNames) { - let arg = {}; - let value = this.obj.getVariable(name); - - // TODO: this part should be removed in favor of the commented-out part - // below when getVariableDescriptor lands (bug 725815). - let desc = { - value: value, - configurable: false, - writable: !(value && value.optimizedOut), - enumerable: true - }; - - // let desc = this.obj.getVariableDescriptor(name); - let descForm = { - enumerable: true, - configurable: desc.configurable - }; - if ("value" in desc) { - descForm.value = createValueGrip(desc.value, - this.registeredPool, this.threadActor.objectGrip); - descForm.writable = desc.writable; - } else { - descForm.get = createValueGrip(desc.get, this.registeredPool, - this.threadActor.objectGrip); - descForm.set = createValueGrip(desc.set, this.registeredPool, - this.threadActor.objectGrip); - } - arg[name] = descForm; - bindings.arguments.push(arg); - } - - for (let name of this.obj.names()) { - if (bindings.arguments.some(function exists(element) { - return !!element[name]; - })) { - continue; - } - - let value = this.obj.getVariable(name); - - // TODO: this part should be removed in favor of the commented-out part - // below when getVariableDescriptor lands. - let desc = { - value: value, - configurable: false, - writable: !(value && - (value.optimizedOut || - value.uninitialized || - value.missingArguments)), - enumerable: true - }; - - //let desc = this.obj.getVariableDescriptor(name); - let descForm = { - enumerable: true, - configurable: desc.configurable - }; - if ("value" in desc) { - descForm.value = createValueGrip(desc.value, - this.registeredPool, this.threadActor.objectGrip); - descForm.writable = desc.writable; - } else { - descForm.get = createValueGrip(desc.get || undefined, - this.registeredPool, this.threadActor.objectGrip); - descForm.set = createValueGrip(desc.set || undefined, - this.registeredPool, this.threadActor.objectGrip); - } - bindings.variables[name] = descForm; - } - - return bindings; - }, - - /** - * Handle a protocol request to change the value of a variable bound in this - * lexical environment. - * - * @param aRequest object - * The protocol request object. - */ - onAssign: function (aRequest) { - // TODO: enable the commented-out part when getVariableDescriptor lands - // (bug 725815). - /*let desc = this.obj.getVariableDescriptor(aRequest.name); - - if (!desc.writable) { - return { error: "immutableBinding", - message: "Changing the value of an immutable binding is not " + - "allowed" }; - }*/ - - try { - this.obj.setVariable(aRequest.name, aRequest.value); - } catch (e) { - if (e instanceof Debugger.DebuggeeWouldRun) { - return { error: "threadWouldRun", - cause: e.cause ? e.cause : "setter", - message: "Assigning a value would cause the debuggee to run" }; - } else { - throw e; - } - } - return { from: this.actorID }; - }, - - /** - * Handle a protocol request to fully enumerate the bindings introduced by the - * lexical environment. - * - * @param aRequest object - * The protocol request object. - */ - onBindings: function (aRequest) { - return { from: this.actorID, - bindings: this._bindings() }; - } -}; - -EnvironmentActor.prototype.requestTypes = { - "assign": EnvironmentActor.prototype.onAssign, - "bindings": EnvironmentActor.prototype.onBindings -}; - -exports.EnvironmentActor = EnvironmentActor; - -function hackDebugger(Debugger) { - // TODO: Improve native code instead of hacking on top of it - - /** - * Override the toString method in order to get more meaningful script output - * for debugging the debugger. - */ - Debugger.Script.prototype.toString = function() { - let output = ""; - if (this.url) { - output += this.url; - } - if (typeof this.staticLevel != "undefined") { - output += ":L" + this.staticLevel; - } - if (typeof this.startLine != "undefined") { - output += ":" + this.startLine; - if (this.lineCount && this.lineCount > 1) { - output += "-" + (this.startLine + this.lineCount - 1); - } - } - if (typeof this.startLine != "undefined") { - output += ":" + this.startLine; - if (this.lineCount && this.lineCount > 1) { - output += "-" + (this.startLine + this.lineCount - 1); - } - } - if (this.strictMode) { - output += ":strict"; - } - return output; - }; - - /** - * Helper property for quickly getting to the line number a stack frame is - * currently paused at. - */ - Object.defineProperty(Debugger.Frame.prototype, "line", { - configurable: true, - get: function() { - if (this.script) { - return this.script.getOffsetLine(this.offset); - } else { - return null; - } - } - }); -} - - -/** - * Creates an actor for handling chrome debugging. ChromeDebuggerActor is a - * thin wrapper over ThreadActor, slightly changing some of its behavior. - * - * @param aConnection object - * The DebuggerServerConnection with which this ChromeDebuggerActor - * is associated. (Currently unused, but required to make this - * constructor usable with addGlobalActor.) - * - * @param aParent object - * This actor's parent actor. See ThreadActor for a list of expected - * properties. - */ -function ChromeDebuggerActor(aConnection, aParent) -{ - ThreadActor.call(this, aParent); -} - -ChromeDebuggerActor.prototype = Object.create(ThreadActor.prototype); - -update(ChromeDebuggerActor.prototype, { - constructor: ChromeDebuggerActor, - - // A constant prefix that will be used to form the actor ID by the server. - actorPrefix: "chromeDebugger" -}); - -exports.ChromeDebuggerActor = ChromeDebuggerActor; - -/** - * Creates an actor for handling add-on debugging. AddonThreadActor is - * a thin wrapper over ThreadActor. - * - * @param aConnection object - * The DebuggerServerConnection with which this AddonThreadActor - * is associated. (Currently unused, but required to make this - * constructor usable with addGlobalActor.) - * - * @param aParent object - * This actor's parent actor. See ThreadActor for a list of expected - * properties. - */ -function AddonThreadActor(aConnect, aParent) { - ThreadActor.call(this, aParent); -} - -AddonThreadActor.prototype = Object.create(ThreadActor.prototype); - -update(AddonThreadActor.prototype, { - constructor: AddonThreadActor, - - // A constant prefix that will be used to form the actor ID by the server. - actorPrefix: "addonThread" -}); - -exports.AddonThreadActor = AddonThreadActor; - -// Utility functions. - -/** - * Report the given error in the error console and to stdout. - * - * @param Error aError - * The error object you wish to report. - * @param String aPrefix - * An optional prefix for the reported error message. - */ -// var oldReportError = reportError; -function reportError(aError, aPrefix="") { - // dbg_assert(aError instanceof Error, "Must pass Error objects to reportError"); - let msg = aPrefix + aError.message + ":\n" + aError.stack; - // oldReportError(msg); - log(msg); -} - -function isEvalSource(source) { - let introType = source.introductionType; - // These are all the sources that are essentially eval-ed (either - // by calling eval or passing a string to one of these functions). - return (introType === 'eval' || - introType === 'Function' || - introType === 'eventHandler' || - introType === 'setTimeout' || - introType === 'setInterval'); -} -exports.isEvalSource = isEvalSource; - -function getSourceURL(source, window) { - if (isEvalSource(source)) { - // Eval sources have no urls, but they might have a `displayURL` - // created with the sourceURL pragma. If the introduction script - // is a non-eval script, generate an full absolute URL relative to it. - - if (source.displayURL && source.introductionScript && - !isEvalSource(source.introductionScript.source)) { - - if (source.introductionScript.source.url === 'debugger eval code') { - if (window) { - // If this is a named eval script created from the console, make it - // relative to the current page. window is only available - // when we care about this. - return joinURI(window.location.href, source.displayURL); - } - } - else { - return joinURI(dirname(source.introductionScript.source.url), - source.displayURL); - } - } - - return source.displayURL; - } - else if (source.url === 'debugger eval code') { - // Treat code evaluated by the console as unnamed eval scripts - return null; - } - return source.url; -} -exports.getSourceURL = getSourceURL; - -/** - * Find the scripts which contain offsets that are an entry point to the given - * line. - * - * @param Array scripts - * The set of Debugger.Scripts to consider. - * @param Number line - * The line we are searching for entry points into. - * @returns Array of objects of the form { script, offsets } where: - * - script is a Debugger.Script - * - offsets is an array of offsets that are entry points into the - * given line. - */ -function findEntryPointsForLine(scripts, line) { - const entryPoints = []; - for (let script of scripts) { - const offsets = script.getLineOffsets(line); - if (offsets.length) { - entryPoints.push({ script, offsets }); - } - } - return entryPoints; -} - -/** - * Set breakpoints on all the given entry points with the given - * BreakpointActor as the handler. - * - * @param BreakpointActor actor - * The actor handling the breakpoint hits. - * @param Array entryPoints - * An array of objects of the form `{ script, offsets }`. - */ -function setBreakpointAtEntryPoints(actor, entryPoints) { - for (let { script, offsets } of entryPoints) { - actor.addScript(script); - for (let offset of offsets) { - script.setBreakpoint(offset, actor); - } - } -} - -/** - * Unwrap a global that is wrapped in a |Debugger.Object|, or if the global has - * become a dead object, return |undefined|. - * - * @param Debugger.Object wrappedGlobal - * The |Debugger.Object| which wraps a global. - * - * @returns {Object|undefined} - * Returns the unwrapped global object or |undefined| if unwrapping - * failed. - */ -exports.unwrapDebuggerObjectGlobal = wrappedGlobal => { - try { - // Because of bug 991399 we sometimes get nuked window references here. We - // just bail out in that case. - // - // Note that addon sandboxes have a DOMWindow as their prototype. So make - // sure that we can touch the prototype too (whatever it is), in case _it_ - // is it a nuked window reference. We force stringification to make sure - // that any dead object proxies make themselves known. - let global = wrappedGlobal.unsafeDereference(); - Object.getPrototypeOf(global) + ""; - return global; - } - catch (e) { - return undefined; - } -}; diff --git a/cocos/scripting/js-bindings/script/debugger/actors/utils/ScriptStore.js b/cocos/scripting/js-bindings/script/debugger/actors/utils/ScriptStore.js deleted file mode 100644 index e064dda5c41a..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/utils/ScriptStore.js +++ /dev/null @@ -1,243 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { noop } = DevToolsUtils; - -/** - * A `ScriptStore` is a cache of `Debugger.Script` instances. It holds strong - * references to the cached scripts to alleviate the GC-sensitivity issues that - * plague `Debugger.prototype.findScripts`, but this means that its lifetime - * must be managed carefully. It is the `ScriptStore` user's responsibility to - * ensure that the `ScriptStore` stays up to date. - * - * Implementation Notes: - * - * The ScriptStore's prototype methods are very hot, in general. To help the - * JIT, they avoid ES6-isms and higher-order iteration functions, for the most - * part. You might be wondering why we don't maintain indices on, say, - * Debugger.Source for faster querying, if these methods are so hot. First, the - * hottest method is actually just getting all scripts; second, populating the - * store becomes prohibitively expensive. So we fall back to linear queries - * (which isn't so bad, because Debugger.prototype.findScripts is also linear). - */ -function ScriptStore() { - // Set of every Debugger.Script in the cache. - this._scripts = new NoDeleteSet; -} - -// module.exports = ScriptStore; - -ScriptStore.prototype = { - // Populating a ScriptStore. - - /** - * Add one script to the cache. - * - * @param Debugger.Script script - */ - addScript: function(script) { - this._scripts.add(script); - }, - - /** - * Add many scripts to the cache at once. - * - * @param Array scripts - * The set of Debugger.Scripts to add to the cache. - */ - addScripts: function(scripts) { - for (var i = 0, len = scripts.length; i < len; i++) { - this.addScript(scripts[i]); - } - }, - - // Querying a ScriptStore. - - /** - * Get all the sources for which we have scripts cached. - * - * @returns Array of Debugger.Source - */ - getSources: function() { - return [...new Set(this._scripts.items.map(s => s.source))]; - }, - - /** - * Get all the scripts in the cache. - * - * @returns read-only Array of Debugger.Script. - * - * NB: The ScriptStore retains ownership of the returned array, and the - * ScriptStore's consumers MUST NOT MODIFY its contents! - */ - getAllScripts: function() { - return this._scripts.items; - }, - - getScriptsBySourceActor: function(sourceActor) { - return sourceActor.source ? - this.getScriptsBySource(sourceActor.source) : - this.getScriptsByURL(sourceActor._originalUrl); - }, - - getScriptsBySourceActorAndLine: function(sourceActor, line) { - return sourceActor.source ? - this.getScriptsBySourceAndLine(sourceActor.source, line) : - this.getScriptsByURLAndLine(sourceActor._originalUrl, line); - }, - - /** - * Get all scripts produced from the given source. - * - * @param Debugger.Source source - * @returns Array of Debugger.Script - */ - getScriptsBySource: function(source) { - var results = []; - var scripts = this._scripts.items; - var length = scripts.length; - for (var i = 0; i < length; i++) { - if (scripts[i].source === source) { - results.push(scripts[i]); - } - } - return results; - }, - - /** - * Get all scripts produced from the given source whose source code definition - * spans the given line. - * - * @param Debugger.Source source - * @param Number line - * @returns Array of Debugger.Script - */ - getScriptsBySourceAndLine: function(source, line) { - var results = []; - var scripts = this._scripts.items; - var length = scripts.length; - for (var i = 0; i < length; i++) { - var script = scripts[i]; - if (script.source === source && - script.startLine <= line && - (script.startLine + script.lineCount) > line) { - results.push(script); - } - } - return results; - }, - - /** - * Get all scripts defined by a source at the given URL. - * - * @param String url - * @returns Array of Debugger.Script - */ - getScriptsByURL: function(url) { - var results = []; - var scripts = this._scripts.items; - var length = scripts.length; - for (var i = 0; i < length; i++) { - if (scripts[i].url === url) { - results.push(scripts[i]); - } - } - return results; - }, - - /** - * Get all scripts defined by a source a the given URL and whose source code - * definition spans the given line. - * - * @param String url - * @param Number line - * @returns Array of Debugger.Script - */ - getScriptsByURLAndLine: function(url, line) { - var results = []; - var scripts = this._scripts.items; - var length = scripts.length; - for (var i = 0; i < length; i++) { - var script = scripts[i]; - if (script.url === url && - script.startLine <= line && - (script.startLine + script.lineCount) > line) { - results.push(script); - } - } - return results; - }, -}; - - -/** - * A set which can only grow, and does not support the delete operation. - * Provides faster iteration than the native Set by maintaining an array of all - * items, in addition to the internal set of all items, which allows direct - * iteration (without the iteration protocol and calling into C++, which are - * both expensive). - */ -function NoDeleteSet() { - this._set = new Set(); - this.items = []; -} - -NoDeleteSet.prototype = { - /** - * An array containing every item in the set for convenience and faster - * iteration. This is public for reading only, and consumers MUST NOT modify - * this array! - */ - items: null, - - /** - * Add an item to the set. - * - * @param any item - */ - add: function(item) { - if (!this._set.has(item)) { - this._set.add(item); - this.items.push(item); - } - }, - - /** - * Return true if the item is in the set, false otherwise. - * - * @param any item - * @returns Boolean - */ - has: function(item) { - return this._set.has(item); - } -}; diff --git a/cocos/scripting/js-bindings/script/debugger/actors/utils/TabSources.js b/cocos/scripting/js-bindings/script/debugger/actors/utils/TabSources.js deleted file mode 100644 index 0a70a70f9534..000000000000 --- a/cocos/scripting/js-bindings/script/debugger/actors/utils/TabSources.js +++ /dev/null @@ -1,829 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -// const { Ci, Cu } = require("chrome"); -// const Services = require("Services"); -// const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); -// const { dbg_assert, fetch } = DevToolsUtils; -// const EventEmitter = require("devtools/toolkit/event-emitter"); -// const { OriginalLocation, GeneratedLocation, getOffsetColumn } = require("devtools/server/actors/common"); -// const { resolve } = require("promise"); - -// loader.lazyRequireGetter(this, "SourceActor", "devtools/server/actors/script", true); -// loader.lazyRequireGetter(this, "isEvalSource", "devtools/server/actors/script", true); -// loader.lazyRequireGetter(this, "SourceMapConsumer", "source-map", true); -// loader.lazyRequireGetter(this, "SourceMapGenerator", "source-map", true); - -/** - * Manages the sources for a thread. Handles source maps, locations in the - * sources, etc for ThreadActors. - */ -function TabSources(threadActor, allowSourceFn=() => true) { - EventEmitter.decorate(this); - - this._thread = threadActor; - this._useSourceMaps = true; - this._autoBlackBox = true; - this._anonSourceMapId = 1; - this.allowSource = source => { - return !isHiddenSource(source) && allowSourceFn(source); - } - - this.blackBoxedSources = new Set(); - this.prettyPrintedSources = new Map(); - - // generated Debugger.Source -> promise of SourceMapConsumer - this._sourceMaps = new Map(); - // sourceMapURL -> promise of SourceMapConsumer - this._sourceMapCache = Object.create(null); - // Debugger.Source -> SourceActor - this._sourceActors = new Map(); - // url -> SourceActor - this._sourceMappedSourceActors = Object.create(null); -} - -/** - * Matches strings of the form "foo.min.js" or "foo-min.js", etc. If the regular - * expression matches, we can be fairly sure that the source is minified, and - * treat it as such. - */ -const MINIFIED_SOURCE_REGEXP = /\bmin\.js$/; - -TabSources.prototype = { - /** - * Update preferences and clear out existing sources - */ - reconfigure: function(options) { - if ('useSourceMaps' in options) { - this._useSourceMaps = options.useSourceMaps; - } - - if ('autoBlackBox' in options) { - this._autoBlackBox = options.autoBlackBox; - } - - this.reset(); - }, - - /** - * Clear existing sources so they are recreated on the next access. - * - * @param Object opts - * Specify { sourceMaps: true } if you also want to clear - * the source map cache (usually done on reload). - */ - reset: function(opts={}) { - this._sourceActors = new Map(); - this._sourceMaps = new Map(); - this._sourceMappedSourceActors = Object.create(null); - - if (opts.sourceMaps) { - this._sourceMapCache = Object.create(null); - } - }, - - /** - * Return the source actor representing the `source` (or - * `originalUrl`), creating one if none exists already. May return - * null if the source is disallowed. - * - * @param Debugger.Source source - * The source to make an actor for - * @param String originalUrl - * The original source URL of a sourcemapped source - * @param optional Debguger.Source generatedSource - * The generated source that introduced this source via source map, - * if any. - * @param optional String contentType - * The content type of the source, if immediately available. - * @returns a SourceActor representing the source or null. - */ - source: function ({ source, originalUrl, generatedSource, - isInlineSource, contentType }) { - dbg_assert(source || (originalUrl && generatedSource), - "TabSources.prototype.source needs an originalUrl or a source"); - - if (source) { - // If a source is passed, we are creating an actor for a real - // source, which may or may not be sourcemapped. - - if (!this.allowSource(source)) { - return null; - } - - // It's a hack, but inline HTML scripts each have real sources, - // but we want to represent all of them as one source as the - // HTML page. The actor representing this fake HTML source is - // stored in this array, which always has a URL, so check it - // first. - if (source.url in this._sourceMappedSourceActors) { - return this._sourceMappedSourceActors[source.url]; - } - - if (isInlineSource) { - // If it's an inline source, the fake HTML source hasn't been - // created yet (would have returned above), so flip this source - // into a sourcemapped state by giving it an `originalUrl` which - // is the HTML url. - originalUrl = source.url; - source = null; - } - else if (this._sourceActors.has(source)) { - return this._sourceActors.get(source); - } - } - else if (originalUrl) { - // Not all "original" scripts are distinctly separate from the - // generated script. Pretty-printed sources have a sourcemap for - // themselves, so we need to make sure there a real source - // doesn't already exist with this URL. - for (let [source, actor] of this._sourceActors) { - if (source.url === originalUrl) { - return actor; - } - } - - if (originalUrl in this._sourceMappedSourceActors) { - return this._sourceMappedSourceActors[originalUrl]; - } - } - - let actor = new SourceActor({ - thread: this._thread, - source: source, - originalUrl: originalUrl, - generatedSource: generatedSource, - isInlineSource: isInlineSource, - contentType: contentType - }); - - let sourceActorStore = this._thread.sourceActorStore; - var id = sourceActorStore.getReusableActorId(source, originalUrl); - if (id) { - actor.actorID = id; - } - - this._thread.threadLifetimePool.addActor(actor); - sourceActorStore.setReusableActorId(source, originalUrl, actor.actorID); - - if (this._autoBlackBox && this._isMinifiedURL(actor.url)) { - this.blackBox(actor.url); - } - - if (source) { - this._sourceActors.set(source, actor); - } - else { - this._sourceMappedSourceActors[originalUrl] = actor; - } - - this._emitNewSource(actor); - return actor; - }, - - _emitNewSource: function(actor) { - if (!actor.source) { - // Always notify if we don't have a source because that means - // it's something that has been sourcemapped, or it represents - // the HTML file that contains inline sources. - this.emit('newSource', actor); - } - else { - // If sourcemapping is enabled and a source has sourcemaps, we - // create `SourceActor` instances for both the original and - // generated sources. The source actors for the generated - // sources are only for internal use, however; breakpoints are - // managed by these internal actors. We only want to notify the - // user of the original sources though, so if the actor has a - // `Debugger.Source` instance and a valid source map (meaning - // it's a generated source), don't send the notification. - this.fetchSourceMap(actor.source).then(map => { - if (!map) { - this.emit('newSource', actor); - } - }); - } - }, - - getSourceActor: function(source) { - if (source.url in this._sourceMappedSourceActors) { - return this._sourceMappedSourceActors[source.url]; - } - - if (this._sourceActors.has(source)) { - return this._sourceActors.get(source); - } - - throw new Error('getSource: could not find source actor for ' + - (source.url || 'source')); - }, - - getSourceActorByURL: function(url) { - if (url) { - for (let [source, actor] of this._sourceActors) { - if (source.url === url) { - return actor; - } - } - - if (url in this._sourceMappedSourceActors) { - return this._sourceMappedSourceActors[url]; - } - } - - throw new Error('getSourceByURL: could not find source for ' + url); - }, - - /** - * Returns true if the URL likely points to a minified resource, false - * otherwise. - * - * @param String aURL - * The URL to test. - * @returns Boolean - */ - _isMinifiedURL: function (aURL) { - try { - let url = Services.io.newURI(aURL, null, null) - .QueryInterface(Ci.nsIURL); - return MINIFIED_SOURCE_REGEXP.test(url.fileName); - } catch (e) { - // Not a valid URL so don't try to parse out the filename, just test the - // whole thing with the minified source regexp. - return MINIFIED_SOURCE_REGEXP.test(aURL); - } - }, - - /** - * Create a source actor representing this source. This ignores - * source mapping and always returns an actor representing this real - * source. Use `createSourceActors` if you want to respect source maps. - * - * @param Debugger.Source aSource - * The source instance to create an actor for. - * @returns SourceActor - */ - createNonSourceMappedActor: function (aSource) { - // Don't use getSourceURL because we don't want to consider the - // displayURL property if it's an eval source. We only want to - // consider real URLs, otherwise if there is a URL but it's - // invalid the code below will not set the content type, and we - // will later try to fetch the contents of the URL to figure out - // the content type, but it's a made up URL for eval sources. - let url = isEvalSource(aSource) ? null : aSource.url; - let spec = { source: aSource }; - - // XXX bug 915433: We can't rely on Debugger.Source.prototype.text - // if the source is an HTML-embedded