Merge branch 'v3' into refactorLayout

Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
This commit is contained in:
andyque 2014-05-19 13:54:16 +08:00
commit 5ddfc41414
478 changed files with 18179 additions and 9880 deletions

View File

@ -819,6 +819,7 @@ Developers:
Fixed a bug that HTTPClient reports 2xx status codes as errors
Added missing Text Font and Placeholder feature of EditBox for Mac platform
HttpRequest uses std::function as callback
EditBox: mac secure input
iSevenDays
Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG
@ -841,6 +842,8 @@ Developers:
zifter
Fixed a bug that the effect of particle loaded from CocosBuilder is incorrectly
Fix twice calling onExit
Fixed bug with cascade opacity and color for control button
twhittock
Fixed a bug that Application::run returns wrong value on Mac platform

View File

@ -1,8 +1,16 @@
cocos2d-x-3.1-rc0 May.16 2014
cocos2d-x-3.1-rc0 May.18 2014
[NEW] Cocos2dxActivity: Adds a virtual method to load native libraries.
[NEW] Directory Structure: reorder some files within the cocos/ folder
[NEW] Sprite3D: a node that renders 3d models
[NEW] EditBox: support secure input on Mac
[FIX] ControlButton: cascade opacity and color error
[FIX] Director: twice calling of onExit
[FIX] Math: Vector2->Vec2, Vector3->Vec3, Vector4->Vec4, Matrix->Mat4
[FIX] GLProgram: uniform CC_Texture0 is pre-defined by cocos2d. MUST NOT be defined in shaders
[FIX] GLProgramState: Supports multitexturing
[FIX] Studio:ActionObject: correct TotalTime of ActionObject
[FIX] Studio: FrameData::copy doesn't copy `isTween` property
cocos2d-x-3.1-alpha1 May.9 2014
[NEW] Animate: Dispatch a custom event after an animation frame is displayed

View File

@ -130,6 +130,8 @@ endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cocos
${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform/desktop
${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/cocos/audio/include
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/auto
@ -140,8 +142,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/external/unzip
${CMAKE_CURRENT_SOURCE_DIR}/external/edtaa3func
${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk/include/chipmunk
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform/desktop
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/png/include/${PLATFORM_FOLDER}
${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/include/${PLATFORM_FOLDER}

View File

@ -5,7 +5,7 @@ cocos2d-x
=========
[![Build Status](https://travis-ci.org/cocos2d/cocos2d-x.png?branch=v3)](https://travis-ci.org/cocos2d/cocos2d-x)
[![Build Status](https://travis-ci.org/cocos2d/cocos2d-x.png?branch=v3)](https://travis-ci.org/cocos-travis-mac/cocos2d-x)
[![Build Status](https://travis-ci.org/cocos-travis-mac/cocos2d-x.png?branch=v3)](https://travis-ci.org/cocos-travis-mac/cocos2d-x)
[cocos2d-x][1] is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications.
It is based on [cocos2d-iphone][2], but instead of using Objective-C, it uses C++.
@ -18,7 +18,15 @@ cocos2d-x is:
* Easy to use
* Community Supported
Git user attention
-----------------------
1. After cloning the repo, please execute `download-deps.py` to download and install some dependences.
$ cd cocos2d-x
$ python download-deps.py
2. Please execute `download-deps.py` once you synchronize with this repo. If there aren't any updates, it will not download dependences again.
How to start a new game
-----------------------

View File

@ -116,7 +116,7 @@ def do_build(cocos_root, ndk_root, app_android_root, ndk_build_param,sdk_root,an
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
elif android_platform is not None:
sdk_tool_path = os.path.join(sdk_root, "tools/android")
cocoslib_path = os.path.join(cocos_root, "cocos/2d/platform/android/java")
cocoslib_path = os.path.join(cocos_root, "cocos/platform/android/java")
command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path)
if os.system(command) != 0:
raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!")

View File

@ -1,5 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d_wp8.vcxproj", "{B5AF91B3-64EA-44E1-84B0-D759E93758FB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.wp8\libSpine.vcxproj", "{7D4FC6EB-9497-4804-98F3-3EAEDC896154}"
@ -44,6 +46,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-tests", "..\tests\cpp-t
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-testsComponent", "..\tests\cpp-tests\proj.wp8-xaml\cpp-testsComponent\cpp-testsComponent.vcxproj", "{86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}"
ProjectSection(ProjectDependencies) = postProject
{271FEE84-9198-4C26-8567-4247C563B0B1} = {271FEE84-9198-4C26-8567-4247C563B0B1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos\network\proj.wp8\libNetwork.vcxproj", "{7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}"
ProjectSection(ProjectDependencies) = postProject
@ -58,13 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-empty-test", "..\tests\
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-testComponent", "..\tests\cpp-empty-test\proj-wp8-xaml\cpp-empty-testComponent\cpp-empty-testComponent.vcxproj", "{F5D665F8-AE19-4F3F-99A7-230A1E8305D2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopyTemplateFiles", "..\cocos\2d\platform\wp8-xaml\CopyTemplateFiles.vcxproj", "{271FEE84-9198-4C26-8567-4247C563B0B1}"
ProjectSection(ProjectDependencies) = postProject
{5921FE12-7EF3-4847-8453-42EF286DDBE7} = {5921FE12-7EF3-4847-8453-42EF286DDBE7}
{60D53713-1675-4466-81DC-D67A031C3D21} = {60D53713-1675-4466-81DC-D67A031C3D21}
{86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9} = {86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}
{F5D665F8-AE19-4F3F-99A7-230A1E8305D2} = {F5D665F8-AE19-4F3F-99A7-230A1E8305D2}
{271FEE84-9198-4C26-8567-4247C563B0B1} = {271FEE84-9198-4C26-8567-4247C563B0B1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\ui\proj.wp8\libGUI.vcxproj", "{08FB23E4-1517-4EDC-B682-DA238CDAA83D}"
@ -72,6 +72,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\ui\proj.
{B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopyTemplateFiles", "..\cocos\platform\wp8-xaml\CopyTemplateFiles.vcxproj", "{271FEE84-9198-4C26-8567-4247C563B0B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -392,26 +394,6 @@ Global
{F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x64.ActiveCfg = Release|Win32
{F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x86.ActiveCfg = Release|Win32
{F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x86.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Any CPU.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.ActiveCfg = Debug|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.Build.0 = Debug|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Win32.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Win32.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x64.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x86.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x86.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Any CPU.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|ARM.ActiveCfg = Release|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|ARM.Build.0 = Release|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Mixed Platforms.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Win32.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Win32.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x64.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.Build.0 = Release|Win32
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Any CPU.ActiveCfg = Debug|Win32
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.ActiveCfg = Debug|ARM
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.Build.0 = Debug|ARM
@ -432,6 +414,26 @@ Global
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x64.ActiveCfg = Release|Win32
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.ActiveCfg = Release|Win32
{08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Any CPU.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.ActiveCfg = Debug|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.Build.0 = Debug|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Win32.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Win32.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x64.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x86.ActiveCfg = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|x86.Build.0 = Debug|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Any CPU.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|ARM.ActiveCfg = Release|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|ARM.Build.0 = Release|ARM
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Mixed Platforms.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Win32.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|Win32.Build.0 = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x64.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.ActiveCfg = Release|Win32
{271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

File diff suppressed because it is too large Load Diff

View File

@ -812,6 +812,10 @@
29080DE4191B595E0066F8DF /* UIWidgetAddNodeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D89191B595E0066F8DF /* UIWidgetAddNodeTest.cpp */; };
29080DE5191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */; };
29080DE6191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */; };
3E92EA821921A1400094CD21 /* Sprite3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E92EA801921A1400094CD21 /* Sprite3DTest.cpp */; };
3E92EA831921A1400094CD21 /* Sprite3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E92EA801921A1400094CD21 /* Sprite3DTest.cpp */; };
3E92EA851921A7720094CD21 /* Sprite3DTest in Resources */ = {isa = PBXBuildFile; fileRef = 3E92EA841921A7720094CD21 /* Sprite3DTest */; };
3E92EA861921A7720094CD21 /* Sprite3DTest in Resources */ = {isa = PBXBuildFile; fileRef = 3E92EA841921A7720094CD21 /* Sprite3DTest */; };
3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; };
3EA0FB66191B933000B170C8 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
3EA0FB72191C844400B170C8 /* UIVideoPlayerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB70191C844400B170C8 /* UIVideoPlayerTest.cpp */; };
@ -827,6 +831,8 @@
A07A52BF1783AF210073F6A7 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A07A52B91783AE900073F6A7 /* OpenGLES.framework */; };
A07A52C01783AF250073F6A7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A07A52B71783AE6D0073F6A7 /* UIKit.framework */; };
A07A52C31783B02C0073F6A7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A07A52C11783B01F0073F6A7 /* AVFoundation.framework */; };
B2507B6B192589AF00FA4972 /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; };
B2507B6C192589AF00FA4972 /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; };
C08689C118D370C90093E810 /* background.caf in Resources */ = {isa = PBXBuildFile; fileRef = C08689C018D370C90093E810 /* background.caf */; };
C08689C218D370C90093E810 /* background.caf in Resources */ = {isa = PBXBuildFile; fileRef = C08689C018D370C90093E810 /* background.caf */; };
C08689C318D370C90093E810 /* background.caf in Resources */ = {isa = PBXBuildFile; fileRef = C08689C018D370C90093E810 /* background.caf */; };
@ -1849,6 +1855,9 @@
29080D8A191B595E0066F8DF /* UIWidgetAddNodeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest.h; sourceTree = "<group>"; };
29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidgetAddNodeTest_Editor.cpp; sourceTree = "<group>"; };
29080D8C191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest_Editor.h; sourceTree = "<group>"; };
3E92EA801921A1400094CD21 /* Sprite3DTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sprite3DTest.cpp; path = Sprite3DTest/Sprite3DTest.cpp; sourceTree = "<group>"; };
3E92EA811921A1400094CD21 /* Sprite3DTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sprite3DTest.h; path = Sprite3DTest/Sprite3DTest.h; sourceTree = "<group>"; };
3E92EA841921A7720094CD21 /* Sprite3DTest */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Sprite3DTest; path = "../tests/cpp-tests/Resources/Sprite3DTest"; sourceTree = "<group>"; };
3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = cocosvideo.mp4; path = "../tests/cpp-tests/Resources/cocosvideo.mp4"; sourceTree = "<group>"; };
3EA0FB65191B933000B170C8 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/MediaPlayer.framework; sourceTree = DEVELOPER_DIR; };
3EA0FB70191C844400B170C8 /* UIVideoPlayerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVideoPlayerTest.cpp; sourceTree = "<group>"; };
@ -1864,6 +1873,7 @@
A07A52B91783AE900073F6A7 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
A07A52BB1783AEB80073F6A7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
A07A52C11783B01F0073F6A7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
B2507B6A192589AF00FA4972 /* Shaders3D */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Shaders3D; path = "../tests/cpp-tests/Resources/Shaders3D"; sourceTree = "<group>"; };
C08689C018D370C90093E810 /* background.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = background.caf; path = "../tests/cpp-tests/Resources/background.caf"; sourceTree = "<group>"; };
D60AE43317F7FFE100757E4B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
EDCC747E17C455FD007B692C /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
@ -2258,6 +2268,7 @@
1AC35AE918CECF0C00F37B72 /* SchedulerTest */,
1AC35AEC18CECF0C00F37B72 /* ShaderTest */,
1AC35AF118CECF0C00F37B72 /* SpineTest */,
3E92EA7D1921A0C60094CD21 /* Sprite3DTest */,
1AC35AF418CECF0C00F37B72 /* SpriteTest */,
1AC35AF718CECF0C00F37B72 /* testBasic.cpp */,
1AC35AF818CECF0C00F37B72 /* testBasic.h */,
@ -3274,6 +3285,8 @@
1AC35CA818CED83500F37B72 /* Resources */ = {
isa = PBXGroup;
children = (
B2507B6A192589AF00FA4972 /* Shaders3D */,
3E92EA841921A7720094CD21 /* Sprite3DTest */,
3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */,
1AC35CA918CED84500F37B72 /* animations */,
1AC35CAE18CED84500F37B72 /* ccb */,
@ -3790,6 +3803,15 @@
name = Frameworks;
sourceTree = "<group>";
};
3E92EA7D1921A0C60094CD21 /* Sprite3DTest */ = {
isa = PBXGroup;
children = (
3E92EA801921A1400094CD21 /* Sprite3DTest.cpp */,
3E92EA811921A1400094CD21 /* Sprite3DTest.h */,
);
name = Sprite3DTest;
sourceTree = "<group>";
};
3EA0FB6F191C844400B170C8 /* UIVideoPlayerTest */ = {
isa = PBXGroup;
children = (
@ -4415,6 +4437,7 @@
1AC35D0418CED84500F37B72 /* Shaders in Resources */,
1AC35CD818CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */,
1AC35CDC18CED84500F37B72 /* commonly_used_words.txt in Resources */,
B2507B6B192589AF00FA4972 /* Shaders3D in Resources */,
1AC35D0618CED84500F37B72 /* spine in Resources */,
1AC35CE818CED84500F37B72 /* extensions in Resources */,
1AC35CDE18CED84500F37B72 /* components in Resources */,
@ -4433,6 +4456,7 @@
1AC35D0018CED84500F37B72 /* pew-pew-lei.wav in Resources */,
1AC35CD018CED84500F37B72 /* background.mp3 in Resources */,
1AC35CD618CED84500F37B72 /* CocosBuilderExample.ccbproj in Resources */,
3E92EA851921A7720094CD21 /* Sprite3DTest in Resources */,
1AC35CA318CECF1E00F37B72 /* InfoPlist.strings in Resources */,
1AC35CA418CECF1E00F37B72 /* MainMenu.xib in Resources */,
1AC35CD418CED84500F37B72 /* ccb in Resources */,
@ -4471,6 +4495,7 @@
1AC35CD318CED84500F37B72 /* background.ogg in Resources */,
1AC35CCB18CED84500F37B72 /* animations in Resources */,
3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */,
3E92EA861921A7720094CD21 /* Sprite3DTest in Resources */,
1AC35C8C18CECF1400F37B72 /* Icon-114.png in Resources */,
1AC35CF118CED84500F37B72 /* hd in Resources */,
1AC35C9318CECF1400F37B72 /* Icon-57.png in Resources */,
@ -4486,6 +4511,7 @@
1AC35C9418CECF1400F37B72 /* Icon-58.png in Resources */,
1AC35CD118CED84500F37B72 /* background.mp3 in Resources */,
1AC35CD918CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */,
B2507B6C192589AF00FA4972 /* Shaders3D in Resources */,
1AC35CED18CED84500F37B72 /* fonts in Resources */,
1AC35CD718CED84500F37B72 /* CocosBuilderExample.ccbproj in Resources */,
1AC35CDD18CED84500F37B72 /* commonly_used_words.txt in Resources */,
@ -4574,6 +4600,7 @@
1AC35BE118CECF0C00F37B72 /* CCControlButtonTest.cpp in Sources */,
1AC35BEB18CECF0C00F37B72 /* CCControlSliderTest.cpp in Sources */,
1AC35C4D18CECF0C00F37B72 /* SpineTest.cpp in Sources */,
3E92EA821921A1400094CD21 /* Sprite3DTest.cpp in Sources */,
1AC35C1D18CECF0C00F37B72 /* NewRendererTest.cpp in Sources */,
1AC35B6718CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */,
29080DB7191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */,
@ -4906,6 +4933,7 @@
1AC35B5418CECF0C00F37B72 /* CocosDenshionTest.cpp in Sources */,
1AC35B8018CECF0C00F37B72 /* ProjectileController.cpp in Sources */,
1AC35C2618CECF0C00F37B72 /* PerformanceAllocTest.cpp in Sources */,
3E92EA831921A1400094CD21 /* Sprite3DTest.cpp in Sources */,
1AC35B5A18CECF0C00F37B72 /* controller.cpp in Sources */,
1AC35C2A18CECF0C00F37B72 /* PerformanceEventDispatcherTest.cpp in Sources */,
1AC35BEA18CECF0C00F37B72 /* CCControlSceneManager.cpp in Sources */,
@ -5228,7 +5256,7 @@
CC_TARGET_OS_MAC,
);
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-empty-test/proj.mac/Info.plist";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
};
name = Debug;
};
@ -5242,7 +5270,7 @@
CC_TARGET_OS_MAC,
);
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-empty-test/proj.mac/Info.plist";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5262,7 +5290,7 @@
"-image_base",
100000000,
);
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
};
name = Debug;
};
@ -5281,7 +5309,7 @@
"-image_base",
100000000,
);
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5298,7 +5326,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../cocos/2d/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../cocos/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
};
name = Debug;
};
@ -5314,7 +5342,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../cocos/2d/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../cocos/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5331,7 +5359,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
};
name = Debug;
};
@ -5347,7 +5375,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5367,7 +5395,7 @@
"-image_base",
100000000,
);
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
};
name = Debug;
};
@ -5386,7 +5414,7 @@
"-image_base",
100000000,
);
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5405,7 +5433,7 @@
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
};
name = Debug;
};
@ -5423,7 +5451,7 @@
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5437,7 +5465,7 @@
CC_TARGET_OS_MAC,
);
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
};
name = Debug;
};
@ -5450,7 +5478,7 @@
CC_TARGET_OS_MAC,
);
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -5497,7 +5525,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../cocos/2d/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../cocos/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
};
name = Debug;
};
@ -5513,7 +5541,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/2d/platform/ios $(SRCROOT)/../cocos/2d/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../cocos/platform/ios/Simulation $(SRCROOT)/../external/curl/include/ios";
VALIDATE_PRODUCT = YES;
};
name = Release;

View File

@ -23,10 +23,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCActionGrid.h"
#include "base/CCDirector.h"
#include "2d/CCGrid.h"
#include "2d/CCNodeGrid.h"
#include "base/CCDirector.h"
NS_CC_BEGIN
// implementation of GridAction

View File

@ -28,7 +28,7 @@
#include "2d/CCActionInstant.h"
#include "2d/CCNode.h"
#include "2d/CCSprite.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

View File

@ -28,13 +28,14 @@ THE SOFTWARE.
#ifndef __ACTION_CCINTERVAL_ACTION_H__
#define __ACTION_CCINTERVAL_ACTION_H__
#include <vector>
#include "2d/CCNode.h"
#include "2d/CCAction.h"
#include "2d/CCProtocols.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCAnimation.h"
#include "base/CCProtocols.h"
#include "base/CCVector.h"
#include <vector>
NS_CC_BEGIN

View File

@ -30,8 +30,8 @@ THE SOFTWARE.
#include "2d/CCNode.h"
#include "base/CCScheduler.h"
#include "base/ccMacros.h"
#include "2d/ccCArray.h"
#include "2d/uthash.h"
#include "base/ccCArray.h"
#include "base/uthash.h"
NS_CC_BEGIN
//

View File

@ -25,10 +25,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCAnimation.h"
#include "2d/CCTextureCache.h"
#include "2d/CCTexture2D.h"
#include "base/ccMacros.h"
#include "2d/CCSpriteFrame.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCTexture2D.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#include "2d/CCAnimation.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCSpriteFrameCache.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
#include "deprecated/CCString.h"
using namespace std;

View File

@ -26,10 +26,10 @@ THE SOFTWARE.
****************************************************************************/
#include "CCAtlasNode.h"
#include "2d/CCTextureAtlas.h"
#include "2d/CCTextureCache.h"
#include "renderer/CCTextureAtlas.h"
#include "base/CCDirector.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#define __CCATLAS_NODE_H__
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
#include "base/ccTypes.h"
#include "renderer/CCQuadCommand.h"

View File

@ -23,7 +23,7 @@ THE SOFTWARE.
****************************************************************************/
#include "2d/CCComponent.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
NS_CC_BEGIN

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#define __CC_FRAMEWORK_COMPONENT_H__
#include "base/CCRef.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#include <string>
NS_CC_BEGIN

View File

@ -23,8 +23,8 @@
THE SOFTWARE.
****************************************************************************/
#include "CCFont.h"
#include "ccUTF8.h"
#include "2d/CCFont.h"
#include "base/ccUTF8.h"
NS_CC_BEGIN

View File

@ -25,7 +25,7 @@
#include "2d/CCFontAtlas.h"
#include "2d/CCFontFreeType.h"
#include "ccUTF8.h"
#include "base/ccUTF8.h"
#include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"

View File

@ -25,10 +25,10 @@
#include "CCFontCharMap.h"
#include "2d/CCFontAtlas.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
#include "base/ccUTF8.h"
#include "base/CCDirector.h"
#include "2d/CCTextureCache.h"
#include "ccUTF8.h"
#include "renderer/CCTextureCache.h"
NS_CC_BEGIN

View File

@ -24,15 +24,16 @@
****************************************************************************/
#include "2d/CCFontFNT.h"
#include "2d/uthash.h"
#include "base/uthash.h"
#include "2d/CCFontAtlas.h"
#include "base/ccUTF8.h"
#include "platform/CCFileUtils.h"
#include "base/CCConfiguration.h"
#include "base/CCDirector.h"
#include "2d/CCFontAtlas.h"
#include "base/CCMap.h"
#include "renderer/CCTextureCache.h"
#include "deprecated/CCString.h"
#include "2d/CCTextureCache.h"
#include "ccUTF8.h"
#include "2d/platform/CCFileUtils.h"
using namespace std;
NS_CC_BEGIN

View File

@ -23,12 +23,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCFontFreeType.h"
#include <stdio.h>
#include <algorithm>
#include "ccUTF8.h"
#include "2d/CCFontFreeType.h"
#include "2d/platform/CCFileUtils.h"
#include "base/ccUTF8.h"
#include "platform/CCFileUtils.h"
#include "edtaa3func.h"
#include FT_BBOX_H
@ -563,4 +564,4 @@ void FontFreeType::renderCharAt(unsigned char *dest,int posX, int posY, unsigned
}
}
NS_CC_END
NS_CC_END

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
****************************************************************************/
#include "CCGrabber.h"
#include "base/ccMacros.h"
#include "2d/CCTexture2D.h"
#include "renderer/CCTexture2D.h"
NS_CC_BEGIN

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "2d/CCGrabber.h"
#include "2d/ccUtils.h"
#include "base/ccUtils.h"
#include "2d/CCGrid.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramCache.h"

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#include "base/ccTypes.h"
#include "base/CCDirector.h"
#include "2d/CCNode.h"
#include "2d/CCTexture2D.h"
#include "renderer/CCTexture2D.h"
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN

View File

@ -27,9 +27,9 @@
#include "2d/CCFontAtlasCache.h"
#include "2d/CCSprite.h"
#include "2d/CCLabelTextFormatter.h"
#include "2d/ccUTF8.h"
#include "base/ccUTF8.h"
#include "2d/CCSpriteFrame.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
#include "2d/CCFont.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCRenderer.h"

View File

@ -25,17 +25,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCLabelAtlas.h"
#include "2d/CCTextureAtlas.h"
#include "2d/CCTextureCache.h"
#include "renderer/CCTextureAtlas.h"
#include "2d/CCDrawingPrimitives.h"
#include "platform/CCFileUtils.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCDirector.h"
#include "math/TransformUtils.h"
#include "2d/platform/CCFileUtils.h"
// external
#include "deprecated/CCString.h"
#if CC_LABELATLAS_DEBUG_DRAW

View File

@ -23,10 +23,11 @@
THE SOFTWARE.
****************************************************************************/
#include "2d/CCLabelTextFormatter.h"
#include <vector>
#include "ccUTF8.h"
#include "CCLabelTextFormatter.h"
#include "base/ccUTF8.h"
#include "base/CCDirector.h"
#include "2d/CCLabel.h"

View File

@ -26,6 +26,8 @@
#ifndef _CCLabelTextFormatter_h_
#define _CCLabelTextFormatter_h_
#include "base/CCPlatformMacros.h"
NS_CC_BEGIN
class Label;

View File

@ -27,8 +27,8 @@ THE SOFTWARE.
#include <stdarg.h>
#include "2d/CCLayer.h"
#include "2d/CCScriptSupport.h"
#include "2d/platform/CCDevice.h"
#include "base/CCScriptSupport.h"
#include "platform/CCDevice.h"
#include "2d/CCScene.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#define __CCLAYER_H__
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
#include "base/CCEventTouch.h"
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#include "2d/CCSprite.h"
#include "CCLabelAtlas.h"
#include "2d/CCLabel.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#include "deprecated/CCString.h"
#include <stdarg.h>
#include <cstring>

View File

@ -33,7 +33,7 @@ THE SOFTWARE.
// cocos2d includes
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
NS_CC_BEGIN

View File

@ -23,16 +23,17 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCMotionStreak.h"
#include "2d/CCTextureCache.h"
#include "2d/CCVertex.h"
#include "math/CCVertex.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

View File

@ -26,8 +26,8 @@ THE SOFTWARE.
#ifndef __CCMOTION_STREAK_H__
#define __CCMOTION_STREAK_H__
#include "2d/CCProtocols.h"
#include "2d/CCTexture2D.h"
#include "base/CCProtocols.h"
#include "renderer/CCTexture2D.h"
#include "base/ccTypes.h"
#include "2d/CCNode.h"
#include "renderer/CCCustomCommand.h"

View File

@ -36,10 +36,10 @@ THE SOFTWARE.
#include "base/CCEventDispatcher.h"
#include "base/CCEvent.h"
#include "base/CCEventTouch.h"
#include "2d/ccCArray.h"
#include "base/ccCArray.h"
#include "2d/CCGrid.h"
#include "2d/CCActionManager.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#include "2d/CCScene.h"
#include "2d/CCComponent.h"
#include "2d/CCComponentContainer.h"

View File

@ -32,11 +32,11 @@
#include "base/ccMacros.h"
#include "base/CCEventDispatcher.h"
#include "base/CCVector.h"
#include "base/CCScriptSupport.h"
#include "base/CCProtocols.h"
#include "math/CCAffineTransform.h"
#include "math/CCMath.h"
#include "renderer/ccGLStateCache.h"
#include "2d/CCScriptSupport.h"
#include "2d/CCProtocols.h"
#include "CCGL.h"
NS_CC_BEGIN

View File

@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCParallaxNode.h"
#include "2d/ccCArray.h"
#include "base/ccCArray.h"
NS_CC_BEGIN

View File

@ -30,16 +30,16 @@
#include "2d/CCParticleBatchNode.h"
#include "2d/CCTextureCache.h"
#include "2d/CCTextureAtlas.h"
#include "renderer/CCTextureAtlas.h"
#include "2d/CCGrid.h"
#include "2d/CCParticleSystem.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
#include "base/CCProfiling.h"
#include "base/ccConfig.h"
#include "base/ccMacros.h"
#include "base/base64.h"
#include "base/ZipUtils.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"

View File

@ -31,7 +31,7 @@
#define __CCPARTICLEBATCHNODE_H__
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
#include "renderer/CCBatchCommand.h"
NS_CC_BEGIN

View File

@ -24,11 +24,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCParticleExamples.h"
#include "2d/CCParticleExamples.h"
#include "platform/CCImage.h"
#include "base/CCDirector.h"
#include "2d/CCTextureCache.h"
#include "firePngData.h"
#include "2d/platform/CCImage.h"
#include "base/firePngData.h"
#include "renderer/CCTextureCache.h"
NS_CC_BEGIN
//

View File

@ -42,21 +42,21 @@ THE SOFTWARE.
// cocos2d uses a another approach, but the results are almost identical.
//
#include "CCParticleSystem.h"
#include "2d/CCParticleSystem.h"
#include <string>
#include "CCParticleBatchNode.h"
#include "2d/CCParticleBatchNode.h"
#include "renderer/CCTextureAtlas.h"
#include "platform/CCFileUtils.h"
#include "platform/CCImage.h"
#include "base/ccTypes.h"
#include "2d/CCTextureCache.h"
#include "2d/CCTextureAtlas.h"
#include "base/base64.h"
#include "2d/platform/CCFileUtils.h"
#include "2d/platform/CCImage.h"
#include "base/ZipUtils.h"
#include "base/CCDirector.h"
#include "base/CCProfiling.h"
// opengl
#include "renderer/CCTextureCache.h"
#include "CCGL.h"
using namespace std;

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#ifndef __CCPARTICLE_SYSTEM_H__
#define __CCPARTICLE_SYSTEM_H__
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
#include "2d/CCNode.h"
#include "base/CCValue.h"
#include "deprecated/CCString.h"

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#include "2d/CCParticleSystemQuad.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCParticleBatchNode.h"
#include "2d/CCTextureAtlas.h"
#include "renderer/CCTextureAtlas.h"
#include "base/CCDirector.h"
#include "base/CCEventType.h"
#include "base/CCConfiguration.h"

View File

@ -27,8 +27,8 @@ THE SOFTWARE.
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "2d/CCTextureCache.h"
#include "2d/CCDrawingPrimitives.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"

View File

@ -24,27 +24,27 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "base/CCConfiguration.h"
#include "2d/CCRenderTexture.h"
#include "base/ccUtils.h"
#include "platform/CCImage.h"
#include "platform/CCFileUtils.h"
#include "2d/CCGrid.h"
#include "base/CCEventType.h"
#include "base/CCConfiguration.h"
#include "base/CCConfiguration.h"
#include "base/CCDirector.h"
#include "2d/platform/CCImage.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCConfiguration.h"
#include "2d/ccUtils.h"
#include "2d/CCTextureCache.h"
#include "2d/platform/CCFileUtils.h"
#include "CCGL.h"
#include "base/CCEventType.h"
#include "2d/CCGrid.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGroupCommand.h"
#include "renderer/CCCustomCommand.h"
// extern
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "CCGL.h"
NS_CC_BEGIN

View File

@ -28,7 +28,7 @@ THE SOFTWARE.
#include "2d/CCNode.h"
#include "2d/CCSprite.h"
#include "2d/platform/CCImage.h"
#include "platform/CCImage.h"
#include "renderer/CCGroupCommand.h"
#include "renderer/CCCustomCommand.h"

View File

@ -26,14 +26,18 @@ THE SOFTWARE.
****************************************************************************/
#include "2d/CCSprite.h"
#include <string.h>
#include <algorithm>
#include "2d/CCSpriteBatchNode.h"
#include "2d/CCAnimation.h"
#include "2d/CCAnimationCache.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCSpriteFrameCache.h"
#include "2d/CCTextureCache.h"
#include "2d/CCDrawingPrimitives.h"
#include "2d/CCTexture2D.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCTexture2D.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
@ -48,8 +52,6 @@ THE SOFTWARE.
#include "deprecated/CCString.h"
#include <string.h>
#include <algorithm>
NS_CC_BEGIN

View File

@ -29,8 +29,8 @@ THE SOFTWARE.
#define __SPRITE_NODE_CCSPRITE_H__
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "2d/CCTextureAtlas.h"
#include "base/CCProtocols.h"
#include "renderer/CCTextureAtlas.h"
#include "base/ccTypes.h"
#include <string>
#ifdef EMSCRIPTEN

View File

@ -28,15 +28,17 @@ THE SOFTWARE.
#include "2d/CCSpriteBatchNode.h"
#include <algorithm>
#include "2d/CCSprite.h"
#include "2d/CCGrid.h"
#include "2d/CCDrawingPrimitives.h"
#include "2d/CCTextureCache.h"
#include "2d/CCLayer.h"
#include "2d/CCScene.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h"
#include "base/CCProfiling.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
@ -46,8 +48,6 @@ THE SOFTWARE.
#include "deprecated/CCString.h" // For StringUtils::format
// external
#include <algorithm>
NS_CC_BEGIN

View File

@ -32,9 +32,9 @@ THE SOFTWARE.
#include <vector>
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "2d/CCTextureAtlas.h"
#include "base/CCProtocols.h"
#include "base/ccMacros.h"
#include "renderer/CCTextureAtlas.h"
#include "renderer/CCBatchCommand.h"
NS_CC_BEGIN

View File

@ -24,7 +24,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCTextureCache.h"
#include "renderer/CCTextureCache.h"
#include "2d/CCSpriteFrame.h"
#include "base/CCDirector.h"

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#define __SPRITE_CCSPRITE_FRAME_H__
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "base/CCProtocols.h"
#include "base/CCRef.h"
#include "math/CCGeometry.h"

View File

@ -27,17 +27,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "base/CCNS.h"
#include "base/ccMacros.h"
#include "2d/CCTextureCache.h"
#include "2d/CCSpriteFrameCache.h"
#include <vector>
#include "2d/CCSpriteFrame.h"
#include "2d/CCSprite.h"
#include "math/TransformUtils.h"
#include "2d/platform/CCFileUtils.h"
#include "deprecated/CCString.h"
#include "platform/CCFileUtils.h"
#include "base/CCNS.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include <vector>
#include "renderer/CCTextureCache.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h"
using namespace std;

View File

@ -36,7 +36,7 @@ THE SOFTWARE.
*/
#include "2d/CCSpriteFrame.h"
#include "2d/CCTexture2D.h"
#include "renderer/CCTexture2D.h"
#include "base/CCRef.h"
#include "base/CCValue.h"
#include "base/CCMap.h"

View File

@ -24,15 +24,17 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCTMXLayer.h"
#include "2d/CCTMXXMLParser.h"
#include "2d/CCTMXTiledMap.h"
#include "2d/CCSprite.h"
#include "2d/CCTextureCache.h"
#include "2d/ccCArray.h"
#include "base/ccCArray.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "base/CCDirector.h"
#include "deprecated/CCString.h" // For StringUtils::format

View File

@ -31,7 +31,7 @@ THE SOFTWARE.
#include "CCAtlasNode.h"
#include "2d/CCSpriteBatchNode.h"
#include "CCTMXXMLParser.h"
#include "2d/ccCArray.h"
#include "base/ccCArray.h"
NS_CC_BEGIN
class TMXMapInfo;

View File

@ -31,7 +31,7 @@ THE SOFTWARE.
#include "CCTMXXMLParser.h"
#include "CCTMXTiledMap.h"
#include "base/ccMacros.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
#include "base/ZipUtils.h"
#include "base/base64.h"
#include "base/CCDirector.h"

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#define __CC_TM_XML_PARSER__
#include "math/CCGeometry.h"
#include "2d/platform/CCSAXParser.h"
#include "platform/CCSAXParser.h"
#include "base/CCVector.h"
#include "base/CCValue.h"

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#define __CC_TEXT_FIELD_H__
#include "2d/CCLabel.h"
#include "2d/CCIMEDelegate.h"
#include "base/CCIMEDelegate.h"
NS_CC_BEGIN

View File

@ -25,9 +25,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCTileMapAtlas.h"
#include "2d/platform/CCFileUtils.h"
#include "2d/CCTextureAtlas.h"
#include "TGAlib.h"
#include "platform/CCFileUtils.h"
#include "renderer/CCTextureAtlas.h"
#include "base/TGAlib.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h"
#include "deprecated/CCString.h"

View File

@ -2,43 +2,19 @@ if(WIN32)
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
set(COCOS_2D_PLATFORM_SRC
2d/platform/win32/CCStdC.cpp
2d/platform/win32/CCFileUtilsWin32.cpp
2d/platform/win32/CCCommon.cpp
2d/platform/win32/CCApplication.cpp
2d/platform/desktop/CCGLView.cpp
2d/platform/win32/CCDevice.cpp
)
elseif(APPLE)
else()
set(COCOS_2D_PLATFORM_SRC
2d/platform/linux/CCStdC.cpp
2d/platform/linux/CCFileUtilsLinux.cpp
2d/platform/linux/CCCommon.cpp
2d/platform/linux/CCApplication.cpp
2d/platform/desktop/CCGLView.cpp
2d/platform/linux/CCDevice.cpp
)
endif()
include_directories(
../external/ConvertUTF
)
set(COCOS_2D_SRC
2d/ccFPSImages.c
2d/CCAction.cpp
2d/CCActionCamera.cpp
2d/CCActionCatmullRom.cpp
2d/CCAction.cpp
2d/CCActionEase.cpp
2d/CCActionGrid.cpp
2d/CCActionGrid3D.cpp
2d/CCActionGrid.cpp
2d/CCActionInstant.cpp
2d/CCActionInterval.cpp
2d/CCActionManager.cpp
@ -46,29 +22,28 @@ set(COCOS_2D_SRC
2d/CCActionProgressTimer.cpp
2d/CCActionTiledGrid.cpp
2d/CCActionTween.cpp
2d/CCAnimation.cpp
2d/CCAnimationCache.cpp
2d/CCAnimation.cpp
2d/CCAtlasNode.cpp
2d/CCClippingNode.cpp
2d/CCComponent.cpp
2d/CCComponentContainer.cpp
2d/CCDrawNode.cpp
2d/CCComponent.cpp
2d/CCDrawingPrimitives.cpp
2d/CCFont.cpp
2d/CCFontAtlas.cpp
2d/CCDrawNode.cpp
2d/CCFontAtlasCache.cpp
2d/CCFontAtlas.cpp
2d/CCFontCharMap.cpp
2d/CCFont.cpp
2d/CCFontFNT.cpp
2d/CCFontFreeType.cpp
2d/CCGLBufferedNode.cpp
2d/CCGrabber.cpp
2d/CCGrid.cpp
2d/CCIMEDispatcher.cpp
2d/CCLabel.cpp
2d/CCLabelAtlas.cpp
2d/CCLabelBMFont.cpp
2d/CCLabelTTF.cpp
2d/CCLabel.cpp
2d/CCLabelTextFormatter.cpp
2d/CCLabelTTF.cpp
2d/CCLayer.cpp
2d/CCMenu.cpp
2d/CCMenuItem.cpp
@ -83,38 +58,19 @@ set(COCOS_2D_SRC
2d/CCProgressTimer.cpp
2d/CCRenderTexture.cpp
2d/CCScene.cpp
2d/CCScriptSupport.cpp
2d/CCSprite.cpp
2d/CCSpriteBatchNode.cpp
2d/CCSpriteFrame.cpp
2d/CCSprite.cpp
2d/CCSpriteFrameCache.cpp
2d/CCSpriteFrame.cpp
2d/CCTextFieldTTF.cpp
2d/CCTileMapAtlas.cpp
2d/CCTMXLayer.cpp
2d/CCTMXObjectGroup.cpp
2d/CCTMXTiledMap.cpp
2d/CCTMXXMLParser.cpp
2d/CCTextFieldTTF.cpp
2d/CCTexture2D.cpp
2d/CCTextureAtlas.cpp
2d/CCTextureCache.cpp
2d/CCTileMapAtlas.cpp
2d/CCTransition.cpp
2d/CCTransitionPageTurn.cpp
2d/CCTransitionProgress.cpp
2d/CCTweenFunction.cpp
2d/CCUserDefault.cpp
2d/CCUserDefaultAndroid.cpp
2d/CCVertex.cpp
2d/TGAlib.cpp
2d/ccCArray.cpp
2d/ccUTF8.cpp
2d/ccUtils.cpp
2d/platform/CCSAXParser.cpp
2d/platform/CCThread.cpp
2d/platform/CCGLViewProtocol.cpp
2d/platform/CCFileUtils.cpp
2d/platform/CCImage.cpp
../external/edtaa3func/edtaa3func.cpp
../external/ConvertUTF/ConvertUTFWrapper.cpp
../external/ConvertUTF/ConvertUTF.c
)

View File

@ -175,9 +175,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\..\external\unzip\ioapi.cpp" />
<ClCompile Include="..\..\external\unzip\unzip.cpp" />
<ClCompile Include="..\..\external\xxhash\xxhash.c" />
<ClCompile Include="..\3d\CCMesh.cpp" />
<ClCompile Include="..\3d\CCObjLoader.cpp" />
<ClCompile Include="..\3d\CCSprite3D.cpp" />
<ClCompile Include="..\3d\CCSprite3DDataCache.cpp" />
<ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\base64.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
<ClCompile Include="..\base\ccCArray.cpp" />
<ClCompile Include="..\base\CCConfiguration.cpp" />
<ClCompile Include="..\base\CCConsole.cpp" />
<ClCompile Include="..\base\CCData.cpp" />
@ -198,15 +203,23 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\base\CCEventListenerTouch.cpp" />
<ClCompile Include="..\base\CCEventMouse.cpp" />
<ClCompile Include="..\base\CCEventTouch.cpp" />
<ClCompile Include="..\base\ccFPSImages.c" />
<ClCompile Include="..\base\CCIMEDispatcher.cpp" />
<ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCProfiling.cpp" />
<ClCompile Include="..\base\CCRef.cpp" />
<ClCompile Include="..\base\CCScheduler.cpp" />
<ClCompile Include="..\base\CCScriptSupport.cpp" />
<ClCompile Include="..\base\CCTouch.cpp" />
<ClCompile Include="..\base\ccTypes.cpp" />
<ClCompile Include="..\base\CCUserDefault.cpp" />
<ClCompile Include="..\base\CCUserDefaultAndroid.cpp" />
<ClCompile Include="..\base\ccUTF8.cpp" />
<ClCompile Include="..\base\ccUtils.cpp" />
<ClCompile Include="..\base\CCValue.cpp" />
<ClCompile Include="..\base\etc1.cpp" />
<ClCompile Include="..\base\s3tc.cpp" />
<ClCompile Include="..\base\TGAlib.cpp" />
<ClCompile Include="..\base\ZipUtils.cpp" />
<ClCompile Include="..\cocos2d.cpp" />
<ClCompile Include="..\deprecated\CCArray.cpp" />
@ -217,13 +230,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\deprecated\CCString.cpp" />
<ClCompile Include="..\math\CCAffineTransform.cpp" />
<ClCompile Include="..\math\CCGeometry.cpp" />
<ClCompile Include="..\math\CCVertex.cpp" />
<ClCompile Include="..\math\Mat4.cpp" />
<ClCompile Include="..\math\MathUtil.cpp" />
<ClCompile Include="..\math\Matrix.cpp" />
<ClCompile Include="..\math\Quaternion.cpp" />
<ClCompile Include="..\math\TransformUtils.cpp" />
<ClCompile Include="..\math\Vector2.cpp" />
<ClCompile Include="..\math\Vector3.cpp" />
<ClCompile Include="..\math\Vector4.cpp" />
<ClCompile Include="..\math\Vec2.cpp" />
<ClCompile Include="..\math\Vec3.cpp" />
<ClCompile Include="..\math\Vec4.cpp" />
<ClCompile Include="..\physics\CCPhysicsBody.cpp" />
<ClCompile Include="..\physics\CCPhysicsContact.cpp" />
<ClCompile Include="..\physics\CCPhysicsJoint.cpp" />
@ -234,6 +248,17 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\physics\chipmunk\CCPhysicsJointInfo_chipmunk.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsShapeInfo_chipmunk.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsWorldInfo_chipmunk.cpp" />
<ClCompile Include="..\platform\CCFileUtils.cpp" />
<ClCompile Include="..\platform\CCGLViewProtocol.cpp" />
<ClCompile Include="..\platform\CCImage.cpp" />
<ClCompile Include="..\platform\CCSAXParser.cpp" />
<ClCompile Include="..\platform\CCThread.cpp" />
<ClCompile Include="..\platform\desktop\CCGLView.cpp" />
<ClCompile Include="..\platform\win32\CCApplication.cpp" />
<ClCompile Include="..\platform\win32\CCCommon.cpp" />
<ClCompile Include="..\platform\win32\CCDevice.cpp" />
<ClCompile Include="..\platform\win32\CCFileUtilsWin32.cpp" />
<ClCompile Include="..\platform\win32\CCStdC.cpp" />
<ClCompile Include="..\renderer\CCBatchCommand.cpp" />
<ClCompile Include="..\renderer\CCCustomCommand.cpp" />
<ClCompile Include="..\renderer\CCGLProgram.cpp" />
@ -242,10 +267,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\renderer\CCGLProgramStateCache.cpp" />
<ClCompile Include="..\renderer\ccGLStateCache.cpp" />
<ClCompile Include="..\renderer\CCGroupCommand.cpp" />
<ClCompile Include="..\renderer\CCMeshCommand.cpp" />
<ClCompile Include="..\renderer\CCQuadCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderer.cpp" />
<ClCompile Include="..\renderer\ccShaders.cpp" />
<ClCompile Include="..\renderer\CCTexture2D.cpp" />
<ClCompile Include="..\renderer\CCTextureAtlas.cpp" />
<ClCompile Include="..\renderer\CCTextureCache.cpp" />
<ClCompile Include="CCAction.cpp" />
<ClCompile Include="CCActionCamera.cpp" />
<ClCompile Include="CCActionCatmullRom.cpp" />
@ -262,7 +291,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="CCAnimation.cpp" />
<ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="ccCArray.cpp" />
<ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
@ -274,11 +302,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="CCFontCharMap.cpp" />
<ClCompile Include="CCFontFNT.cpp" />
<ClCompile Include="CCFontFreeType.cpp" />
<ClCompile Include="ccFPSImages.c" />
<ClCompile Include="CCGLBufferedNode.cpp" />
<ClCompile Include="CCGrabber.cpp" />
<ClCompile Include="CCGrid.cpp" />
<ClCompile Include="CCNodeGrid.cpp" />
<ClCompile Include="CCIMEDispatcher.cpp" />
<ClCompile Include="CCLabel.cpp" />
<ClCompile Include="CCLabelAtlas.cpp" />
<ClCompile Include="CCLabelBMFont.cpp" />
@ -289,6 +315,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="CCMenuItem.cpp" />
<ClCompile Include="CCMotionStreak.cpp" />
<ClCompile Include="CCNode.cpp" />
<ClCompile Include="CCNodeGrid.cpp" />
<ClCompile Include="CCParallaxNode.cpp" />
<ClCompile Include="CCParticleBatchNode.cpp" />
<ClCompile Include="CCParticleExamples.cpp" />
@ -297,15 +324,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="CCProgressTimer.cpp" />
<ClCompile Include="CCRenderTexture.cpp" />
<ClCompile Include="CCScene.cpp" />
<ClCompile Include="CCScriptSupport.cpp" />
<ClCompile Include="CCSprite.cpp" />
<ClCompile Include="CCSpriteBatchNode.cpp" />
<ClCompile Include="CCSpriteFrame.cpp" />
<ClCompile Include="CCSpriteFrameCache.cpp" />
<ClCompile Include="CCTextFieldTTF.cpp" />
<ClCompile Include="CCTexture2D.cpp" />
<ClCompile Include="CCTextureAtlas.cpp" />
<ClCompile Include="CCTextureCache.cpp" />
<ClCompile Include="CCTileMapAtlas.cpp" />
<ClCompile Include="CCTMXLayer.cpp" />
<ClCompile Include="CCTMXObjectGroup.cpp" />
@ -315,22 +338,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="CCTransitionPageTurn.cpp" />
<ClCompile Include="CCTransitionProgress.cpp" />
<ClCompile Include="CCTweenFunction.cpp" />
<ClCompile Include="CCUserDefault.cpp" />
<ClCompile Include="ccUTF8.cpp" />
<ClCompile Include="ccUtils.cpp" />
<ClCompile Include="CCVertex.cpp" />
<ClCompile Include="platform\CCGLViewProtocol.cpp" />
<ClCompile Include="platform\CCFileUtils.cpp" />
<ClCompile Include="platform\CCImage.cpp" />
<ClCompile Include="platform\CCSAXParser.cpp" />
<ClCompile Include="platform\CCThread.cpp" />
<ClCompile Include="platform\desktop\CCGLView.cpp" />
<ClCompile Include="platform\win32\CCApplication.cpp" />
<ClCompile Include="platform\win32\CCCommon.cpp" />
<ClCompile Include="platform\win32\CCDevice.cpp" />
<ClCompile Include="platform\win32\CCFileUtilsWin32.cpp" />
<ClCompile Include="platform\win32\CCStdC.cpp" />
<ClCompile Include="TGAlib.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\external\ConvertUTF\ConvertUTF.h" />
@ -339,9 +346,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\..\external\unzip\unzip.h" />
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
<ClInclude Include="..\3d\CCMesh.h" />
<ClInclude Include="..\3d\CCObjLoader.h" />
<ClInclude Include="..\3d\CCSprite3D.h" />
<ClInclude Include="..\3d\CCSprite3DDataCache.h" />
<ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\base64.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" />
<ClInclude Include="..\base\ccCArray.h" />
<ClInclude Include="..\base\ccConfig.h" />
<ClInclude Include="..\base\CCConfiguration.h" />
<ClInclude Include="..\base\CCConsole.h" />
@ -364,21 +376,33 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\base\CCEventMouse.h" />
<ClInclude Include="..\base\CCEventTouch.h" />
<ClInclude Include="..\base\CCEventType.h" />
<ClInclude Include="..\base\ccFPSImages.h" />
<ClInclude Include="..\base\CCIMEDelegate.h" />
<ClInclude Include="..\base\CCIMEDispatcher.h" />
<ClInclude Include="..\base\ccMacros.h" />
<ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\base\CCProfiling.h" />
<ClInclude Include="..\base\CCProtocols.h" />
<ClInclude Include="..\base\CCRef.h" />
<ClInclude Include="..\base\CCRefPtr.h" />
<ClInclude Include="..\base\CCScheduler.h" />
<ClInclude Include="..\base\CCScriptSupport.h" />
<ClInclude Include="..\base\CCTouch.h" />
<ClInclude Include="..\base\ccTypes.h" />
<ClInclude Include="..\base\CCUserDefault.h" />
<ClInclude Include="..\base\ccUTF8.h" />
<ClInclude Include="..\base\ccUtils.h" />
<ClInclude Include="..\base\CCValue.h" />
<ClInclude Include="..\base\CCVector.h" />
<ClInclude Include="..\base\etc1.h" />
<ClInclude Include="..\base\firePngData.h" />
<ClInclude Include="..\base\s3tc.h" />
<ClInclude Include="..\base\TGAlib.h" />
<ClInclude Include="..\base\uthash.h" />
<ClInclude Include="..\base\utlist.h" />
<ClInclude Include="..\base\ZipUtils.h" />
<ClInclude Include="..\cocos2d.h" />
<ClInclude Include="..\deprecated\CCArray.h" />
@ -395,13 +419,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\math\CCGeometry.h" />
<ClInclude Include="..\math\CCMath.h" />
<ClInclude Include="..\math\CCMathBase.h" />
<ClInclude Include="..\math\CCVertex.h" />
<ClInclude Include="..\math\Mat4.h" />
<ClInclude Include="..\math\MathUtil.h" />
<ClInclude Include="..\math\Matrix.h" />
<ClInclude Include="..\math\Quaternion.h" />
<ClInclude Include="..\math\TransformUtils.h" />
<ClInclude Include="..\math\Vector2.h" />
<ClInclude Include="..\math\Vector3.h" />
<ClInclude Include="..\math\Vector4.h" />
<ClInclude Include="..\math\Vec2.h" />
<ClInclude Include="..\math\Vec3.h" />
<ClInclude Include="..\math\Vec4.h" />
<ClInclude Include="..\physics\CCPhysicsBody.h" />
<ClInclude Include="..\physics\CCPhysicsContact.h" />
<ClInclude Include="..\physics\CCPhysicsJoint.h" />
@ -413,6 +438,21 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\physics\chipmunk\CCPhysicsJointInfo_chipmunk.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsShapeInfo_chipmunk.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsWorldInfo_chipmunk.h" />
<ClInclude Include="..\platform\CCApplicationProtocol.h" />
<ClInclude Include="..\platform\CCCommon.h" />
<ClInclude Include="..\platform\CCDevice.h" />
<ClInclude Include="..\platform\CCFileUtils.h" />
<ClInclude Include="..\platform\CCGLViewProtocol.h" />
<ClInclude Include="..\platform\CCImage.h" />
<ClInclude Include="..\platform\CCSAXParser.h" />
<ClInclude Include="..\platform\CCThread.h" />
<ClInclude Include="..\platform\desktop\CCGLView.h" />
<ClInclude Include="..\platform\win32\CCApplication.h" />
<ClInclude Include="..\platform\win32\CCFileUtilsWin32.h" />
<ClInclude Include="..\platform\win32\CCGL.h" />
<ClInclude Include="..\platform\win32\CCPlatformDefine.h" />
<ClInclude Include="..\platform\win32\CCStdC.h" />
<ClInclude Include="..\platform\win32\compat\stdint.h" />
<ClInclude Include="..\renderer\CCBatchCommand.h" />
<ClInclude Include="..\renderer\CCCustomCommand.h" />
<ClInclude Include="..\renderer\CCGLProgram.h" />
@ -421,11 +461,15 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\renderer\CCGLProgramStateCache.h" />
<ClInclude Include="..\renderer\ccGLStateCache.h" />
<ClInclude Include="..\renderer\CCGroupCommand.h" />
<ClInclude Include="..\renderer\CCMeshCommand.h" />
<ClInclude Include="..\renderer\CCQuadCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommandPool.h" />
<ClInclude Include="..\renderer\CCRenderer.h" />
<ClInclude Include="..\renderer\ccShaders.h" />
<ClInclude Include="..\renderer\CCTexture2D.h" />
<ClInclude Include="..\renderer\CCTextureAtlas.h" />
<ClInclude Include="..\renderer\CCTextureCache.h" />
<ClInclude Include="CCAction.h" />
<ClInclude Include="CCActionCamera.h" />
<ClInclude Include="CCActionCatmullRom.h" />
@ -442,7 +486,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="CCAnimation.h" />
<ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="ccCArray.h" />
<ClInclude Include="CCClippingNode.h" />
<ClInclude Include="CCComponent.h" />
<ClInclude Include="CCComponentContainer.h" />
@ -454,12 +497,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="CCFontCharMap.h" />
<ClInclude Include="CCFontFNT.h" />
<ClInclude Include="CCFontFreeType.h" />
<ClInclude Include="ccFPSImages.h" />
<ClInclude Include="CCGLBufferedNode.h" />
<ClInclude Include="CCGrabber.h" />
<ClInclude Include="CCGrid.h" />
<ClInclude Include="CCNodeGrid.h" />
<ClInclude Include="CCIMEDelegate.h" />
<ClInclude Include="CCIMEDispatcher.h" />
<ClInclude Include="CCLabel.h" />
<ClInclude Include="CCLabelAtlas.h" />
<ClInclude Include="CCLabelBMFont.h" />
@ -470,24 +510,20 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="CCMenuItem.h" />
<ClInclude Include="CCMotionStreak.h" />
<ClInclude Include="CCNode.h" />
<ClInclude Include="CCNodeGrid.h" />
<ClInclude Include="CCParallaxNode.h" />
<ClInclude Include="CCParticleBatchNode.h" />
<ClInclude Include="CCParticleExamples.h" />
<ClInclude Include="CCParticleSystem.h" />
<ClInclude Include="CCParticleSystemQuad.h" />
<ClInclude Include="CCProgressTimer.h" />
<ClInclude Include="CCProtocols.h" />
<ClInclude Include="CCRenderTexture.h" />
<ClInclude Include="CCScene.h" />
<ClInclude Include="CCScriptSupport.h" />
<ClInclude Include="CCSprite.h" />
<ClInclude Include="CCSpriteBatchNode.h" />
<ClInclude Include="CCSpriteFrame.h" />
<ClInclude Include="CCSpriteFrameCache.h" />
<ClInclude Include="CCTextFieldTTF.h" />
<ClInclude Include="CCTexture2D.h" />
<ClInclude Include="CCTextureAtlas.h" />
<ClInclude Include="CCTextureCache.h" />
<ClInclude Include="CCTileMapAtlas.h" />
<ClInclude Include="CCTMXLayer.h" />
<ClInclude Include="CCTMXObjectGroup.h" />
@ -497,58 +533,15 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="CCTransitionPageTurn.h" />
<ClInclude Include="CCTransitionProgress.h" />
<ClInclude Include="CCTweenFunction.h" />
<ClInclude Include="CCUserDefault.h" />
<ClInclude Include="ccUTF8.h" />
<ClInclude Include="ccUtils.h" />
<ClInclude Include="CCVertex.h" />
<ClInclude Include="platform\CCApplicationProtocol.h" />
<ClInclude Include="platform\CCCommon.h" />
<ClInclude Include="platform\CCDevice.h" />
<ClInclude Include="platform\CCGLViewProtocol.h" />
<ClInclude Include="platform\CCFileUtils.h" />
<ClInclude Include="platform\CCImage.h" />
<ClInclude Include="platform\CCSAXParser.h" />
<ClInclude Include="platform\CCThread.h" />
<ClInclude Include="platform\desktop\CCGLView.h" />
<ClInclude Include="platform\win32\CCApplication.h" />
<ClInclude Include="platform\win32\CCFileUtilsWin32.h" />
<ClInclude Include="platform\win32\CCGL.h" />
<ClInclude Include="platform\win32\CCPlatformDefine.h" />
<ClInclude Include="platform\win32\CCStdC.h" />
<ClInclude Include="TGAlib.h" />
<ClInclude Include="uthash.h" />
<ClInclude Include="utlist.h" />
</ItemGroup>
<ItemGroup>
<Text Include="..\math\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl" />
<None Include="..\math\MathUtil.inl" />
<None Include="..\math\MathUtilNeon.inl" />
<None Include="..\math\Matrix.inl" />
<None Include="..\math\Quaternion.inl" />
<None Include="..\math\Vector2.inl" />
<None Include="..\math\Vector3.inl" />
<None Include="..\math\Vector4.inl" />
<None Include="..\renderer\ccShader_Label.vert" />
<None Include="..\renderer\ccShader_Label_df.frag" />
<None Include="..\renderer\ccShader_Label_df_glow.frag" />
<None Include="..\renderer\ccShader_Label_normal.frag" />
<None Include="..\renderer\ccShader_Label_outline.frag" />
<None Include="..\renderer\ccShader_PositionColor.frag" />
<None Include="..\renderer\ccShader_PositionColor.vert" />
<None Include="..\renderer\ccShader_PositionColorLengthTexture.frag" />
<None Include="..\renderer\ccShader_PositionColorLengthTexture.vert" />
<None Include="..\renderer\ccShader_PositionTexture.frag" />
<None Include="..\renderer\ccShader_PositionTexture.vert" />
<None Include="..\renderer\ccShader_PositionTextureA8Color.frag" />
<None Include="..\renderer\ccShader_PositionTextureA8Color.vert" />
<None Include="..\renderer\ccShader_PositionTextureColor.frag" />
<None Include="..\renderer\ccShader_PositionTextureColor.vert" />
<None Include="..\renderer\ccShader_PositionTexture_uColor.frag" />
<None Include="..\renderer\ccShader_PositionTexture_uColor.vert" />
<None Include="..\renderer\ccShader_Position_uColor.frag" />
<None Include="..\renderer\ccShader_Position_uColor.vert" />
<None Include="..\math\Vec2.inl" />
<None Include="..\math\Vec3.inl" />
<None Include="..\math\Vec4.inl" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)cocos\2d\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\platform\win32;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>

View File

@ -7,7 +7,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\xxhash;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(GeneratedFilesDir);$(EngineRoot)external\ConvertUTF;</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\xxhash;$(EngineRoot)\external\winrt-specific;$(GeneratedFilesDir);$(EngineRoot)external\ConvertUTF;</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -75,7 +75,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -100,7 +100,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>_LIB;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -125,7 +125,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -151,7 +151,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PreprocessorDefinitions>_LIB;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -222,9 +222,14 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\3d\CCMesh.cpp" />
<ClCompile Include="..\3d\CCObjLoader.cpp" />
<ClCompile Include="..\3d\CCSprite3D.cpp" />
<ClCompile Include="..\3d\CCSprite3DDataCache.cpp" />
<ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\base64.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
<ClCompile Include="..\base\ccCArray.cpp" />
<ClCompile Include="..\base\CCConfiguration.cpp" />
<ClCompile Include="..\base\CCConsole.cpp" />
<ClCompile Include="..\base\CCData.cpp" />
@ -245,15 +250,34 @@
<ClCompile Include="..\base\CCEventListenerTouch.cpp" />
<ClCompile Include="..\base\CCEventMouse.cpp" />
<ClCompile Include="..\base\CCEventTouch.cpp" />
<ClCompile Include="..\base\ccFPSImages.c">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsWinRT>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeaderFile>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</ForcedIncludeFiles>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="..\base\CCIMEDispatcher.cpp" />
<ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCProfiling.cpp" />
<ClCompile Include="..\base\CCRef.cpp" />
<ClCompile Include="..\base\CCScheduler.cpp" />
<ClCompile Include="..\base\CCScriptSupport.cpp" />
<ClCompile Include="..\base\CCTouch.cpp" />
<ClCompile Include="..\base\ccTypes.cpp" />
<ClCompile Include="..\base\CCUserDefault.cpp" />
<ClCompile Include="..\base\CCUserDefaultAndroid.cpp" />
<ClCompile Include="..\base\ccUTF8.cpp" />
<ClCompile Include="..\base\ccUtils.cpp" />
<ClCompile Include="..\base\CCValue.cpp" />
<ClCompile Include="..\base\etc1.cpp" />
<ClCompile Include="..\base\s3tc.cpp" />
<ClCompile Include="..\base\TGAlib.cpp" />
<ClCompile Include="..\base\ZipUtils.cpp" />
<ClCompile Include="..\cocos2d.cpp" />
<ClCompile Include="..\deprecated\CCArray.cpp" />
@ -264,13 +288,14 @@
<ClCompile Include="..\deprecated\CCString.cpp" />
<ClCompile Include="..\math\CCAffineTransform.cpp" />
<ClCompile Include="..\math\CCGeometry.cpp" />
<ClCompile Include="..\math\CCVertex.cpp" />
<ClCompile Include="..\math\Mat4.cpp" />
<ClCompile Include="..\math\MathUtil.cpp" />
<ClCompile Include="..\math\Matrix.cpp" />
<ClCompile Include="..\math\Quaternion.cpp" />
<ClCompile Include="..\math\TransformUtils.cpp" />
<ClCompile Include="..\math\Vector2.cpp" />
<ClCompile Include="..\math\Vector3.cpp" />
<ClCompile Include="..\math\Vector4.cpp" />
<ClCompile Include="..\math\Vec2.cpp" />
<ClCompile Include="..\math\Vec3.cpp" />
<ClCompile Include="..\math\Vec4.cpp" />
<ClCompile Include="..\physics\CCPhysicsBody.cpp" />
<ClCompile Include="..\physics\CCPhysicsContact.cpp" />
<ClCompile Include="..\physics\CCPhysicsJoint.cpp" />
@ -281,6 +306,27 @@
<ClCompile Include="..\physics\chipmunk\CCPhysicsJointInfo_chipmunk.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsShapeInfo_chipmunk.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsWorldInfo_chipmunk.cpp" />
<ClCompile Include="..\platform\CCFileUtils.cpp" />
<ClCompile Include="..\platform\CCGLViewProtocol.cpp" />
<ClCompile Include="..\platform\CCImage.cpp" />
<ClCompile Include="..\platform\CCSAXParser.cpp" />
<ClCompile Include="..\platform\CCThread.cpp" />
<ClCompile Include="..\platform\winrt\CCApplication.cpp" />
<ClCompile Include="..\platform\winrt\CCCommon.cpp" />
<ClCompile Include="..\platform\winrt\CCDevice.cpp" />
<ClCompile Include="..\platform\winrt\CCFileUtilsWinRT.cpp" />
<ClCompile Include="..\platform\winrt\CCFreeTypeFont.cpp" />
<ClCompile Include="..\platform\winrt\CCPrecompiledShaders.cpp" />
<ClCompile Include="..\platform\winrt\CCPThreadWinRT.cpp" />
<ClCompile Include="..\platform\winrt\CCStdC.cpp" />
<ClCompile Include="..\platform\winrt\CCWinRTUtils.cpp" />
<ClCompile Include="..\platform\winrt\inet_ntop_winrt.cpp" />
<ClCompile Include="..\platform\winrt\InputEvent.cpp" />
<ClCompile Include="..\platform\winrt\pch.cpp" />
<ClCompile Include="..\platform\winrt\sha1.cpp" />
<ClCompile Include="..\platform\wp8\CCGLView.cpp" />
<ClCompile Include="..\platform\wp8\Direct3DBase.cpp" />
<ClCompile Include="..\platform\wp8\DirectXBase.cpp" />
<ClCompile Include="..\renderer\CCBatchCommand.cpp" />
<ClCompile Include="..\renderer\CCCustomCommand.cpp" />
<ClCompile Include="..\renderer\CCGLProgram.cpp" />
@ -289,10 +335,14 @@
<ClCompile Include="..\renderer\CCGLProgramStateCache.cpp" />
<ClCompile Include="..\renderer\ccGLStateCache.cpp" />
<ClCompile Include="..\renderer\CCGroupCommand.cpp" />
<ClCompile Include="..\renderer\CCMeshCommand.cpp" />
<ClCompile Include="..\renderer\CCQuadCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderer.cpp" />
<ClCompile Include="..\renderer\ccShaders.cpp" />
<ClCompile Include="..\renderer\CCTexture2D.cpp" />
<ClCompile Include="..\renderer\CCTextureAtlas.cpp" />
<ClCompile Include="..\renderer\CCTextureCache.cpp" />
<ClCompile Include="CCAction.cpp" />
<ClCompile Include="CCActionCamera.cpp" />
<ClCompile Include="CCActionCatmullRom.cpp" />
@ -309,7 +359,6 @@
<ClCompile Include="CCAnimation.cpp" />
<ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="ccCArray.cpp" />
<ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
@ -321,28 +370,9 @@
<ClCompile Include="CCFontCharMap.cpp" />
<ClCompile Include="CCFontFNT.cpp" />
<ClCompile Include="CCFontFreeType.cpp" />
<ClCompile Include="ccFPSImages.c">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsWinRT>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
</ForcedIncludeFiles>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
</ForcedIncludeFiles>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</ForcedIncludeFiles>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="CCGLBufferedNode.cpp" />
<ClCompile Include="CCGrabber.cpp" />
<ClCompile Include="CCGrid.cpp" />
<ClCompile Include="CCNodeGrid.cpp" />
<ClCompile Include="CCIMEDispatcher.cpp" />
<ClCompile Include="CCLabel.cpp" />
<ClCompile Include="CCLabelAtlas.cpp" />
<ClCompile Include="CCLabelBMFont.cpp" />
@ -353,6 +383,7 @@
<ClCompile Include="CCMenuItem.cpp" />
<ClCompile Include="CCMotionStreak.cpp" />
<ClCompile Include="CCNode.cpp" />
<ClCompile Include="CCNodeGrid.cpp" />
<ClCompile Include="CCParallaxNode.cpp" />
<ClCompile Include="CCParticleBatchNode.cpp" />
<ClCompile Include="CCParticleExamples.cpp" />
@ -361,15 +392,11 @@
<ClCompile Include="CCProgressTimer.cpp" />
<ClCompile Include="CCRenderTexture.cpp" />
<ClCompile Include="CCScene.cpp" />
<ClCompile Include="CCScriptSupport.cpp" />
<ClCompile Include="CCSprite.cpp" />
<ClCompile Include="CCSpriteBatchNode.cpp" />
<ClCompile Include="CCSpriteFrame.cpp" />
<ClCompile Include="CCSpriteFrameCache.cpp" />
<ClCompile Include="CCTextFieldTTF.cpp" />
<ClCompile Include="CCTexture2D.cpp" />
<ClCompile Include="CCTextureAtlas.cpp" />
<ClCompile Include="CCTextureCache.cpp" />
<ClCompile Include="CCTileMapAtlas.cpp" />
<ClCompile Include="CCTMXLayer.cpp" />
<ClCompile Include="CCTMXObjectGroup.cpp" />
@ -379,54 +406,6 @@
<ClCompile Include="CCTransitionPageTurn.cpp" />
<ClCompile Include="CCTransitionProgress.cpp" />
<ClCompile Include="CCTweenFunction.cpp" />
<ClCompile Include="CCUserDefault.cpp" />
<ClCompile Include="ccUTF8.cpp" />
<ClCompile Include="ccUtils.cpp" />
<ClCompile Include="CCVertex.cpp" />
<ClCompile Include="platform\CCGLViewProtocol.cpp" />
<ClCompile Include="platform\CCFileUtils.cpp" />
<ClCompile Include="platform\CCImage.cpp" />
<ClCompile Include="platform\CCSAXParser.cpp" />
<ClCompile Include="platform\CCThread.cpp" />
<ClCompile Include="platform\winrt\CCApplication.cpp" />
<ClCompile Include="platform\winrt\CCCommon.cpp" />
<ClCompile Include="platform\winrt\CCDevice.cpp" />
<ClCompile Include="platform\winrt\CCFileUtilsWinRT.cpp" />
<ClCompile Include="platform\winrt\CCFreeTypeFont.cpp" />
<ClCompile Include="platform\winrt\CCPrecompiledShaders.cpp" />
<ClCompile Include="platform\winrt\CCStdC.cpp" />
<ClCompile Include="platform\winrt\CCWinRTUtils.cpp" />
<ClCompile Include="platform\winrt\inet_ntop_winrt.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pch.h</ForcedIncludeFiles>
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Cdecl</CallingConvention>
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Cdecl</CallingConvention>
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Cdecl</CallingConvention>
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Cdecl</CallingConvention>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">pch.h</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="platform\winrt\InputEvent.cpp" />
<ClCompile Include="platform\winrt\pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="platform\winrt\sha1.cpp" />
<ClCompile Include="platform\wp8\CCGLView.cpp" />
<ClCompile Include="platform\wp8\DirectXBase.cpp" />
<ClCompile Include="TGAlib.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\external\ConvertUTF\ConvertUTF.h" />
@ -435,9 +414,14 @@
<ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\..\external\unzip\unzip.h" />
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
<ClInclude Include="..\3d\CCMesh.h" />
<ClInclude Include="..\3d\CCObjLoader.h" />
<ClInclude Include="..\3d\CCSprite3D.h" />
<ClInclude Include="..\3d\CCSprite3DDataCache.h" />
<ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\base64.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" />
<ClInclude Include="..\base\ccCArray.h" />
<ClInclude Include="..\base\ccConfig.h" />
<ClInclude Include="..\base\CCConfiguration.h" />
<ClInclude Include="..\base\CCConsole.h" />
@ -460,21 +444,33 @@
<ClInclude Include="..\base\CCEventMouse.h" />
<ClInclude Include="..\base\CCEventTouch.h" />
<ClInclude Include="..\base\CCEventType.h" />
<ClInclude Include="..\base\ccFPSImages.h" />
<ClInclude Include="..\base\CCIMEDelegate.h" />
<ClInclude Include="..\base\CCIMEDispatcher.h" />
<ClInclude Include="..\base\ccMacros.h" />
<ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\base\CCProfiling.h" />
<ClInclude Include="..\base\CCProtocols.h" />
<ClInclude Include="..\base\CCRef.h" />
<ClInclude Include="..\base\CCRefPtr.h" />
<ClInclude Include="..\base\CCScheduler.h" />
<ClInclude Include="..\base\CCScriptSupport.h" />
<ClInclude Include="..\base\CCTouch.h" />
<ClInclude Include="..\base\ccTypes.h" />
<ClInclude Include="..\base\CCUserDefault.h" />
<ClInclude Include="..\base\ccUTF8.h" />
<ClInclude Include="..\base\ccUtils.h" />
<ClInclude Include="..\base\CCValue.h" />
<ClInclude Include="..\base\CCVector.h" />
<ClInclude Include="..\base\etc1.h" />
<ClInclude Include="..\base\firePngData.h" />
<ClInclude Include="..\base\s3tc.h" />
<ClInclude Include="..\base\TGAlib.h" />
<ClInclude Include="..\base\uthash.h" />
<ClInclude Include="..\base\utlist.h" />
<ClInclude Include="..\base\ZipUtils.h" />
<ClInclude Include="..\deprecated\CCArray.h" />
<ClInclude Include="..\deprecated\CCBool.h" />
@ -490,13 +486,14 @@
<ClInclude Include="..\math\CCGeometry.h" />
<ClInclude Include="..\math\CCMath.h" />
<ClInclude Include="..\math\CCMathBase.h" />
<ClInclude Include="..\math\CCVertex.h" />
<ClInclude Include="..\math\Mat4.h" />
<ClInclude Include="..\math\MathUtil.h" />
<ClInclude Include="..\math\Matrix.h" />
<ClInclude Include="..\math\Quaternion.h" />
<ClInclude Include="..\math\TransformUtils.h" />
<ClInclude Include="..\math\Vector2.h" />
<ClInclude Include="..\math\Vector3.h" />
<ClInclude Include="..\math\Vector4.h" />
<ClInclude Include="..\math\Vec2.h" />
<ClInclude Include="..\math\Vec3.h" />
<ClInclude Include="..\math\Vec4.h" />
<ClInclude Include="..\physics\CCPhysicsBody.h" />
<ClInclude Include="..\physics\CCPhysicsContact.h" />
<ClInclude Include="..\physics\CCPhysicsJoint.h" />
@ -508,6 +505,33 @@
<ClInclude Include="..\physics\chipmunk\CCPhysicsJointInfo_chipmunk.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsShapeInfo_chipmunk.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsWorldInfo_chipmunk.h" />
<ClInclude Include="..\platform\CCApplicationProtocol.h" />
<ClInclude Include="..\platform\CCCommon.h" />
<ClInclude Include="..\platform\CCDevice.h" />
<ClInclude Include="..\platform\CCFileUtils.h" />
<ClInclude Include="..\platform\CCGLViewProtocol.h" />
<ClInclude Include="..\platform\CCImage.h" />
<ClInclude Include="..\platform\CCSAXParser.h" />
<ClInclude Include="..\platform\CCThread.h" />
<ClInclude Include="..\platform\winrt\CCApplication.h" />
<ClInclude Include="..\platform\winrt\CCFileUtilsWinRT.h" />
<ClInclude Include="..\platform\winrt\CCFreeTypeFont.h" />
<ClInclude Include="..\platform\winrt\CCGL.h" />
<ClInclude Include="..\platform\winrt\CCGL_Angle.h" />
<ClInclude Include="..\platform\winrt\CCPlatformDefine.h" />
<ClInclude Include="..\platform\winrt\CCPrecompiledShaders.h" />
<ClInclude Include="..\platform\winrt\CCPThreadWinRT.h" />
<ClInclude Include="..\platform\winrt\CCStdC.h" />
<ClInclude Include="..\platform\winrt\CCWinRTUtils.h" />
<ClInclude Include="..\platform\winrt\DirectXHelper.h" />
<ClInclude Include="..\platform\winrt\inet_ntop_winrt.h" />
<ClInclude Include="..\platform\winrt\InputEvent.h" />
<ClInclude Include="..\platform\winrt\InputEventTypes.h" />
<ClInclude Include="..\platform\winrt\pch.h" />
<ClInclude Include="..\platform\winrt\sha1.h" />
<ClInclude Include="..\platform\wp8\CCGLView.h" />
<ClInclude Include="..\platform\wp8\Direct3DBase.h" />
<ClInclude Include="..\platform\wp8\DirectXBase.h" />
<ClInclude Include="..\renderer\CCBatchCommand.h" />
<ClInclude Include="..\renderer\CCCustomCommand.h" />
<ClInclude Include="..\renderer\CCGLProgram.h" />
@ -516,11 +540,15 @@
<ClInclude Include="..\renderer\CCGLProgramStateCache.h" />
<ClInclude Include="..\renderer\ccGLStateCache.h" />
<ClInclude Include="..\renderer\CCGroupCommand.h" />
<ClInclude Include="..\renderer\CCMeshCommand.h" />
<ClInclude Include="..\renderer\CCQuadCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommandPool.h" />
<ClInclude Include="..\renderer\CCRenderer.h" />
<ClInclude Include="..\renderer\ccShaders.h" />
<ClInclude Include="..\renderer\CCTexture2D.h" />
<ClInclude Include="..\renderer\CCTextureAtlas.h" />
<ClInclude Include="..\renderer\CCTextureCache.h" />
<ClInclude Include="CCAction.h" />
<ClInclude Include="CCActionCamera.h" />
<ClInclude Include="CCActionCatmullRom.h" />
@ -537,55 +565,44 @@
<ClInclude Include="CCAnimation.h" />
<ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="ccCArray.h" />
<ClInclude Include="CCClippingNode.h" />
<ClInclude Include="CCComponent.h" />
<ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="ccConfig.h" />
<ClInclude Include="CCDrawingPrimitives.h" />
<ClInclude Include="CCDrawNode.h" />
<ClInclude Include="CCEventType.h" />
<ClInclude Include="CCFont.h" />
<ClInclude Include="CCFontAtlas.h" />
<ClInclude Include="CCFontAtlasCache.h" />
<ClInclude Include="CCFontCharMap.h" />
<ClInclude Include="CCFontFNT.h" />
<ClInclude Include="CCFontFreeType.h" />
<ClInclude Include="ccFPSImages.h" />
<ClInclude Include="CCGLBufferedNode.h" />
<ClInclude Include="CCGrabber.h" />
<ClInclude Include="CCGrid.h" />
<ClInclude Include="CCNodeGrid.h" />
<ClInclude Include="CCIMEDelegate.h" />
<ClInclude Include="CCIMEDispatcher.h" />
<ClInclude Include="CCLabel.h" />
<ClInclude Include="CCLabelAtlas.h" />
<ClInclude Include="CCLabelBMFont.h" />
<ClInclude Include="CCLabelTextFormatter.h" />
<ClInclude Include="CCLabelTTF.h" />
<ClInclude Include="CCLayer.h" />
<ClInclude Include="ccMacros.h" />
<ClInclude Include="CCMenu.h" />
<ClInclude Include="CCMenuItem.h" />
<ClInclude Include="CCMotionStreak.h" />
<ClInclude Include="CCNode.h" />
<ClInclude Include="CCNodeGrid.h" />
<ClInclude Include="CCParallaxNode.h" />
<ClInclude Include="CCParticleBatchNode.h" />
<ClInclude Include="CCParticleExamples.h" />
<ClInclude Include="CCParticleSystem.h" />
<ClInclude Include="CCParticleSystemQuad.h" />
<ClInclude Include="CCProgressTimer.h" />
<ClInclude Include="CCProtocols.h" />
<ClInclude Include="CCRenderTexture.h" />
<ClInclude Include="CCScene.h" />
<ClInclude Include="CCScriptSupport.h" />
<ClInclude Include="CCSprite.h" />
<ClInclude Include="CCSpriteBatchNode.h" />
<ClInclude Include="CCSpriteFrame.h" />
<ClInclude Include="CCSpriteFrameCache.h" />
<ClInclude Include="CCTextFieldTTF.h" />
<ClInclude Include="CCTexture2D.h" />
<ClInclude Include="CCTextureAtlas.h" />
<ClInclude Include="CCTextureCache.h" />
<ClInclude Include="CCTileMapAtlas.h" />
<ClInclude Include="CCTMXLayer.h" />
<ClInclude Include="CCTMXObjectGroup.h" />
@ -594,49 +611,16 @@
<ClInclude Include="CCTransition.h" />
<ClInclude Include="CCTransitionPageTurn.h" />
<ClInclude Include="CCTransitionProgress.h" />
<ClInclude Include="ccTypes.h" />
<ClInclude Include="CCTweenFunction.h" />
<ClInclude Include="CCUserDefault.h" />
<ClInclude Include="ccUTF8.h" />
<ClInclude Include="ccUtils.h" />
<ClInclude Include="CCVertex.h" />
<ClInclude Include="cocos2d.h" />
<ClInclude Include="platform\CCApplicationProtocol.h" />
<ClInclude Include="platform\CCCommon.h" />
<ClInclude Include="platform\CCDevice.h" />
<ClInclude Include="platform\CCGLViewProtocol.h" />
<ClInclude Include="platform\CCFileUtils.h" />
<ClInclude Include="platform\CCImage.h" />
<ClInclude Include="platform\CCSAXParser.h" />
<ClInclude Include="platform\CCThread.h" />
<ClInclude Include="platform\winrt\CCApplication.h" />
<ClInclude Include="platform\winrt\CCFileUtilsWinRT.h" />
<ClInclude Include="platform\winrt\CCFreeTypeFont.h" />
<ClInclude Include="platform\winrt\CCGL.h" />
<ClInclude Include="platform\winrt\CCGL_Angle.h" />
<ClInclude Include="platform\winrt\CCPlatformDefine.h" />
<ClInclude Include="platform\winrt\CCPrecompiledShaders.h" />
<ClInclude Include="platform\winrt\CCStdC.h" />
<ClInclude Include="platform\winrt\CCWinRTUtils.h" />
<ClInclude Include="platform\winrt\inet_ntop_winrt.h" />
<ClInclude Include="platform\winrt\InputEvent.h" />
<ClInclude Include="platform\winrt\InputEventTypes.h" />
<ClInclude Include="platform\winrt\pch.h" />
<ClInclude Include="platform\winrt\sha1.h" />
<ClInclude Include="platform\wp8\CCGLView.h" />
<ClInclude Include="platform\wp8\DirectXBase.h" />
<ClInclude Include="TGAlib.h" />
<ClInclude Include="uthash.h" />
<ClInclude Include="utlist.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl" />
<None Include="..\math\MathUtil.inl" />
<None Include="..\math\MathUtilNeon.inl" />
<None Include="..\math\Matrix.inl" />
<None Include="..\math\Quaternion.inl" />
<None Include="..\math\Vector2.inl" />
<None Include="..\math\Vector3.inl" />
<None Include="..\math\Vector4.inl" />
<None Include="..\math\Vec2.inl" />
<None Include="..\math\Vec3.inl" />
<None Include="..\math\Vec4.inl" />
<None Include="..\renderer\ccShader_Label.vert" />
<None Include="..\renderer\ccShader_Label_df.frag" />
<None Include="..\renderer\ccShader_Label_df_glow.frag" />
@ -661,6 +645,6 @@
<None Include="..\renderer\ccShader_Position_uColor.vert" />
</ItemGroup>
<ItemGroup>
<Text Include="..\base\CMakeLists.txt" />
<Text Include="..\renderer\CMakeLists.txt" />
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\wp8;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\curl\include\wp8;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\ui;$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\deprecated;$(EngineRoot)external\ConvertUTF;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\curl\include\wp8;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
<MultiProcessorCompilation>true</MultiProcessorCompilation>

214
cocos/3d/CCMesh.cpp Normal file
View File

@ -0,0 +1,214 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCMesh.h"
#include <list>
#include <fstream>
#include <iostream>
#include <sstream>
#include "base/ccMacros.h"
#include "renderer/ccGLStateCache.h"
#include "CCObjLoader.h"
#include "CCSprite3DDataCache.h"
using namespace std;
NS_CC_BEGIN
bool RenderMeshData::hasVertexAttrib(int attrib)
{
for (auto itr = _vertexAttribs.begin(); itr != _vertexAttribs.end(); itr++)
{
if ((*itr).vertexAttrib == attrib)
return true; //already has
}
return false;
}
bool RenderMeshData::initFrom(const std::vector<float>& positions,
const std::vector<float>& normals,
const std::vector<float>& texs,
const std::vector<unsigned short>& indices)
{
CC_ASSERT(positions.size()<65536 * 3 && "index may out of bound");
_vertexAttribs.clear();
_vertexsizeBytes = 0;
_vertexNum = positions.size() / 3; //number of vertex
if (_vertexNum == 0)
return false;
if ((normals.size() != 0 && _vertexNum * 3 != normals.size()) || (texs.size() != 0 && _vertexNum * 2 != texs.size()))
return false;
_vertexsizeBytes += 3;
MeshVertexAttrib meshvertexattrib;
meshvertexattrib.size = 3;
meshvertexattrib.type = GL_FLOAT;
meshvertexattrib.attribSizeBytes = meshvertexattrib.size * sizeof(float);
meshvertexattrib.vertexAttrib = GLProgram::VERTEX_ATTRIB_POSITION;
_vertexAttribs.push_back(meshvertexattrib);
//normal
if (normals.size())
{
//add normal flag
_vertexsizeBytes += 3;
meshvertexattrib.vertexAttrib = GLProgram::VERTEX_ATTRIB_NORMAL;
_vertexAttribs.push_back(meshvertexattrib);
}
//
if (texs.size())
{
_vertexsizeBytes += 2;
meshvertexattrib.size = 2;
meshvertexattrib.vertexAttrib = GLProgram::VERTEX_ATTRIB_TEX_COORD;
meshvertexattrib.attribSizeBytes = meshvertexattrib.size * sizeof(float);
_vertexAttribs.push_back(meshvertexattrib);
}
_vertexs.clear();
_vertexs.reserve(_vertexNum * _vertexsizeBytes);
_vertexsizeBytes *= sizeof(float);
bool hasNormal = hasVertexAttrib(GLProgram::VERTEX_ATTRIB_NORMAL);
bool hasTexCoord = hasVertexAttrib(GLProgram::VERTEX_ATTRIB_TEX_COORD);
//position, normal, texCoordinate into _vertexs
for(int i = 0; i < _vertexNum; i++)
{
_vertexs.push_back(positions[i * 3]);
_vertexs.push_back(positions[i * 3 + 1]);
_vertexs.push_back(positions[i * 3 + 2]);
if (hasNormal)
{
_vertexs.push_back(normals[i * 3]);
_vertexs.push_back(normals[i * 3 + 1]);
_vertexs.push_back(normals[i * 3 + 2]);
}
if (hasTexCoord)
{
_vertexs.push_back(texs[i * 2]);
_vertexs.push_back(texs[i * 2 + 1]);
}
}
_indices = indices;
return true;
}
Mesh::Mesh()
:_vertexBuffer(0)
, _indexBuffer(0)
, _primitiveType(PrimitiveType::TRIANGLES)
, _indexFormat(IndexFormat::INDEX16)
, _indexCount(0)
{
}
Mesh::~Mesh()
{
cleanAndFreeBuffers();
}
Mesh* Mesh::create(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const std::vector<unsigned short>& indices)
{
auto mesh = new Mesh();
if(mesh && mesh->init(positions, normals, texs, indices))
{
mesh->autorelease();
return mesh;
}
CC_SAFE_DELETE(mesh);
return nullptr;
}
bool Mesh::init(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const std::vector<unsigned short>& indices)
{
bool bRet = _renderdata.initFrom(positions, normals, texs, indices);
if (!bRet)
return false;
restore();
return true;
}
void Mesh::cleanAndFreeBuffers()
{
if(glIsBuffer(_vertexBuffer))
{
glDeleteBuffers(1, &_vertexBuffer);
_vertexBuffer = 0;
}
if(glIsBuffer(_indexBuffer))
{
glDeleteBuffers(1, &_indexBuffer);
_indexBuffer = 0;
}
_primitiveType = PrimitiveType::TRIANGLES;
_indexFormat = IndexFormat::INDEX16;
_indexCount = 0;
}
void Mesh::buildBuffer()
{
cleanAndFreeBuffers();
glGenBuffers(1, &_vertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);
glBufferData(GL_ARRAY_BUFFER,
_renderdata._vertexs.size() * sizeof(_renderdata._vertexs[0]),
&_renderdata._vertexs[0],
GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glGenBuffers(1, &_indexBuffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer);
unsigned int indexSize = 2;
IndexFormat indexformat = IndexFormat::INDEX16;
glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexSize * _renderdata._indices.size(), &_renderdata._indices[0], GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
_primitiveType = PrimitiveType::TRIANGLES;
_indexFormat = indexformat;
_indexCount = _renderdata._indices.size();
}
void Mesh::restore()
{
cleanAndFreeBuffers();
buildBuffer();
}
NS_CC_END

133
cocos/3d/CCMesh.h Normal file
View File

@ -0,0 +1,133 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCMESH_H__
#define __CCMESH_H__
#include <string>
#include <vector>
#include "base/CCRef.h"
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "renderer/CCGLProgram.h"
NS_CC_BEGIN
//mesh vertex attribute
struct MeshVertexAttrib
{
//attribute size
GLint size;
//GL_FLOAT
GLenum type;
//VERTEX_ATTRIB_POSITION,VERTEX_ATTRIB_COLOR,VERTEX_ATTRIB_TEX_COORD,VERTEX_ATTRIB_NORMAL, GLProgram for detail
int vertexAttrib;
//size in bytes
int attribSizeBytes;
};
class RenderMeshData
{
friend class Mesh;
public:
RenderMeshData(): _vertexsizeBytes(0)
{
}
bool hasVertexAttrib(int attrib);
bool initFrom(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const std::vector<unsigned short>& indices);
protected:
int _vertexsizeBytes;
ssize_t _vertexNum;
std::vector<float> _vertexs;
std::vector<unsigned short> _indices;
std::vector<MeshVertexAttrib> _vertexAttribs;
};
/** Mesh: TODO, add description of Mesh */
class Mesh : public Ref
{
public:
/** Defines supported index formats. */
enum class IndexFormat
{
INDEX8 = GL_UNSIGNED_BYTE,
INDEX16 = GL_UNSIGNED_SHORT,
};
/** Defines supported primitive types. */
enum class PrimitiveType
{
TRIANGLES = GL_TRIANGLES,
TRIANGLE_STRIP = GL_TRIANGLE_STRIP,
LINES = GL_LINES,
LINE_STRIP = GL_LINE_STRIP,
POINTS = GL_POINTS
};
//create
static Mesh* create(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const std::vector<unsigned short>& indices);
//get vertex buffer
inline GLuint getVertexBuffer() const { return _vertexBuffer; }
//get mesh vertex attribute count
ssize_t getMeshVertexAttribCount() const { return _renderdata._vertexAttribs.size(); }
//get MeshVertexAttribute by index
const MeshVertexAttrib& getMeshVertexAttribute(int idx) const { return _renderdata._vertexAttribs[idx]; }
//has vertex attribute?
bool hasVertexAttrib(int attrib) { return _renderdata.hasVertexAttrib(attrib); }
//get per vertex size in bytes
int getVertexSizeInBytes() const { return _renderdata._vertexsizeBytes; }
PrimitiveType getPrimitiveType() const { return _primitiveType; }
ssize_t getIndexCount() const { return _indexCount; }
IndexFormat getIndexFormat() const { return _indexFormat; }
GLuint getIndexBuffer() const {return _indexBuffer; }
//build vertex buffer from renderdata
void restore();
protected:
Mesh();
virtual ~Mesh();
bool init(const std::vector<float>& positions, const std::vector<float>& normals, const std::vector<float>& texs, const std::vector<unsigned short>& indices);
//build buffer
void buildBuffer();
void cleanAndFreeBuffers();
PrimitiveType _primitiveType;
IndexFormat _indexFormat;
GLuint _vertexBuffer;
GLuint _indexBuffer;
ssize_t _indexCount;
RenderMeshData _renderdata;
};
NS_CC_END
#endif // __CCMESH_H_

714
cocos/3d/CCObjLoader.cpp Normal file
View File

@ -0,0 +1,714 @@
//
// Copyright 2012-2013, Syoyo Fujita.
//
// Licensed under 2-clause BSD liecense.
//
//
// version 0.9.6: Support Ni(index of refraction) mtl parameter.
// Parse transmittance material parameter correctly.
// version 0.9.5: Parse multiple group name.
// Add support of specifying the base path to load material file.
// version 0.9.4: Initial suupport of group tag(g)
// version 0.9.3: Fix parsing triple 'x/y/z'
// version 0.9.2: Add more .mtl load support
// version 0.9.1: Add initial .mtl load support
// version 0.9.0: Initial
//
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <map>
#include <fstream>
#include <sstream>
#include "CCObjLoader.h"
#include "platform/CCFileUtils.h"
NS_CC_BEGIN
struct vertex_index
{
int v_idx, vt_idx, vn_idx;
vertex_index() {};
vertex_index(int idx) : v_idx(idx), vt_idx(idx), vn_idx(idx) {};
vertex_index(int vidx, int vtidx, int vnidx) : v_idx(vidx), vt_idx(vtidx), vn_idx(vnidx) {};
};
// for std::map
static inline bool operator<(const vertex_index& a, const vertex_index& b)
{
if (a.v_idx != b.v_idx) return (a.v_idx < b.v_idx);
if (a.vn_idx != b.vn_idx) return (a.vn_idx < b.vn_idx);
if (a.vt_idx != b.vt_idx) return (a.vt_idx < b.vt_idx);
return false;
}
struct obj_shape
{
std::vector<float> v;
std::vector<float> vn;
std::vector<float> vt;
};
static inline bool isSpace(const char c)
{
return (c == ' ') || (c == '\t');
}
static inline bool isNewLine(const char c)
{
return (c == '\r') || (c == '\n') || (c == '\0');
}
// Make index zero-base, and also support relative index.
static inline int fixIndex(int idx, int n)
{
int i;
if (idx > 0) {
i = idx - 1;
} else if (idx == 0) {
i = 0;
} else { // negative value = relative
i = n + idx;
}
return i;
}
static inline std::string parseString(const char*& token)
{
std::string s;
auto b = strspn(token, " \t");
auto e = strcspn(token, " \t\r");
s = std::string(&token[b], &token[e]);
token += (e - b);
return s;
}
static inline int parseInt(const char*& token)
{
token += strspn(token, " \t");
int i = atoi(token);
token += strcspn(token, " \t\r");
return i;
}
static inline float parseFloat(const char*& token)
{
token += strspn(token, " \t");
float f = (float)atof(token);
token += strcspn(token, " \t\r");
return f;
}
static inline void parseFloat2(float& x, float& y, const char*& token)
{
x = parseFloat(token);
y = parseFloat(token);
}
static inline void parseFloat3(float& x, float& y, float& z, const char*& token)
{
x = parseFloat(token);
y = parseFloat(token);
z = parseFloat(token);
}
// Parse triples: i, i/j/k, i//k, i/j
static vertex_index parseTriple(const char* &token, int vsize, int vnsize, int vtsize)
{
vertex_index vi(-1);
vi.v_idx = fixIndex(atoi(token), vsize);
token += strcspn(token, "/ \t\r");
if (token[0] != '/') {
return vi;
}
token++;
// i//k
if (token[0] == '/') {
token++;
vi.vn_idx = fixIndex(atoi(token), vnsize);
token += strcspn(token, "/ \t\r");
return vi;
}
// i/j/k or i/j
vi.vt_idx = fixIndex(atoi(token), vtsize);
token += strcspn(token, "/ \t\r");
if (token[0] != '/') {
return vi;
}
// i/j/k
token++; // skip '/'
vi.vn_idx = fixIndex(atoi(token), vnsize);
token += strcspn(token, "/ \t\r");
return vi;
}
static ssize_t updateVertex( std::map<vertex_index, ssize_t>& vertexCache, std::vector<float>& positions, std::vector<float>& normals,
std::vector<float>& texcoords, const std::vector<float>& in_positions, const std::vector<float>& in_normals, const std::vector<float>& in_texcoords,
const vertex_index& i)
{
const auto it = vertexCache.find(i);
if (it != vertexCache.end())
{
// found cache
return it->second;
}
assert(in_positions.size() > (3*i.v_idx+2));
positions.push_back(in_positions[3*i.v_idx+0]);
positions.push_back(in_positions[3*i.v_idx+1]);
positions.push_back(in_positions[3*i.v_idx+2]);
if (i.vn_idx >= 0)
{
normals.push_back(in_normals[3*i.vn_idx+0]);
normals.push_back(in_normals[3*i.vn_idx+1]);
normals.push_back(in_normals[3*i.vn_idx+2]);
}
if (i.vt_idx >= 0)
{
texcoords.push_back(in_texcoords[2*i.vt_idx+0]);
texcoords.push_back(in_texcoords[2*i.vt_idx+1]);
}
auto idx = positions.size() / 3 - 1;
vertexCache[i] = idx;
return idx;
}
static bool exportFaceGroupToShape( std::map<vertex_index, ssize_t>& vertexCache, ObjLoader::shapes_t& shapes, const std::vector<float> &in_positions,
const std::vector<float> &in_normals, const std::vector<float> &in_texcoords, const std::vector<std::vector<vertex_index> >& faceGroup,
const ObjLoader::material_t &material, const std::string &name)
{
if (faceGroup.empty())
{
return false;
}
// Flattened version of vertex data
std::vector<float>& positions = shapes.positions;
std::vector<float>& normals = shapes.normals;
std::vector<float>& texcoords = shapes.texcoords;
std::vector<unsigned short> indices;
// Flatten vertices and indices
for (size_t i = 0; i < faceGroup.size(); i++)
{
const std::vector<vertex_index>& face = faceGroup[i];
vertex_index i0 = face[0];
vertex_index i1(-1);
vertex_index i2 = face[1];
size_t npolys = face.size();
// Polygon -> triangle fan conversion
for (size_t k = 2; k < npolys; k++)
{
i1 = i2;
i2 = face[k];
unsigned short v0 = updateVertex(vertexCache, positions, normals, texcoords, in_positions, in_normals, in_texcoords, i0);
unsigned short v1 = updateVertex(vertexCache, positions, normals, texcoords, in_positions, in_normals, in_texcoords, i1);
unsigned short v2 = updateVertex(vertexCache, positions, normals, texcoords, in_positions, in_normals, in_texcoords, i2);
indices.push_back(v0);
indices.push_back(v1);
indices.push_back(v2);
}
}
ObjLoader::shape_t shape;
shape.name = name;
shape.material = material;
shape.mesh.indices.swap(indices);
shapes.shapes.push_back(shape);
return true;
}
std::string trim(const std::string& str)
{
if (str.empty())
return str;
auto len = str.length();
char c = str[len - 1];
while (c == '\r' || c == '\n')
{
len--;
c = str[len - 1];
}
return str.substr(0, len);
}
void InitMaterial(ObjLoader::material_t& material)
{
material.name = "";
material.ambient_texname = "";
material.diffuse_texname = "";
material.specular_texname = "";
material.normal_texname = "";
for (int i = 0; i < 3; i ++)
{
material.ambient[i] = 0.f;
material.diffuse[i] = 0.f;
material.specular[i] = 0.f;
material.transmittance[i] = 0.f;
material.emission[i] = 0.f;
}
material.illum = 0;
material.dissolve = 1.f;
material.shininess = 1.f;
material.unknown_parameter.clear();
}
std::string LoadMtl ( std::map<std::string, ObjLoader::material_t>& material_map, const char* filename, const char* mtl_basepath)
{
material_map.clear();
std::stringstream err;
std::string filepath;
if (mtl_basepath)
{
filepath = std::string(mtl_basepath) + std::string(filename);
}
else
{
filepath = std::string(filename);
}
std::ifstream ifs(filepath.c_str());
if (!ifs)
{
err << "Cannot open file [" << filepath << "]" << std::endl;
return err.str();
}
ObjLoader::material_t material;
int maxchars = 8192; // Alloc enough size.
std::vector<char> buf(maxchars); // Alloc enough size.
while (ifs.peek() != -1)
{
ifs.getline(&buf[0], maxchars);
std::string linebuf(&buf[0]);
// Trim newline '\r\n' or '\r'
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size()-1] == '\n') linebuf.erase(linebuf.size()-1);
}
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size()-1] == '\n') linebuf.erase(linebuf.size()-1);
}
// Skip if empty line.
if (linebuf.empty())
{
continue;
}
// Skip leading space.
const char* token = linebuf.c_str();
token += strspn(token, " \t");
assert(token);
if (token[0] == '\0') continue; // empty line
if (token[0] == '#') continue; // comment line
// new mtl
if ((0 == strncmp(token, "newmtl", 6)) && isSpace((token[6])))
{
// flush previous material.
material_map.insert(std::pair<std::string, ObjLoader::material_t>(material.name, material));
// initial temporary material
InitMaterial(material);
// set new mtl name
char namebuf[4096];
token += 7;
sscanf(token, "%s", namebuf);
material.name = namebuf;
continue;
}
// ambient
if (token[0] == 'K' && token[1] == 'a' && isSpace((token[2])))
{
token += 2;
float r, g, b;
parseFloat3(r, g, b, token);
material.ambient[0] = r;
material.ambient[1] = g;
material.ambient[2] = b;
continue;
}
// diffuse
if (token[0] == 'K' && token[1] == 'd' && isSpace((token[2])))
{
token += 2;
float r, g, b;
parseFloat3(r, g, b, token);
material.diffuse[0] = r;
material.diffuse[1] = g;
material.diffuse[2] = b;
continue;
}
// specular
if (token[0] == 'K' && token[1] == 's' && isSpace((token[2])))
{
token += 2;
float r, g, b;
parseFloat3(r, g, b, token);
material.specular[0] = r;
material.specular[1] = g;
material.specular[2] = b;
continue;
}
// transmittance
if (token[0] == 'K' && token[1] == 't' && isSpace((token[2])))
{
token += 2;
float r, g, b;
parseFloat3(r, g, b, token);
material.transmittance[0] = r;
material.transmittance[1] = g;
material.transmittance[2] = b;
continue;
}
// ior(index of refraction)
if (token[0] == 'N' && token[1] == 'i' && isSpace((token[2])))
{
token += 2;
material.ior = parseFloat(token);
continue;
}
// emission
if(token[0] == 'K' && token[1] == 'e' && isSpace(token[2]))
{
token += 2;
float r, g, b;
parseFloat3(r, g, b, token);
material.emission[0] = r;
material.emission[1] = g;
material.emission[2] = b;
continue;
}
// shininess
if(token[0] == 'N' && token[1] == 's' && isSpace(token[2]))
{
token += 2;
material.shininess = parseFloat(token);
continue;
}
// illum model
if (0 == strncmp(token, "illum", 5) && isSpace(token[5]))
{
token += 6;
material.illum = parseInt(token);
continue;
}
// dissolve
if ((token[0] == 'd' && isSpace(token[1])))
{
token += 1;
material.dissolve = parseFloat(token);
continue;
}
if (token[0] == 'T' && token[1] == 'r' && isSpace(token[2]))
{
token += 2;
material.dissolve = parseFloat(token);
continue;
}
// ambient texture
if ((0 == strncmp(token, "map_Ka", 6)) && isSpace(token[6]))
{
token += 7;
material.ambient_texname = trim(token);
continue;
}
// diffuse texture
if ((0 == strncmp(token, "map_Kd", 6)) && isSpace(token[6]))
{
token += 7;
material.diffuse_texname = trim(token);
continue;
}
// specular texture
if ((0 == strncmp(token, "map_Ks", 6)) && isSpace(token[6]))
{
token += 7;
material.specular_texname = trim(token);
continue;
}
// normal texture
if ((0 == strncmp(token, "map_Ns", 6)) && isSpace(token[6]))
{
token += 7;
material.normal_texname = trim(token);
continue;
}
// unknown parameter
const char* _space = strchr(token, ' ');
if(!_space)
{
_space = strchr(token, '\t');
}
if(_space)
{
auto len = _space - token;
std::string key(token, len);
std::string value = _space + 1;
material.unknown_parameter.insert(std::pair<std::string, std::string>(key, value));
}
}
// flush last material.
material_map.insert(std::pair<std::string, ObjLoader::material_t>(material.name, material));
return err.str();
}
std::string ObjLoader::LoadObj(shapes_t& shapes, const char* filename, const char* mtl_basepath)
{
shapes.reset();
std::stringstream err;
std::istringstream ifs(FileUtils::getInstance()->getStringFromFile(filename));
std::map<vertex_index, ssize_t> vertexCache;
//std::ifstream ifs(filename);
if (!ifs)
{
err << "Cannot open file [" << filename << "]" << std::endl;
return err.str();
}
std::vector<float> v;
std::vector<float> vn;
std::vector<float> vt;
std::vector<std::vector<vertex_index> > faceGroup;
std::string name;
// material
std::map<std::string, material_t> material_map;
material_t material;
int maxchars = 8192; // Alloc enough size.
std::vector<char> buf(maxchars); // Alloc enough size.
while (ifs.peek() != -1)
{
ifs.getline(&buf[0], maxchars);
std::string linebuf(&buf[0]);
// Trim newline '\r\n' or '\r'
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size()-1] == '\n') linebuf.erase(linebuf.size()-1);
}
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size()-1] == '\n') linebuf.erase(linebuf.size()-1);
}
// Skip if empty line.
if (linebuf.empty())
{
continue;
}
// Skip leading space.
const char* token = linebuf.c_str();
token += strspn(token, " \t");
assert(token);
if (token[0] == '\0') continue; // empty line
if (token[0] == '#') continue; // comment line
// vertex
if (token[0] == 'v' && isSpace((token[1])))
{
token += 2;
float x, y, z;
parseFloat3(x, y, z, token);
v.push_back(x);
v.push_back(y);
v.push_back(z);
continue;
}
// normal
if (token[0] == 'v' && token[1] == 'n' && isSpace((token[2])))
{
token += 3;
float x, y, z;
parseFloat3(x, y, z, token);
vn.push_back(x);
vn.push_back(y);
vn.push_back(z);
continue;
}
// texcoord
if (token[0] == 'v' && token[1] == 't' && isSpace((token[2])))
{
token += 3;
float x, y;
parseFloat2(x, y, token);
vt.push_back(x);
vt.push_back(y);
continue;
}
// face
if (token[0] == 'f' && isSpace((token[1])))
{
token += 2;
token += strspn(token, " \t");
std::vector<vertex_index> face;
while (!isNewLine(token[0])) {
vertex_index vi = parseTriple(token, v.size() / 3, vn.size() / 3, vt.size() / 2);
face.push_back(vi);
auto n = strspn(token, " \t\r");
token += n;
}
faceGroup.push_back(face);
continue;
}
// use mtl
if ((0 == strncmp(token, "usemtl", 6)) && isSpace((token[6])))
{
char namebuf[4096];
token += 7;
sscanf(token, "%s", namebuf);
if (material_map.find(namebuf) != material_map.end())
{
material = material_map[namebuf];
}
else
{
// { error!! material not found }
InitMaterial(material);
}
continue;
}
// load mtl
if ((0 == strncmp(token, "mtllib", 6)) && isSpace((token[6])))
{
char namebuf[4096];
token += 7;
sscanf(token, "%s", namebuf);
std::string err_mtl = LoadMtl(material_map, namebuf, mtl_basepath);
if (!err_mtl.empty())
{
faceGroup.clear(); // for safety
//return err_mtl;
}
continue;
}
// group name
if (token[0] == 'g' && isSpace((token[1])))
{
// flush previous face group.
shape_t shape;
exportFaceGroupToShape(vertexCache, shapes, v, vn, vt, faceGroup, material, name);
faceGroup.clear();
std::vector<std::string> names;
while (!isNewLine(token[0]))
{
std::string str = parseString(token);
names.push_back(str);
token += strspn(token, " \t\r"); // skip tag
}
assert(names.size() > 0);
// names[0] must be 'g', so skipt 0th element.
if (names.size() > 1)
{
name = names[1];
}
else
{
name = "";
}
continue;
}
// object name
if (token[0] == 'o' && isSpace((token[1])))
{
// flush previous face group.
shape_t shape;
exportFaceGroupToShape(vertexCache, shapes, v, vn, vt, faceGroup, material, name);
faceGroup.clear();
// @todo { multiple object name? }
char namebuf[4096];
token += 2;
sscanf(token, "%s", namebuf);
name = std::string(namebuf);
continue;
}
// Ignore unknown command.
}
shape_t shape;
exportFaceGroupToShape(vertexCache, shapes, v, vn, vt, faceGroup, material, name);
faceGroup.clear(); // for safety
return err.str();
}
NS_CC_END

87
cocos/3d/CCObjLoader.h Normal file
View File

@ -0,0 +1,87 @@
//
// Copyright 2012-2013, Syoyo Fujita.
//
// Licensed under 2-clause BSD liecense.
//
// copied from Syoyo Fujita
// https://github.com/syoyo/tinyobjloader
#ifndef __CCOBJLOADER_H__
#define __CCOBJLOADER_H__
#include <string>
#include <vector>
#include <map>
#include "base/ccTypes.h"
NS_CC_BEGIN
class ObjLoader
{
public:
typedef struct
{
std::string name;
float ambient[3];
float diffuse[3];
float specular[3];
float transmittance[3];
float emission[3];
float shininess;
float ior; // index of refraction
float dissolve; // 1 == opaque; 0 == fully transparent
// illumination model (see http://www.fileformat.info/format/material/)
int illum;
std::string ambient_texname;
std::string diffuse_texname;
std::string specular_texname;
std::string normal_texname;
std::map<std::string, std::string> unknown_parameter;
} material_t;
typedef struct
{
std::vector<unsigned short> indices;
} mesh_t;
typedef struct
{
std::string name;
material_t material;
mesh_t mesh;
} shape_t;
typedef struct
{
std::vector<float> positions;
std::vector<float> normals;
std::vector<float> texcoords;
std::vector<shape_t> shapes;
void reset()
{
positions.clear();
normals.clear();
texcoords.clear();
shapes.clear();
}
}shapes_t;
/// Loads .obj from a file.
/// 'shapes' will be filled with parsed shape data
/// The function returns error string.
/// Returns empty string when loading .obj success.
/// 'mtl_basepath' is optional, and used for base path for .mtl file.
static std::string LoadObj(
shapes_t& shapes, // [output]
const char* filename,
const char* mtl_basepath = NULL);
};
NS_CC_END
#endif // _TINY_OBJ_LOADER_H

271
cocos/3d/CCSprite3D.cpp Normal file
View File

@ -0,0 +1,271 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "3d/CCSprite3D.h"
#include "3d/CCSprite3DDataCache.h"
#include "3d/CCMesh.h"
#include "3d/CCObjLoader.h"
#include "base/CCDirector.h"
#include "base/CCPlatformMacros.h"
#include "base/ccMacros.h"
#include "platform/CCFileUtils.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgramCache.h"
#include "deprecated/CCString.h" // For StringUtils::format
NS_CC_BEGIN
std::string s_attributeNames[] = {GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::ATTRIBUTE_NAME_NORMAL};
Sprite3D* Sprite3D::create(const std::string &modelPath)
{
if (modelPath.length() < 4)
CCASSERT(false, "improper name specified when creating Sprite3D");
auto sprite = new Sprite3D();
if (sprite && sprite->initWithFile(modelPath))
{
sprite->autorelease();
return sprite;
}
CC_SAFE_DELETE(sprite);
return nullptr;
}
Sprite3D* Sprite3D::create(const std::string &modelPath, const std::string &texturePath)
{
auto sprite = create(modelPath);
if (sprite)
{
sprite->setTexture(texturePath);
}
return sprite;
}
// Sprite3D* Sprite3D::create(Mesh* mesh, const std::string& texturePath)
// {
// CCASSERT(nullptr != mesh, "Could not create a Sprite3D from a null Mesh");
// auto sprite = new Sprite3D();
// if(sprite)
// {
// sprite->_mesh = mesh;
// sprite->_mesh->retain();
// sprite->setTexture(texturePath);
// sprite->autorelease();
// return sprite;
// }
// CC_SAFE_DELETE(sprite);
// return nullptr;
// }
//.mtl file should at the same directory with the same name if exist
bool Sprite3D::loadFromObj(const std::string& path)
{
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
//.mtl file directory
std::string dir = "";
auto last = fullPath.rfind("/");
if (last != -1)
dir = fullPath.substr(0, last + 1);
ObjLoader::shapes_t shapes;
std::string errstr = ObjLoader::LoadObj(shapes, fullPath.c_str(), dir.c_str());
if (!errstr.empty())
return false;
//convert to mesh and material
std::vector<unsigned short> indices;
std::vector<std::string> matnames;
std::string texname;
for (auto it = shapes.shapes.begin(); it != shapes.shapes.end(); it++)
{
indices.insert(indices.end(), (*it).mesh.indices.begin(),(*it).mesh.indices.end());
//indices.push_back((*it).mesh.indices);
if (texname.empty())
texname = (*it).material.diffuse_texname;
else if (texname != (*it).material.diffuse_texname)
{
CCLOGWARN("cocos2d:WARNING: more than one texture in %s", path.c_str());
}
matnames.push_back(dir + (*it).material.diffuse_texname);
}
_mesh = Mesh::create(shapes.positions, shapes.normals, shapes.texcoords, indices);
_mesh->retain();
if (_mesh == nullptr)
return false;
if (matnames.size())
{
setTexture(matnames[0]);
}
genGLProgramState();
//add to cache
Sprite3DDataCache::getInstance()->addSprite3D(fullPath, _mesh, matnames.size() > 0 ? matnames[0] : "");
return true;
}
Sprite3D::Sprite3D()
: _mesh(nullptr)
, _texture(nullptr)
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
{
}
Sprite3D::~Sprite3D()
{
CC_SAFE_RELEASE_NULL(_texture);
CC_SAFE_RELEASE_NULL(_mesh);
}
bool Sprite3D::initWithFile(const std::string &path)
{
CC_SAFE_RELEASE_NULL(_mesh);
CC_SAFE_RELEASE_NULL(_texture);
//find from the cache
Mesh* mesh = Sprite3DDataCache::getInstance()->getSprite3DMesh(path);
if (mesh)
{
_mesh = mesh;
_mesh->retain();
auto tex = Sprite3DDataCache::getInstance()->getSprite3DTexture(path);
setTexture(tex);
genGLProgramState();
return true;
}
else
{
//load from file
std::string ext = path.substr(path.length() - 4, 4);
if (ext != ".obj" || !loadFromObj(path))
{
return false;
}
return true;
}
}
void Sprite3D::genGLProgramState()
{
auto programstate = GLProgramState::getOrCreateWithGLProgram(getDefaultGLProgram(_mesh->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_TEX_COORD)));
long offset = 0;
auto attributeCount = _mesh->getMeshVertexAttribCount();
for (auto k = 0; k < attributeCount; k++) {
auto meshattribute = _mesh->getMeshVertexAttribute(k);
programstate->setVertexAttribPointer(s_attributeNames[meshattribute.vertexAttrib],
meshattribute.size,
meshattribute.type,
GL_FALSE,
_mesh->getVertexSizeInBytes(),
(GLvoid*)offset);
offset += meshattribute.attribSizeBytes;
}
setGLProgramState(programstate);
}
GLProgram* Sprite3D::getDefaultGLProgram(bool textured)
{
if(textured)
{
return GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION_TEXTURE);
}
else
{
return GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION);
}
}
void Sprite3D::setTexture(const std::string& texFile)
{
auto tex = Director::getInstance()->getTextureCache()->addImage(texFile);
if( tex && _texture != tex ) {
CC_SAFE_RETAIN(tex);
CC_SAFE_RELEASE_NULL(_texture);
_texture = tex;
}
}
void Sprite3D::setTexture(Texture2D* texture)
{
if(_texture != texture) {
CC_SAFE_RETAIN(texture);
CC_SAFE_RELEASE_NULL(_texture);
_texture = texture;
}
}
void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, bool transformUpdated)
{
GLProgramState* programstate = getGLProgramState();
Color4F color(getDisplayedColor());
color.a = getDisplayedOpacity() / 255.0f;
GLuint textureID = _texture ? _texture->getName() : 0;
_meshCommand.init(_globalZOrder,
textureID,
programstate,
_blend,
_mesh->getVertexBuffer(),
_mesh->getIndexBuffer(),
(GLenum)_mesh->getPrimitiveType(),
(GLenum)_mesh->getIndexFormat(),
_mesh->getIndexCount(),
transform);
_meshCommand.setCullFaceEnabled(true);
_meshCommand.setDepthTestEnabled(true);
//support tint and fade
_meshCommand.setDisplayColor(Vec4(color.r, color.g, color.b, color.a));
Director::getInstance()->getRenderer()->addCommand(&_meshCommand);
}
void Sprite3D::setBlendFunc(const BlendFunc &blendFunc)
{
if(_blend.src != blendFunc.src || _blend.dst != blendFunc.dst)
{
_blend = blendFunc;
}
}
const BlendFunc& Sprite3D::getBlendFunc() const
{
return _blend;
}
NS_CC_END

85
cocos/3d/CCSprite3D.h Normal file
View File

@ -0,0 +1,85 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCSPRITE3D_H__
#define __CCSPRITE3D_H__
#include <vector>
#include "base/CCVector.h"
#include "base/ccTypes.h"
#include "base/CCProtocols.h"
#include "2d/CCNode.h"
#include "renderer/CCMeshCommand.h"
NS_CC_BEGIN
class GLProgramState;
class Mesh;
class Texture2D;
/** Sprite3D: TODO add description */
class Sprite3D : public Node, public BlendProtocol
{
public:
/// creates a Sprite3D
static Sprite3D* create(const std::string &modelPath);
// creates a Sprite3D. It only supports one texture, and overrides the internal texture with 'texturePath'
static Sprite3D* create(const std::string &modelPath, const std::string &texturePath);
//set texture
void setTexture(const std::string& texFile);
void setTexture(Texture2D* texture);
Mesh* getMesh() const { return _mesh; }
// overrides
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
virtual const BlendFunc &getBlendFunc() const override;
protected:
Sprite3D();
virtual ~Sprite3D();
bool initWithFile(const std::string &path);
//.mtl file should at the same directory with the same name if exist
bool loadFromObj(const std::string& path);
virtual void draw(Renderer *renderer, const Mat4 &transform, bool transformUpdated) override;
virtual GLProgram* getDefaultGLProgram(bool textured = true);
void genGLProgramState();
Mesh *_mesh;
MeshCommand _meshCommand;
Texture2D* _texture;
BlendFunc _blend;
};
extern std::string s_attributeNames[];
NS_CC_END
#endif // __SPRITE3D_H_

View File

@ -0,0 +1,145 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "3d/CCSprite3DDataCache.h"
#include "3d/CCMesh.h"
#include "platform/CCFileUtils.h"
#include "renderer/CCTextureCache.h"
#include "base/CCEventCustom.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "base/CCEventType.h"
#include "base/CCDirector.h"
NS_CC_BEGIN
Sprite3DDataCache* Sprite3DDataCache::_cacheInstance = nullptr;
Sprite3DDataCache::Sprite3DDataCache()
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// listen the event when app go to foreground
_backToForegroundlistener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND, CC_CALLBACK_1(Sprite3DDataCache::listenBackToForeground, this));
Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundlistener, -1);
#endif
}
Sprite3DDataCache::~Sprite3DDataCache()
{
removeAllSprite3DData();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundlistener);
#endif
}
Sprite3DDataCache* Sprite3DDataCache::getInstance()
{
if (! _cacheInstance)
{
_cacheInstance = new Sprite3DDataCache();
}
return _cacheInstance;
}
void Sprite3DDataCache::purgeMeshCache()
{
if (_cacheInstance)
{
CC_SAFE_DELETE(_cacheInstance);
}
}
bool Sprite3DDataCache::addSprite3D(const std::string& fileName, Mesh* mesh, const std::string& texture)
{
const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName);
auto itr = _sprite3DDatas.find(fullPath);
if (itr == _sprite3DDatas.end())
{
Sprite3DData data;
data.mesh = mesh;
CC_SAFE_RETAIN(mesh);
data.texture = texture;
_sprite3DDatas[fullPath] = data;
return true;
}
return false;
}
Mesh* Sprite3DDataCache::getSprite3DMesh(const std::string& fileName)
{
const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName);
auto itr = _sprite3DDatas.find(fullPath);
if (itr != _sprite3DDatas.end())
return itr->second.mesh;
return nullptr;
}
Texture2D* Sprite3DDataCache::getSprite3DTexture(const std::string& fileName)
{
const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName);
auto itr = _sprite3DDatas.find(fullPath);
if (itr != _sprite3DDatas.end())
{
auto cache = Director::getInstance()->getTextureCache();
return cache->addImage(itr->second.texture);
}
return nullptr;
}
void Sprite3DDataCache::removeAllSprite3DData()
{
for (auto itr = _sprite3DDatas.begin(); itr != _sprite3DDatas.end(); itr++) {
CC_SAFE_RELEASE_NULL(itr->second.mesh);
}
_sprite3DDatas.clear();
}
void Sprite3DDataCache::removeUnusedSprite3DData()
{
for( auto it=_sprite3DDatas.cbegin(); it!=_sprite3DDatas.cend(); /* nothing */) {
auto value = it->second;
if( value.mesh->getReferenceCount() == 1 ) {
CCLOG("cocos2d: GLProgramStateCache: removing unused GLProgramState");
value.mesh->release();
_sprite3DDatas.erase(it++);
} else {
++it;
}
}
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
void Sprite3DDataCache::listenBackToForeground(EventCustom* event)
{
for (auto iter = _sprite3DDatas.begin(); iter != _sprite3DDatas.end(); ++iter)
{
auto mesh = iter->second.mesh;
mesh->restore();
}
}
#endif
NS_CC_END

View File

@ -0,0 +1,83 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCSPRIT3DDATA_CACHE_H__
#define __CCSPRIT3DDATA_CACHE_H__
#include <string>
#include <unordered_map>
#include "base/ccTypes.h"
#include "base/CCMap.h"
NS_CC_BEGIN
class Sprite3D;
class Mesh;
class EventListenerCustom;
class EventCustom;
class Texture2D;
class Sprite3DDataCache
{
public:
struct Sprite3DData
{
Mesh* mesh;
std::string texture;
};
static Sprite3DDataCache* getInstance();
static void purgeMeshCache();
bool addSprite3D(const std::string& fileName, Mesh* mesh, const std::string& texture);
Mesh* getSprite3DMesh(const std::string& fileName);
Texture2D* getSprite3DTexture(const std::string& fileName);
void removeAllSprite3DData();
void removeUnusedSprite3DData();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
void listenBackToForeground(EventCustom* event);
#endif
protected:
Sprite3DDataCache();
~Sprite3DDataCache();
static Sprite3DDataCache* _cacheInstance;
std::unordered_map<std::string, Sprite3DData> _sprite3DDatas; //sprites
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
EventListenerCustom* _backToForegroundlistener;
#endif
};
NS_CC_END
#endif // __CCSPRIT3DDATA_CACHE_H__

7
cocos/3d/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
set(COCOS_3D_SRC
3d/CCMesh.cpp
3d/CCObjLoader.cpp
3d/CCSprite3D.cpp
3d/CCSprite3DDataCache.cpp
)

View File

@ -12,8 +12,8 @@ cocos2d.cpp \
2d/CCActionCamera.cpp \
2d/CCActionCatmullRom.cpp \
2d/CCActionEase.cpp \
2d/CCActionGrid3D.cpp \
2d/CCActionGrid.cpp \
2d/CCActionGrid3D.cpp \
2d/CCActionInstant.cpp \
2d/CCActionInterval.cpp \
2d/CCActionManager.cpp \
@ -21,30 +21,28 @@ cocos2d.cpp \
2d/CCActionProgressTimer.cpp \
2d/CCActionTiledGrid.cpp \
2d/CCActionTween.cpp \
2d/CCAnimationCache.cpp \
2d/CCAnimation.cpp \
2d/CCAnimationCache.cpp \
2d/CCAtlasNode.cpp \
2d/ccCArray.cpp \
2d/CCClippingNode.cpp \
2d/CCComponentContainer.cpp \
2d/CCComponent.cpp \
2d/CCDrawingPrimitives.cpp \
2d/CCComponentContainer.cpp \
2d/CCDrawNode.cpp \
2d/CCFontAtlasCache.cpp \
2d/CCFontAtlas.cpp \
2d/CCFontCharMap.cpp \
2d/CCDrawingPrimitives.cpp \
2d/CCFont.cpp \
2d/CCFontAtlas.cpp \
2d/CCFontAtlasCache.cpp \
2d/CCFontCharMap.cpp \
2d/CCFontFNT.cpp \
2d/CCFontFreeType.cpp \
2d/CCGLBufferedNode.cpp \
2d/CCGrabber.cpp \
2d/CCGrid.cpp \
2d/CCIMEDispatcher.cpp \
2d/CCLabel.cpp \
2d/CCLabelAtlas.cpp \
2d/CCLabelBMFont.cpp \
2d/CCLabel.cpp \
2d/CCLabelTextFormatter.cpp \
2d/CCLabelTTF.cpp \
2d/CCLabelTextFormatter.cpp \
2d/CCLayer.cpp \
2d/CCMenu.cpp \
2d/CCMenuItem.cpp \
@ -59,45 +57,39 @@ cocos2d.cpp \
2d/CCProgressTimer.cpp \
2d/CCRenderTexture.cpp \
2d/CCScene.cpp \
2d/CCScriptSupport.cpp \
2d/CCSpriteBatchNode.cpp \
2d/CCSprite.cpp \
2d/CCSpriteFrameCache.cpp \
2d/CCSpriteBatchNode.cpp \
2d/CCSpriteFrame.cpp \
2d/CCTextFieldTTF.cpp \
2d/CCTexture2D.cpp \
2d/CCTextureAtlas.cpp \
2d/CCTextureCache.cpp \
2d/CCTileMapAtlas.cpp \
2d/CCSpriteFrameCache.cpp \
2d/CCTMXLayer.cpp \
2d/CCTMXObjectGroup.cpp \
2d/CCTMXTiledMap.cpp \
2d/CCTMXXMLParser.cpp \
2d/CCTextFieldTTF.cpp \
2d/CCTileMapAtlas.cpp \
2d/CCTransition.cpp \
2d/CCTransitionPageTurn.cpp \
2d/CCTransitionProgress.cpp \
2d/CCTweenFunction.cpp \
2d/CCUserDefaultAndroid.cpp \
2d/CCUserDefault.cpp \
2d/ccUTF8.cpp \
2d/ccUtils.cpp \
2d/CCVertex.cpp \
2d/TGAlib.cpp \
2d/ccFPSImages.c \
2d/platform/CCGLViewProtocol.cpp \
2d/platform/CCFileUtils.cpp \
2d/platform/CCSAXParser.cpp \
2d/platform/CCThread.cpp \
2d/platform/CCImage.cpp \
3d/CCMesh.cpp \
3d/CCSprite3DDataCache.cpp \
3d/CCObjLoader.cpp \
3d/CCSprite3D.cpp \
platform/CCGLViewProtocol.cpp \
platform/CCFileUtils.cpp \
platform/CCSAXParser.cpp \
platform/CCThread.cpp \
platform/CCImage.cpp \
math/CCAffineTransform.cpp \
math/CCGeometry.cpp \
math/CCVertex.cpp \
math/Mat4.cpp \
math/MathUtil.cpp \
math/Matrix.cpp \
math/Quaternion.cpp \
math/TransformUtils.cpp \
math/Vector2.cpp \
math/Vector3.cpp \
math/Vector4.cpp \
math/Vec2.cpp \
math/Vec3.cpp \
math/Vec4.cpp \
base/CCAutoreleasePool.cpp \
base/CCConfiguration.cpp \
base/CCConsole.cpp \
@ -108,40 +100,53 @@ base/CCEvent.cpp \
base/CCEventAcceleration.cpp \
base/CCEventCustom.cpp \
base/CCEventDispatcher.cpp \
base/CCEventFocus.cpp \
base/CCEventKeyboard.cpp \
base/CCEventListener.cpp \
base/CCEventListenerAcceleration.cpp \
base/CCEventListenerCustom.cpp \
base/CCEventListenerFocus.cpp \
base/CCEventListenerKeyboard.cpp \
base/CCEventListenerMouse.cpp \
base/CCEventListenerTouch.cpp \
base/CCEventMouse.cpp \
base/CCEventTouch.cpp \
base/CCEventFocus.cpp \
base/CCEventListenerFocus.cpp \
base/CCIMEDispatcher.cpp \
base/CCNS.cpp \
base/CCProfiling.cpp \
base/CCRef.cpp \
base/CCScheduler.cpp \
base/CCScriptSupport.cpp \
base/CCTouch.cpp \
base/CCUserDefault.cpp \
base/CCUserDefaultAndroid.cpp \
base/CCValue.cpp \
base/TGAlib.cpp \
base/ZipUtils.cpp \
base/atitc.cpp \
base/base64.cpp \
base/ccCArray.cpp \
base/ccFPSImages.c \
base/ccTypes.cpp \
base/ccUTF8.cpp \
base/ccUtils.cpp \
base/etc1.cpp \
base/s3tc.cpp \
renderer/CCBatchCommand.cpp \
renderer/CCCustomCommand.cpp \
renderer/CCGLProgram.cpp \
renderer/CCGLProgramCache.cpp \
renderer/CCGLProgramState.cpp \
renderer/CCGLProgramStateCache.cpp \
renderer/ccGLStateCache.cpp \
renderer/CCGroupCommand.cpp \
renderer/CCQuadCommand.cpp \
renderer/CCMeshCommand.cpp \
renderer/CCRenderCommand.cpp \
renderer/CCRenderer.cpp \
renderer/CCGLProgramCache.cpp \
renderer/CCTexture2D.cpp \
renderer/CCTextureAtlas.cpp \
renderer/CCTextureCache.cpp \
renderer/ccGLStateCache.cpp \
renderer/ccShaders.cpp \
deprecated/CCArray.cpp \
deprecated/CCSet.cpp \
@ -170,8 +175,7 @@ physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/. \
$(LOCAL_PATH)/2d \
$(LOCAL_PATH)/2d/platform/android \
$(LOCAL_PATH)/platform/android \
$(LOCAL_PATH)/../external/tinyxml2 \
$(LOCAL_PATH)/../external/unzip \
$(LOCAL_PATH)/../external/chipmunk/include/chipmunk \
@ -179,7 +183,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/. \
$(LOCAL_PATH)/2d/platform/android \
$(LOCAL_PATH)/platform/android \
$(LOCAL_PATH)/../external/tinyxml2 \
$(LOCAL_PATH)/../external/unzip \
$(LOCAL_PATH)/../external/chipmunk/include/chipmunk \
@ -212,4 +216,4 @@ include $(BUILD_STATIC_LIBRARY)
$(call import-module,freetype2/prebuilt/android)
$(call import-module,chipmunk)
$(call import-module,2d/platform/android)
$(call import-module,platform/android)

View File

@ -8,6 +8,8 @@ set(COCOS_SRC
)
include(2d/CMakeLists.txt)
include(3d/CMakeLists.txt)
include(platform/CMakeLists.txt)
include(physics/CMakeLists.txt)
include(math/CMakeLists.txt)
include(renderer/CMakeLists.txt)
@ -20,7 +22,8 @@ include(storage/CMakeLists.txt)
add_library(cocos2d STATIC
${COCOS_SRC}
${COCOS_2D_SRC}
${COCOS_2D_PLATFORM_SRC}
${COCOS_3D_SRC}
${COCOS_PLATFORM_SRC}
${COCOS_BASE_SRC}
${COCOS_RENDERER_SRC}
${COCOS_MATH_SRC}

View File

@ -13,11 +13,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../../math \
$(LOCAL_PATH)/../../2d \
$(LOCAL_PATH)/../../2d/platform/android \
$(LOCAL_PATH)/../../base \
$(LOCAL_PATH)/../../physics
$(LOCAL_PATH)/../../platform/android
LOCAL_CFLAGS += -Wno-psabi
LOCAL_EXPORT_CFLAGS += -Wno-psabi

View File

@ -28,7 +28,7 @@ THE SOFTWARE.
#include <string.h>
#include "base/ccMacros.h"
#include "base/ccConfig.h"
#include "2d/platform/CCFileUtils.h"
#include "platform/CCFileUtils.h"
NS_CC_BEGIN

View File

@ -59,8 +59,8 @@
#include "base/CCPlatformConfig.h"
#include "base/CCConfiguration.h"
#include "2d/CCScene.h"
#include "2d/platform/CCFileUtils.h"
#include "2d/CCTextureCache.h"
#include "platform/CCFileUtils.h"
#include "renderer/CCTextureCache.h"
#include "CCGLView.h"
#include "base/base64.h"
NS_CC_BEGIN

View File

@ -24,7 +24,7 @@
****************************************************************************/
#include "base/CCData.h"
#include "2d/platform/CCCommon.h"
#include "platform/CCCommon.h"
#include "base/ccMacros.h"
#include <string>

View File

@ -31,23 +31,24 @@ THE SOFTWARE.
// standard includes
#include <string>
#include "2d/ccFPSImages.h"
#include "2d/CCDrawingPrimitives.h"
#include "2d/CCScene.h"
#include "2d/CCSpriteFrameCache.h"
#include "2d/platform/CCFileUtils.h"
#include "renderer/ccGLStateCache.h"
#include "2d/platform/CCImage.h"
#include "platform/CCFileUtils.h"
#include "platform/CCImage.h"
#include "2d/CCActionManager.h"
#include "2d/CCFontFNT.h"
#include "2d/CCFontAtlasCache.h"
#include "2d/CCAnimationCache.h"
#include "2d/CCUserDefault.h"
#include "2d/CCTransition.h"
#include "2d/CCFontFreeType.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/CCGLProgramStateCache.h"
#include "2d/CCTransition.h"
#include "2d/CCTextureCache.h"
#include "2d/CCFontFreeType.h"
#include "renderer/CCTextureCache.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCRenderer.h"
#include "base/CCUserDefault.h"
#include "base/ccFPSImages.h"
#include "base/CCScheduler.h"
#include "base/ccMacros.h"
#include "base/CCEventDispatcher.h"
@ -57,7 +58,6 @@ THE SOFTWARE.
#include "base/CCAutoreleasePool.h"
#include "base/CCProfiling.h"
#include "base/CCConfiguration.h"
#include "renderer/CCRenderer.h"
#include "base/CCNS.h"
#include "math/CCMath.h"
#include "CCApplication.h"
@ -887,6 +887,13 @@ void Director::popToSceneStackLevel(int level)
if (level >= c)
return;
auto fisrtOnStackScene = _scenesStack.back();
if (fisrtOnStackScene == _runningScene)
{
_scenesStack.popBack();
--c;
}
// pop stack until reaching desired level
while (c > level)
{
@ -903,7 +910,9 @@ void Director::popToSceneStackLevel(int level)
}
_nextScene = _scenesStack.back();
_sendCleanupToScene = false;
// cleanup running scene
_sendCleanupToScene = true;
}
void Director::end()

View File

@ -292,6 +292,14 @@ void EventDispatcher::pauseEventListenersForTarget(Node* target, bool recursive/
l->setPaused(true);
}
}
for (auto& listener : _toAddedListeners)
{
if (listener->getAssociatedNode() == target)
{
listener->setPaused(true);
}
}
if (recursive)
{
@ -314,6 +322,15 @@ void EventDispatcher::resumeEventListenersForTarget(Node* target, bool recursive
l->setPaused(false);
}
}
for (auto& listener : _toAddedListeners)
{
if (listener->getAssociatedNode() == target)
{
listener->setPaused(false);
}
}
setDirtyForNode(target);
if (recursive)

View File

@ -23,7 +23,7 @@
****************************************************************************/
#include "base/CCEventListener.h"
#include "2d/platform/CCCommon.h"
#include "platform/CCCommon.h"
NS_CC_BEGIN

View File

@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCIMEDispatcher.h"
#include "base/CCIMEDispatcher.h"
#include <list>

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#ifndef __CC_IME_DISPATCHER_H__
#define __CC_IME_DISPATCHER_H__
#include "2d/CCIMEDelegate.h"
#include "base/CCIMEDelegate.h"
NS_CC_BEGIN

View File

@ -23,8 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_PLATFORM_CONFIG_H__
#define __CC_PLATFORM_CONFIG_H__
#ifndef __BASE_CC_PLATFORM_CONFIG_H__
#define __BASE_CC_PLATFORM_CONFIG_H__
/**
Config of cocos2d-x project, per target platform.
@ -154,5 +154,5 @@ Config of cocos2d-x project, per target platform.
#endif
#endif // CC_PLATFORM_WIN32
#endif // __CC_PLATFORM_CONFIG_H__
#endif // __BASE_CC_PLATFORM_CONFIG_H__

View File

@ -24,12 +24,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCPROTOCOLS_H__
#define __CCPROTOCOLS_H__
#ifndef __BASE_CCPROTOCOLS_H__
#define __BASE_CCPROTOCOLS_H__
#include <string>
#include "base/ccTypes.h"
#include "2d/CCTexture2D.h"
#include <string>
#include "renderer/CCTexture2D.h"
NS_CC_BEGIN
@ -267,4 +268,4 @@ public:
NS_CC_END
#endif // __CCPROTOCOLS_H__
#endif // __BASE_CCPROTOCOLS_H__

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#include "base/CCRef.h"
#include "base/CCAutoreleasePool.h"
#include "base/ccMacros.h"
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#if CC_USE_MEM_LEAK_DETECTION
#include <algorithm> // std::find

View File

@ -23,8 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCREF_H__
#define __CCREF_H__
#ifndef __BASE_CCREF_H__
#define __BASE_CCREF_H__
#include "base/CCPlatformMacros.h"
#include "base/ccConfig.h"
@ -172,4 +172,4 @@ typedef void (Ref::*SEL_SCHEDULE)(float);
NS_CC_END
#endif // __CCREF_H__
#endif // __BASE_CCREF_H__

View File

@ -28,9 +28,9 @@ THE SOFTWARE.
#include "base/CCScheduler.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "2d/utlist.h"
#include "2d/ccCArray.h"
#include "2d/CCScriptSupport.h"
#include "base/utlist.h"
#include "base/ccCArray.h"
#include "base/CCScriptSupport.h"
NS_CC_BEGIN

View File

@ -34,7 +34,7 @@ THE SOFTWARE.
#include "base/CCRef.h"
#include "base/CCVector.h"
#include "2d/uthash.h"
#include "base/uthash.h"
NS_CC_BEGIN

View File

@ -23,7 +23,7 @@
THE SOFTWARE.
****************************************************************************/
#include "2d/CCScriptSupport.h"
#include "base/CCScriptSupport.h"
#if CC_ENABLE_SCRIPT_BINDING

View File

@ -29,7 +29,7 @@
#include "base/ccConfig.h"
#if CC_ENABLE_SCRIPT_BINDING
#include "2d/platform/CCCommon.h"
#include "platform/CCCommon.h"
#include "base/CCTouch.h"
#include "base/CCEventTouch.h"
#include "base/CCEventKeyboard.h"

View File

@ -22,9 +22,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "2d/CCUserDefault.h"
#include "2d/platform/CCCommon.h"
#include "2d/platform/CCFileUtils.h"
#include "base/CCUserDefault.h"
#include "platform/CCCommon.h"
#include "platform/CCFileUtils.h"
#include "tinyxml2.h"
#include "base/base64.h"

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