merge cocos

This commit is contained in:
yangxiao 2015-09-17 14:24:01 +08:00
commit 572ee3adb2
639 changed files with 30320 additions and 18864 deletions

View File

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

View File

@ -412,6 +412,7 @@ Developers:
UI: Added ScrollViewBar for displaying a scroll bar at the side of ScrollView
UI: Added RadioButton widget
UI: Refined scroll event dispatching for ScrollView
platform: Fixed Android app occasionally freeze issue caused by Cocos2dxRenderer.nativeOnResume() is not called when the activity is resumed
Sam Clegg (sbc100)
Author of Native Client port.
@ -1157,7 +1158,10 @@ Developers:
perminovVS
Optimize Vec3 and Vec2
Added `UserDefault::setDelegate()`
FileUtils: Added FileUtils::getSuitableFOpen() for convert utf8 to locale, for specific platform
platform: Correct all usage of unicode version winapi in FileUtils for win32
FileUtils: Added FileUtils::getFileExtension for getting file's extension name
utils: Made utils::captureScreen saving file in another thread to improve the performance
qiutaoleo
Added a feature to check case characters for filename on windows

View File

@ -1,4 +1,5 @@
cocos2d-x-3.8 rc0 ??
cocos2d-x-3.8 final September.6 2015
cocos2d-x-3.8 rc0 August.26 2015
cocos2d-x-3.8 beta0 August.14 2015
[HIGHLIGHT] 3D: Added 3d physics collider
@ -7,7 +8,7 @@ cocos2d-x-3.8 beta0 August.14 2015
[HIGHLIGHT] FileUtils: Added a set of file writing APIs: writeStringToFile, writeDataToFile, writeValueMapToFile, writeValueVectorToFile
[HIGHLIGHT] UI: Refined UI system
[HIGHLIGHT] UI: Added RadioButton widget (JSB/Lua ready)
[HIGHLIGHT] UI: Reimplemented and enhanced EditBox on Android
[HIGHLIGHT] UI: Reimplemented and enhanced EditBox on Android: display cursor; support copy, cut, paste and select actions; support multi-line input; pretty adjustment when virtual keyboard shown
[HIGHLIGHT] JS: Bound new AudioEngine in JSB
[HIGHLIGHT] JS: Merged JSB test project into cocos2d test project
[HIGHLIGHT] network: Upgrade SocketIO support to v1.x
@ -27,6 +28,7 @@ cocos2d-x-3.8 beta0 August.14 2015
[NEW] audio: AudioEngine supported audio preloading
[NEW] UserDefault: Supported removing key pairs from UserDefault
[NEW] spine: Supported Spine runtime 2.3 (Both native and web engine)
[NEW] JS: Added auto binding for BlendFuncFrame
[NEW] console: Supported new portrait projects from templates
[NEW] console: Moved the framework-compile tools into cocos2d-console
[NEW] framework: Support generate prebuilt libs of engine with debug mode
@ -35,6 +37,10 @@ cocos2d-x-3.8 beta0 August.14 2015
[REFINE] 3D: Supported composite 2D/3D scene by moving UI and camera far away
[REFINE] 3D: Improved Particle3D performance
[REFINE] 3D: Made SkyBox not transparent
[REFINE] 3D: Enable depth write for SkyBox
[REFINE] 3D: Enable depth write for transparent object
[REFINE] 3D: Set depth test function of Skybox brush to always
[REFINE] renderer: Enabled blending all the time for 2D render queue
[REFINE] Director: Made types to handle time consistent by modifing setAnimationInterval argument from double to float
[REFINE] Sprite: Made Sprite::setTexture accept nullptr as parameter
[REFINE] TextureCache: Made addImageAsync function thread safe
@ -52,6 +58,7 @@ cocos2d-x-3.8 beta0 August.14 2015
[REFINE] studio: Avoid CSLoader from openning csb file multiple times with fopen
[REFINE] studio: Added BlendFrame support to Skeleton Animation
[REFINE] studio: Enabled blendfunc cascade to the skin of BoneNode
[REFINE] studio: Update reader with parse logic for valid attribute of SkyBox
[REFINE] FileUtils: Remove old path while adding existing search path
[REFINE] Device: Implemented Device::getDPI for Mac
[REFINE] network: Refine NSLog in HttpAsynConnection in release mode
@ -92,6 +99,7 @@ cocos2d-x-3.8 beta0 August.14 2015
[FIX] renderer: Fixed shader issue by reloading shader when light number changed
[FIX] Scheduler: Fixed timer's delta time is error when interval equals to zero
[FIX] Scheduler: Fixed Pause/Resume act incorrectly
[FIX] Scheduler: Fixed the callback will be executed multiple times if the value of delay parameter equal zero
[FIX] Node: Fixed issue that euler angle is NaN when update Euler angle from quaternion and asin value is not between -1 and 1 by accident
[FIX] Scene: Fixed bug that can't add custom member to Scene subclass
[FIX] Sprite: Fixed some warnings and a related bug in CCSprite
@ -131,6 +139,9 @@ cocos2d-x-3.8 beta0 August.14 2015
[FIX] UI: Fixed EditBox input maxLength for Chinese character issue on iOS
[FIX] UI: Fixed EditBox turning black when soft keyboard hiding
[FIX] UI: Fixed scrollview innerContainer initial position error
[FIX] UI: Fixed issue that Slider create function is not taking account of res type (TextureResType)
[FIX] Scale9Sprite: Fixed Scale9Sprite default capInset bug
[FIX] Scale9Sprite: Fixed issue that Scale9Sprite draw extra 1 pixel when creating from spritesheet
[FIX] studio: Removed "using namespace cocos2d" from CCFrame.h
[FIX] studio: Fixed the SkyBox display error while parsed from editor files
[FIX] studio: Fixed userCamera flag error while parsing old version exported files
@ -138,6 +149,8 @@ cocos2d-x-3.8 beta0 August.14 2015
[FIX] studio: Fixed crash when loading cocostudio json files with null or empty fontName
[FIX] studio: Fixed bug that setColor works on a whole armature, but not on an individual bone
[FIX] studio: Fixed object size error while data is error
[FIX] studio: Fixed issue that bone's color and opacity cannot cascade to bone
[FIX] studio: Fixed issue that bone can be see by other cameras
[FIX] ClippingNode: Removed CCClippingRectangleNode transform error support
[FIX] spine: Fixed the position of debug draw of bones is incorrect
[FIX] spine: Fixed memory leak caused by SkeletonRenderer::initialize
@ -174,6 +187,7 @@ cocos2d-x-3.8 beta0 August.14 2015
[FIX] platform: Removed unneeded protocol for AppController on iOS
[FIX] platform: Fixed link errors in release mode on win32
[FIX] platform: Fixed Windows 10 UWP and WP8.1 app certification issue
[FIX] platform: Fixed Android app occasionally freeze issue caused by Cocos2dxRenderer.nativeOnResume() is not called when the activity is resumed
[FIX] web: Fixed a bug that VideoPlayer remove event throw error
[FIX] web: Fixed Armature position error in studio JSON parser
[FIX] web: Fixed default clearColor error in director
@ -187,6 +201,9 @@ cocos2d-x-3.8 beta0 August.14 2015
[FIX] web: Fixed logic issue in Menu's _onTouchCancelled function
[FIX] web: Fixed MenuItem crash when normal image is null
[FIX] web: Fixed CCTouch's startPoint unset issue
[FIX] web: Fixed incomplete fadeout effects
[FIX] web: Fixed issue that return value of cc.screen.fullScreen is not boolean
[FIX] web: Fixed a bug that SkeletonNode is not drawing children
[TEST] 3D: Avoid to trigger touch event multiple times in Physics3D Test and Physics3D Constraint Test
[TEST] 3D: Fixed Sprite3D test background to foreground bug

View File

@ -6,8 +6,8 @@ cocos2d-x
| |iOS|Mac|Linux|Win32|Android|Win8.1-Universal|
| ----|----|----- | ---|----|------|---|
|v3|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=ios)](http://45.56.80.45:8080/job/daily-build-v3/node=ios)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=mac)](http://45.56.80.45:8080/job/daily-build-v3/node=mac)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=linux)](http://45.56.80.45:8080/job/daily-build-v3/node=linux)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=win32)](http://45.56.80.45:8080/job/daily-build-v3/node=win32)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=android)](http://45.56.80.45:8080/job/daily-build-v3/node=android)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=windows-universal)](http://45.56.80.45:8080/job/daily-build-v3/node=windows-universal)|
|v4|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=ios)](http://45.56.80.45:8080/job/daily-build-v4/node=ios)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=mac)](http://45.56.80.45:8080/job/daily-build-v4/node=mac)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=linux)](http://45.56.80.45:8080/job/daily-build-v4/node=linux)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=win32)](http://45.56.80.45:8080/job/daily-build-v4/node=win32)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=android)](http://45.56.80.45:8080/job/daily-build-v4/node=android)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=windows-universal)](http://45.56.80.45:8080/job/daily-build-v4/node=windows-universal)|
|v3|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=ios)](http://45.56.80.45:8080/job/daily-build-v3/node=ios)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=mac)](http://45.56.80.45:8080/job/daily-build-v3/node=mac)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=linux)](http://45.56.80.45:8080/job/daily-build-v3/node=linux)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=win32_bak)](http://45.56.80.45:8080/job/daily-build-v3/node=win32_bak)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=android)](http://45.56.80.45:8080/job/daily-build-v3/node=android)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v3/node=windows-universal_bak)](http://45.56.80.45:8080/job/daily-build-v3/node=windows-universal_bak)|
|v4|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=ios)](http://45.56.80.45:8080/job/daily-build-v4/node=ios)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=mac)](http://45.56.80.45:8080/job/daily-build-v4/node=mac)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=linux)](http://45.56.80.45:8080/job/daily-build-v4/node=linux)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=win32_bak)](http://45.56.80.45:8080/job/daily-build-v4/node=win32_bak)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=android)](http://45.56.80.45:8080/job/daily-build-v4/node=android)|[![Build Status](http://45.56.80.45:8080/buildStatus/icon?job=daily-build-v4/node=windows-universal_bak)](http://45.56.80.45:8080/job/daily-build-v4/node=windows-universal_bak)|

View File

@ -31,6 +31,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\cocos\sc
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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@ -111,6 +113,12 @@ Global
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1219,6 +1219,17 @@
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 */; };
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 */; };
299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; };
299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; };
@ -1310,6 +1321,10 @@
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 */; };
@ -1479,12 +1494,6 @@
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 */; };
5070032A1B69826F00E83DDD /* CCDownloaderImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003281B69826F00E83DDD /* CCDownloaderImpl.cpp */; };
5070032B1B69826F00E83DDD /* CCDownloaderImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 507003281B69826F00E83DDD /* CCDownloaderImpl.cpp */; };
5070032C1B69826F00E83DDD /* CCDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 507003291B69826F00E83DDD /* CCDownloaderImpl.h */; };
5070032D1B69826F00E83DDD /* CCDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 507003291B69826F00E83DDD /* CCDownloaderImpl.h */; };
5070032F1B69898400E83DDD /* CCIDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5070032E1B69898400E83DDD /* CCIDownloaderImpl.h */; };
507003301B69898400E83DDD /* CCIDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5070032E1B69898400E83DDD /* CCIDownloaderImpl.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 */; };
@ -1871,11 +1880,39 @@
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 */; };
943CF4541B7DB10F00B6303F /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943CF4521B7DB10F00B6303F /* GameNode3DReader.cpp */; };
943CF4551B7DB10F00B6303F /* GameNode3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943CF4521B7DB10F00B6303F /* GameNode3DReader.cpp */; };
943CF4561B7DB10F00B6303F /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 943CF4531B7DB10F00B6303F /* GameNode3DReader.h */; };
943CF4571B7DB10F00B6303F /* GameNode3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 943CF4531B7DB10F00B6303F /* GameNode3DReader.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 */; };
A045F6D91BA81577005076C7 /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6D51BA81577005076C7 /* CCTextureCube.h */; };
A045F6DC1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */; };
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 */; };
A045F6E41BA8170A005076C7 /* CCComponentPhysics2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6E01BA8170A005076C7 /* CCComponentPhysics2d.cpp */; };
A045F6E51BA8170A005076C7 /* CCComponentPhysics2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6E01BA8170A005076C7 /* CCComponentPhysics2d.cpp */; };
A045F6E61BA8170A005076C7 /* CCComponentPhysics2d.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6E11BA8170A005076C7 /* CCComponentPhysics2d.h */; };
A045F6E71BA8170A005076C7 /* CCComponentPhysics2d.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6E11BA8170A005076C7 /* CCComponentPhysics2d.h */; };
A045F6E81BA8170A005076C7 /* CCPhysicsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6E21BA8170A005076C7 /* CCPhysicsManager.cpp */; };
A045F6E91BA8170A005076C7 /* CCPhysicsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A045F6E21BA8170A005076C7 /* CCPhysicsManager.cpp */; };
A045F6EA1BA8170A005076C7 /* CCPhysicsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6E31BA8170A005076C7 /* CCPhysicsManager.h */; };
A045F6EB1BA8170A005076C7 /* CCPhysicsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A045F6E31BA8170A005076C7 /* CCPhysicsManager.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 */; };
A0534A681B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */; };
A0534A6A1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */; };
A0534A6B1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */; };
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 */; };
@ -2059,18 +2096,10 @@
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 */; };
B62305641B8ABA6600F0745D /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B62305621B8ABA6600F0745D /* CCTextureCube.cpp */; };
B62305651B8ABA6600F0745D /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B62305621B8ABA6600F0745D /* CCTextureCube.cpp */; };
B62305661B8ABA6600F0745D /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = B62305631B8ABA6600F0745D /* CCTextureCube.h */; };
B62305671B8ABA6600F0745D /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = B62305631B8ABA6600F0745D /* CCTextureCube.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 */; };
B64073311B8FFA60005495CE /* CCMotionStreak3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B640732F1B8FFA60005495CE /* CCMotionStreak3D.cpp */; };
B64073321B8FFA60005495CE /* CCMotionStreak3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B640732F1B8FFA60005495CE /* CCMotionStreak3D.cpp */; };
B64073331B8FFA60005495CE /* CCMotionStreak3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B64073301B8FFA60005495CE /* CCMotionStreak3D.h */; };
B64073341B8FFA60005495CE /* CCMotionStreak3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B64073301B8FFA60005495CE /* CCMotionStreak3D.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 */; };
@ -3607,10 +3636,6 @@
B6DD2FF61B04825B00E47F5F /* fastlz.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA51B04825B00E47F5F /* fastlz.c */; };
B6DD2FF71B04825B00E47F5F /* fastlz.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA61B04825B00E47F5F /* fastlz.h */; };
B6DD2FF81B04825B00E47F5F /* fastlz.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA61B04825B00E47F5F /* fastlz.h */; };
B6DD36D51B8564EC0044745A /* CCCameraBackgroundBrush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD36D31B8564EC0044745A /* CCCameraBackgroundBrush.cpp */; };
B6DD36D61B8564EC0044745A /* CCCameraBackgroundBrush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD36D31B8564EC0044745A /* CCCameraBackgroundBrush.cpp */; };
B6DD36D71B8564EC0044745A /* CCCameraBackgroundBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD36D41B8564EC0044745A /* CCCameraBackgroundBrush.h */; };
B6DD36D81B8564EC0044745A /* CCCameraBackgroundBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD36D41B8564EC0044745A /* CCCameraBackgroundBrush.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 */; };
@ -4108,6 +4133,17 @@
29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIWebViewImpl-ios.mm"; sourceTree = "<group>"; };
2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = "<group>"; };
2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = "<group>"; };
2980F0171BA9A5550059E678 /* CCUIEditBoxIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIEditBoxIOS.h; sourceTree = "<group>"; };
2980F0181BA9A5550059E678 /* CCUIEditBoxIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIEditBoxIOS.mm; sourceTree = "<group>"; };
2980F0191BA9A5550059E678 /* CCUIMultilineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUIMultilineTextField.h; sourceTree = "<group>"; };
2980F01A1BA9A5550059E678 /* CCUIMultilineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUIMultilineTextField.mm; sourceTree = "<group>"; };
2980F01B1BA9A5550059E678 /* CCUISingleLineTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUISingleLineTextField.h; sourceTree = "<group>"; };
2980F01C1BA9A5550059E678 /* CCUISingleLineTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCUISingleLineTextField.mm; sourceTree = "<group>"; };
2980F01D1BA9A5550059E678 /* CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUITextInput.h; sourceTree = "<group>"; };
2980F01E1BA9A5550059E678 /* UITextField+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextField+CCUITextInput.h"; sourceTree = "<group>"; };
2980F01F1BA9A5550059E678 /* UITextField+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextField+CCUITextInput.mm"; sourceTree = "<group>"; };
2980F0201BA9A5550059E678 /* UITextView+CCUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+CCUITextInput.h"; sourceTree = "<group>"; };
2980F0211BA9A5550059E678 /* UITextView+CCUITextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextView+CCUITextInput.mm"; sourceTree = "<group>"; };
2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = "<group>"; };
2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = "<group>"; };
299754F2193EC95400A54AC3 /* ObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFactory.cpp; path = ../base/ObjectFactory.cpp; sourceTree = "<group>"; };
@ -4173,6 +4209,8 @@
38F5263B1A48363B000DB7F7 /* ArmatureNodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArmatureNodeReader.cpp; sourceTree = "<group>"; };
38F5263C1A48363B000DB7F7 /* ArmatureNodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArmatureNodeReader.h; sourceTree = "<group>"; };
38F5263D1A48363B000DB7F7 /* CSArmatureNode_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSArmatureNode_generated.h; sourceTree = "<group>"; };
3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMotionStreak3D.cpp; sourceTree = "<group>"; };
3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMotionStreak3D.h; sourceTree = "<group>"; };
3E2BDADD19C030ED0055CDCD /* AudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioEngine.h; sourceTree = "<group>"; };
3E2BDAEB19C0436F0055CDCD /* AudioEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioEngine.cpp; sourceTree = "<group>"; };
3E6176551960F89B00DE83F5 /* CCController-iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "CCController-iOS.mm"; path = "../base/CCController-iOS.mm"; sourceTree = "<group>"; };
@ -4426,9 +4464,6 @@
507003181B69735200E83DDD /* HttpClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpClient.cpp; sourceTree = "<group>"; };
507003191B69735200E83DDD /* HttpConnection-winrt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "HttpConnection-winrt.cpp"; sourceTree = "<group>"; };
5070031A1B69735200E83DDD /* HttpConnection-winrt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HttpConnection-winrt.h"; sourceTree = "<group>"; };
507003281B69826F00E83DDD /* CCDownloaderImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDownloaderImpl.cpp; sourceTree = "<group>"; };
507003291B69826F00E83DDD /* CCDownloaderImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDownloaderImpl.h; sourceTree = "<group>"; };
5070032E1B69898400E83DDD /* CCIDownloaderImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIDownloaderImpl.h; sourceTree = "<group>"; };
5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = "<group>"; };
50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAffineTransform.cpp; sourceTree = "<group>"; };
50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAffineTransform.h; sourceTree = "<group>"; };
@ -4664,9 +4699,24 @@
5E9F61251A3FFE3D0038DE01 /* CCPlane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlane.h; sourceTree = "<group>"; };
8525E3A11B291E42008EE815 /* clipper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = clipper.hpp; sourceTree = "<group>"; };
85B374381B204B9400C488D6 /* clipper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clipper.cpp; sourceTree = "<group>"; };
943CF4521B7DB10F00B6303F /* GameNode3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameNode3DReader.cpp; sourceTree = "<group>"; };
943CF4531B7DB10F00B6303F /* GameNode3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameNode3DReader.h; sourceTree = "<group>"; };
A045F6D41BA81577005076C7 /* CCTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTextureCube.cpp; sourceTree = "<group>"; };
A045F6D51BA81577005076C7 /* CCTextureCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTextureCube.h; sourceTree = "<group>"; };
A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCameraBackgroundBrush.cpp; sourceTree = "<group>"; };
A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCameraBackgroundBrush.h; sourceTree = "<group>"; };
A045F6E01BA8170A005076C7 /* CCComponentPhysics2d.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCComponentPhysics2d.cpp; sourceTree = "<group>"; };
A045F6E11BA8170A005076C7 /* CCComponentPhysics2d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComponentPhysics2d.h; sourceTree = "<group>"; };
A045F6E21BA8170A005076C7 /* CCPhysicsManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsManager.cpp; sourceTree = "<group>"; };
A045F6E31BA8170A005076C7 /* CCPhysicsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsManager.h; sourceTree = "<group>"; };
A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameNode3DReader.cpp; sourceTree = "<group>"; };
A045F6EE1BA81821005076C7 /* GameNode3DReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameNode3DReader.h; sourceTree = "<group>"; };
A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDownloader-apple.h"; sourceTree = "<group>"; };
A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDownloader-apple.mm"; sourceTree = "<group>"; };
A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIDownloaderImpl.h; sourceTree = "<group>"; };
A05DCF9B1B90584E00EE040B /* CCDownloader-curl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCDownloader-curl.cpp"; sourceTree = "<group>"; };
A05DCF9C1B90584E00EE040B /* CCDownloader-curl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDownloader-curl.h"; sourceTree = "<group>"; };
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 = "<group>"; };
A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-common.h"; sourceTree = "<group>"; };
B20564AA1A6E5744001C1B6E /* ccShader_PositionColorTextureAsPointsize.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionColorTextureAsPointsize.vert; sourceTree = "<group>"; };
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; };
@ -4775,12 +4825,8 @@
B603F1B21AC8F1FD00A9579C /* ccShader_3D_Terrain.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Terrain.vert; sourceTree = "<group>"; };
B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBillBoard.cpp; sourceTree = "<group>"; };
B60C5BD319AC68B10056FBDE /* CCBillBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBillBoard.h; sourceTree = "<group>"; };
B62305621B8ABA6600F0745D /* CCTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTextureCube.cpp; sourceTree = "<group>"; };
B62305631B8ABA6600F0745D /* CCTextureCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTextureCube.h; sourceTree = "<group>"; };
B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCAsyncTaskPool.cpp; path = ../base/CCAsyncTaskPool.cpp; sourceTree = "<group>"; };
B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCAsyncTaskPool.h; path = ../base/CCAsyncTaskPool.h; sourceTree = "<group>"; };
B640732F1B8FFA60005495CE /* CCMotionStreak3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMotionStreak3D.cpp; sourceTree = "<group>"; };
B64073301B8FFA60005495CE /* CCMotionStreak3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMotionStreak3D.h; sourceTree = "<group>"; };
B665E0CC1AA80A6500DDB1C5 /* CCPUAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAffector.cpp; path = Particle3D/PU/CCPUAffector.cpp; sourceTree = "<group>"; };
B665E0CD1AA80A6500DDB1C5 /* CCPUAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUAffector.h; path = Particle3D/PU/CCPUAffector.h; sourceTree = "<group>"; };
B665E0CE1AA80A6500DDB1C5 /* CCPUAffectorManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUAffectorManager.cpp; path = Particle3D/PU/CCPUAffectorManager.cpp; sourceTree = "<group>"; };
@ -5556,8 +5602,6 @@
B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourTileCacheBuilder.h; sourceTree = "<group>"; };
B6DD2FA51B04825B00E47F5F /* fastlz.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fastlz.c; sourceTree = "<group>"; };
B6DD2FA61B04825B00E47F5F /* fastlz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fastlz.h; sourceTree = "<group>"; };
B6DD36D31B8564EC0044745A /* CCCameraBackgroundBrush.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCCameraBackgroundBrush.cpp; sourceTree = "<group>"; };
B6DD36D41B8564EC0044745A /* CCCameraBackgroundBrush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCameraBackgroundBrush.h; sourceTree = "<group>"; };
C50306631B60B583001E6D43 /* CCBoneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBoneNode.cpp; sourceTree = "<group>"; };
C50306641B60B583001E6D43 /* CCBoneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBoneNode.h; sourceTree = "<group>"; };
C50306651B60B583001E6D43 /* CCSkeletonNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkeletonNode.cpp; sourceTree = "<group>"; };
@ -6822,6 +6866,9 @@
292DB12E19B4574100A80320 /* UIEditBox */ = {
isa = PBXGroup;
children = (
2980F0161BA9A5550059E678 /* iOS */,
A0E749F51BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp */,
A0E749F61BA8FD7F001A8332 /* UIEditBoxImpl-common.h */,
50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */,
50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */,
292DB12F19B4574100A80320 /* UIEditBox.cpp */,
@ -6848,6 +6895,24 @@
name = mac;
sourceTree = "<group>";
};
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 = "<group>";
};
29CB8F501929D63600C841D6 /* layout */ = {
isa = PBXGroup;
children = (
@ -7339,10 +7404,10 @@
46A169A11807B037005B8026 /* 2d */ = {
isa = PBXGroup;
children = (
B6DD36D31B8564EC0044745A /* CCCameraBackgroundBrush.cpp */,
B6DD36D41B8564EC0044745A /* CCCameraBackgroundBrush.h */,
3EACC99C19F5014D00EB3C5E /* CCCamera.cpp */,
3EACC99D19F5014D00EB3C5E /* CCCamera.h */,
A045F6DA1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp */,
A045F6DB1BA816A1005076C7 /* CCCameraBackgroundBrush.h */,
3EACC99E19F5014D00EB3C5E /* CCLight.cpp */,
3EACC99F19F5014D00EB3C5E /* CCLight.h */,
1A9DCA02180E6955007A3AD4 /* CCGLBufferedNode.cpp */,
@ -7368,6 +7433,10 @@
46A170611807CE7A005B8026 /* physics */ = {
isa = PBXGroup;
children = (
A045F6E01BA8170A005076C7 /* CCComponentPhysics2d.cpp */,
A045F6E11BA8170A005076C7 /* CCComponentPhysics2d.h */,
A045F6E21BA8170A005076C7 /* CCPhysicsManager.cpp */,
A045F6E31BA8170A005076C7 /* CCPhysicsManager.h */,
ED74D7681A5B8A2600157FD4 /* CCPhysicsHelper.h */,
46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */,
46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */,
@ -7436,11 +7505,11 @@
500DC89819105D41007B91BF /* renderer */ = {
isa = PBXGroup;
children = (
B62305621B8ABA6600F0745D /* CCTextureCube.cpp */,
B62305631B8ABA6600F0745D /* CCTextureCube.h */,
5034CA5D191D591900CE6051 /* shaders */,
A045F6D41BA81577005076C7 /* CCTextureCube.cpp */,
A045F6D51BA81577005076C7 /* CCTextureCube.h */,
B240C5E71B09DFB000137F50 /* CCFrameBuffer.cpp */,
B240C5E81B09DFB000137F50 /* CCFrameBuffer.h */,
5034CA5D191D591900CE6051 /* shaders */,
B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */,
B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */,
B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */,
@ -7571,9 +7640,11 @@
50693C621B6BF2BC005C5820 /* Downloader */ = {
isa = PBXGroup;
children = (
507003281B69826F00E83DDD /* CCDownloaderImpl.cpp */,
507003291B69826F00E83DDD /* CCDownloaderImpl.h */,
5070032E1B69898400E83DDD /* CCIDownloaderImpl.h */,
A05DCF9B1B90584E00EE040B /* CCDownloader-curl.cpp */,
A05DCF9C1B90584E00EE040B /* CCDownloader-curl.h */,
A0534A691B87306E006B03E5 /* CCIDownloaderImpl.h */,
A0534A631B872FFD006B03E5 /* CCDownloader-apple.h */,
A0534A641B872FFD006B03E5 /* CCDownloader-apple.mm */,
50693C5C1B6BF2AE005C5820 /* CCDownloader.cpp */,
50693C5D1B6BF2AE005C5820 /* CCDownloader.h */,
);
@ -7700,7 +7771,7 @@
50FCEB6818C72017004AD434 /* WidgetReader */ = {
isa = PBXGroup;
children = (
943CF4511B7DB10F00B6303F /* GameNode3DReader */,
A045F6EC1BA81821005076C7 /* GameNode3DReader */,
C503066F1B60B590001E6D43 /* SkeletonReader */,
18956BAF1A9DFBEC006E9155 /* Particle3DReader */,
182C5CE21A9D70C000C30D34 /* UserCameraReader */,
@ -7865,11 +7936,11 @@
path = ../external/clipper;
sourceTree = "<group>";
};
943CF4511B7DB10F00B6303F /* GameNode3DReader */ = {
A045F6EC1BA81821005076C7 /* GameNode3DReader */ = {
isa = PBXGroup;
children = (
943CF4521B7DB10F00B6303F /* GameNode3DReader.cpp */,
943CF4531B7DB10F00B6303F /* GameNode3DReader.h */,
A045F6ED1BA81821005076C7 /* GameNode3DReader.cpp */,
A045F6EE1BA81821005076C7 /* GameNode3DReader.h */,
);
path = GameNode3DReader;
sourceTree = "<group>";
@ -7877,8 +7948,8 @@
B29594B81926D61F003EEF37 /* 3d */ = {
isa = PBXGroup;
children = (
B640732F1B8FFA60005495CE /* CCMotionStreak3D.cpp */,
B64073301B8FFA60005495CE /* CCMotionStreak3D.h */,
3E2A09C01BAA91B70086B878 /* CCMotionStreak3D.cpp */,
3E2A09C11BAA91B70086B878 /* CCMotionStreak3D.h */,
B603F1A61AC8EA0900A9579C /* CCTerrain.cpp */,
B603F1A71AC8EA0900A9579C /* CCTerrain.h */,
B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */,
@ -9102,6 +9173,7 @@
B29A7DE519EE1B7700872B35 /* SkeletonAnimation.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 */,
@ -9324,6 +9396,7 @@
B665E4201AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */,
15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */,
1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */,
A045F6DE1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */,
50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */,
50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */,
1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */,
@ -9346,17 +9419,14 @@
15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */,
B6CAB3271AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */,
15AE198D19AAD36E00C27E9E /* CheckBoxReader.h in Headers */,
B6DD36D71B8564EC0044745A /* CCCameraBackgroundBrush.h in Headers */,
B29A7E0919EE1B7700872B35 /* AttachmentLoader.h in Headers */,
1A01C68818F57BE800EFE3A6 /* CCBool.h in Headers */,
B29A7E3319EE1B7700872B35 /* SlotData.h in Headers */,
B665E2741AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */,
B6CAB2FF1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */,
5070032C1B69826F00E83DDD /* CCDownloaderImpl.h in Headers */,
15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */,
50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */,
1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */,
B64073331B8FFA60005495CE /* CCMotionStreak3D.h in Headers */,
B6CAB43D1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */,
15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */,
15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */,
@ -9452,7 +9522,6 @@
B665E43C1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */,
15AE191C19AAD35000C27E9E /* CCTransformHelp.h in Headers */,
5034CA2F191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */,
B62305661B8ABA6600F0745D /* CCTextureCube.h in Headers */,
B665E4241AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */,
15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */,
B665E3381AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */,
@ -9482,6 +9551,7 @@
B6CAB4F91AF9AA1A00B9B856 /* btAlignedObjectArray.h in Headers */,
5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */,
292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */,
A045F6D81BA81577005076C7 /* CCTextureCube.h in Headers */,
B29A7DD919EE1B7700872B35 /* SkeletonRenderer.h in Headers */,
B6DD2FC11B04825B00E47F5F /* DetourMath.h in Headers */,
50CB247919D9C5A100687767 /* AudioEngine-inl.h in Headers */,
@ -9498,6 +9568,7 @@
B6CAB2231AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */,
B6CAB2191AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */,
5034CA3D191D591100CE6051 /* ccShader_PositionColor.frag in Headers */,
A0534A6A1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */,
15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */,
1A570280180BCC900088DEC7 /* CCSprite.h in Headers */,
292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */,
@ -9594,7 +9665,6 @@
15AE187D19AAD33D00C27E9E /* CCBFileLoader.h in Headers */,
15AE181219AAD2F700C27E9E /* CCAnimation3D.h in Headers */,
182C5CD81A98F30500C30D34 /* Sprite3DReader.h in Headers */,
943CF4561B7DB10F00B6303F /* GameNode3DReader.h in Headers */,
1A5702F0180BCE750088DEC7 /* CCTMXLayer.h in Headers */,
501216961AC47393009A4BEA /* CCPass.h in Headers */,
50ABC01B1926664800A911A9 /* CCSAXParser.h in Headers */,
@ -9619,6 +9689,7 @@
B6CAB23F1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.h in Headers */,
382384381A259126002C4610 /* ProjectNodeReader.h in Headers */,
15FB20991AE7C57D00C31518 /* sweep.h in Headers */,
A045F6F11BA81821005076C7 /* GameNode3DReader.h in Headers */,
B665E3C41AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */,
B6CAB2631AF9AA1A00B9B856 /* btManifoldResult.h in Headers */,
15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */,
@ -9785,6 +9856,7 @@
15AE1A3519AAD3D500C27E9E /* b2EdgeShape.h in Headers */,
B6CAB3151AF9AA1A00B9B856 /* btBoxCollision.h in Headers */,
50643BD919BFAF4400EF68ED /* CCApplication.h in Headers */,
A045F6E61BA8170A005076C7 /* CCComponentPhysics2d.h in Headers */,
B665E3581AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */,
B6CAB2371AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.h in Headers */,
B665E3DC1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */,
@ -9811,6 +9883,7 @@
15AE1B9C19AADFDF00C27E9E /* UIRelativeBox.h in Headers */,
B665E3341AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */,
15AE1A7519AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */,
A05DCF9E1B90584E00EE040B /* CCDownloader-curl.h in Headers */,
B665E2881AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */,
B665E2441AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */,
B665E2281AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */,
@ -9830,12 +9903,12 @@
B665E2F81AA80A6500DDB1C5 /* CCPUListener.h in Headers */,
B6CAB3F91AF9AA1A00B9B856 /* btMultiBody.h in Headers */,
15AE1BDB19AAE01E00C27E9E /* CCControlSwitch.h in Headers */,
5070032F1B69898400E83DDD /* CCIDownloaderImpl.h in Headers */,
B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */,
15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */,
50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */,
C50306761B60B5B2001E6D43 /* BoneNodeReader.h in Headers */,
B6CAB4171AF9AA1A00B9B856 /* btMultiBodySolverConstraint.h in Headers */,
A0534A651B872FFD006B03E5 /* CCDownloader-apple.h in Headers */,
15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */,
50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */,
382384231A2590DA002C4610 /* GameMapReader.h in Headers */,
@ -9894,6 +9967,7 @@
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 */,
B6CAB4ED1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */,
1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */,
@ -9954,6 +10028,7 @@
B6CAB5331AF9AA1A00B9B856 /* btTransformUtil.h in Headers */,
B6DD2FEF1B04825B00E47F5F /* DetourTileCache.h in Headers */,
50ABBECD1925AB6F00A911A9 /* s3tc.h in Headers */,
A045F6EA1BA8170A005076C7 /* CCPhysicsManager.h in Headers */,
B6CAB3651AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */,
15AE1BD119AAE01E00C27E9E /* CCControlHuePicker.h in Headers */,
B5CE6DC01B3BF2B1002B0419 /* UIAbstractCheckButton.h in Headers */,
@ -9982,8 +10057,10 @@
files = (
503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */,
15AE1A9A19AAD40300C27E9E /* b2Math.h in Headers */,
2980F0281BA9A5550059E678 /* CCUITextInput.h in Headers */,
B6CAB3221AF9AA1A00B9B856 /* btGenericPoolAllocator.h in Headers */,
B665E3851AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */,
2980F0291BA9A5550059E678 /* UITextField+CCUITextInput.h in Headers */,
46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */,
B6CAB37E1AF9AA1A00B9B856 /* btGjkPairDetector.h in Headers */,
B6CAB3101AF9AA1A00B9B856 /* btTriangleShape.h in Headers */,
@ -10045,6 +10122,7 @@
B6CAB3BA1AF9AA1A00B9B856 /* btGeneric6DofConstraint.h in Headers */,
B6CAB2F81AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */,
15AE1A4A19AAD3D500C27E9E /* b2CircleShape.h in Headers */,
A0E749FA1BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */,
B6CAB2A61AF9AA1A00B9B856 /* btConvexHullShape.h in Headers */,
50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */,
B6CAB2BE1AF9AA1A00B9B856 /* btCylinderShape.h in Headers */,
@ -10087,6 +10165,7 @@
15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */,
15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */,
50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */,
2980F0241BA9A5550059E678 /* CCUIMultilineTextField.h in Headers */,
B6CAB4FE1AF9AA1A00B9B856 /* btConvexHull.h in Headers */,
50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */,
B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */,
@ -10109,6 +10188,7 @@
15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */,
B6CAB4B41AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h in Headers */,
15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */,
A045F6F21BA81821005076C7 /* GameNode3DReader.h in Headers */,
B6CAB2601AF9AA1A00B9B856 /* btInternalEdgeUtility.h in Headers */,
B665E1F51AA80A6500DDB1C5 /* CCPUAffector.h in Headers */,
15AE1ACD19AAD40300C27E9E /* b2PrismaticJoint.h in Headers */,
@ -10134,7 +10214,6 @@
B665E4311AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */,
B6CAB2C21AF9AA1A00B9B856 /* btEmptyShape.h in Headers */,
B665E3C51AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */,
507003301B69898400E83DDD /* CCIDownloaderImpl.h in Headers */,
B6DD2FF81B04825B00E47F5F /* fastlz.h in Headers */,
B665E4351AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */,
B665E2451AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */,
@ -10143,6 +10222,7 @@
50ABBE501925AB6F00A911A9 /* CCEventCustom.h in Headers */,
15AE1AD719AAD40300C27E9E /* b2WheelJoint.h in Headers */,
B665E3311AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */,
A0534A661B872FFD006B03E5 /* CCDownloader-apple.h in Headers */,
B240C5EC1B09DFB000137F50 /* CCFrameBuffer.h in Headers */,
B6CAB41C1AF9AA1A00B9B856 /* btDantzigLCP.h in Headers */,
B665E2051AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */,
@ -10156,6 +10236,7 @@
B665E3A91AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */,
15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */,
B6CAB29A1AF9AA1A00B9B856 /* btConcaveShape.h in Headers */,
3E2A09C51BAA91B70086B878 /* CCMotionStreak3D.h in Headers */,
B6CAB2AE1AF9AA1A00B9B856 /* btConvexPointCloudShape.h in Headers */,
B29A7DD419EE1B7700872B35 /* Skin.h in Headers */,
B6CAB2221AF9AA1A00B9B856 /* btBoxBoxDetector.h in Headers */,
@ -10304,7 +10385,6 @@
1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */,
B6CAB4C41AF9AA1A00B9B856 /* Box.h in Headers */,
15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */,
B62305671B8ABA6600F0745D /* CCTextureCube.h in Headers */,
1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */,
B665E3E51AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */,
182C5CE81A9D725400C30D34 /* UserCameraReader.h in Headers */,
@ -10445,6 +10525,7 @@
15AE1A9C19AAD40300C27E9E /* b2Settings.h in Headers */,
1A5701FA180BCBAD0088DEC7 /* CCMenu.h in Headers */,
15AE18BA19AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */,
A045F6EB1BA8170A005076C7 /* CCPhysicsManager.h in Headers */,
1A5701FE180BCBAD0088DEC7 /* CCMenuItem.h in Headers */,
50ABC00C1926664800A911A9 /* CCDevice.h in Headers */,
1A570205180BCBD40088DEC7 /* CCClippingNode.h in Headers */,
@ -10511,6 +10592,7 @@
1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */,
382383F31A258FA7002C4610 /* idl.h in Headers */,
29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */,
2980F0261BA9A5550059E678 /* CCUISingleLineTextField.h in Headers */,
B6CAB4EC1AF9AA1A00B9B856 /* TrbStateVec.h in Headers */,
15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */,
B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */,
@ -10541,6 +10623,7 @@
B6CAB20E1AF9AA1A00B9B856 /* btQuantizedBvh.h in Headers */,
B665E2591AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */,
B665E1F91AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */,
2980F0221BA9A5550059E678 /* CCUIEditBoxIOS.h in Headers */,
B665E2351AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */,
B6CAB36C1AF9AA1A00B9B856 /* btConvexPenetrationDepthSolver.h in Headers */,
B6CAB4281AF9AA1A00B9B856 /* btSolveProjectedGaussSeidel.h in Headers */,
@ -10557,7 +10640,6 @@
15AE1B7F19AADA9A00C27E9E /* UIText.h in Headers */,
B29A7E3419EE1B7700872B35 /* SlotData.h in Headers */,
B6CAAFF91AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */,
B64073341B8FFA60005495CE /* CCMotionStreak3D.h in Headers */,
B665E3D51AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */,
50ABBE701925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */,
15AE18B619AAD33D00C27E9E /* CCBSequence.h in Headers */,
@ -10588,6 +10670,7 @@
15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */,
15AE1AC319AAD40300C27E9E /* b2DistanceJoint.h in Headers */,
B6CAB5261AF9AA1A00B9B856 /* btQuickprof.h in Headers */,
2980F02B1BA9A5550059E678 /* UITextView+CCUITextInput.h in Headers */,
50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */,
D0FD03581A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */,
B29A7E1219EE1B7700872B35 /* EventData.h in Headers */,
@ -10637,6 +10720,7 @@
B6CAB3A21AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */,
1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */,
B6CAB5381AF9AA1A00B9B856 /* btVector3.h in Headers */,
A045F6D91BA81577005076C7 /* CCTextureCube.h in Headers */,
B6CAB4DC1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h in Headers */,
B665E2F51AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */,
1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */,
@ -10779,7 +10863,6 @@
1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */,
15AE1ACF19AAD40300C27E9E /* b2PulleyJoint.h in Headers */,
D0FD03601A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */,
943CF4571B7DB10F00B6303F /* GameNode3DReader.h in Headers */,
15AE198019AAD35700C27E9E /* CCTimeLine.h in Headers */,
38B8E2E419E671D2002D7CE7 /* UILayoutComponent.h in Headers */,
B6CAB2481AF9AA1A00B9B856 /* btConvexConvexAlgorithm.h in Headers */,
@ -10829,7 +10912,6 @@
B29A7DDA19EE1B7700872B35 /* SkeletonRenderer.h in Headers */,
15AE194119AAD35100C27E9E /* CCBone.h in Headers */,
D0FD035A1A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */,
B6DD36D81B8564EC0044745A /* CCCameraBackgroundBrush.h in Headers */,
50ABBD471925AB0000A911A9 /* CCVertex.h in Headers */,
B6CAB4D81AF9AA1A00B9B856 /* SpuLocalSupport.h in Headers */,
B6CAB2921AF9AA1A00B9B856 /* btCollisionShape.h in Headers */,
@ -10843,6 +10925,7 @@
15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */,
15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */,
B6CAB37A1AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */,
A045F6E71BA8170A005076C7 /* CCComponentPhysics2d.h in Headers */,
B6CAB21A1AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */,
382384041A259005002C4610 /* CSParseBinary_generated.h in Headers */,
B6CAB5401AF9AA1A00B9B856 /* cl_platform.h in Headers */,
@ -10937,10 +11020,10 @@
15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */,
15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */,
50ABC00A1926664800A911A9 /* CCCommon.h in Headers */,
A045F6DF1BA816A1005076C7 /* CCCameraBackgroundBrush.h in Headers */,
15AE19AD19AAD39700C27E9E /* LoadingBarReader.h in Headers */,
15FB209E1AE7C57D00C31518 /* sweep_context.h in Headers */,
50ABBE5C1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */,
5070032D1B69826F00E83DDD /* CCDownloaderImpl.h in Headers */,
B665E2191AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */,
B6CAB3F41AF9AA1A00B9B856 /* btSimpleDynamicsWorld.h in Headers */,
5E9F612D1A3FFE3D0038DE01 /* CCPlane.h in Headers */,
@ -10970,6 +11053,7 @@
50ABBEB21925AB6F00A911A9 /* CCUserDefault.h in Headers */,
15AE198B19AAD36A00C27E9E /* ButtonReader.h in Headers */,
B6CAB2FC1AF9AA1A00B9B856 /* btTriangleCallback.h in Headers */,
A0534A6B1B87306E006B03E5 /* CCIDownloaderImpl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -11061,7 +11145,6 @@
B6CAB2811AF9AA1A00B9B856 /* btBoxShape.cpp in Sources */,
50ABBE311925AB6F00A911A9 /* CCConfiguration.cpp in Sources */,
B665E3821AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */,
B6DD36D51B8564EC0044745A /* CCCameraBackgroundBrush.cpp in Sources */,
1A01C6A418F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */,
15AE1A5D19AAD40300C27E9E /* b2Body.cpp in Sources */,
15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */,
@ -11133,6 +11216,7 @@
B665E2621AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */,
B665E4161AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */,
B665E41E1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */,
A045F6E81BA8170A005076C7 /* CCPhysicsManager.cpp in Sources */,
15AE189819AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */,
15AE1A5719AAD40300C27E9E /* b2Settings.cpp in Sources */,
50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */,
@ -11183,7 +11267,6 @@
1A57006D180BC5A10088DEC7 /* CCActionEase.cpp in Sources */,
15AE1A5019AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */,
B665E20E1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */,
B62305641B8ABA6600F0745D /* CCTextureCube.cpp in Sources */,
B6CAB25D1AF9AA1A00B9B856 /* btInternalEdgeUtility.cpp in Sources */,
15AE1A8219AAD40300C27E9E /* b2GearJoint.cpp in Sources */,
1A570071180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */,
@ -11250,6 +11333,7 @@
B6CAB3B31AF9AA1A00B9B856 /* btGearConstraint.cpp in Sources */,
B6CAB4031AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */,
B665E3F21AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */,
A045F6D61BA81577005076C7 /* CCTextureCube.cpp in Sources */,
50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */,
D0FD034B1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */,
B6CAB3E11AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */,
@ -11261,7 +11345,6 @@
50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */,
B665E3B61AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */,
B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */,
943CF4541B7DB10F00B6303F /* GameNode3DReader.cpp in Sources */,
B6CAB3071AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */,
B29A7E1319EE1B7700872B35 /* Bone.c in Sources */,
B677B0C91B18492D006762CB /* CCNavMesh.cpp in Sources */,
@ -11290,6 +11373,7 @@
15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */,
15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */,
29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */,
A0534A671B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */,
B665E2B21AA80A6500DDB1C5 /* CCPUForceField.cpp in Sources */,
15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */,
38B8E2E119E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */,
@ -11436,7 +11520,10 @@
1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */,
B665E3FE1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */,
B6CAB3591AF9AA1A00B9B856 /* gim_memory.cpp in Sources */,
A045F6DC1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */,
B665E25A1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */,
A0E749F71BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */,
A045F6E41BA8170A005076C7 /* CCComponentPhysics2d.cpp in Sources */,
B6DD2FB31B04825B00E47F5F /* RecastDump.cpp in Sources */,
B6CAB2BB1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */,
15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */,
@ -11507,6 +11594,7 @@
B6CAB3731AF9AA1A00B9B856 /* btGjkEpa2.cpp in Sources */,
50ABBE791925AB6F00A911A9 /* CCEventMouse.cpp in Sources */,
15AE1A2E19AAD3D500C27E9E /* b2TimeOfImpact.cpp in Sources */,
A05DCF9D1B90584E00EE040B /* CCDownloader-curl.cpp in Sources */,
B6CAB2FD1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.cpp in Sources */,
50ABC0111926664800A911A9 /* CCGLView.cpp in Sources */,
50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */,
@ -11532,7 +11620,6 @@
15AE182019AAD2F700C27E9E /* CCBundleReader.cpp in Sources */,
B665E2421AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */,
15AE1AD819AAD41000C27E9E /* b2Rope.cpp in Sources */,
B64073311B8FFA60005495CE /* CCMotionStreak3D.cpp in Sources */,
B6D38B8A1AC3AFAC00043997 /* CCSkybox.cpp in Sources */,
B665E3521AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */,
B29A7DC719EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */,
@ -11617,6 +11704,7 @@
B6CAB2491AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.cpp in Sources */,
B665E35A1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */,
B6CAB2891AF9AA1A00B9B856 /* btCapsuleShape.cpp in Sources */,
3E2A09C21BAA91B70086B878 /* CCMotionStreak3D.cpp in Sources */,
B6CAB42F1AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */,
B29A7DFB19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */,
B6CAB3391AF9AA1A00B9B856 /* btTriangleShapeEx.cpp in Sources */,
@ -11689,6 +11777,7 @@
826294341AAF003E00CB7CF7 /* HttpClient-apple.mm in Sources */,
15AE1A6E19AAD40300C27E9E /* b2CircleContact.cpp in Sources */,
15AE1A6619AAD40300C27E9E /* b2World.cpp in Sources */,
A045F6EF1BA81821005076C7 /* GameNode3DReader.cpp in Sources */,
50ABBD8F1925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */,
50ABBD441925AB0000A911A9 /* CCVertex.cpp in Sources */,
B276EF611988D1D500CD400F /* CCVertexIndexData.cpp in Sources */,
@ -11748,7 +11837,6 @@
15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */,
501216A01AC473AD009A4BEA /* CCMaterial.cpp in Sources */,
50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */,
5070032A1B69826F00E83DDD /* CCDownloaderImpl.cpp in Sources */,
15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */,
15AE1A3219AAD3D500C27E9E /* b2CircleShape.cpp in Sources */,
15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */,
@ -12038,7 +12126,6 @@
15AE1A3C19AAD3D500C27E9E /* b2CollideCircle.cpp in Sources */,
501216951AC47393009A4BEA /* CCPass.cpp in Sources */,
50ABBE6E1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */,
B62305651B8ABA6600F0745D /* CCTextureCube.cpp in Sources */,
B665E2CB1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.cpp in Sources */,
15AE18D719AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */,
50CB247C19D9C5A100687767 /* AudioEngine-inl.mm in Sources */,
@ -12051,7 +12138,6 @@
15AE1A4119AAD3D500C27E9E /* b2Distance.cpp in Sources */,
50ABBE4E1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */,
B6CAB2761AF9AA1A00B9B856 /* btUnionFind.cpp in Sources */,
943CF4551B7DB10F00B6303F /* GameNode3DReader.cpp in Sources */,
15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */,
15AE181719AAD2F700C27E9E /* CCAttachNode.cpp in Sources */,
B68779051A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */,
@ -12060,6 +12146,7 @@
B6CAB3261AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */,
15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */,
B6CAB4041AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */,
A045F6E91BA8170A005076C7 /* CCPhysicsManager.cpp in Sources */,
50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */,
15AE1AD219AAD40300C27E9E /* b2RopeJoint.cpp in Sources */,
B29A7DCC19EE1B7700872B35 /* Skeleton.c in Sources */,
@ -12074,7 +12161,6 @@
3EACC9A519F5014D00EB3C5E /* CCLight.cpp in Sources */,
15AE1B7A19AADA9A00C27E9E /* UIScrollView.cpp in Sources */,
1A570076180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */,
B6DD36D61B8564EC0044745A /* CCCameraBackgroundBrush.cpp in Sources */,
B6CAB38C1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */,
B6CAB3A41AF9AA1A00B9B856 /* btConeTwistConstraint.cpp in Sources */,
15AE19B219AAD39700C27E9E /* SliderReader.cpp in Sources */,
@ -12117,8 +12203,10 @@
B6CAB2521AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */,
B665E2D31AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */,
B665E3331AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */,
A045F6E51BA8170A005076C7 /* CCComponentPhysics2d.cpp in Sources */,
1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */,
507003201B69735200E83DDD /* HttpClient.cpp in Sources */,
A0534A681B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */,
B665E22F1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */,
1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */,
15AE1AB819AAD40300C27E9E /* b2EdgeAndCircleContact.cpp in Sources */,
@ -12205,6 +12293,7 @@
1A5701B2180BCB590088DEC7 /* CCFontFNT.cpp in Sources */,
B68778F91A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */,
B665E2271AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */,
A045F6F01BA81821005076C7 /* GameNode3DReader.cpp in Sources */,
1A5701B6180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */,
B665E40F1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */,
292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */,
@ -12222,6 +12311,7 @@
15AE1B7219AADA9A00C27E9E /* UIListView.cpp in Sources */,
1A5701BE180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */,
15FB20751AE7BF8600C31518 /* CCAutoPolygon.cpp in Sources */,
A0E749F81BA8FD7F001A8332 /* UIEditBoxImpl-common.cpp in Sources */,
B6CAB2021AF9AA1A00B9B856 /* btMultiSapBroadphase.cpp in Sources */,
15AE1A3D19AAD3D500C27E9E /* b2CollideEdge.cpp in Sources */,
1A5701C2180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */,
@ -12281,6 +12371,7 @@
B29A7E2E19EE1B7700872B35 /* Slot.c in Sources */,
B665E2471AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */,
50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */,
2980F0271BA9A5550059E678 /* CCUISingleLineTextField.mm in Sources */,
B29A7DF419EE1B7700872B35 /* AttachmentLoader.c in Sources */,
1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */,
15AE1A9D19AAD40300C27E9E /* b2StackAllocator.cpp in Sources */,
@ -12381,10 +12472,10 @@
1A570287180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */,
507003221B69735300E83DDD /* HttpConnection-winrt.cpp in Sources */,
B6CAB3AA1AF9AA1A00B9B856 /* btContactConstraint.cpp in Sources */,
2980F02A1BA9A5550059E678 /* UITextField+CCUITextInput.mm in Sources */,
B665E2431AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */,
B6CAB23E1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.cpp in Sources */,
B665E3EB1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */,
5070032B1B69826F00E83DDD /* CCDownloaderImpl.cpp in Sources */,
B665E2771AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */,
15AE193E19AAD35100C27E9E /* CCBatchNode.cpp in Sources */,
15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */,
@ -12414,6 +12505,7 @@
B6CAB3741AF9AA1A00B9B856 /* btGjkEpa2.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 */,
@ -12496,6 +12588,7 @@
50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */,
B6CAB4301AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */,
15AE19B019AAD39700C27E9E /* ScrollViewReader.cpp in Sources */,
2980F02C1BA9A5550059E678 /* UITextView+CCUITextInput.mm in Sources */,
85505F061B60E3B6003F2CD4 /* CCSkeletonNode.cpp in Sources */,
50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */,
5012169B1AC473A3009A4BEA /* CCTechnique.cpp in Sources */,
@ -12527,7 +12620,7 @@
50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */,
B6CAB3E21AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */,
50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */,
B64073321B8FFA60005495CE /* CCMotionStreak3D.cpp in Sources */,
A045F6D71BA81577005076C7 /* CCTextureCube.cpp in Sources */,
B6CAB3821AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */,
B6CAB3641AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */,
52B47A2F1A5349A3004E4C60 /* HttpAsynConnection-apple.m in Sources */,
@ -12609,6 +12702,7 @@
B665E3131AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */,
50CB248019D9C5A100687767 /* AudioPlayer.mm in Sources */,
50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */,
2980F0251BA9A5550059E678 /* CCUIMultilineTextField.mm in Sources */,
85B3743B1B204B9400C488D6 /* clipper.cpp in Sources */,
15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */,
B6CAB27E1AF9AA1A00B9B856 /* btBox2dShape.cpp in Sources */,
@ -12627,6 +12721,7 @@
B665E4371AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */,
B665E2F31AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */,
B665E3731AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */,
A045F6DD1BA816A1005076C7 /* CCCameraBackgroundBrush.cpp in Sources */,
B665E41F1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */,
503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */,
5070031C1B69735200E83DDD /* HttpClient-android.cpp in Sources */,
@ -12670,6 +12765,7 @@
15AE183519AAD2F700C27E9E /* CCObjLoader.cpp in Sources */,
D0FD034C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */,
B665E31F1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */,
2980F0231BA9A5550059E678 /* CCUIEditBoxIOS.mm in Sources */,
B665E4331AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */,
B677B0DA1B18492D006762CB /* CCNavMeshUtils.cpp in Sources */,
B665E3C71AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94B0C01B8EF76D0074B261"
BuildableName = "performance-tests Mac.app"
BlueprintName = "performance-tests Mac"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94B0C01B8EF76D0074B261"
BuildableName = "performance-tests Mac.app"
BlueprintName = "performance-tests Mac"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94B0C01B8EF76D0074B261"
BuildableName = "performance-tests Mac.app"
BlueprintName = "performance-tests Mac"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94B0C01B8EF76D0074B261"
BuildableName = "performance-tests Mac.app"
BlueprintName = "performance-tests Mac"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94AF961B8EF69A0074B261"
BuildableName = "performance-tests iOS.app"
BlueprintName = "performance-tests iOS"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94AF961B8EF69A0074B261"
BuildableName = "performance-tests iOS.app"
BlueprintName = "performance-tests iOS"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94AF961B8EF69A0074B261"
BuildableName = "performance-tests iOS.app"
BlueprintName = "performance-tests iOS"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA94AF961B8EF69A0074B261"
BuildableName = "performance-tests iOS.app"
BlueprintName = "performance-tests iOS"
ReferencedContainer = "container:cocos2d_tests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -42,6 +42,10 @@ Action::Action()
,_tag(Action::INVALID_TAG)
,_flags(0)
{
#if CC_ENABLE_SCRIPT_BINDING
ScriptEngineProtocol* engine = ScriptEngineManager::getInstance()->getScriptEngine();
_scriptType = engine != nullptr ? engine->getScriptType() : kScriptTypeNone;
#endif
}
Action::~Action()

View File

@ -30,10 +30,16 @@ THE SOFTWARE.
#include "base/CCRef.h"
#include "math/CCGeometry.h"
#include "base/CCScriptSupport.h"
NS_CC_BEGIN
class Node;
enum {
kActionUpdate
};
/**
* @addtogroup actions
* @{
@ -172,6 +178,9 @@ protected:
/** The action flag field. To categorize action into certain groups.*/
unsigned int _flags;
#if CC_ENABLE_SCRIPT_BINDING
ccScriptType _scriptType; ///< type of script binding, lua or javascript
#endif
private:
CC_DISALLOW_COPY_AND_ASSIGN(Action);
};
@ -221,7 +230,6 @@ CC_CONSTRUCTOR_ACCESS:
protected:
//! Duration in seconds.
float _duration;
private:
CC_DISALLOW_COPY_AND_ASSIGN(FiniteTimeAction);
};

View File

@ -116,7 +116,7 @@ void ActionCamera::updateTransform()
}
// FIXME: Using the AdditionalTransform is a complete hack.
// This should be done by multipliying the lookup-Matrix with the Node's MV matrix
// This should be done by multiplying the lookup-Matrix with the Node's MV matrix
// And then setting the result as the new MV matrix
// But that operation needs to be done after all the 'updates'.
// So the Director should emit an 'director_after_update' event.

View File

@ -47,7 +47,15 @@ bool ActionInstant::isDone() const
void ActionInstant::step(float dt) {
CC_UNUSED_PARAM(dt);
update(1);
float updateDt = 1;
#if CC_ENABLE_SCRIPT_BINDING
if (_scriptType == kScriptTypeJavascript)
{
if (ScriptEngineManager::sendActionEventToJS(this, kActionUpdate, (void *)&updateDt))
return;
}
#endif
update(updateDt);
}
void ActionInstant::update(float time) {

View File

@ -37,6 +37,7 @@ THE SOFTWARE.
#include "base/CCEventCustom.h"
#include "base/CCEventDispatcher.h"
#include "platform/CCStdC.h"
#include "base/CCScriptSupport.h"
NS_CC_BEGIN
@ -105,6 +106,18 @@ bool ActionInterval::initWithDuration(float d)
return true;
}
bool ActionInterval::sendUpdateEventToScript(float dt, Action *actionObject)
{
#if CC_ENABLE_SCRIPT_BINDING
if (_scriptType == kScriptTypeJavascript)
{
if (ScriptEngineManager::sendActionEventToJS(actionObject, kActionUpdate, (void *)&dt))
return true;
}
#endif
return false;
}
bool ActionInterval::isDone() const
{
return _elapsed >= _duration;
@ -122,12 +135,16 @@ void ActionInterval::step(float dt)
_elapsed += dt;
}
this->update(MAX (0, // needed for rewind. elapsed could be negative
MIN(1, _elapsed /
MAX(_duration, FLT_EPSILON) // division by 0
)
)
);
float updateDt = MAX (0, // needed for rewind. elapsed could be negative
MIN(1, _elapsed /
MAX(_duration, FLT_EPSILON) // division by 0
)
);
if (sendUpdateEventToScript(updateDt, this)) return;
this->update(updateDt);
}
void ActionInterval::setAmplitudeRate(float amp)
@ -323,13 +340,15 @@ void Sequence::update(float t)
if( _last == -1 ) {
// action[0] was skipped, execute it.
_actions[0]->startWithTarget(_target);
_actions[0]->update(1.0f);
if (!(sendUpdateEventToScript(1.0f, _actions[0])))
_actions[0]->update(1.0f);
_actions[0]->stop();
}
else if( _last == 0 )
{
// switching to action 1. stop action 0.
_actions[0]->update(1.0f);
if (!(sendUpdateEventToScript(1.0f, _actions[0])))
_actions[0]->update(1.0f);
_actions[0]->stop();
}
}
@ -339,7 +358,8 @@ void Sequence::update(float t)
// FIXME: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode"
// since it will require a hack to know if an action is on reverse mode or not.
// "step" should be overriden, and the "reverseMode" value propagated to inner Sequences.
_actions[1]->update(0);
if (!(sendUpdateEventToScript(0, _actions[1])))
_actions[1]->update(0);
_actions[1]->stop();
}
// Last action found and it is done.
@ -353,8 +373,8 @@ void Sequence::update(float t)
{
_actions[found]->startWithTarget(_target);
}
_actions[found]->update(new_t);
if (!(sendUpdateEventToScript(new_t, _actions[found])))
_actions[found]->update(new_t);
_last = found;
}
@ -436,8 +456,8 @@ void Repeat::update(float dt)
{
while (dt > _nextDt && _total < _times)
{
_innerAction->update(1.0f);
if (!(sendUpdateEventToScript(1.0f, _innerAction)))
_innerAction->update(1.0f);
_total++;
_innerAction->stop();
@ -456,19 +476,22 @@ void Repeat::update(float dt)
{
if (_total == _times)
{
_innerAction->update(1);
if (!(sendUpdateEventToScript(1, _innerAction)))
_innerAction->update(1);
_innerAction->stop();
}
else
{
// issue #390 prevent jerk, use right update
_innerAction->update(dt - (_nextDt - _innerAction->getDuration()/_duration));
if (!(sendUpdateEventToScript(dt - (_nextDt - _innerAction->getDuration()/_duration), _innerAction)))
_innerAction->update(dt - (_nextDt - _innerAction->getDuration()/_duration));
}
}
}
else
{
_innerAction->update(fmodf(dt * _times,1.0f));
if (!(sendUpdateEventToScript(fmodf(dt * _times,1.0f), _innerAction)))
_innerAction->update(fmodf(dt * _times,1.0f));
}
}
@ -710,11 +733,13 @@ void Spawn::update(float time)
{
if (_one)
{
_one->update(time);
if (!(sendUpdateEventToScript(time, _one)))
_one->update(time);
}
if (_two)
{
_two->update(time);
if (!(sendUpdateEventToScript(time, _two)))
_two->update(time);
}
}
@ -2241,7 +2266,8 @@ void ReverseTime::update(float time)
{
if (_other)
{
_other->update(1 - time);
if (!(sendUpdateEventToScript(1 - time, _other)))
_other->update(1 - time);
}
}
@ -2502,7 +2528,8 @@ void TargetedAction::stop()
void TargetedAction::update(float time)
{
_action->update(time);
if (!(sendUpdateEventToScript(time, _action)))
_action->update(time);
}
bool TargetedAction::isDone(void) const

View File

@ -112,6 +112,9 @@ CC_CONSTRUCTOR_ACCESS:
protected:
float _elapsed;
bool _firstTick;
protected:
bool sendUpdateEventToScript(float dt, Action *actionObject);
};
/** @class Sequence

View File

@ -144,12 +144,13 @@ public:
/**
* trace all the points along the outline of the image,
* @warning must create AutoPolygon with filename to use this function
* @param rect a texture rect for specify an area of the image, use Rect::Zero for the size of the image, default to Rect::Zero
* @param rect a texture rect for specify an area of the image
* @param threshold the value when alpha is greater than this value will be counted as opaque, default to 0.0
* @return a vector of vec2 of all the points found in clockwise order
* @code
* auto ap = AutoPolygon("grossini.png");
* std::vector<Vec2> points = ap.trace();//default to size of the image and threshold 0.0
* auto rect = Rect(100, 100, 200, 200);
* std::vector<Vec2> points = ap.trace(rect);//default threshold is 0.0
* @endcode
*/
std::vector<Vec2> trace(const cocos2d::Rect& rect, const float& threshold = 0.0);

View File

@ -308,6 +308,9 @@ void CameraBackgroundSkyBoxBrush::drawBackground(Camera* camera)
glEnable(GL_DEPTH_TEST);
RenderState::StateBlock::_defaultState->setDepthTest(true);
glDepthMask(GL_TRUE);
RenderState::StateBlock::_defaultState->setDepthWrite(true);
glDepthFunc(GL_ALWAYS);
RenderState::StateBlock::_defaultState->setDepthFunction(RenderState::DEPTH_ALWAYS);

View File

@ -29,46 +29,46 @@ THE SOFTWARE.
NS_CC_BEGIN
ComponentContainer::ComponentContainer(Node *node)
: _components(nullptr)
, _owner(node)
ComponentContainer::ComponentContainer(Node* node)
: _owner(node)
{
}
ComponentContainer::~ComponentContainer(void)
{
CC_SAFE_DELETE(_components);
ComponentContainer::~ComponentContainer()
{
}
Component* ComponentContainer::get(const std::string& name) const
{
Component* ret = nullptr;
do {
CC_BREAK_IF(nullptr == _components);
ret = _components->at(name);
} while (0);
auto it = _componentMap.find(name);
if (it != _componentMap.end())
{
ret = it->second;
}
return ret;
}
bool ComponentContainer::add(Component *com)
{
bool ret = false;
CCASSERT(com != nullptr, "Argument must be non-nil");
CCASSERT(com != nullptr, "Component must be non-nil");
CCASSERT(com->getOwner() == nullptr, "Component already added. It can't be added again");
do
{
if (_components == nullptr)
auto typeName = typeid(*com).name();
if (_components.find(typeName) != _components.end())
{
_components = new (std::nothrow) Map<std::string, Component*>();
CCASSERT(true,"ComponentContainer already have this kind of component");
break;
}
Component *component = _components->at(com->getName());
CCASSERT(component == nullptr, "Component already added. It can't be added again");
CC_BREAK_IF(component);
com->setOwner(_owner);
_components->insert(com->getName(), com);
_components.insert(typeName, com);
_componentMap[com->getName()] = com;
com->onAdd();
ret = true;
} while(0);
return ret;
@ -79,18 +79,13 @@ bool ComponentContainer::remove(const std::string& name)
bool ret = false;
do
{
CC_BREAK_IF(!_components);
auto iter = _components->find(name);
CC_BREAK_IF(iter == _components->end());
auto com = iter->second;
com->onRemove();
com->setOwner(nullptr);
_components->erase(iter);
auto iter = _componentMap.find(name);
CC_BREAK_IF(iter == _componentMap.end());
remove(iter->second);
ret = true;
} while(0);
return ret;
}
@ -99,51 +94,45 @@ bool ComponentContainer::remove(Component *com)
bool ret = false;
do
{
CC_BREAK_IF(!_components);
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
auto iter = _components.find(typeid(*com).name());
if (iter != _components.end())
{
if (iter->second == com)
{
com->onRemove();
com->setOwner(nullptr);
_components->erase(iter);
break;
}
_componentMap.erase(com->getName());
com->onRemove();
com->setOwner(nullptr);
_components.erase(iter);
}
ret = true;
} while(0);
return ret;
}
void ComponentContainer::removeAll()
{
if (_components != nullptr)
if (!_componentMap.empty())
{
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
for (auto iter = _components.begin(); iter != _components.end(); ++iter)
{
iter->second->onRemove();
iter->second->setOwner(nullptr);
}
_components->clear();
CC_SAFE_DELETE(_components);
_components.clear();
_componentMap.clear();
_owner->unscheduleUpdate();
}
}
void ComponentContainer::alloc(void)
{
_components = new (std::nothrow) Map<std::string, Component*>();
}
void ComponentContainer::visit(float delta)
{
if (_components != nullptr)
if (!_components.empty())
{
CC_SAFE_RETAIN(_owner);
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
auto iterEnd = _components.end();
for (auto iter = _components.begin(); iter != iterEnd; ++iter)
{
iter->second->update(delta);
}
@ -151,21 +140,17 @@ void ComponentContainer::visit(float delta)
}
}
bool ComponentContainer::isEmpty() const
{
return (_components == nullptr || _components->empty());
}
void ComponentContainer::onEnter()
{
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
for (auto iter = _components.begin(); iter != _components.end(); ++iter)
{
iter->second->onEnter();
}
}
void ComponentContainer::onExit()
{
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
for (auto iter = _components.begin(); iter != _components.end(); ++iter)
{
iter->second->onExit();
}

View File

@ -41,14 +41,28 @@ protected:
/**
* @js ctor
*/
ComponentContainer(Node *pNode);
ComponentContainer(Node* node);
public:
/**
* @js NA
* @lua NA
*/
virtual ~ComponentContainer(void);
virtual ~ComponentContainer();
template<typename T>
T* getComponent() const
{
auto typeName = typeid(T).name();
auto iter = _components.find(typeName);
if (iter != _components.end())
{
return static_cast<T*>(iter->second);
}
return nullptr;
}
/**
* @js getComponent
*/
@ -62,14 +76,11 @@ public:
virtual void onEnter();
virtual void onExit();
public:
bool isEmpty() const;
bool isEmpty() const { return _componentMap.empty(); }
private:
void alloc(void);
private:
Map<std::string, Component*>* _components;
Map<std::string, Component*> _components;
std::unordered_map<std::string, Component*> _componentMap;
Node *_owner;
friend class Node;

View File

@ -63,7 +63,7 @@ public:
@param gridSize the size of the grid.
@param texture The texture used for grab.
@param flipped whether or not the grab texture should be flip by Y or not.
@param rect The effct grid rect.
@param rect The effective grid rect.
*/
bool initWithSize(const Size& gridSize);
bool initWithSize(const Size& gridSize, const Rect& rect);
@ -155,7 +155,7 @@ class CC_DLL Grid3D : public GridBase
public:
/** create one Grid. */
static Grid3D* create(const Size& gridSize);
/** craete one Grid. */
/** create one Grid. */
static Grid3D* create(const Size& gridSize, const Rect& rect);
/** create one Grid. */
static Grid3D* create(const Size& gridSize, Texture2D *texture, bool flipped);
@ -197,7 +197,7 @@ public:
*/
void setVertex(const Vec2& pos, const Vec3& vertex);
/**@{
Implementations for interfaces in base calss.
Implementations for interfaces in base class.
*/
virtual void beforeBlit() override;
virtual void afterBlit() override;
@ -275,7 +275,7 @@ public:
void setTile(const Vec2& pos, const Quad3& coords);
/**@{
Implementations for interfaces in base calss.
Implementations for interfaces in base class.
*/
virtual void blit() override;
virtual void reuse() override;

View File

@ -44,10 +44,6 @@ THE SOFTWARE.
#include "deprecated/CCString.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsBody.h"
#endif
NS_CC_BEGIN
// Layer

View File

@ -84,7 +84,7 @@ public:
*/
/** Callback function for touch began.
*
* @param touch Touch infomation.
* @param touch Touch information.
* @param unused_event Event information.
* @return if return false, onTouchMoved, onTouchEnded, onTouchCancelled will never called.
* @js NA
@ -92,21 +92,21 @@ public:
virtual bool onTouchBegan(Touch *touch, Event *unused_event);
/** Callback function for touch moved.
*
* @param touch Touch infomation.
* @param touch Touch information.
* @param unused_event Event information.
* @js NA
*/
virtual void onTouchMoved(Touch *touch, Event *unused_event);
/** Callback function for touch ended.
*
* @param touch Touch infomation.
* @param touch Touch information.
* @param unused_event Event information.
* @js NA
*/
virtual void onTouchEnded(Touch *touch, Event *unused_event);
/** Callback function for touch cancelled.
*
* @param touch Touch infomation.
* @param touch Touch information.
* @param unused_event Event information.
* @js NA
*/
@ -149,7 +149,7 @@ public:
/* 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.
*/
/** Callback funtion for acceleration.
/** Callback function for acceleration.
* @param acc Acceleration information.
* @param unused_event Event information.
* @js NA
@ -297,19 +297,19 @@ public:
//
virtual GLubyte getOpacity() const override { return Layer::getOpacity(); }
virtual GLubyte getDisplayedOpacity() const override { return Layer::getDisplayedOpacity(); }
virtual void setOpacity(GLubyte opacity) override { return Layer::setOpacity(opacity); }
virtual void updateDisplayedOpacity(GLubyte parentOpacity) override { return Layer::updateDisplayedOpacity(parentOpacity); }
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 { return Layer::setCascadeOpacityEnabled(cascadeOpacityEnabled); }
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 { return Layer::setColor(color); }
virtual void updateDisplayedColor(const Color3B& parentColor) override { return Layer::updateDisplayedColor(parentColor); }
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 { return Layer::setCascadeColorEnabled(cascadeColorEnabled); }
virtual void setCascadeColorEnabled(bool cascadeColorEnabled) override { Layer::setCascadeColorEnabled(cascadeColorEnabled); }
virtual void setOpacityModifyRGB(bool bValue) override { return Layer::setOpacityModifyRGB(bValue); }
virtual void setOpacityModifyRGB(bool bValue) override { Layer::setOpacityModifyRGB(bValue); }
virtual bool isOpacityModifyRGB() const override { return Layer::isOpacityModifyRGB(); }
CC_CONSTRUCTOR_ACCESS:

View File

@ -39,12 +39,8 @@ static int _globalFontSize = kItemSize;
static std::string _globalFontName = "Marker Felt";
static bool _globalFontNameRelease = false;
const unsigned int kCurrentItem = 0xc0c05001;
const unsigned int kZoomActionTag = 0xc0c05002;
const unsigned int kNormalTag = 0x1;
const unsigned int kSelectedTag = 0x2;
const unsigned int kDisableTag = 0x3;
//
// MenuItem
//
@ -462,7 +458,7 @@ void MenuItemSprite::setNormalImage(Node* image)
{
if (image)
{
addChild(image, 0, kNormalTag);
addChild(image);
image->setAnchorPoint(Vec2(0, 0));
}
@ -483,7 +479,7 @@ void MenuItemSprite::setSelectedImage(Node* image)
{
if (image)
{
addChild(image, 0, kSelectedTag);
addChild(image);
image->setAnchorPoint(Vec2(0, 0));
}
@ -503,7 +499,7 @@ void MenuItemSprite::setDisabledImage(Node* image)
{
if (image)
{
addChild(image, 0, kDisableTag);
addChild(image);
image->setAnchorPoint(Vec2(0, 0));
}
@ -912,17 +908,16 @@ void MenuItemToggle::setSelectedIndex(unsigned int index)
if( index != _selectedIndex && _subItems.size() > 0 )
{
_selectedIndex = index;
MenuItem *currentItem = (MenuItem*)getChildByTag(kCurrentItem);
if( currentItem )
if (_selectedItem)
{
currentItem->removeFromParentAndCleanup(false);
_selectedItem->removeFromParentAndCleanup(false);
}
MenuItem* item = _subItems.at(_selectedIndex);
this->addChild(item, 0, kCurrentItem);
Size s = item->getContentSize();
_selectedItem = _subItems.at(_selectedIndex);
this->addChild(_selectedItem);
Size s = _selectedItem->getContentSize();
this->setContentSize(s);
item->setPosition(s.width/2, s.height/2);
_selectedItem->setPosition(s.width / 2, s.height / 2);
}
}

View File

@ -556,6 +556,7 @@ CC_CONSTRUCTOR_ACCESS:
*/
MenuItemToggle()
: _selectedIndex(0)
, _selectedItem(nullptr)
{}
/**
* @js NA
@ -578,6 +579,8 @@ CC_CONSTRUCTOR_ACCESS:
protected:
/** Returns the selected item. */
unsigned int _selectedIndex;
MenuItem* _selectedItem;
/** Array that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.
@since v0.7.2
*/

View File

@ -41,19 +41,12 @@ THE SOFTWARE.
#include "2d/CCActionManager.h"
#include "2d/CCScene.h"
#include "2d/CCComponent.h"
#include "2d/CCComponentContainer.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCMaterial.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsBody.h"
#include "physics/CCPhysicsWorld.h"
#endif
#if CC_NODE_RENDER_SUBPIXEL
#define RENDER_IN_SUBPIXEL
@ -118,17 +111,6 @@ Node::Node(void)
, _updateScriptHandler(0)
#endif
, _componentContainer(nullptr)
#if CC_USE_PHYSICS
, _physicsBody(nullptr)
, _physicsScaleStartX(1.0f)
, _physicsScaleStartY(1.0f)
, _physicsRotation(0.0f)
, _physicsTransformDirty(true)
, _updateTransformFromPhysics(true)
, _physicsWorld(nullptr)
, _physicsBodyAssociatedWith(0)
, _physicsRotationOffset(0.0f)
#endif
, _displayedOpacity(255)
, _realOpacity(255)
, _displayedColor(Color3B::WHITE)
@ -194,11 +176,6 @@ Node::~Node()
CC_SAFE_DELETE(_componentContainer);
#if CC_USE_PHYSICS
setPhysicsBody(nullptr);
#endif
stopAllActions();
unscheduleAllCallbacks();
CC_SAFE_RELEASE_NULL(_actionManager);
@ -259,13 +236,6 @@ void Node::setSkewX(float skewX)
if (_skewX == skewX)
return;
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setSkewX");
}
#endif
_skewX = skewX;
_transformUpdated = _transformDirty = _inverseDirty = true;
}
@ -280,13 +250,6 @@ void Node::setSkewY(float skewY)
if (_skewY == skewY)
return;
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setSkewY");
}
#endif
_skewY = skewY;
_transformUpdated = _transformDirty = _inverseDirty = true;
}
@ -336,12 +299,6 @@ void Node::setRotation(float rotation)
_rotationZ_X = _rotationZ_Y = rotation;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
updateRotationQuat();
}
@ -367,13 +324,6 @@ void Node::setRotation3D(const Vec3& rotation)
_rotationZ_Y = _rotationZ_X = rotation.z;
updateRotationQuat();
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setRotation3D");
}
#endif
}
Vec3 Node::getRotation3D() const
@ -429,13 +379,6 @@ void Node::setRotationSkewX(float rotationX)
if (_rotationZ_X == rotationX)
return;
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setRotationSkewX");
}
#endif
_rotationZ_X = rotationX;
_transformUpdated = _transformDirty = _inverseDirty = true;
@ -452,13 +395,6 @@ void Node::setRotationSkewY(float rotationY)
if (_rotationZ_Y == rotationY)
return;
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setRotationSkewY");
}
#endif
_rotationZ_Y = rotationY;
_transformUpdated = _transformDirty = _inverseDirty = true;
@ -480,12 +416,6 @@ void Node::setScale(float scale)
_scaleX = _scaleY = _scaleZ = scale;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
/// scaleX getter
@ -503,12 +433,6 @@ void Node::setScale(float scaleX,float scaleY)
_scaleX = scaleX;
_scaleY = scaleY;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
/// scaleX setter
@ -519,12 +443,6 @@ void Node::setScaleX(float scaleX)
_scaleX = scaleX;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
/// scaleY getter
@ -539,13 +457,6 @@ void Node::setScaleZ(float scaleZ)
if (_scaleZ == scaleZ)
return;
#if CC_USE_PHYSICS
if (_physicsBody != nullptr)
{
CCLOG("Node WARNING: PhysicsBody doesn't support setScaleZ");
}
#endif
_scaleZ = scaleZ;
_transformUpdated = _transformDirty = _inverseDirty = true;
}
@ -564,12 +475,6 @@ void Node::setScaleY(float scaleY)
_scaleY = scaleY;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
@ -601,12 +506,6 @@ void Node::setPosition(float x, float y)
_transformUpdated = _transformDirty = _inverseDirty = true;
_usingNormalizedPosition = false;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
void Node::setPosition3D(const Vec3& position)
@ -671,12 +570,6 @@ void Node::setNormalizedPosition(const Vec2& position)
_usingNormalizedPosition = true;
_normalizedPositionDirty = true;
_transformUpdated = _transformDirty = _inverseDirty = true;
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsBodyAssociatedWith > 0)
{
_physicsWorld->_updateBodyTransform = true;
}
#endif
}
ssize_t Node::getChildrenCount() const
@ -893,7 +786,7 @@ Node* Node::getChildByTag(int tag) const
Node* Node::getChildByName(const std::string& name) const
{
CCASSERT(name.length() != 0, "Invalid name");
CCASSERT(!name.empty(), "Invalid name");
std::hash<std::string> h;
size_t hash = h(name);
@ -909,7 +802,7 @@ Node* Node::getChildByName(const std::string& name) const
void Node::enumerateChildren(const std::string &name, std::function<bool (Node *)> callback) const
{
CCASSERT(name.length() != 0, "Invalid name");
CCASSERT(!name.empty(), "Invalid name");
CCASSERT(callback != nullptr, "Invalid callback function");
size_t length = name.length();
@ -1059,24 +952,6 @@ void Node::addChildHelper(Node* child, int localZOrder, int tag, const std::stri
child->setParent(this);
child->setOrderOfArrival(s_globalOrderOfArrival++);
#if CC_USE_PHYSICS
_physicsBodyAssociatedWith += child->_physicsBodyAssociatedWith;
auto parentNode = this;
while (parentNode->_parent)
{
parentNode = parentNode->_parent;
parentNode->_physicsBodyAssociatedWith += child->_physicsBodyAssociatedWith;
}
auto scene = dynamic_cast<Scene*>(parentNode);
// Recursive add children with which have physics body.
if (scene && scene->getPhysicsWorld())
{
scene->addChildToPhysicsWorld(child);
}
#endif
if( _running )
{
child->onEnter();
@ -1158,7 +1033,7 @@ void Node::removeChildByTag(int tag, bool cleanup/* = true */)
void Node::removeChildByName(const std::string &name, bool cleanup)
{
CCASSERT(name.length() != 0, "Invalid name");
CCASSERT(!name.empty(), "Invalid name");
Node *child = this->getChildByName(name);
@ -1177,21 +1052,6 @@ void Node::removeAllChildren()
this->removeAllChildrenWithCleanup(true);
}
#if CC_USE_PHYSICS
void Node::removeFromPhysicsWorld()
{
if (_physicsBody != nullptr)
{
_physicsBody->removeFromWorld();
}
for (auto child : _children)
{
child->removeFromPhysicsWorld();
}
}
#endif
void Node::removeAllChildrenWithCleanup(bool cleanup)
{
// not using detachChild improves speed here
@ -1206,10 +1066,6 @@ void Node::removeAllChildrenWithCleanup(bool cleanup)
child->onExit();
}
#if CC_USE_PHYSICS
child->removeFromPhysicsWorld();
#endif
if (cleanup)
{
child->cleanup();
@ -1231,10 +1087,6 @@ void Node::detachChild(Node *child, ssize_t childIndex, bool doCleanup)
child->onExitTransitionDidStart();
child->onExit();
}
#if CC_USE_PHYSICS
child->removeFromPhysicsWorld();
#endif
// If you don't do cleanup, the child's actions will not get removed and the
// its scheduledSelectors_ dict will not get released!
@ -1297,12 +1149,6 @@ void Node::visit()
uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFlags)
{
#if CC_USE_PHYSICS
if (_physicsBody && _updateTransformFromPhysics)
{
updateTransformFromPhysics(parentTransform, parentFlags);
}
#endif
if(_usingNormalizedPosition)
{
CCASSERT(_parent, "setNormalizedPosition() doesn't work with orphan nodes");
@ -1330,15 +1176,8 @@ uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFl
if(flags & FLAGS_DIRTY_MASK)
_modelViewTransform = this->transform(parentTransform);
#if CC_USE_PHYSICS
if (_updateTransformFromPhysics) {
_transformUpdated = false;
_contentSizeDirty = false;
}
#else
_transformUpdated = false;
_contentSizeDirty = false;
#endif
return flags;
}
@ -1813,7 +1652,7 @@ const Mat4& Node::getNodeToParentTransform() const
Vec2 anchorPoint(_anchorPointInPoints.x * _scaleX, _anchorPointInPoints.y * _scaleY);
// caculate real position
// calculate real position
if (! needsSkewMatrix && !_anchorPointInPoints.isZero())
{
x += -anchorPoint.x;
@ -2065,120 +1904,6 @@ void Node::removeAllComponents()
_componentContainer->removeAll();
}
#if CC_USE_PHYSICS
// MARK: Physics
void Node::setPhysicsBody(PhysicsBody* body)
{
if (_physicsBody == body)
{
return;
}
if (_physicsBody)
{
_physicsBody->removeFromWorld();
_physicsBody->_node = nullptr;
_physicsBody->release();
_physicsBody = nullptr;
_physicsBodyAssociatedWith--;
auto parentNode = this;
while (parentNode->_parent)
{
parentNode = parentNode->_parent;
parentNode->_physicsBodyAssociatedWith--;
}
}
if (body)
{
if (body->getNode())
{
body->getNode()->setPhysicsBody(nullptr);
}
body->_node = this;
body->retain();
_physicsBody = body;
_physicsScaleStartX = _scaleX;
_physicsScaleStartY = _scaleY;
_physicsRotationOffset = _rotationZ_X;
_physicsBodyAssociatedWith++;
auto parentNode = this;
while (parentNode->_parent)
{
parentNode = parentNode->_parent;
parentNode->_physicsBodyAssociatedWith++;
}
auto scene = dynamic_cast<Scene*>(parentNode);
if (scene && scene->getPhysicsWorld())
{
_physicsTransformDirty = true;
scene->getPhysicsWorld()->addBody(body);
}
}
}
void Node::updatePhysicsBodyTransform(const Mat4& parentTransform, uint32_t parentFlags, float parentScaleX, float parentScaleY)
{
_updateTransformFromPhysics = false;
auto flags = processParentFlags(parentTransform, parentFlags);
_updateTransformFromPhysics = true;
auto scaleX = parentScaleX * _scaleX;
auto scaleY = parentScaleY * _scaleY;
if (_parent)
{
_physicsRotation = _parent->_physicsRotation + _rotationZ_X;
}
if (_physicsBody && ((flags & FLAGS_DIRTY_MASK) || _physicsTransformDirty))
{
_physicsTransformDirty = false;
Vec3 vec3(_contentSize.width * 0.5f, _contentSize.height * 0.5f, 0);
Vec3 ret;
_modelViewTransform.transformPoint(vec3, &ret);
_physicsBody->setPosition(Vec2(ret.x, ret.y));
parentTransform.getInversed().transformPoint(&ret);
_offsetX = ret.x - _position.x;
_offsetY = ret.y - _position.y;
_physicsBody->setScale(scaleX / _physicsScaleStartX, scaleY / _physicsScaleStartY);
_physicsBody->setRotation(_physicsRotation - _physicsRotationOffset);
}
for (auto node : _children)
{
node->updatePhysicsBodyTransform(_modelViewTransform, flags, scaleX, scaleY);
}
}
void Node::updateTransformFromPhysics(const Mat4& parentTransform, uint32_t parentFlags)
{
auto& newPosition = _physicsBody->getPosition();
auto& recordedPosition = _physicsBody->_recordedPosition;
auto updateBodyTransform = _physicsWorld->_updateBodyTransform;
if (parentFlags || recordedPosition.x != newPosition.x || recordedPosition.y != newPosition.y)
{
recordedPosition = newPosition;
Vec3 vec3(newPosition.x, newPosition.y, 0);
Vec3 ret;
parentTransform.getInversed().transformPoint(vec3, &ret);
setPosition(ret.x - _offsetX, ret.y - _offsetY);
}
_physicsRotation = _physicsBody->getRotation();
setRotation(_physicsRotation - _parent->_physicsRotation + _physicsRotationOffset);
_physicsWorld->_updateBodyTransform = updateBodyTransform;
}
#endif //CC_USE_PHYSICS
// MARK: Opacity and Color
GLubyte Node::getOpacity(void) const

View File

@ -35,6 +35,8 @@
#include "base/CCScriptSupport.h"
#include "math/CCAffineTransform.h"
#include "math/CCMath.h"
#include "2d/CCComponentContainer.h"
#include "2d/CCComponent.h"
NS_CC_BEGIN
@ -53,10 +55,6 @@ class Director;
class GLProgram;
class GLProgramState;
class Material;
#if CC_USE_PHYSICS
class PhysicsBody;
class PhysicsWorld;
#endif
class Camera;
/**
@ -1560,7 +1558,6 @@ public:
virtual Mat4 getWorldToNodeTransform() const;
virtual AffineTransform getWorldToNodeAffineTransform() const;
/** @deprecated Use getWorldToNodeTransform() instead */
CC_DEPRECATED_ATTRIBUTE inline virtual AffineTransform worldToNodeTransform() const { return getWorldToNodeAffineTransform(); }
@ -1644,6 +1641,22 @@ public:
* @return The Component by name.
*/
Component* getComponent(const std::string& name);
/**
* Get a component by the type T.
* @lua NA
* @js NA
*
* @return The component that match the type T.
*/
template<typename T>
T* getComponent() const
{
if (_componentContainer)
return _componentContainer->getComponent<T>();
else
return nullptr;
}
/**
* Adds a component.
@ -1673,39 +1686,6 @@ public:
*/
virtual void removeAllComponents();
/// @} end of component functions
#if CC_USE_PHYSICS
/**
* Set the PhysicsBody that let the sprite effect with physics.
* @note This method will set anchor point to Vec2::ANCHOR_MIDDLE if body not null, and you cann't change anchor point if node has a physics body.
*
* @param body A given physics body.
*/
void setPhysicsBody(PhysicsBody* body);
/**
* Get the PhysicsBody the sprite have.
*
* @return The PhysicsBody the sprite have.
*/
PhysicsBody* getPhysicsBody() const { return _physicsBody; }
/**
* Remove this node from physics world. it will remove all the physics bodies in it's children too.
*/
void removeFromPhysicsWorld();
/**
* Update the transform matrix from physics.
*/
void updateTransformFromPhysics(const Mat4& parentTransform, uint32_t parentFlags);
/**
* Update physics body transform matrix.
*/
virtual void updatePhysicsBodyTransform(const Mat4& parentTransform, uint32_t parentFlags, float parentScaleX, float parentScaleY);
#endif
// overrides
virtual GLubyte getOpacity() const;
@ -1863,22 +1843,6 @@ protected:
#endif
ComponentContainer *_componentContainer; ///< Dictionary of components
#if CC_USE_PHYSICS
PhysicsBody* _physicsBody; ///< the physicsBody the node have
float _physicsScaleStartX; ///< the scale x value when setPhysicsBody
float _physicsScaleStartY; ///< the scale y value when setPhysicsBody
float _physicsRotation;
bool _physicsTransformDirty;
bool _updateTransformFromPhysics;
PhysicsWorld* _physicsWorld; /** The PhysicsWorld associated with the node.*/
int _physicsBodyAssociatedWith; /** The count of PhysicsBody associated with the node and children.*/
float _physicsRotationOffset; /** Record the rotation value when invoke Node::setPhysicsBody.*/
float _offsetX;
float _offsetY;
#endif
// opacity controls
GLubyte _displayedOpacity;
@ -1900,10 +1864,6 @@ protected:
private:
CC_DISALLOW_COPY_AND_ASSIGN(Node);
#if CC_USE_PHYSICS
friend class Scene;
#endif //CC_USTPS
};

View File

@ -211,7 +211,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
_duration = dictionary["duration"].asFloat();
// blend function
if (_configName.length()>0)
if (!_configName.empty())
{
_blendFunc.src = dictionary["blendFuncSource"].asFloat();
}
@ -289,7 +289,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
// or Mode B: radius movement
else if (_emitterMode == Mode::RADIUS)
{
if (_configName.length()>0)
if (!_configName.empty())
{
modeB.startRadius = dictionary["maxRadius"].asInt();
}
@ -298,7 +298,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
modeB.startRadius = dictionary["maxRadius"].asFloat();
}
modeB.startRadiusVar = dictionary["maxRadiusVariance"].asFloat();
if (_configName.length()>0)
if (!_configName.empty())
{
modeB.endRadius = dictionary["minRadius"].asInt();
}
@ -316,7 +316,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
modeB.endRadiusVar = 0.0f;
}
if (_configName.length()>0)
if (!_configName.empty())
{
modeB.rotatePerSecond = dictionary["rotatePerSecond"].asInt();
}

View File

@ -29,10 +29,6 @@
#include "CCProtectedNode.h"
#include "base/CCDirector.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsBody.h"
#endif
#include "2d/CCScene.h"
NS_CC_BEGIN
@ -108,19 +104,6 @@ void ProtectedNode::addProtectedChild(Node *child, int zOrder, int tag)
child->setParent(this);
child->setOrderOfArrival(s_globalOrderOfArrival++);
#if CC_USE_PHYSICS
// Recursive add children with which have physics body.
for (Node* node = this; node != nullptr; node = node->getParent())
{
Scene* scene = dynamic_cast<Scene*>(node);
if (scene != nullptr && scene->getPhysicsWorld() != nullptr)
{
scene->addChildToPhysicsWorld(child);
break;
}
}
#endif
if( _running )
{
child->onEnter();
@ -178,13 +161,6 @@ void ProtectedNode::removeProtectedChild(cocos2d::Node *child, bool cleanup)
child->onExit();
}
#if CC_USE_PHYSICS
if (child->getPhysicsBody() != nullptr)
{
child->getPhysicsBody()->removeFromWorld();
}
#endif
// If you don't do cleanup, the child's actions will not get removed and the
// its scheduledSelectors_ dict will not get released!
if (cleanup)
@ -218,13 +194,6 @@ void ProtectedNode::removeAllProtectedChildrenWithCleanup(bool cleanup)
child->onExit();
}
#if CC_USE_PHYSICS
if (child->getPhysicsBody() != nullptr)
{
child->getPhysicsBody()->removeFromWorld();
}
#endif
if (cleanup)
{
child->cleanup();

View File

@ -35,7 +35,7 @@ THE SOFTWARE.
#include "deprecated/CCString.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsWorld.h"
#include "physics/CCPhysicsManager.h"
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
@ -50,9 +50,6 @@ THE SOFTWARE.
NS_CC_BEGIN
Scene::Scene()
#if CC_USE_PHYSICS
: _physicsWorld(nullptr)
#endif
{
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
_physics3DWorld = nullptr;
@ -61,6 +58,9 @@ Scene::Scene()
#if CC_USE_NAVMESH
_navMesh = nullptr;
_navMeshDebugCamera = nullptr;
#endif
#if CC_USE_PHYSICS
_physicsManager = nullptr;
#endif
_ignoreAnchorPointForPosition = true;
setAnchorPoint(Vec2(0.5f, 0.5f));
@ -79,9 +79,6 @@ Scene::Scene()
Scene::~Scene()
{
#if CC_USE_PHYSICS
CC_SAFE_DELETE(_physicsWorld);
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
CC_SAFE_RELEASE(_physics3DWorld);
CC_SAFE_RELEASE(_physics3dDebugCamera);
@ -91,6 +88,10 @@ Scene::~Scene()
#endif
Director::getInstance()->getEventDispatcher()->removeEventListener(_event);
CC_SAFE_RELEASE(_event);
#if CC_USE_PHYSICS
delete _physicsManager;
#endif
}
#if CC_USE_NAVMESH
@ -260,21 +261,6 @@ void Scene::setNavMeshDebugCamera(Camera *camera)
#endif
#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION))
void Scene::addChild(Node* child, int zOrder, int tag)
{
Node::addChild(child, zOrder, tag);
#if CC_USE_PHYSICS
addChildToPhysicsWorld(child);
#endif
}
void Scene::addChild(Node* child, int zOrder, const std::string &name)
{
Node::addChild(child, zOrder, name);
#if CC_USE_PHYSICS
addChildToPhysicsWorld(child);
#endif
}
Scene* Scene::createWithPhysics()
{
@ -293,6 +279,9 @@ Scene* Scene::createWithPhysics()
bool Scene::initWithPhysics()
{
_physicsManager = new (std::nothrow) PhysicsManager(this);
_physicsWorld = _physicsManager->getPhysicsWorld();
bool ret = false;
do
{
@ -300,9 +289,6 @@ bool Scene::initWithPhysics()
CC_BREAK_IF( ! (director = Director::getInstance()) );
this->setContentSize(director->getWinSize());
#if CC_USE_PHYSICS
CC_BREAK_IF(! (_physicsWorld = PhysicsWorld::construct(*this)));
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
Physics3DWorldDes info;
@ -316,43 +302,16 @@ bool Scene::initWithPhysics()
return ret;
}
void Scene::addChildToPhysicsWorld(Node* child)
{
#if CC_USE_PHYSICS
if (_physicsWorld)
{
std::function<void(Node*)> addToPhysicsWorldFunc = nullptr;
addToPhysicsWorldFunc = [this, &addToPhysicsWorldFunc](Node* node) -> void
{
node->_physicsWorld = _physicsWorld;
if (node->getPhysicsBody())
{
_physicsWorld->addBody(node->getPhysicsBody());
}
auto& children = node->getChildren();
for( const auto &n : children) {
addToPhysicsWorldFunc(n);
}
};
addToPhysicsWorldFunc(child);
}
#endif
}
#endif
#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH)
void Scene::stepPhysicsAndNavigation(float deltaTime)
{
#if CC_USE_PHYSICS
if (_physicsWorld && _physicsWorld->isAutoStep())
{
_physicsWorld->update(deltaTime, false);
}
if (_physicsManager)
_physicsManager->update(deltaTime);
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
if (_physics3DWorld)
{

View File

@ -40,6 +40,7 @@ class EventListenerCustom;
class EventCustom;
#if CC_USE_PHYSICS
class PhysicsWorld;
class PhysicsManager;
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
class Physics3DWorld;
@ -145,15 +146,21 @@ private:
#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION))
public:
virtual void addChild(Node* child, int zOrder, int tag) override;
virtual void addChild(Node* child, int zOrder, const std::string &name) override;
#if CC_USE_PHYSICS
/** Get the physics world of the scene.
* @return The physics world of the scene.
* @js NA
*/
inline PhysicsWorld* getPhysicsWorld() { return _physicsWorld; }
inline PhysicsWorld* getPhysicsWorld() const { return _physicsWorld; }
/**
* Get the `PhysicsManager` belongs to this `Scene`.
*
* @return PhysicsManager of the scene.
* @js NA
*/
PhysicsManager* getPhysicsManager() const { return _physicsManager; }
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
@ -183,6 +190,7 @@ protected:
#if CC_USE_PHYSICS
PhysicsWorld* _physicsWorld;
PhysicsManager* _physicsManager;
#endif
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
@ -203,8 +211,8 @@ public:
void setNavMeshDebugCamera(Camera *camera);
protected:
NavMesh* _navMesh;
Camera * _navMeshDebugCamera;
NavMesh* _navMesh;
Camera * _navMeshDebugCamera;
#endif
#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH)

View File

@ -289,7 +289,8 @@ Sprite::Sprite(void)
, _insideBounds(true)
{
#if CC_SPRITE_DEBUG_DRAW
debugDraw(true);
_debugDrawNode = DrawNode::create();
addChild(_debugDrawNode);
#endif //CC_SPRITE_DEBUG_DRAW
}
@ -429,51 +430,6 @@ void Sprite::setTextureRect(const Rect& rect, bool rotated, const Size& untrimme
_polyInfo.setQuad(&_quad);
}
void Sprite::debugDraw(bool on)
{
if (_batchNode) {
log("Sprite doesn't support debug draw when using SpriteBatchNode");
return ;
}
DrawNode* draw = getChildByName<DrawNode*>("debugDraw");
if(on)
{
if(!draw)
{
draw = DrawNode::create();
draw->setName("debugDraw");
addChild(draw);
}
draw->setVisible(true);
draw->clear();
//draw lines
auto last = _polyInfo.triangles.indexCount/3;
auto _indices = _polyInfo.triangles.indices;
auto _verts = _polyInfo.triangles.verts;
for(ssize_t i = 0; i < last; i++)
{
//draw 3 lines
Vec3 from =_verts[_indices[i*3]].vertices;
Vec3 to = _verts[_indices[i*3+1]].vertices;
draw->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::GREEN);
from =_verts[_indices[i*3+1]].vertices;
to = _verts[_indices[i*3+2]].vertices;
draw->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::GREEN);
from =_verts[_indices[i*3+2]].vertices;
to = _verts[_indices[i*3]].vertices;
draw->drawLine(Vec2(from.x, from.y), Vec2(to.x,to.y), Color4F::GREEN);
}
}
else
{
if(draw)
draw->setVisible(false);
}
}
// override this method to generate "double scale" sprites
void Sprite::setVertexRect(const Rect& rect)
{
@ -685,6 +641,28 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
_trianglesCommand.init(_globalZOrder, _texture->getName(), 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);
}
#endif //CC_SPRITE_DEBUG_DRAW
}
}
@ -1129,7 +1107,7 @@ void Sprite::updateBlendFunc(void)
{
CCASSERT(! _batchNode, "CCSprite: updateBlendFunc doesn't work when the sprite is rendered using a SpriteBatchNode");
// it is possible to have an untextured spritec
// it is possible to have an untextured sprite
if (! _texture || ! _texture->hasPremultipliedAlpha())
{
_blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED;

View File

@ -563,8 +563,6 @@ CC_CONSTRUCTOR_ACCESS:
* @lua init
*/
virtual bool initWithFile(const std::string& filename, const Rect& rect);
void debugDraw(bool on);
/**
* returns a copy of the polygon information associated with this sprite
@ -609,8 +607,9 @@ protected:
Texture2D* _texture; /// Texture2D object that is used to render the sprite
SpriteFrame* _spriteFrame;
TrianglesCommand _trianglesCommand; ///
#if CC_SPRITE_DEBUG_DRAW
DrawNode *_debugDrawNode;
#endif //CC_SPRITE_DEBUG_DRAW
//
// Shared data
//

View File

@ -367,13 +367,6 @@ void SpriteBatchNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t f
for (const auto &child : _children)
{
#if CC_USE_PHYSICS
auto physicsBody = child->getPhysicsBody();
if (physicsBody)
{
child->updateTransformFromPhysics(transform, flags);
}
#endif
child->updateTransform();
}

View File

@ -188,7 +188,7 @@ Texture2D* SpriteFrame::getTexture()
return _texture;
}
if( _textureFilename.length() > 0 ) {
if( !_textureFilename.empty()) {
return Director::getInstance()->getTextureCache()->addImage(_textureFilename.c_str());
}
// no texture or texture filename

View File

@ -131,7 +131,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu
// check ow/oh
if(!ow || !oh)
{
CCLOGWARN("cocos2d: WARNING: originalWidth/Height not found on the SpriteFrame. AnchorPoint won't work as expected. Regenrate the .plist");
CCLOGWARN("cocos2d: WARNING: originalWidth/Height not found on the SpriteFrame. AnchorPoint won't work as expected. Regenerate the .plist");
}
// abs ow/oh
ow = abs(ow);

View File

@ -259,7 +259,7 @@ const std::string& TextFieldTTF::getContentText()
void TextFieldTTF::setTextColor(const Color4B &color)
{
_colorText = color;
if (_inputText.length() > 0) {
if (!_inputText.empty()) {
Label::setTextColor(_colorText);
}
}
@ -284,7 +284,7 @@ void TextFieldTTF::setColorSpaceHolder(const Color3B& color)
_colorSpaceHolder.g = color.g;
_colorSpaceHolder.b = color.b;
_colorSpaceHolder.a = 255;
if (0 == _inputText.length())
if (_inputText.empty())
{
Label::setTextColor(_colorSpaceHolder);
}
@ -293,7 +293,7 @@ void TextFieldTTF::setColorSpaceHolder(const Color3B& color)
void TextFieldTTF::setColorSpaceHolder(const Color4B& color)
{
_colorSpaceHolder = color;
if (0 == _inputText.length()) {
if (_inputText.empty()) {
Label::setTextColor(_colorSpaceHolder);
}
}
@ -309,7 +309,7 @@ void TextFieldTTF::setString(const std::string &text)
std::string displayText;
size_t length;
if (text.length()>0)
if (!text.empty())
{
_inputText = text;
displayText = _inputText;
@ -330,7 +330,7 @@ void TextFieldTTF::setString(const std::string &text)
}
// if there is no input text, display placeholder instead
if (0 == _inputText.length())
if (_inputText.empty())
{
Label::setTextColor(_colorSpaceHolder);
Label::setString(_placeHolder);
@ -352,7 +352,7 @@ const std::string& TextFieldTTF::getString() const
void TextFieldTTF::setPlaceHolder(const std::string& text)
{
_placeHolder = text;
if (0 == _inputText.length())
if (_inputText.empty())
{
Label::setTextColor(_colorSpaceHolder);
Label::setString(_placeHolder);

View File

@ -575,8 +575,8 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\navmesh\CCNavMeshDebugDraw.cpp" />
<ClCompile Include="..\navmesh\CCNavMeshObstacle.cpp" />
<ClCompile Include="..\navmesh\CCNavMeshUtils.cpp" />
<ClCompile Include="..\network\CCDownloader-curl.cpp" />
<ClCompile Include="..\network\CCDownloader.cpp" />
<ClCompile Include="..\network\CCDownloaderImpl.cpp" />
<ClCompile Include="..\network\HttpClient.cpp" />
<ClCompile Include="..\network\SocketIO.cpp" />
<ClCompile Include="..\network\WebSocket.cpp" />
@ -588,9 +588,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\physics3d\CCPhysics3DShape.cpp" />
<ClCompile Include="..\physics3d\CCPhysics3DWorld.cpp" />
<ClCompile Include="..\physics3d\CCPhysicsSprite3D.cpp" />
<ClCompile Include="..\physics\CCComponentPhysics2d.cpp" />
<ClCompile Include="..\physics\CCPhysicsBody.cpp" />
<ClCompile Include="..\physics\CCPhysicsContact.cpp" />
<ClCompile Include="..\physics\CCPhysicsJoint.cpp" />
<ClCompile Include="..\physics\CCPhysicsManager.cpp" />
<ClCompile Include="..\physics\CCPhysicsShape.cpp" />
<ClCompile Include="..\physics\CCPhysicsWorld.cpp" />
<ClCompile Include="..\platform\CCFileUtils.cpp" />
@ -1181,6 +1183,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\navmesh\CCNavMeshDebugDraw.h" />
<ClInclude Include="..\navmesh\CCNavMeshObstacle.h" />
<ClInclude Include="..\navmesh\CCNavMeshUtils.h" />
<ClInclude Include="..\network\CCDownloader-curl.h" />
<ClInclude Include="..\network\CCDownloader.h" />
<ClInclude Include="..\network\CCDownloaderImpl.h" />
<ClInclude Include="..\network\CCIDownloaderImpl.h" />
@ -1197,10 +1200,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\physics3d\CCPhysics3DShape.h" />
<ClInclude Include="..\physics3d\CCPhysics3DWorld.h" />
<ClInclude Include="..\physics3d\CCPhysicsSprite3D.h" />
<ClInclude Include="..\physics\CCComponentPhysics2d.h" />
<ClInclude Include="..\physics\CCPhysicsBody.h" />
<ClInclude Include="..\physics\CCPhysicsContact.h" />
<ClInclude Include="..\physics\CCPhysicsHelper.h" />
<ClInclude Include="..\physics\CCPhysicsJoint.h" />
<ClInclude Include="..\physics\CCPhysicsManager.h" />
<ClInclude Include="..\physics\CCPhysicsShape.h" />
<ClInclude Include="..\physics\CCPhysicsWorld.h" />
<ClInclude Include="..\platform\CCApplicationProtocol.h" />

View File

@ -285,6 +285,9 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\physics\CCComponentPhysics2d.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
<Filter>physics</Filter>
</ClCompile>
@ -294,6 +297,9 @@
<ClCompile Include="..\physics\CCPhysicsJoint.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\physics\CCPhysicsManager.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\physics\CCPhysicsShape.cpp">
<Filter>physics</Filter>
</ClCompile>
@ -1928,17 +1934,20 @@
<ClCompile Include="..\network\CCDownloader.cpp">
<Filter>network\Source Files</Filter>
</ClCompile>
<ClCompile Include="..\network\CCDownloaderImpl.cpp">
<Filter>network\Source Files</Filter>
</ClCompile>
<ClCompile Include="CCCameraBackgroundBrush.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCTextureCube.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\network\CCDownloader-curl.cpp">
<Filter>network</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCComponentPhysics2d.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\physics\CCPhysicsBody.h">
<Filter>physics</Filter>
</ClInclude>
@ -1948,6 +1957,9 @@
<ClInclude Include="..\physics\CCPhysicsJoint.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\physics\CCPhysicsManager.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\physics\CCPhysicsShape.h">
<Filter>physics</Filter>
</ClInclude>
@ -3777,6 +3789,9 @@
<ClInclude Include="..\renderer\CCTextureCube.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\network\CCDownloader-curl.h">
<Filter>network\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">

View File

@ -455,7 +455,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\navmesh\CCNavMeshUtils.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloaderImpl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCIDownloaderImpl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader-curl.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\HttpClient.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\HttpRequest.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\HttpResponse.h" />
@ -469,10 +469,12 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysics3DShape.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysics3DWorld.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysicsSprite3D.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCComponentPhysics2d.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsBody.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsContact.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsHelper.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsJoint.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsShape.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsWorld.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\platform\CCApplication.h" />
@ -1061,7 +1063,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\navmesh\CCNavMeshObstacle.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\navmesh\CCNavMeshUtils.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloaderImpl.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader-curl.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\HttpClient.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\SocketIO.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\WebSocket.cpp" />
@ -1073,9 +1075,11 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysics3DShape.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysics3DWorld.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CCPhysicsSprite3D.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCComponentPhysics2d.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsBody.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsContact.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsJoint.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsManager.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsShape.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsWorld.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\platform\CCFileUtils.cpp" />
@ -1283,4 +1287,4 @@
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CMakeLists.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -213,6 +213,12 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsWorld.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCComponentPhysics2d.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsManager.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CocosStudioExport.h">
<Filter>cocostudio</Filter>
</ClInclude>
@ -1858,7 +1864,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader.h">
<Filter>network\Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloaderImpl.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader-curl.h">
<Filter>network\Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCIDownloaderImpl.h">
@ -2060,6 +2066,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsWorld.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCComponentPhysics2d.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\physics\CCPhysicsManager.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CCActionFrame.cpp">
<Filter>cocostudio\action</Filter>
</ClCompile>
@ -3564,7 +3576,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader.cpp">
<Filter>network\Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloaderImpl.cpp">
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\network\CCDownloader-curl.cpp">
<Filter>network\Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\WidgetReader\GameNode3DReader\GameNode3DReader.cpp">
@ -3969,4 +3981,4 @@
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)..\..\..\..\physics3d\CMakeLists.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -119,40 +119,40 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_8.1</TargetName>
<TargetName>libcocos2d_v3.9_Windows_8.1</TargetName>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>

View File

@ -91,23 +91,23 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_WindowsPhone_8.1</TargetName>
<TargetName>libcocos2d_v3.9_WindowsPhone_8.1</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_WindowsPhone_8.1</TargetName>
<TargetName>libcocos2d_v3.9_WindowsPhone_8.1</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_WindowsPhone_8.1</TargetName>
<TargetName>libcocos2d_v3.9_WindowsPhone_8.1</TargetName>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_WindowsPhone_8.1</TargetName>
<TargetName>libcocos2d_v3.9_WindowsPhone_8.1</TargetName>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

View File

@ -565,9 +565,11 @@
<ClCompile Include="..\..\physics3d\CCPhysics3DShape.cpp" />
<ClCompile Include="..\..\physics3d\CCPhysics3DWorld.cpp" />
<ClCompile Include="..\..\physics3d\CCPhysicsSprite3D.cpp" />
<ClCompile Include="..\..\physics\CCComponentPhysics2d.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsBody.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsContact.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsJoint.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsManager.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsShape.cpp" />
<ClCompile Include="..\..\physics\CCPhysicsWorld.cpp" />
<ClCompile Include="..\..\platform\CCFileUtils.cpp" />
@ -1179,10 +1181,12 @@
<ClInclude Include="..\..\physics3d\CCPhysics3DShape.h" />
<ClInclude Include="..\..\physics3d\CCPhysics3DWorld.h" />
<ClInclude Include="..\..\physics3d\CCPhysicsSprite3D.h" />
<ClInclude Include="..\..\physics\CCComponentPhysics2d.h" />
<ClInclude Include="..\..\physics\CCPhysicsBody.h" />
<ClInclude Include="..\..\physics\CCPhysicsContact.h" />
<ClInclude Include="..\..\physics\CCPhysicsHelper.h" />
<ClInclude Include="..\..\physics\CCPhysicsJoint.h" />
<ClInclude Include="..\..\physics\CCPhysicsManager.h" />
<ClInclude Include="..\..\physics\CCPhysicsShape.h" />
<ClInclude Include="..\..\physics\CCPhysicsWorld.h" />
<ClInclude Include="..\..\platform\CCApplication.h" />
@ -1503,34 +1507,34 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>libcocos2d_v3.8_Windows_10.0</TargetName>
<TargetName>libcocos2d_v3.9_Windows_10.0</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View File

@ -1578,6 +1578,9 @@
<ClCompile Include="..\..\network\WebSocket.cpp">
<Filter>network</Filter>
</ClCompile>
<ClCompile Include="..\..\physics\CCComponentPhysics2d.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\..\physics\CCPhysicsBody.cpp">
<Filter>physics</Filter>
</ClCompile>
@ -1587,6 +1590,9 @@
<ClCompile Include="..\..\physics\CCPhysicsJoint.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\..\physics\CCPhysicsManager.cpp">
<Filter>physics</Filter>
</ClCompile>
<ClCompile Include="..\..\physics\CCPhysicsShape.cpp">
<Filter>physics</Filter>
</ClCompile>
@ -3389,6 +3395,9 @@
<ClInclude Include="..\..\network\WebSocket.h">
<Filter>network</Filter>
</ClInclude>
<ClInclude Include="..\..\physics\CCComponentPhysics2d.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\..\physics\CCPhysicsBody.h">
<Filter>physics</Filter>
</ClInclude>
@ -3401,6 +3410,9 @@
<ClInclude Include="..\..\physics\CCPhysicsJoint.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\..\physics\CCPhysicsManager.h">
<Filter>physics</Filter>
</ClInclude>
<ClInclude Include="..\..\physics\CCPhysicsShape.h">
<Filter>physics</Filter>
</ClInclude>

View File

@ -36,7 +36,7 @@ NS_CC_BEGIN
*/
/**
* Axis Aligned Bounding Box (AABB), usually caculate some rough but fast collision detection.
* Axis Aligned Bounding Box (AABB), usually calculate some rough but fast collision detection.
*/
class CC_DLL AABB
{

View File

@ -224,7 +224,7 @@ void Animate3D::startWithTarget(Node *target)
if (!hasCurve)
{
CCLOG("warning: no animation finde for the skeleton");
CCLOG("warning: no animation found for the skeleton");
}
}

View File

@ -41,7 +41,7 @@ class EventCustom;
enum class Animate3DQuality
{
QUALITY_NONE = 0, // it'll be ignore the curve-evaluating(the animation looks like stop), just acculate transition time.
QUALITY_NONE = 0, // it'll be ignore the curve-evaluating(the animation looks like stop), just accumulate transition time.
QUALITY_LOW, // low animation quality, it'll be more efficient.
QUALITY_HIGH, // high animation quality.
};
@ -161,7 +161,7 @@ protected:
float _last; //last time 0 - 1, used to generate sub Animate3D
bool _playReverse; // is playing reverse
static float _transTime; //transition time from one animate3d to another
float _accTransTime; // acculate transition time
float _accTransTime; // accumulate transition time
float _lastTime; // last t (0 - 1)
float _originInterval;// save origin interval time
float _frameRate;

View File

@ -66,7 +66,7 @@ public:
static AnimationCurve* create(float* keytime, float* value, int count);
/**
* evalute value of time
* evaluate value of time
* @param time Time to be estimated
* @param dst Estimated value of that time
* @param type EvaluateType

View File

@ -111,7 +111,7 @@ CC_CONSTRUCTOR_ACCESS:
protected:
/**
* calculate a model matrix which keep orignal translate & scaling but always face to the camera
* calculate a model matrix which keep original translate & scaling but always face to the camera
*/
bool calculateBillbaordTransform();

View File

@ -1261,7 +1261,7 @@ bool Bundle3D::loadSkinDataJson(SkinData* skindata)
skindata->inverseBindPoseMatrices.push_back(mat_bind_pos);
}
// set root bone infomation
// set root bone information
const rapidjson::Value& skin_data_1 = skin_data_array[1];
// parent and child relationship map
@ -1815,7 +1815,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton, bool singleSprit
bool skeleton_;
if (_binaryReader.read(&skeleton_, 1, 1) != 1)
{
CCLOG("warning: Failed to read is sleleton");
CCLOG("warning: Failed to read is skeleton");
return nullptr;
}
if (skeleton_)

View File

@ -48,12 +48,12 @@ class BundleReader: public cocos2d::Ref
{
public:
/**
* Structor
* Constructor
*/
BundleReader();
/**
* inicial
* Destructor
*/
~BundleReader();
@ -163,7 +163,7 @@ inline bool BundleReader::readArray(unsigned int *length, std::vector<T> *values
}
/**
* specalization for char
* specialization for char
*/
template<>
inline bool BundleReader::read<char>(char *ptr)
@ -180,7 +180,7 @@ inline bool BundleReader::read<char>(char *ptr)
}
/**
* specalization for std::string
* specialization for std::string
*/
template<>
inline bool BundleReader::read<std::string>(std::string *ptr)

View File

@ -350,15 +350,16 @@ void Mesh::draw(Renderer* renderer, float globalZOrder, const Mat4& transform, u
flags);
if (isTransparent && !forceDepthWrite)
_material->getStateBlock()->setDepthWrite(false);
else
// if (isTransparent && !forceDepthWrite)
// _material->getStateBlock()->setDepthWrite(false);
// else
_material->getStateBlock()->setDepthWrite(true);
_meshCommand.setSkipBatching(isTransparent);
_meshCommand.setTransparent(isTransparent);
_meshCommand.set3D(!_force2DQueue);
_material->getStateBlock()->setBlend(_force2DQueue || isTransparent);
// set default uniforms for Mesh
// 'u_color' and others
@ -408,7 +409,7 @@ void Mesh::setGLProgramState(GLProgramState* glProgramState)
auto material = Material::createWithGLStateProgram(glProgramState);
setMaterial(material);
// Was the texture set before teh GLProgramState ? Set it
// Was the texture set before the GLProgramState ? Set it
if (_texture)
setTexture(_texture);

View File

@ -59,7 +59,7 @@ class CC_DLL Mesh : public Ref
friend class Sprite3D;
public:
typedef std::vector<unsigned short> IndexArray;
/**create mesh from positions, normals, and so on, sigle SubMesh*/
/**create mesh from positions, normals, and so on, single SubMesh*/
static Mesh* create(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const IndexArray& indices);
/**create mesh with vertex attributes*/
CC_DEPRECATED_ATTRIBUTE static Mesh* create(const std::vector<float>& vertices, int perVertexSizeInFloat, const IndexArray& indices, int numIndex, const std::vector<MeshVertexAttrib>& attribs, int attribCount){ return create(vertices, perVertexSizeInFloat, indices, attribs); }

View File

@ -97,7 +97,7 @@ protected:
std::vector<Mat4> _invBindPoses; //inverse bind pose of bone
Bone3D* _rootBone;
Skeleton3D* _skeleton; //skeleton the skin refered
Skeleton3D* _skeleton; //skeleton the skin referred
// Pointer to the array of palette matrices.
// This array is passed to the vertex shader as a uniform.

View File

@ -35,8 +35,8 @@ NS_CC_BEGIN
*/
/**
* Oritened Bounding Box(OBB)
* @brief the OBB is similar to the AABB but the bounding box has the same direction as Sprite3D. so it's collistion detection more precise than AABB
* Oriented Bounding Box(OBB)
* @brief the OBB is similar to the AABB but the bounding box has the same direction as Sprite3D. so it's collision detection more precise than AABB
* @js NA
*/
class CC_DLL OBB
@ -119,7 +119,7 @@ protected:
void getInterval(const OBB& box, const Vec3& axis, float &min, float &max) const;
/*
* Get the edege of x y z axis direction
* Get the edge of x y z axis direction
*/
Vec3 getEdgeDirection(int index) const;
@ -131,7 +131,7 @@ protected:
public:
Vec3 _center; // obb center
Vec3 _xAxis; // x axis of obb, unit vector
Vec3 _yAxis; // y axis of obb, unit vecotr
Vec3 _yAxis; // y axis of obb, unit vector
Vec3 _zAxis; // z axis of obb, unit vector
Vec3 _extentX; // _xAxis * _extents.x
Vec3 _extentY; // _yAxis * _extents.y

View File

@ -38,7 +38,7 @@ NS_CC_BEGIN
*/
/**
* @brief Defines a basic hierachial structure of transformation spaces.
* @brief Defines a basic hierarchical structure of transformation spaces.
* @lua NA
*/
class CC_DLL Bone3D : public Ref
@ -57,7 +57,7 @@ public:
/**update own world matrix and children's*/
void updateWorldMat();
/**get wrod matrix*/
/**get world matrix*/
const Mat4& getWorldMat();
/**get bone name*/

View File

@ -40,7 +40,7 @@ NS_CC_BEGIN
class TextureCube;
/**
* Sky box technology usually used to simulate infinity sky, mountains and other phenomena.
* Sky box technology is usually used to simulate infinity sky, mountains and other phenomena.
*/
class CC_DLL Skybox : public Node
{
@ -49,7 +49,7 @@ public:
/** create skybox from 6 textures.
@param positive_x texture for the right side of the texture cube face.
@param negative_x texture for the up side of the texture cube face.
@param negative_x texture for the left side of the texture cube face.
@param positive_y texture for the top side of the texture cube face
@param negative_y texture for the bottom side of the texture cube face
@param positive_z texture for the forward side of the texture cube face.

View File

@ -51,7 +51,7 @@ class Texture2D;
class MeshSkin;
class AttachNode;
struct NodeData;
/** @brief Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */
/** @brief Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawn as sprite */
class CC_DLL Sprite3D : public Node, public BlendProtocol
{
public:
@ -70,7 +70,7 @@ public:
/** create 3d sprite asynchronously
* If the 3d model was previously loaded, it will create a new 3d sprite and the callback will be called at once.
* Otherwise it will load the model file in a new thread, and when the 3d sprite is loaded, the callback will be called with the created Sprite3D and a userdefined parameter.
* Otherwise it will load the model file in a new thread, and when the 3d sprite is loaded, the callback will be called with the created Sprite3D and a user-defined parameter.
* The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback.
* @param modelPath model to be loaded
* @param callback callback after loading
@ -124,12 +124,12 @@ public:
// overrides
/** set GLProgramState, you should bind attributes by yourself */
virtual void setGLProgramState(GLProgramState *glProgramState) override;
/** just rember bind attributes */
/** just remember bind attributes */
virtual void setGLProgram(GLProgram *glprogram) override;
/*
* Get AABB
* If the sprite has animation, it can't be calculated accuratly,
* If the sprite has animation, it can't be calculated accurately,
* because bone can drive the vertices, we just use the origin vertices
* to calculate the AABB.
*/
@ -161,7 +161,7 @@ public:
/**
* Returns 2d bounding-box
* Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate.
* Note: the bounding-box is just get from the AABB which as Z=0, so that is not very accurate.
*/
virtual Rect getBoundingBox() const override;
@ -332,7 +332,7 @@ protected:
static Sprite3DCache* _cacheInstance;
std::unordered_map<std::string, Sprite3DData*> _spriteDatas; //cached sprite datas
std::unordered_map<std::string, Sprite3DData*> _spriteDatas; //cached sprite data
};
// end of 3d group

View File

@ -924,7 +924,7 @@ void Terrain::reload()
void Terrain::Chunk::finish()
{
//genearate two VBO ,the first for vertices, we just setup datas once ,won't changed at all
//generate two VBO ,the first for vertices, we just setup datas once ,won't changed at all
//the second vbo for the indices, because we use level of detail technique to each chunk, so we will modified frequently
glGenBuffers(1,&_vbo);
@ -939,7 +939,7 @@ void Terrain::Chunk::finish()
for(int i =0;i<4;i++)
{
int step = 1<<_currentLod;
//reserve the indices size, the first part is the core part of the chunk, the second part & thid part is for fix crack
//reserve the indices size, the first part is the core part of the chunk, the second part & third part is for fix crack
int indicesAmount =(_terrain->_chunkSize.width/step+1)*(_terrain->_chunkSize.height/step+1)*6+(_terrain->_chunkSize.height/step)*6
+(_terrain->_chunkSize.width/step)*6;
_lod[i]._indices.reserve(indicesAmount);

View File

@ -44,7 +44,7 @@ NS_CC_BEGIN
*/
/**
* the maximum amount of the chunkes
* the maximum amount of the chunks
**/
#define MAX_CHUNKES 256
@ -70,12 +70,12 @@ NS_CC_BEGIN
* via the chunkSize property in TerrainData.
*
* Chunks are managed under the QuadTree.As DE FACTO terminal Node of the QuadTree;
* let us cull chunks efficientlly to reduce drawCall amount And reduce the VBOs'Size that pass to the GPU.
* let us cull chunks efficiently to reduce drawCall amount And reduce the VBOs'Size that pass to the GPU.
*
* Level of detail (LOD) is supported using a technique that is similar to texture mipmapping -- called GeoMapping.
* A distance-to-camera based test used to decide
* the appropriate LOD for a terrain chunk. The number of LOD levels is 0 by default (which
* means only the base level is used),the maxium number of LOD levels is 4. Of course ,you can hack the value individually.
* means only the base level is used),the maximum number of LOD levels is 4. Of course ,you can hack the value individually.
*
* Finally, when LOD is enabled, cracks can begin to appear between terrain Chunks of
* different LOD levels. An acceptable solution might be to simply reduce the lower LOD(high detail,smooth) chunks border,
@ -136,7 +136,7 @@ public:
/**constructor, this constructor construct a terrain which have 3 detailmaps, 1 alpha map*/
TerrainData(const char* heightMapsrc, const char * alphamap, const DetailMap& detail1,const DetailMap& detail2, const DetailMap& detail3, const Size & chunksize = Size(32,32), float mapHeight = 2, float mapScale = 0.1);
/**
*deterimine the chunk size,chunk is the minimal subdivision of the Terrain
*determine the chunk size,chunk is the minimal subdivision of the Terrain
*/
Size _chunkSize;
/**height Map source path*/
@ -285,7 +285,7 @@ private:
QuadTree * _tr;
QuadTree * _bl;
QuadTree * _br;
/**A flag present current quadTree node whether a terminal node,the terminal node is de facto the chunck*/
/**A flag present current quadTree node whether a terminal node,the terminal node is de facto the chunk*/
bool _isTerminal;
Chunk * _chunk;
int _posX;
@ -336,7 +336,7 @@ public:
**/
float getHeight(Vec2 pos, Vec3*Normal = nullptr) const;
/**get the normal of the specified pistion in terrain
/**get the normal of the specified position in terrain
* @return the normal vector of the specified position of the terrain.
* @note the fast normal calculation may not get precise normal vector.
**/
@ -348,7 +348,7 @@ public:
**/
void setDrawWire(bool boolValue);
/**
* Set threshold distance of each LOD level,must equal or gereater than the chunk size
* Set threshold distance of each LOD level,must equal or greater than the chunk size
* @Note when invoke initHeightMap, the LOD distance will be automatic calculated.
*/
void setLODDistance(float lod1, float lod2, float lod3);
@ -374,7 +374,7 @@ public:
/**
* Ray-Terrain intersection.
* @param ray to hit the terrain
* @param intersectionPoint hit point if hitted
* @param intersectionPoint hit point if hit
* @return true if hit, false otherwise
*/
bool getIntersectionPoint(const Ray & ray, Vec3 & intersectionPoint) const;
@ -395,12 +395,12 @@ public:
void resetHeightMap(const char * heightMap);
/**
* get the terrain's mininal height.
* get the terrain's minimal height.
*/
float getMinHeight();
/**
* get the terrain's maximum height.
* get the terrain's maximal height.
*/
float getMaxHeight();
@ -440,7 +440,7 @@ protected:
/**
* recursively set each chunk's LOD
* @param cameraPos the camera postion in world space
* @param cameraPos the camera position in world space
**/
void setChunksLOD(Vec3 cameraPos);
@ -458,7 +458,7 @@ protected:
virtual void onEnter() override;
/**
* cache all unifrom loactions in GLSL.
* cache all uniform locations in GLSL.
**/
void cacheUniformAttribLocation();

View File

@ -200,6 +200,8 @@ physics/CCPhysicsContact.cpp \
physics/CCPhysicsJoint.cpp \
physics/CCPhysicsShape.cpp \
physics/CCPhysicsWorld.cpp \
physics/CCComponentPhysics2d.cpp \
physics/CCPhysicsManager.cpp \
physics3d/CCPhysics3D.cpp \
physics3d/CCPhysics3DWorld.cpp \
physics3d/CCPhysics3DComponent.cpp \

View File

@ -75,7 +75,7 @@ void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruptio
{
if ([[[UIDevice currentDevice] systemVersion] intValue] > 5) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:UIApplicationDidBecomeActiveNotification object:[AVAudioSession sharedInstance]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:UIApplicationDidBecomeActiveNotification object:nil];
}
else {
AudioSessionInitialize(NULL, NULL, AudioEngineInterruptionListenerCallback, self);

View File

@ -90,7 +90,7 @@ typedef enum {
@since v0.99
*/
@interface CDLongAudioSource : NSObject <AVAudioPlayerDelegate, CDAudioInterruptProtocol>{
AVAudioPlayer *audioSourcePlayer;
CCAudioPlayer *audioSourcePlayer;
NSString *audioSourceFilePath;
NSInteger numberOfLoops;
float volume;
@ -106,7 +106,7 @@ typedef enum {
@protected
tLongAudioSourceState state;
}
@property (readonly) AVAudioPlayer *audioSourcePlayer;
@property (readonly) CCAudioPlayer *audioSourcePlayer;
@property (readonly) NSString *audioSourceFilePath;
@property (readwrite, nonatomic) NSInteger numberOfLoops;
@property (readwrite, nonatomic) float volume;
@ -196,13 +196,13 @@ typedef enum {
/** 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
//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 AVAudioPlayer API
//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).
*/

View File

@ -66,12 +66,12 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
//New file
if (state != kLAS_Init) {
[audioSourceFilePath release];//Release old file path
[audioSourcePlayer release];//Release old AVAudioPlayer, they can't be reused
[audioSourcePlayer release];//Release old CCAudioPlayer, 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];
audioSourcePlayer = [(CCAudioPlayer*)[CCAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:&error];
if (error == nil) {
[audioSourcePlayer prepareToPlay];
audioSourcePlayer.delegate = self;
@ -190,12 +190,12 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
numberOfLoops = loopCount;
}
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag {
- (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 AVAudioPlayer stops. Workaround
//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.
@ -208,11 +208,11 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
}
}
-(void)audioPlayerBeginInterruption:(AVAudioPlayer *)player {
-(void)audioPlayerBeginInterruption:(CCAudioPlayer *)player {
CDLOGINFO(@"Denshion::CDLongAudioSource - audio player interrupted");
}
-(void)audioPlayerEndInterruption:(AVAudioPlayer *)player {
-(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

View File

@ -23,13 +23,13 @@
*/
/**
A set of proxy classes to allow iOS audio code to run on MacOS X. AVAudioPlayer is implemented using NSSound.
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:
AVAudioPlayer numberOfLoops not correctly supported. Looping is either on or off, can not specify a specific number of loops.
AVAudioPlayer panning not supported.
AVAudioPlayer metering not supported.
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.
*/
@ -60,7 +60,7 @@ extern OSStatus AudioSessionGetProperty(UInt32 inID, UInt32 *ioDataSize, void *o
@protocol AVAudioPlayerDelegate;
/* This class is available with iPhone 2.2 or later */
@interface AVAudioPlayer : NSObject <NSSoundDelegate> {
@interface CCAudioPlayer : NSObject <NSSoundDelegate> {
// properties
id<AVAudioPlayerDelegate> delegate;
@ -137,24 +137,24 @@ extern OSStatus AudioSessionGetProperty(UInt32 inID, UInt32 *ioDataSize, void *o
@end
/* A protocol for delegates of AVAudioPlayer */
/* A protocol for delegates of CCAudioPlayer */
@protocol AVAudioPlayerDelegate <NSObject>
@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:(AVAudioPlayer *)player successfully:(BOOL)flag;
- (void)audioPlayerDidFinishPlaying:(CCAudioPlayer *)player successfully:(BOOL)flag;
/* if an error occurs while decoding it will be reported to the delegate. */
- (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer *)player error:(NSError *)error;
- (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:(AVAudioPlayer *)player;
- (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:(AVAudioPlayer *)player withFlags:(NSUInteger)flags;
- (void)audioPlayerEndInterruption:(CCAudioPlayer *)player withFlags:(NSUInteger)flags;
/* audioPlayerEndInterruption: is called when the preferred method, audioPlayerEndInterruption:withFlags:, is not implemented. */
- (void)audioPlayerEndInterruption:(AVAudioPlayer *)player;
- (void)audioPlayerEndInterruption:(CCAudioPlayer *)player;
@end

View File

@ -42,7 +42,7 @@ OSStatus AudioSessionGetProperty(UInt32 inID, UInt32 *ioDataSize, void *outData)
return 0;
}
@implementation AVAudioPlayer
@implementation CCAudioPlayer
@synthesize delegate, numberOfChannels, pan, deviceCurrentTime, url, data;

View File

@ -41,12 +41,12 @@ Requirements:
- Frameworks: OpenAL, AudioToolbox, AVFoundation
@par CDAudioManager
CDAudioManager is basically a thin wrapper around an AVAudioPlayer object used for playing
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 AVAudioPlayer which is exposed as a property.
backgroundMusic CCAudioPlayer which is exposed as a property.
Requirements:
- Firmware: OS 2.2 or greater

View File

@ -404,7 +404,7 @@ bool Console::listenOnTCP(int port)
setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on));
// bind address
if (_bindAddress.length() > 0)
if (!_bindAddress.empty())
{
if (res->ai_family == AF_INET)
{
@ -533,7 +533,7 @@ void Console::commandFileUtils(int fd, const std::string &args)
{
FileUtils::getInstance()->purgeCachedEntries();
}
else if( args.length()==0)
else if( args.empty())
{
sched->performFunctionInCocosThread( std::bind(&printFileUtils, fd) );
}
@ -555,7 +555,7 @@ void Console::commandConfig(int fd, const std::string& args)
void Console::commandResolution(int fd, const std::string& args)
{
if(args.length()==0) {
if(args.empty()) {
auto director = Director::getInstance();
Size points = director->getWinSize();
Size pixels = director->getWinSizeInPixels();
@ -598,7 +598,7 @@ void Console::commandProjection(int fd, const std::string& args)
auto director = Director::getInstance();
Scheduler *sched = director->getScheduler();
if(args.length()==0)
if(args.empty())
{
char buf[20];
auto proj = director->getProjection();
@ -648,7 +648,7 @@ void Console::commandTextures(int fd, const std::string& args)
}
);
}
else if(args.length()==0)
else if(args.empty())
{
sched->performFunctionInCocosThread( [=](){
mydprintf(fd, "%s", Director::getInstance()->getTextureCache()->getCachedTextureInfo().c_str());

View File

@ -61,7 +61,6 @@ THE SOFTWARE.
#include "base/CCConfiguration.h"
#include "base/CCAsyncTaskPool.h"
#include "platform/CCApplication.h"
//#include "platform/CCGLViewImpl.h"
#if CC_ENABLE_SCRIPT_BINDING
#include "CCScriptSupport.h"
@ -1252,8 +1251,18 @@ void Director::setContentScaleFactor(float scaleFactor)
void Director::setNotificationNode(Node *node)
{
CC_SAFE_RELEASE(_notificationNode);
_notificationNode = node;
if (_notificationNode != nullptr){
_notificationNode->onExitTransitionDidStart();
_notificationNode->onExit();
_notificationNode->cleanup();
}
CC_SAFE_RELEASE(_notificationNode);
_notificationNode = node;
if (node == nullptr)
return;
_notificationNode->onEnter();
_notificationNode->onEnterTransitionDidFinish();
CC_SAFE_RETAIN(_notificationNode);
}

View File

@ -154,12 +154,12 @@ public:
/** Gets the FPS value. */
inline float getAnimationInterval() { return _animationInterval; }
/** Sets the FPS value. FPS = 1/internal. */
/** Sets the FPS value. FPS = 1/interval. */
virtual void setAnimationInterval(float interval) = 0;
/** Whether or not to display the FPS on the bottom-left corner. */
/** Whether or not displaying the FPS on the bottom-left corner of the screen. */
inline bool isDisplayStats() { return _displayStats; }
/** Display the FPS on the bottom-left corner. */
/** Display the FPS on the bottom-left corner of the screen. */
inline void setDisplayStats(bool displayStats) { _displayStats = displayStats; }
/** Get seconds per frame. */
@ -260,8 +260,8 @@ public:
Vec2 convertToUI(const Vec2& point);
/**
* Gets the distance between camera and near clipping frane.
* It is correct for default camera that near clipping frane is the same as screen.
* Gets the distance between camera and near clipping frame.
* It is correct for default camera that near clipping frame is same as the screen.
*/
float getZEye() const;

View File

@ -841,8 +841,13 @@ void EventDispatcher::dispatchTouchEventToListeners(EventListenerVector* listene
}
Camera::_visitingCamera = camera;
auto cameraFlag = (unsigned short)camera->getCameraFlag();
for (auto& l : sceneListeners)
{
if (0 == (l->getAssociatedNode()->getCameraMask() & cameraFlag))
{
continue;
}
if (onEvent(l))
{
shouldStopPropagation = true;

View File

@ -82,19 +82,19 @@ bool EventListenerMouse::init()
{
case EventMouse::MouseEventType::MOUSE_DOWN:
if(onMouseDown != nullptr)
onMouseDown(event);
onMouseDown(mouseEvent);
break;
case EventMouse::MouseEventType::MOUSE_UP:
if(onMouseUp != nullptr)
onMouseUp(event);
onMouseUp(mouseEvent);
break;
case EventMouse::MouseEventType::MOUSE_MOVE:
if(onMouseMove != nullptr)
onMouseMove(event);
onMouseMove(mouseEvent);
break;
case EventMouse::MouseEventType::MOUSE_SCROLL:
if(onMouseScroll != nullptr)
onMouseScroll(event);
onMouseScroll(mouseEvent);
break;
default:
break;

View File

@ -57,10 +57,10 @@ public:
virtual EventListenerMouse* clone() override;
virtual bool checkAvailable() override;
std::function<void(Event* event)> onMouseDown;
std::function<void(Event* event)> onMouseUp;
std::function<void(Event* event)> onMouseMove;
std::function<void(Event* event)> onMouseScroll;
std::function<void(EventMouse* event)> onMouseDown;
std::function<void(EventMouse* event)> onMouseUp;
std::function<void(EventMouse* event)> onMouseMove;
std::function<void(EventMouse* event)> onMouseScroll;
CC_CONSTRUCTOR_ACCESS:
EventListenerMouse();

View File

@ -274,9 +274,9 @@ public:
void insert(const K& key, V object)
{
CCASSERT(object != nullptr, "Object is nullptr!");
object->retain();
erase(key);
_data.insert(std::make_pair(key, object));
object->retain();
}
/**
@ -308,7 +308,6 @@ public:
_data.erase(iter);
return 1;
}
return 0;
}

View File

@ -130,19 +130,15 @@ void Timer::update(float dt)
trigger(interval);
_elapsed -= interval;
_timesExecuted += 1;
if (_elapsed <= 0.f)
if (!_runForever && _timesExecuted > _repeat)
{
cancel();
break;
}
if (_runForever)
if (_elapsed <= 0.f)
{
continue;
}
if (_timesExecuted > _repeat)
{ //unschedule timer
cancel();
break;
}
}

View File

@ -163,6 +163,18 @@ void ScriptEngineManager::destroyInstance()
}
}
bool ScriptEngineManager::sendActionEventToJS(Action* actionObject, int eventType, void* param)
{
auto scriptEngine = getInstance()->getScriptEngine();
ActionObjectScriptData data(actionObject,(int*)&eventType, param);
ScriptEvent scriptEvent(kScriptActionEvent,(void*)&data);
if (scriptEngine->sendEvent(&scriptEvent))
return true;
return false;
}
bool ScriptEngineManager::sendNodeEventToJS(Node* node, int action)
{
auto scriptEngine = getInstance()->getScriptEngine();

View File

@ -51,6 +51,7 @@ class Layer;
class MenuItem;
class CallFunc;
class Acceleration;
class Action;
enum ccScriptType {
kScriptTypeNone = 0,
@ -259,7 +260,8 @@ enum ScriptEventType
kControlEvent,
kCommonEvent,
kComponentEvent,
kRestartGame
kRestartGame,
kScriptActionEvent
};
/**
@ -296,6 +298,48 @@ struct BasicScriptData
}
};
/**
* For Lua, Wrapper the script data that should be used to find the handler corresponding to the Lua function by the nativeobject pointer and store the value pointer which would be converted concretely by the different events,then the converted data would be passed into the Lua stack.
* @js NA
*/
struct ActionObjectScriptData
{
/**
* For Lua, nativeobject is used to get handler corresponding to the Lua function.
*
* @js NA
* @lua NA
*/
void* nativeObject;
/**
* A pointer point to the value data which event action
*
* @js NA
* @lua NA
*/
int* eventType;
/**
* A pointer point to the value data which would be converted by different events.
*
* @js NA
* @lua NA
*/
void* param;
/**
* Constructor of BasicScriptData.
*
* @js NA
* @lua NA
*/
ActionObjectScriptData(void* inObject,int* inValue = nullptr, void* inParam = nullptr)
: nativeObject(inObject),eventType(inValue), param(inParam)
{
}
};
/**
* For Lua, the SchedulerScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the elapse into the Lua stack as a parameter when scheduler update event is triggered.
* @js NA
@ -770,6 +814,13 @@ public:
* @js NA
*/
static void destroyInstance();
/**
*
*
* @lua NA
* @js NA
*/
static bool sendActionEventToJS(Action* actionObject, int eventType, void* param);
/**
*
*

View File

@ -31,7 +31,7 @@ NS_CC_BEGIN
CC_DLL const char* cocos2dVersion()
{
return "cocos2d-x-3.8-github";
return "cocos2d-x-3.8";
}
NS_CC_END

View File

@ -29,8 +29,8 @@ THE SOFTWARE.
#define __COCOS2D_H__
// 0x00 HI ME LO
// 00 03 07 00
#define COCOS2D_VERSION 0x00030700
// 00 03 08 00
#define COCOS2D_VERSION 0x00030800
//
// all cocos2d include files
@ -186,6 +186,8 @@ THE SOFTWARE.
#include "physics/CCPhysicsJoint.h"
#include "physics/CCPhysicsShape.h"
#include "physics/CCPhysicsWorld.h"
#include "physics/CCComponentPhysics2d.h"
#include "physics/CCPhysicsManager.h"
// platform
#include "platform/CCCommon.h"

View File

@ -217,7 +217,7 @@ const __String* __Dictionary::valueForKey(intptr_t key)
void __Dictionary::setObject(Ref* pObject, const std::string& key)
{
CCASSERT(key.length() > 0 && pObject != nullptr, "Invalid Argument!");
CCASSERT(!key.empty() && pObject != nullptr, "Invalid Argument!");
if (_dictType == kDictUnknown)
{
_dictType = kDictStr;
@ -276,7 +276,7 @@ void __Dictionary::removeObjectForKey(const std::string& key)
}
CCASSERT(_dictType == kDictStr, "this dictionary doesn't use string as its key");
CCASSERT(key.length() > 0, "Invalid Argument!");
CCASSERT(!key.empty(), "Invalid Argument!");
DictElement *pElement = nullptr;
HASH_FIND_STR(_elements, key.c_str(), pElement);
removeObjectForElememt(pElement);

View File

@ -196,7 +196,7 @@ __Array* __String::componentsSeparatedByString(const char *delimiter)
strTmp = strTmp.substr(cutAt + 1);
}
if(strTmp.length() > 0)
if(!strTmp.empty())
{
result->addObject(__String::create(strTmp));
}

View File

@ -663,7 +663,7 @@ Sequence* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* ch
if(target != nullptr)
{
if(selectorName.length() > 0)
if(!selectorName.empty())
{
SEL_CallFuncN selCallFunc = 0;

View File

@ -796,7 +796,7 @@ CCBKeyframe* CCBReader::readKeyframe(PropertyType type)
SpriteFrame* spriteFrame;
if (spriteSheet.length() == 0)
if (spriteSheet.empty())
{
spriteFile = _CCBRootPath + spriteFile;

View File

@ -575,9 +575,9 @@ SpriteFrame * NodeLoader::parsePropTypeSpriteFrame(Node * pNode, Node * pParent,
std::string spriteFile = ccbReader->readCachedString();
SpriteFrame *spriteFrame = nullptr;
if (spriteFile.length() != 0)
if (!spriteFile.empty())
{
if (spriteSheet.length() == 0)
if (spriteSheet.empty())
{
spriteFile = ccbReader->getCCBRootPath() + spriteFile;
Texture2D * texture = Director::getInstance()->getTextureCache()->addImage(spriteFile.c_str());
@ -623,7 +623,7 @@ Animation * NodeLoader::parsePropTypeAnimation(Node * pNode, Node * pParent, CCB
animation = CCBReader::lastPathComponent(animation.c_str());
animationFile = CCBReader::lastPathComponent(animationFile.c_str());
if (animation.length() > 0)
if (!animation.empty())
{
AnimationCache * animationCache = AnimationCache::getInstance();
animationCache->addAnimationsWithFile(animationFile.c_str());
@ -636,7 +636,7 @@ Animation * NodeLoader::parsePropTypeAnimation(Node * pNode, Node * pParent, CCB
Texture2D * NodeLoader::parsePropTypeTexture(Node * pNode, Node * pParent, CCBReader * ccbReader) {
std::string spriteFile = ccbReader->getCCBRootPath() + ccbReader->readCachedString();
if (spriteFile.length() > 0)
if (!spriteFile.empty())
{
return Director::getInstance()->getTextureCache()->addImage(spriteFile.c_str());
}
@ -775,7 +775,7 @@ BlockData * NodeLoader::parsePropTypeBlock(Node * pNode, Node * pParent, CCBRead
if(target != nullptr)
{
if(selectorName.length() > 0)
if(!selectorName.empty())
{
SEL_MenuHandler selMenuHandler = 0;
@ -856,7 +856,7 @@ BlockControlData * NodeLoader::parsePropTypeBlockControl(Node * pNode, Node * pP
if(target != nullptr)
{
if(selectorName.length() > 0)
if(!selectorName.empty())
{
Control::Handler selControlHandler = 0;

View File

@ -588,6 +588,12 @@ bool BoneNode::isPointOnRack(const cocos2d::Vec2& bonePoint)
void BoneNode::batchBoneDrawToSkeleton(BoneNode* bone) const
{
bool visibleByCamera = bone->isVisitableByVisitingCamera();
if (!visibleByCamera)
{
return;
}
cocos2d::Vec3 vpos[4];
for (int i = 0; i < 4; i++)
{

View File

@ -265,7 +265,7 @@ Node* CSLoader::createNode(const std::string& filename)
CCLOG("suffix = %s", suffix.c_str());
CSLoader* load = CSLoader::getInstance();
if (suffix == "csb")
{
return load->createNodeWithFlatBuffersFile(filename);
@ -274,7 +274,7 @@ Node* CSLoader::createNode(const std::string& filename)
{
return load->createNodeFromJson(filename);
}
return nullptr;
}
@ -286,7 +286,7 @@ Node* CSLoader::createNode(const std::string &filename, const ccNodeLoadCallback
CCLOG("suffix = %s", suffix.c_str());
CSLoader* load = CSLoader::getInstance();
if (suffix == "csb")
{
return load->createNodeWithFlatBuffersFile(filename, callback);
@ -295,6 +295,30 @@ Node* CSLoader::createNode(const std::string &filename, const ccNodeLoadCallback
return nullptr;
}
Node* CSLoader::createNodeWithVisibleSize(const std::string& filename)
{
auto node = createNode(filename);
if (node != nullptr)
{
Size frameSize = Director::getInstance()->getVisibleSize();
node->setContentSize(frameSize);
ui::Helper::doLayout(node);
}
return node;
}
Node* CSLoader::createNodeWithVisibleSize(const std::string &filename, const ccNodeLoadCallback &callback)
{
auto node = createNode(filename, callback);
if (node != nullptr)
{
Size frameSize = Director::getInstance()->getVisibleSize();
node->setContentSize(frameSize);
ui::Helper::doLayout(node);
}
return node;
}
std::string CSLoader::getExtentionName(const std::string& name)
{
std::string result = "";
@ -551,7 +575,7 @@ void CSLoader::initNode(Node* node, const rapidjson::Value& json)
GLubyte red = (GLubyte)DICTOOL->getIntValue_json(json, RED, 255);
GLubyte green = (GLubyte)DICTOOL->getIntValue_json(json, GREEN, 255);
GLubyte blue = (GLubyte)DICTOOL->getIntValue_json(json, BLUE, 255);
int zorder = DICTOOL->getIntValue_json(json, ZORDER);
int zorder = DICTOOL->getIntValue_json(json, ZORDER);
int tag = DICTOOL->getIntValue_json(json, TAG);
int actionTag = DICTOOL->getIntValue_json(json, ACTION_TAG);
bool visible = DICTOOL->getBooleanValue_json(json, VISIBLE);

View File

@ -81,6 +81,8 @@ public:
static cocos2d::Node* createNode(const std::string& filename, const ccNodeLoadCallback& callback);
static cocos2d::Node* createNode(const Data data);
static cocos2d::Node* createNode(const Data data, const ccNodeLoadCallback &callback);
static cocos2d::Node* createNodeWithVisibleSize(const std::string& filename);
static cocos2d::Node* createNodeWithVisibleSize(const std::string& filename, const ccNodeLoadCallback& callback);
static cocostudio::timeline::ActionTimeline* createTimeline(const std::string& filename);
static cocostudio::timeline::ActionTimeline* createTimeline(const Data data, const std::string& filename);

View File

@ -212,7 +212,7 @@ Bone *Armature::createBone(const std::string& boneName)
Bone *bone = nullptr;
if( parentName.length() != 0 )
if( !parentName.empty())
{
createBone(parentName.c_str());
bone = Bone::create(boneName);

View File

@ -80,7 +80,6 @@ namespace cocostudio
void ComExtensionData::onRemove()
{
CC_SAFE_RELEASE_NULL(_timelineData);
}
void ComExtensionData::setActionTag(int actionTag)

View File

@ -809,7 +809,7 @@ MovementData *DataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementXML
tinyxml2::XMLElement *parentXml = nullptr;
if (parentName.length() != 0)
if (!parentName.empty())
{
parentXml = movementXML->FirstChildElement(BONE);

View File

@ -151,7 +151,7 @@ void DisplayFactory::createSpriteDisplay(Bone *bone, DecorativeDisplay *decoDisp
}
//! create display
if(textureName.length() == 0)
if(textureName.empty())
{
skin = Skin::create();
}

View File

@ -383,10 +383,12 @@ bool DisplayManager::containPoint(Vec2 &point)
Vec2 outPoint;
Sprite *sprite = (Sprite *)_currentDecoDisplay->getDisplay();
sprite = (Sprite *)sprite->getChildByTag(0);
ret = CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint);
Sprite *child = (Sprite *)sprite->getChildByTag(0);
if(nullptr != child)
sprite = child;
if (nullptr != sprite)
ret = CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint);
}
break;

View File

@ -345,9 +345,9 @@ void Tween::arriveKeyFrame(FrameData *keyFrameData)
Armature *childAramture = _bone->getChildArmature();
if(childAramture)
{
if(keyFrameData->strMovement.length() != 0)
if(!keyFrameData->strMovement.empty())
{
childAramture->getAnimation()->play(keyFrameData->strMovement.c_str());
childAramture->getAnimation()->play(keyFrameData->strMovement);
}
}
}
@ -450,7 +450,7 @@ float Tween::updateFrameData(float currentPercent)
to = frames.at(_toIndex);
//! Guaranteed to trigger frame event
if(from->strEvent.length() != 0 && !_animation->isIgnoreFrameEvent())
if(!from->strEvent.empty() && !_animation->isIgnoreFrameEvent())
{
_animation->frameEvent(_bone, from->strEvent.c_str(), from->frameID, playedTime);
}

View File

@ -43,6 +43,7 @@ struct EventFrame;
struct IntFrame;
struct BoolFrame;
struct InnerActionFrame;
struct EasingData;
struct RotationSkew;
struct Position;
struct Scale;
@ -51,7 +52,9 @@ struct Color;
struct ColorVector;
struct FlatSize;
struct CapInsets;
struct BlendFunc;
struct ResourceData;
struct BlendFrame;
} // namespace flatbuffers
namespace flatbuffers {
@ -60,6 +63,7 @@ struct Node3DOption;
struct Sprite3DOptions;
struct Particle3DOptions;
struct UserCameraOptions;
struct GameNode3DOption;
struct Vector2;
struct Vector3;
@ -93,92 +97,6 @@ MANUALLY_ALIGNED_STRUCT(4) Vector3 {
};
STRUCT_END(Vector3, 12);
struct GameNode3DOption : private flatbuffers::Table {
const flatbuffers::String *name() const { return GetPointer<const flatbuffers::String *>(4); }
int32_t skyBoxMask() const { return GetField<int32_t>(6, 0); }
uint8_t skyBoxEnabled() const { return GetField<uint8_t>(8, 0); }
const ResourceData *leftFileData() const { return GetPointer<const ResourceData *>(10); }
const ResourceData *rightFileData() const { return GetPointer<const ResourceData *>(12); }
const ResourceData *upFileData() const { return GetPointer<const ResourceData *>(14); }
const ResourceData *downFileData() const { return GetPointer<const ResourceData *>(16); }
const ResourceData *forwardFileData() const { return GetPointer<const ResourceData *>(18); }
const ResourceData *backFileData() const { return GetPointer<const ResourceData *>(20); }
const flatbuffers::String *frameEvent() const { return GetPointer<const flatbuffers::String *>(22); }
const flatbuffers::String *customProperty() const { return GetPointer<const flatbuffers::String *>(24); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* nodeOptions */) &&
verifier.Verify(name()) &&
VerifyField<int32_t>(verifier, 6 /* skyBoxMask */) &&
VerifyField<uint8_t>(verifier, 8 /* skyBoxEnabled */) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 10 /* leftFileData */) &&
verifier.VerifyTable(leftFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 12 /* rightFileData */) &&
verifier.VerifyTable(rightFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 14 /* upFileData */) &&
verifier.VerifyTable(upFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 16 /* downFileData */) &&
verifier.VerifyTable(downFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 18 /* forwardFileData */) &&
verifier.VerifyTable(forwardFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 20 /* backFileData */) &&
verifier.VerifyTable(backFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 22 /* frameEvent */) &&
verifier.Verify(frameEvent()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 24 /* customProperty */) &&
verifier.Verify(customProperty()) &&
verifier.EndTable();
}
};
struct GameNode3DOptionBuilder {
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_name(flatbuffers::Offset<flatbuffers::String> name) { fbb_.AddOffset(4, name); }
void add_skyBoxMask(int32_t skyBoxMask) { fbb_.AddElement<int32_t>(6, skyBoxMask, 0); }
void add_skyboxEnabled(uint8_t skyBoxEnabled) { fbb_.AddElement<uint8_t>(8, skyBoxEnabled, 0); }
void add_leftFileData(flatbuffers::Offset<ResourceData> leftFileData) { fbb_.AddOffset(10, leftFileData); }
void add_rightFileData(flatbuffers::Offset<ResourceData> rightFileData) { fbb_.AddOffset(12, rightFileData); }
void add_upFileData(flatbuffers::Offset<ResourceData> upFileData) { fbb_.AddOffset(14, upFileData); }
void add_downFileData(flatbuffers::Offset<ResourceData> downFileData) { fbb_.AddOffset(16, downFileData); }
void add_forwardFileData(flatbuffers::Offset<ResourceData> forwardFileData) { fbb_.AddOffset(18, forwardFileData); }
void add_backFileData(flatbuffers::Offset<ResourceData> backFileData) { fbb_.AddOffset(20, backFileData); }
void add_frameEvent(flatbuffers::Offset<flatbuffers::String> frameEvent) { fbb_.AddOffset(22, frameEvent); }
void add_customProperty(flatbuffers::Offset<flatbuffers::String> customProperty) { fbb_.AddOffset(24, customProperty); }
GameNode3DOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
flatbuffers::Offset<GameNode3DOption> Finish() {
auto o = flatbuffers::Offset<GameNode3DOption>(fbb_.EndTable(start_, 11));
return o;
}
};
inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOption(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> name = 0,
int32_t skyBoxMask = 0,
uint8_t skyBoxEnabled = 0,
flatbuffers::Offset<ResourceData> leftFileData = 0,
flatbuffers::Offset<ResourceData> rightFileData = 0,
flatbuffers::Offset<ResourceData> upFileData = 0,
flatbuffers::Offset<ResourceData> downFileData = 0,
flatbuffers::Offset<ResourceData> forwardFileData = 0,
flatbuffers::Offset<ResourceData> backFileData = 0,
flatbuffers::Offset<flatbuffers::String> frameEvent = 0,
flatbuffers::Offset<flatbuffers::String> customProperty = 0) {
GameNode3DOptionBuilder builder_(_fbb);
builder_.add_customProperty(customProperty);
builder_.add_frameEvent(frameEvent);
builder_.add_backFileData(backFileData);
builder_.add_forwardFileData(forwardFileData);
builder_.add_downFileData(downFileData);
builder_.add_upFileData(upFileData);
builder_.add_rightFileData(rightFileData);
builder_.add_leftFileData(leftFileData);
builder_.add_skyboxEnabled(skyBoxEnabled);
builder_.add_skyBoxMask(skyBoxMask);
builder_.add_name(name);
return builder_.Finish();
}
struct Node3DOption : private flatbuffers::Table {
const flatbuffers::WidgetOptions *nodeOptions() const { return GetPointer<const flatbuffers::WidgetOptions *>(4); }
const Vector3 *position3D() const { return GetStruct<const Vector3 *>(6); }
@ -232,6 +150,7 @@ struct Sprite3DOptions : private flatbuffers::Table {
const Node3DOption *node3DOption() const { return GetPointer<const Node3DOption *>(4); }
const flatbuffers::ResourceData *fileData() const { return GetPointer<const flatbuffers::ResourceData *>(6); }
uint8_t runAction() const { return GetField<uint8_t>(8, 0); }
uint8_t isFlipped() const { return GetField<uint8_t>(10, 0); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* node3DOption */) &&
@ -239,6 +158,7 @@ struct Sprite3DOptions : private flatbuffers::Table {
VerifyField<flatbuffers::uoffset_t>(verifier, 6 /* fileData */) &&
verifier.VerifyTable(fileData()) &&
VerifyField<uint8_t>(verifier, 8 /* runAction */) &&
VerifyField<uint8_t>(verifier, 10 /* isFlipped */) &&
verifier.EndTable();
}
};
@ -249,10 +169,11 @@ struct Sprite3DOptionsBuilder {
void add_node3DOption(flatbuffers::Offset<Node3DOption> node3DOption) { fbb_.AddOffset(4, node3DOption); }
void add_fileData(flatbuffers::Offset<flatbuffers::ResourceData> fileData) { fbb_.AddOffset(6, fileData); }
void add_runAction(uint8_t runAction) { fbb_.AddElement<uint8_t>(8, runAction, 0); }
void add_isFlipped(uint8_t isFlipped) { fbb_.AddElement<uint8_t>(10, isFlipped, 0); }
Sprite3DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
Sprite3DOptionsBuilder &operator=(const Sprite3DOptionsBuilder &);
flatbuffers::Offset<Sprite3DOptions> Finish() {
auto o = flatbuffers::Offset<Sprite3DOptions>(fbb_.EndTable(start_, 3));
auto o = flatbuffers::Offset<Sprite3DOptions>(fbb_.EndTable(start_, 4));
return o;
}
};
@ -260,10 +181,12 @@ struct Sprite3DOptionsBuilder {
inline flatbuffers::Offset<Sprite3DOptions> CreateSprite3DOptions(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<Node3DOption> node3DOption = 0,
flatbuffers::Offset<flatbuffers::ResourceData> fileData = 0,
uint8_t runAction = 0) {
uint8_t runAction = 0,
uint8_t isFlipped = 0) {
Sprite3DOptionsBuilder builder_(_fbb);
builder_.add_fileData(fileData);
builder_.add_node3DOption(node3DOption);
builder_.add_isFlipped(isFlipped);
builder_.add_runAction(runAction);
return builder_.Finish();
}
@ -310,12 +233,12 @@ struct UserCameraOptions : private flatbuffers::Table {
float farClip() const { return GetField<float>(10, 1000); }
int32_t cameraFlag() const { return GetField<int32_t>(12, 0); }
uint8_t skyBoxEnabled() const { return GetField<uint8_t>(14, 0); }
const ResourceData *leftFileData() const { return GetPointer<const ResourceData *>(16); }
const ResourceData *rightFileData() const { return GetPointer<const ResourceData *>(18); }
const ResourceData *upFileData() const { return GetPointer<const ResourceData *>(20); }
const ResourceData *downFileData() const { return GetPointer<const ResourceData *>(22); }
const ResourceData *forwardFileData() const { return GetPointer<const ResourceData *>(24); }
const ResourceData *backFileData() const { return GetPointer<const ResourceData *>(26); }
const flatbuffers::ResourceData *leftFileData() const { return GetPointer<const flatbuffers::ResourceData *>(16); }
const flatbuffers::ResourceData *rightFileData() const { return GetPointer<const flatbuffers::ResourceData *>(18); }
const flatbuffers::ResourceData *upFileData() const { return GetPointer<const flatbuffers::ResourceData *>(20); }
const flatbuffers::ResourceData *downFileData() const { return GetPointer<const flatbuffers::ResourceData *>(22); }
const flatbuffers::ResourceData *forwardFileData() const { return GetPointer<const flatbuffers::ResourceData *>(24); }
const flatbuffers::ResourceData *backFileData() const { return GetPointer<const flatbuffers::ResourceData *>(26); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* node3DOption */) &&
@ -349,13 +272,13 @@ struct UserCameraOptionsBuilder {
void add_nearClip(float nearClip) { fbb_.AddElement<float>(8, nearClip, 1); }
void add_farClip(float farClip) { fbb_.AddElement<float>(10, farClip, 1000); }
void add_cameraFlag(int32_t cameraFlag) { fbb_.AddElement<int32_t>(12, cameraFlag, 0); }
void add_skyboxEnabled(uint8_t skyBoxEnabled) { fbb_.AddElement<uint8_t>(14, skyBoxEnabled, 0); }
void add_leftFileData(flatbuffers::Offset<ResourceData> leftFileData) { fbb_.AddOffset(16, leftFileData); }
void add_rightFileData(flatbuffers::Offset<ResourceData> rightFileData) { fbb_.AddOffset(18, rightFileData); }
void add_upFileData(flatbuffers::Offset<ResourceData> upFileData) { fbb_.AddOffset(20, upFileData); }
void add_downFileData(flatbuffers::Offset<ResourceData> downFileData) { fbb_.AddOffset(22, downFileData); }
void add_forwardFileData(flatbuffers::Offset<ResourceData> forwardFileData) { fbb_.AddOffset(24, forwardFileData); }
void add_backFileData(flatbuffers::Offset<ResourceData> backFileData) { fbb_.AddOffset(26, backFileData); }
void add_skyBoxEnabled(uint8_t skyBoxEnabled) { fbb_.AddElement<uint8_t>(14, skyBoxEnabled, 0); }
void add_leftFileData(flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) { fbb_.AddOffset(16, leftFileData); }
void add_rightFileData(flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) { fbb_.AddOffset(18, rightFileData); }
void add_upFileData(flatbuffers::Offset<flatbuffers::ResourceData> upFileData) { fbb_.AddOffset(20, upFileData); }
void add_downFileData(flatbuffers::Offset<flatbuffers::ResourceData> downFileData) { fbb_.AddOffset(22, downFileData); }
void add_forwardFileData(flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) { fbb_.AddOffset(24, forwardFileData); }
void add_backFileData(flatbuffers::Offset<flatbuffers::ResourceData> backFileData) { fbb_.AddOffset(26, backFileData); }
UserCameraOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
UserCameraOptionsBuilder &operator=(const UserCameraOptionsBuilder &);
flatbuffers::Offset<UserCameraOptions> Finish() {
@ -371,12 +294,12 @@ inline flatbuffers::Offset<UserCameraOptions> CreateUserCameraOptions(flatbuffer
float farClip = 1000,
int32_t cameraFlag = 0,
uint8_t skyBoxEnabled = 0,
flatbuffers::Offset<ResourceData> leftFileData = 0,
flatbuffers::Offset<ResourceData> rightFileData = 0,
flatbuffers::Offset<ResourceData> upFileData = 0,
flatbuffers::Offset<ResourceData> downFileData = 0,
flatbuffers::Offset<ResourceData> forwardFileData = 0,
flatbuffers::Offset<ResourceData> backFileData = 0) {
flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0) {
UserCameraOptionsBuilder builder_(_fbb);
builder_.add_backFileData(backFileData);
builder_.add_forwardFileData(forwardFileData);
@ -384,12 +307,99 @@ inline flatbuffers::Offset<UserCameraOptions> CreateUserCameraOptions(flatbuffer
builder_.add_upFileData(upFileData);
builder_.add_rightFileData(rightFileData);
builder_.add_leftFileData(leftFileData);
builder_.add_skyboxEnabled(skyBoxEnabled);
builder_.add_cameraFlag(cameraFlag);
builder_.add_farClip(farClip);
builder_.add_nearClip(nearClip);
builder_.add_fov(fov);
builder_.add_node3DOption(node3DOption);
builder_.add_skyBoxEnabled(skyBoxEnabled);
return builder_.Finish();
}
struct GameNode3DOption : private flatbuffers::Table {
const flatbuffers::String *name() const { return GetPointer<const flatbuffers::String *>(4); }
int32_t skyBoxMask() const { return GetField<int32_t>(6, 0); }
uint8_t skyBoxEnabled() const { return GetField<uint8_t>(8, 0); }
const flatbuffers::ResourceData *leftFileData() const { return GetPointer<const flatbuffers::ResourceData *>(10); }
const flatbuffers::ResourceData *rightFileData() const { return GetPointer<const flatbuffers::ResourceData *>(12); }
const flatbuffers::ResourceData *upFileData() const { return GetPointer<const flatbuffers::ResourceData *>(14); }
const flatbuffers::ResourceData *downFileData() const { return GetPointer<const flatbuffers::ResourceData *>(16); }
const flatbuffers::ResourceData *forwardFileData() const { return GetPointer<const flatbuffers::ResourceData *>(18); }
const flatbuffers::ResourceData *backFileData() const { return GetPointer<const flatbuffers::ResourceData *>(20); }
const flatbuffers::String *frameEvent() const { return GetPointer<const flatbuffers::String *>(22); }
const flatbuffers::String *customProperty() const { return GetPointer<const flatbuffers::String *>(24); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* name */) &&
verifier.Verify(name()) &&
VerifyField<int32_t>(verifier, 6 /* skyBoxMask */) &&
VerifyField<uint8_t>(verifier, 8 /* skyBoxEnabled */) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 10 /* leftFileData */) &&
verifier.VerifyTable(leftFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 12 /* rightFileData */) &&
verifier.VerifyTable(rightFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 14 /* upFileData */) &&
verifier.VerifyTable(upFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 16 /* downFileData */) &&
verifier.VerifyTable(downFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 18 /* forwardFileData */) &&
verifier.VerifyTable(forwardFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 20 /* backFileData */) &&
verifier.VerifyTable(backFileData()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 22 /* frameEvent */) &&
verifier.Verify(frameEvent()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 24 /* customProperty */) &&
verifier.Verify(customProperty()) &&
verifier.EndTable();
}
};
struct GameNode3DOptionBuilder {
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_name(flatbuffers::Offset<flatbuffers::String> name) { fbb_.AddOffset(4, name); }
void add_skyBoxMask(int32_t skyBoxMask) { fbb_.AddElement<int32_t>(6, skyBoxMask, 0); }
void add_skyBoxEnabled(uint8_t skyBoxEnabled) { fbb_.AddElement<uint8_t>(8, skyBoxEnabled, 0); }
void add_leftFileData(flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) { fbb_.AddOffset(10, leftFileData); }
void add_rightFileData(flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) { fbb_.AddOffset(12, rightFileData); }
void add_upFileData(flatbuffers::Offset<flatbuffers::ResourceData> upFileData) { fbb_.AddOffset(14, upFileData); }
void add_downFileData(flatbuffers::Offset<flatbuffers::ResourceData> downFileData) { fbb_.AddOffset(16, downFileData); }
void add_forwardFileData(flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) { fbb_.AddOffset(18, forwardFileData); }
void add_backFileData(flatbuffers::Offset<flatbuffers::ResourceData> backFileData) { fbb_.AddOffset(20, backFileData); }
void add_frameEvent(flatbuffers::Offset<flatbuffers::String> frameEvent) { fbb_.AddOffset(22, frameEvent); }
void add_customProperty(flatbuffers::Offset<flatbuffers::String> customProperty) { fbb_.AddOffset(24, customProperty); }
GameNode3DOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
GameNode3DOptionBuilder &operator=(const GameNode3DOptionBuilder &);
flatbuffers::Offset<GameNode3DOption> Finish() {
auto o = flatbuffers::Offset<GameNode3DOption>(fbb_.EndTable(start_, 11));
return o;
}
};
inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOption(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> name = 0,
int32_t skyBoxMask = 0,
uint8_t skyBoxEnabled = 0,
flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0,
flatbuffers::Offset<flatbuffers::String> frameEvent = 0,
flatbuffers::Offset<flatbuffers::String> customProperty = 0) {
GameNode3DOptionBuilder builder_(_fbb);
builder_.add_customProperty(customProperty);
builder_.add_frameEvent(frameEvent);
builder_.add_backFileData(backFileData);
builder_.add_forwardFileData(forwardFileData);
builder_.add_downFileData(downFileData);
builder_.add_upFileData(upFileData);
builder_.add_rightFileData(rightFileData);
builder_.add_leftFileData(leftFileData);
builder_.add_skyBoxMask(skyBoxMask);
builder_.add_name(name);
builder_.add_skyBoxEnabled(skyBoxEnabled);
return builder_.Finish();
}

View File

@ -109,6 +109,7 @@ namespace cocostudio
bool runAction = false;
std::string path;
int resourceType = 0;
bool isFlipped = false;
std::string attriname;
const tinyxml2::XMLAttribute* attribute = objectData->FirstAttribute();
@ -120,7 +121,10 @@ namespace cocostudio
if(attriname == "RunAction3D")
{
runAction = value == "True" ? true : false;
break;
}
else if (attriname == "IsFlipped")
{
isFlipped = value == "True" ? true : false;
}
attribute = attribute->Next();
@ -170,7 +174,8 @@ namespace cocostudio
builder->CreateString(path),
builder->CreateString(""),
resourceType),
runAction
runAction,
isFlipped
);
return *(Offset<Table>*)(&options);
@ -184,6 +189,7 @@ namespace cocostudio
auto options = (Sprite3DOptions*)sprite3DOptions;
bool runAction = options->runAction() != 0;
bool isFlipped = options->isFlipped() != 0;
auto fileData = options->fileData();
std::string path = fileData->path()->c_str();
@ -213,6 +219,11 @@ namespace cocostudio
{
sprite3D->setColor(Color3B(red, green, blue));
}
if (isFlipped)
{
sprite3D->setCullFaceEnabled(true);
sprite3D->setCullFace(GL_FRONT);
}
auto node3DReader = Node3DReader::getInstance();
node3DReader->setPropsWithFlatBuffers(sprite3D, (Table*)(options->node3DOption()));
@ -230,7 +241,7 @@ namespace cocostudio
{
ret->initWithFile(path);
}
setPropsWithFlatBuffers(ret, sprite3DOptions);
return ret;

View File

@ -400,54 +400,33 @@ namespace cocostudio
bool touchScaleEnabled = options->touchScaleEnable() != 0;
label->setTouchScaleChangeEnabled(touchScaleEnabled);
std::string text = options->text()->c_str();
label->setString(text);
int fontSize = options->fontSize();
label->setFontSize(fontSize);
std::string fontName = options->fontName()->c_str();
label->setFontName(fontName);
Size areaSize = Size(options->areaWidth(), options->areaHeight());
if (!areaSize.equals(Size::ZERO))
{
label->setTextAreaSize(areaSize);
}
auto resourceData = options->fontResource();
std::string path = resourceData->path()->c_str();
if (!path.empty() && FileUtils::getInstance()->isFileExist(path))
{
label->setFontName(path);
}
else
{
std::string fontName = options->fontName()->c_str();
label->setFontName(fontName);
}
TextHAlignment h_alignment = (TextHAlignment)options->hAlignment();
label->setTextHorizontalAlignment(h_alignment);
TextVAlignment v_alignment = (TextVAlignment)options->vAlignment();
label->setTextVerticalAlignment((TextVAlignment)v_alignment);
bool fileExist = false;
std::string errorFilePath = "";
auto resourceData = options->fontResource();
std::string path = resourceData->path()->c_str();
if (path != "")
{
if (FileUtils::getInstance()->isFileExist(path))
{
fileExist = true;
}
else
{
errorFilePath = path;
fileExist = false;
}
if (fileExist)
{
label->setFontName(path);
}
//else
//{
// auto alert = Label::create();
// alert->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString());
// label->addChild(alert);
//}
}
bool outlineEnabled = options->outlineEnabled() != 0;
if (outlineEnabled)
{
@ -470,6 +449,9 @@ namespace cocostudio
}
}
std::string text = options->text()->c_str();
label->setString(text);
// Save node color before set widget properties
auto oldColor = node->getColor();
@ -494,7 +476,6 @@ namespace cocostudio
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
label->setContentSize(contentSize);
}
}
Node* TextReader::createNodeWithFlatBuffers(const flatbuffers::Table *textOptions)

View File

@ -9,7 +9,7 @@ LOCAL_SRC_FILES := HttpClient-android.cpp \
SocketIO.cpp \
WebSocket.cpp \
CCDownloader.cpp \
CCDownloaderImpl.cpp
CCDownloader-android.cpp
LOCAL_EXPORT_C_INCLUDES :=

View File

@ -0,0 +1,248 @@
/****************************************************************************
Copyright (c) 2015 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "network/CCDownloader-android.h"
#include "network/CCDownloader.h"
#include "platform/android/jni/JniHelper.h"
#define JCLS_DOWNLOADER "org/cocos2dx/lib/Cocos2dxDownloader"
#define JCLS_TASK "com/loopj/android/http/RequestHandle"
#define JARG_STR "Ljava/lang/String;"
#define JARG_DOWNLOADER "L" JCLS_DOWNLOADER ";"
#define JARG_TASK "L" JCLS_TASK ";"
using namespace std;
static bool _registerNativeMethods(JNIEnv* env);
unordered_map<int, cocos2d::network::DownloaderAndroid*> sDownloaderMap;
namespace cocos2d { namespace network {
static int sTaskCounter;
static int sDownloaderCounter;
struct DownloadTaskAndroid : public IDownloadTask
{
DownloadTaskAndroid()
:id(++sTaskCounter)
{
DLLOG("Construct DownloadTaskAndroid: %p", this);
}
virtual ~DownloadTaskAndroid()
{
DLLOG("Destruct DownloadTaskAndroid: %p", this);
}
int id;
shared_ptr<const DownloadTask> task; // reference to DownloadTask, when task finish, release
};
DownloaderAndroid::DownloaderAndroid(const DownloaderHints& hints)
: _id(++sDownloaderCounter)
, _impl(nullptr)
{
// use local static variable make sure native methods registered once
static bool _registered = _registerNativeMethods(JniHelper::getEnv());
DLLOG("Construct DownloaderAndroid: %p", this);
JniMethodInfo methodInfo;
if (JniHelper::getStaticMethodInfo(methodInfo,
JCLS_DOWNLOADER,
"createDownloader",
"(II" JARG_STR ")" JARG_DOWNLOADER))
{
jobject jStr = methodInfo.env->NewStringUTF(hints.tempFileNameSuffix.c_str());
jobject jObj = methodInfo.env->CallStaticObjectMethod(
methodInfo.classID,
methodInfo.methodID,
_id,
hints.timeoutInSeconds,
jStr
);
_impl = methodInfo.env->NewGlobalRef(jObj);
DLLOG("android downloader: jObj: %p, _impl: %p", jObj, _impl);
sDownloaderMap.insert(make_pair(_id, this));
methodInfo.env->DeleteLocalRef(jStr);
methodInfo.env->DeleteLocalRef(jObj);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
}
DownloaderAndroid::~DownloaderAndroid()
{
if(_impl != nullptr)
{
JniMethodInfo methodInfo;
if (JniHelper::getStaticMethodInfo(methodInfo,
JCLS_DOWNLOADER,
"cancelAllRequests",
"(" JARG_DOWNLOADER ")V"))
{
methodInfo.env->CallStaticVoidMethod(
methodInfo.classID,
methodInfo.methodID,
_impl
);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
sDownloaderMap.erase(_id);
JniHelper::getEnv()->DeleteGlobalRef(_impl);
}
DLLOG("Destruct DownloaderAndroid: %p", this);
}
IDownloadTask *DownloaderAndroid::createCoTask(std::shared_ptr<const DownloadTask>& task)
{
DownloadTaskAndroid *coTask = new DownloadTaskAndroid;
coTask->task = task;
JniMethodInfo methodInfo;
if (JniHelper::getStaticMethodInfo(methodInfo,
JCLS_DOWNLOADER,
"createTask",
"(" JARG_DOWNLOADER "I" JARG_STR JARG_STR")V"))
{
jstring jstrURL = methodInfo.env->NewStringUTF(task->requestURL.c_str());
jstring jstrPath= methodInfo.env->NewStringUTF(task->storagePath.c_str());
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, _impl, coTask->id, jstrURL, jstrPath);
methodInfo.env->DeleteLocalRef(jstrURL);
methodInfo.env->DeleteLocalRef(jstrPath);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
DLLOG("DownloaderAndroid::createCoTask id: %d", coTask->id);
_taskMap.insert(make_pair(coTask->id, coTask));
return coTask;
}
void DownloaderAndroid::_onProcess(int taskId, int64_t dl, int64_t dlNow, int64_t dlTotal)
{
DLLOG("DownloaderAndroid::onProgress(taskId: %d, dl: %lld, dlnow: %lld, dltotal: %lld)", taskId, dl, dlNow, dlTotal);
auto iter = _taskMap.find(taskId);
if (_taskMap.end() == iter)
{
DLLOG("DownloaderAndroid::onProgress can't find task with id: %d", taskId);
return;
}
DownloadTaskAndroid *coTask = iter->second;
function<int64_t(void*, int64_t)> transferDataToBuffer;
onTaskProgress(*coTask->task, dl, dlNow, dlTotal, transferDataToBuffer);
}
void DownloaderAndroid::_onFinish(int taskId, int errCode, const char *errStr, vector<unsigned char>& data)
{
DLLOG("DownloaderAndroid::_onFinish(taskId: %d, errCode: %d, errStr: %s)", taskId, errCode, (errStr)?errStr:"null");
auto iter = _taskMap.find(taskId);
if (_taskMap.end() == iter)
{
DLLOG("DownloaderAndroid::_onFinish can't find task with id: %d", taskId);
return;
}
DownloadTaskAndroid *coTask = iter->second;
string str = (errStr ? errStr : "");
onTaskFinish(*coTask->task,
errStr ? DownloadTask::ERROR_IMPL_INTERNAL : DownloadTask::ERROR_NO_ERROR,
errCode,
str,
data
);
coTask->task.reset();
_taskMap.erase(iter);
}
}
} // namespace cocos2d::network
static void _nativeOnProgress(JNIEnv *env, jclass clazz, jint id, jint taskId, jlong dl, jlong dlnow, jlong dltotal)
{
DLLOG("_nativeOnProgress(id: %d, taskId: %d, dl: %lld, dlnow: %lld, dltotal: %lld)", id, taskId, dl, dlnow, dltotal);
auto iter = sDownloaderMap.find(id);
if (sDownloaderMap.end() == iter)
{
DLLOG("_nativeOnProgress can't find downloader by key: %p for task: %d", clazz, id);
return;
}
cocos2d::network::DownloaderAndroid *downloader = iter->second;
downloader->_onProcess((int)taskId, (int64_t)dl, (int64_t)dlnow, (int64_t)dltotal);
}
static void _nativeOnFinish(JNIEnv *env, jclass clazz, jint id, jint taskId, jint errCode, jstring errStr, jbyteArray data)
{
DLLOG("_nativeOnFinish(id: %d, taskId: %d)", id, taskId);
auto iter = sDownloaderMap.find(id);
if (sDownloaderMap.end() == iter)
{
DLLOG("_nativeOnFinish can't find downloader id: %d for task: %d", id, taskId);
return;
}
cocos2d::network::DownloaderAndroid *downloader = iter->second;
vector<unsigned char> buf;
if (errStr)
{
// failure
const char *nativeErrStr = env->GetStringUTFChars(errStr, JNI_FALSE);
downloader->_onFinish((int)taskId, (int)errCode, nativeErrStr, buf);
env->ReleaseStringUTFChars(errStr, nativeErrStr);
return;
}
// success
if (data)
{
int len = env->GetArrayLength(data);
if (len)
{
buf.reserve(len);
buf.resize(len);
env->GetByteArrayRegion(data, 0, len, reinterpret_cast<jbyte*>(buf.data()));
}
}
downloader->_onFinish((int)taskId, (int)errCode, nullptr, buf);
}
static JNINativeMethod sMethodTable[] = {
{ "nativeOnProgress", "(IIJJJ)V", (void*)_nativeOnProgress },
{ "nativeOnFinish", "(III" JARG_STR "[B)V", (void*)_nativeOnFinish },
};
static bool _registerNativeMethods(JNIEnv* env)
{
jclass clazz = env->FindClass(JCLS_DOWNLOADER);
if (clazz == NULL)
{
DLLOG("_registerNativeMethods: can't find java class:%s", JARG_DOWNLOADER);
return false;
}
if (JNI_OK != env->RegisterNatives(clazz, sMethodTable, sizeof(sMethodTable) / sizeof(sMethodTable[0])))
{
DLLOG("_registerNativeMethods: failed");
if (env->ExceptionCheck())
{
env->ExceptionClear();
}
return false;
}
return true;
}

View File

@ -0,0 +1,54 @@
/****************************************************************************
Copyright (c) 2015 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.
****************************************************************************/
#pragma once
#include "network/CCIDownloaderImpl.h"
class _jobject;
namespace cocos2d { namespace network
{
class DownloadTaskAndroid;
class DownloaderHints;
class DownloaderAndroid : public IDownloaderImpl
{
public:
DownloaderAndroid(const DownloaderHints& hints);
virtual ~DownloaderAndroid();
virtual IDownloadTask *createCoTask(std::shared_ptr<const DownloadTask>& task) override;
// designed called by internal
void _onProcess(int taskId, int64_t dl, int64_t dlNow, int64_t dlTotal);
void _onFinish(int taskId, int errCode, const char *errStr, std::vector<unsigned char>& data);
protected:
int _id;
_jobject* _impl;
std::unordered_map<int, DownloadTaskAndroid*> _taskMap;
};
}} // namespace cocos2d::network

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